290{
293 IActiveScriptParse *pActiveScriptParse =
NULL;
301
303
304
306 if (
hr !=
S_OK)
goto done;
307
308
310 if (
hr !=
S_OK)
goto done;
311
312
314 if (
hr !=
S_OK)
goto done;
315
316
322 else {
323 ERR(
"Unknown script type %d\n",
type);
324 goto done;
325 }
327 ERR(
"Could not find CLSID for Windows Script\n");
328 goto done;
329 }
332 ERR(
"Could not instantiate class for Windows Script\n");
333 goto done;
334 }
335
336 hr = IActiveScript_QueryInterface(pActiveScript, &IID_IActiveScriptParse, (
void **)&pActiveScriptParse);
338
341
344
345 hr = IActiveScript_AddNamedItem(pActiveScript,
L"Session", SCRIPTITEM_GLOBALMEMBERS|SCRIPTITEM_ISVISIBLE);
347
350
353
354
355 if (function && function[0]) {
357
358 hr = IActiveScript_GetScriptDispatch(pActiveScript,
NULL, &pDispatch);
360
363
366
369
371
373 } else {
374
376 }
377
378done:
379
380 if (pDispatch) IDispatch_Release(pDispatch);
381 if (pActiveScript) IActiveScript_Release(pActiveScript);
383 if (scriptsite)
384 {
388 }
391}
#define IActiveScriptParse_InitNew
#define IActiveScriptParse_ParseScriptText
#define IActiveScriptParse_Release
HRESULT create_session(MSIHANDLE msiHandle, IDispatch *installer, IDispatch **disp)
HRESULT create_msiserver(IUnknown *outer, void **ppObj)
static HRESULT create_activescriptsite(struct script_site **obj)
static UINT map_return_value(LONG val)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
GLuint GLuint GLsizei GLenum type
static VARIANTARG static DISPID
@ msidbCustomActionTypeJScript
@ msidbCustomActionTypeVBScript
struct stdole::DISPPARAMS DISPPARAMS
#define LOCALE_USER_DEFAULT
IActiveScriptSite IActiveScriptSite_iface
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
#define ERROR_INSTALL_FAILURE