ReactOS  0.4.15-dev-1374-g8d3e80e
script.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winuser.h"
#include "msidefs.h"
#include "msipriv.h"
#include "activscp.h"
#include "oleauto.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "msiserver.h"
Include dependency graph for script.c:

Go to the source code of this file.

Classes

struct  MsiActiveScriptSite
 

Macros

#define COBJMACROS
 
#define IActiveScriptParse_Release   IActiveScriptParse32_Release
 
#define IActiveScriptParse_InitNew   IActiveScriptParse32_InitNew
 
#define IActiveScriptParse_ParseScriptText   IActiveScriptParse32_ParseScriptText
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msi)
 
static MsiActiveScriptSiteimpl_from_IActiveScriptSite (IActiveScriptSite *iface)
 
static HRESULT WINAPI MsiActiveScriptSite_QueryInterface (IActiveScriptSite *iface, REFIID riid, void **obj)
 
static ULONG WINAPI MsiActiveScriptSite_AddRef (IActiveScriptSite *iface)
 
static ULONG WINAPI MsiActiveScriptSite_Release (IActiveScriptSite *iface)
 
static HRESULT WINAPI MsiActiveScriptSite_GetLCID (IActiveScriptSite *iface, LCID *plcid)
 
static HRESULT WINAPI MsiActiveScriptSite_GetItemInfo (IActiveScriptSite *iface, LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti)
 
static HRESULT WINAPI MsiActiveScriptSite_GetDocVersionString (IActiveScriptSite *iface, BSTR *pbstrVersion)
 
static HRESULT WINAPI MsiActiveScriptSite_OnScriptTerminate (IActiveScriptSite *iface, const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo)
 
static HRESULT WINAPI MsiActiveScriptSite_OnStateChange (IActiveScriptSite *iface, SCRIPTSTATE ssScriptState)
 
static HRESULT WINAPI MsiActiveScriptSite_OnScriptError (IActiveScriptSite *iface, IActiveScriptError *pscripterror)
 
static HRESULT WINAPI MsiActiveScriptSite_OnEnterScript (IActiveScriptSite *iface)
 
static HRESULT WINAPI MsiActiveScriptSite_OnLeaveScript (IActiveScriptSite *iface)
 
static HRESULT create_activescriptsite (MsiActiveScriptSite **obj)
 
static UINT map_return_value (LONG val)
 
DWORD call_script (MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function, LPCWSTR action)
 

Variables

static const WCHAR szJScript [] = { 'J','S','c','r','i','p','t',0}
 
static const WCHAR szVBScript [] = { 'V','B','S','c','r','i','p','t',0}
 
static const WCHAR szSession [] = {'S','e','s','s','i','o','n',0}
 
static const struct IActiveScriptSiteVtbl activescriptsitevtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file script.c.

◆ IActiveScriptParse_InitNew

#define IActiveScriptParse_InitNew   IActiveScriptParse32_InitNew

Definition at line 48 of file script.c.

◆ IActiveScriptParse_ParseScriptText

#define IActiveScriptParse_ParseScriptText   IActiveScriptParse32_ParseScriptText

Definition at line 49 of file script.c.

◆ IActiveScriptParse_Release

#define IActiveScriptParse_Release   IActiveScriptParse32_Release

Definition at line 47 of file script.c.

Function Documentation

◆ call_script()

DWORD call_script ( MSIHANDLE  hPackage,
INT  type,
LPCWSTR  script,
LPCWSTR  function,
LPCWSTR  action 
)

Definition at line 293 of file script.c.

294 {
295  HRESULT hr;
296  IActiveScript *pActiveScript = NULL;
297  IActiveScriptParse *pActiveScriptParse = NULL;
298  MsiActiveScriptSite *scriptsite;
299  IDispatch *pDispatch = NULL;
300  DISPPARAMS dispparamsNoArgs = {NULL, NULL, 0, 0};
301  DISPID dispid;
302  CLSID clsid;
303  VARIANT var;
305 
307 
308  /* Create MsiActiveScriptSite object */
309  hr = create_activescriptsite(&scriptsite);
310  if (hr != S_OK) goto done;
311 
312  /* Create an installer object */
313  hr = create_msiserver(NULL, (void**)&scriptsite->installer);
314  if (hr != S_OK) goto done;
315 
316  /* Create a session object */
317  hr = create_session(hPackage, scriptsite->installer, &scriptsite->session);
318  if (hr != S_OK) goto done;
319 
320  /* Create the scripting engine */
326  else {
327  ERR("Unknown script type %d\n", type);
328  goto done;
329  }
330  if (FAILED(hr)) {
331  ERR("Could not find CLSID for Windows Script\n");
332  goto done;
333  }
334  hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IActiveScript, (void **)&pActiveScript);
335  if (FAILED(hr)) {
336  ERR("Could not instantiate class for Windows Script\n");
337  goto done;
338  }
339 
340  hr = IActiveScript_QueryInterface(pActiveScript, &IID_IActiveScriptParse, (void **)&pActiveScriptParse);
341  if (FAILED(hr)) goto done;
342 
343  hr = IActiveScript_SetScriptSite(pActiveScript, &scriptsite->IActiveScriptSite_iface);
344  if (FAILED(hr)) goto done;
345 
346  hr = IActiveScriptParse_InitNew(pActiveScriptParse);
347  if (FAILED(hr)) goto done;
348 
349  hr = IActiveScript_AddNamedItem(pActiveScript, szSession, SCRIPTITEM_GLOBALMEMBERS|SCRIPTITEM_ISVISIBLE);
350  if (FAILED(hr)) goto done;
351 
352  hr = IActiveScriptParse_ParseScriptText(pActiveScriptParse, script, NULL, NULL, NULL, 0, 0, 0L, NULL, NULL);
353  if (FAILED(hr)) goto done;
354 
355  hr = IActiveScript_SetScriptState(pActiveScript, SCRIPTSTATE_CONNECTED);
356  if (FAILED(hr)) goto done;
357 
358  /* Call a function if necessary through the IDispatch interface */
359  if (function && function[0]) {
360  TRACE("Calling function %s\n", debugstr_w(function));
361 
362  hr = IActiveScript_GetScriptDispatch(pActiveScript, NULL, &pDispatch);
363  if (FAILED(hr)) goto done;
364 
365  hr = IDispatch_GetIDsOfNames(pDispatch, &IID_NULL, (WCHAR **)&function, 1,LOCALE_USER_DEFAULT, &dispid);
366  if (FAILED(hr)) goto done;
367 
368  hr = IDispatch_Invoke(pDispatch, dispid, &IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &dispparamsNoArgs, &var, NULL, NULL);
369  if (FAILED(hr)) goto done;
370 
371  hr = VariantChangeType(&var, &var, 0, VT_I4);
372  if (FAILED(hr)) goto done;
373 
375 
376  VariantClear(&var);
377  } else {
378  /* If no function to be called, MSI behavior is to succeed */
379  ret = ERROR_SUCCESS;
380  }
381 
382 done:
383 
384  if (pDispatch) IDispatch_Release(pDispatch);
385  if (pActiveScript) IActiveScript_Release(pActiveScript);
386  if (pActiveScriptParse) IActiveScriptParse_Release(pActiveScriptParse);
387  if (scriptsite)
388  {
389  if (scriptsite->session) IDispatch_Release(scriptsite->session);
390  if (scriptsite->installer) IDispatch_Release(scriptsite->installer);
391  IActiveScriptSite_Release(&scriptsite->IActiveScriptSite_iface);
392  }
393  CoUninitialize(); /* must call even if CoInitialize failed */
394  return ret;
395 }
const char * var
Definition: shader.c:5666
static const WCHAR szJScript[]
Definition: script.c:53
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
Definition: compat.h:2157
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
#define IActiveScriptParse_Release
Definition: script.c:47
static const WCHAR szVBScript[]
Definition: script.c:54
#define LOCALE_USER_DEFAULT
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid)
Definition: compobj.c:2602
#define V_I4(A)
Definition: oleauto.h:247
#define DISPATCH_METHOD
Definition: oleauto.h:1006
HRESULT create_session(MSIHANDLE msiHandle, IDispatch *installer, IDispatch **disp)
Definition: automation.c:2468
HRESULT create_msiserver(IUnknown *outer, void **ppObj)
Definition: automation.c:2443
#define debugstr_w
Definition: kernel32.h:32
static HRESULT create_activescriptsite(MsiActiveScriptSite **obj)
Definition: script.c:254
script
Definition: msipriv.h:374
static UINT map_return_value(LONG val)
Definition: script.c:276
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961
#define IActiveScriptParse_ParseScriptText
Definition: script.c:49
#define IActiveScriptParse_InitNew
Definition: script.c:48
unsigned long DWORD
Definition: ntddk_ex.h:95
IDispatch * session
Definition: script.c:63
int ret
REFCLSID clsid
Definition: msctf.c:82
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
static const WCHAR L[]
Definition: oid.c:1250
#define IID_NULL
Definition: guiddef.h:98
IActiveScriptSite IActiveScriptSite_iface
Definition: script.c:61
IDispatch * installer
Definition: script.c:62
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:51
static VARIANTARG static DISPID
Definition: ordinal.c:49
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
static const WCHAR szSession[]
Definition: script.c:55
#define NULL
Definition: types.h:112
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
struct stdole::DISPPARAMS DISPPARAMS
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

Referenced by ACTION_CallScript().

◆ create_activescriptsite()

static HRESULT create_activescriptsite ( MsiActiveScriptSite **  obj)
static

Definition at line 254 of file script.c.

255 {
257 
258  TRACE("(%p)\n", obj);
259 
260  *obj = NULL;
261 
262  object = msi_alloc( sizeof(MsiActiveScriptSite) );
263  if (!object)
264  return E_OUTOFMEMORY;
265 
266  object->IActiveScriptSite_iface.lpVtbl = &activescriptsitevtbl;
267  object->ref = 1;
268  object->installer = NULL;
269  object->session = NULL;
270 
271  *obj = object;
272 
273  return S_OK;
274 }
coclass MSXML2::XSLTemplate40 object
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
static const struct IActiveScriptSiteVtbl activescriptsitevtbl
Definition: script.c:239
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204

Referenced by call_script().

◆ impl_from_IActiveScriptSite()

static MsiActiveScriptSite* impl_from_IActiveScriptSite ( IActiveScriptSite iface)
inlinestatic

Definition at line 67 of file script.c.

68 {
69  return CONTAINING_RECORD(iface, MsiActiveScriptSite, IActiveScriptSite_iface);
70 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by MsiActiveScriptSite_AddRef(), MsiActiveScriptSite_GetDocVersionString(), MsiActiveScriptSite_GetItemInfo(), MsiActiveScriptSite_GetLCID(), MsiActiveScriptSite_OnEnterScript(), MsiActiveScriptSite_OnLeaveScript(), MsiActiveScriptSite_OnScriptError(), MsiActiveScriptSite_OnScriptTerminate(), MsiActiveScriptSite_QueryInterface(), and MsiActiveScriptSite_Release().

◆ map_return_value()

static UINT map_return_value ( LONG  val)
static

Definition at line 276 of file script.c.

277 {
278  switch (val)
279  {
280  case 0:
281  case IDOK:
282  case IDIGNORE: return ERROR_SUCCESS;
283  case IDCANCEL: return ERROR_INSTALL_USEREXIT;
284  case IDRETRY: return ERROR_INSTALL_SUSPEND;
285  case IDABORT:
286  default: return ERROR_INSTALL_FAILURE;
287  }
288 }
#define IDOK
Definition: winuser.h:824
#define IDABORT
Definition: winuser.h:826
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_INSTALL_USEREXIT
Definition: winerror.h:960
GLuint GLfloat * val
Definition: glext.h:7180
#define ERROR_INSTALL_FAILURE
Definition: winerror.h:961
#define IDRETRY
Definition: winuser.h:827
#define ERROR_INSTALL_SUSPEND
Definition: winerror.h:962
#define IDCANCEL
Definition: winuser.h:825
#define IDIGNORE
Definition: winuser.h:828

Referenced by call_script().

◆ MsiActiveScriptSite_AddRef()

static ULONG WINAPI MsiActiveScriptSite_AddRef ( IActiveScriptSite iface)
static

Definition at line 94 of file script.c.

95 {
98  TRACE("(%p)->(%d)\n", This, ref);
99  return ref;
100 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67
unsigned int ULONG
Definition: retypes.h:1

◆ MsiActiveScriptSite_GetDocVersionString()

static HRESULT WINAPI MsiActiveScriptSite_GetDocVersionString ( IActiveScriptSite iface,
BSTR pbstrVersion 
)
static

Definition at line 155 of file script.c.

156 {
158  TRACE("(%p)->(%p)\n", This, pbstrVersion);
159  return E_NOTIMPL;
160 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67

◆ MsiActiveScriptSite_GetItemInfo()

static HRESULT WINAPI MsiActiveScriptSite_GetItemInfo ( IActiveScriptSite iface,
LPCOLESTR  pstrName,
DWORD  dwReturnMask,
IUnknown **  ppiunkItem,
ITypeInfo **  ppti 
)
static

Definition at line 122 of file script.c.

123 {
125 
126  TRACE("(%p)->(%p, %d, %p, %p)\n", This, pstrName, dwReturnMask, ppiunkItem, ppti);
127 
128  /* Determine the kind of pointer that is requested, and make sure placeholder is valid */
129  if (dwReturnMask & SCRIPTINFO_ITYPEINFO) {
130  if (!ppti) return E_INVALIDARG;
131  *ppti = NULL;
132  }
133  if (dwReturnMask & SCRIPTINFO_IUNKNOWN) {
134  if (!ppiunkItem) return E_INVALIDARG;
135  *ppiunkItem = NULL;
136  }
137 
138  /* Are we looking for the session object? */
139  if (!strcmpW(szSession, pstrName)) {
140  if (dwReturnMask & SCRIPTINFO_ITYPEINFO) {
142  if (SUCCEEDED(hr))
143  ITypeInfo_AddRef(*ppti);
144  return hr;
145  }
146  else if (dwReturnMask & SCRIPTINFO_IUNKNOWN) {
147  IDispatch_QueryInterface(This->session, &IID_IUnknown, (void **)ppiunkItem);
148  return S_OK;
149  }
150  }
151 
152  return TYPE_E_ELEMENTNOTFOUND;
153 }
HRESULT hr
Definition: shlfolder.c:183
if SUCCEEDED(hr)
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
Definition: apps.c:124
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:51
static const WCHAR szSession[]
Definition: script.c:55
#define NULL
Definition: types.h:112
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67
#define TYPE_E_ELEMENTNOTFOUND
Definition: winerror.h:2539

◆ MsiActiveScriptSite_GetLCID()

static HRESULT WINAPI MsiActiveScriptSite_GetLCID ( IActiveScriptSite iface,
LCID plcid 
)
static

Definition at line 115 of file script.c.

116 {
118  TRACE("(%p)->(%p)\n", This, plcid);
119  return E_NOTIMPL; /* Script will use system-defined locale */
120 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67

◆ MsiActiveScriptSite_OnEnterScript()

static HRESULT WINAPI MsiActiveScriptSite_OnEnterScript ( IActiveScriptSite iface)
static

Definition at line 225 of file script.c.

226 {
228  TRACE("(%p)\n", This);
229  return S_OK;
230 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67

◆ MsiActiveScriptSite_OnLeaveScript()

static HRESULT WINAPI MsiActiveScriptSite_OnLeaveScript ( IActiveScriptSite iface)
static

Definition at line 232 of file script.c.

233 {
235  TRACE("(%p)\n", This);
236  return S_OK;
237 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67

◆ MsiActiveScriptSite_OnScriptError()

static HRESULT WINAPI MsiActiveScriptSite_OnScriptError ( IActiveScriptSite iface,
IActiveScriptError pscripterror 
)
static

Definition at line 204 of file script.c.

205 {
208  HRESULT hr;
209 
210  TRACE("(%p)->(%p)\n", This, pscripterror);
211 
212  memset(&exception, 0, sizeof(EXCEPINFO));
213  hr = IActiveScriptError_GetExceptionInfo(pscripterror, &exception);
214  if (SUCCEEDED(hr))
215  {
216  ERR("script error: %s\n", debugstr_w(exception.bstrDescription));
217  SysFreeString(exception.bstrSource);
218  SysFreeString(exception.bstrDescription);
219  SysFreeString(exception.bstrHelpFile);
220  }
221 
222  return S_OK;
223 }
HRESULT hr
Definition: shlfolder.c:183
#define exception
Definition: math.h:26
if SUCCEEDED(hr)
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define ERR(fmt,...)
Definition: debug.h:110
struct stdole::EXCEPINFO EXCEPINFO
#define S_OK
Definition: intsafe.h:51
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67
#define memset(x, y, z)
Definition: compat.h:39

◆ MsiActiveScriptSite_OnScriptTerminate()

static HRESULT WINAPI MsiActiveScriptSite_OnScriptTerminate ( IActiveScriptSite iface,
const VARIANT pvarResult,
const EXCEPINFO *  pexcepinfo 
)
static

Definition at line 162 of file script.c.

163 {
165  TRACE("(%p)->(%p, %p)\n", This, pvarResult, pexcepinfo);
166  return S_OK;
167 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67

◆ MsiActiveScriptSite_OnStateChange()

static HRESULT WINAPI MsiActiveScriptSite_OnStateChange ( IActiveScriptSite iface,
SCRIPTSTATE  ssScriptState 
)
static

Definition at line 169 of file script.c.

170 {
171  switch (ssScriptState) {
173  TRACE("State: Uninitialized.\n");
174  break;
175 
177  TRACE("State: Initialized.\n");
178  break;
179 
180  case SCRIPTSTATE_STARTED:
181  TRACE("State: Started.\n");
182  break;
183 
185  TRACE("State: Connected.\n");
186  break;
187 
189  TRACE("State: Disconnected.\n");
190  break;
191 
192  case SCRIPTSTATE_CLOSED:
193  TRACE("State: Closed.\n");
194  break;
195 
196  default:
197  ERR("Unknown State: %d\n", ssScriptState);
198  break;
199  }
200 
201  return S_OK;
202 }
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:51

◆ MsiActiveScriptSite_QueryInterface()

static HRESULT WINAPI MsiActiveScriptSite_QueryInterface ( IActiveScriptSite iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 75 of file script.c.

76 {
78 
79  TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj);
80 
81  if (IsEqualGUID(riid, &IID_IUnknown) ||
82  IsEqualGUID(riid, &IID_IActiveScriptSite))
83  {
84  IActiveScriptSite_AddRef(iface);
85  *obj = iface;
86  return S_OK;
87  }
88 
89  *obj = NULL;
90 
91  return E_NOINTERFACE;
92 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67

◆ MsiActiveScriptSite_Release()

static ULONG WINAPI MsiActiveScriptSite_Release ( IActiveScriptSite iface)
static

Definition at line 102 of file script.c.

103 {
106 
107  TRACE("(%p)->(%d)\n", This, ref);
108 
109  if (!ref)
110  msi_free(This);
111 
112  return ref;
113 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
static MsiActiveScriptSite * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
Definition: script.c:67
unsigned int ULONG
Definition: retypes.h:1

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msi  )

Variable Documentation

◆ activescriptsitevtbl

const struct IActiveScriptSiteVtbl activescriptsitevtbl
static
Initial value:
=
{
}
static HRESULT WINAPI MsiActiveScriptSite_OnLeaveScript(IActiveScriptSite *iface)
Definition: script.c:232
static HRESULT WINAPI MsiActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror)
Definition: script.c:204
static ULONG WINAPI MsiActiveScriptSite_AddRef(IActiveScriptSite *iface)
Definition: script.c:94
static ULONG WINAPI MsiActiveScriptSite_Release(IActiveScriptSite *iface)
Definition: script.c:102
static HRESULT WINAPI MsiActiveScriptSite_OnStateChange(IActiveScriptSite *iface, SCRIPTSTATE ssScriptState)
Definition: script.c:169
static HRESULT WINAPI MsiActiveScriptSite_OnScriptTerminate(IActiveScriptSite *iface, const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo)
Definition: script.c:162
static HRESULT WINAPI MsiActiveScriptSite_GetDocVersionString(IActiveScriptSite *iface, BSTR *pbstrVersion)
Definition: script.c:155
static HRESULT WINAPI MsiActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *plcid)
Definition: script.c:115
static HRESULT WINAPI MsiActiveScriptSite_OnEnterScript(IActiveScriptSite *iface)
Definition: script.c:225
static HRESULT WINAPI MsiActiveScriptSite_QueryInterface(IActiveScriptSite *iface, REFIID riid, void **obj)
Definition: script.c:75
static HRESULT WINAPI MsiActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppiunkItem, ITypeInfo **ppti)
Definition: script.c:122

Definition at line 239 of file script.c.

Referenced by create_activescriptsite().

◆ szJScript

const WCHAR szJScript[] = { 'J','S','c','r','i','p','t',0}
static

Definition at line 53 of file script.c.

Referenced by call_script().

◆ szSession

const WCHAR szSession[] = {'S','e','s','s','i','o','n',0}
static

Definition at line 55 of file script.c.

Referenced by call_script(), and MsiActiveScriptSite_GetItemInfo().

◆ szVBScript

const WCHAR szVBScript[] = { 'V','B','S','c','r','i','p','t',0}
static

Definition at line 54 of file script.c.

Referenced by call_script().