Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
645ce641
Commit
645ce641
authored
Sep 18, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Choose the right IActiveScriptParse* interface based on process type.
parent
2c9ce496
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
34 deletions
+26
-34
script.c
dlls/msi/script.c
+26
-34
No files found.
dlls/msi/script.c
View file @
645ce641
...
...
@@ -36,6 +36,20 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
#ifdef _WIN64
#define IActiveScriptParse_Release IActiveScriptParse64_Release
#define IActiveScriptParse_InitNew IActiveScriptParse64_InitNew
#define IActiveScriptParse_ParseScriptText IActiveScriptParse64_ParseScriptText
#else
#define IActiveScriptParse_Release IActiveScriptParse32_Release
#define IActiveScriptParse_InitNew IActiveScriptParse32_InitNew
#define IActiveScriptParse_ParseScriptText IActiveScriptParse32_ParseScriptText
#endif
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
};
...
...
@@ -81,8 +95,7 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function
{
HRESULT
hr
;
IActiveScript
*
pActiveScript
=
NULL
;
IActiveScriptParse32
*
pActiveScriptParse32
=
NULL
;
IActiveScriptParse64
*
pActiveScriptParse64
=
NULL
;
IActiveScriptParse
*
pActiveScriptParse
=
NULL
;
MsiActiveScriptSite
*
pActiveScriptSite
=
NULL
;
IDispatch
*
pDispatch
=
NULL
;
DISPPARAMS
dispparamsNoArgs
=
{
NULL
,
NULL
,
0
,
0
};
...
...
@@ -124,40 +137,20 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function
goto
done
;
}
if
(
type
&
msidbCustomActionType64BitScript
)
{
hr
=
IActiveScript_QueryInterface
(
pActiveScript
,
&
IID_IActiveScriptParse64
,
(
void
**
)
&
pActiveScriptParse64
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScript_SetScriptSite
(
pActiveScript
,
(
IActiveScriptSite
*
)
pActiveScriptSite
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScriptParse64_InitNew
(
pActiveScriptParse64
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScript_AddNamedItem
(
pActiveScript
,
szSession
,
SCRIPTITEM_GLOBALMEMBERS
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScriptParse64_ParseScriptText
(
pActiveScriptParse64
,
script
,
NULL
,
NULL
,
NULL
,
0
,
0
,
0L
,
NULL
,
NULL
);
if
(
FAILED
(
hr
))
goto
done
;
}
else
{
hr
=
IActiveScript_QueryInterface
(
pActiveScript
,
&
IID_IActiveScriptParse32
,
(
void
**
)
&
pActiveScriptParse32
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScript_QueryInterface
(
pActiveScript
,
&
IID_IActiveScriptParse
,
(
void
**
)
&
pActiveScriptParse
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScript_SetScriptSite
(
pActiveScript
,
(
IActiveScriptSite
*
)
pActiveScriptSite
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScript_SetScriptSite
(
pActiveScript
,
(
IActiveScriptSite
*
)
pActiveScriptSite
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScriptParse32_InitNew
(
pActiveScriptParse32
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScriptParse_InitNew
(
pActiveScriptParse
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScript_AddNamedItem
(
pActiveScript
,
szSession
,
SCRIPTITEM_GLOBALMEMBERS
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScript_AddNamedItem
(
pActiveScript
,
szSession
,
SCRIPTITEM_GLOBALMEMBERS
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScriptParse32_ParseScriptText
(
pActiveScriptParse32
,
script
,
NULL
,
NULL
,
NULL
,
0
,
0
,
0L
,
NULL
,
NULL
);
if
(
FAILED
(
hr
))
goto
done
;
}
hr
=
IActiveScriptParse_ParseScriptText
(
pActiveScriptParse
,
script
,
NULL
,
NULL
,
NULL
,
0
,
0
,
0L
,
NULL
,
NULL
);
if
(
FAILED
(
hr
))
goto
done
;
hr
=
IActiveScript_SetScriptState
(
pActiveScript
,
SCRIPTSTATE_CONNECTED
);
if
(
FAILED
(
hr
))
goto
done
;
...
...
@@ -193,8 +186,7 @@ done:
if
(
pDispatch
)
IDispatch_Release
(
pDispatch
);
if
(
pActiveScript
)
IActiveScript_Release
(
pActiveScript
);
if
(
pActiveScriptParse32
)
IActiveScriptParse32_Release
(
pActiveScriptParse32
);
if
(
pActiveScriptParse64
)
IActiveScriptParse64_Release
(
pActiveScriptParse64
);
if
(
pActiveScriptParse
)
IActiveScriptParse_Release
(
pActiveScriptParse
);
if
(
pActiveScriptSite
)
{
if
(
pActiveScriptSite
->
pSession
)
IDispatch_Release
(
pActiveScriptSite
->
pSession
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment