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
80 IActiveScriptSite_AddRef(iface);
122 TRACE(
"(%p)->(%p, %lu, %p, %p)\n",
This, pstrName, dwReturnMask, ppiunkItem, ppti );
125 if (dwReturnMask & SCRIPTINFO_ITYPEINFO) {
129 if (dwReturnMask & SCRIPTINFO_IUNKNOWN) {
135 if (!
wcscmp(
L"Session", pstrName)) {
136 if (dwReturnMask & SCRIPTINFO_ITYPEINFO) {
139 ITypeInfo_AddRef(*ppti);
142 else if (dwReturnMask & SCRIPTINFO_IUNKNOWN) {
143 IDispatch_QueryInterface(
This->session, &
IID_IUnknown, (
void **)ppiunkItem);
154 TRACE(
"(%p)->(%p)\n",
This, pbstrVersion);
161 TRACE(
"(%p)->(%p, %p)\n",
This, pvarResult, pexcepinfo);
167 switch (ssScriptState) {
169 TRACE(
"State: Uninitialized.\n");
173 TRACE(
"State: Initialized.\n");
177 TRACE(
"State: Started.\n");
181 TRACE(
"State: Connected.\n");
185 TRACE(
"State: Disconnected.\n");
189 TRACE(
"State: Closed.\n");
193 ERR(
"Unknown State: %d\n", ssScriptState);
206 TRACE(
"(%p)->(%p)\n",
This, pscripterror);
209 hr = IActiveScriptError_GetExceptionInfo(pscripterror, &
exception);
258 object =
malloc(
sizeof(*
object));
264 object->installer =
NULL;
265 object->session =
NULL;
293 IActiveScriptParse *pActiveScriptParse =
NULL;
296 DISPPARAMS dispparamsNoArgs = {
NULL,
NULL, 0, 0};
306 if (
hr !=
S_OK)
goto done;
310 if (
hr !=
S_OK)
goto done;
314 if (
hr !=
S_OK)
goto done;
323 ERR(
"Unknown script type %d\n",
type);
327 ERR(
"Could not find CLSID for Windows Script\n");
332 ERR(
"Could not instantiate class for Windows Script\n");
336 hr = IActiveScript_QueryInterface(pActiveScript, &IID_IActiveScriptParse, (
void **)&pActiveScriptParse);
345 hr = IActiveScript_AddNamedItem(pActiveScript,
L"Session", SCRIPTITEM_GLOBALMEMBERS|SCRIPTITEM_ISVISIBLE);
355 if (function && function[0]) {
358 hr = IActiveScript_GetScriptDispatch(pActiveScript,
NULL, &pDispatch);
380 if (pDispatch) IDispatch_Release(pDispatch);
381 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 create_activescriptsite(struct script_site **obj)
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
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
#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