打印本文 打印本文 关闭窗口 关闭窗口
AXScript.pas,从官方站点找到的IActivsScript接口
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2412  更新时间:2009/4/23 18:34:01  文章录入:mintao  责任编辑:mintao
>    //     [in] DWORD dwMajor,
    //     [in] DWORD dwMinor,
    //     [in] DWORD dwFlags);
    // Adds the type and constant defintions contained in the designated type
    // library to the namespace of the scripting engine.
    function AddTypeLib(TypeLib: TGUID; Major: DWORD; Minor: DWORD; Flags: DWORD): HRESULT; stdcall;

    // HRESULT GetScriptDispatch(
    //     [in] LPCOLESTR pstrItemName,
    //     [out] IDispatch **ppdisp);
    // Gets the IDispatch pointer to the scripting engine.
    function GetScriptDispatch(ItemName: POleStr; out Disp: IDispatch): HRESULT; stdcall;

    // HRESULT GetCurrentScriptThreadID(
    //     [out] SCRIPTTHREADID *pstidThread);
    // Gets the script''''s logical thread ID that corresponds to the current
    // physical thread.  This allows script engines to execute script code on
    // arbitrary threads that may be distinct from the site''''s thread.
    function GetCurrentScriptThreadID(out Thread: TScriptThreadID): HRESULT; stdcall;

    // HRESULT GetScriptThreadID(
    //     [in] DWORD dwWin32ThreadID,
    //     [out] SCRIPTTHREADID *pstidThread);
    // Gets the logical thread ID that corresponds to the specified physical
    // thread.  This allows script engines to execute script code on arbitrary
    // threads that may be distinct from the sites thread.
    function GetScriptThreadID(Win32ThreadID: DWORD; out Thread: TScriptThreadID): HRESULT; stdcall;

    // HRESULT GetScriptThreadState(
    //     [in] SCRIPTTHREADID stidThread,
    //     [out] SCRIPTTHREADSTATE *pstsState);
    // Gets the logical thread ID running state, which is either
    // SCRIPTTHREADSTATE_NOTINSCRIPT or SCRIPTTHEADSTATE_RUNNING.
    function GetScriptThreadState(Thread: TScriptThreadID; out State: TScriptThreadState): HRESULT; stdcall;

    // HRESULT InterruptScriptThread(
    //     [in] SCRIPTTHREADID stidThread,
    //     [in] const EXCEPINFO *pexcepInfo,
    //     [in] DWORD dwFlags);
    // Similar to Terminatethread, this method stope the execution of a script thread.
    function InterruptScriptThread(Thread: TScriptThreadID; const ExcepInfo: TExcepInfo; Flags: DWORD): HRESULT; stdcall;

    // HRESULT Clone(
    //     [out] IActiveScript **ppscript);
    // Duplicates the current script engine, replicating any parsed script text
    // and named items, but no the actual pointers to the site''''s objects.
    function Clone(out ActiveScript: IActiveScript): HRESULT; stdcall;
  end;  //IActiveScript interface

  IActiveScriptParse = interface(IUnknown)
    [''''{BB1A2AE2-A4F9-11CF-8F20-00805F2CD064}'''']

    // HRESULT InitNew(void);
    function InitNew: HRESULT; stdcall;

    // HRESULT AddScriptlet(
    //     [in] LPCOLESTR pstrDefaultName,
    //     [in] LPCOLESTR pstrCode,
    //     [in] LPCOLESTR pstrItemName,
    //     [in] LPCOLESTR pstrSubItemName,
    //     [in] LPCOLESTR pstrEventName,
    //     [in] LPCOLESTR pstrDelimiter,
    //     [in] DWORD dwSourceContextCookie,
    //     [in] ULONG ulStartingLineNumber,
    //     [in] DWORD dwFlags,
    //     [out] BSTR *pbstrName,
    //     [out] EXCEPINFO *pexcepinfo);
    function AddScriptlet(
          DefaultName: POleStr;
          Code: POleStr;
          ItemName: POleStr;
          SubItemName: POleStr;
          EventName: POleStr;
          Delimiter: POleStr;
          SourceContextCookie: DWORD;
          StartingLineNnumber: ULONG;
          Flags: DWORD;
      out Name: TBSTR;
      out ExcepInfo: TExcepInfo
    ): HRESULT; stdcall;

    // HRESULT STDMETHODCALLTYPE ParseScriptText(
    //     [in] LPCOLESTR pstrCode,
    //     [in] LPCOLESTR pstrItemName,
    //     [in] IUnknown  *punkContext,
    //     [in] LPCOLESTR pstrDelimiter,
    //     [in] DWORD dwSourceContextCookie,
    //     [in] ULONG ulStartingLineNumber,
    //     [in] DWORD dwFlags,
    //     [out] VARIANT *pvarResult,
    //     [out] EXCEPINFO *pexcepinfo);
    function ParseScriptText(
      const pstrCode: POLESTR;
      const pstrItemName: POLESTR;
      const punkContext: IUnknown;
      const pstrDelimiter: POLESTR;
            dwSourceContextCookie: DWORD;
            ulStartingLineNumber: ULONG;
            dwFlags: DWORD;
      out   pvarResult: OleVariant;
      out   pExcepInfo: TExcepInfo
    ): HRESULT; stdcall;

end;  //IActivScriptParse interface


IActiveScriptParseProcedure=interface(IUnknown)
  [''''{1CFF0050-6FDD-11d0-9328-00A0C90DCAA9}'''']

  function ParseProcedureText(
     const pstrCode: POLESTR;
     const pstrFormalParams: POLESTR;
     const pstrItemName: POLESTR;
           punkContext: IUnknown;
     const pstrDelimiter: POLESTR;
           dwSourceContextCookie: DWord;
           ulStartingLineNumber: ULong;
           dwFlags: DWord;
     out   ppdisp: IDispatch
  ): HResult; stdcall;

end;  //IActivScriptParseProcedure interface


implementation


end.

 

上一页  [1] [2] [3] 

打印本文 打印本文 关闭窗口 关闭窗口