40#define IActiveScriptParse_Release IActiveScriptParse64_Release
41#define IActiveScriptParse_InitNew IActiveScriptParse64_InitNew
42#define IActiveScriptParse_ParseScriptText IActiveScriptParse64_ParseScriptText
46#define IActiveScriptParse_Release IActiveScriptParse32_Release
47#define IActiveScriptParse_InitNew IActiveScriptParse32_InitNew
48#define IActiveScriptParse_ParseScriptText IActiveScriptParse32_ParseScriptText
79 IActiveScriptSite_AddRef(iface);
121 TRACE(
"(%p)->(%p, %lu, %p, %p)\n",
This, pstrName, dwReturnMask, ppiunkItem, ppti );
124 if (dwReturnMask & SCRIPTINFO_ITYPEINFO) {
128 if (dwReturnMask & SCRIPTINFO_IUNKNOWN) {
134 if (!
wcscmp(
L"Session", pstrName)) {
135 if (dwReturnMask & SCRIPTINFO_ITYPEINFO) {
138 ITypeInfo_AddRef(*ppti);
141 else if (dwReturnMask & SCRIPTINFO_IUNKNOWN) {
142 IDispatch_QueryInterface(
This->session, &
IID_IUnknown, (
void **)ppiunkItem);
153 TRACE(
"(%p)->(%p)\n",
This, pbstrVersion);
160 TRACE(
"(%p)->(%p, %p)\n",
This, pvarResult, pexcepinfo);
166 switch (ssScriptState) {
168 TRACE(
"State: Uninitialized.\n");
172 TRACE(
"State: Initialized.\n");
176 TRACE(
"State: Started.\n");
180 TRACE(
"State: Connected.\n");
184 TRACE(
"State: Disconnected.\n");
188 TRACE(
"State: Closed.\n");
192 ERR(
"Unknown State: %d\n", ssScriptState);
205 TRACE(
"(%p)->(%p)\n",
This, pscripterror);
208 hr = IActiveScriptError_GetExceptionInfo(pscripterror, &
exception);
263 object->installer =
NULL;
264 object->session =
NULL;
292 IActiveScriptParse *pActiveScriptParse =
NULL;
295 DISPPARAMS dispparamsNoArgs = {
NULL,
NULL, 0, 0};
305 if (
hr !=
S_OK)
goto done;
309 if (
hr !=
S_OK)
goto done;
313 if (
hr !=
S_OK)
goto done;
322 ERR(
"Unknown script type %d\n",
type);
326 ERR(
"Could not find CLSID for Windows Script\n");
331 ERR(
"Could not instantiate class for Windows Script\n");
335 hr = IActiveScript_QueryInterface(pActiveScript, &IID_IActiveScriptParse, (
void **)&pActiveScriptParse);
344 hr = IActiveScript_AddNamedItem(pActiveScript,
L"Session", SCRIPTITEM_GLOBALMEMBERS|SCRIPTITEM_ISVISIBLE);
354 if (function && function[0]) {
357 hr = IActiveScript_GetScriptDispatch(pActiveScript,
NULL, &pDispatch);
379 if (pDispatch) IDispatch_Release(pDispatch);
380 if (pActiveScript) IActiveScript_Release(pActiveScript);
@ SCRIPTSTATE_INITIALIZED
@ SCRIPTSTATE_DISCONNECTED
@ SCRIPTSTATE_UNINITIALIZED
enum tagSCRIPTSTATE SCRIPTSTATE
HRESULT get_typeinfo(enum type_id tid, ITypeInfo **ret)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define IActiveScriptParse_InitNew
#define IActiveScriptParse_ParseScriptText
#define IActiveScriptParse_Release
static ScriptHost * impl_from_IActiveScriptSite(IActiveScriptSite *iface)
HRESULT create_session(MSIHANDLE msiHandle, IDispatch *installer, IDispatch **disp)
HRESULT create_msiserver(IUnknown *outer, void **ppObj)
DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function, LPCWSTR action)
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_OnLeaveScript(IActiveScriptSite *iface)
static HRESULT WINAPI MsiActiveScriptSite_QueryInterface(IActiveScriptSite *iface, REFIID riid, void **obj)
static HRESULT WINAPI MsiActiveScriptSite_OnEnterScript(IActiveScriptSite *iface)
static HRESULT WINAPI MsiActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror)
static HRESULT WINAPI MsiActiveScriptSite_OnScriptTerminate(IActiveScriptSite *iface, const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo)
static HRESULT WINAPI MsiActiveScriptSite_GetDocVersionString(IActiveScriptSite *iface, BSTR *pbstrVersion)
static HRESULT WINAPI MsiActiveScriptSite_OnStateChange(IActiveScriptSite *iface, SCRIPTSTATE ssScriptState)
static UINT map_return_value(LONG val)
static const struct IActiveScriptSiteVtbl activescriptsitevtbl
static HRESULT create_activescriptsite(MsiActiveScriptSite **obj)
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
static void msi_free(void *mem)
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
#define LOCALE_USER_DEFAULT
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define IsEqualGUID(rguid1, rguid2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
IActiveScriptSite IActiveScriptSite_iface
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
#define ERROR_INSTALL_FAILURE
#define ERROR_INSTALL_USEREXIT
#define TYPE_E_ELEMENTNOTFOUND
#define ERROR_INSTALL_SUSPEND