mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 12:20:07 +00:00
winhttp: Use platform-specific versions of IActiveScriptParse methods.
This commit is contained in:
parent
f3b93f2615
commit
8f108a0f4d
@ -3,6 +3,7 @@ IMPORTLIB = winhttp
|
||||
IMPORTS = uuid user32 advapi32
|
||||
DELAYIMPORTS = oleaut32 ole32 crypt32
|
||||
EXTRALIBS = @SOCKETLIBS@
|
||||
EXTRADEFS = -DWIDL_C_INLINE_WRAPPERS
|
||||
|
||||
C_SRCS = \
|
||||
cookie.c \
|
||||
|
@ -1828,6 +1828,16 @@ static BSTR include_pac_utils( BSTR script )
|
||||
return ret;
|
||||
}
|
||||
|
||||
#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 BOOL run_script( const BSTR script, const WCHAR *url, WINHTTP_PROXY_INFO *info )
|
||||
{
|
||||
static const WCHAR jscriptW[] = {'J','S','c','r','i','p','t',0};
|
||||
@ -1862,7 +1872,7 @@ static BOOL run_script( const BSTR script, const WCHAR *url, WINHTTP_PROXY_INFO
|
||||
hr = IActiveScript_QueryInterface( engine, &IID_IActiveScriptParse, (void **)&parser );
|
||||
if (hr != S_OK) goto done;
|
||||
|
||||
hr = IActiveScriptParse64_InitNew( parser );
|
||||
hr = IActiveScriptParse_InitNew( parser );
|
||||
if (hr != S_OK) goto done;
|
||||
|
||||
hr = IActiveScript_SetScriptSite( engine, &script_site );
|
||||
@ -1873,7 +1883,7 @@ static BOOL run_script( const BSTR script, const WCHAR *url, WINHTTP_PROXY_INFO
|
||||
|
||||
if (!(full_script = include_pac_utils( script ))) goto done;
|
||||
|
||||
hr = IActiveScriptParse64_ParseScriptText( parser, full_script, NULL, NULL, NULL, 0, 0, 0, NULL, NULL );
|
||||
hr = IActiveScriptParse_ParseScriptText( parser, full_script, NULL, NULL, NULL, 0, 0, 0, NULL, NULL );
|
||||
if (hr != S_OK) goto done;
|
||||
|
||||
hr = IActiveScript_SetScriptState( engine, SCRIPTSTATE_STARTED );
|
||||
@ -1910,7 +1920,7 @@ done:
|
||||
SysFreeString( hostname );
|
||||
SysFreeString( func );
|
||||
if (dispatch) IDispatch_Release( dispatch );
|
||||
if (parser) IUnknown_Release( parser );
|
||||
if (parser) IActiveScriptParse_Release( parser );
|
||||
if (engine) IActiveScript_Release( engine );
|
||||
if (SUCCEEDED( init )) CoUninitialize();
|
||||
if (!ret) set_last_error( ERROR_WINHTTP_BAD_AUTO_PROXY_SCRIPT );
|
||||
|
Loading…
Reference in New Issue
Block a user