// [in] refguid rguidtypelib,
// [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;