51 0, 0, { (
DWORD_PTR)(__FILE__
": cs_jsproxy") }
55static const WCHAR global_funcsW[] = {
'g',
'l',
'o',
'b',
'a',
'l',
'_',
'f',
'u',
'n',
'c',
's',0};
56static const WCHAR dns_resolveW[] = {
'd',
'n',
's',
'_',
'r',
'e',
's',
'o',
'l',
'v',
'e',0};
167 if (!
buffer->dwScriptBufferSize)
275#define DISPID_GLOBAL_DNSRESOLVE 0x1000
307 (
unsigned int)(
ntohl(
addr->sin_addr.s_addr ) >> 24 & 0xff),
308 (
unsigned int)(
ntohl(
addr->sin_addr.s_addr ) >> 16 & 0xff),
309 (
unsigned int)(
ntohl(
addr->sin_addr.s_addr ) >> 8 & 0xff),
310 (
unsigned int)(
ntohl(
addr->sin_addr.s_addr ) & 0xff) );
315 static const WCHAR fmtW[] = {
'%',
'u',
'.',
'%',
'u',
'.',
'%',
'u',
'.',
'%',
'u',0};
480 static const WCHAR pacjsW[] = {
'p',
'a',
'c',
'.',
'j',
's',0};
500#define IActiveScriptParse_Release IActiveScriptParse64_Release
501#define IActiveScriptParse_InitNew IActiveScriptParse64_InitNew
502#define IActiveScriptParse_ParseScriptText IActiveScriptParse64_ParseScriptText
504#define IActiveScriptParse_Release IActiveScriptParse32_Release
505#define IActiveScriptParse_InitNew IActiveScriptParse32_InitNew
506#define IActiveScriptParse_ParseScriptText IActiveScriptParse32_ParseScriptText
511 static const WCHAR jscriptW[] = {
'J',
'S',
'c',
'r',
'i',
'p',
't',0};
512 static const WCHAR findproxyW[] = {
'F',
'i',
'n',
'd',
'P',
'r',
'o',
'x',
'y',
'F',
'o',
'r',
'U',
'R',
'L',0};
526 if (
hr !=
S_OK)
goto done;
529 &IID_IActiveScript, (
void **)&engine );
530 if (
hr !=
S_OK)
goto done;
532 hr = IActiveScript_QueryInterface( engine, &IID_IActiveScriptParse, (
void **)&
parser );
533 if (
hr !=
S_OK)
goto done;
536 if (
hr !=
S_OK)
goto done;
539 if (
hr !=
S_OK)
goto done;
541 hr = IActiveScript_AddNamedItem( engine,
global_funcsW, SCRIPTITEM_GLOBALMEMBERS );
542 if (
hr !=
S_OK)
goto done;
547 if (
hr !=
S_OK)
goto done;
550 if (
hr !=
S_OK)
goto done;
553 if (
hr !=
S_OK)
goto done;
557 if (
hr !=
S_OK)
goto done;
574 WARN(
"script failed 0x%08x\n",
hr);
580 *result_len =
strlen( *result_str ) + 1;
590 if (engine) IActiveScript_Release( engine );
604 TRACE(
"%s, %u, %s, %u, %p, %p\n",
debugstr_a(
url), len_url,
hostname, len_hostname,
proxy, len_proxy );
ACPI_SIZE strlen(const char *String)
enum tagSCRIPTSTATE SCRIPTSTATE
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void run_script(const WCHAR *filename, IActiveScript *script, IActiveScriptParse *parser)
#define IActiveScriptParse_InitNew
#define IActiveScriptParse_ParseScriptText
#define IActiveScriptParse_Release
void dispatch(HANDLE hStopEvent)
#define ERROR_INSUFFICIENT_BUFFER
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
static HINSTANCE instance
static WCHAR * strdupAW(const char *src)
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
#define ERROR_INVALID_PARAMETER
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR version[]
BOOL WINAPI InternetGetProxyInfo(LPCSTR url, DWORD len_url, LPCSTR hostname, DWORD len_hostname, LPSTR *proxy, LPDWORD len_proxy)
static HRESULT WINAPI dispex_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *exep, IServiceProvider *caller)
static CRITICAL_SECTION cs_jsproxy
static HRESULT WINAPI dispex_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
static struct pac_script * global_script
static HRESULT WINAPI dispex_GetTypeInfoCount(IDispatchEx *iface, UINT *info)
static HRESULT WINAPI site_OnStateChange(IActiveScriptSite *iface, SCRIPTSTATE state)
static ULONG WINAPI dispex_Release(IDispatchEx *iface)
static HRESULT WINAPI site_OnLeaveScript(IActiveScriptSite *iface)
static char * strdupWA(const WCHAR *src)
static const WCHAR global_funcsW[]
static HRESULT WINAPI site_GetLCID(IActiveScriptSite *iface, LCID *lcid)
static void printf_addr(const WCHAR *fmt, WCHAR *buf, SIZE_T size, struct sockaddr_in *addr)
static BSTR include_pac_utils(const WCHAR *script)
static HRESULT WINAPI site_QueryInterface(IActiveScriptSite *iface, REFIID riid, void **ppv)
static CRITICAL_SECTION_DEBUG critsect_debug
static ULONG WINAPI site_AddRef(IActiveScriptSite *iface)
static HRESULT WINAPI dispex_Invoke(IDispatchEx *iface, DISPID member, REFIID riid, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *result, EXCEPINFO *excep, UINT *err)
static HRESULT WINAPI site_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *error)
BOOL WINAPI InternetDeInitializeAutoProxyDll(LPSTR mime, DWORD reserved)
static char * get_computer_name(COMPUTER_NAME_FORMAT format)
static WCHAR * load_script(const char *filename)
static ULONG WINAPI site_Release(IActiveScriptSite *iface)
static HRESULT WINAPI dispex_GetIDsOfNames(IDispatchEx *iface, REFIID riid, LPOLESTR *names, UINT count, LCID lcid, DISPID *id)
static const IDispatchExVtbl dispex_vtbl
static HRESULT WINAPI site_OnScriptTerminate(IActiveScriptSite *iface, const VARIANT *result, const EXCEPINFO *info)
static HRESULT WINAPI dispex_DeleteMemberByName(IDispatchEx *iface, BSTR name, DWORD flags)
static HRESULT WINAPI dispex_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
static ULONG WINAPI dispex_AddRef(IDispatchEx *iface)
static HRESULT dns_resolve(const WCHAR *hostname, VARIANT *result)
static HRESULT WINAPI dispex_GetDispID(IDispatchEx *iface, BSTR name, DWORD flags, DISPID *id)
static HRESULT WINAPI dispex_GetTypeInfo(IDispatchEx *iface, UINT info, LCID lcid, ITypeInfo **type_info)
BOOL WINAPI JSPROXY_InternetInitializeAutoProxyDll(DWORD version, LPSTR tmpfile, LPSTR mime, AutoProxyHelperFunctions *callbacks, LPAUTO_PROXY_SCRIPT_BUFFER buffer)
static const WCHAR dns_resolveW[]
static HRESULT WINAPI dispex_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *name)
static HRESULT WINAPI site_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR name, DWORD mask, IUnknown **item, ITypeInfo **type_info)
static IDispatchEx global_dispex
static HRESULT WINAPI site_OnEnterScript(IActiveScriptSite *iface)
static const IActiveScriptSiteVtbl site_vtbl
static HRESULT WINAPI site_GetDocVersionString(IActiveScriptSite *iface, BSTR *version)
static HRESULT WINAPI dispex_GetNextDispID(IDispatchEx *iface, DWORD flags, DISPID id, DISPID *next)
static HRESULT WINAPI dispex_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD flags_fetch, DWORD *flags)
#define DISPID_GLOBAL_DNSRESOLVE
static HRESULT WINAPI dispex_GetNameSpaceParent(IDispatchEx *iface, IUnknown **unk)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
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 count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum const GLvoid * addr
_Check_return_ _CRTIMP FILE *__cdecl tmpfile(void)
BOOL WINAPI GetComputerNameExA(COMPUTER_NAME_FORMAT, LPSTR, LPDWORD)
static PEXPLICIT_ACCESSW *static HMODULE hmod
static VARIANTARG static DISPID
#define LOCALE_SYSTEM_DEFAULT
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define IsEqualGUID(rguid1, rguid2)
static unsigned __int64 next
LIST_ENTRY ProcessLocksList
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
DWORD WINAPI GetLastError(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define DISP_E_BADVARTYPE
#define DISP_E_BADPARAMCOUNT
#define DISP_E_MEMBERNOTFOUND
#define ERROR_CAN_NOT_COMPLETE
#define DISP_E_UNKNOWNNAME