mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[URLMON] Sync with Wine 10.0. CORE-20596
This commit is contained in:
@@ -4,7 +4,6 @@ add_definitions(
|
||||
-DENTRY_PREFIX=URLMON_
|
||||
-DPROXY_DELEGATION
|
||||
-DWINE_REGISTER_DLL
|
||||
-D_CRT_NON_CONFORMING_SWPRINTFS
|
||||
-DPROXY_CLSID_IS={0x79EAC9F1,0xBAF9,0x11CE,{0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B}})
|
||||
|
||||
spec2def(urlmon.dll urlmon.spec ADD_IMPORTLIB)
|
||||
@@ -50,9 +49,10 @@ add_library(urlmon MODULE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/urlmon.def)
|
||||
|
||||
set_module_type(urlmon win32dll)
|
||||
target_link_libraries(urlmon uuid wine ${PSEH_LIB} oldnames)
|
||||
add_idl_reg_scripts(urlmon registry urlmon_urlmon.idl)
|
||||
target_link_libraries(urlmon msvcrtex uuid wine oldnames)
|
||||
add_delay_importlibs(urlmon advpack)
|
||||
add_importlibs(urlmon rpcrt4 propsys ole32 oleaut32 shlwapi shell32 wininet user32 advapi32 kernel32_vista msvcrt kernel32 ntdll)
|
||||
add_importlibs(urlmon rpcrt4 propsys ole32 oleaut32 shlwapi shell32 wininet normaliz user32 advapi32 kernel32_vista msvcrt kernel32 ntdll)
|
||||
add_pch(urlmon precomp.h "${PCH_SKIP_SOURCE}")
|
||||
add_cd_file(TARGET urlmon DESTINATION reactos/system32 FOR all)
|
||||
set_wine_module_FIXME(urlmon) # CORE-5743: No ARRAY_SIZE macro
|
||||
|
||||
@@ -30,12 +30,6 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||
|
||||
static const WCHAR ctxW[] = {'c','t','x',0};
|
||||
static const WCHAR cab_extW[] = {'.','c','a','b',0};
|
||||
static const WCHAR infW[] = {'i','n','f',0};
|
||||
static const WCHAR dllW[] = {'d','l','l',0};
|
||||
static const WCHAR ocxW[] = {'o','c','x',0};
|
||||
|
||||
enum install_type {
|
||||
INSTALL_UNKNOWN,
|
||||
INSTALL_DLL,
|
||||
@@ -63,8 +57,8 @@ static void release_install_ctx(install_ctx_t *ctx)
|
||||
IUri_Release(ctx->uri);
|
||||
if(ctx->callback)
|
||||
IBindStatusCallback_Release(ctx->callback);
|
||||
heap_free(ctx->install_file);
|
||||
heap_free(ctx);
|
||||
free(ctx->install_file);
|
||||
free(ctx);
|
||||
}
|
||||
|
||||
static inline BOOL file_exists(const WCHAR *file_name)
|
||||
@@ -163,7 +157,19 @@ done:
|
||||
return res;
|
||||
}
|
||||
|
||||
static inline char *strdupWtoA(const WCHAR *str)
|
||||
{
|
||||
char *ret = NULL;
|
||||
|
||||
if(str) {
|
||||
DWORD size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
||||
ret = malloc(size);
|
||||
if(ret)
|
||||
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
HRESULT WINAPI Modified_ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir)
|
||||
{
|
||||
@@ -173,13 +179,13 @@ HRESULT WINAPI Modified_ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir)
|
||||
TRACE("(%s, %s, %d)\n", debugstr_w(CabName), debugstr_w(ExpandDir));
|
||||
|
||||
if(CabName) {
|
||||
cab_name = heap_strdupWtoA(CabName);
|
||||
cab_name = strdupWtoA(CabName);
|
||||
if(!cab_name)
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
if(ExpandDir) {
|
||||
expand_dir = heap_strdupWtoA(ExpandDir);
|
||||
expand_dir = strdupWtoA(ExpandDir);
|
||||
if(!expand_dir)
|
||||
hres = E_OUTOFMEMORY;
|
||||
}
|
||||
@@ -189,13 +195,12 @@ HRESULT WINAPI Modified_ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir)
|
||||
if(SUCCEEDED(hres))
|
||||
hres = Modified_ExtractFilesA(cab_name, expand_dir);
|
||||
|
||||
heap_free(cab_name);
|
||||
heap_free(expand_dir);
|
||||
free(cab_name);
|
||||
free(expand_dir);
|
||||
return hres;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __REACTOS__ */
|
||||
|
||||
static HRESULT extract_cab_file(install_ctx_t *ctx)
|
||||
{
|
||||
@@ -209,13 +214,13 @@ static HRESULT extract_cab_file(install_ctx_t *ctx)
|
||||
hres = ExtractFilesW(ctx->cache_file, ctx->tmp_dir, 0, NULL, NULL, 0);
|
||||
#endif
|
||||
if(FAILED(hres)) {
|
||||
WARN("ExtractFilesW failed: %08x\n", hres);
|
||||
WARN("ExtractFilesW failed: %08lx\n", hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
path_len = lstrlenW(ctx->tmp_dir);
|
||||
file_len = lstrlenW(ctx->file_name);
|
||||
ctx->install_file = heap_alloc((path_len+file_len+2)*sizeof(WCHAR));
|
||||
ctx->install_file = malloc((path_len + file_len + 2) * sizeof(WCHAR));
|
||||
if(!ctx->install_file)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -226,19 +231,19 @@ static HRESULT extract_cab_file(install_ctx_t *ctx)
|
||||
/* NOTE: Assume that file_name contains ".cab" extension */
|
||||
ptr = ctx->install_file+path_len+1+file_len-3;
|
||||
|
||||
memcpy(ptr, infW, sizeof(infW));
|
||||
memcpy(ptr, L"inf", sizeof(L"inf"));
|
||||
if(file_exists(ctx->install_file)) {
|
||||
ctx->install_type = INSTALL_INF;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
memcpy(ptr, dllW, sizeof(dllW));
|
||||
memcpy(ptr, L"dll", sizeof(L"dll"));
|
||||
if(file_exists(ctx->install_file)) {
|
||||
ctx->install_type = INSTALL_DLL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
memcpy(ptr, ocxW, sizeof(ocxW));
|
||||
memcpy(ptr, L"ocx", sizeof(L"ocx"));
|
||||
if(file_exists(ctx->install_file)) {
|
||||
ctx->install_type = INSTALL_DLL;
|
||||
return S_OK;
|
||||
@@ -283,7 +288,7 @@ static void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, siz
|
||||
memcpy(buf+len, prev_ptr, ptr-prev_ptr);
|
||||
len += ptr-prev_ptr;
|
||||
|
||||
if(!_wcsnicmp(ptr, expand_dirW, ARRAY_SIZE(expand_dirW))) {
|
||||
if(!wcsnicmp(ptr, expand_dirW, ARRAY_SIZE(expand_dirW))) {
|
||||
len2 = lstrlenW(ctx->tmp_dir);
|
||||
if(buf)
|
||||
memcpy(buf+len, ctx->tmp_dir, len2*sizeof(WCHAR));
|
||||
@@ -312,30 +317,28 @@ static HRESULT process_hook_section(install_ctx_t *ctx, const WCHAR *sect_name)
|
||||
DWORD len;
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR runW[] = {'r','u','n',0};
|
||||
|
||||
len = GetPrivateProfileStringW(sect_name, NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
|
||||
if(!len)
|
||||
return S_OK;
|
||||
|
||||
for(key = buf; *key; key += lstrlenW(key)+1) {
|
||||
if(!wcsicmp(key, runW)) {
|
||||
if(!wcsicmp(key, L"run")) {
|
||||
WCHAR *cmd;
|
||||
size_t size;
|
||||
|
||||
len = GetPrivateProfileStringW(sect_name, runW, NULL, val, ARRAY_SIZE(val), ctx->install_file);
|
||||
len = GetPrivateProfileStringW(sect_name, L"run", NULL, val, ARRAY_SIZE(val), ctx->install_file);
|
||||
|
||||
TRACE("Run %s\n", debugstr_w(val));
|
||||
|
||||
expand_command(ctx, val, NULL, &size);
|
||||
|
||||
cmd = heap_alloc(size*sizeof(WCHAR));
|
||||
cmd = malloc(size * sizeof(WCHAR));
|
||||
if(!cmd)
|
||||
heap_free(cmd);
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
expand_command(ctx, val, cmd, &size);
|
||||
hres = RunSetupCommandW(ctx->hwnd, cmd, NULL, ctx->tmp_dir, NULL, NULL, 0, NULL);
|
||||
heap_free(cmd);
|
||||
free(cmd);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
}else {
|
||||
@@ -355,17 +358,14 @@ static HRESULT install_inf_file(install_ctx_t *ctx)
|
||||
DWORD len;
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR setup_hooksW[] = {'S','e','t','u','p',' ','H','o','o','k','s',0};
|
||||
static const WCHAR add_codeW[] = {'A','d','d','.','C','o','d','e',0};
|
||||
|
||||
len = GetPrivateProfileStringW(setup_hooksW, NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
|
||||
len = GetPrivateProfileStringW(L"Setup Hooks", NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
|
||||
if(len) {
|
||||
default_install = FALSE;
|
||||
|
||||
for(key = buf; *key; key += lstrlenW(key)+1) {
|
||||
TRACE("[Setup Hooks] key: %s\n", debugstr_w(key));
|
||||
|
||||
len = GetPrivateProfileStringW(setup_hooksW, key, NULL, sect_name, ARRAY_SIZE(sect_name),
|
||||
len = GetPrivateProfileStringW(L"Setup Hooks", key, NULL, sect_name, ARRAY_SIZE(sect_name),
|
||||
ctx->install_file);
|
||||
if(!len) {
|
||||
WARN("Could not get key value\n");
|
||||
@@ -378,14 +378,14 @@ static HRESULT install_inf_file(install_ctx_t *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
len = GetPrivateProfileStringW(add_codeW, NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
|
||||
len = GetPrivateProfileStringW(L"Add.Code", NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
|
||||
if(len) {
|
||||
default_install = FALSE;
|
||||
|
||||
for(key = buf; *key; key += lstrlenW(key)+1) {
|
||||
TRACE("[Add.Code] key: %s\n", debugstr_w(key));
|
||||
|
||||
len = GetPrivateProfileStringW(add_codeW, key, NULL, sect_name, ARRAY_SIZE(sect_name),
|
||||
len = GetPrivateProfileStringW(L"Add.Code", key, NULL, sect_name, ARRAY_SIZE(sect_name),
|
||||
ctx->install_file);
|
||||
if(!len) {
|
||||
WARN("Could not get key value\n");
|
||||
@@ -395,7 +395,7 @@ static HRESULT install_inf_file(install_ctx_t *ctx)
|
||||
hres = RunSetupCommandW(ctx->hwnd, ctx->install_file, sect_name,
|
||||
ctx->tmp_dir, NULL, NULL, RSC_FLAG_INF, NULL);
|
||||
if(FAILED(hres)) {
|
||||
WARN("RunSetupCommandW failed: %08x\n", hres);
|
||||
WARN("RunSetupCommandW failed: %08lx\n", hres);
|
||||
return hres;
|
||||
}
|
||||
}
|
||||
@@ -404,7 +404,7 @@ static HRESULT install_inf_file(install_ctx_t *ctx)
|
||||
if(default_install) {
|
||||
hres = RunSetupCommandW(ctx->hwnd, ctx->install_file, NULL, ctx->tmp_dir, NULL, NULL, RSC_FLAG_INF, NULL);
|
||||
if(FAILED(hres)) {
|
||||
WARN("RunSetupCommandW failed: %08x\n", hres);
|
||||
WARN("RunSetupCommandW failed: %08lx\n", hres);
|
||||
return hres;
|
||||
}
|
||||
}
|
||||
@@ -472,7 +472,7 @@ static void update_counter(install_ctx_t *ctx, HWND hwnd)
|
||||
}else {
|
||||
WCHAR buf[100];
|
||||
LoadStringW(urlmon_instance, IDS_AXINSTALL_INSTALLN, buf, ARRAY_SIZE(buf));
|
||||
swprintf(text, buf, ctx->counter);
|
||||
swprintf(text, ARRAY_SIZE(text), buf, ctx->counter);
|
||||
}
|
||||
|
||||
SetDlgItemTextW(hwnd, ID_AXINSTALL_INSTALL_BTN, text);
|
||||
@@ -483,7 +483,7 @@ static BOOL init_warning_dialog(HWND hwnd, install_ctx_t *ctx)
|
||||
BSTR display_uri;
|
||||
HRESULT hres;
|
||||
|
||||
if(!SetPropW(hwnd, ctxW, ctx))
|
||||
if(!SetPropW(hwnd, L"ctx", ctx))
|
||||
return FALSE;
|
||||
|
||||
hres = IUri_GetDisplayUri(ctx->uri, &display_uri);
|
||||
@@ -513,7 +513,7 @@ static INT_PTR WINAPI warning_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
|
||||
case WM_COMMAND:
|
||||
switch(wparam) {
|
||||
case ID_AXINSTALL_INSTALL_BTN: {
|
||||
install_ctx_t *ctx = GetPropW(hwnd, ctxW);
|
||||
install_ctx_t *ctx = GetPropW(hwnd, L"ctx");
|
||||
if(ctx)
|
||||
ctx->cancel = FALSE;
|
||||
EndDialog(hwnd, 0);
|
||||
@@ -524,7 +524,7 @@ static INT_PTR WINAPI warning_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
|
||||
return FALSE;
|
||||
}
|
||||
case WM_TIMER:
|
||||
update_counter(GetPropW(hwnd, ctxW), hwnd);
|
||||
update_counter(GetPropW(hwnd, L"ctx"), hwnd);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -589,7 +589,7 @@ static HRESULT install_file(install_ctx_t *ctx, const WCHAR *cache_file)
|
||||
if(!ext)
|
||||
ext = ptr;
|
||||
|
||||
if(!wcsicmp(ext, cab_extW)) {
|
||||
if(!wcsicmp(ext, L".cab")) {
|
||||
hres = install_cab_file(ctx);
|
||||
}else {
|
||||
FIXME("Unsupported extension %s\n", debugstr_w(ext));
|
||||
@@ -606,7 +606,7 @@ static void failure_msgbox(install_ctx_t *ctx, HRESULT hres)
|
||||
WCHAR buf[1024], fmt[1024];
|
||||
|
||||
LoadStringW(urlmon_instance, IDS_AXINSTALL_FAILURE, fmt, ARRAY_SIZE(fmt));
|
||||
swprintf(buf, fmt, hres);
|
||||
swprintf(buf, ARRAY_SIZE(buf), fmt, hres);
|
||||
MessageBoxW(ctx->hwnd, buf, NULL, MB_OK);
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ static HRESULT distunit_on_stop(void *ctx, const WCHAR *cache_file, HRESULT hres
|
||||
{
|
||||
install_ctx_t *install_ctx = ctx;
|
||||
|
||||
TRACE("(%p %s %08x %s)\n", ctx, debugstr_w(cache_file), hresult, debugstr_w(error_str));
|
||||
TRACE("(%p %s %08lx %s)\n", ctx, debugstr_w(cache_file), hresult, debugstr_w(error_str));
|
||||
|
||||
if(hresult == S_OK) {
|
||||
hresult = install_file(install_ctx, cache_file);
|
||||
@@ -639,19 +639,19 @@ HRESULT WINAPI AsyncInstallDistributionUnit(const WCHAR *szDistUnit, const WCHAR
|
||||
install_ctx_t *ctx;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s %s %s %x %x %s %p %p %x)\n", debugstr_w(szDistUnit), debugstr_w(szTYPE), debugstr_w(szExt),
|
||||
TRACE("(%s %s %s %lx %lx %s %p %p %lx)\n", debugstr_w(szDistUnit), debugstr_w(szTYPE), debugstr_w(szExt),
|
||||
dwFileVersionMS, dwFileVersionLS, debugstr_w(szURL), pbc, pvReserved, flags);
|
||||
|
||||
if(szDistUnit || szTYPE || szExt)
|
||||
FIXME("Unsupported arguments\n");
|
||||
|
||||
ctx = heap_alloc_zero(sizeof(*ctx));
|
||||
ctx = calloc(1, sizeof(*ctx));
|
||||
if(!ctx)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
hres = CreateUri(szURL, 0, 0, &ctx->uri);
|
||||
if(FAILED(hres)) {
|
||||
heap_free(ctx);
|
||||
free(ctx);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
|
||||
+23
-23
@@ -23,7 +23,7 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||
|
||||
static WCHAR bscb_holderW[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };
|
||||
static WCHAR bscb_holderW[] = L"_BSCB_Holder_";
|
||||
|
||||
extern IID IID_IBindStatusCallbackHolder;
|
||||
|
||||
@@ -146,7 +146,7 @@ static ULONG WINAPI BindStatusCallback_AddRef(IBindStatusCallbackEx *iface)
|
||||
BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref = %d\n", This, ref);
|
||||
TRACE("(%p) ref = %ld\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
@@ -156,13 +156,13 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallbackEx *iface)
|
||||
BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref = %d\n", This, ref);
|
||||
TRACE("(%p) ref = %ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
if(This->serv_prov)
|
||||
IServiceProvider_Release(This->serv_prov);
|
||||
IBindStatusCallback_Release(This->callback);
|
||||
heap_free(This);
|
||||
free(This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
@@ -173,7 +173,7 @@ static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallbackEx *i
|
||||
{
|
||||
BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface);
|
||||
|
||||
TRACE("(%p)->(%d %p)\n", This, dwReserved, pbind);
|
||||
TRACE("(%p)->(%ld %p)\n", This, dwReserved, pbind);
|
||||
|
||||
return IBindStatusCallback_OnStartBinding(This->callback, 0xff, pbind);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallbackEx *if
|
||||
{
|
||||
BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, reserved);
|
||||
TRACE("(%p)->(%ld)\n", This, reserved);
|
||||
|
||||
return IBindStatusCallback_OnLowResource(This->callback, reserved);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallbackEx *iface
|
||||
{
|
||||
BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface);
|
||||
|
||||
TRACE("%p)->(%u %u %s %s)\n", This, ulProgress, ulProgressMax, debugstr_bindstatus(ulStatusCode),
|
||||
TRACE("%p)->(%lu %lu %s %s)\n", This, ulProgress, ulProgressMax, debugstr_bindstatus(ulStatusCode),
|
||||
debugstr_w(szStatusText));
|
||||
|
||||
return IBindStatusCallback_OnProgress(This->callback, ulProgress,
|
||||
@@ -213,7 +213,7 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallbackEx *if
|
||||
{
|
||||
BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %s)\n", This, hresult, debugstr_w(szError));
|
||||
TRACE("(%p)->(%08lx %s)\n", This, hresult, debugstr_w(szError));
|
||||
|
||||
return IBindStatusCallback_OnStopBinding(This->callback, hresult, szError);
|
||||
}
|
||||
@@ -245,7 +245,7 @@ static HRESULT WINAPI BindStatusCallback_OnDataAvailable(IBindStatusCallbackEx *
|
||||
{
|
||||
BindStatusCallback *This = impl_from_IBindStatusCallbackEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %d %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
|
||||
TRACE("(%p)->(%08lx %ld %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
|
||||
|
||||
return IBindStatusCallback_OnDataAvailable(This->callback, grfBSCF, dwSize, pformatetc, pstgmed);
|
||||
}
|
||||
@@ -393,7 +393,7 @@ static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction(IHttpNegotiate2 *ifa
|
||||
IHttpNegotiate *http_negotiate;
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
TRACE("(%p)->(%s %s %d %p)\n", This, debugstr_w(szURL), debugstr_w(szHeaders), dwReserved,
|
||||
TRACE("(%p)->(%s %s %ld %p)\n", This, debugstr_w(szURL), debugstr_w(szHeaders), dwReserved,
|
||||
pszAdditionalHeaders);
|
||||
|
||||
*pszAdditionalHeaders = NULL;
|
||||
@@ -417,7 +417,7 @@ static HRESULT WINAPI BSCHttpNegotiate_OnResponse(IHttpNegotiate2 *iface, DWORD
|
||||
IHttpNegotiate *http_negotiate;
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
TRACE("(%p)->(%d %s %s %p)\n", This, dwResponseCode, debugstr_w(szResponseHeaders),
|
||||
TRACE("(%p)->(%ld %s %s %p)\n", This, dwResponseCode, debugstr_w(szResponseHeaders),
|
||||
debugstr_w(szRequestHeaders), pszAdditionalRequestHeaders);
|
||||
|
||||
http_negotiate = get_callback_iface(This, &IID_IHttpNegotiate);
|
||||
@@ -442,7 +442,7 @@ static HRESULT WINAPI BSCHttpNegotiate_GetRootSecurityId(IHttpNegotiate2 *iface,
|
||||
IHttpNegotiate2 *http_negotiate2;
|
||||
HRESULT hres = E_FAIL;
|
||||
|
||||
TRACE("(%p)->(%p %p %ld)\n", This, pbSecurityId, pcbSecurityId, dwReserved);
|
||||
TRACE("(%p)->(%p %p %Id)\n", This, pbSecurityId, pcbSecurityId, dwReserved);
|
||||
|
||||
http_negotiate2 = get_callback_iface(This, &IID_IHttpNegotiate2);
|
||||
if(http_negotiate2) {
|
||||
@@ -538,7 +538,7 @@ static HRESULT WINAPI BSCInternetBindInfo_GetBindString(IInternetBindInfo *iface
|
||||
IInternetBindInfo *bind_info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%d %p %d %p)\n", This, string_type, strs, cnt, fetched);
|
||||
TRACE("(%p)->(%ld %p %ld %p)\n", This, string_type, strs, cnt, fetched);
|
||||
|
||||
hres = IBindStatusCallback_QueryInterface(This->callback, &IID_IInternetBindInfo, (void**)&bind_info);
|
||||
if(FAILED(hres))
|
||||
@@ -579,7 +579,7 @@ HRESULT wrap_callback(IBindStatusCallback *bsc, IBindStatusCallback **ret_iface)
|
||||
{
|
||||
BindStatusCallback *ret;
|
||||
|
||||
ret = heap_alloc_zero(sizeof(BindStatusCallback));
|
||||
ret = calloc(1, sizeof(BindStatusCallback));
|
||||
if(!ret)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -619,7 +619,7 @@ HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pb
|
||||
IBindStatusCallback *bsc, *prev = NULL;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %p %p %x)\n", pbc, pbsc, ppbscPrevious, dwReserved);
|
||||
TRACE("(%p %p %p %lx)\n", pbc, pbsc, ppbscPrevious, dwReserved);
|
||||
|
||||
if (!pbc || !pbsc)
|
||||
return E_INVALIDARG;
|
||||
@@ -737,7 +737,7 @@ static ULONG WINAPI AsyncBindCtx_AddRef(IBindCtx *iface)
|
||||
AsyncBindCtx *This = impl_from_IBindCtx(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
@@ -747,11 +747,11 @@ static ULONG WINAPI AsyncBindCtx_Release(IBindCtx *iface)
|
||||
AsyncBindCtx *This = impl_from_IBindCtx(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
IBindCtx_Release(This->bindctx);
|
||||
heap_free(This);
|
||||
free(This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
@@ -871,7 +871,7 @@ static HRESULT init_bindctx(IBindCtx *bindctx, DWORD options,
|
||||
HRESULT hres;
|
||||
|
||||
if(options)
|
||||
FIXME("not supported options %08x\n", options);
|
||||
FIXME("not supported options %08lx\n", options);
|
||||
if(format)
|
||||
FIXME("format is not supported\n");
|
||||
|
||||
@@ -902,7 +902,7 @@ HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback,
|
||||
IBindCtx *bindctx;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%08x %p %p %p)\n", reserved, callback, format, pbind);
|
||||
TRACE("(%08lx %p %p %p)\n", reserved, callback, format, pbind);
|
||||
|
||||
if(!pbind || !callback)
|
||||
return E_INVALIDARG;
|
||||
@@ -934,13 +934,13 @@ HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options,
|
||||
IBindCtx *bindctx;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %08x %p %p %p %d)\n", ibind, options, callback, format, pbind, reserved);
|
||||
TRACE("(%p %08lx %p %p %p %ld)\n", ibind, options, callback, format, pbind, reserved);
|
||||
|
||||
if(!pbind)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if(reserved)
|
||||
WARN("reserved=%d\n", reserved);
|
||||
WARN("reserved=%ld\n", reserved);
|
||||
|
||||
if(ibind) {
|
||||
IBindCtx_AddRef(ibind);
|
||||
@@ -951,7 +951,7 @@ HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options,
|
||||
return hres;
|
||||
}
|
||||
|
||||
ret = heap_alloc(sizeof(AsyncBindCtx));
|
||||
ret = malloc(sizeof(AsyncBindCtx));
|
||||
|
||||
ret->IBindCtx_iface.lpVtbl = &AsyncBindCtxVtbl;
|
||||
ret->ref = 1;
|
||||
|
||||
+78
-84
@@ -16,8 +16,6 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "urlmon_main.h"
|
||||
#include "winreg.h"
|
||||
#include "shlwapi.h"
|
||||
@@ -26,8 +24,8 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||
|
||||
static WCHAR cbinding_contextW[] = {'C','B','i','n','d','i','n','g',' ','C','o','n','t','e','x','t',0};
|
||||
static WCHAR bscb_holderW[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };
|
||||
static WCHAR cbinding_contextW[] = L"CBinding Context";
|
||||
static WCHAR bscb_holderW[] = L"_BSCB_Holder_";
|
||||
|
||||
typedef struct {
|
||||
IUnknown IUnknown_iface;
|
||||
@@ -131,19 +129,19 @@ static void dump_BINDINFO(BINDINFO *bi)
|
||||
|
||||
TRACE("\n"
|
||||
"BINDINFO = {\n"
|
||||
" %d, %s,\n"
|
||||
" {%d, %p, %p},\n"
|
||||
" %ld, %s,\n"
|
||||
" {%ld, %p, %p},\n"
|
||||
" %s,\n"
|
||||
" %s,\n"
|
||||
" %s,\n"
|
||||
" %d, %08x, %d, %d\n"
|
||||
" {%d %p %x},\n"
|
||||
" %ld, %08lx, %ld, %ld\n"
|
||||
" {%ld %p %x},\n"
|
||||
" %s\n"
|
||||
" %p, %d\n"
|
||||
" %p, %ld\n"
|
||||
"}\n",
|
||||
|
||||
bi->cbSize, debugstr_w(bi->szExtraInfo),
|
||||
bi->stgmedData.tymed, bi->stgmedData.u.hGlobal, bi->stgmedData.pUnkForRelease,
|
||||
bi->stgmedData.tymed, bi->stgmedData.hGlobal, bi->stgmedData.pUnkForRelease,
|
||||
bi->grfBindInfoF > BINDINFOF_URLENCODEDEXTRAINFO
|
||||
? "unknown" : BINDINFOF_str[bi->grfBindInfoF],
|
||||
bi->dwBindVerb > BINDVERB_CUSTOM
|
||||
@@ -160,8 +158,8 @@ static void dump_BINDINFO(BINDINFO *bi)
|
||||
|
||||
static void mime_available(Binding *This, LPCWSTR mime)
|
||||
{
|
||||
heap_free(This->mime);
|
||||
This->mime = heap_strdupW(mime);
|
||||
free(This->mime);
|
||||
This->mime = wcsdup(mime);
|
||||
|
||||
if(!This->mime || !This->report_mime)
|
||||
return;
|
||||
@@ -197,34 +195,33 @@ static LPWSTR get_mime_clsid(LPCWSTR mime, CLSID *clsid)
|
||||
static const WCHAR mime_keyW[] =
|
||||
{'M','I','M','E','\\','D','a','t','a','b','a','s','e','\\',
|
||||
'C','o','n','t','e','n','t',' ','T','y','p','e','\\'};
|
||||
static const WCHAR clsidW[] = {'C','L','S','I','D',0};
|
||||
|
||||
len = lstrlenW(mime)+1;
|
||||
key_name = heap_alloc(sizeof(mime_keyW) + len*sizeof(WCHAR));
|
||||
key_name = malloc(sizeof(mime_keyW) + len * sizeof(WCHAR));
|
||||
memcpy(key_name, mime_keyW, sizeof(mime_keyW));
|
||||
lstrcpyW(key_name + ARRAY_SIZE(mime_keyW), mime);
|
||||
|
||||
res = RegOpenKeyW(HKEY_CLASSES_ROOT, key_name, &hkey);
|
||||
heap_free(key_name);
|
||||
free(key_name);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
WARN("Could not open MIME key: %x\n", res);
|
||||
WARN("Could not open MIME key: %lx\n", res);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size = 50*sizeof(WCHAR);
|
||||
ret = heap_alloc(size);
|
||||
res = RegQueryValueExW(hkey, clsidW, NULL, &type, (LPBYTE)ret, &size);
|
||||
ret = malloc(size);
|
||||
res = RegQueryValueExW(hkey, L"CLSID", NULL, &type, (BYTE*)ret, &size);
|
||||
RegCloseKey(hkey);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
WARN("Could not get CLSID: %08x\n", res);
|
||||
heap_free(ret);
|
||||
WARN("Could not get CLSID: %08lx\n", res);
|
||||
free(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hres = CLSIDFromString(ret, clsid);
|
||||
if(FAILED(hres)) {
|
||||
WARN("Could not parse CLSID: %08x\n", hres);
|
||||
heap_free(ret);
|
||||
WARN("Could not parse CLSID: %08lx\n", hres);
|
||||
free(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -238,7 +235,7 @@ static void load_doc_mon(Binding *binding, IPersistMoniker *persist)
|
||||
|
||||
hres = CreateAsyncBindCtxEx(binding->bctx, 0, NULL, NULL, &bctx, 0);
|
||||
if(FAILED(hres)) {
|
||||
WARN("CreateAsyncBindCtxEx failed: %08x\n", hres);
|
||||
WARN("CreateAsyncBindCtxEx failed: %08lx\n", hres);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -249,7 +246,7 @@ static void load_doc_mon(Binding *binding, IPersistMoniker *persist)
|
||||
IBindCtx_RevokeObjectParam(bctx, cbinding_contextW);
|
||||
IBindCtx_Release(bctx);
|
||||
if(FAILED(hres))
|
||||
FIXME("Load failed: %08x\n", hres);
|
||||
FIXME("Load failed: %08lx\n", hres);
|
||||
}
|
||||
|
||||
static HRESULT create_mime_object(Binding *binding, const CLSID *clsid, LPCWSTR clsid_str)
|
||||
@@ -260,7 +257,7 @@ static HRESULT create_mime_object(Binding *binding, const CLSID *clsid, LPCWSTR
|
||||
hres = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
||||
&binding->iid, (void**)&binding->obj);
|
||||
if(FAILED(hres)) {
|
||||
WARN("CoCreateInstance failed: %08x\n", hres);
|
||||
WARN("CoCreateInstance failed: %08lx\n", hres);
|
||||
return INET_E_CANNOT_INSTANTIATE_OBJECT;
|
||||
}
|
||||
|
||||
@@ -281,7 +278,7 @@ static HRESULT create_mime_object(Binding *binding, const CLSID *clsid, LPCWSTR
|
||||
|
||||
IPersistMoniker_Release(persist);
|
||||
}else {
|
||||
FIXME("Could not get IPersistMoniker: %08x\n", hres);
|
||||
FIXME("Could not get IPersistMoniker: %08lx\n", hres);
|
||||
/* FIXME: Try query IPersistFile */
|
||||
}
|
||||
|
||||
@@ -308,7 +305,7 @@ static void create_object(Binding *binding)
|
||||
|
||||
if(clsid_str) {
|
||||
hres = create_mime_object(binding, &clsid, clsid_str);
|
||||
heap_free(clsid_str);
|
||||
free(clsid_str);
|
||||
}else {
|
||||
FIXME("Could not find object for MIME %s\n", debugstr_w(binding->mime));
|
||||
hres = REGDB_E_CLASSNOTREG;
|
||||
@@ -324,14 +321,14 @@ static void create_object(Binding *binding)
|
||||
|
||||
static void cache_file_available(Binding *This, const WCHAR *file_name)
|
||||
{
|
||||
heap_free(This->stgmed_buf->cache_file);
|
||||
This->stgmed_buf->cache_file = heap_strdupW(file_name);
|
||||
free(This->stgmed_buf->cache_file);
|
||||
This->stgmed_buf->cache_file = wcsdup(file_name);
|
||||
|
||||
if(This->use_cache_file) {
|
||||
This->stgmed_buf->file = CreateFileW(file_name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if(This->stgmed_buf->file == INVALID_HANDLE_VALUE)
|
||||
WARN("CreateFile failed: %u\n", GetLastError());
|
||||
WARN("CreateFile failed: %lu\n", GetLastError());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,7 +360,7 @@ static ULONG WINAPI StgMedUnk_AddRef(IUnknown *iface)
|
||||
stgmed_buf_t *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
@@ -373,14 +370,14 @@ static ULONG WINAPI StgMedUnk_Release(IUnknown *iface)
|
||||
stgmed_buf_t *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
if(This->file != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(This->file);
|
||||
IInternetProtocolEx_Release(This->protocol);
|
||||
heap_free(This->cache_file);
|
||||
heap_free(This);
|
||||
free(This->cache_file);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -396,7 +393,7 @@ static const IUnknownVtbl StgMedUnkVtbl = {
|
||||
|
||||
static stgmed_buf_t *create_stgmed_buf(IInternetProtocolEx *protocol)
|
||||
{
|
||||
stgmed_buf_t *ret = heap_alloc(sizeof(*ret));
|
||||
stgmed_buf_t *ret = malloc(sizeof(*ret));
|
||||
|
||||
ret->IUnknown_iface.lpVtbl = &StgMedUnkVtbl;
|
||||
ret->ref = 1;
|
||||
@@ -458,7 +455,7 @@ static ULONG WINAPI ProtocolStream_AddRef(IStream *iface)
|
||||
ProtocolStream *This = impl_from_IStream(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
@@ -468,11 +465,11 @@ static ULONG WINAPI ProtocolStream_Release(IStream *iface)
|
||||
ProtocolStream *This = impl_from_IStream(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
IUnknown_Release(&This->buf->IUnknown_iface);
|
||||
heap_free(This);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -487,7 +484,7 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv,
|
||||
DWORD read = 0;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p %d %p)\n", This, pv, cb, pcbRead);
|
||||
TRACE("(%p)->(%p %ld %p)\n", This, pv, cb, pcbRead);
|
||||
|
||||
if(This->buf->file == INVALID_HANDLE_VALUE) {
|
||||
hres = This->buf->hres = IInternetProtocolEx_Read(This->buf->protocol, (PBYTE)pv, cb, &read);
|
||||
@@ -501,7 +498,7 @@ static HRESULT WINAPI ProtocolStream_Read(IStream *iface, void *pv,
|
||||
if(hres == E_PENDING)
|
||||
return E_PENDING;
|
||||
else if(FAILED(hres))
|
||||
FIXME("Read failed: %08x\n", hres);
|
||||
FIXME("Read failed: %08lx\n", hres);
|
||||
|
||||
return read ? S_OK : S_FALSE;
|
||||
}
|
||||
@@ -511,7 +508,7 @@ static HRESULT WINAPI ProtocolStream_Write(IStream *iface, const void *pv,
|
||||
{
|
||||
ProtocolStream *This = impl_from_IStream(iface);
|
||||
|
||||
TRACE("(%p)->(%p %d %p)\n", This, pv, cb, pcbWritten);
|
||||
TRACE("(%p)->(%p %ld %p)\n", This, pv, cb, pcbWritten);
|
||||
|
||||
return STG_E_ACCESSDENIED;
|
||||
}
|
||||
@@ -523,7 +520,7 @@ static HRESULT WINAPI ProtocolStream_Seek(IStream *iface, LARGE_INTEGER dlibMove
|
||||
LARGE_INTEGER new_pos;
|
||||
DWORD method;
|
||||
|
||||
TRACE("(%p)->(%d %08x %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
TRACE("(%p)->(%ld %08lx %p)\n", This, dlibMove.LowPart, dwOrigin, plibNewPosition);
|
||||
|
||||
if(This->buf->file == INVALID_HANDLE_VALUE) {
|
||||
/* We should probably call protocol handler's Seek. */
|
||||
@@ -542,12 +539,12 @@ static HRESULT WINAPI ProtocolStream_Seek(IStream *iface, LARGE_INTEGER dlibMove
|
||||
method = FILE_END;
|
||||
break;
|
||||
default:
|
||||
WARN("Invalid origin %x\n", dwOrigin);
|
||||
WARN("Invalid origin %lx\n", dwOrigin);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if(!SetFilePointerEx(This->buf->file, dlibMove, &new_pos, method)) {
|
||||
FIXME("SetFilePointerEx failed: %u\n", GetLastError());
|
||||
FIXME("SetFilePointerEx failed: %lu\n", GetLastError());
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -559,7 +556,7 @@ static HRESULT WINAPI ProtocolStream_Seek(IStream *iface, LARGE_INTEGER dlibMove
|
||||
static HRESULT WINAPI ProtocolStream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
|
||||
{
|
||||
ProtocolStream *This = impl_from_IStream(iface);
|
||||
FIXME("(%p)->(%d)\n", This, libNewSize.u.LowPart);
|
||||
FIXME("(%p)->(%ld)\n", This, libNewSize.LowPart);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -567,7 +564,7 @@ static HRESULT WINAPI ProtocolStream_CopyTo(IStream *iface, IStream *pstm,
|
||||
ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
|
||||
{
|
||||
ProtocolStream *This = impl_from_IStream(iface);
|
||||
FIXME("(%p)->(%p %d %p %p)\n", This, pstm, cb.u.LowPart, pcbRead, pcbWritten);
|
||||
FIXME("(%p)->(%p %ld %p %p)\n", This, pstm, cb.LowPart, pcbRead, pcbWritten);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -575,7 +572,7 @@ static HRESULT WINAPI ProtocolStream_Commit(IStream *iface, DWORD grfCommitFlags
|
||||
{
|
||||
ProtocolStream *This = impl_from_IStream(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, grfCommitFlags);
|
||||
TRACE("(%p)->(%08lx)\n", This, grfCommitFlags);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -593,7 +590,7 @@ static HRESULT WINAPI ProtocolStream_LockRegion(IStream *iface, ULARGE_INTEGER l
|
||||
ULARGE_INTEGER cb, DWORD dwLockType)
|
||||
{
|
||||
ProtocolStream *This = impl_from_IStream(iface);
|
||||
FIXME("(%p)->(%d %d %d)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType);
|
||||
FIXME("(%p)->(%ld %ld %ld)\n", This, libOffset.LowPart, cb.LowPart, dwLockType);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -601,7 +598,7 @@ static HRESULT WINAPI ProtocolStream_UnlockRegion(IStream *iface,
|
||||
ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
|
||||
{
|
||||
ProtocolStream *This = impl_from_IStream(iface);
|
||||
FIXME("(%p)->(%d %d %d)\n", This, libOffset.u.LowPart, cb.u.LowPart, dwLockType);
|
||||
FIXME("(%p)->(%ld %ld %ld)\n", This, libOffset.LowPart, cb.LowPart, dwLockType);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -609,7 +606,7 @@ static HRESULT WINAPI ProtocolStream_Stat(IStream *iface, STATSTG *pstatstg,
|
||||
DWORD dwStatFlag)
|
||||
{
|
||||
ProtocolStream *This = impl_from_IStream(iface);
|
||||
TRACE("(%p)->(%p %08x)\n", This, pstatstg, dwStatFlag);
|
||||
TRACE("(%p)->(%p %08lx)\n", This, pstatstg, dwStatFlag);
|
||||
|
||||
if(!pstatstg)
|
||||
return E_FAIL;
|
||||
@@ -670,7 +667,7 @@ static HRESULT stgmed_stream_fill_stgmed(stgmed_obj_t *obj, STGMEDIUM *stgmed)
|
||||
ProtocolStream *stream = (ProtocolStream*)obj;
|
||||
|
||||
stgmed->tymed = TYMED_ISTREAM;
|
||||
stgmed->u.pstm = &stream->IStream_iface;
|
||||
stgmed->pstm = &stream->IStream_iface;
|
||||
stgmed->pUnkForRelease = &stream->buf->IUnknown_iface;
|
||||
|
||||
return S_OK;
|
||||
@@ -702,7 +699,7 @@ typedef struct {
|
||||
|
||||
static stgmed_obj_t *create_stgmed_stream(stgmed_buf_t *buf)
|
||||
{
|
||||
ProtocolStream *ret = heap_alloc(sizeof(ProtocolStream));
|
||||
ProtocolStream *ret = malloc(sizeof(ProtocolStream));
|
||||
|
||||
ret->stgmed_obj.vtbl = &stgmed_stream_vtbl;
|
||||
ret->IStream_iface.lpVtbl = &ProtocolStreamVtbl;
|
||||
@@ -721,7 +718,7 @@ static void stgmed_file_release(stgmed_obj_t *obj)
|
||||
stgmed_file_obj_t *file_obj = (stgmed_file_obj_t*)obj;
|
||||
|
||||
IUnknown_Release(&file_obj->buf->IUnknown_iface);
|
||||
heap_free(file_obj);
|
||||
free(file_obj);
|
||||
}
|
||||
|
||||
static HRESULT stgmed_file_fill_stgmed(stgmed_obj_t *obj, STGMEDIUM *stgmed)
|
||||
@@ -736,7 +733,7 @@ static HRESULT stgmed_file_fill_stgmed(stgmed_obj_t *obj, STGMEDIUM *stgmed)
|
||||
read_protocol_data(file_obj->buf);
|
||||
|
||||
stgmed->tymed = TYMED_FILE;
|
||||
stgmed->u.lpszFileName = file_obj->buf->cache_file;
|
||||
stgmed->lpszFileName = file_obj->buf->cache_file;
|
||||
stgmed->pUnkForRelease = &file_obj->buf->IUnknown_iface;
|
||||
|
||||
return S_OK;
|
||||
@@ -755,7 +752,7 @@ static const stgmed_obj_vtbl stgmed_file_vtbl = {
|
||||
|
||||
static stgmed_obj_t *create_stgmed_file(stgmed_buf_t *buf)
|
||||
{
|
||||
stgmed_file_obj_t *ret = heap_alloc(sizeof(*ret));
|
||||
stgmed_file_obj_t *ret = malloc(sizeof(*ret));
|
||||
|
||||
ret->stgmed_obj.vtbl = &stgmed_file_vtbl;
|
||||
|
||||
@@ -833,7 +830,7 @@ static ULONG WINAPI Binding_AddRef(IBinding *iface)
|
||||
Binding *This = impl_from_IBinding(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
@@ -843,7 +840,7 @@ static ULONG WINAPI Binding_Release(IBinding *iface)
|
||||
Binding *This = impl_from_IBinding(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
if(This->notif_hwnd)
|
||||
@@ -869,9 +866,9 @@ static ULONG WINAPI Binding_Release(IBinding *iface)
|
||||
This->section.DebugInfo->Spare[0] = 0;
|
||||
DeleteCriticalSection(&This->section);
|
||||
SysFreeString(This->url);
|
||||
heap_free(This->mime);
|
||||
heap_free(This->redirect_url);
|
||||
heap_free(This);
|
||||
free(This->mime);
|
||||
free(This->redirect_url);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -915,7 +912,7 @@ static HRESULT WINAPI Binding_Resume(IBinding *iface)
|
||||
static HRESULT WINAPI Binding_SetPriority(IBinding *iface, LONG nPriority)
|
||||
{
|
||||
Binding *This = impl_from_IBinding(iface);
|
||||
FIXME("(%p)->(%d)\n", This, nPriority);
|
||||
FIXME("(%p)->(%ld)\n", This, nPriority);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -1037,8 +1034,8 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink
|
||||
on_progress(This, 0, 0, BINDSTATUS_CONNECTING, szStatusText);
|
||||
break;
|
||||
case BINDSTATUS_REDIRECTING:
|
||||
heap_free(This->redirect_url);
|
||||
This->redirect_url = heap_strdupW(szStatusText);
|
||||
free(This->redirect_url);
|
||||
This->redirect_url = wcsdup(szStatusText);
|
||||
on_progress(This, 0, 0, BINDSTATUS_REDIRECTING, szStatusText);
|
||||
break;
|
||||
case BINDSTATUS_BEGINDOWNLOADDATA:
|
||||
@@ -1068,7 +1065,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink
|
||||
case BINDSTATUS_ACCEPTRANGES:
|
||||
break;
|
||||
default:
|
||||
FIXME("Unhandled status code %d\n", ulStatusCode);
|
||||
FIXME("Unhandled status code %ld\n", ulStatusCode);
|
||||
return E_NOTIMPL;
|
||||
};
|
||||
|
||||
@@ -1080,7 +1077,7 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
|
||||
FORMATETC formatetc = {0, NULL, 1, -1, TYMED_ISTREAM};
|
||||
BOOL sent_begindownloaddata = FALSE;
|
||||
|
||||
TRACE("(%p)->(%d %u %u)\n", This, bscf, progress, progress_max);
|
||||
TRACE("(%p)->(%ld %lu %lu)\n", This, bscf, progress, progress_max);
|
||||
|
||||
if(This->download_state == END_DOWNLOAD || (This->state & BINDING_ABORTED)) {
|
||||
read_protocol_data(This->stgmed_buf);
|
||||
@@ -1127,8 +1124,7 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
|
||||
HRESULT hres;
|
||||
|
||||
if(!(This->state & BINDING_LOCKED)) {
|
||||
HRESULT hres = IInternetProtocolEx_LockRequest(
|
||||
&This->protocol->IInternetProtocolEx_iface, 0);
|
||||
hres = IInternetProtocolEx_LockRequest(&This->protocol->IInternetProtocolEx_iface, 0);
|
||||
if(SUCCEEDED(hres))
|
||||
This->state |= BINDING_LOCKED;
|
||||
}
|
||||
@@ -1151,7 +1147,7 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
|
||||
BINDSTATUS_ENDDOWNLOADDATA, This->url);
|
||||
}
|
||||
|
||||
WARN("OnDataAvailable returned %x\n", hres);
|
||||
WARN("OnDataAvailable returned %lx\n", hres);
|
||||
stop_binding(This, hres, NULL);
|
||||
return;
|
||||
}
|
||||
@@ -1166,7 +1162,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa
|
||||
{
|
||||
Binding *This = impl_from_IInternetProtocolSink(iface);
|
||||
|
||||
TRACE("(%p)->(%d %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax);
|
||||
TRACE("(%p)->(%ld %lu %lu)\n", This, grfBSCF, ulProgress, ulProgressMax);
|
||||
|
||||
report_data(This, grfBSCF, ulProgress, ulProgressMax);
|
||||
return S_OK;
|
||||
@@ -1177,7 +1173,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *i
|
||||
{
|
||||
Binding *This = impl_from_IInternetProtocolSink(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult));
|
||||
TRACE("(%p)->(%08lx %ld %s)\n", This, hrResult, dwError, debugstr_w(szResult));
|
||||
|
||||
stop_binding(This, hrResult, szResult);
|
||||
|
||||
@@ -1235,17 +1231,15 @@ static HRESULT WINAPI InternetBindInfo_GetBindString(IInternetBindInfo *iface,
|
||||
{
|
||||
Binding *This = impl_from_IInternetBindInfo(iface);
|
||||
|
||||
TRACE("(%p)->(%d %p %d %p)\n", This, ulStringType, ppwzStr, cEl, pcElFetched);
|
||||
TRACE("(%p)->(%ld %p %ld %p)\n", This, ulStringType, ppwzStr, cEl, pcElFetched);
|
||||
|
||||
switch(ulStringType) {
|
||||
case BINDSTRING_ACCEPT_MIMES: {
|
||||
static const WCHAR wszMimes[] = {'*','/','*',0};
|
||||
|
||||
if(!ppwzStr || !pcElFetched)
|
||||
return E_INVALIDARG;
|
||||
|
||||
ppwzStr[0] = CoTaskMemAlloc(sizeof(wszMimes));
|
||||
memcpy(ppwzStr[0], wszMimes, sizeof(wszMimes));
|
||||
ppwzStr[0] = CoTaskMemAlloc(sizeof(L"*/*"));
|
||||
memcpy(ppwzStr[0], L"*/*", sizeof(L"*/*"));
|
||||
*pcElFetched = 1;
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1277,7 +1271,7 @@ static HRESULT WINAPI InternetBindInfo_GetBindString(IInternetBindInfo *iface,
|
||||
}
|
||||
}
|
||||
|
||||
FIXME("not supported string type %d\n", ulStringType);
|
||||
FIXME("not supported string type %ld\n", ulStringType);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -1319,7 +1313,7 @@ static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD
|
||||
IWinInetInfo *wininet_info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
|
||||
TRACE("(%p)->(%lx %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
|
||||
|
||||
hres = IInternetProtocolEx_QueryInterface(&This->protocol->IInternetProtocolEx_iface,
|
||||
&IID_IWinInetInfo, (void**)&wininet_info);
|
||||
@@ -1338,7 +1332,7 @@ static HRESULT WINAPI WinInetHttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD d
|
||||
IWinInetHttpInfo *http_info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
|
||||
TRACE("(%p)->(%lx %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
|
||||
|
||||
hres = IInternetProtocolEx_QueryInterface(&This->protocol->IInternetProtocolEx_iface,
|
||||
&IID_IWinInetHttpInfo, (void**)&http_info);
|
||||
@@ -1452,7 +1446,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB
|
||||
|
||||
URLMON_LockModule();
|
||||
|
||||
ret = heap_alloc_zero(sizeof(Binding));
|
||||
ret = calloc(1, sizeof(Binding));
|
||||
|
||||
ret->IBinding_iface.lpVtbl = &BindingVtbl;
|
||||
ret->IInternetProtocolSink_iface.lpVtbl = &InternetProtocolSinkVtbl;
|
||||
@@ -1480,7 +1474,7 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB
|
||||
|
||||
ret->bindinfo.cbSize = sizeof(BINDINFO);
|
||||
|
||||
InitializeCriticalSection(&ret->section);
|
||||
InitializeCriticalSectionEx(&ret->section, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
|
||||
ret->section.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": Binding.section");
|
||||
|
||||
hres = get_callback(pbc, &ret->callback);
|
||||
@@ -1507,12 +1501,12 @@ static HRESULT Binding_Create(IMoniker *mon, Binding *binding_ctx, IUri *uri, IB
|
||||
|
||||
hres = IBindStatusCallback_GetBindInfo(ret->callback, &ret->bindf, &ret->bindinfo);
|
||||
if(FAILED(hres)) {
|
||||
WARN("GetBindInfo failed: %08x\n", hres);
|
||||
WARN("GetBindInfo failed: %08lx\n", hres);
|
||||
IBinding_Release(&ret->IBinding_iface);
|
||||
return hres;
|
||||
}
|
||||
|
||||
TRACE("bindf %08x\n", ret->bindf);
|
||||
TRACE("bindf %08lx\n", ret->bindf);
|
||||
dump_BINDINFO(&ret->bindinfo);
|
||||
|
||||
ret->bindf |= BINDF_FROMURLMON;
|
||||
@@ -1570,7 +1564,7 @@ static HRESULT start_binding(IMoniker *mon, Binding *binding_ctx, IUri *uri, IBi
|
||||
|
||||
hres = IBindStatusCallback_OnStartBinding(binding->callback, 0, &binding->IBinding_iface);
|
||||
if(FAILED(hres)) {
|
||||
WARN("OnStartBinding failed: %08x\n", hres);
|
||||
WARN("OnStartBinding failed: %08lx\n", hres);
|
||||
if(hres != E_ABORT && hres != E_NOTIMPL)
|
||||
hres = INET_E_DOWNLOAD_FAILURE;
|
||||
|
||||
@@ -1591,7 +1585,7 @@ static HRESULT start_binding(IMoniker *mon, Binding *binding_ctx, IUri *uri, IBi
|
||||
&binding->IInternetProtocolSink_iface, &binding->IInternetBindInfo_iface,
|
||||
PI_APARTMENTTHREADED|PI_MIMEVERIFICATION, 0);
|
||||
|
||||
TRACE("start ret %08x\n", hres);
|
||||
TRACE("start ret %08lx\n", hres);
|
||||
|
||||
if(FAILED(hres) && hres != E_PENDING) {
|
||||
stop_binding(binding, hres, NULL);
|
||||
|
||||
+87
-76
@@ -83,10 +83,6 @@ static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
|
||||
return DefWindowProcW(hwnd, msg, wParam, lParam);
|
||||
}
|
||||
|
||||
static const WCHAR wszURLMonikerNotificationWindow[] =
|
||||
{'U','R','L',' ','M','o','n','i','k','e','r',' ',
|
||||
'N','o','t','i','f','i','c','a','t','i','o','n',' ','W','i','n','d','o','w',0};
|
||||
|
||||
static ATOM notif_wnd_class;
|
||||
|
||||
static BOOL WINAPI register_notif_wnd_class(INIT_ONCE *once, void *param, void **context)
|
||||
@@ -94,7 +90,7 @@ static BOOL WINAPI register_notif_wnd_class(INIT_ONCE *once, void *param, void *
|
||||
static WNDCLASSEXW wndclass = {
|
||||
sizeof(wndclass), 0, notif_wnd_proc, 0, 0,
|
||||
NULL, NULL, NULL, NULL, NULL,
|
||||
wszURLMonikerNotificationWindow, NULL
|
||||
L"URL Moniker Notification Window", NULL
|
||||
};
|
||||
|
||||
wndclass.hInstance = hProxyDll;
|
||||
@@ -128,7 +124,7 @@ HWND get_notif_hwnd(void)
|
||||
return NULL;
|
||||
|
||||
tls_data->notif_hwnd = CreateWindowExW(0, MAKEINTRESOURCEW(notif_wnd_class),
|
||||
wszURLMonikerNotificationWindow, 0, 0, 0, 0, 0, HWND_MESSAGE,
|
||||
L"URL Moniker Notification Window", 0, 0, 0, 0, 0, HWND_MESSAGE,
|
||||
NULL, hProxyDll, NULL);
|
||||
if(tls_data->notif_hwnd)
|
||||
tls_data->notif_hwnd_cnt++;
|
||||
@@ -228,8 +224,8 @@ static void mime_available(BindProtocol *This, LPCWSTR mime, BOOL verified)
|
||||
IInternetProtocol *mime_filter;
|
||||
HRESULT hres;
|
||||
|
||||
heap_free(This->mime);
|
||||
This->mime = heap_strdupW(mime);
|
||||
free(This->mime);
|
||||
This->mime = wcsdup(mime);
|
||||
|
||||
if(This->protocol_handler==&This->default_protocol_handler.IInternetProtocol_iface
|
||||
&& (mime_filter = get_mime_filter(mime))) {
|
||||
@@ -238,7 +234,7 @@ static void mime_available(BindProtocol *This, LPCWSTR mime, BOOL verified)
|
||||
hres = handle_mime_filter(This, mime_filter);
|
||||
IInternetProtocol_Release(mime_filter);
|
||||
if(FAILED(hres))
|
||||
FIXME("MIME filter failed: %08x\n", hres);
|
||||
FIXME("MIME filter failed: %08lx\n", hres);
|
||||
}
|
||||
|
||||
if(This->reported_mime || verified || !(This->pi & PI_MIMEVERIFICATION)) {
|
||||
@@ -286,7 +282,7 @@ static HRESULT WINAPI BindProtocol_QueryInterface(IInternetProtocolEx *iface, RE
|
||||
}else if(This->protocol_unk) {
|
||||
HRESULT hres;
|
||||
hres = IUnknown_QueryInterface(This->protocol_unk, riid, ppv);
|
||||
TRACE("(%p) aggregated handler returned %08x for %s\n", This, hres, debugstr_guid(riid));
|
||||
TRACE("(%p) aggregated handler returned %08lx for %s\n", This, hres, debugstr_guid(riid));
|
||||
return hres;
|
||||
}else {
|
||||
WARN("not supported interface %s\n", debugstr_guid(riid));
|
||||
@@ -303,7 +299,7 @@ static ULONG WINAPI BindProtocol_AddRef(IInternetProtocolEx *iface)
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
@@ -333,7 +329,7 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface)
|
||||
BindProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
release_protocol_handler(This);
|
||||
@@ -352,8 +348,8 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface)
|
||||
This->section.DebugInfo->Spare[0] = 0;
|
||||
DeleteCriticalSection(&This->section);
|
||||
|
||||
heap_free(This->mime);
|
||||
heap_free(This);
|
||||
free(This->mime);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -369,7 +365,7 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU
|
||||
IUri *uri;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08lx %Ix)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
hres = CreateUri(szUrl, Uri_CREATE_FILE_USE_DOS_PATH, 0, &uri);
|
||||
@@ -397,7 +393,7 @@ static HRESULT WINAPI BindProtocol_Abort(IInternetProtocolEx *iface, HRESULT hrR
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
|
||||
TRACE("(%p)->(%08lx %08lx)\n", This, hrReason, dwOptions);
|
||||
|
||||
return IInternetProtocol_Abort(This->protocol_handler, hrReason, dwOptions);
|
||||
}
|
||||
@@ -406,7 +402,7 @@ static HRESULT WINAPI BindProtocol_Terminate(IInternetProtocolEx *iface, DWORD d
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return IInternetProtocol_Terminate(This->protocol_handler, dwOptions);
|
||||
}
|
||||
@@ -430,7 +426,7 @@ static HRESULT WINAPI BindProtocol_Read(IInternetProtocolEx *iface, void *pv,
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
|
||||
TRACE("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead);
|
||||
|
||||
if(pcbRead)
|
||||
*pcbRead = 0;
|
||||
@@ -441,7 +437,7 @@ static HRESULT WINAPI BindProtocol_Seek(IInternetProtocolEx *iface, LARGE_INTEGE
|
||||
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
FIXME("(%p)->(%ld %ld %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -449,7 +445,7 @@ static HRESULT WINAPI BindProtocol_LockRequest(IInternetProtocolEx *iface, DWORD
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return IInternetProtocol_LockRequest(This->protocol_handler, dwOptions);
|
||||
}
|
||||
@@ -477,7 +473,7 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
|
||||
LPOLESTR clsid_str;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p %p %p %08x %p)\n", This, pUri, pOIProtSink, pOIBindInfo, grfPI, dwReserved);
|
||||
TRACE("(%p)->(%p %p %p %08lx %p)\n", This, pUri, pOIProtSink, pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
if(!pUri || !pOIProtSink || !pOIBindInfo)
|
||||
return E_INVALIDARG;
|
||||
@@ -674,7 +670,7 @@ static HRESULT WINAPI ProtocolHandler_Continue(IInternetProtocol *iface, PROTOCO
|
||||
|
||||
hres = IInternetProtocol_Continue(protocol ? protocol : This->protocol, pProtocolData);
|
||||
|
||||
heap_free(pProtocolData);
|
||||
free(pProtocolData);
|
||||
if(protocol)
|
||||
IInternetProtocol_Release(protocol);
|
||||
return hres;
|
||||
@@ -685,7 +681,7 @@ static HRESULT WINAPI ProtocolHandler_Abort(IInternetProtocol *iface, HRESULT hr
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
|
||||
TRACE("(%p)->(%08lx %08lx)\n", This, hrReason, dwOptions);
|
||||
|
||||
if(This->protocol && !This->reported_result)
|
||||
return IInternetProtocol_Abort(This->protocol, hrReason, dwOptions);
|
||||
@@ -697,7 +693,7 @@ static HRESULT WINAPI ProtocolHandler_Terminate(IInternetProtocol *iface, DWORD
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
if(!This->reported_result)
|
||||
return E_FAIL;
|
||||
@@ -751,14 +747,14 @@ static HRESULT WINAPI ProtocolHandler_Read(IInternetProtocol *iface, void *pv,
|
||||
ULONG read = 0;
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
|
||||
TRACE("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead);
|
||||
|
||||
if(This->buf_size) {
|
||||
read = min(cb, This->buf_size);
|
||||
memcpy(pv, This->buf, read);
|
||||
|
||||
if(read == This->buf_size) {
|
||||
heap_free(This->buf);
|
||||
free(This->buf);
|
||||
This->buf = NULL;
|
||||
}else {
|
||||
memmove(This->buf, This->buf+cb, This->buf_size-cb);
|
||||
@@ -800,7 +796,7 @@ static HRESULT WINAPI ProtocolHandler_Seek(IInternetProtocol *iface, LARGE_INTEG
|
||||
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
FIXME("(%p)->(%ld %ld %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -808,7 +804,7 @@ static HRESULT WINAPI ProtocolHandler_LockRequest(IInternetProtocol *iface, DWOR
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return IInternetProtocol_LockRequest(This->protocol, dwOptions);
|
||||
}
|
||||
@@ -819,7 +815,9 @@ static HRESULT WINAPI ProtocolHandler_UnlockRequest(IInternetProtocol *iface)
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
return IInternetProtocol_UnlockRequest(This->protocol);
|
||||
if (This->protocol)
|
||||
return IInternetProtocol_UnlockRequest(This->protocol);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IInternetProtocolVtbl InternetProtocolHandlerVtbl = {
|
||||
@@ -913,51 +911,37 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportProgress(IInternetProtocolSink *
|
||||
break;
|
||||
|
||||
default:
|
||||
FIXME("unsupported ulStatusCode %u\n", status_code);
|
||||
FIXME("unsupported ulStatusCode %lu\n", status_code);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ProtocolSinkHandler_ReportData(IInternetProtocolSink *iface,
|
||||
DWORD bscf, ULONG progress, ULONG progress_max)
|
||||
static HRESULT report_data(BindProtocol *This)
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolSinkHandler(iface);
|
||||
|
||||
TRACE("(%p)->(%x %u %u)\n", This, bscf, progress, progress_max);
|
||||
|
||||
This->bscf = bscf;
|
||||
This->progress = progress;
|
||||
This->progress_max = progress_max;
|
||||
|
||||
if(!This->protocol_sink)
|
||||
return S_OK;
|
||||
DWORD bscf = This->bscf;
|
||||
HRESULT hres;
|
||||
|
||||
if((This->pi & PI_MIMEVERIFICATION) && !This->reported_mime) {
|
||||
BYTE buf[BUFFER_SIZE];
|
||||
DWORD read = 0;
|
||||
LPWSTR mime;
|
||||
HRESULT hres;
|
||||
|
||||
do {
|
||||
read = 0;
|
||||
if(is_apartment_thread(This))
|
||||
This->continue_call++;
|
||||
hres = IInternetProtocol_Read(This->protocol, buf,
|
||||
sizeof(buf)-This->buf_size, &read);
|
||||
if(is_apartment_thread(This))
|
||||
This->continue_call--;
|
||||
if(FAILED(hres) && hres != E_PENDING)
|
||||
return hres;
|
||||
|
||||
if(!This->buf) {
|
||||
This->buf = heap_alloc(BUFFER_SIZE);
|
||||
This->buf = malloc(BUFFER_SIZE);
|
||||
if(!This->buf)
|
||||
return E_OUTOFMEMORY;
|
||||
}else if(read + This->buf_size > BUFFER_SIZE) {
|
||||
BYTE *tmp;
|
||||
|
||||
tmp = heap_realloc(This->buf, read+This->buf_size);
|
||||
tmp = realloc(This->buf, read + This->buf_size);
|
||||
if(!tmp)
|
||||
return E_OUTOFMEMORY;
|
||||
This->buf = tmp;
|
||||
@@ -987,8 +971,8 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportData(IInternetProtocolSink *ifac
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
heap_free(This->mime);
|
||||
This->mime = heap_strdupW(mime);
|
||||
free(This->mime);
|
||||
This->mime = wcsdup(mime);
|
||||
CoTaskMemFree(mime);
|
||||
This->reported_mime = TRUE;
|
||||
if(This->protocol_sink)
|
||||
@@ -999,7 +983,34 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportData(IInternetProtocolSink *ifac
|
||||
if(!This->protocol_sink)
|
||||
return S_OK;
|
||||
|
||||
return IInternetProtocolSink_ReportData(This->protocol_sink, bscf, progress, progress_max);
|
||||
return IInternetProtocolSink_ReportData(This->protocol_sink, bscf, This->progress, This->progress_max);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ProtocolSinkHandler_ReportData(IInternetProtocolSink *iface,
|
||||
DWORD bscf, ULONG progress, ULONG progress_max)
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolSinkHandler(iface);
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%lx %lu %lu)\n", This, bscf, progress, progress_max);
|
||||
|
||||
This->bscf = bscf;
|
||||
This->progress = progress;
|
||||
This->progress_max = progress_max;
|
||||
|
||||
if(!This->protocol_sink)
|
||||
return S_OK;
|
||||
|
||||
if(is_apartment_thread(This))
|
||||
This->continue_call++;
|
||||
|
||||
hres = report_data(This);
|
||||
|
||||
if(is_apartment_thread(This)) {
|
||||
This->continue_call--;
|
||||
process_tasks(This);
|
||||
}
|
||||
return hres;
|
||||
}
|
||||
|
||||
static HRESULT handle_redirect(BindProtocol *This, const WCHAR *url)
|
||||
@@ -1030,7 +1041,7 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportResult(IInternetProtocolSink *if
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolSinkHandler(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult));
|
||||
TRACE("(%p)->(%08lx %ld %s)\n", This, hrResult, dwError, debugstr_w(szResult));
|
||||
|
||||
if(hrResult == INET_E_REDIRECT_FAILED) {
|
||||
hrResult = handle_redirect(This, szResult);
|
||||
@@ -1088,7 +1099,7 @@ static HRESULT WINAPI BindInfo_GetBindInfo(IInternetBindInfo *iface,
|
||||
|
||||
hres = IInternetBindInfo_GetBindInfo(This->bind_info, grfBINDF, pbindinfo);
|
||||
if(FAILED(hres)) {
|
||||
WARN("GetBindInfo failed: %08x\n", hres);
|
||||
WARN("GetBindInfo failed: %08lx\n", hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
@@ -1112,7 +1123,7 @@ static HRESULT WINAPI BindInfo_GetBindString(IInternetBindInfo *iface,
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetBindInfo(iface);
|
||||
|
||||
TRACE("(%p)->(%d %p %d %p)\n", This, ulStringType, ppwzStr, cEl, pcElFetched);
|
||||
TRACE("(%p)->(%ld %p %ld %p)\n", This, ulStringType, ppwzStr, cEl, pcElFetched);
|
||||
|
||||
return IInternetBindInfo_GetBindString(This->bind_info, ulStringType, ppwzStr, cEl, pcElFetched);
|
||||
}
|
||||
@@ -1153,7 +1164,7 @@ static HRESULT WINAPI InternetPriority_SetPriority(IInternetPriority *iface, LON
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetPriority(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, nPriority);
|
||||
TRACE("(%p)->(%ld)\n", This, nPriority);
|
||||
|
||||
This->priority = nPriority;
|
||||
return S_OK;
|
||||
@@ -1213,7 +1224,7 @@ static void switch_proc(BindProtocol *bind, task_header_t *t)
|
||||
|
||||
IInternetProtocol_Continue(bind->protocol_handler, task->data);
|
||||
|
||||
heap_free(task);
|
||||
free(task);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BPInternetProtocolSink_Switch(IInternetProtocolSink *iface,
|
||||
@@ -1224,10 +1235,10 @@ static HRESULT WINAPI BPInternetProtocolSink_Switch(IInternetProtocolSink *iface
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pProtocolData);
|
||||
|
||||
TRACE("flags %x state %x data %p cb %u\n", pProtocolData->grfFlags, pProtocolData->dwState,
|
||||
TRACE("flags %lx state %lx data %p cb %lu\n", pProtocolData->grfFlags, pProtocolData->dwState,
|
||||
pProtocolData->pData, pProtocolData->cbData);
|
||||
|
||||
data = heap_alloc(sizeof(PROTOCOLDATA));
|
||||
data = malloc(sizeof(PROTOCOLDATA));
|
||||
if(!data)
|
||||
return E_OUTOFMEMORY;
|
||||
memcpy(data, pProtocolData, sizeof(PROTOCOLDATA));
|
||||
@@ -1236,10 +1247,10 @@ static HRESULT WINAPI BPInternetProtocolSink_Switch(IInternetProtocolSink *iface
|
||||
|| !do_direct_notif(This)) {
|
||||
switch_task_t *task;
|
||||
|
||||
task = heap_alloc(sizeof(switch_task_t));
|
||||
task = malloc(sizeof(switch_task_t));
|
||||
if(!task)
|
||||
{
|
||||
heap_free(data);
|
||||
free(data);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@@ -1265,8 +1276,8 @@ static void on_progress_proc(BindProtocol *This, task_header_t *t)
|
||||
|
||||
IInternetProtocolSink_ReportProgress(This->protocol_sink_handler, task->status_code, task->status_text);
|
||||
|
||||
heap_free(task->status_text);
|
||||
heap_free(task);
|
||||
free(task->status_text);
|
||||
free(task);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BPInternetProtocolSink_ReportProgress(IInternetProtocolSink *iface,
|
||||
@@ -1274,17 +1285,17 @@ static HRESULT WINAPI BPInternetProtocolSink_ReportProgress(IInternetProtocolSin
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolSink(iface);
|
||||
|
||||
TRACE("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText));
|
||||
TRACE("(%p)->(%lu %s)\n", This, ulStatusCode, debugstr_w(szStatusText));
|
||||
|
||||
if(do_direct_notif(This)) {
|
||||
IInternetProtocolSink_ReportProgress(This->protocol_sink_handler, ulStatusCode, szStatusText);
|
||||
}else {
|
||||
on_progress_task_t *task;
|
||||
|
||||
task = heap_alloc(sizeof(on_progress_task_t));
|
||||
task = malloc(sizeof(on_progress_task_t));
|
||||
|
||||
task->status_code = ulStatusCode;
|
||||
task->status_text = heap_strdupW(szStatusText);
|
||||
task->status_text = wcsdup(szStatusText);
|
||||
|
||||
push_task(This, &task->header, on_progress_proc);
|
||||
}
|
||||
@@ -1306,7 +1317,7 @@ static void report_data_proc(BindProtocol *This, task_header_t *t)
|
||||
IInternetProtocolSink_ReportData(This->protocol_sink_handler,
|
||||
task->bscf, task->progress, task->progress_max);
|
||||
|
||||
heap_free(task);
|
||||
free(task);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BPInternetProtocolSink_ReportData(IInternetProtocolSink *iface,
|
||||
@@ -1314,7 +1325,7 @@ static HRESULT WINAPI BPInternetProtocolSink_ReportData(IInternetProtocolSink *i
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolSink(iface);
|
||||
|
||||
TRACE("(%p)->(%x %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax);
|
||||
TRACE("(%p)->(%lx %lu %lu)\n", This, grfBSCF, ulProgress, ulProgressMax);
|
||||
|
||||
if(!This->protocol_sink)
|
||||
return S_OK;
|
||||
@@ -1322,7 +1333,7 @@ static HRESULT WINAPI BPInternetProtocolSink_ReportData(IInternetProtocolSink *i
|
||||
if(!do_direct_notif(This)) {
|
||||
report_data_task_t *task;
|
||||
|
||||
task = heap_alloc(sizeof(report_data_task_t));
|
||||
task = malloc(sizeof(report_data_task_t));
|
||||
if(!task)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -1352,8 +1363,8 @@ static void report_result_proc(BindProtocol *This, task_header_t *t)
|
||||
|
||||
IInternetProtocolSink_ReportResult(This->protocol_sink_handler, task->hres, task->err, task->str);
|
||||
|
||||
heap_free(task->str);
|
||||
heap_free(task);
|
||||
free(task->str);
|
||||
free(task);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI BPInternetProtocolSink_ReportResult(IInternetProtocolSink *iface,
|
||||
@@ -1361,7 +1372,7 @@ static HRESULT WINAPI BPInternetProtocolSink_ReportResult(IInternetProtocolSink
|
||||
{
|
||||
BindProtocol *This = impl_from_IInternetProtocolSink(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult));
|
||||
TRACE("(%p)->(%08lx %ld %s)\n", This, hrResult, dwError, debugstr_w(szResult));
|
||||
|
||||
if(!This->protocol_sink)
|
||||
return E_FAIL;
|
||||
@@ -1370,13 +1381,13 @@ static HRESULT WINAPI BPInternetProtocolSink_ReportResult(IInternetProtocolSink
|
||||
if(!do_direct_notif(This)) {
|
||||
report_result_task_t *task;
|
||||
|
||||
task = heap_alloc(sizeof(report_result_task_t));
|
||||
task = malloc(sizeof(report_result_task_t));
|
||||
if(!task)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
task->hres = hrResult;
|
||||
task->err = dwError;
|
||||
task->str = heap_strdupW(szResult);
|
||||
task->str = wcsdup(szResult);
|
||||
|
||||
push_task(This, &task->header, report_result_proc);
|
||||
return S_OK;
|
||||
@@ -1441,7 +1452,7 @@ static const IServiceProviderVtbl ServiceProviderVtbl = {
|
||||
|
||||
HRESULT create_binding_protocol(BindProtocol **protocol)
|
||||
{
|
||||
BindProtocol *ret = heap_alloc_zero(sizeof(BindProtocol));
|
||||
BindProtocol *ret = calloc(1, sizeof(BindProtocol));
|
||||
|
||||
ret->IInternetProtocolEx_iface.lpVtbl = &BindProtocolVtbl;
|
||||
ret->IInternetBindInfo_iface.lpVtbl = &InternetBindInfoVtbl;
|
||||
@@ -1457,7 +1468,7 @@ HRESULT create_binding_protocol(BindProtocol **protocol)
|
||||
ret->notif_hwnd = get_notif_hwnd();
|
||||
ret->protocol_handler = &ret->default_protocol_handler.IInternetProtocol_iface;
|
||||
ret->protocol_sink_handler = &ret->default_protocol_handler.IInternetProtocolSink_iface;
|
||||
InitializeCriticalSection(&ret->section);
|
||||
InitializeCriticalSectionEx(&ret->section, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
|
||||
ret->section.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BindProtocol.section");
|
||||
|
||||
URLMON_LockModule();
|
||||
|
||||
+22
-22
@@ -79,7 +79,7 @@ static ULONG WINAPI DownloadBSC_AddRef(IBindStatusCallback *iface)
|
||||
DownloadBSC *This = impl_from_IBindStatusCallback(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref = %d\n", This, ref);
|
||||
TRACE("(%p) ref = %ld\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
@@ -89,16 +89,16 @@ static ULONG WINAPI DownloadBSC_Release(IBindStatusCallback *iface)
|
||||
DownloadBSC *This = impl_from_IBindStatusCallback(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref = %d\n", This, ref);
|
||||
TRACE("(%p) ref = %ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
if(This->callback)
|
||||
IBindStatusCallback_Release(This->callback);
|
||||
if(This->binding)
|
||||
IBinding_Release(This->binding);
|
||||
heap_free(This->file_name);
|
||||
heap_free(This->cache_file);
|
||||
heap_free(This);
|
||||
free(This->file_name);
|
||||
free(This->cache_file);
|
||||
free(This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
@@ -110,7 +110,7 @@ static HRESULT WINAPI DownloadBSC_OnStartBinding(IBindStatusCallback *iface,
|
||||
DownloadBSC *This = impl_from_IBindStatusCallback(iface);
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
TRACE("(%p)->(%d %p)\n", This, dwReserved, pbind);
|
||||
TRACE("(%p)->(%ld %p)\n", This, dwReserved, pbind);
|
||||
|
||||
if(This->callback) {
|
||||
hres = IBindStatusCallback_OnStartBinding(This->callback, dwReserved, pbind);
|
||||
@@ -133,7 +133,7 @@ static HRESULT WINAPI DownloadBSC_GetPriority(IBindStatusCallback *iface, LONG *
|
||||
static HRESULT WINAPI DownloadBSC_OnLowResource(IBindStatusCallback *iface, DWORD reserved)
|
||||
{
|
||||
DownloadBSC *This = impl_from_IBindStatusCallback(iface);
|
||||
FIXME("(%p)->(%d)\n", This, reserved);
|
||||
FIXME("(%p)->(%ld)\n", This, reserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ static HRESULT WINAPI DownloadBSC_OnProgress(IBindStatusCallback *iface, ULONG u
|
||||
DownloadBSC *This = impl_from_IBindStatusCallback(iface);
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
TRACE("%p)->(%u %u %u %s)\n", This, ulProgress, ulProgressMax, ulStatusCode,
|
||||
TRACE("%p)->(%lu %lu %lu %s)\n", This, ulProgress, ulProgressMax, ulStatusCode,
|
||||
debugstr_w(szStatusText));
|
||||
|
||||
switch(ulStatusCode) {
|
||||
@@ -176,14 +176,14 @@ static HRESULT WINAPI DownloadBSC_OnProgress(IBindStatusCallback *iface, ULONG u
|
||||
|
||||
case BINDSTATUS_CACHEFILENAMEAVAILABLE:
|
||||
hres = on_progress(This, ulProgress, ulProgressMax, ulStatusCode, szStatusText);
|
||||
This->cache_file = heap_strdupW(szStatusText);
|
||||
This->cache_file = wcsdup(szStatusText);
|
||||
break;
|
||||
|
||||
case BINDSTATUS_FINDINGRESOURCE: /* FIXME */
|
||||
break;
|
||||
|
||||
default:
|
||||
FIXME("Unsupported status %u\n", ulStatusCode);
|
||||
FIXME("Unsupported status %lu\n", ulStatusCode);
|
||||
}
|
||||
|
||||
return hres;
|
||||
@@ -195,7 +195,7 @@ static HRESULT WINAPI DownloadBSC_OnStopBinding(IBindStatusCallback *iface,
|
||||
DownloadBSC *This = impl_from_IBindStatusCallback(iface);
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
TRACE("(%p)->(%08x %s)\n", This, hresult, debugstr_w(szError));
|
||||
TRACE("(%p)->(%08lx %s)\n", This, hresult, debugstr_w(szError));
|
||||
|
||||
if(This->file_name) {
|
||||
if(This->cache_file) {
|
||||
@@ -203,7 +203,7 @@ static HRESULT WINAPI DownloadBSC_OnStopBinding(IBindStatusCallback *iface,
|
||||
|
||||
b = CopyFileW(This->cache_file, This->file_name, FALSE);
|
||||
if(!b)
|
||||
FIXME("CopyFile failed: %u\n", GetLastError());
|
||||
FIXME("CopyFile failed: %lu\n", GetLastError());
|
||||
}else {
|
||||
FIXME("No cache file\n");
|
||||
}
|
||||
@@ -251,7 +251,7 @@ static HRESULT WINAPI DownloadBSC_OnDataAvailable(IBindStatusCallback *iface,
|
||||
{
|
||||
DownloadBSC *This = impl_from_IBindStatusCallback(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %d %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
|
||||
TRACE("(%p)->(%08lx %ld %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -334,7 +334,7 @@ static HRESULT DownloadBSC_Create(IBindStatusCallback *callback, LPCWSTR file_na
|
||||
{
|
||||
DownloadBSC *ret;
|
||||
|
||||
ret = heap_alloc_zero(sizeof(*ret));
|
||||
ret = calloc(1, sizeof(*ret));
|
||||
if(!ret)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -343,9 +343,9 @@ static HRESULT DownloadBSC_Create(IBindStatusCallback *callback, LPCWSTR file_na
|
||||
ret->ref = 1;
|
||||
|
||||
if(file_name) {
|
||||
ret->file_name = heap_strdupW(file_name);
|
||||
ret->file_name = wcsdup(file_name);
|
||||
if(!ret->file_name) {
|
||||
heap_free(ret);
|
||||
free(ret);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
}
|
||||
@@ -433,7 +433,7 @@ HRESULT WINAPI URLDownloadToFileW(LPUNKNOWN pCaller, LPCWSTR szURL, LPCWSTR szFi
|
||||
IBindCtx *bindctx;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %s %s %d %p)\n", pCaller, debugstr_w(szURL), debugstr_w(szFileName), dwReserved, lpfnCB);
|
||||
TRACE("(%p %s %s %ld %p)\n", pCaller, debugstr_w(szURL), debugstr_w(szFileName), dwReserved, lpfnCB);
|
||||
|
||||
if(pCaller)
|
||||
FIXME("pCaller not supported\n");
|
||||
@@ -485,15 +485,15 @@ HRESULT WINAPI URLDownloadToFileA(LPUNKNOWN pCaller, LPCSTR szURL, LPCSTR szFile
|
||||
LPWSTR urlW, file_nameW;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %s %s %d %p)\n", pCaller, debugstr_a(szURL), debugstr_a(szFileName), dwReserved, lpfnCB);
|
||||
TRACE("(%p %s %s %ld %p)\n", pCaller, debugstr_a(szURL), debugstr_a(szFileName), dwReserved, lpfnCB);
|
||||
|
||||
urlW = heap_strdupAtoW(szURL);
|
||||
file_nameW = heap_strdupAtoW(szFileName);
|
||||
urlW = strdupAtoW(szURL);
|
||||
file_nameW = strdupAtoW(szFileName);
|
||||
|
||||
hres = URLDownloadToFileW(pCaller, urlW, file_nameW, dwReserved, lpfnCB);
|
||||
|
||||
heap_free(urlW);
|
||||
heap_free(file_nameW);
|
||||
free(urlW);
|
||||
free(file_nameW);
|
||||
|
||||
return hres;
|
||||
}
|
||||
|
||||
+15
-16
@@ -88,7 +88,7 @@ static ULONG WINAPI FileProtocolUnk_AddRef(IUnknown *iface)
|
||||
{
|
||||
FileProtocol *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
@@ -97,12 +97,12 @@ static ULONG WINAPI FileProtocolUnk_Release(IUnknown *iface)
|
||||
FileProtocol *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
if(This->file != INVALID_HANDLE_VALUE)
|
||||
CloseHandle(This->file);
|
||||
heap_free(This);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -145,7 +145,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU
|
||||
IUri *uri;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08lx %Ix)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
hres = CreateUri(szUrl, Uri_CREATE_FILE_USE_DOS_PATH, 0, &uri);
|
||||
@@ -170,7 +170,7 @@ static HRESULT WINAPI FileProtocol_Abort(IInternetProtocolEx *iface, HRESULT hrR
|
||||
DWORD dwOptions)
|
||||
{
|
||||
FileProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
|
||||
FIXME("(%p)->(%08lx %08lx)\n", This, hrReason, dwOptions);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ static HRESULT WINAPI FileProtocol_Terminate(IInternetProtocolEx *iface, DWORD d
|
||||
{
|
||||
FileProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -203,7 +203,7 @@ static HRESULT WINAPI FileProtocol_Read(IInternetProtocolEx *iface, void *pv,
|
||||
FileProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
DWORD read = 0;
|
||||
|
||||
TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
|
||||
TRACE("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead);
|
||||
|
||||
if (pcbRead)
|
||||
*pcbRead = 0;
|
||||
@@ -224,7 +224,7 @@ static HRESULT WINAPI FileProtocol_Seek(IInternetProtocolEx *iface, LARGE_INTEGE
|
||||
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||
{
|
||||
FileProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
FIXME("(%p)->(%ld %ld %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ static HRESULT WINAPI FileProtocol_LockRequest(IInternetProtocolEx *iface, DWORD
|
||||
{
|
||||
FileProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -264,11 +264,10 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
|
||||
DWORD grfBINDF = 0;
|
||||
DWORD scheme, size;
|
||||
LPWSTR mime = NULL;
|
||||
WCHAR null_char = 0;
|
||||
BSTR ext;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p %p %p %08x %p)\n", This, pUri, pOIProtSink,
|
||||
TRACE("(%p)->(%p %p %p %08lx %p)\n", This, pUri, pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
if(!pUri)
|
||||
@@ -285,7 +284,7 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
|
||||
bindinfo.cbSize = sizeof(BINDINFO);
|
||||
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &grfBINDF, &bindinfo);
|
||||
if(FAILED(hres)) {
|
||||
WARN("GetBindInfo failed: %08x\n", hres);
|
||||
WARN("GetBindInfo failed: %08lx\n", hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
@@ -301,12 +300,12 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, &null_char);
|
||||
IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, L"");
|
||||
|
||||
size = 0;
|
||||
hres = CoInternetParseIUri(pUri, PARSE_PATH_FROM_URL, 0, path, ARRAY_SIZE(path), &size, 0);
|
||||
if(FAILED(hres)) {
|
||||
WARN("CoInternetParseIUri failed: %08x\n", hres);
|
||||
WARN("CoInternetParseIUri failed: %08lx\n", hres);
|
||||
return report_result(pOIProtSink, hres, 0);
|
||||
}
|
||||
|
||||
@@ -394,7 +393,7 @@ static HRESULT WINAPI FilePriority_SetPriority(IInternetPriority *iface, LONG nP
|
||||
{
|
||||
FileProtocol *This = impl_from_IInternetPriority(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, nPriority);
|
||||
TRACE("(%p)->(%ld)\n", This, nPriority);
|
||||
|
||||
This->priority = nPriority;
|
||||
return S_OK;
|
||||
@@ -426,7 +425,7 @@ HRESULT FileProtocol_Construct(IUnknown *outer, LPVOID *ppobj)
|
||||
|
||||
URLMON_LockModule();
|
||||
|
||||
ret = heap_alloc(sizeof(FileProtocol));
|
||||
ret = malloc(sizeof(FileProtocol));
|
||||
|
||||
ret->IUnknown_inner.lpVtbl = &FileProtocolUnkVtbl;
|
||||
ret->IInternetProtocolEx_iface.lpVtbl = &FileProtocolExVtbl;
|
||||
|
||||
+10
-10
@@ -21,7 +21,7 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||
|
||||
static WCHAR wszEnumFORMATETC[] = {'_','E','n','u','m','F','O','R','M','A','T','E','T','C','_',0};
|
||||
static WCHAR wszEnumFORMATETC[] = L"_EnumFORMATETC_";
|
||||
|
||||
typedef struct {
|
||||
IEnumFORMATETC IEnumFORMATETC_iface;
|
||||
@@ -62,7 +62,7 @@ static ULONG WINAPI EnumFORMATETC_AddRef(IEnumFORMATETC *iface)
|
||||
{
|
||||
EnumFORMATETC *This = impl_from_IEnumFORMATETC(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
@@ -71,11 +71,11 @@ static ULONG WINAPI EnumFORMATETC_Release(IEnumFORMATETC *iface)
|
||||
EnumFORMATETC *This = impl_from_IEnumFORMATETC(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
heap_free(This->fetc);
|
||||
heap_free(This);
|
||||
free(This->fetc);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -89,7 +89,7 @@ static HRESULT WINAPI EnumFORMATETC_Next(IEnumFORMATETC *iface, ULONG celt,
|
||||
EnumFORMATETC *This = impl_from_IEnumFORMATETC(iface);
|
||||
ULONG cnt;
|
||||
|
||||
TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched);
|
||||
TRACE("(%p)->(%ld %p %p)\n", This, celt, rgelt, pceltFetched);
|
||||
|
||||
if(!rgelt)
|
||||
return E_INVALIDARG;
|
||||
@@ -115,7 +115,7 @@ static HRESULT WINAPI EnumFORMATETC_Skip(IEnumFORMATETC *iface, ULONG celt)
|
||||
{
|
||||
EnumFORMATETC *This = impl_from_IEnumFORMATETC(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, celt);
|
||||
TRACE("(%p)->(%ld)\n", This, celt);
|
||||
|
||||
This->it += celt;
|
||||
return This->it > This->fetc_cnt ? S_FALSE : S_OK;
|
||||
@@ -156,7 +156,7 @@ static const IEnumFORMATETCVtbl EnumFORMATETCVtbl = {
|
||||
|
||||
static IEnumFORMATETC *EnumFORMATETC_Create(UINT cfmtetc, const FORMATETC *rgfmtetc, UINT it)
|
||||
{
|
||||
EnumFORMATETC *ret = heap_alloc(sizeof(EnumFORMATETC));
|
||||
EnumFORMATETC *ret = malloc(sizeof(EnumFORMATETC));
|
||||
|
||||
URLMON_LockModule();
|
||||
|
||||
@@ -165,7 +165,7 @@ static IEnumFORMATETC *EnumFORMATETC_Create(UINT cfmtetc, const FORMATETC *rgfmt
|
||||
ret->it = it;
|
||||
ret->fetc_cnt = cfmtetc;
|
||||
|
||||
ret->fetc = heap_alloc(cfmtetc*sizeof(FORMATETC));
|
||||
ret->fetc = malloc(cfmtetc * sizeof(FORMATETC));
|
||||
memcpy(ret->fetc, rgfmtetc, cfmtetc*sizeof(FORMATETC));
|
||||
|
||||
return &ret->IEnumFORMATETC_iface;
|
||||
@@ -193,7 +193,7 @@ HRESULT WINAPI CreateFormatEnumerator(UINT cfmtetc, FORMATETC *rgfmtetc,
|
||||
*/
|
||||
HRESULT WINAPI RegisterFormatEnumerator(LPBC pBC, IEnumFORMATETC *pEFetc, DWORD reserved)
|
||||
{
|
||||
TRACE("(%p %p %d)\n", pBC, pEFetc, reserved);
|
||||
TRACE("(%p %p %ld)\n", pBC, pEFetc, reserved);
|
||||
|
||||
if(reserved)
|
||||
WARN("reserved != 0\n");
|
||||
|
||||
+17
-17
@@ -80,7 +80,7 @@ static HRESULT FtpProtocol_open_request(Protocol *prot, IUri *uri, DWORD request
|
||||
request_flags|INTERNET_FLAG_EXISTING_CONNECT|INTERNET_FLAG_PASSIVE,
|
||||
(DWORD_PTR)&This->base);
|
||||
if (!This->base.request && GetLastError() != ERROR_IO_PENDING) {
|
||||
WARN("InternetOpenUrl failed: %d\n", GetLastError());
|
||||
WARN("InternetOpenUrl failed: %ld\n", GetLastError());
|
||||
hres = INET_E_RESOURCE_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ static HRESULT FtpProtocol_start_downloading(Protocol *prot)
|
||||
if(res)
|
||||
This->base.content_length = size;
|
||||
else
|
||||
WARN("FtpGetFileSize failed: %d\n", GetLastError());
|
||||
WARN("FtpGetFileSize failed: %ld\n", GetLastError());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ static void FtpProtocol_close_connection(Protocol *prot)
|
||||
|
||||
static void FtpProtocol_on_error(Protocol *prot, DWORD error)
|
||||
{
|
||||
FIXME("(%p) %d - stub\n", prot, error);
|
||||
FIXME("(%p) %ld - stub\n", prot, error);
|
||||
}
|
||||
|
||||
static const ProtocolVtbl AsyncProtocolVtbl = {
|
||||
@@ -164,7 +164,7 @@ static ULONG WINAPI FtpProtocolUnk_AddRef(IUnknown *iface)
|
||||
{
|
||||
FtpProtocol *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
@@ -173,11 +173,11 @@ static ULONG WINAPI FtpProtocolUnk_Release(IUnknown *iface)
|
||||
FtpProtocol *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
protocol_close_connection(&This->base);
|
||||
heap_free(This);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -220,7 +220,7 @@ static HRESULT WINAPI FtpProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szUr
|
||||
IUri *uri;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08lx %Ix)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
hres = CreateUri(szUrl, 0, 0, &uri);
|
||||
@@ -248,7 +248,7 @@ static HRESULT WINAPI FtpProtocol_Abort(IInternetProtocolEx *iface, HRESULT hrRe
|
||||
{
|
||||
FtpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
|
||||
TRACE("(%p)->(%08lx %08lx)\n", This, hrReason, dwOptions);
|
||||
|
||||
return protocol_abort(&This->base, hrReason);
|
||||
}
|
||||
@@ -257,7 +257,7 @@ static HRESULT WINAPI FtpProtocol_Terminate(IInternetProtocolEx *iface, DWORD dw
|
||||
{
|
||||
FtpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
protocol_close_connection(&This->base);
|
||||
return S_OK;
|
||||
@@ -282,7 +282,7 @@ static HRESULT WINAPI FtpProtocol_Read(IInternetProtocolEx *iface, void *pv,
|
||||
{
|
||||
FtpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
|
||||
TRACE("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead);
|
||||
|
||||
return protocol_read(&This->base, pv, cb, pcbRead);
|
||||
}
|
||||
@@ -291,7 +291,7 @@ static HRESULT WINAPI FtpProtocol_Seek(IInternetProtocolEx *iface, LARGE_INTEGER
|
||||
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||
{
|
||||
FtpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
FIXME("(%p)->(%ld %ld %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ static HRESULT WINAPI FtpProtocol_LockRequest(IInternetProtocolEx *iface, DWORD
|
||||
{
|
||||
FtpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return protocol_lock_request(&This->base);
|
||||
}
|
||||
@@ -321,7 +321,7 @@ static HRESULT WINAPI FtpProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri
|
||||
DWORD scheme = 0;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p %p %p %08x %p)\n", This, pUri, pOIProtSink,
|
||||
TRACE("(%p)->(%p %p %p %08lx %p)\n", This, pUri, pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
hres = IUri_GetScheme(pUri, &scheme);
|
||||
@@ -373,7 +373,7 @@ static HRESULT WINAPI FtpPriority_SetPriority(IInternetPriority *iface, LONG nPr
|
||||
{
|
||||
FtpProtocol *This = impl_from_IInternetPriority(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, nPriority);
|
||||
TRACE("(%p)->(%ld)\n", This, nPriority);
|
||||
|
||||
This->base.priority = nPriority;
|
||||
return S_OK;
|
||||
@@ -419,7 +419,7 @@ static HRESULT WINAPI HttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOpti
|
||||
void *pBuffer, DWORD *pcbBuffer)
|
||||
{
|
||||
FtpProtocol *This = impl_from_IWinInetHttpInfo(iface);
|
||||
TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
|
||||
TRACE("(%p)->(%lx %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
|
||||
|
||||
if(!This->base.request)
|
||||
return E_FAIL;
|
||||
@@ -433,7 +433,7 @@ static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption
|
||||
void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved)
|
||||
{
|
||||
FtpProtocol *This = impl_from_IWinInetHttpInfo(iface);
|
||||
TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
|
||||
TRACE("(%p)->(%lx %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
|
||||
|
||||
if(!This->base.request)
|
||||
return E_FAIL;
|
||||
@@ -459,7 +459,7 @@ HRESULT FtpProtocol_Construct(IUnknown *outer, void **ppv)
|
||||
|
||||
URLMON_LockModule();
|
||||
|
||||
ret = heap_alloc_zero(sizeof(FtpProtocol));
|
||||
ret = calloc(1, sizeof(FtpProtocol));
|
||||
|
||||
ret->base.vtbl = &AsyncProtocolVtbl;
|
||||
ret->IUnknown_inner.lpVtbl = &FtpProtocolUnkVtbl;
|
||||
|
||||
+13
-13
@@ -50,7 +50,7 @@ static HRESULT GopherProtocol_open_request(Protocol *prot, IUri *uri, DWORD requ
|
||||
request_flags, (DWORD_PTR)&This->base);
|
||||
SysFreeString(url);
|
||||
if (!This->base.request && GetLastError() != ERROR_IO_PENDING) {
|
||||
WARN("InternetOpenUrl failed: %d\n", GetLastError());
|
||||
WARN("InternetOpenUrl failed: %ld\n", GetLastError());
|
||||
return INET_E_RESOURCE_NOT_FOUND;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ static void GopherProtocol_close_connection(Protocol *prot)
|
||||
|
||||
static void GopherProtocol_on_error(Protocol *prot, DWORD error)
|
||||
{
|
||||
FIXME("(%p) %d - stub\n", prot, error);
|
||||
FIXME("(%p) %ld - stub\n", prot, error);
|
||||
}
|
||||
|
||||
static const ProtocolVtbl AsyncProtocolVtbl = {
|
||||
@@ -121,7 +121,7 @@ static ULONG WINAPI GopherProtocol_AddRef(IInternetProtocol *iface)
|
||||
{
|
||||
GopherProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ static ULONG WINAPI GopherProtocol_Release(IInternetProtocol *iface)
|
||||
GopherProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
heap_free(This);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -149,7 +149,7 @@ static HRESULT WINAPI GopherProtocol_Start(IInternetProtocol *iface, LPCWSTR szU
|
||||
IUri *uri;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08lx %Ix)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
hres = CreateUri(szUrl, 0, 0, &uri);
|
||||
@@ -177,7 +177,7 @@ static HRESULT WINAPI GopherProtocol_Abort(IInternetProtocol *iface, HRESULT hrR
|
||||
{
|
||||
GopherProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
|
||||
TRACE("(%p)->(%08lx %08lx)\n", This, hrReason, dwOptions);
|
||||
|
||||
return protocol_abort(&This->base, hrReason);
|
||||
}
|
||||
@@ -186,7 +186,7 @@ static HRESULT WINAPI GopherProtocol_Terminate(IInternetProtocol *iface, DWORD d
|
||||
{
|
||||
GopherProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
protocol_close_connection(&This->base);
|
||||
return S_OK;
|
||||
@@ -211,7 +211,7 @@ static HRESULT WINAPI GopherProtocol_Read(IInternetProtocol *iface, void *pv,
|
||||
{
|
||||
GopherProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
|
||||
TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
|
||||
TRACE("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead);
|
||||
|
||||
return protocol_read(&This->base, pv, cb, pcbRead);
|
||||
}
|
||||
@@ -220,7 +220,7 @@ static HRESULT WINAPI GopherProtocol_Seek(IInternetProtocol *iface, LARGE_INTEGE
|
||||
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||
{
|
||||
GopherProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
FIXME("(%p)->(%ld %ld %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ static HRESULT WINAPI GopherProtocol_LockRequest(IInternetProtocol *iface, DWORD
|
||||
{
|
||||
GopherProtocol *This = impl_from_IInternetProtocol(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return protocol_lock_request(&This->base);
|
||||
}
|
||||
@@ -285,7 +285,7 @@ static HRESULT WINAPI GopherPriority_SetPriority(IInternetPriority *iface, LONG
|
||||
{
|
||||
GopherProtocol *This = impl_from_IInternetPriority(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, nPriority);
|
||||
TRACE("(%p)->(%ld)\n", This, nPriority);
|
||||
|
||||
This->base.priority = nPriority;
|
||||
return S_OK;
|
||||
@@ -317,7 +317,7 @@ HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
|
||||
|
||||
URLMON_LockModule();
|
||||
|
||||
ret = heap_alloc_zero(sizeof(GopherProtocol));
|
||||
ret = calloc(1, sizeof(GopherProtocol));
|
||||
|
||||
ret->base.vtbl = &AsyncProtocolVtbl;
|
||||
ret->IInternetProtocol_iface.lpVtbl = &GopherProtocolVtbl;
|
||||
|
||||
+55
-63
@@ -17,8 +17,6 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "urlmon_main.h"
|
||||
#include "wininet.h"
|
||||
|
||||
@@ -65,8 +63,7 @@ static inline HttpProtocol *impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface)
|
||||
return CONTAINING_RECORD(iface, HttpProtocol, IWinInetHttpInfo_iface);
|
||||
}
|
||||
|
||||
static const WCHAR default_headersW[] = {
|
||||
'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g',':',' ','g','z','i','p',',',' ','d','e','f','l','a','t','e',0};
|
||||
static const WCHAR default_headersW[] = L"Accept-Encoding: gzip, deflate";
|
||||
|
||||
static LPWSTR query_http_info(HttpProtocol *This, DWORD option)
|
||||
{
|
||||
@@ -76,12 +73,12 @@ static LPWSTR query_http_info(HttpProtocol *This, DWORD option)
|
||||
|
||||
res = HttpQueryInfoW(This->base.request, option, NULL, &len, NULL);
|
||||
if (!res && GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
|
||||
ret = heap_alloc(len);
|
||||
ret = malloc(len);
|
||||
res = HttpQueryInfoW(This->base.request, option, ret, &len, NULL);
|
||||
}
|
||||
if(!res) {
|
||||
TRACE("HttpQueryInfoW(%d) failed: %08x\n", option, GetLastError());
|
||||
heap_free(ret);
|
||||
TRACE("HttpQueryInfoW(%ld) failed: %08lx\n", option, GetLastError());
|
||||
free(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -94,7 +91,7 @@ static inline BOOL set_security_flag(HttpProtocol *This, DWORD flags)
|
||||
|
||||
res = InternetSetOptionW(This->base.request, INTERNET_OPTION_SECURITY_FLAGS, &flags, sizeof(flags));
|
||||
if(!res)
|
||||
ERR("Failed to set security flags: %x\n", flags);
|
||||
ERR("Failed to set security flags: %lx\n", flags);
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -133,7 +130,7 @@ static HRESULT handle_http_error(HttpProtocol *This, DWORD error)
|
||||
DWORD res;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %u)\n", This, error);
|
||||
TRACE("(%p %lu)\n", This, error);
|
||||
|
||||
switch(error) {
|
||||
case ERROR_INTERNET_SEC_CERT_DATE_INVALID:
|
||||
@@ -168,7 +165,7 @@ static HRESULT handle_http_error(HttpProtocol *This, DWORD error)
|
||||
hres = IHttpSecurity_OnSecurityProblem(http_security, error);
|
||||
IHttpSecurity_Release(http_security);
|
||||
|
||||
TRACE("OnSecurityProblem returned %08x\n", hres);
|
||||
TRACE("OnSecurityProblem returned %08lx\n", hres);
|
||||
|
||||
if(hres != S_FALSE)
|
||||
{
|
||||
@@ -187,7 +184,7 @@ static HRESULT handle_http_error(HttpProtocol *This, DWORD error)
|
||||
if(res)
|
||||
return RPC_E_RETRY;
|
||||
|
||||
FIXME("Don't know how to ignore error %d\n", error);
|
||||
FIXME("Don't know how to ignore error %ld\n", error);
|
||||
return E_ABORT;
|
||||
}
|
||||
|
||||
@@ -252,7 +249,7 @@ static ULONG send_http_request(HttpProtocol *This)
|
||||
switch(This->base.bind_info.stgmedData.tymed) {
|
||||
case TYMED_HGLOBAL:
|
||||
/* Native does not use GlobalLock/GlobalUnlock, so we won't either */
|
||||
send_buffer.lpvBuffer = This->base.bind_info.stgmedData.u.hGlobal;
|
||||
send_buffer.lpvBuffer = This->base.bind_info.stgmedData.hGlobal;
|
||||
send_buffer.dwBufferLength = send_buffer.dwBufferTotal = This->base.bind_info.cbstgmedData;
|
||||
break;
|
||||
case TYMED_ISTREAM: {
|
||||
@@ -260,7 +257,7 @@ static ULONG send_http_request(HttpProtocol *This)
|
||||
|
||||
send_buffer.dwBufferTotal = This->base.bind_info.cbstgmedData;
|
||||
if(!This->base.post_stream) {
|
||||
This->base.post_stream = This->base.bind_info.stgmedData.u.pstm;
|
||||
This->base.post_stream = This->base.bind_info.stgmedData.pstm;
|
||||
IStream_AddRef(This->base.post_stream);
|
||||
}
|
||||
|
||||
@@ -269,7 +266,7 @@ static ULONG send_http_request(HttpProtocol *This)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
FIXME("Unsupported This->base.bind_info.stgmedData.tymed %d\n", This->base.bind_info.stgmedData.tymed);
|
||||
FIXME("Unsupported This->base.bind_info.stgmedData.tymed %ld\n", This->base.bind_info.stgmedData.tymed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,9 +301,9 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR wszBindVerb[BINDVERB_CUSTOM][5] =
|
||||
{{'G','E','T',0},
|
||||
{'P','O','S','T',0},
|
||||
{'P','U','T',0}};
|
||||
{L"GET",
|
||||
L"POST",
|
||||
L"PUT"};
|
||||
|
||||
hres = IUri_GetPort(uri, &port);
|
||||
if(FAILED(hres))
|
||||
@@ -331,7 +328,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
if(!This->base.connection) {
|
||||
WARN("InternetConnect failed: %d\n", GetLastError());
|
||||
WARN("InternetConnect failed: %ld\n", GetLastError());
|
||||
return INET_E_CANNOT_CONNECT;
|
||||
}
|
||||
|
||||
@@ -345,15 +342,14 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
|
||||
num = ARRAY_SIZE(accept_mimes) - 1;
|
||||
hres = IInternetBindInfo_GetBindString(bind_info, BINDSTRING_ACCEPT_MIMES, accept_mimes, num, &num);
|
||||
if(hres == INET_E_USE_DEFAULT_SETTING) {
|
||||
static const WCHAR default_accept_mimeW[] = {'*','/','*',0};
|
||||
static const WCHAR *default_accept_mimes[] = {default_accept_mimeW, NULL};
|
||||
static const WCHAR *default_accept_mimes[] = {L"*/*", NULL};
|
||||
|
||||
accept_types = default_accept_mimes;
|
||||
num = 0;
|
||||
}else if(hres == S_OK) {
|
||||
accept_types = (const WCHAR**)accept_mimes;
|
||||
}else {
|
||||
WARN("GetBindString BINDSTRING_ACCEPT_MIMES failed: %08x\n", hres);
|
||||
WARN("GetBindString BINDSTRING_ACCEPT_MIMES failed: %08lx\n", hres);
|
||||
return INET_E_NO_VALID_MEDIA;
|
||||
}
|
||||
accept_mimes[num] = 0;
|
||||
@@ -374,21 +370,21 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
if (!This->base.request) {
|
||||
WARN("HttpOpenRequest failed: %d\n", GetLastError());
|
||||
WARN("HttpOpenRequest failed: %ld\n", GetLastError());
|
||||
return INET_E_RESOURCE_NOT_FOUND;
|
||||
}
|
||||
|
||||
hres = IInternetProtocolSink_QueryInterface(This->base.protocol_sink, &IID_IServiceProvider,
|
||||
(void **)&service_provider);
|
||||
if (hres != S_OK) {
|
||||
WARN("IInternetProtocolSink_QueryInterface IID_IServiceProvider failed: %08x\n", hres);
|
||||
WARN("IInternetProtocolSink_QueryInterface IID_IServiceProvider failed: %08lx\n", hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate,
|
||||
&IID_IHttpNegotiate, (void **)&This->http_negotiate);
|
||||
if (hres != S_OK) {
|
||||
WARN("IServiceProvider_QueryService IID_IHttpNegotiate failed: %08x\n", hres);
|
||||
WARN("IServiceProvider_QueryService IID_IHttpNegotiate failed: %08lx\n", hres);
|
||||
IServiceProvider_Release(service_provider);
|
||||
return hres;
|
||||
}
|
||||
@@ -403,14 +399,14 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
|
||||
0, &addl_header);
|
||||
SysFreeString(url);
|
||||
if(hres != S_OK) {
|
||||
WARN("IHttpNegotiate_BeginningTransaction failed: %08x\n", hres);
|
||||
WARN("IHttpNegotiate_BeginningTransaction failed: %08lx\n", hres);
|
||||
IServiceProvider_Release(service_provider);
|
||||
return hres;
|
||||
}
|
||||
|
||||
len = addl_header ? lstrlenW(addl_header) : 0;
|
||||
|
||||
This->full_header = heap_alloc(len*sizeof(WCHAR)+sizeof(default_headersW));
|
||||
This->full_header = malloc(len * sizeof(WCHAR) + sizeof(default_headersW));
|
||||
if(!This->full_header) {
|
||||
IServiceProvider_Release(service_provider);
|
||||
return E_OUTOFMEMORY;
|
||||
@@ -425,14 +421,14 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
|
||||
&IID_IHttpNegotiate2, (void **)&http_negotiate2);
|
||||
IServiceProvider_Release(service_provider);
|
||||
if(hres != S_OK) {
|
||||
WARN("IServiceProvider_QueryService IID_IHttpNegotiate2 failed: %08x\n", hres);
|
||||
WARN("IServiceProvider_QueryService IID_IHttpNegotiate2 failed: %08lx\n", hres);
|
||||
/* No goto done as per native */
|
||||
}else {
|
||||
len = ARRAY_SIZE(security_id);
|
||||
hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, security_id, &len, 0);
|
||||
IHttpNegotiate2_Release(http_negotiate2);
|
||||
if (hres != S_OK)
|
||||
WARN("IHttpNegotiate2_GetRootSecurityId failed: %08x\n", hres);
|
||||
WARN("IHttpNegotiate2_GetRootSecurityId failed: %08lx\n", hres);
|
||||
}
|
||||
|
||||
/* FIXME: Handle security_id. Native calls undocumented function IsHostInProxyBypassList. */
|
||||
@@ -443,7 +439,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
|
||||
if(hres == S_OK && num) {
|
||||
if(!InternetSetOptionW(This->base.request, INTERNET_OPTION_SECONDARY_CACHE_KEY,
|
||||
post_cookie, lstrlenW(post_cookie)))
|
||||
WARN("InternetSetOption INTERNET_OPTION_SECONDARY_CACHE_KEY failed: %d\n", GetLastError());
|
||||
WARN("InternetSetOption INTERNET_OPTION_SECONDARY_CACHE_KEY failed: %ld\n", GetLastError());
|
||||
CoTaskMemFree(post_cookie);
|
||||
}
|
||||
}
|
||||
@@ -451,12 +447,12 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
|
||||
flags = INTERNET_ERROR_MASK_COMBINED_SEC_CERT;
|
||||
res = InternetSetOptionW(This->base.request, INTERNET_OPTION_ERROR_MASK, &flags, sizeof(flags));
|
||||
if(!res)
|
||||
WARN("InternetSetOption(INTERNET_OPTION_ERROR_MASK) failed: %u\n", GetLastError());
|
||||
WARN("InternetSetOption(INTERNET_OPTION_ERROR_MASK) failed: %lu\n", GetLastError());
|
||||
|
||||
b = TRUE;
|
||||
res = InternetSetOptionW(This->base.request, INTERNET_OPTION_HTTP_DECODING, &b, sizeof(b));
|
||||
if(!res)
|
||||
WARN("InternetSetOption(INTERNET_OPTION_HTTP_DECODING) failed: %u\n", GetLastError());
|
||||
WARN("InternetSetOption(INTERNET_OPTION_HTTP_DECODING) failed: %lu\n", GetLastError());
|
||||
|
||||
do {
|
||||
error = send_http_request(This);
|
||||
@@ -475,7 +471,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
|
||||
}
|
||||
} while(hres == RPC_E_RETRY);
|
||||
|
||||
WARN("HttpSendRequest failed: %d\n", error);
|
||||
WARN("HttpSendRequest failed: %ld\n", error);
|
||||
return hres;
|
||||
}
|
||||
|
||||
@@ -485,7 +481,7 @@ static HRESULT HttpProtocol_end_request(Protocol *protocol)
|
||||
|
||||
res = HttpEndRequestW(protocol->request, NULL, 0, 0);
|
||||
if(!res && GetLastError() != ERROR_IO_PENDING) {
|
||||
FIXME("HttpEndRequest failed: %u\n", GetLastError());
|
||||
FIXME("HttpEndRequest failed: %lu\n", GetLastError());
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -513,9 +509,6 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot)
|
||||
BOOL res;
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR wszDefaultContentType[] =
|
||||
{'t','e','x','t','/','h','t','m','l',0};
|
||||
|
||||
if(!This->http_negotiate) {
|
||||
WARN("Expected IHttpNegotiate pointer to be non-NULL\n");
|
||||
return S_OK;
|
||||
@@ -534,7 +527,7 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot)
|
||||
location = query_http_info(This, HTTP_QUERY_LOCATION);
|
||||
This->base.flags |= FLAG_RESULT_REPORTED | FLAG_LAST_DATA_REPORTED;
|
||||
IInternetProtocolSink_ReportResult(This->base.protocol_sink, INET_E_REDIRECT_FAILED, 0, location);
|
||||
heap_free(location);
|
||||
free(location);
|
||||
return INET_E_REDIRECT_FAILED;
|
||||
}
|
||||
|
||||
@@ -542,20 +535,20 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot)
|
||||
if(response_headers) {
|
||||
hres = IHttpNegotiate_OnResponse(This->http_negotiate, status_code, response_headers,
|
||||
NULL, NULL);
|
||||
heap_free(response_headers);
|
||||
free(response_headers);
|
||||
if (hres != S_OK) {
|
||||
WARN("IHttpNegotiate_OnResponse failed: %08x\n", hres);
|
||||
WARN("IHttpNegotiate_OnResponse failed: %08lx\n", hres);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
WARN("HttpQueryInfo failed: %d\n", GetLastError());
|
||||
WARN("HttpQueryInfo failed: %ld\n", GetLastError());
|
||||
}
|
||||
|
||||
ranges = query_http_info(This, HTTP_QUERY_ACCEPT_RANGES);
|
||||
if(ranges) {
|
||||
IInternetProtocolSink_ReportProgress(This->base.protocol_sink, BINDSTATUS_ACCEPTRANGES, NULL);
|
||||
heap_free(ranges);
|
||||
free(ranges);
|
||||
}
|
||||
|
||||
content_type = query_http_info(This, HTTP_QUERY_CONTENT_TYPE);
|
||||
@@ -568,19 +561,18 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot)
|
||||
(This->base.bindf & BINDF_FROMURLMON)
|
||||
? BINDSTATUS_MIMETYPEAVAILABLE : BINDSTATUS_RAWMIMETYPE,
|
||||
content_type);
|
||||
heap_free(content_type);
|
||||
free(content_type);
|
||||
}else {
|
||||
WARN("HttpQueryInfo failed: %d\n", GetLastError());
|
||||
WARN("HttpQueryInfo failed: %ld\n", GetLastError());
|
||||
IInternetProtocolSink_ReportProgress(This->base.protocol_sink,
|
||||
(This->base.bindf & BINDF_FROMURLMON)
|
||||
? BINDSTATUS_MIMETYPEAVAILABLE : BINDSTATUS_RAWMIMETYPE,
|
||||
wszDefaultContentType);
|
||||
? BINDSTATUS_MIMETYPEAVAILABLE : BINDSTATUS_RAWMIMETYPE, L"text/html");
|
||||
}
|
||||
|
||||
content_length = query_http_info(This, HTTP_QUERY_CONTENT_LENGTH);
|
||||
if(content_length) {
|
||||
This->base.content_length = wcstol(content_length, NULL, 10);
|
||||
heap_free(content_length);
|
||||
free(content_length);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -595,7 +587,7 @@ static void HttpProtocol_close_connection(Protocol *prot)
|
||||
This->http_negotiate = NULL;
|
||||
}
|
||||
|
||||
heap_free(This->full_header);
|
||||
free(This->full_header);
|
||||
This->full_header = NULL;
|
||||
}
|
||||
|
||||
@@ -604,10 +596,10 @@ static void HttpProtocol_on_error(Protocol *prot, DWORD error)
|
||||
HttpProtocol *This = impl_from_Protocol(prot);
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p) %d\n", prot, error);
|
||||
TRACE("(%p) %ld\n", prot, error);
|
||||
|
||||
if(prot->flags & FLAG_FIRST_CONTINUE_COMPLETE) {
|
||||
FIXME("Not handling error %d\n", error);
|
||||
FIXME("Not handling error %ld\n", error);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -670,7 +662,7 @@ static ULONG WINAPI HttpProtocolUnk_AddRef(IUnknown *iface)
|
||||
{
|
||||
HttpProtocol *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
@@ -679,11 +671,11 @@ static ULONG WINAPI HttpProtocolUnk_Release(IUnknown *iface)
|
||||
HttpProtocol *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
protocol_close_connection(&This->base);
|
||||
heap_free(This);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -726,7 +718,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU
|
||||
IUri *uri;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08lx %Ix)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
hres = CreateUri(szUrl, 0, 0, &uri);
|
||||
@@ -754,7 +746,7 @@ static HRESULT WINAPI HttpProtocol_Abort(IInternetProtocolEx *iface, HRESULT hrR
|
||||
{
|
||||
HttpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
|
||||
TRACE("(%p)->(%08lx %08lx)\n", This, hrReason, dwOptions);
|
||||
|
||||
return protocol_abort(&This->base, hrReason);
|
||||
}
|
||||
@@ -763,7 +755,7 @@ static HRESULT WINAPI HttpProtocol_Terminate(IInternetProtocolEx *iface, DWORD d
|
||||
{
|
||||
HttpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
protocol_close_connection(&This->base);
|
||||
return S_OK;
|
||||
@@ -788,7 +780,7 @@ static HRESULT WINAPI HttpProtocol_Read(IInternetProtocolEx *iface, void *pv,
|
||||
{
|
||||
HttpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
|
||||
TRACE("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead);
|
||||
|
||||
return protocol_read(&This->base, pv, cb, pcbRead);
|
||||
}
|
||||
@@ -797,7 +789,7 @@ static HRESULT WINAPI HttpProtocol_Seek(IInternetProtocolEx *iface, LARGE_INTEGE
|
||||
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||
{
|
||||
HttpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
FIXME("(%p)->(%ld %ld %p)\n", This, dlibMove.LowPart, dwOrigin, plibNewPosition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -805,7 +797,7 @@ static HRESULT WINAPI HttpProtocol_LockRequest(IInternetProtocolEx *iface, DWORD
|
||||
{
|
||||
HttpProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return protocol_lock_request(&This->base);
|
||||
}
|
||||
@@ -827,7 +819,7 @@ static HRESULT WINAPI HttpProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
|
||||
DWORD scheme = 0;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p %p %p %08x %p)\n", This, pUri, pOIProtSink,
|
||||
TRACE("(%p)->(%p %p %p %08lx %p)\n", This, pUri, pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
hres = IUri_GetScheme(pUri, &scheme);
|
||||
@@ -879,7 +871,7 @@ static HRESULT WINAPI HttpPriority_SetPriority(IInternetPriority *iface, LONG nP
|
||||
{
|
||||
HttpProtocol *This = impl_from_IInternetPriority(iface);
|
||||
|
||||
TRACE("(%p)->(%d)\n", This, nPriority);
|
||||
TRACE("(%p)->(%ld)\n", This, nPriority);
|
||||
|
||||
This->base.priority = nPriority;
|
||||
return S_OK;
|
||||
@@ -925,7 +917,7 @@ static HRESULT WINAPI HttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOpti
|
||||
void *pBuffer, DWORD *pcbBuffer)
|
||||
{
|
||||
HttpProtocol *This = impl_from_IWinInetHttpInfo(iface);
|
||||
TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
|
||||
TRACE("(%p)->(%lx %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
|
||||
|
||||
if(!This->base.request)
|
||||
return E_FAIL;
|
||||
@@ -939,7 +931,7 @@ static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption
|
||||
void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved)
|
||||
{
|
||||
HttpProtocol *This = impl_from_IWinInetHttpInfo(iface);
|
||||
TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
|
||||
TRACE("(%p)->(%lx %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
|
||||
|
||||
if(!This->base.request)
|
||||
return E_FAIL;
|
||||
@@ -962,7 +954,7 @@ static HRESULT create_http_protocol(BOOL https, IUnknown *outer, void **ppobj)
|
||||
{
|
||||
HttpProtocol *ret;
|
||||
|
||||
ret = heap_alloc_zero(sizeof(HttpProtocol));
|
||||
ret = calloc(1, sizeof(HttpProtocol));
|
||||
if(!ret)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
||||
+52
-121
@@ -26,74 +26,7 @@
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||
|
||||
static const WCHAR feature_control_keyW[] =
|
||||
{'S','o','f','t','w','a','r','e','\\',
|
||||
'M','i','c','r','o','s','o','f','t','\\',
|
||||
'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\',
|
||||
'M','a','i','n','\\',
|
||||
'F','e','a','t','u','r','e','C','o','n','t','r','o','l',0};
|
||||
|
||||
static const WCHAR feature_object_cachingW[] =
|
||||
{'F','E','A','T','U','R','E','_','O','B','J','E','C','T','_','C','A','C','H','I','N','G',0};
|
||||
static const WCHAR feature_zone_elevationW[] =
|
||||
{'F','E','A','T','U','R','E','_','Z','O','N','E','_','E','L','E','V','A','T','I','O','N',0};
|
||||
static const WCHAR feature_mime_handlingW[] =
|
||||
{'F','E','A','T','U','R','E','_','M','I','M','E','_','H','A','N','D','L','I','N','G',0};
|
||||
static const WCHAR feature_mime_sniffingW[] =
|
||||
{'F','E','A','T','U','R','E','_','M','I','M','E','_','S','N','I','F','F','I','N','G',0};
|
||||
static const WCHAR feature_window_restrictionsW[] =
|
||||
{'F','E','A','T','U','R','E','_','W','I','N','D','O','W','_','R','E','S','T','R','I','C','T','I','O','N','S',0};
|
||||
static const WCHAR feature_weboc_popupmanagementW[] =
|
||||
{'F','E','A','T','U','R','E','_','W','E','B','O','C','_','P','O','P','U','P','M','A','N','A','G','E','M','E','N','T',0};
|
||||
static const WCHAR feature_behaviorsW[] =
|
||||
{'F','E','A','T','U','R','E','_','B','E','H','A','V','I','O','R','S',0};
|
||||
static const WCHAR feature_disable_mk_protocolW[] =
|
||||
{'F','E','A','T','U','R','E','_','D','I','S','A','B','L','E','_','M','K','_','P','R','O','T','O','C','O','L',0};
|
||||
static const WCHAR feature_localmachine_lockdownW[] =
|
||||
{'F','E','A','T','U','R','E','_','L','O','C','A','L','M','A','C','H','I','N','E','_','L','O','C','K','D','O','W','N',0};
|
||||
static const WCHAR feature_securitybandW[] =
|
||||
{'F','E','A','T','U','R','E','_','S','E','C','U','R','I','T','Y','B','A','N','D',0};
|
||||
static const WCHAR feature_restrict_activexinstallW[] =
|
||||
{'F','E','A','T','U','R','E','_','R','E','S','T','R','I','C','T','_','A','C','T','I','V','E','X','I','N','S','T','A','L','L',0};
|
||||
static const WCHAR feature_validate_navigate_urlW[] =
|
||||
{'F','E','A','T','U','R','E','_','V','A','L','I','D','A','T','E','_','N','A','V','I','G','A','T','E','_','U','R','L',0};
|
||||
static const WCHAR feature_restrict_filedownloadW[] =
|
||||
{'F','E','A','T','U','R','E','_','R','E','S','T','R','I','C','T','_','F','I','L','E','D','O','W','N','L','O','A','D',0};
|
||||
static const WCHAR feature_addon_managementW[] =
|
||||
{'F','E','A','T','U','R','E','_','A','D','D','O','N','_','M','A','N','A','G','E','M','E','N','T',0};
|
||||
static const WCHAR feature_protocol_lockdownW[] =
|
||||
{'F','E','A','T','U','R','E','_','P','R','O','T','O','C','O','L','_','L','O','C','K','D','O','W','N',0};
|
||||
static const WCHAR feature_http_username_password_disableW[] =
|
||||
{'F','E','A','T','U','R','E','_','H','T','T','P','_','U','S','E','R','N','A','M','E','_',
|
||||
'P','A','S','S','W','O','R','D','_','D','I','S','A','B','L','E',0};
|
||||
static const WCHAR feature_safe_bindtoobjectW[] =
|
||||
{'F','E','A','T','U','R','E','_','S','A','F','E','_','B','I','N','D','T','O','O','B','J','E','C','T',0};
|
||||
static const WCHAR feature_unc_savedfilecheckW[] =
|
||||
{'F','E','A','T','U','R','E','_','U','N','C','_','S','A','V','E','D','F','I','L','E','C','H','E','C','K',0};
|
||||
static const WCHAR feature_get_url_dom_filepath_unencodedW[] =
|
||||
{'F','E','A','T','U','R','E','_','G','E','T','_','U','R','L','_','D','O','M','_',
|
||||
'F','I','L','E','P','A','T','H','_','U','N','E','N','C','O','D','E','D',0};
|
||||
static const WCHAR feature_tabbed_browsingW[] =
|
||||
{'F','E','A','T','U','R','E','_','T','A','B','B','E','D','_','B','R','O','W','S','I','N','G',0};
|
||||
static const WCHAR feature_ssluxW[] =
|
||||
{'F','E','A','T','U','R','E','_','S','S','L','U','X',0};
|
||||
static const WCHAR feature_disable_navigation_soundsW[] =
|
||||
{'F','E','A','T','U','R','E','_','D','I','S','A','B','L','E','_','N','A','V','I','G','A','T','I','O','N','_',
|
||||
'S','O','U','N','D','S',0};
|
||||
static const WCHAR feature_disable_legacy_compressionW[] =
|
||||
{'F','E','A','T','U','R','E','_','D','I','S','A','B','L','E','_','L','E','G','A','C','Y','_',
|
||||
'C','O','M','P','R','E','S','S','I','O','N',0};
|
||||
static const WCHAR feature_force_addr_and_statusW[] =
|
||||
{'F','E','A','T','U','R','E','_','F','O','R','C','E','_','A','D','D','R','_','A','N','D','_',
|
||||
'S','T','A','T','U','S',0};
|
||||
static const WCHAR feature_xmlhttpW[] =
|
||||
{'F','E','A','T','U','R','E','_','X','M','L','H','T','T','P',0};
|
||||
static const WCHAR feature_disable_telnet_protocolW[] =
|
||||
{'F','E','A','T','U','R','E','_','D','I','S','A','B','L','E','_','T','E','L','N','E','T','_',
|
||||
'P','R','O','T','O','C','O','L',0};
|
||||
static const WCHAR feature_feedsW[] =
|
||||
{'F','E','A','T','U','R','E','_','F','E','E','D','S',0};
|
||||
static const WCHAR feature_block_input_promptsW[] =
|
||||
{'F','E','A','T','U','R','E','_','B','L','O','C','K','_','I','N','P','U','T','_','P','R','O','M','P','T','S',0};
|
||||
L"Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl";
|
||||
|
||||
static CRITICAL_SECTION process_features_cs;
|
||||
static CRITICAL_SECTION_DEBUG process_features_cs_dbg =
|
||||
@@ -116,34 +49,34 @@ typedef struct feature_control {
|
||||
* appear in the same order as it does in INTERNETFEATURELIST.
|
||||
*/
|
||||
static feature_control process_feature_controls[FEATURE_ENTRY_COUNT] = {
|
||||
{feature_object_cachingW, TRUE ,TRUE},
|
||||
{feature_zone_elevationW, FALSE,TRUE},
|
||||
{feature_mime_handlingW, FALSE,TRUE},
|
||||
{feature_mime_sniffingW, FALSE,TRUE},
|
||||
{feature_window_restrictionsW, FALSE,TRUE},
|
||||
{feature_weboc_popupmanagementW, FALSE,TRUE},
|
||||
{feature_behaviorsW, TRUE ,TRUE},
|
||||
{feature_disable_mk_protocolW, TRUE ,TRUE},
|
||||
{feature_localmachine_lockdownW, FALSE,TRUE},
|
||||
{feature_securitybandW, FALSE,TRUE},
|
||||
{feature_restrict_activexinstallW, FALSE,TRUE},
|
||||
{feature_validate_navigate_urlW, FALSE,TRUE},
|
||||
{feature_restrict_filedownloadW, FALSE,TRUE},
|
||||
{feature_addon_managementW, FALSE,TRUE},
|
||||
{feature_protocol_lockdownW, FALSE,TRUE},
|
||||
{feature_http_username_password_disableW, FALSE,TRUE},
|
||||
{feature_safe_bindtoobjectW, FALSE,TRUE},
|
||||
{feature_unc_savedfilecheckW, FALSE,TRUE},
|
||||
{feature_get_url_dom_filepath_unencodedW, TRUE ,TRUE},
|
||||
{feature_tabbed_browsingW, FALSE,TRUE},
|
||||
{feature_ssluxW, FALSE,TRUE},
|
||||
{feature_disable_navigation_soundsW, FALSE,TRUE},
|
||||
{feature_disable_legacy_compressionW, TRUE ,TRUE},
|
||||
{feature_force_addr_and_statusW, FALSE,TRUE},
|
||||
{feature_xmlhttpW, TRUE ,TRUE},
|
||||
{feature_disable_telnet_protocolW, FALSE,TRUE},
|
||||
{feature_feedsW, FALSE,TRUE},
|
||||
{feature_block_input_promptsW, FALSE,TRUE}
|
||||
{L"FEATURE_OBJECT_CACHING", TRUE ,TRUE},
|
||||
{L"FEATURE_ZONE_ELEVATION", FALSE,TRUE},
|
||||
{L"FEATURE_MIME_HANDLING", FALSE,TRUE},
|
||||
{L"FEATURE_MIME_SNIFFING", FALSE,TRUE},
|
||||
{L"FEATURE_WINDOW_RESTRICTIONS", FALSE,TRUE},
|
||||
{L"FEATURE_WEBOC_POPUPMANAGEMENT", FALSE,TRUE},
|
||||
{L"FEATURE_BEHAVIORS", TRUE ,TRUE},
|
||||
{L"FEATURE_DISABLE_MK_PROTOCOL", TRUE ,TRUE},
|
||||
{L"FEATURE_LOCALMACHINE_LOCKDOWN", FALSE,TRUE},
|
||||
{L"FEATURE_SECURITYBAND", FALSE,TRUE},
|
||||
{L"FEATURE_RESTRICT_ACTIVEXINSTALL", FALSE,TRUE},
|
||||
{L"FEATURE_VALIDATE_NAVIGATE_URL", FALSE,TRUE},
|
||||
{L"FEATURE_RESTRICT_FILEDOWNLOAD", FALSE,TRUE},
|
||||
{L"FEATURE_ADDON_MANAGEMENT", FALSE,TRUE},
|
||||
{L"FEATURE_PROTOCOL_LOCKDOWN", FALSE,TRUE},
|
||||
{L"FEATURE_HTTP_USERNAME_PASSWORD_DISABLE", FALSE,TRUE},
|
||||
{L"FEATURE_SAFE_BINDTOOBJECT", FALSE,TRUE},
|
||||
{L"FEATURE_UNC_SAVEDFILECHECK", FALSE,TRUE},
|
||||
{L"FEATURE_GET_URL_DOM_FILEPATH_UNENCODED", TRUE ,TRUE},
|
||||
{L"FEATURE_TABBED_BROWSING", FALSE,TRUE},
|
||||
{L"FEATURE_SSLUX", FALSE,TRUE},
|
||||
{L"FEATURE_DISABLE_NAVIGATION_SOUNDS", FALSE,TRUE},
|
||||
{L"FEATURE_DISABLE_LEGACY_COMPRESSION", TRUE ,TRUE},
|
||||
{L"FEATURE_FORCE_ADDR_AND_STATUS", FALSE,TRUE},
|
||||
{L"FEATURE_XMLHTTP", TRUE ,TRUE},
|
||||
{L"FEATURE_DISABLE_TELNET_PROTOCOL", FALSE,TRUE},
|
||||
{L"FEATURE_FEEDS", FALSE,TRUE},
|
||||
{L"FEATURE_BLOCK_INPUT_PROMPTS", FALSE,TRUE}
|
||||
};
|
||||
|
||||
static HRESULT parse_schema(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size, DWORD *rsize)
|
||||
@@ -151,7 +84,7 @@ static HRESULT parse_schema(LPCWSTR url, DWORD flags, LPWSTR result, DWORD size,
|
||||
WCHAR *ptr;
|
||||
DWORD len = 0;
|
||||
|
||||
TRACE("(%s %08x %p %d %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
TRACE("(%s %08lx %p %ld %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
|
||||
if(flags)
|
||||
ERR("wrong flags\n");
|
||||
@@ -180,7 +113,7 @@ static HRESULT parse_canonicalize_url(LPCWSTR url, DWORD flags, LPWSTR result,
|
||||
DWORD prsize = size;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s %08x %p %d %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
TRACE("(%s %08lx %p %ld %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
|
||||
protocol_info = get_protocol_info(url);
|
||||
|
||||
@@ -204,7 +137,7 @@ static HRESULT parse_security_url(LPCWSTR url, DWORD flags, LPWSTR result, DWORD
|
||||
IInternetProtocolInfo *protocol_info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s %08x %p %d %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
TRACE("(%s %08lx %p %ld %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
|
||||
protocol_info = get_protocol_info(url);
|
||||
|
||||
@@ -224,7 +157,7 @@ static HRESULT parse_encode(LPCWSTR url, PARSEACTION action, DWORD flags, LPWSTR
|
||||
DWORD prsize;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s %08x %p %d %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
TRACE("(%s %08lx %p %ld %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
|
||||
protocol_info = get_protocol_info(url);
|
||||
|
||||
@@ -251,7 +184,7 @@ static HRESULT parse_path_from_url(LPCWSTR url, DWORD flags, LPWSTR result, DWOR
|
||||
DWORD prsize;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s %08x %p %d %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
TRACE("(%s %08lx %p %ld %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
|
||||
protocol_info = get_protocol_info(url);
|
||||
|
||||
@@ -277,7 +210,7 @@ static HRESULT parse_security_domain(LPCWSTR url, DWORD flags, LPWSTR result,
|
||||
IInternetProtocolInfo *protocol_info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s %08x %p %d %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
TRACE("(%s %08lx %p %ld %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
|
||||
protocol_info = get_protocol_info(url);
|
||||
|
||||
@@ -298,7 +231,7 @@ static HRESULT parse_domain(LPCWSTR url, DWORD flags, LPWSTR result,
|
||||
IInternetProtocolInfo *protocol_info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s %08x %p %d %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
TRACE("(%s %08lx %p %ld %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
|
||||
protocol_info = get_protocol_info(url);
|
||||
|
||||
@@ -329,7 +262,7 @@ static HRESULT parse_rootdocument(LPCWSTR url, DWORD flags, LPWSTR result,
|
||||
PARSEDURLW url_info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s %08x %p %d %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
TRACE("(%s %08lx %p %ld %p)\n", debugstr_w(url), flags, result, size, rsize);
|
||||
|
||||
protocol_info = get_protocol_info(url);
|
||||
|
||||
@@ -393,7 +326,7 @@ HRESULT WINAPI CoInternetParseUrl(LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD
|
||||
LPWSTR pszResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
|
||||
{
|
||||
if(dwReserved)
|
||||
WARN("dwReserved = %d\n", dwReserved);
|
||||
WARN("dwReserved = %ld\n", dwReserved);
|
||||
|
||||
switch(ParseAction) {
|
||||
case PARSE_CANONICALIZE:
|
||||
@@ -431,7 +364,7 @@ HRESULT WINAPI CoInternetCombineUrl(LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl,
|
||||
DWORD size = cchResult;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s,%s,0x%08x,%p,%d,%p,%d)\n", debugstr_w(pwzBaseUrl),
|
||||
TRACE("(%s,%s,0x%08lx,%p,%ld,%p,%ld)\n", debugstr_w(pwzBaseUrl),
|
||||
debugstr_w(pwzRelativeUrl), dwCombineFlags, pwzResult, cchResult, pcchResult,
|
||||
dwReserved);
|
||||
|
||||
@@ -462,7 +395,7 @@ HRESULT WINAPI CoInternetCompareUrl(LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCo
|
||||
IInternetProtocolInfo *protocol_info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s,%s,%08x)\n", debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags);
|
||||
TRACE("(%s,%s,%08lx)\n", debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags);
|
||||
|
||||
protocol_info = get_protocol_info(pwzUrl1);
|
||||
|
||||
@@ -489,7 +422,7 @@ HRESULT WINAPI CoInternetQueryInfo(LPCWSTR pwzUrl, QUERYOPTION QueryOption,
|
||||
IInternetProtocolInfo *protocol_info;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s, %x, %x, %p, %x, %p, %x)\n", debugstr_w(pwzUrl),
|
||||
TRACE("(%s, %x, %lx, %p, %lx, %p, %lx)\n", debugstr_w(pwzUrl),
|
||||
QueryOption, dwQueryFlags, pvBuffer, cbBuffer, pcbBuffer, dwReserved);
|
||||
|
||||
protocol_info = get_protocol_info(pwzUrl);
|
||||
@@ -538,7 +471,7 @@ static HRESULT set_internet_feature(INTERNETFEATURELIST feature, DWORD flags, BO
|
||||
return E_FAIL;
|
||||
|
||||
if(flags & ~supported_flags)
|
||||
FIXME("Unsupported flags: %08x\n", flags & ~supported_flags);
|
||||
FIXME("Unsupported flags: %08lx\n", flags & ~supported_flags);
|
||||
|
||||
if(flags & SET_FEATURE_ON_PROCESS)
|
||||
set_feature_on_process(feature, enable);
|
||||
@@ -552,8 +485,6 @@ static BOOL get_feature_from_reg(HKEY feature_control, LPCWSTR feature_name, LPC
|
||||
HKEY feature;
|
||||
DWORD res;
|
||||
|
||||
static const WCHAR wildcardW[] = {'*',0};
|
||||
|
||||
res = RegOpenKeyW(feature_control, feature_name, &feature);
|
||||
if(res != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
@@ -562,7 +493,7 @@ static BOOL get_feature_from_reg(HKEY feature_control, LPCWSTR feature_name, LPC
|
||||
res = RegQueryValueExW(feature, process_name, NULL, &type, (BYTE*)&value, &size);
|
||||
if(res != ERROR_SUCCESS || type != REG_DWORD) {
|
||||
size = sizeof(DWORD);
|
||||
res = RegQueryValueExW(feature, wildcardW, NULL, &type, (BYTE*)&value, &size);
|
||||
res = RegQueryValueExW(feature, L"*", NULL, &type, (BYTE*)&value, &size);
|
||||
}
|
||||
|
||||
RegCloseKey(feature);
|
||||
@@ -570,7 +501,7 @@ static BOOL get_feature_from_reg(HKEY feature_control, LPCWSTR feature_name, LPC
|
||||
return FALSE;
|
||||
|
||||
if(type != REG_DWORD) {
|
||||
WARN("Unexpected registry value type %d (expected REG_DWORD) for %s\n", type, debugstr_w(wildcardW));
|
||||
WARN("Unexpected registry value type %ld (expected REG_DWORD) for %s\n", type, debugstr_w(L"*"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -590,7 +521,7 @@ static HRESULT load_process_feature(INTERNETFEATURELIST feature)
|
||||
BOOL enabled;
|
||||
|
||||
if (!GetModuleFileNameW(NULL, module_name, ARRAY_SIZE(module_name))) {
|
||||
ERR("Failed to get module file name: %u\n", GetLastError());
|
||||
ERR("Failed to get module file name: %lu\n", GetLastError());
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
@@ -663,7 +594,7 @@ static HRESULT get_internet_feature(INTERNETFEATURELIST feature, DWORD flags)
|
||||
if(flags == GET_FEATURE_FROM_PROCESS)
|
||||
hres = get_feature_from_process(feature);
|
||||
else {
|
||||
FIXME("Unsupported flags: %08x\n", flags);
|
||||
FIXME("Unsupported flags: %08lx\n", flags);
|
||||
hres = E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -675,7 +606,7 @@ static HRESULT get_internet_feature(INTERNETFEATURELIST feature, DWORD flags)
|
||||
*/
|
||||
HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST FeatureEntry, DWORD dwFlags, BOOL fEnable)
|
||||
{
|
||||
TRACE("(%d, %08x, %x)\n", FeatureEntry, dwFlags, fEnable);
|
||||
TRACE("(%d, %08lx, %x)\n", FeatureEntry, dwFlags, fEnable);
|
||||
return set_internet_feature(FeatureEntry, dwFlags, fEnable);
|
||||
}
|
||||
|
||||
@@ -684,7 +615,7 @@ HRESULT WINAPI CoInternetSetFeatureEnabled(INTERNETFEATURELIST FeatureEntry, DWO
|
||||
*/
|
||||
HRESULT WINAPI CoInternetIsFeatureEnabled(INTERNETFEATURELIST FeatureEntry, DWORD dwFlags)
|
||||
{
|
||||
TRACE("(%d, %08x)\n", FeatureEntry, dwFlags);
|
||||
TRACE("(%d, %08lx)\n", FeatureEntry, dwFlags);
|
||||
return get_internet_feature(FeatureEntry, dwFlags);
|
||||
}
|
||||
|
||||
@@ -697,7 +628,7 @@ HRESULT WINAPI CoInternetIsFeatureEnabledForUrl(INTERNETFEATURELIST FeatureEntry
|
||||
DWORD urlaction = 0;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%d %08x %s %p)\n", FeatureEntry, dwFlags, debugstr_w(szURL), pSecMgr);
|
||||
TRACE("(%d %08lx %s %p)\n", FeatureEntry, dwFlags, debugstr_w(szURL), pSecMgr);
|
||||
|
||||
if(FeatureEntry == FEATURE_MIME_SNIFFING)
|
||||
urlaction = URLACTION_FEATURE_MIME_SNIFFING;
|
||||
@@ -716,7 +647,7 @@ HRESULT WINAPI CoInternetIsFeatureEnabledForUrl(INTERNETFEATURELIST FeatureEntry
|
||||
case GET_FEATURE_FROM_THREAD_TRUSTED:
|
||||
case GET_FEATURE_FROM_THREAD_INTERNET:
|
||||
case GET_FEATURE_FROM_THREAD_RESTRICTED:
|
||||
FIXME("unsupported flags %x\n", dwFlags);
|
||||
FIXME("unsupported flags %lx\n", dwFlags);
|
||||
return E_NOTIMPL;
|
||||
|
||||
case GET_FEATURE_FROM_PROCESS:
|
||||
@@ -745,7 +676,7 @@ HRESULT WINAPI CoInternetIsFeatureZoneElevationEnabled(LPCWSTR szFromURL, LPCWST
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%s %s %p %x)\n", debugstr_w(szFromURL), debugstr_w(szToURL), pSecMgr, dwFlags);
|
||||
TRACE("(%s %s %p %lx)\n", debugstr_w(szFromURL), debugstr_w(szToURL), pSecMgr, dwFlags);
|
||||
|
||||
if(!pSecMgr || !szToURL)
|
||||
return CoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, dwFlags);
|
||||
@@ -757,7 +688,7 @@ HRESULT WINAPI CoInternetIsFeatureZoneElevationEnabled(LPCWSTR szFromURL, LPCWST
|
||||
case GET_FEATURE_FROM_THREAD_TRUSTED:
|
||||
case GET_FEATURE_FROM_THREAD_INTERNET:
|
||||
case GET_FEATURE_FROM_THREAD_RESTRICTED:
|
||||
FIXME("unsupported flags %x\n", dwFlags);
|
||||
FIXME("unsupported flags %lx\n", dwFlags);
|
||||
return E_NOTIMPL;
|
||||
|
||||
case GET_FEATURE_FROM_PROCESS:
|
||||
|
||||
@@ -65,7 +65,7 @@ static ULONG WINAPI MimeFilterProtocol_AddRef(IInternetProtocol *iface)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocol(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
@@ -74,10 +74,10 @@ static ULONG WINAPI MimeFilterProtocol_Release(IInternetProtocol *iface)
|
||||
MimeFilter *This = impl_from_IInternetProtocol(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
heap_free(This);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -90,7 +90,7 @@ static HRESULT WINAPI MimeFilterProtocol_Start(IInternetProtocol *iface, LPCWSTR
|
||||
DWORD grfPI, HANDLE_PTR dwReserved)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocol(iface);
|
||||
FIXME("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
FIXME("(%p)->(%s %p %p %08lx %Ix)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -106,14 +106,14 @@ static HRESULT WINAPI MimeFilterProtocol_Abort(IInternetProtocol *iface, HRESULT
|
||||
DWORD dwOptions)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocol(iface);
|
||||
FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
|
||||
FIXME("(%p)->(%08lx %08lx)\n", This, hrReason, dwOptions);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_Terminate(IInternetProtocol *iface, DWORD dwOptions)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocol(iface);
|
||||
FIXME("(%p)->(%08x)\n", This, dwOptions);
|
||||
FIXME("(%p)->(%08lx)\n", This, dwOptions);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ static HRESULT WINAPI MimeFilterProtocol_Read(IInternetProtocol *iface, void *pv
|
||||
ULONG cb, ULONG *pcbRead)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocol(iface);
|
||||
FIXME("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
|
||||
FIXME("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -143,14 +143,14 @@ static HRESULT WINAPI MimeFilterProtocol_Seek(IInternetProtocol *iface, LARGE_IN
|
||||
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocol(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
FIXME("(%p)->(%ld %ld %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MimeFilterProtocol_LockRequest(IInternetProtocol *iface, DWORD dwOptions)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocol(iface);
|
||||
FIXME("(%p)->(%08x)\n", This, dwOptions);
|
||||
FIXME("(%p)->(%08lx)\n", This, dwOptions);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ static HRESULT WINAPI MimeFilterSink_ReportProgress(IInternetProtocolSink *iface
|
||||
ULONG ulStatusCode, LPCWSTR szStatusText)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocolSink(iface);
|
||||
FIXME("(%p)->(%u %s)\n", This, ulStatusCode, debugstr_w(szStatusText));
|
||||
FIXME("(%p)->(%lu %s)\n", This, ulStatusCode, debugstr_w(szStatusText));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ static HRESULT WINAPI MimeFilterSink_ReportData(IInternetProtocolSink *iface,
|
||||
DWORD grfBSCF, ULONG ulProgress, ULONG ulProgressMax)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocolSink(iface);
|
||||
FIXME("(%p)->(%d %u %u)\n", This, grfBSCF, ulProgress, ulProgressMax);
|
||||
FIXME("(%p)->(%ld %lu %lu)\n", This, grfBSCF, ulProgress, ulProgressMax);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ static HRESULT WINAPI MimeFilterSink_ReportResult(IInternetProtocolSink *iface,
|
||||
HRESULT hrResult, DWORD dwError, LPCWSTR szResult)
|
||||
{
|
||||
MimeFilter *This = impl_from_IInternetProtocolSink(iface);
|
||||
FIXME("(%p)->(%08x %d %s)\n", This, hrResult, dwError, debugstr_w(szResult));
|
||||
FIXME("(%p)->(%08lx %ld %s)\n", This, hrResult, dwError, debugstr_w(szResult));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
|
||||
|
||||
URLMON_LockModule();
|
||||
|
||||
ret = heap_alloc_zero(sizeof(MimeFilter));
|
||||
ret = calloc(1, sizeof(MimeFilter));
|
||||
|
||||
ret->IInternetProtocol_iface.lpVtbl = &MimeFilterProtocolVtbl;
|
||||
ret->IInternetProtocolSink_iface.lpVtbl = &InternetProtocolSinkVtbl;
|
||||
@@ -428,14 +428,12 @@ HRESULT find_mime_from_ext(const WCHAR *ext, WCHAR **ret)
|
||||
WCHAR mime[64];
|
||||
HKEY hkey;
|
||||
|
||||
static const WCHAR content_typeW[] = {'C','o','n','t','e','n','t',' ','T','y','p','e','\0'};
|
||||
|
||||
res = RegOpenKeyW(HKEY_CLASSES_ROOT, ext, &hkey);
|
||||
if(res != ERROR_SUCCESS)
|
||||
return HRESULT_FROM_WIN32(res);
|
||||
|
||||
size = sizeof(mime);
|
||||
res = RegQueryValueExW(hkey, content_typeW, NULL, NULL, (LPBYTE)mime, &size);
|
||||
res = RegQueryValueExW(hkey, L"Content Type", NULL, NULL, (BYTE*)mime, &size);
|
||||
RegCloseKey(hkey);
|
||||
if(res != ERROR_SUCCESS)
|
||||
return HRESULT_FROM_WIN32(res);
|
||||
@@ -469,7 +467,7 @@ static HRESULT find_mime_from_url(const WCHAR *url, WCHAR **ret)
|
||||
if(*end_ptr) {
|
||||
unsigned len = end_ptr-ptr;
|
||||
|
||||
ext = heap_alloc((len+1)*sizeof(WCHAR));
|
||||
ext = malloc((len + 1) * sizeof(WCHAR));
|
||||
if(!ext)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -478,67 +476,44 @@ static HRESULT find_mime_from_url(const WCHAR *url, WCHAR **ret)
|
||||
}
|
||||
|
||||
hres = find_mime_from_ext(ext ? ext : ptr, ret);
|
||||
heap_free(ext);
|
||||
free(ext);
|
||||
return hres;
|
||||
}
|
||||
|
||||
static const WCHAR text_htmlW[] = {'t','e','x','t','/','h','t','m','l',0};
|
||||
static const WCHAR text_richtextW[] = {'t','e','x','t','/','r','i','c','h','t','e','x','t',0};
|
||||
static const WCHAR text_xmlW[] = {'t','e','x','t','/','x','m','l',0};
|
||||
static const WCHAR audio_basicW[] = {'a','u','d','i','o','/','b','a','s','i','c',0};
|
||||
static const WCHAR audio_wavW[] = {'a','u','d','i','o','/','w','a','v',0};
|
||||
static const WCHAR image_gifW[] = {'i','m','a','g','e','/','g','i','f',0};
|
||||
static const WCHAR image_pjpegW[] = {'i','m','a','g','e','/','p','j','p','e','g',0};
|
||||
static const WCHAR image_tiffW[] = {'i','m','a','g','e','/','t','i','f','f',0};
|
||||
static const WCHAR image_xpngW[] = {'i','m','a','g','e','/','x','-','p','n','g',0};
|
||||
static const WCHAR image_bmpW[] = {'i','m','a','g','e','/','b','m','p',0};
|
||||
static const WCHAR video_aviW[] = {'v','i','d','e','o','/','a','v','i',0};
|
||||
static const WCHAR video_mpegW[] = {'v','i','d','e','o','/','m','p','e','g',0};
|
||||
static const WCHAR app_postscriptW[] =
|
||||
{'a','p','p','l','i','c','a','t','i','o','n','/','p','o','s','t','s','c','r','i','p','t',0};
|
||||
static const WCHAR app_pdfW[] = {'a','p','p','l','i','c','a','t','i','o','n','/','p','d','f',0};
|
||||
static const WCHAR app_xzipW[] = {'a','p','p','l','i','c','a','t','i','o','n','/',
|
||||
'x','-','z','i','p','-','c','o','m','p','r','e','s','s','e','d',0};
|
||||
static const WCHAR app_xgzipW[] = {'a','p','p','l','i','c','a','t','i','o','n','/',
|
||||
'x','-','g','z','i','p','-','c','o','m','p','r','e','s','s','e','d',0};
|
||||
static const WCHAR app_javaW[] = {'a','p','p','l','i','c','a','t','i','o','n','/','j','a','v','a',0};
|
||||
static const WCHAR app_xmsdownloadW[] = {'a','p','p','l','i','c','a','t','i','o','n','/',
|
||||
'x','-','m','s','d','o','w','n','l','o','a','d',0};
|
||||
static const WCHAR text_plainW[] = {'t','e','x','t','/','p','l','a','i','n','\0'};
|
||||
static const WCHAR app_octetstreamW[] = {'a','p','p','l','i','c','a','t','i','o','n','/',
|
||||
'o','c','t','e','t','-','s','t','r','e','a','m','\0'};
|
||||
static const WCHAR text_plainW[] = L"text/plain";
|
||||
static const WCHAR app_octetstreamW[] = L"application/octet-stream";
|
||||
|
||||
static const struct {
|
||||
const WCHAR *mime;
|
||||
BOOL (*filter)(const BYTE *,DWORD);
|
||||
} mime_filters_any_pos[] = {
|
||||
{text_htmlW, text_html_filter},
|
||||
{text_xmlW, text_xml_filter}
|
||||
{L"text/html", text_html_filter},
|
||||
{L"text/xml", text_xml_filter}
|
||||
}, mime_filters[] = {
|
||||
{text_richtextW, text_richtext_filter},
|
||||
/* {audio_xaiffW, audio_xaiff_filter}, */
|
||||
{audio_basicW, audio_basic_filter},
|
||||
{audio_wavW, audio_wav_filter},
|
||||
{image_gifW, image_gif_filter},
|
||||
{image_pjpegW, image_pjpeg_filter},
|
||||
{image_tiffW, image_tiff_filter},
|
||||
{image_xpngW, image_xpng_filter},
|
||||
/* {image_xbitmapW, image_xbitmap_filter}, */
|
||||
{image_bmpW, image_bmp_filter},
|
||||
/* {image_xjgW, image_xjg_filter}, */
|
||||
/* {image_xemfW, image_xemf_filter}, */
|
||||
/* {image_xwmfW, image_xwmf_filter}, */
|
||||
{video_aviW, video_avi_filter},
|
||||
{video_mpegW, video_mpeg_filter},
|
||||
{app_postscriptW, application_postscript_filter},
|
||||
/* {app_base64W, application_base64_filter}, */
|
||||
/* {app_macbinhex40W, application_macbinhex40_filter}, */
|
||||
{app_pdfW, application_pdf_filter},
|
||||
/* {app_zcompressedW, application_xcompressed_filter}, */
|
||||
{app_xzipW, application_xzip_filter},
|
||||
{app_xgzipW, application_xgzip_filter},
|
||||
{app_javaW, application_java_filter},
|
||||
{app_xmsdownloadW, application_xmsdownload},
|
||||
{L"text/richtext", text_richtext_filter},
|
||||
/* {L"audio/x-aiff", audio_xaiff_filter}, */
|
||||
{L"audio/basic", audio_basic_filter},
|
||||
{L"audio/wav", audio_wav_filter},
|
||||
{L"image/gif", image_gif_filter},
|
||||
{L"image/pjpeg", image_pjpeg_filter},
|
||||
{L"image/tiff", image_tiff_filter},
|
||||
{L"image/x-png", image_xpng_filter},
|
||||
/* {L"image/x-bitmap", image_xbitmap_filter}, */
|
||||
{L"image/bmp", image_bmp_filter},
|
||||
/* {L"image/x-jg", image_xjg_filter}, */
|
||||
/* {L"image/x-emf", image_xemf_filter}, */
|
||||
/* {L"image/x-wmf", image_xwmf_filter}, */
|
||||
{L"video/avi", video_avi_filter},
|
||||
{L"video/mpeg", video_mpeg_filter},
|
||||
{L"application/postscript", application_postscript_filter},
|
||||
/* {L"application/base64", application_base64_filter}, */
|
||||
/* {L"application/mac-binhex40", application_macbinhex40_filter}, */
|
||||
{L"application/pdf", application_pdf_filter},
|
||||
/* {L"application/x-compressed", application_xcompressed_filter}, */
|
||||
{L"application/x-zip-compressed", application_xzip_filter},
|
||||
{L"application/x-gzip-compressed", application_xgzip_filter},
|
||||
{L"application/java", application_java_filter},
|
||||
{L"application/x-msdownload", application_xmsdownload},
|
||||
{text_plainW, text_plain_filter},
|
||||
{app_octetstreamW, application_octet_stream_filter}
|
||||
};
|
||||
@@ -681,13 +656,13 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
|
||||
DWORD cbSize, LPCWSTR pwzMimeProposed, DWORD dwMimeFlags,
|
||||
LPWSTR* ppwzMimeOut, DWORD dwReserved)
|
||||
{
|
||||
TRACE("(%p,%s,%p,%d,%s,0x%x,%p,0x%x)\n", pBC, debugstr_w(pwzUrl), pBuffer, cbSize,
|
||||
TRACE("(%p,%s,%p,%ld,%s,0x%lx,%p,0x%lx)\n", pBC, debugstr_w(pwzUrl), pBuffer, cbSize,
|
||||
debugstr_w(pwzMimeProposed), dwMimeFlags, ppwzMimeOut, dwReserved);
|
||||
|
||||
if(dwMimeFlags)
|
||||
WARN("dwMimeFlags=%08x\n", dwMimeFlags);
|
||||
WARN("dwMimeFlags=%08lx\n", dwMimeFlags);
|
||||
if(dwReserved)
|
||||
WARN("dwReserved=%d\n", dwReserved);
|
||||
WARN("dwReserved=%ld\n", dwReserved);
|
||||
|
||||
/* pBC seems to not be used */
|
||||
|
||||
|
||||
+19
-19
@@ -74,7 +74,7 @@ static ULONG WINAPI MkProtocolUnk_AddRef(IUnknown *iface)
|
||||
{
|
||||
MkProtocol *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
return ref;
|
||||
}
|
||||
|
||||
@@ -83,13 +83,13 @@ static ULONG WINAPI MkProtocolUnk_Release(IUnknown *iface)
|
||||
MkProtocol *This = impl_from_IUnknown(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if(!ref) {
|
||||
if(This->stream)
|
||||
IStream_Release(This->stream);
|
||||
|
||||
heap_free(This);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -138,7 +138,7 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szUrl
|
||||
HRESULT hres;
|
||||
IUri *uri;
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
TRACE("(%p)->(%s %p %p %08lx %Ix)\n", This, debugstr_w(szUrl), pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
hres = CreateUri(szUrl, 0, 0, &uri);
|
||||
@@ -163,7 +163,7 @@ static HRESULT WINAPI MkProtocol_Abort(IInternetProtocolEx *iface, HRESULT hrRea
|
||||
DWORD dwOptions)
|
||||
{
|
||||
MkProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
|
||||
FIXME("(%p)->(%08lx %08lx)\n", This, hrReason, dwOptions);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ static HRESULT WINAPI MkProtocol_Terminate(IInternetProtocolEx *iface, DWORD dwO
|
||||
{
|
||||
MkProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ static HRESULT WINAPI MkProtocol_Read(IInternetProtocolEx *iface, void *pv,
|
||||
{
|
||||
MkProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead);
|
||||
TRACE("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead);
|
||||
|
||||
if(!This->stream)
|
||||
return E_FAIL;
|
||||
@@ -207,7 +207,7 @@ static HRESULT WINAPI MkProtocol_Seek(IInternetProtocolEx *iface, LARGE_INTEGER
|
||||
DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||
{
|
||||
MkProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
FIXME("(%p)->(%d %d %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
FIXME("(%p)->(%ld %ld %p)\n", This, dlibMove.u.LowPart, dwOrigin, plibNewPosition);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ static HRESULT WINAPI MkProtocol_LockRequest(IInternetProtocolEx *iface, DWORD d
|
||||
{
|
||||
MkProtocol *This = impl_from_IInternetProtocolEx(iface);
|
||||
|
||||
TRACE("(%p)->(%08x)\n", This, dwOptions);
|
||||
TRACE("(%p)->(%08lx)\n", This, dwOptions);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -244,7 +244,7 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
|
||||
HRESULT hres;
|
||||
CLSID clsid;
|
||||
|
||||
TRACE("(%p)->(%p %p %p %08x %p)\n", This, pUri, pOIProtSink,
|
||||
TRACE("(%p)->(%p %p %p %08lx %p)\n", This, pUri, pOIProtSink,
|
||||
pOIBindInfo, grfPI, dwReserved);
|
||||
|
||||
hres = IUri_GetScheme(pUri, &scheme);
|
||||
@@ -257,7 +257,7 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
|
||||
bindinfo.cbSize = sizeof(BINDINFO);
|
||||
hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bindf, &bindinfo);
|
||||
if(FAILED(hres)) {
|
||||
WARN("GetBindInfo failed: %08x\n", hres);
|
||||
WARN("GetBindInfo failed: %08lx\n", hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
|
||||
}
|
||||
|
||||
len = lstrlenW(path);
|
||||
display_name = heap_alloc((len+1)*sizeof(WCHAR));
|
||||
display_name = malloc((len + 1) * sizeof(WCHAR));
|
||||
memcpy(display_name, path, (len+1)*sizeof(WCHAR));
|
||||
|
||||
progid[colon_ptr-progid] = 0; /* overwrite ':' with NULL terminator */
|
||||
@@ -301,7 +301,7 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
|
||||
SysFreeString(path);
|
||||
if(FAILED(hres))
|
||||
{
|
||||
heap_free(display_name);
|
||||
free(display_name);
|
||||
return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -309,15 +309,15 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
|
||||
&IID_IParseDisplayName, (void**)&pdn);
|
||||
if(FAILED(hres)) {
|
||||
WARN("Could not create object %s\n", debugstr_guid(&clsid));
|
||||
heap_free(display_name);
|
||||
free(display_name);
|
||||
return report_result(pOIProtSink, hres, ERROR_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
hres = IParseDisplayName_ParseDisplayName(pdn, NULL /* FIXME */, display_name, &eaten, &mon);
|
||||
heap_free(display_name);
|
||||
free(display_name);
|
||||
IParseDisplayName_Release(pdn);
|
||||
if(FAILED(hres)) {
|
||||
WARN("ParseDisplayName failed: %08x\n", hres);
|
||||
WARN("ParseDisplayName failed: %08lx\n", hres);
|
||||
return report_result(pOIProtSink, hres, ERROR_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -329,13 +329,13 @@ static HRESULT WINAPI MkProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUri,
|
||||
hres = IMoniker_BindToStorage(mon, NULL /* FIXME */, NULL, &IID_IStream, (void**)&This->stream);
|
||||
IMoniker_Release(mon);
|
||||
if(FAILED(hres)) {
|
||||
WARN("BindToStorage failed: %08x\n", hres);
|
||||
WARN("BindToStorage failed: %08lx\n", hres);
|
||||
return report_result(pOIProtSink, hres, ERROR_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
hres = IStream_Stat(This->stream, &statstg, STATFLAG_NONAME);
|
||||
if(FAILED(hres)) {
|
||||
WARN("Stat failed: %08x\n", hres);
|
||||
WARN("Stat failed: %08lx\n", hres);
|
||||
return report_result(pOIProtSink, hres, ERROR_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ HRESULT MkProtocol_Construct(IUnknown *outer, void **ppv)
|
||||
|
||||
URLMON_LockModule();
|
||||
|
||||
ret = heap_alloc(sizeof(MkProtocol));
|
||||
ret = malloc(sizeof(MkProtocol));
|
||||
|
||||
ret->IUnknown_inner.lpVtbl = &MkProtocolUnkVtbl;
|
||||
ret->IInternetProtocolEx_iface.lpVtbl = &MkProtocolVtbl;
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#define _INC_WINDOWS
|
||||
#define COM_NO_WINDOWS_H
|
||||
|
||||
#define NONAMELESSUNION
|
||||
#define NONAMELESSSTRUCT
|
||||
#define OEMRESOURCE
|
||||
|
||||
#include "urlmon_main.h"
|
||||
|
||||
+15
-15
@@ -113,7 +113,7 @@ HRESULT protocol_syncbinding(Protocol *protocol)
|
||||
if(res)
|
||||
protocol->available_bytes = protocol->query_available;
|
||||
else
|
||||
WARN("InternetQueryDataAvailable failed: %u\n", GetLastError());
|
||||
WARN("InternetQueryDataAvailable failed: %lu\n", GetLastError());
|
||||
|
||||
protocol->flags |= FLAG_FIRST_DATA_REPORTED|FLAG_LAST_DATA_REPORTED;
|
||||
IInternetProtocolSink_ReportData(protocol->protocol_sink, BSCF_LASTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE,
|
||||
@@ -171,12 +171,12 @@ static void WINAPI internet_status_callback(HINTERNET internet, DWORD_PTR contex
|
||||
|
||||
TRACE("%p INTERNET_STATUS_CONNECTING_TO_SERVER %s\n", protocol, (const char*)status_info);
|
||||
|
||||
info = heap_strdupAtoW(status_info);
|
||||
info = strdupAtoW(status_info);
|
||||
if(!info)
|
||||
return;
|
||||
|
||||
report_progress(protocol, BINDSTATUS_CONNECTING, info);
|
||||
heap_free(info);
|
||||
free(info);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ static void WINAPI internet_status_callback(HINTERNET internet, DWORD_PTR contex
|
||||
break;
|
||||
|
||||
default:
|
||||
WARN("Unhandled Internet status callback %d\n", internet_status);
|
||||
WARN("Unhandled Internet status callback %ld\n", internet_status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ static HRESULT write_post_stream(Protocol *protocol)
|
||||
break;
|
||||
res = InternetWriteFile(protocol->request, buf, size, &written);
|
||||
if(!res) {
|
||||
FIXME("InternetWriteFile failed: %u\n", GetLastError());
|
||||
FIXME("InternetWriteFile failed: %lu\n", GetLastError());
|
||||
hres = E_FAIL;
|
||||
break;
|
||||
}
|
||||
@@ -274,10 +274,10 @@ static HINTERNET create_internet_session(IInternetBindInfo *bind_info)
|
||||
global_user_agent = get_useragent();
|
||||
|
||||
ret = InternetOpenW(user_agent ? user_agent : global_user_agent, 0, NULL, NULL, INTERNET_FLAG_ASYNC);
|
||||
heap_free(global_user_agent);
|
||||
free(global_user_agent);
|
||||
CoTaskMemFree(user_agent);
|
||||
if(!ret) {
|
||||
WARN("InternetOpen failed: %d\n", GetLastError());
|
||||
WARN("InternetOpen failed: %ld\n", GetLastError());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ HRESULT protocol_start(Protocol *protocol, IInternetProtocol *prot, IUri *uri,
|
||||
protocol->bind_info.cbSize = sizeof(BINDINFO);
|
||||
hres = IInternetBindInfo_GetBindInfo(bind_info, &protocol->bindf, &protocol->bind_info);
|
||||
if(hres != S_OK) {
|
||||
WARN("GetBindInfo failed: %08x\n", hres);
|
||||
WARN("GetBindInfo failed: %08lx\n", hres);
|
||||
return report_result(protocol, hres);
|
||||
}
|
||||
|
||||
@@ -397,7 +397,7 @@ HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data)
|
||||
protocol->flags &= ~FLAG_REQUEST_COMPLETE;
|
||||
res = InternetQueryDataAvailable(protocol->request, &protocol->query_available, 0, 0);
|
||||
if(res) {
|
||||
TRACE("available %u bytes\n", protocol->query_available);
|
||||
TRACE("available %lu bytes\n", protocol->query_available);
|
||||
if(!protocol->query_available) {
|
||||
all_data_read(protocol);
|
||||
return S_OK;
|
||||
@@ -405,7 +405,7 @@ HRESULT protocol_continue(Protocol *protocol, PROTOCOLDATA *data)
|
||||
protocol->available_bytes = protocol->query_available;
|
||||
}else if(GetLastError() != ERROR_IO_PENDING) {
|
||||
protocol->flags |= FLAG_REQUEST_COMPLETE;
|
||||
WARN("InternetQueryDataAvailable failed: %d\n", GetLastError());
|
||||
WARN("InternetQueryDataAvailable failed: %ld\n", GetLastError());
|
||||
report_result(protocol, INET_E_DATA_NOT_AVAILABLE);
|
||||
return S_OK;
|
||||
}
|
||||
@@ -442,7 +442,7 @@ HRESULT protocol_read(Protocol *protocol, void *buf, ULONG size, ULONG *read_ret
|
||||
res = InternetReadFile(protocol->request, ((BYTE *)buf)+read,
|
||||
protocol->available_bytes > size-read ? size-read : protocol->available_bytes, &len);
|
||||
if(!res) {
|
||||
WARN("InternetReadFile failed: %d\n", GetLastError());
|
||||
WARN("InternetReadFile failed: %ld\n", GetLastError());
|
||||
hres = INET_E_DOWNLOAD_FAILURE;
|
||||
report_result(protocol, hres);
|
||||
break;
|
||||
@@ -457,7 +457,7 @@ HRESULT protocol_read(Protocol *protocol, void *buf, ULONG size, ULONG *read_ret
|
||||
protocol->current_position += len;
|
||||
protocol->available_bytes -= len;
|
||||
|
||||
TRACE("current_position %d, available_bytes %d\n", protocol->current_position, protocol->available_bytes);
|
||||
TRACE("current_position %ld, available_bytes %ld\n", protocol->current_position, protocol->available_bytes);
|
||||
|
||||
if(!protocol->available_bytes) {
|
||||
/* InternetQueryDataAvailable may immediately fork and perform its asynchronous
|
||||
@@ -469,7 +469,7 @@ HRESULT protocol_read(Protocol *protocol, void *buf, ULONG size, ULONG *read_ret
|
||||
if (GetLastError() == ERROR_IO_PENDING) {
|
||||
hres = E_PENDING;
|
||||
}else {
|
||||
WARN("InternetQueryDataAvailable failed: %d\n", GetLastError());
|
||||
WARN("InternetQueryDataAvailable failed: %ld\n", GetLastError());
|
||||
hres = INET_E_DATA_NOT_AVAILABLE;
|
||||
report_result(protocol, hres);
|
||||
}
|
||||
@@ -498,7 +498,7 @@ HRESULT protocol_read(Protocol *protocol, void *buf, ULONG size, ULONG *read_ret
|
||||
HRESULT protocol_lock_request(Protocol *protocol)
|
||||
{
|
||||
if (!InternetLockRequestFile(protocol->request, &protocol->lock))
|
||||
WARN("InternetLockRequest failed: %d\n", GetLastError());
|
||||
WARN("InternetLockRequestFile failed: %ld\n", GetLastError());
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -509,7 +509,7 @@ HRESULT protocol_unlock_request(Protocol *protocol)
|
||||
return S_OK;
|
||||
|
||||
if(!InternetUnlockRequestFile(protocol->lock))
|
||||
WARN("InternetUnlockRequest failed: %d\n", GetLastError());
|
||||
WARN("InternetUnlockRequestFile failed: %ld\n", GetLastError());
|
||||
protocol->lock = 0;
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ID_AXINSTALL_WARNING_DLG 1000
|
||||
#define ID_AXINSTALL_LOCATION 1001
|
||||
#define ID_AXINSTALL_INSTALL_BTN 1002
|
||||
|
||||
+112
-156
@@ -33,35 +33,12 @@
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
|
||||
|
||||
static const WCHAR currentlevelW[] = {'C','u','r','r','e','n','t','L','e','v','e','l',0};
|
||||
static const WCHAR descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0};
|
||||
static const WCHAR displaynameW[] = {'D','i','s','p','l','a','y','N','a','m','e',0};
|
||||
static const WCHAR fileW[] = {'f','i','l','e',0};
|
||||
static const WCHAR flagsW[] = {'F','l','a','g','s',0};
|
||||
static const WCHAR iconW[] = {'I','c','o','n',0};
|
||||
static const WCHAR minlevelW[] = {'M','i','n','L','e','v','e','l',0};
|
||||
static const WCHAR recommendedlevelW[] = {'R','e','c','o','m','m','e','n','d','e','d',
|
||||
'L','e','v','e','l',0};
|
||||
static const WCHAR wszZonesKey[] = {'S','o','f','t','w','a','r','e','\\',
|
||||
'M','i','c','r','o','s','o','f','t','\\',
|
||||
'W','i','n','d','o','w','s','\\',
|
||||
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
|
||||
'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\',
|
||||
'Z','o','n','e','s','\\',0};
|
||||
static const WCHAR zone_map_keyW[] = {'S','o','f','t','w','a','r','e','\\',
|
||||
'M','i','c','r','o','s','o','f','t','\\',
|
||||
'W','i','n','d','o','w','s','\\',
|
||||
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
|
||||
'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\',
|
||||
'Z','o','n','e','M','a','p',0};
|
||||
static const WCHAR wszZoneMapDomainsKey[] = {'S','o','f','t','w','a','r','e','\\',
|
||||
'M','i','c','r','o','s','o','f','t','\\',
|
||||
'W','i','n','d','o','w','s','\\',
|
||||
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
|
||||
'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\',
|
||||
'Z','o','n','e','M','a','p','\\',
|
||||
'D','o','m','a','i','n','s',0};
|
||||
static const WCHAR wszZonesKey[] =
|
||||
L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\";
|
||||
static const WCHAR zone_map_keyW[] =
|
||||
L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap";
|
||||
static const WCHAR wszZoneMapDomainsKey[] =
|
||||
L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains";
|
||||
|
||||
static inline BOOL is_drive_path(const WCHAR *path)
|
||||
{
|
||||
@@ -98,7 +75,7 @@ static void get_string_from_reg(HKEY hcu, HKEY hklm, LPCWSTR name, LPWSTR out, D
|
||||
}
|
||||
|
||||
if (res) {
|
||||
TRACE("%s failed: %d\n", debugstr_w(name), res);
|
||||
TRACE("%s failed: %ld\n", debugstr_w(name), res);
|
||||
*out = '\0';
|
||||
}
|
||||
}
|
||||
@@ -124,7 +101,7 @@ static void get_dword_from_reg(HKEY hcu, HKEY hklm, LPCWSTR name, LPDWORD out)
|
||||
}
|
||||
|
||||
if (res) {
|
||||
TRACE("%s failed: %d\n", debugstr_w(name), res);
|
||||
TRACE("%s failed: %ld\n", debugstr_w(name), res);
|
||||
*out = 0;
|
||||
}
|
||||
}
|
||||
@@ -135,13 +112,7 @@ static HRESULT get_zone_from_reg(LPCWSTR schema, DWORD *zone)
|
||||
HKEY hkey;
|
||||
|
||||
static const WCHAR wszZoneMapProtocolKey[] =
|
||||
{'S','o','f','t','w','a','r','e','\\',
|
||||
'M','i','c','r','o','s','o','f','t','\\',
|
||||
'W','i','n','d','o','w','s','\\',
|
||||
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
|
||||
'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\',
|
||||
'Z','o','n','e','M','a','p','\\',
|
||||
'P','r','o','t','o','c','o','l','D','e','f','a','u','l','t','s',0};
|
||||
L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\ProtocolDefaults";
|
||||
|
||||
res = RegOpenKeyW(HKEY_CURRENT_USER, wszZoneMapProtocolKey, &hkey);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
@@ -262,8 +233,6 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w
|
||||
|
||||
static BOOL get_zone_for_scheme(HKEY key, LPCWSTR schema, DWORD *zone)
|
||||
{
|
||||
static const WCHAR wildcardW[] = {'*',0};
|
||||
|
||||
DWORD res;
|
||||
DWORD size = sizeof(DWORD);
|
||||
DWORD type;
|
||||
@@ -273,17 +242,17 @@ static BOOL get_zone_for_scheme(HKEY key, LPCWSTR schema, DWORD *zone)
|
||||
if(res == ERROR_SUCCESS) {
|
||||
if(type == REG_DWORD)
|
||||
return TRUE;
|
||||
WARN("Unexpected value type %d for value %s, expected REG_DWORD\n", type, debugstr_w(schema));
|
||||
WARN("Unexpected value type %ld for value %s, expected REG_DWORD\n", type, debugstr_w(schema));
|
||||
}
|
||||
|
||||
/* Try to get the zone for the wildcard scheme. */
|
||||
size = sizeof(DWORD);
|
||||
res = RegQueryValueExW(key, wildcardW, NULL, &type, (BYTE*)zone, &size);
|
||||
res = RegQueryValueExW(key, L"*", NULL, &type, (BYTE*)zone, &size);
|
||||
if(res != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
if(type != REG_DWORD) {
|
||||
WARN("Unexpected value type %d for value %s, expected REG_DWORD\n", type, debugstr_w(wildcardW));
|
||||
WARN("Unexpected value type %ld for value %s, expected REG_DWORD\n", type, debugstr_w(L"*"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -309,7 +278,7 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain
|
||||
if(host_len >= domain_len && matches_domain_pattern(domain, host, TRUE, &matched)) {
|
||||
res = RegOpenKeyW(domains, domain, &domain_key);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
ERR("Failed to open domain key %s: %d\n", debugstr_w(domain), res);
|
||||
ERR("Failed to open domain key %s: %ld\n", debugstr_w(domain), res);
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
@@ -325,7 +294,7 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain
|
||||
res = RegQueryInfoKeyW(domain_key, NULL, NULL, NULL, &subdomain_count, &subdomain_len,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
ERR("Unable to query info for key %s: %d\n", debugstr_w(domain), res);
|
||||
ERR("Unable to query info for key %s: %ld\n", debugstr_w(domain), res);
|
||||
RegCloseKey(domain_key);
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
@@ -335,15 +304,15 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain
|
||||
WCHAR *component;
|
||||
DWORD i;
|
||||
|
||||
subdomain = heap_alloc((subdomain_len+1)*sizeof(WCHAR));
|
||||
subdomain = malloc((subdomain_len + 1) * sizeof(WCHAR));
|
||||
if(!subdomain) {
|
||||
RegCloseKey(domain_key);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
component = heap_strndupW(host, matched-host-1);
|
||||
component = strndupW(host, matched-host - 1);
|
||||
if(!component) {
|
||||
heap_free(subdomain);
|
||||
free(subdomain);
|
||||
RegCloseKey(domain_key);
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
@@ -354,8 +323,8 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain
|
||||
|
||||
res = RegEnumKeyExW(domain_key, i, subdomain, &len, NULL, NULL, NULL, NULL);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
heap_free(component);
|
||||
heap_free(subdomain);
|
||||
free(component);
|
||||
free(subdomain);
|
||||
RegCloseKey(domain_key);
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
@@ -365,10 +334,10 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain
|
||||
|
||||
res = RegOpenKeyW(domain_key, subdomain, &subdomain_key);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
ERR("Unable to open subdomain key %s of %s: %d\n", debugstr_w(subdomain),
|
||||
ERR("Unable to open subdomain key %s of %s: %ld\n", debugstr_w(subdomain),
|
||||
debugstr_w(domain), res);
|
||||
heap_free(component);
|
||||
heap_free(subdomain);
|
||||
free(component);
|
||||
free(subdomain);
|
||||
RegCloseKey(domain_key);
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
@@ -379,8 +348,8 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain
|
||||
break;
|
||||
}
|
||||
}
|
||||
heap_free(subdomain);
|
||||
heap_free(component);
|
||||
free(subdomain);
|
||||
free(component);
|
||||
}
|
||||
|
||||
/* There's a chance that 'host' implicitly mapped into 'domain', in
|
||||
@@ -431,7 +400,7 @@ static HRESULT search_for_domain_mapping(HKEY domains, LPCWSTR schema, LPCWSTR h
|
||||
if(!domain_count)
|
||||
return S_FALSE;
|
||||
|
||||
domain = heap_alloc((domain_len+1)*sizeof(WCHAR));
|
||||
domain = malloc((domain_len + 1) * sizeof(WCHAR));
|
||||
if(!domain)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -440,7 +409,7 @@ static HRESULT search_for_domain_mapping(HKEY domains, LPCWSTR schema, LPCWSTR h
|
||||
|
||||
res = RegEnumKeyExW(domains, i, domain, &len, NULL, NULL, NULL, NULL);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
heap_free(domain);
|
||||
free(domain);
|
||||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
@@ -449,7 +418,7 @@ static HRESULT search_for_domain_mapping(HKEY domains, LPCWSTR schema, LPCWSTR h
|
||||
break;
|
||||
}
|
||||
|
||||
heap_free(domain);
|
||||
free(domain);
|
||||
return hres;
|
||||
}
|
||||
|
||||
@@ -528,7 +497,7 @@ static HRESULT map_security_uri_to_zone(IUri *uri, DWORD *zone)
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
if(!wcsicmp(scheme, fileW)) {
|
||||
if(!wcsicmp(scheme, L"file")) {
|
||||
BSTR path;
|
||||
WCHAR *ptr, *path_start, root[20];
|
||||
|
||||
@@ -639,12 +608,10 @@ static HRESULT map_uri_to_zone(IUri *uri, DWORD *zone, IUri **ret_uri)
|
||||
|
||||
static HRESULT open_zone_key(HKEY parent_key, DWORD zone, HKEY *hkey)
|
||||
{
|
||||
static const WCHAR wszFormat[] = {'%','s','%','u',0};
|
||||
|
||||
WCHAR key_name[ARRAY_SIZE(wszZonesKey) + 12];
|
||||
DWORD res;
|
||||
|
||||
wsprintfW(key_name, wszFormat, wszZonesKey, zone);
|
||||
wsprintfW(key_name, L"%s%u", wszZonesKey, zone);
|
||||
|
||||
res = RegOpenKeyW(parent_key, key_name, hkey);
|
||||
|
||||
@@ -688,9 +655,7 @@ static HRESULT get_action_policy(DWORD zone, DWORD action, BYTE *policy, DWORD s
|
||||
WCHAR action_str[16];
|
||||
DWORD len = size;
|
||||
|
||||
static const WCHAR formatW[] = {'%','X',0};
|
||||
|
||||
wsprintfW(action_str, formatW, action);
|
||||
wsprintfW(action_str, L"%X", action);
|
||||
|
||||
res = RegQueryValueExW(hkey, action_str, NULL, NULL, policy, &len);
|
||||
if(res == ERROR_MORE_DATA) {
|
||||
@@ -698,7 +663,7 @@ static HRESULT get_action_policy(DWORD zone, DWORD action, BYTE *policy, DWORD s
|
||||
}else if(res == ERROR_FILE_NOT_FOUND) {
|
||||
hres = E_FAIL;
|
||||
}else if(res != ERROR_SUCCESS) {
|
||||
ERR("RegQueryValue failed: %d\n", res);
|
||||
ERR("RegQueryValue failed: %ld\n", res);
|
||||
hres = E_UNEXPECTED;
|
||||
}
|
||||
|
||||
@@ -879,7 +844,7 @@ static ULONG WINAPI SecManagerImpl_AddRef(IInternetSecurityManagerEx2* iface)
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
ULONG refCount = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%u\n", This, refCount);
|
||||
TRACE("(%p) ref=%lu\n", This, refCount);
|
||||
|
||||
return refCount;
|
||||
}
|
||||
@@ -889,7 +854,7 @@ static ULONG WINAPI SecManagerImpl_Release(IInternetSecurityManagerEx2* iface)
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
ULONG refCount = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%u\n", This, refCount);
|
||||
TRACE("(%p) ref=%lu\n", This, refCount);
|
||||
|
||||
/* destroy the object if there are no more references on it */
|
||||
if (!refCount){
|
||||
@@ -898,7 +863,7 @@ static ULONG WINAPI SecManagerImpl_Release(IInternetSecurityManagerEx2* iface)
|
||||
if(This->custom_manager)
|
||||
IInternetSecurityManager_Release(This->custom_manager);
|
||||
|
||||
heap_free(This);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -965,7 +930,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZone(IInternetSecurityManagerEx2 *i
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %p %08x)\n", iface, debugstr_w(pwszUrl), pdwZone, dwFlags);
|
||||
TRACE("(%p)->(%s %p %08lx)\n", iface, debugstr_w(pwszUrl), pdwZone, dwFlags);
|
||||
|
||||
if(This->custom_manager) {
|
||||
hres = IInternetSecurityManager_MapUrlToZone(This->custom_manager,
|
||||
@@ -980,7 +945,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZone(IInternetSecurityManagerEx2 *i
|
||||
}
|
||||
|
||||
if(dwFlags)
|
||||
FIXME("not supported flags: %08x\n", dwFlags);
|
||||
FIXME("not supported flags: %08lx\n", dwFlags);
|
||||
|
||||
return map_url_to_zone(pwszUrl, pdwZone, NULL);
|
||||
}
|
||||
@@ -990,7 +955,7 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManagerEx2 *
|
||||
{
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
|
||||
TRACE("(%p)->(%s %p %p %08lx)\n", iface, debugstr_w(pwszUrl), pbSecurityId,
|
||||
TRACE("(%p)->(%s %p %p %08Ix)\n", iface, debugstr_w(pwszUrl), pbSecurityId,
|
||||
pcbSecurityId, dwReserved);
|
||||
|
||||
if(This->custom_manager) {
|
||||
@@ -1022,7 +987,7 @@ static HRESULT WINAPI SecManagerImpl_ProcessUrlAction(IInternetSecurityManagerEx
|
||||
DWORD zone, policy;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %08x %p %08x %p %08x %08x %08x)\n", iface, debugstr_w(pwszUrl), dwAction,
|
||||
TRACE("(%p)->(%s %08lx %p %08lx %p %08lx %08lx %08lx)\n", iface, debugstr_w(pwszUrl), dwAction,
|
||||
pPolicy, cbPolicy, pContext, cbContext, dwFlags, dwReserved);
|
||||
|
||||
if(This->custom_manager) {
|
||||
@@ -1046,7 +1011,7 @@ static HRESULT WINAPI SecManagerImpl_ProcessUrlAction(IInternetSecurityManagerEx
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
TRACE("policy %x\n", policy);
|
||||
TRACE("policy %lx\n", policy);
|
||||
if(cbPolicy >= sizeof(DWORD))
|
||||
*(DWORD*)pPolicy = policy;
|
||||
|
||||
@@ -1060,7 +1025,7 @@ static HRESULT WINAPI SecManagerImpl_ProcessUrlAction(IInternetSecurityManagerEx
|
||||
FIXME("URLPOLICY_QUERY not implemented\n");
|
||||
return E_FAIL;
|
||||
default:
|
||||
FIXME("Not implemented policy %x\n", policy);
|
||||
FIXME("Not implemented policy %lx\n", policy);
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
@@ -1076,7 +1041,7 @@ static HRESULT WINAPI SecManagerImpl_QueryCustomPolicy(IInternetSecurityManagerE
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %s %p %p %p %08x %08x )\n", iface, debugstr_w(pwszUrl), debugstr_guid(guidKey),
|
||||
TRACE("(%p)->(%s %s %p %p %p %08lx %08lx )\n", iface, debugstr_w(pwszUrl), debugstr_guid(guidKey),
|
||||
ppPolicy, pcbPolicy, pContext, cbContext, dwReserved);
|
||||
|
||||
if(This->custom_manager) {
|
||||
@@ -1096,7 +1061,7 @@ static HRESULT WINAPI SecManagerImpl_SetZoneMapping(IInternetSecurityManagerEx2
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%08x %s %08x)\n", iface, dwZone, debugstr_w(pwszPattern),dwFlags);
|
||||
TRACE("(%p)->(%08lx %s %08lx)\n", iface, dwZone, debugstr_w(pwszPattern),dwFlags);
|
||||
|
||||
if(This->custom_manager) {
|
||||
hres = IInternetSecurityManager_SetZoneMapping(This->custom_manager, dwZone,
|
||||
@@ -1115,7 +1080,7 @@ static HRESULT WINAPI SecManagerImpl_GetZoneMappings(IInternetSecurityManagerEx2
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%08x %p %08x)\n", iface, dwZone, ppenumString,dwFlags);
|
||||
TRACE("(%p)->(%08lx %p %08lx)\n", iface, dwZone, ppenumString,dwFlags);
|
||||
|
||||
if(This->custom_manager) {
|
||||
hres = IInternetSecurityManager_GetZoneMappings(This->custom_manager, dwZone,
|
||||
@@ -1133,7 +1098,7 @@ static HRESULT WINAPI SecManagerImpl_ProcessUrlActionEx(IInternetSecurityManager
|
||||
DWORD dwFlags, DWORD dwReserved, DWORD *pdwOutFlags)
|
||||
{
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
FIXME("(%p)->(%s %08x %p %d %p %d %08x %08x %p) stub\n", This, debugstr_w(pwszUrl), dwAction, pPolicy, cbPolicy,
|
||||
FIXME("(%p)->(%s %08lx %p %ld %p %ld %08lx %08lx %p) stub\n", This, debugstr_w(pwszUrl), dwAction, pPolicy, cbPolicy,
|
||||
pContext, cbContext, dwFlags, dwReserved, pdwOutFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -1143,7 +1108,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZoneEx2(IInternetSecurityManagerEx2
|
||||
{
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
|
||||
TRACE("(%p)->(%p %p %08x %p %p)\n", This, pUri, pdwZone, dwFlags, ppwszMappedUrl, pdwOutFlags);
|
||||
TRACE("(%p)->(%p %p %08lx %p %p)\n", This, pUri, pdwZone, dwFlags, ppwszMappedUrl, pdwOutFlags);
|
||||
|
||||
if(This->custom_manager) {
|
||||
HRESULT hres;
|
||||
@@ -1178,7 +1143,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZoneEx2(IInternetSecurityManagerEx2
|
||||
}
|
||||
|
||||
if(dwFlags)
|
||||
FIXME("Unsupported flags: %08x\n", dwFlags);
|
||||
FIXME("Unsupported flags: %08lx\n", dwFlags);
|
||||
|
||||
return map_uri_to_zone(pUri, pdwZone, NULL);
|
||||
}
|
||||
@@ -1188,8 +1153,8 @@ static HRESULT WINAPI SecManagerImpl_ProcessUrlActionEx2(IInternetSecurityManage
|
||||
DWORD dwFlags, DWORD_PTR dwReserved, DWORD *pdwOutFlags)
|
||||
{
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
FIXME("(%p)->(%p %08x %p %d %p %d %08x %08x %p) stub\n", This, pUri, dwAction, pPolicy,
|
||||
cbPolicy, pContext, cbContext, dwFlags, (DWORD)dwReserved, pdwOutFlags);
|
||||
FIXME("(%p)->(%p %08lx %p %ld %p %ld %08lx %08Ix %p) stub\n", This, pUri, dwAction, pPolicy,
|
||||
cbPolicy, pContext, cbContext, dwFlags, dwReserved, pdwOutFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -1197,7 +1162,7 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityIdEx2(IInternetSecurityManagerEx
|
||||
IUri *pUri, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved)
|
||||
{
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
TRACE("(%p)->(%p %p %p %08x) stub\n", This, pUri, pbSecurityId, pcbSecurityId, (DWORD)dwReserved);
|
||||
TRACE("(%p)->(%p %p %p %08Ix) stub\n", This, pUri, pbSecurityId, pcbSecurityId, dwReserved);
|
||||
|
||||
if(dwReserved)
|
||||
FIXME("dwReserved is not supported yet\n");
|
||||
@@ -1213,8 +1178,8 @@ static HRESULT WINAPI SecManagerImpl_QueryCustomPolicyEx2(IInternetSecurityManag
|
||||
DWORD cbContext, DWORD_PTR dwReserved)
|
||||
{
|
||||
SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
|
||||
FIXME("(%p)->(%p %s %p %p %p %d %08x) stub\n", This, pUri, debugstr_guid(guidKey), ppPolicy, pcbPolicy,
|
||||
pContext, cbContext, (DWORD)dwReserved);
|
||||
FIXME("(%p)->(%p %s %p %p %p %ld %08Ix) stub\n", This, pUri, debugstr_guid(guidKey), ppPolicy, pcbPolicy,
|
||||
pContext, cbContext, dwReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -1243,7 +1208,7 @@ HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
|
||||
SecManagerImpl *This;
|
||||
|
||||
TRACE("(%p,%p)\n",pUnkOuter,ppobj);
|
||||
This = heap_alloc(sizeof(*This));
|
||||
This = malloc(sizeof(*This));
|
||||
|
||||
/* Initialize the virtual function table. */
|
||||
This->IInternetSecurityManagerEx2_iface.lpVtbl = &VT_SecManagerImpl;
|
||||
@@ -1297,7 +1262,7 @@ static LPDWORD build_zonemap_from_reg(void)
|
||||
if (res)
|
||||
return NULL;
|
||||
|
||||
data = heap_alloc(allocated * sizeof(DWORD));
|
||||
data = malloc(allocated * sizeof(DWORD));
|
||||
if (!data)
|
||||
goto cleanup;
|
||||
|
||||
@@ -1312,7 +1277,7 @@ static LPDWORD build_zonemap_from_reg(void)
|
||||
LPDWORD new_data;
|
||||
|
||||
allocated *= 2;
|
||||
new_data = heap_realloc_zero(data, allocated * sizeof(DWORD));
|
||||
new_data = realloc(data, allocated * sizeof(DWORD));
|
||||
if (!new_data)
|
||||
goto cleanup;
|
||||
|
||||
@@ -1330,7 +1295,7 @@ static LPDWORD build_zonemap_from_reg(void)
|
||||
cleanup:
|
||||
/* something failed */
|
||||
RegCloseKey(hkey);
|
||||
heap_free(data);
|
||||
free(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1375,7 +1340,7 @@ static ULONG WINAPI ZoneMgrImpl_AddRef(IInternetZoneManagerEx2* iface)
|
||||
ZoneMgrImpl* This = impl_from_IInternetZoneManagerEx2(iface);
|
||||
ULONG refCount = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p)->(ref before=%u)\n",This, refCount - 1);
|
||||
TRACE("(%p)->(ref before=%lu)\n",This, refCount - 1);
|
||||
|
||||
return refCount;
|
||||
}
|
||||
@@ -1388,12 +1353,12 @@ static ULONG WINAPI ZoneMgrImpl_Release(IInternetZoneManagerEx2* iface)
|
||||
ZoneMgrImpl* This = impl_from_IInternetZoneManagerEx2(iface);
|
||||
ULONG refCount = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p)->(ref before=%u)\n",This, refCount + 1);
|
||||
TRACE("(%p)->(ref before=%lu)\n",This, refCount + 1);
|
||||
|
||||
if(!refCount) {
|
||||
while (This->zonemap_count) heap_free(This->zonemaps[--This->zonemap_count]);
|
||||
heap_free(This->zonemaps);
|
||||
heap_free(This);
|
||||
while (This->zonemap_count) free(This->zonemaps[--This->zonemap_count]);
|
||||
free(This->zonemaps);
|
||||
free(This);
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
|
||||
@@ -1412,7 +1377,7 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneAttributes(IInternetZoneManagerEx2* ifa
|
||||
HKEY hcu;
|
||||
HKEY hklm = NULL;
|
||||
|
||||
TRACE("(%p)->(%d %p)\n", This, dwZone, pZoneAttributes);
|
||||
TRACE("(%p)->(%ld %p)\n", This, dwZone, pZoneAttributes);
|
||||
|
||||
if (!pZoneAttributes)
|
||||
return E_INVALIDARG;
|
||||
@@ -1423,15 +1388,15 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneAttributes(IInternetZoneManagerEx2* ifa
|
||||
|
||||
hr = open_zone_key(HKEY_LOCAL_MACHINE, dwZone, &hklm);
|
||||
if (FAILED(hr))
|
||||
TRACE("Zone %d not in HKLM\n", dwZone);
|
||||
TRACE("Zone %ld not in HKLM\n", dwZone);
|
||||
|
||||
get_string_from_reg(hcu, hklm, displaynameW, pZoneAttributes->szDisplayName, MAX_ZONE_PATH);
|
||||
get_string_from_reg(hcu, hklm, descriptionW, pZoneAttributes->szDescription, MAX_ZONE_DESCRIPTION);
|
||||
get_string_from_reg(hcu, hklm, iconW, pZoneAttributes->szIconPath, MAX_ZONE_PATH);
|
||||
get_dword_from_reg(hcu, hklm, minlevelW, &pZoneAttributes->dwTemplateMinLevel);
|
||||
get_dword_from_reg(hcu, hklm, currentlevelW, &pZoneAttributes->dwTemplateCurrentLevel);
|
||||
get_dword_from_reg(hcu, hklm, recommendedlevelW, &pZoneAttributes->dwTemplateRecommended);
|
||||
get_dword_from_reg(hcu, hklm, flagsW, &pZoneAttributes->dwFlags);
|
||||
get_string_from_reg(hcu, hklm, L"DisplayName", pZoneAttributes->szDisplayName, MAX_ZONE_PATH);
|
||||
get_string_from_reg(hcu, hklm, L"Description", pZoneAttributes->szDescription, MAX_ZONE_DESCRIPTION);
|
||||
get_string_from_reg(hcu, hklm, L"Icon", pZoneAttributes->szIconPath, MAX_ZONE_PATH);
|
||||
get_dword_from_reg(hcu, hklm, L"MinLevel", &pZoneAttributes->dwTemplateMinLevel);
|
||||
get_dword_from_reg(hcu, hklm, L"CurrentLevel", &pZoneAttributes->dwTemplateCurrentLevel);
|
||||
get_dword_from_reg(hcu, hklm, L"RecommendedLevel", &pZoneAttributes->dwTemplateRecommended);
|
||||
get_dword_from_reg(hcu, hklm, L"Flags", &pZoneAttributes->dwFlags);
|
||||
|
||||
RegCloseKey(hklm);
|
||||
RegCloseKey(hcu);
|
||||
@@ -1449,7 +1414,7 @@ static HRESULT WINAPI ZoneMgrImpl_SetZoneAttributes(IInternetZoneManagerEx2* ifa
|
||||
HRESULT hr;
|
||||
HKEY hcu;
|
||||
|
||||
TRACE("(%p)->(%d %p)\n", This, dwZone, pZoneAttributes);
|
||||
TRACE("(%p)->(%ld %p)\n", This, dwZone, pZoneAttributes);
|
||||
|
||||
if (!pZoneAttributes)
|
||||
return E_INVALIDARG;
|
||||
@@ -1459,25 +1424,25 @@ static HRESULT WINAPI ZoneMgrImpl_SetZoneAttributes(IInternetZoneManagerEx2* ifa
|
||||
return S_OK; /* IE6 returned E_FAIL here */
|
||||
|
||||
/* cbSize is ignored */
|
||||
RegSetValueExW(hcu, displaynameW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szDisplayName,
|
||||
RegSetValueExW(hcu, L"DisplayName", 0, REG_SZ, (BYTE*)pZoneAttributes->szDisplayName,
|
||||
(lstrlenW(pZoneAttributes->szDisplayName)+1)* sizeof(WCHAR));
|
||||
|
||||
RegSetValueExW(hcu, descriptionW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szDescription,
|
||||
RegSetValueExW(hcu, L"Description", 0, REG_SZ, (BYTE*)pZoneAttributes->szDescription,
|
||||
(lstrlenW(pZoneAttributes->szDescription)+1)* sizeof(WCHAR));
|
||||
|
||||
RegSetValueExW(hcu, iconW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szIconPath,
|
||||
RegSetValueExW(hcu, L"Icon", 0, REG_SZ, (BYTE*)pZoneAttributes->szIconPath,
|
||||
(lstrlenW(pZoneAttributes->szIconPath)+1)* sizeof(WCHAR));
|
||||
|
||||
RegSetValueExW(hcu, minlevelW, 0, REG_DWORD,
|
||||
RegSetValueExW(hcu, L"MinLevel", 0, REG_DWORD,
|
||||
(const BYTE*) &pZoneAttributes->dwTemplateMinLevel, sizeof(DWORD));
|
||||
|
||||
RegSetValueExW(hcu, currentlevelW, 0, REG_DWORD,
|
||||
RegSetValueExW(hcu, L"CurrentLevel", 0, REG_DWORD,
|
||||
(const BYTE*) &pZoneAttributes->dwTemplateCurrentLevel, sizeof(DWORD));
|
||||
|
||||
RegSetValueExW(hcu, recommendedlevelW, 0, REG_DWORD,
|
||||
RegSetValueExW(hcu, L"RecommendedLevel", 0, REG_DWORD,
|
||||
(const BYTE*) &pZoneAttributes->dwTemplateRecommended, sizeof(DWORD));
|
||||
|
||||
RegSetValueExW(hcu, flagsW, 0, REG_DWORD, (const BYTE*) &pZoneAttributes->dwFlags, sizeof(DWORD));
|
||||
RegSetValueExW(hcu, L"Flags", 0, REG_DWORD, (const BYTE*) &pZoneAttributes->dwFlags, sizeof(DWORD));
|
||||
RegCloseKey(hcu);
|
||||
return S_OK;
|
||||
|
||||
@@ -1493,7 +1458,7 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneCustomPolicy(IInternetZoneManagerEx2* i
|
||||
DWORD* pcbPolicy,
|
||||
URLZONEREG ulrZoneReg)
|
||||
{
|
||||
FIXME("(%p)->(%08x %s %p %p %08x) stub\n", iface, dwZone, debugstr_guid(guidKey),
|
||||
FIXME("(%p)->(%08lx %s %p %p %08x) stub\n", iface, dwZone, debugstr_guid(guidKey),
|
||||
ppPolicy, pcbPolicy, ulrZoneReg);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -1508,7 +1473,7 @@ static HRESULT WINAPI ZoneMgrImpl_SetZoneCustomPolicy(IInternetZoneManagerEx2* i
|
||||
DWORD cbPolicy,
|
||||
URLZONEREG ulrZoneReg)
|
||||
{
|
||||
FIXME("(%p)->(%08x %s %p %08x %08x) stub\n", iface, dwZone, debugstr_guid(guidKey),
|
||||
FIXME("(%p)->(%08lx %s %p %08lx %08x) stub\n", iface, dwZone, debugstr_guid(guidKey),
|
||||
ppPolicy, cbPolicy, ulrZoneReg);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -1519,7 +1484,7 @@ static HRESULT WINAPI ZoneMgrImpl_SetZoneCustomPolicy(IInternetZoneManagerEx2* i
|
||||
static HRESULT WINAPI ZoneMgrImpl_GetZoneActionPolicy(IInternetZoneManagerEx2* iface,
|
||||
DWORD dwZone, DWORD dwAction, BYTE* pPolicy, DWORD cbPolicy, URLZONEREG urlZoneReg)
|
||||
{
|
||||
TRACE("(%p)->(%d %08x %p %d %d)\n", iface, dwZone, dwAction, pPolicy,
|
||||
TRACE("(%p)->(%ld %08lx %p %ld %d)\n", iface, dwZone, dwAction, pPolicy,
|
||||
cbPolicy, urlZoneReg);
|
||||
|
||||
if(!pPolicy)
|
||||
@@ -1538,7 +1503,7 @@ static HRESULT WINAPI ZoneMgrImpl_SetZoneActionPolicy(IInternetZoneManagerEx2* i
|
||||
DWORD cbPolicy,
|
||||
URLZONEREG urlZoneReg)
|
||||
{
|
||||
FIXME("(%p)->(%08x %08x %p %08x %08x) stub\n", iface, dwZone, dwAction, pPolicy,
|
||||
FIXME("(%p)->(%08lx %08lx %p %08lx %08x) stub\n", iface, dwZone, dwAction, pPolicy,
|
||||
cbPolicy, urlZoneReg);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -1553,7 +1518,7 @@ static HRESULT WINAPI ZoneMgrImpl_PromptAction(IInternetZoneManagerEx2* iface,
|
||||
LPCWSTR pwszText,
|
||||
DWORD dwPromptFlags)
|
||||
{
|
||||
FIXME("%p %08x %p %s %s %08x\n", iface, dwAction, hwndParent,
|
||||
FIXME("%p %08lx %p %s %s %08lx\n", iface, dwAction, hwndParent,
|
||||
debugstr_w(pwszUrl), debugstr_w(pwszText), dwPromptFlags );
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -1567,7 +1532,7 @@ static HRESULT WINAPI ZoneMgrImpl_LogAction(IInternetZoneManagerEx2* iface,
|
||||
LPCWSTR pwszText,
|
||||
DWORD dwLogFlags)
|
||||
{
|
||||
FIXME("(%p)->(%08x %s %s %08x) stub\n", iface, dwAction, debugstr_w(pwszUrl),
|
||||
FIXME("(%p)->(%08lx %s %s %08lx) stub\n", iface, dwAction, debugstr_w(pwszUrl),
|
||||
debugstr_w(pwszText), dwLogFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -1583,14 +1548,15 @@ static HRESULT WINAPI ZoneMgrImpl_CreateZoneEnumerator(IInternetZoneManagerEx2*
|
||||
ZoneMgrImpl* This = impl_from_IInternetZoneManagerEx2(iface);
|
||||
LPDWORD * new_maps;
|
||||
LPDWORD data;
|
||||
DWORD new_map_count;
|
||||
DWORD i;
|
||||
|
||||
TRACE("(%p)->(%p, %p, 0x%08x)\n", This, pdwEnum, pdwCount, dwFlags);
|
||||
TRACE("(%p)->(%p, %p, 0x%08lx)\n", This, pdwEnum, pdwCount, dwFlags);
|
||||
if (!pdwEnum || !pdwCount || (dwFlags != 0))
|
||||
return E_INVALIDARG;
|
||||
|
||||
data = build_zonemap_from_reg();
|
||||
TRACE("found %d zones\n", data ? data[0] : -1);
|
||||
TRACE("found %ld zones\n", data ? data[0] : -1);
|
||||
|
||||
if (!data)
|
||||
return E_FAIL;
|
||||
@@ -1604,23 +1570,15 @@ static HRESULT WINAPI ZoneMgrImpl_CreateZoneEnumerator(IInternetZoneManagerEx2*
|
||||
}
|
||||
}
|
||||
|
||||
if (This->zonemaps) {
|
||||
/* try to double the nr. of pointers in the array */
|
||||
new_maps = heap_realloc_zero(This->zonemaps, This->zonemap_count * 2 * sizeof(LPDWORD));
|
||||
if (new_maps)
|
||||
This->zonemap_count *= 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
This->zonemap_count = 2;
|
||||
new_maps = heap_alloc_zero(This->zonemap_count * sizeof(LPDWORD));
|
||||
}
|
||||
|
||||
/* try to double the number of pointers in the array */
|
||||
new_map_count = This->zonemaps ? This->zonemap_count * 2 : 2;
|
||||
new_maps = _recalloc(This->zonemaps, new_map_count, sizeof(DWORD*));
|
||||
if (!new_maps) {
|
||||
heap_free(data);
|
||||
free(data);
|
||||
return E_FAIL;
|
||||
}
|
||||
This->zonemaps = new_maps;
|
||||
This->zonemap_count = new_map_count;
|
||||
This->zonemaps[i] = data;
|
||||
*pdwEnum = i;
|
||||
*pdwCount = data[0];
|
||||
@@ -1638,7 +1596,7 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneAt(IInternetZoneManagerEx2* iface,
|
||||
ZoneMgrImpl* This = impl_from_IInternetZoneManagerEx2(iface);
|
||||
LPDWORD data;
|
||||
|
||||
TRACE("(%p)->(0x%08x, %d, %p)\n", This, dwEnum, dwIndex, pdwZone);
|
||||
TRACE("(%p)->(0x%08lx, %ld, %p)\n", This, dwEnum, dwIndex, pdwZone);
|
||||
|
||||
/* make sure, that dwEnum and dwIndex are in the valid range */
|
||||
if (dwEnum < This->zonemap_count) {
|
||||
@@ -1661,12 +1619,12 @@ static HRESULT WINAPI ZoneMgrImpl_DestroyZoneEnumerator(IInternetZoneManagerEx2*
|
||||
ZoneMgrImpl* This = impl_from_IInternetZoneManagerEx2(iface);
|
||||
LPDWORD data;
|
||||
|
||||
TRACE("(%p)->(0x%08x)\n", This, dwEnum);
|
||||
TRACE("(%p)->(0x%08lx)\n", This, dwEnum);
|
||||
/* make sure, that dwEnum is valid */
|
||||
if (dwEnum < This->zonemap_count) {
|
||||
if ((data = This->zonemaps[dwEnum])) {
|
||||
This->zonemaps[dwEnum] = NULL;
|
||||
heap_free(data);
|
||||
free(data);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
@@ -1681,7 +1639,7 @@ static HRESULT WINAPI ZoneMgrImpl_CopyTemplatePoliciesToZone(IInternetZoneManage
|
||||
DWORD dwZone,
|
||||
DWORD dwReserved)
|
||||
{
|
||||
FIXME("(%p)->(%08x %08x %08x) stub\n", iface, dwTemplate, dwZone, dwReserved);
|
||||
FIXME("(%p)->(%08lx %08lx %08lx) stub\n", iface, dwTemplate, dwZone, dwReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -1696,14 +1654,14 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneActionPolicyEx(IInternetZoneManagerEx2*
|
||||
URLZONEREG urlZoneReg,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
TRACE("(%p)->(%d, 0x%x, %p, %d, %d, 0x%x)\n", iface, dwZone,
|
||||
TRACE("(%p)->(%ld, 0x%lx, %p, %ld, %d, 0x%lx)\n", iface, dwZone,
|
||||
dwAction, pPolicy, cbPolicy, urlZoneReg, dwFlags);
|
||||
|
||||
if(!pPolicy)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (dwFlags)
|
||||
FIXME("dwFlags 0x%x ignored\n", dwFlags);
|
||||
FIXME("dwFlags 0x%lx ignored\n", dwFlags);
|
||||
|
||||
return get_action_policy(dwZone, dwAction, pPolicy, cbPolicy, urlZoneReg);
|
||||
}
|
||||
@@ -1719,7 +1677,7 @@ static HRESULT WINAPI ZoneMgrImpl_SetZoneActionPolicyEx(IInternetZoneManagerEx2*
|
||||
URLZONEREG urlZoneReg,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
FIXME("(%p)->(%d, 0x%x, %p, %d, %d, 0x%x) stub\n", iface, dwZone, dwAction, pPolicy,
|
||||
FIXME("(%p)->(%ld, 0x%lx, %p, %ld, %d, 0x%lx) stub\n", iface, dwZone, dwAction, pPolicy,
|
||||
cbPolicy, urlZoneReg, dwFlags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -1732,10 +1690,10 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneAttributesEx(IInternetZoneManagerEx2* i
|
||||
ZONEATTRIBUTES* pZoneAttributes,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
TRACE("(%p)->(%d, %p, 0x%x)\n", iface, dwZone, pZoneAttributes, dwFlags);
|
||||
TRACE("(%p)->(%ld, %p, 0x%lx)\n", iface, dwZone, pZoneAttributes, dwFlags);
|
||||
|
||||
if (dwFlags)
|
||||
FIXME("dwFlags 0x%x ignored\n", dwFlags);
|
||||
FIXME("dwFlags 0x%lx ignored\n", dwFlags);
|
||||
|
||||
return IInternetZoneManagerEx2_GetZoneAttributes(iface, dwZone, pZoneAttributes);
|
||||
}
|
||||
@@ -1750,7 +1708,7 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneSecurityState(IInternetZoneManagerEx2*
|
||||
LPDWORD pdwState,
|
||||
BOOL *pfPolicyEncountered)
|
||||
{
|
||||
FIXME("(%p)->(%d, %d, %p, %p) stub\n", iface, dwZoneIndex, fRespectPolicy,
|
||||
FIXME("(%p)->(%ld, %d, %p, %p) stub\n", iface, dwZoneIndex, fRespectPolicy,
|
||||
pdwState, pfPolicyEncountered);
|
||||
|
||||
*pdwState = SECURITY_IE_STATE_GREEN;
|
||||
@@ -1822,7 +1780,7 @@ static const IInternetZoneManagerEx2Vtbl ZoneMgrImplVtbl = {
|
||||
|
||||
HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
|
||||
{
|
||||
ZoneMgrImpl* ret = heap_alloc_zero(sizeof(ZoneMgrImpl));
|
||||
ZoneMgrImpl *ret = calloc(1, sizeof(ZoneMgrImpl));
|
||||
|
||||
TRACE("(%p %p)\n", pUnkOuter, ppobj);
|
||||
ret->IInternetZoneManagerEx2_iface.lpVtbl = &ZoneMgrImplVtbl;
|
||||
@@ -1841,7 +1799,7 @@ HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
|
||||
HRESULT WINAPI CoInternetCreateSecurityManager( IServiceProvider *pSP,
|
||||
IInternetSecurityManager **ppSM, DWORD dwReserved )
|
||||
{
|
||||
TRACE("%p %p %d\n", pSP, ppSM, dwReserved );
|
||||
TRACE("%p %p %ld\n", pSP, ppSM, dwReserved );
|
||||
|
||||
if(pSP)
|
||||
FIXME("pSP not supported\n");
|
||||
@@ -1854,7 +1812,7 @@ HRESULT WINAPI CoInternetCreateSecurityManager( IServiceProvider *pSP,
|
||||
*/
|
||||
HRESULT WINAPI CoInternetCreateZoneManager(IServiceProvider* pSP, IInternetZoneManager** ppZM, DWORD dwReserved)
|
||||
{
|
||||
TRACE("(%p %p %x)\n", pSP, ppZM, dwReserved);
|
||||
TRACE("(%p %p %lx)\n", pSP, ppZM, dwReserved);
|
||||
return ZoneMgrImpl_Construct(NULL, (void**)ppZM);
|
||||
}
|
||||
|
||||
@@ -1911,7 +1869,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re
|
||||
CoTaskMemFree(new_url);
|
||||
|
||||
if(hres != S_OK) {
|
||||
WARN("failed: %08x\n", hres);
|
||||
WARN("failed: %08lx\n", hres);
|
||||
CoTaskMemFree(alloc_url);
|
||||
return hres;
|
||||
}
|
||||
@@ -1954,7 +1912,7 @@ static HRESULT parse_security_url(const WCHAR *url, PSUACTION action, WCHAR **re
|
||||
}
|
||||
|
||||
if(FAILED(hres)) {
|
||||
WARN("failed %08x\n", hres);
|
||||
WARN("failed %08lx\n", hres);
|
||||
CoTaskMemFree(alloc_url);
|
||||
return hres;
|
||||
}
|
||||
@@ -1979,7 +1937,7 @@ HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR pwzUrl, LPWSTR *ppwzSecUrl, PSUA
|
||||
WCHAR *secure_url;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p,%p,%u,%u)\n", pwzUrl, ppwzSecUrl, psuAction, dwReserved);
|
||||
TRACE("(%p,%p,%u,%lu)\n", pwzUrl, ppwzSecUrl, psuAction, dwReserved);
|
||||
|
||||
hres = parse_security_url(pwzUrl, psuAction, &secure_url);
|
||||
if(FAILED(hres))
|
||||
@@ -2005,7 +1963,7 @@ HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR pwzUrl, LPWSTR *ppwzSecUrl, PSUA
|
||||
hres = E_OUTOFMEMORY;
|
||||
CoTaskMemFree(secure_url);
|
||||
if(hres != S_OK) {
|
||||
WARN("UrlGetPart failed: %08x\n", hres);
|
||||
WARN("UrlGetPart failed: %08lx\n", hres);
|
||||
CoTaskMemFree(new_url);
|
||||
return FAILED(hres) ? hres : E_FAIL;
|
||||
}
|
||||
@@ -2028,7 +1986,7 @@ HRESULT WINAPI CoInternetGetSecurityUrlEx(IUri *pUri, IUri **ppSecUri, PSUACTION
|
||||
WCHAR *ret_url;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p,%p,%u,%u)\n", pUri, ppSecUri, psuAction, (DWORD)dwReserved);
|
||||
TRACE("(%p,%p,%u,%Iu)\n", pUri, ppSecUri, psuAction, dwReserved);
|
||||
|
||||
if(!pUri || !ppSecUri)
|
||||
return E_INVALIDARG;
|
||||
@@ -2048,7 +2006,7 @@ HRESULT WINAPI CoInternetGetSecurityUrlEx(IUri *pUri, IUri **ppSecUri, PSUACTION
|
||||
const WCHAR *tmp = ret_url;
|
||||
|
||||
/* Check and see if a "//" is after the scheme name. */
|
||||
tmp += ARRAY_SIZE(fileW);
|
||||
tmp += ARRAY_SIZE(L"file");
|
||||
if(*tmp != '/' || *(tmp+1) != '/')
|
||||
hres = E_INVALIDARG;
|
||||
}
|
||||
@@ -2064,7 +2022,7 @@ HRESULT WINAPI CoInternetGetSecurityUrlEx(IUri *pUri, IUri **ppSecUri, PSUACTION
|
||||
*/
|
||||
HRESULT WINAPI CompareSecurityIds(BYTE *secid1, DWORD size1, BYTE *secid2, DWORD size2, DWORD reserved)
|
||||
{
|
||||
FIXME("(%p %d %p %d %x)\n", secid1, size1, secid2, size2, reserved);
|
||||
FIXME("(%p %ld %p %ld %lx)\n", secid1, size1, secid2, size2, reserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -2083,11 +2041,9 @@ BOOL WINAPI IsInternetESCEnabledLocal(void)
|
||||
DWORD type, size, val;
|
||||
HKEY zone_map;
|
||||
|
||||
static const WCHAR iehardenW[] = {'I','E','H','a','r','d','e','n',0};
|
||||
|
||||
if(RegOpenKeyExW(HKEY_CURRENT_USER, zone_map_keyW, 0, KEY_QUERY_VALUE, &zone_map) == ERROR_SUCCESS) {
|
||||
size = sizeof(DWORD);
|
||||
if(RegQueryValueExW(zone_map, iehardenW, NULL, &type, (BYTE*)&val, &size) == ERROR_SUCCESS)
|
||||
if(RegQueryValueExW(zone_map, L"IEHarden", NULL, &type, (BYTE*)&val, &size) == ERROR_SUCCESS)
|
||||
esc_enabled = type == REG_DWORD && val != 0;
|
||||
RegCloseKey(zone_map);
|
||||
}
|
||||
|
||||
+190
-150
@@ -52,13 +52,6 @@ static CRITICAL_SECTION_DEBUG session_cs_dbg =
|
||||
};
|
||||
static CRITICAL_SECTION session_cs = { &session_cs_dbg, -1, 0, 0, 0, 0 };
|
||||
|
||||
static const WCHAR internet_settings_keyW[] =
|
||||
{'S','O','F','T','W','A','R','E',
|
||||
'\\','M','i','c','r','o','s','o','f','t',
|
||||
'\\','W','i','n','d','o','w','s',
|
||||
'\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n',
|
||||
'\\','I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s',0};
|
||||
|
||||
static name_space *find_name_space(LPCWSTR protocol)
|
||||
{
|
||||
name_space *iter;
|
||||
@@ -82,30 +75,29 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
|
||||
|
||||
static const WCHAR wszProtocolsKey[] =
|
||||
{'P','R','O','T','O','C','O','L','S','\\','H','a','n','d','l','e','r','\\'};
|
||||
static const WCHAR wszCLSID[] = {'C','L','S','I','D',0};
|
||||
|
||||
wszKey = heap_alloc(sizeof(wszProtocolsKey)+(schema_len+1)*sizeof(WCHAR));
|
||||
wszKey = malloc(sizeof(wszProtocolsKey) + (schema_len + 1) * sizeof(WCHAR));
|
||||
memcpy(wszKey, wszProtocolsKey, sizeof(wszProtocolsKey));
|
||||
memcpy(wszKey + ARRAY_SIZE(wszProtocolsKey), schema, (schema_len+1)*sizeof(WCHAR));
|
||||
|
||||
res = RegOpenKeyW(HKEY_CLASSES_ROOT, wszKey, &hkey);
|
||||
heap_free(wszKey);
|
||||
free(wszKey);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
TRACE("Could not open protocol handler key\n");
|
||||
return MK_E_SYNTAX;
|
||||
}
|
||||
|
||||
size = sizeof(str_clsid);
|
||||
res = RegQueryValueExW(hkey, wszCLSID, NULL, &type, (LPBYTE)str_clsid, &size);
|
||||
res = RegQueryValueExW(hkey, L"CLSID", NULL, &type, (BYTE*)str_clsid, &size);
|
||||
RegCloseKey(hkey);
|
||||
if(res != ERROR_SUCCESS || type != REG_SZ) {
|
||||
WARN("Could not get protocol CLSID res=%d\n", res);
|
||||
WARN("Could not get protocol CLSID res=%ld\n", res);
|
||||
return MK_E_SYNTAX;
|
||||
}
|
||||
|
||||
hres = CLSIDFromString(str_clsid, &clsid);
|
||||
if(FAILED(hres)) {
|
||||
WARN("CLSIDFromString failed: %08x\n", hres);
|
||||
WARN("CLSIDFromString failed: %08lx\n", hres);
|
||||
return hres;
|
||||
}
|
||||
|
||||
@@ -123,14 +115,14 @@ HRESULT register_namespace(IClassFactory *cf, REFIID clsid, LPCWSTR protocol, BO
|
||||
{
|
||||
name_space *new_name_space;
|
||||
|
||||
new_name_space = heap_alloc(sizeof(name_space));
|
||||
new_name_space = malloc(sizeof(name_space));
|
||||
|
||||
if(!urlmon_protocol)
|
||||
IClassFactory_AddRef(cf);
|
||||
new_name_space->cf = cf;
|
||||
new_name_space->clsid = *clsid;
|
||||
new_name_space->urlmon = urlmon_protocol;
|
||||
new_name_space->protocol = heap_strdupW(protocol);
|
||||
new_name_space->protocol = wcsdup(protocol);
|
||||
|
||||
EnterCriticalSection(&session_cs);
|
||||
|
||||
@@ -155,8 +147,8 @@ static HRESULT unregister_namespace(IClassFactory *cf, LPCWSTR protocol)
|
||||
|
||||
if(!iter->urlmon)
|
||||
IClassFactory_Release(iter->cf);
|
||||
heap_free(iter->protocol);
|
||||
heap_free(iter);
|
||||
free(iter->protocol);
|
||||
free(iter);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
@@ -249,10 +241,6 @@ HRESULT get_protocol_handler(IUri *uri, CLSID *clsid, IClassFactory **ret)
|
||||
|
||||
IInternetProtocol *get_mime_filter(LPCWSTR mime)
|
||||
{
|
||||
static const WCHAR filtersW[] = {'P','r','o','t','o','c','o','l','s',
|
||||
'\\','F','i','l','t','e','r',0 };
|
||||
static const WCHAR CLSIDW[] = {'C','L','S','I','D',0};
|
||||
|
||||
IClassFactory *cf = NULL;
|
||||
IInternetProtocol *ret;
|
||||
mime_filter *iter;
|
||||
@@ -276,14 +264,14 @@ IInternetProtocol *get_mime_filter(LPCWSTR mime)
|
||||
if(cf) {
|
||||
hres = IClassFactory_CreateInstance(cf, NULL, &IID_IInternetProtocol, (void**)&ret);
|
||||
if(FAILED(hres)) {
|
||||
WARN("CreateInstance failed: %08x\n", hres);
|
||||
WARN("CreateInstance failed: %08lx\n", hres);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
res = RegOpenKeyW(HKEY_CLASSES_ROOT, filtersW, &hlist);
|
||||
res = RegOpenKeyW(HKEY_CLASSES_ROOT, L"Protocols\\Filter", &hlist);
|
||||
if(res != ERROR_SUCCESS) {
|
||||
TRACE("Could not open MIME filters key\n");
|
||||
return NULL;
|
||||
@@ -295,7 +283,7 @@ IInternetProtocol *get_mime_filter(LPCWSTR mime)
|
||||
return NULL;
|
||||
|
||||
size = sizeof(clsidw);
|
||||
res = RegQueryValueExW(hfilter, CLSIDW, NULL, &type, (LPBYTE)clsidw, &size);
|
||||
res = RegQueryValueExW(hfilter, L"CLSID", NULL, &type, (BYTE*)clsidw, &size);
|
||||
CloseHandle(hfilter);
|
||||
if(res!=ERROR_SUCCESS || type!=REG_SZ) {
|
||||
WARN("Could not get filter CLSID for %s\n", debugstr_w(mime));
|
||||
@@ -304,13 +292,13 @@ IInternetProtocol *get_mime_filter(LPCWSTR mime)
|
||||
|
||||
hres = CLSIDFromString(clsidw, &clsid);
|
||||
if(FAILED(hres)) {
|
||||
WARN("CLSIDFromString failed for %s (%x)\n", debugstr_w(mime), hres);
|
||||
WARN("CLSIDFromString failed for %s (%lx)\n", debugstr_w(mime), hres);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hres = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IInternetProtocol, (void**)&ret);
|
||||
if(FAILED(hres)) {
|
||||
WARN("CoCreateInstance failed: %08x\n", hres);
|
||||
WARN("CoCreateInstance failed: %08lx\n", hres);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -350,13 +338,13 @@ static HRESULT WINAPI InternetSession_RegisterNameSpace(IInternetSession *iface,
|
||||
IClassFactory *pCF, REFCLSID rclsid, LPCWSTR pwzProtocol, ULONG cPatterns,
|
||||
const LPCWSTR *ppwzPatterns, DWORD dwReserved)
|
||||
{
|
||||
TRACE("(%p %s %s %d %p %d)\n", pCF, debugstr_guid(rclsid), debugstr_w(pwzProtocol),
|
||||
TRACE("(%p %s %s %ld %p %ld)\n", pCF, debugstr_guid(rclsid), debugstr_w(pwzProtocol),
|
||||
cPatterns, ppwzPatterns, dwReserved);
|
||||
|
||||
if(cPatterns || ppwzPatterns)
|
||||
FIXME("patterns not supported\n");
|
||||
if(dwReserved)
|
||||
WARN("dwReserved = %d\n", dwReserved);
|
||||
WARN("dwReserved = %ld\n", dwReserved);
|
||||
|
||||
if(!pCF || !pwzProtocol)
|
||||
return E_INVALIDARG;
|
||||
@@ -382,12 +370,12 @@ static HRESULT WINAPI InternetSession_RegisterMimeFilter(IInternetSession *iface
|
||||
|
||||
TRACE("(%p %s %s)\n", pCF, debugstr_guid(rclsid), debugstr_w(pwzType));
|
||||
|
||||
filter = heap_alloc(sizeof(mime_filter));
|
||||
filter = malloc(sizeof(mime_filter));
|
||||
|
||||
IClassFactory_AddRef(pCF);
|
||||
filter->cf = pCF;
|
||||
filter->clsid = *rclsid;
|
||||
filter->mime = heap_strdupW(pwzType);
|
||||
filter->mime = wcsdup(pwzType);
|
||||
|
||||
EnterCriticalSection(&session_cs);
|
||||
|
||||
@@ -414,8 +402,8 @@ static HRESULT WINAPI InternetSession_UnregisterMimeFilter(IInternetSession *ifa
|
||||
LeaveCriticalSection(&session_cs);
|
||||
|
||||
IClassFactory_Release(iter->cf);
|
||||
heap_free(iter->mime);
|
||||
heap_free(iter);
|
||||
free(iter->mime);
|
||||
free(iter);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
@@ -431,7 +419,7 @@ static HRESULT WINAPI InternetSession_CreateBinding(IInternetSession *iface,
|
||||
BindProtocol *protocol;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %s %p %p %p %08x)\n", pBC, debugstr_w(szUrl), pUnkOuter, ppUnk,
|
||||
TRACE("(%p %s %p %p %p %08lx)\n", pBC, debugstr_w(szUrl), pUnkOuter, ppUnk,
|
||||
ppOInetProt, dwOption);
|
||||
|
||||
if(pBC || pUnkOuter || ppUnk || dwOption)
|
||||
@@ -448,7 +436,7 @@ static HRESULT WINAPI InternetSession_CreateBinding(IInternetSession *iface,
|
||||
static HRESULT WINAPI InternetSession_SetSessionOption(IInternetSession *iface,
|
||||
DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength, DWORD dwReserved)
|
||||
{
|
||||
FIXME("(%08x %p %d %d)\n", dwOption, pBuffer, dwBufferLength, dwReserved);
|
||||
FIXME("(%08lx %p %ld %ld)\n", dwOption, pBuffer, dwBufferLength, dwReserved);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -485,12 +473,12 @@ static IInternetSession InternetSession = { &InternetSessionVtbl };
|
||||
HRESULT WINAPI CoInternetGetSession(DWORD dwSessionMode, IInternetSession **ppIInternetSession,
|
||||
DWORD dwReserved)
|
||||
{
|
||||
TRACE("(%d %p %d)\n", dwSessionMode, ppIInternetSession, dwReserved);
|
||||
TRACE("(%ld %p %ld)\n", dwSessionMode, ppIInternetSession, dwReserved);
|
||||
|
||||
if(dwSessionMode)
|
||||
ERR("dwSessionMode=%d\n", dwSessionMode);
|
||||
ERR("dwSessionMode=%ld\n", dwSessionMode);
|
||||
if(dwReserved)
|
||||
ERR("dwReserved=%d\n", dwReserved);
|
||||
ERR("dwReserved=%ld\n", dwReserved);
|
||||
|
||||
IInternetSession_AddRef(&InternetSession);
|
||||
*ppIInternetSession = &InternetSession;
|
||||
@@ -505,115 +493,136 @@ static BOOL get_url_encoding(HKEY root, DWORD *encoding)
|
||||
DWORD size = sizeof(DWORD), res, type;
|
||||
HKEY hkey;
|
||||
|
||||
static const WCHAR wszUrlEncoding[] = {'U','r','l','E','n','c','o','d','i','n','g',0};
|
||||
|
||||
res = RegOpenKeyW(root, internet_settings_keyW, &hkey);
|
||||
res = RegOpenKeyW(root, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", &hkey);
|
||||
if(res != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
res = RegQueryValueExW(hkey, wszUrlEncoding, NULL, &type, (LPBYTE)encoding, &size);
|
||||
res = RegQueryValueExW(hkey, L"UrlEncoding", NULL, &type, (BYTE*)encoding, &size);
|
||||
RegCloseKey(hkey);
|
||||
|
||||
return res == ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static LPWSTR user_agent;
|
||||
static BOOL user_agent_set;
|
||||
|
||||
static void ensure_useragent(void)
|
||||
static size_t obtain_user_agent(unsigned int version, WCHAR *ret, size_t size)
|
||||
{
|
||||
BOOL is_wow, quirks = FALSE, use_current = FALSE;
|
||||
OSVERSIONINFOW info = {sizeof(info)};
|
||||
const WCHAR *os_type, *is_nt;
|
||||
WCHAR buf[512], *ret, *tmp;
|
||||
DWORD res, idx=0;
|
||||
size_t len, size;
|
||||
BOOL is_wow;
|
||||
DWORD res;
|
||||
size_t len = 0;
|
||||
HKEY key;
|
||||
|
||||
static const WCHAR formatW[] =
|
||||
{'M','o','z','i','l','l','a','/','4','.','0',
|
||||
' ','(','c','o','m','p','a','t','i','b','l','e',';',
|
||||
' ','M','S','I','E',' ','8','.','0',';',
|
||||
' ','W','i','n','d','o','w','s',' ','%','s','%','d','.','%','d',';',
|
||||
' ','%','s','T','r','i','d','e','n','t','/','5','.','0',0};
|
||||
static const WCHAR post_platform_keyW[] =
|
||||
{'S','O','F','T','W','A','R','E',
|
||||
'\\','M','i','c','r','o','s','o','f','t',
|
||||
'\\','W','i','n','d','o','w','s',
|
||||
'\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n',
|
||||
'\\','I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s',
|
||||
'\\','5','.','0','\\','U','s','e','r',' ','A','g','e','n','t',
|
||||
'\\','P','o','s','t',' ','P','l','a','t','f','o','r','m',0};
|
||||
static const WCHAR ntW[] = {'N','T',' ',0};
|
||||
static const WCHAR win64W[] = {'W','i','n','6','4',';',' ','x','6','4',';',' ',0};
|
||||
static const WCHAR wow64W[] = {'W','O','W','6','4',';',' ',0};
|
||||
static const WCHAR emptyW[] = {0};
|
||||
|
||||
if(user_agent)
|
||||
return;
|
||||
|
||||
GetVersionExW(&info);
|
||||
is_nt = info.dwPlatformId == VER_PLATFORM_WIN32_NT ? ntW : emptyW;
|
||||
|
||||
if(sizeof(void*) == 8)
|
||||
os_type = win64W;
|
||||
else if(IsWow64Process(GetCurrentProcess(), &is_wow) && is_wow)
|
||||
os_type = wow64W;
|
||||
else
|
||||
os_type = emptyW;
|
||||
|
||||
swprintf(buf, formatW, is_nt, info.dwMajorVersion, info.dwMinorVersion, os_type);
|
||||
len = lstrlenW(buf);
|
||||
|
||||
size = len+40;
|
||||
ret = heap_alloc(size * sizeof(WCHAR));
|
||||
if(!ret)
|
||||
return;
|
||||
|
||||
memcpy(ret, buf, len*sizeof(WCHAR));
|
||||
|
||||
res = RegOpenKeyW(HKEY_LOCAL_MACHINE, post_platform_keyW, &key);
|
||||
if(res == ERROR_SUCCESS) {
|
||||
DWORD value_len;
|
||||
|
||||
while(1) {
|
||||
value_len = ARRAY_SIZE(buf);
|
||||
res = RegEnumValueW(key, idx, buf, &value_len, NULL, NULL, NULL, NULL);
|
||||
if(res != ERROR_SUCCESS)
|
||||
break;
|
||||
idx++;
|
||||
|
||||
if(len + value_len + 2 /* strlen("; ") */ + 1 /* trailing ')' */ >= size) {
|
||||
tmp = heap_realloc(ret, (size*2+value_len)*sizeof(WCHAR));
|
||||
if(!tmp)
|
||||
break;
|
||||
ret = tmp;
|
||||
size = size*2+value_len;
|
||||
}
|
||||
|
||||
ret[len++] = ';';
|
||||
ret[len++] = ' ';
|
||||
memcpy(ret+len, buf, value_len*sizeof(WCHAR));
|
||||
len += value_len;
|
||||
if(version & UAS_EXACTLEGACY) {
|
||||
version &= ~UAS_EXACTLEGACY;
|
||||
if(version == 7)
|
||||
quirks = TRUE;
|
||||
else {
|
||||
use_current = TRUE;
|
||||
version = 7;
|
||||
}
|
||||
|
||||
RegCloseKey(key);
|
||||
}
|
||||
|
||||
ret[len++] = ')';
|
||||
ret[len++] = 0;
|
||||
if(version > 11) {
|
||||
FIXME("Unsupported version %u\n", version);
|
||||
version = 11;
|
||||
}
|
||||
|
||||
user_agent = ret;
|
||||
TRACE("Using user agent %s\n", debugstr_w(user_agent));
|
||||
if(version < 7 || use_current) {
|
||||
EnterCriticalSection(&session_cs);
|
||||
if(user_agent) {
|
||||
len = wcslen(user_agent) + 1;
|
||||
memcpy(ret, user_agent, min(size, len) * sizeof(WCHAR));
|
||||
}
|
||||
LeaveCriticalSection(&session_cs);
|
||||
if(len) return len;
|
||||
}
|
||||
|
||||
if(version < 7)
|
||||
version = 7;
|
||||
|
||||
swprintf(ret, size, L"Mozilla/%s (", version < 9 ? L"4.0" : L"5.0");
|
||||
len = lstrlenW(ret);
|
||||
if(version < 11) {
|
||||
swprintf(ret + len, size - len, L"compatible; MSIE %u.0; ", version);
|
||||
len += wcslen(ret + len);
|
||||
}
|
||||
|
||||
GetVersionExW(&info);
|
||||
is_nt = info.dwPlatformId == VER_PLATFORM_WIN32_NT ? L"NT " : L"";
|
||||
|
||||
if(sizeof(void*) == 8)
|
||||
#ifdef __x86_64__
|
||||
os_type = L"; Win64; x64";
|
||||
#else
|
||||
os_type = L"; Win64";
|
||||
#endif
|
||||
else if(IsWow64Process(GetCurrentProcess(), &is_wow) && is_wow)
|
||||
os_type = L"; WOW64";
|
||||
else
|
||||
os_type = L"";
|
||||
|
||||
swprintf(ret + len, size - len, L"Windows %s%d.%d%s", is_nt, info.dwMajorVersion,
|
||||
info.dwMinorVersion, os_type);
|
||||
len = lstrlenW(ret);
|
||||
|
||||
if(!quirks) {
|
||||
wcscpy(ret + len, L"; Trident/7.0");
|
||||
len += ARRAY_SIZE(L"; Trident/7.0") - 1;
|
||||
}
|
||||
|
||||
if(version < 9) {
|
||||
res = RegOpenKeyW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\"
|
||||
"Internet Settings\\5.0\\User Agent\\Post Platform", &key);
|
||||
if(res == ERROR_SUCCESS) {
|
||||
DWORD value_len, idx;
|
||||
|
||||
for(idx = 0;; idx++) {
|
||||
ret[len++] = ';';
|
||||
ret[len++] = ' ';
|
||||
|
||||
value_len = size - len - 2;
|
||||
res = RegEnumValueW(key, idx, ret + len, &value_len, NULL, NULL, NULL, NULL);
|
||||
if(res != ERROR_SUCCESS)
|
||||
break;
|
||||
|
||||
len += value_len;
|
||||
}
|
||||
|
||||
RegCloseKey(key);
|
||||
if(idx) len -= 2;
|
||||
}
|
||||
}
|
||||
wcscpy(ret + len, version >= 11 ? L"; rv:11.0) like Gecko" : L")");
|
||||
len += wcslen(ret + len) + 1;
|
||||
|
||||
TRACE("Using user agent %s\n", debugstr_w(ret));
|
||||
return len;
|
||||
}
|
||||
|
||||
static void ensure_user_agent(void)
|
||||
{
|
||||
EnterCriticalSection(&session_cs);
|
||||
|
||||
if(!user_agent) {
|
||||
WCHAR buf[1024];
|
||||
obtain_user_agent(0, buf, ARRAY_SIZE(buf));
|
||||
user_agent = wcsdup(buf);
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&session_cs);
|
||||
}
|
||||
|
||||
LPWSTR get_useragent(void)
|
||||
{
|
||||
LPWSTR ret;
|
||||
|
||||
ensure_useragent();
|
||||
ensure_user_agent();
|
||||
|
||||
EnterCriticalSection(&session_cs);
|
||||
ret = heap_strdupW(user_agent);
|
||||
ret = wcsdup(user_agent);
|
||||
LeaveCriticalSection(&session_cs);
|
||||
|
||||
return ret;
|
||||
@@ -622,10 +631,10 @@ LPWSTR get_useragent(void)
|
||||
HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength,
|
||||
DWORD* pdwBufferLength, DWORD dwReserved)
|
||||
{
|
||||
TRACE("(%x, %p, %d, %p)\n", dwOption, pBuffer, dwBufferLength, pdwBufferLength);
|
||||
TRACE("(%lx, %p, %ld, %p)\n", dwOption, pBuffer, dwBufferLength, pdwBufferLength);
|
||||
|
||||
if(dwReserved)
|
||||
WARN("dwReserved = %d\n", dwReserved);
|
||||
WARN("dwReserved = %ld\n", dwReserved);
|
||||
|
||||
switch(dwOption) {
|
||||
case URLMON_OPTION_USERAGENT: {
|
||||
@@ -637,7 +646,7 @@ HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBuf
|
||||
|
||||
EnterCriticalSection(&session_cs);
|
||||
|
||||
ensure_useragent();
|
||||
ensure_user_agent();
|
||||
if(user_agent) {
|
||||
size = WideCharToMultiByte(CP_ACP, 0, user_agent, -1, NULL, 0, NULL, NULL);
|
||||
*pdwBufferLength = size;
|
||||
@@ -668,7 +677,7 @@ HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBuf
|
||||
return S_OK;
|
||||
}
|
||||
default:
|
||||
FIXME("unsupported option %x\n", dwOption);
|
||||
FIXME("unsupported option %lx\n", dwOption);
|
||||
}
|
||||
|
||||
return E_INVALIDARG;
|
||||
@@ -680,7 +689,7 @@ HRESULT WINAPI UrlMkGetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBuf
|
||||
HRESULT WINAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBufferLength,
|
||||
DWORD Reserved)
|
||||
{
|
||||
TRACE("(%x %p %x)\n", dwOption, pBuffer, dwBufferLength);
|
||||
TRACE("(%lx %p %lx)\n", dwOption, pBuffer, dwBufferLength);
|
||||
|
||||
switch(dwOption) {
|
||||
case URLMON_OPTION_USERAGENT: {
|
||||
@@ -696,7 +705,7 @@ HRESULT WINAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBuf
|
||||
TRACE("Setting user agent %s\n", debugstr_an(buf, len));
|
||||
|
||||
size = MultiByteToWideChar(CP_ACP, 0, buf, len, NULL, 0);
|
||||
new_user_agent = heap_alloc((size+1)*sizeof(WCHAR));
|
||||
new_user_agent = malloc((size + 1) * sizeof(WCHAR));
|
||||
if(!new_user_agent)
|
||||
return E_OUTOFMEMORY;
|
||||
MultiByteToWideChar(CP_ACP, 0, buf, len, new_user_agent, size);
|
||||
@@ -704,15 +713,16 @@ HRESULT WINAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBuf
|
||||
|
||||
EnterCriticalSection(&session_cs);
|
||||
|
||||
heap_free(user_agent);
|
||||
free(user_agent);
|
||||
user_agent = new_user_agent;
|
||||
user_agent_set = TRUE;
|
||||
update_user_agent(user_agent);
|
||||
|
||||
LeaveCriticalSection(&session_cs);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
FIXME("Unknown option %x\n", dwOption);
|
||||
FIXME("Unknown option %lx\n", dwOption);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
@@ -722,34 +732,64 @@ HRESULT WINAPI UrlMkSetSessionOption(DWORD dwOption, LPVOID pBuffer, DWORD dwBuf
|
||||
/**************************************************************************
|
||||
* ObtainUserAgentString (URLMON.@)
|
||||
*/
|
||||
HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbSize)
|
||||
HRESULT WINAPI ObtainUserAgentString(DWORD option, char *ret, DWORD *ret_size)
|
||||
{
|
||||
DWORD size;
|
||||
HRESULT hres = E_FAIL;
|
||||
DWORD size, len;
|
||||
WCHAR buf[1024];
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
TRACE("(%d %p %p)\n", dwOption, pcszUAOut, cbSize);
|
||||
TRACE("(%ld %p %p)\n", option, ret, ret_size);
|
||||
|
||||
if(!pcszUAOut || !cbSize)
|
||||
if(!ret || !ret_size)
|
||||
return E_INVALIDARG;
|
||||
|
||||
EnterCriticalSection(&session_cs);
|
||||
len = obtain_user_agent(option, buf, ARRAY_SIZE(buf));
|
||||
size = WideCharToMultiByte(CP_ACP, 0, buf, len, NULL, 0, NULL, NULL);
|
||||
if(size <= *ret_size)
|
||||
WideCharToMultiByte(CP_ACP, 0, buf, len, ret, *ret_size+1, NULL, NULL);
|
||||
else
|
||||
hres = E_OUTOFMEMORY;
|
||||
|
||||
ensure_useragent();
|
||||
if(user_agent) {
|
||||
size = WideCharToMultiByte(CP_ACP, 0, user_agent, -1, NULL, 0, NULL, NULL);
|
||||
*ret_size = size;
|
||||
return hres;
|
||||
}
|
||||
|
||||
if(size <= *cbSize) {
|
||||
WideCharToMultiByte(CP_ACP, 0, user_agent, -1, pcszUAOut, *cbSize, NULL, NULL);
|
||||
hres = S_OK;
|
||||
}else {
|
||||
hres = E_OUTOFMEMORY;
|
||||
}
|
||||
/***********************************************************************
|
||||
* MapBrowserEmulationModeToUserAgent (URLMON.445)
|
||||
* Undocumented, added in IE8
|
||||
*/
|
||||
HRESULT WINAPI MapBrowserEmulationModeToUserAgent(const void *arg, WCHAR **ret)
|
||||
{
|
||||
DWORD size, version;
|
||||
const WCHAR *ua;
|
||||
WCHAR buf[1024];
|
||||
|
||||
*cbSize = size;
|
||||
TRACE("%p %p: semi-stub\n", arg, ret);
|
||||
|
||||
if(user_agent_set) {
|
||||
/* Native ignores first arg if custom user agent has been set, doesn't crash even if NULL */
|
||||
size = (wcslen(user_agent) + 1) * sizeof(WCHAR);
|
||||
ua = user_agent;
|
||||
}else {
|
||||
*ret = NULL;
|
||||
|
||||
/* First arg seems to be a pointer to a structure of unknown size, and crashes
|
||||
if it's too small (or filled with arbitrary values from the stack). For our
|
||||
purposes, we only check first field which seems to be the requested version. */
|
||||
version = *(DWORD*)arg;
|
||||
if(version == 5)
|
||||
version = 7;
|
||||
if(version < 7 || version > 11)
|
||||
return E_FAIL;
|
||||
|
||||
size = obtain_user_agent(version, buf, ARRAY_SIZE(buf)) * sizeof(WCHAR);
|
||||
ua = buf;
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&session_cs);
|
||||
return hres;
|
||||
if(!(*ret = CoTaskMemAlloc(size)))
|
||||
return E_OUTOFMEMORY;
|
||||
memcpy(*ret, ua, size);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void free_session(void)
|
||||
@@ -760,15 +800,15 @@ void free_session(void)
|
||||
LIST_FOR_EACH_ENTRY_SAFE(ns_iter, ns_last, &name_space_list, name_space, entry) {
|
||||
if(!ns_iter->urlmon)
|
||||
IClassFactory_Release(ns_iter->cf);
|
||||
heap_free(ns_iter->protocol);
|
||||
heap_free(ns_iter);
|
||||
free(ns_iter->protocol);
|
||||
free(ns_iter);
|
||||
}
|
||||
|
||||
LIST_FOR_EACH_ENTRY_SAFE(mf_iter, mf_last, &mime_filter_list, mime_filter, entry) {
|
||||
IClassFactory_Release(mf_iter->cf);
|
||||
heap_free(mf_iter->mime);
|
||||
heap_free(mf_iter);
|
||||
free(mf_iter->mime);
|
||||
free(mf_iter);
|
||||
}
|
||||
|
||||
heap_free(user_agent);
|
||||
free(user_agent);
|
||||
}
|
||||
|
||||
+42
-31
@@ -86,7 +86,7 @@ static ULONG WINAPI URLMoniker_AddRef(IMoniker *iface)
|
||||
URLMoniker *This = impl_from_IMoniker(iface);
|
||||
ULONG refCount = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%u\n",This, refCount);
|
||||
TRACE("(%p) ref=%lu\n",This, refCount);
|
||||
|
||||
return refCount;
|
||||
}
|
||||
@@ -96,13 +96,13 @@ static ULONG WINAPI URLMoniker_Release(IMoniker *iface)
|
||||
URLMoniker *This = impl_from_IMoniker(iface);
|
||||
ULONG refCount = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%u\n",This, refCount);
|
||||
TRACE("(%p) ref=%lu\n",This, refCount);
|
||||
|
||||
if (!refCount) {
|
||||
if(This->uri)
|
||||
IUri_Release(This->uri);
|
||||
SysFreeString(This->URLName);
|
||||
heap_free(This);
|
||||
free(This);
|
||||
|
||||
URLMON_UnlockModule();
|
||||
}
|
||||
@@ -162,7 +162,7 @@ static HRESULT WINAPI URLMoniker_Load(IMoniker* iface,IStream* pStm)
|
||||
if(got != sizeof(ULONG))
|
||||
return E_FAIL;
|
||||
|
||||
new_uri_str = heap_alloc(size+sizeof(WCHAR));
|
||||
new_uri_str = malloc(size + sizeof(WCHAR));
|
||||
if(!new_uri_str)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -170,7 +170,7 @@ static HRESULT WINAPI URLMoniker_Load(IMoniker* iface,IStream* pStm)
|
||||
new_uri_str[size/sizeof(WCHAR)] = 0;
|
||||
if(SUCCEEDED(hres))
|
||||
hres = CreateUri(new_uri_str, 0, 0, &new_uri);
|
||||
heap_free(new_uri_str);
|
||||
free(new_uri_str);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
@@ -285,7 +285,7 @@ static HRESULT WINAPI URLMoniker_Reduce(IMoniker *iface, IBindCtx *pbc,
|
||||
{
|
||||
URLMoniker *This = impl_from_IMoniker(iface);
|
||||
|
||||
TRACE("(%p,%p,%d,%p,%p)\n", This, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
|
||||
TRACE("(%p,%p,%ld,%p,%p)\n", This, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
|
||||
|
||||
if(!ppmkReduced)
|
||||
return E_INVALIDARG;
|
||||
@@ -295,12 +295,27 @@ static HRESULT WINAPI URLMoniker_Reduce(IMoniker *iface, IBindCtx *pbc,
|
||||
return MK_S_REDUCED_TO_SELF;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI URLMoniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight,
|
||||
BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
|
||||
static HRESULT WINAPI URLMoniker_ComposeWith(IMoniker *iface, IMoniker *right,
|
||||
BOOL only_if_not_generic, IMoniker **composite)
|
||||
{
|
||||
URLMoniker *This = impl_from_IMoniker(iface);
|
||||
FIXME("(%p)->(%p,%d,%p): stub\n",This,pmkRight,fOnlyIfNotGeneric,ppmkComposite);
|
||||
return E_NOTIMPL;
|
||||
HRESULT res;
|
||||
IUri *right_uri;
|
||||
IUriContainer *uri_container;
|
||||
|
||||
TRACE("(%p)->(%p,%d,%p)\n", iface, right, only_if_not_generic, composite);
|
||||
|
||||
if (!right || !composite) return E_INVALIDARG;
|
||||
|
||||
res = IMoniker_QueryInterface(right, &IID_IUriContainer, (void**)&uri_container);
|
||||
if (SUCCEEDED(res)){
|
||||
res = IUriContainer_GetIUri(uri_container, &right_uri);
|
||||
if (SUCCEEDED(res)) res = CreateURLMonikerEx2(iface, right_uri, composite, 0);
|
||||
IUriContainer_Release(uri_container);
|
||||
return res;
|
||||
}
|
||||
|
||||
if(only_if_not_generic) return MK_E_NEEDGENERIC;
|
||||
return CreateGenericComposite(iface, right, composite);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI URLMoniker_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
|
||||
@@ -542,7 +557,7 @@ static HRESULT create_moniker(IUri *uri, URLMoniker **ret)
|
||||
URLMoniker *mon;
|
||||
HRESULT hres;
|
||||
|
||||
mon = heap_alloc(sizeof(*mon));
|
||||
mon = malloc(sizeof(*mon));
|
||||
if(!mon)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
@@ -554,7 +569,7 @@ static HRESULT create_moniker(IUri *uri, URLMoniker **ret)
|
||||
/* FIXME: try to avoid it */
|
||||
hres = IUri_GetDisplayUri(uri, &mon->URLName);
|
||||
if(FAILED(hres)) {
|
||||
heap_free(mon);
|
||||
free(mon);
|
||||
return hres;
|
||||
}
|
||||
|
||||
@@ -619,7 +634,7 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
|
||||
URLMoniker *obj;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p, %s, %p, %08x)\n", pmkContext, debugstr_w(szURL), ppmk, dwFlags);
|
||||
TRACE("(%p, %s, %p, %08lx)\n", pmkContext, debugstr_w(szURL), ppmk, dwFlags);
|
||||
|
||||
if (ppmk)
|
||||
*ppmk = NULL;
|
||||
@@ -628,7 +643,7 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
|
||||
return E_INVALIDARG;
|
||||
|
||||
if(dwFlags >= ARRAY_SIZE(create_flags_map)) {
|
||||
FIXME("Unsupported flags %x\n", dwFlags);
|
||||
FIXME("Unsupported flags %lx\n", dwFlags);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
@@ -672,7 +687,7 @@ HRESULT WINAPI CreateURLMonikerEx2(IMoniker *pmkContext, IUri *pUri, IMoniker **
|
||||
URLMoniker *ret;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %p %p %x)\n", pmkContext, pUri, ppmk, dwFlags);
|
||||
TRACE("(%p %p %p %lx)\n", pmkContext, pUri, ppmk, dwFlags);
|
||||
|
||||
if (ppmk)
|
||||
*ppmk = NULL;
|
||||
@@ -681,7 +696,7 @@ HRESULT WINAPI CreateURLMonikerEx2(IMoniker *pmkContext, IUri *pUri, IMoniker **
|
||||
return E_INVALIDARG;
|
||||
|
||||
if(dwFlags >= ARRAY_SIZE(create_flags_map)) {
|
||||
FIXME("Unsupported flags %x\n", dwFlags);
|
||||
FIXME("Unsupported flags %lx\n", dwFlags);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
@@ -773,7 +788,7 @@ HRESULT WINAPI BindAsyncMoniker(IMoniker *pmk, DWORD grfOpt, IBindStatusCallback
|
||||
LPBC pbc = NULL;
|
||||
HRESULT hr = E_INVALIDARG;
|
||||
|
||||
TRACE("(%p %08x %p %s %p)\n", pmk, grfOpt, pbsc, debugstr_guid(iidResult), ppvResult);
|
||||
TRACE("(%p %08lx %p %s %p)\n", pmk, grfOpt, pbsc, debugstr_guid(iidResult), ppvResult);
|
||||
|
||||
if (pmk && ppvResult)
|
||||
{
|
||||
@@ -823,17 +838,17 @@ HRESULT WINAPI URLDownloadToCacheFileA(LPUNKNOWN lpUnkCaller, LPCSTR szURL, LPST
|
||||
int len;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p %s %p %d %d %p)\n", lpUnkCaller, debugstr_a(szURL), szFileName,
|
||||
TRACE("(%p %s %p %ld %ld %p)\n", lpUnkCaller, debugstr_a(szURL), szFileName,
|
||||
dwBufLength, dwReserved, pBSC);
|
||||
|
||||
if(szURL) {
|
||||
len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
|
||||
url = heap_alloc(len*sizeof(WCHAR));
|
||||
url = malloc(len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, szURL, -1, url, len);
|
||||
}
|
||||
|
||||
if(szFileName)
|
||||
file_name = heap_alloc(dwBufLength*sizeof(WCHAR));
|
||||
file_name = malloc(dwBufLength * sizeof(WCHAR));
|
||||
|
||||
hres = URLDownloadToCacheFileW(lpUnkCaller, url, file_name, dwBufLength*sizeof(WCHAR),
|
||||
dwReserved, pBSC);
|
||||
@@ -841,8 +856,8 @@ HRESULT WINAPI URLDownloadToCacheFileA(LPUNKNOWN lpUnkCaller, LPCSTR szURL, LPST
|
||||
if(SUCCEEDED(hres) && file_name)
|
||||
WideCharToMultiByte(CP_ACP, 0, file_name, -1, szFileName, dwBufLength, NULL, NULL);
|
||||
|
||||
heap_free(url);
|
||||
heap_free(file_name);
|
||||
free(url);
|
||||
free(file_name);
|
||||
|
||||
return hres;
|
||||
}
|
||||
@@ -858,12 +873,9 @@ HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPW
|
||||
HRESULT hr;
|
||||
LPWSTR ext;
|
||||
|
||||
static WCHAR header[] = {
|
||||
'H','T','T','P','/','1','.','0',' ','2','0','0',' ',
|
||||
'O','K','\\','r','\\','n','\\','r','\\','n',0
|
||||
};
|
||||
static WCHAR header[] = L"HTTP/1.0 200 OK\\r\\n\\r\\n";
|
||||
|
||||
TRACE("(%p, %s, %p, %d, %d, %p)\n", lpUnkCaller, debugstr_w(szURL),
|
||||
TRACE("(%p, %s, %p, %ld, %ld, %p)\n", lpUnkCaller, debugstr_w(szURL),
|
||||
szFileName, dwBufLength, dwReserved, pBSC);
|
||||
|
||||
if (!szURL || !szFileName)
|
||||
@@ -923,7 +935,7 @@ HRESULT WINAPI HlinkSimpleNavigateToString( LPCWSTR szTarget,
|
||||
LPCWSTR szLocation, LPCWSTR szTargetFrameName, IUnknown *pUnk,
|
||||
IBindCtx *pbc, IBindStatusCallback *pbsc, DWORD grfHLNF, DWORD dwReserved)
|
||||
{
|
||||
FIXME("%s %s %s %p %p %p %u %u partial stub\n", debugstr_w( szTarget ), debugstr_w( szLocation ),
|
||||
FIXME("%s %s %s %p %p %p %lu %lu partial stub\n", debugstr_w( szTarget ), debugstr_w( szLocation ),
|
||||
debugstr_w( szTargetFrameName ), pUnk, pbc, pbsc, grfHLNF, dwReserved);
|
||||
|
||||
/* undocumented: 0 means HLNF_OPENINNEWWINDOW*/
|
||||
@@ -932,11 +944,10 @@ HRESULT WINAPI HlinkSimpleNavigateToString( LPCWSTR szTarget,
|
||||
if (grfHLNF == HLNF_OPENINNEWWINDOW)
|
||||
{
|
||||
SHELLEXECUTEINFOW sei;
|
||||
static const WCHAR openW[] = { 'o', 'p', 'e', 'n', 0 };
|
||||
|
||||
memset(&sei, 0, sizeof(sei));
|
||||
sei.cbSize = sizeof(sei);
|
||||
sei.lpVerb = openW;
|
||||
sei.lpVerb = L"open";
|
||||
sei.nShow = SW_SHOWNORMAL;
|
||||
sei.fMask = SEE_MASK_FLAG_NO_UI | SEE_MASK_NO_CONSOLE;
|
||||
sei.lpFile = szTarget;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "urlmon_main.h"
|
||||
|
||||
#include "winreg.h"
|
||||
#include "wine/winternl.h"
|
||||
#include "winternl.h"
|
||||
#include "wininet.h"
|
||||
#include "shlwapi.h"
|
||||
|
||||
@@ -263,13 +263,13 @@ HRESULT WINAPI URLOpenBlockingStreamA(LPUNKNOWN pCaller, LPCSTR szURL,
|
||||
int len;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p, %s, %p, 0x%x, %p)\n", pCaller, szURL, ppStream, dwReserved, lpfnCB);
|
||||
TRACE("(%p, %s, %p, 0x%lx, %p)\n", pCaller, szURL, ppStream, dwReserved, lpfnCB);
|
||||
|
||||
if (!szURL || !ppStream)
|
||||
return E_INVALIDARG;
|
||||
|
||||
len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
|
||||
szURLW = heap_alloc(len * sizeof(WCHAR));
|
||||
szURLW = malloc(len * sizeof(WCHAR));
|
||||
if (!szURLW)
|
||||
{
|
||||
*ppStream = NULL;
|
||||
@@ -279,7 +279,7 @@ HRESULT WINAPI URLOpenBlockingStreamA(LPUNKNOWN pCaller, LPCSTR szURL,
|
||||
|
||||
hr = URLOpenBlockingStreamW(pCaller, szURLW, ppStream, dwReserved, lpfnCB);
|
||||
|
||||
heap_free(szURLW);
|
||||
free(szURLW);
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -293,7 +293,7 @@ HRESULT WINAPI URLOpenBlockingStreamW(LPUNKNOWN pCaller, LPCWSTR szURL,
|
||||
{
|
||||
ProxyBindStatusCallback blocking_bsc;
|
||||
|
||||
TRACE("(%p, %s, %p, 0x%x, %p)\n", pCaller, debugstr_w(szURL), ppStream,
|
||||
TRACE("(%p, %s, %p, 0x%lx, %p)\n", pCaller, debugstr_w(szURL), ppStream,
|
||||
dwReserved, lpfnCB);
|
||||
|
||||
if (!szURL || !ppStream)
|
||||
@@ -315,20 +315,20 @@ HRESULT WINAPI URLOpenStreamA(LPUNKNOWN pCaller, LPCSTR szURL, DWORD dwReserved,
|
||||
int len;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p, %s, 0x%x, %p)\n", pCaller, szURL, dwReserved, lpfnCB);
|
||||
TRACE("(%p, %s, 0x%lx, %p)\n", pCaller, szURL, dwReserved, lpfnCB);
|
||||
|
||||
if (!szURL)
|
||||
return E_INVALIDARG;
|
||||
|
||||
len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
|
||||
szURLW = heap_alloc(len * sizeof(WCHAR));
|
||||
szURLW = malloc(len * sizeof(WCHAR));
|
||||
if (!szURLW)
|
||||
return E_OUTOFMEMORY;
|
||||
MultiByteToWideChar(CP_ACP, 0, szURL, -1, szURLW, len);
|
||||
|
||||
hr = URLOpenStreamW(pCaller, szURLW, dwReserved, lpfnCB);
|
||||
|
||||
heap_free(szURLW);
|
||||
free(szURLW);
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -343,7 +343,7 @@ HRESULT WINAPI URLOpenStreamW(LPUNKNOWN pCaller, LPCWSTR szURL, DWORD dwReserved
|
||||
ProxyBindStatusCallback async_bsc;
|
||||
IStream *pStream;
|
||||
|
||||
TRACE("(%p, %s, 0x%x, %p)\n", pCaller, debugstr_w(szURL), dwReserved,
|
||||
TRACE("(%p, %s, 0x%lx, %p)\n", pCaller, debugstr_w(szURL), dwReserved,
|
||||
lpfnCB);
|
||||
|
||||
if (!szURL)
|
||||
@@ -358,3 +358,13 @@ HRESULT WINAPI URLOpenStreamW(LPUNKNOWN pCaller, LPCWSTR szURL, DWORD dwReserved
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* URLOpenPullStreamW (URLMON.@)
|
||||
*/
|
||||
HRESULT WINAPI URLOpenPullStreamW(IUnknown *caller, const WCHAR *url, DWORD reserved,
|
||||
IBindStatusCallback *callback)
|
||||
{
|
||||
FIXME("%p %s %lu %p, stub!\n", caller, debugstr_w(url), reserved, callback);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
+390
-710
File diff suppressed because it is too large
Load Diff
@@ -22,10 +22,12 @@
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#pragma makedep po
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||
|
||||
ID_AXINSTALL_WARNING_DLG DIALOGEX 0, 0, 260, 115
|
||||
STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
ID_AXINSTALL_WARNING_DLG DIALOG 0, 0, 260, 115
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Security Warning"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
@@ -37,8 +39,15 @@ FONT 8, "MS Shell Dlg"
|
||||
PUSHBUTTON "", ID_AXINSTALL_INSTALL_BTN, 144, 48, 50, 14, WS_GROUP | WS_TABSTOP | WS_DISABLED
|
||||
CONTROL "", 102, "static", SS_ETCHEDHORZ, 10, 70, 240, 1
|
||||
ICON "", ID_AXINSTALL_ICON, 10, 82, 32, 32, WS_CHILD | WS_VISIBLE
|
||||
#if defined(__REACTOS__) && defined(RC_INVOKED)
|
||||
CONTROL "When installed, an ActiveX component has full access to your computer. Do not click install unless you have absolute trust in the above source.",
|
||||
22002, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 46, 80, 194, 23
|
||||
#else
|
||||
CONTROL "When installed, an ActiveX component has full access to your " \
|
||||
"computer. Do not click install unless you have absolute trust " \
|
||||
"in the above source.",
|
||||
22002, "static", SS_LEFT | WS_CHILD | WS_VISIBLE, 46, 80, 194, 23
|
||||
#endif
|
||||
}
|
||||
|
||||
STRINGTABLE
|
||||
@@ -53,10 +62,12 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
/* @makedep: urlmon.rgs */
|
||||
1 WINE_REGISTRY urlmon.rgs
|
||||
|
||||
2 WINE_REGISTRY "urlmon_urlmon.rgs"
|
||||
|
||||
/* @makedep: urlmon.inf */
|
||||
#ifdef __REACTOS__
|
||||
REGINST REGINST urlmon_utf16.inf
|
||||
#else
|
||||
REGINST REGINST urlmon.inf
|
||||
#endif
|
||||
|
||||
#define WINE_FILENAME_STR "urlmon.dll"
|
||||
#define WINE_FILEVERSION 6,0,2800,1485
|
||||
|
||||
+110
-263
@@ -1,269 +1,116 @@
|
||||
#100 ZoneMappingToRegKey
|
||||
#101 CoInternetIsExtensionsOff
|
||||
#102 CoInternetSetExtensionsOff
|
||||
#103 CoInternetExtensionAllowed
|
||||
#104 CoInternetCreateExtension
|
||||
#105 CoInternetExtensionCollectStats
|
||||
#106 CoInternetExtensionNeedsApproval
|
||||
#107 CoInternetApproveExtension
|
||||
108 stdcall -noname IsInternetESCEnabledLocal()
|
||||
#109 stub AsyncGetClassBits
|
||||
110 stdcall AsyncInstallDistributionUnit(wstr wstr wstr long long wstr ptr ptr long)
|
||||
111 stdcall -noname IsProtectedModeURL(ptr)
|
||||
#112 IsProtectedModeIUri
|
||||
#113 IsFileInSpecialDirs
|
||||
#114 SkipBrokerCheckForURL
|
||||
#115 IEIsProtectedModeURLInternal
|
||||
#116 CoInternetDomainNeedsApproval
|
||||
117 stdcall BindAsyncMoniker(ptr long ptr ptr ptr)
|
||||
#118 stub CDLGetLongPathNameA
|
||||
#119 stub CDLGetLongPathNameW
|
||||
120 stdcall CoGetClassObjectFromURL(ptr wstr long long wstr ptr long ptr ptr ptr)
|
||||
#121 stub CoInstall
|
||||
#122 CoInternetCanonicalizeIUri
|
||||
123 stdcall CoInternetCombineIUri(ptr ptr long ptr long)
|
||||
124 stdcall CoInternetCombineUrl(wstr wstr long ptr long ptr long)
|
||||
125 stdcall CoInternetCombineUrlEx(ptr wstr long ptr long)
|
||||
126 stdcall CoInternetCompareUrl(wstr wstr long)
|
||||
127 stdcall CoInternetCreateSecurityManager(ptr ptr long)
|
||||
128 stdcall CoInternetCreateZoneManager(ptr ptr long)
|
||||
#129 CoInternetFeatureSettingsChanged
|
||||
#130 stub CoInternetGetProtocolFlags
|
||||
131 stdcall CoInternetGetSecurityUrl(wstr ptr long long)
|
||||
132 stdcall CoInternetGetSecurityUrlEx(ptr ptr long long)
|
||||
133 stdcall CoInternetGetSession(long ptr long)
|
||||
134 stdcall CoInternetIsFeatureEnabled(long long)
|
||||
#135 CoInternetIsFeatureEnabledForIUri
|
||||
136 stdcall CoInternetIsFeatureEnabledForUrl(long long wstr ptr)
|
||||
137 stdcall CoInternetIsFeatureZoneElevationEnabled(wstr wstr ptr long)
|
||||
138 stdcall CoInternetParseIUri(ptr long long wstr long ptr long)
|
||||
139 stdcall CoInternetParseUrl(wstr long long wstr long ptr long)
|
||||
140 stdcall CoInternetQueryInfo(wstr long long ptr long ptr long)
|
||||
141 stdcall CoInternetSetFeatureEnabled(long long long)
|
||||
142 stdcall CompareSecurityIds(ptr long ptr long long)
|
||||
#143 CompatFlagsFromClsid
|
||||
144 stdcall CopyBindInfo(ptr ptr)
|
||||
145 stdcall CopyStgMedium(ptr ptr)
|
||||
146 stdcall CreateAsyncBindCtx(long ptr ptr ptr)
|
||||
147 stdcall CreateAsyncBindCtxEx(ptr long ptr ptr ptr long)
|
||||
148 stdcall CreateFormatEnumerator(long ptr ptr)
|
||||
149 stdcall CreateIUriBuilder(ptr long long ptr)
|
||||
150 stdcall CreateURLMoniker(ptr wstr ptr)
|
||||
151 stdcall CreateURLMonikerEx2(ptr ptr ptr long)
|
||||
152 stdcall CreateURLMonikerEx(ptr wstr ptr long)
|
||||
153 stdcall CreateUri(wstr long long ptr)
|
||||
#154 CreateUriFromMultiByteString
|
||||
#155 CreateUriPriv
|
||||
156 stdcall CreateUriWithFragment(wstr wstr long long ptr)
|
||||
# Up until Windows 2000 these APIs have hardcoded ordinals.
|
||||
# Keep it that way for compatibility.
|
||||
1 stub CDLGetLongPathNameA
|
||||
2 stub CDLGetLongPathNameW
|
||||
# IsJITInProgress has a hardcoded ordinal on WinME and Windows 2000
|
||||
#3 stub IsJITInProgress
|
||||
|
||||
@ stub AsyncGetClassBits
|
||||
@ stdcall AsyncInstallDistributionUnit(wstr wstr wstr long long wstr ptr ptr long)
|
||||
@ stdcall BindAsyncMoniker(ptr long ptr ptr ptr)
|
||||
@ stdcall CoGetClassObjectFromURL(ptr wstr long long wstr ptr long ptr ptr ptr)
|
||||
@ stub CoInstall
|
||||
@ stdcall CoInternetCombineUrl(wstr wstr long ptr long ptr long)
|
||||
@ stdcall CoInternetCombineUrlEx(ptr wstr long ptr long)
|
||||
@ stdcall CoInternetCompareUrl(wstr wstr long)
|
||||
@ stdcall CoInternetCombineIUri(ptr ptr long ptr long)
|
||||
@ stdcall CoInternetCreateSecurityManager(ptr ptr long)
|
||||
@ stdcall CoInternetCreateZoneManager(ptr ptr long)
|
||||
@ stub CoInternetGetProtocolFlags
|
||||
@ stdcall CoInternetGetSecurityUrl(wstr ptr long long)
|
||||
@ stdcall CoInternetGetSecurityUrlEx(ptr ptr long long)
|
||||
@ stdcall CoInternetGetSession(long ptr long)
|
||||
@ stdcall CoInternetIsFeatureEnabled(long long)
|
||||
@ stdcall CoInternetIsFeatureEnabledForUrl(long long wstr ptr)
|
||||
@ stdcall CoInternetIsFeatureZoneElevationEnabled(wstr wstr ptr long)
|
||||
@ stdcall CoInternetParseUrl(wstr long long ptr long ptr long)
|
||||
@ stdcall CoInternetParseIUri(ptr long long ptr long ptr long)
|
||||
@ stdcall CoInternetQueryInfo(wstr long long ptr long ptr long)
|
||||
@ stdcall CoInternetSetFeatureEnabled(long long long)
|
||||
@ stdcall CompareSecurityIds(ptr long ptr long long)
|
||||
@ stdcall CopyBindInfo(ptr ptr)
|
||||
@ stdcall CopyStgMedium(ptr ptr)
|
||||
@ stdcall CreateAsyncBindCtx(long ptr ptr ptr)
|
||||
@ stdcall CreateAsyncBindCtxEx(ptr long ptr ptr ptr long)
|
||||
@ stdcall CreateFormatEnumerator(long ptr ptr)
|
||||
@ stdcall CreateIUriBuilder(ptr long long ptr)
|
||||
@ stdcall CreateUri(wstr long long ptr)
|
||||
@ stdcall CreateUriWithFragment(wstr wstr long long ptr)
|
||||
@ stdcall CreateURLMoniker(ptr wstr ptr)
|
||||
@ stdcall CreateURLMonikerEx(ptr wstr ptr long)
|
||||
@ stdcall CreateURLMonikerEx2(ptr ptr ptr long)
|
||||
@ stdcall -private DllCanUnloadNow()
|
||||
@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
@ stdcall -private DllInstall(long wstr)
|
||||
@ stdcall -private DllRegisterServer()
|
||||
@ stdcall -private DllRegisterServerEx()
|
||||
@ stdcall -private DllUnregisterServer()
|
||||
163 stdcall Extract(ptr str)
|
||||
164 stdcall FaultInIEFeature(long ptr ptr long)
|
||||
#165 stub FindMediaType
|
||||
#166 stub FindMediaTypeClass
|
||||
167 stdcall FindMimeFromData(ptr wstr ptr long wstr long ptr long)
|
||||
#168 GetAddSitesFileUrl
|
||||
169 stdcall GetClassFileOrMime(ptr wstr ptr long wstr long ptr)
|
||||
#170 stub GetClassURL
|
||||
#171 stub GetComponentIDFromCLSSPEC
|
||||
#172 GetIDNFlagsForUri
|
||||
#173 GetIUriPriv
|
||||
#174 GetLabelsFromNamedHost
|
||||
#175 stub GetMarkOfTheWeb
|
||||
#176 GetPortFromUrlScheme
|
||||
#177 GetPropertyFromName
|
||||
#178 GetPropertyName
|
||||
179 stdcall GetSoftwareUpdateInfo(wstr ptr)
|
||||
#180 GetUrlmonThreadNotificationHwnd
|
||||
181 stdcall -stub HlinkGoBack(ptr)
|
||||
182 stdcall -stub HlinkGoForward(ptr)
|
||||
#183 stub HlinkNavigateMoniker
|
||||
184 stdcall HlinkNavigateString(ptr wstr)
|
||||
185 stdcall HlinkSimpleNavigateToMoniker(ptr wstr wstr ptr ptr ptr long long)
|
||||
186 stdcall HlinkSimpleNavigateToString(wstr wstr wstr ptr ptr ptr long long)
|
||||
187 stdcall -stub IEInstallScope(ptr)
|
||||
#188 InstallFlash
|
||||
#189 IntlPercentEncodeNormalize
|
||||
190 stdcall IsAsyncMoniker(ptr)
|
||||
#191 IsDWORDProperty
|
||||
#192 IsIntranetAvailable
|
||||
#193 stub IsJITInProgress
|
||||
194 stdcall IsLoggingEnabledA(str)
|
||||
195 stdcall IsLoggingEnabledW(wstr)
|
||||
#196 IsStringProperty
|
||||
197 stdcall IsValidURL(ptr wstr long)
|
||||
198 stdcall MkParseDisplayNameEx(ptr wstr ptr ptr)
|
||||
199 stdcall ObtainUserAgentString(long str ptr)
|
||||
#200 stub PrivateCoInstall
|
||||
#201 QueryAssociations
|
||||
#202 QueryClsidAssociation
|
||||
203 stdcall RegisterBindStatusCallback(ptr ptr ptr long)
|
||||
204 stdcall RegisterFormatEnumerator(ptr ptr long)
|
||||
#205 stub RegisterMediaTypeClass
|
||||
206 stdcall RegisterMediaTypes(long ptr ptr)
|
||||
207 stdcall ReleaseBindInfo(ptr)
|
||||
#208 ResetUrlmonLanguageData
|
||||
209 stdcall RevokeBindStatusCallback(ptr ptr)
|
||||
210 stdcall RevokeFormatEnumerator(ptr ptr)
|
||||
#211 stub SetSoftwareUpdateAdvertisementState
|
||||
#212 ShouldDisplayPunycodeForUri
|
||||
#213 ShouldShowIntranetWarningSecband
|
||||
#214 ShowTrustAlertDialog
|
||||
215 stdcall -stub URLDownloadA(long ptr long ptr long)
|
||||
216 stdcall URLDownloadToCacheFileA(ptr str str long long ptr)
|
||||
217 stdcall URLDownloadToCacheFileW(ptr wstr wstr long long ptr)
|
||||
218 stdcall URLDownloadToFileA(ptr str str long ptr)
|
||||
219 stdcall URLDownloadToFileW(ptr wstr wstr long ptr)
|
||||
#220 stub URLDownloadW
|
||||
221 stdcall URLOpenBlockingStreamA(ptr str ptr long ptr)
|
||||
222 stdcall URLOpenBlockingStreamW(ptr wstr ptr long ptr)
|
||||
#223 stub URLOpenPullStreamA
|
||||
#224 stub URLOpenPullStreamW
|
||||
225 stdcall URLOpenStreamA(ptr str long ptr)
|
||||
226 stdcall URLOpenStreamW(ptr wstr long ptr)
|
||||
#227 stub UrlMkBuildVersion
|
||||
228 stdcall UrlMkGetSessionOption(long ptr long ptr long)
|
||||
229 stdcall UrlMkSetSessionOption(long ptr long long)
|
||||
#230 stub WriteHitLogging
|
||||
#231 stub ZonesReInit
|
||||
#304 IECompatLogEventWithUrl
|
||||
#305 IECompatLogPopupMgr
|
||||
#306 IECompatLogMkAndViewSource
|
||||
#307 IECompatLogMimeHandling
|
||||
#308 IECompatLogControlBlock
|
||||
#309 IECompatLogObjCache
|
||||
#310 IECompatLogWindowRestriction
|
||||
#311 IECompatLogBinaryBhvr
|
||||
#312 IECompatLogIDNNavigation
|
||||
#313 IECompatLogSSLNavBlock
|
||||
#314 IECompatLogRedirectUrl
|
||||
#315 IECompatLogScriptUrl
|
||||
#316 IECompatLogAntiphishingUrl
|
||||
#318 IECompatLogZoneElevation3
|
||||
#319 IECompatLogZoneElevation4
|
||||
#320 IECompatLogSubframeNavigate
|
||||
#321 IECompatLogFileDownloadWithSrcUrl
|
||||
#322 IECompatLogCSSFix
|
||||
#323 IECompatLogUIPIBlockedExtension
|
||||
#324 ResetWarnOnIntranetFlag
|
||||
#325 PSCreateMemoryPropertyStore
|
||||
#326 PSCreatePropertyStoreFromObject
|
||||
#327 PSCreateAdapterFromPropertyStore
|
||||
#328 VariantCompare
|
||||
#329 VariantToGUID
|
||||
#330 VariantToStringWithDefault
|
||||
#331 InitPropVariantFromBuffer
|
||||
#332 InitPropVariantFromCLSID
|
||||
#333 InitPropVariantFromFileTime
|
||||
#334 InitPropVariantFromString
|
||||
#335 InitVariantFromBuffer
|
||||
#336 InitVariantFromStrRet
|
||||
#337 PropVariantGetElementCount
|
||||
#338 PropVariantToBoolean
|
||||
#339 PropVariantToInt32
|
||||
#340 PropVariantToUInt32
|
||||
#341 PropVariantToInt64
|
||||
#342 PropVariantToUInt64
|
||||
#343 PropVariantToBooleanWithDefault
|
||||
#344 PropVariantToInt32WithDefault
|
||||
#345 PropVariantToUInt32WithDefault
|
||||
#346 PropVariantToInt64WithDefault
|
||||
#347 PropVariantToUInt64WithDefault
|
||||
#348 PropVariantToBuffer
|
||||
#349 PropVariantToFileTime
|
||||
#350 PropVariantToGUID
|
||||
#351 PropVariantToStringAlloc
|
||||
#352 VariantToBoolean
|
||||
#353 VariantToBooleanWithDefault
|
||||
#354 VariantToPropVariant
|
||||
#355 PropVariantToVariant
|
||||
#360 ClearVariantArray
|
||||
#361 InitVariantFromFileTime
|
||||
#362 InitVariantFromGUIDAsString
|
||||
#363 InitVariantFromResource
|
||||
#364 PropVariantToStringWithDefault
|
||||
#365 PropVariantToString
|
||||
#366 VariantToBuffer
|
||||
#367 VariantToDouble
|
||||
#368 VariantToDoubleArray
|
||||
#369 VariantToDoubleArrayAlloc
|
||||
#370 VariantToFileTime
|
||||
#371 VariantToInt16
|
||||
#372 VariantToUInt16
|
||||
#373 VariantToInt32
|
||||
#374 VariantToUInt32
|
||||
#375 VariantToInt64
|
||||
#376 VariantToUInt64
|
||||
#377 VariantToInt16Array
|
||||
#378 VariantToUInt16Array
|
||||
#379 VariantToInt32Array
|
||||
#380 VariantToUInt32Array
|
||||
#381 VariantToInt64Array
|
||||
#382 VariantToUInt64Array
|
||||
#383 VariantToInt16ArrayAlloc
|
||||
#384 VariantToUInt16ArrayAlloc
|
||||
#385 VariantToInt32ArrayAlloc
|
||||
#386 VariantToUInt32ArrayAlloc
|
||||
#387 VariantToUInt32WithDefault
|
||||
#388 VariantToInt64ArrayAlloc
|
||||
#389 VariantToUInt64ArrayAlloc
|
||||
#390 VariantToString
|
||||
#391 VariantToStringArray
|
||||
#392 VariantToStringArrayAlloc
|
||||
#393 VariantToStringAlloc
|
||||
#394 VariantToStrRet
|
||||
#395 PropVariantToBSTR
|
||||
#396 PropVariantChangeType
|
||||
#400 InitCustomerFeedback
|
||||
#401 DeinitCustomerFeedback
|
||||
#403 SqmAddExtensionClsid
|
||||
#404 SqmOptedIn
|
||||
#406 ScheduleSqmTasksInIdleThread
|
||||
#407 IESqmGetSession
|
||||
#408 LogSqmDWord
|
||||
#409 LogSqmBool
|
||||
#410 LogSqmBits
|
||||
#411 LogSqmSetString
|
||||
#412 LogSqmIfMax
|
||||
#413 LogSqmIfMin
|
||||
#414 LogSqmIncrement
|
||||
#415 LogSqmAddToAverage
|
||||
#416 LogSqmAddToStreamDWord
|
||||
#417 LogSqmAddToStreamString
|
||||
#420 FindDomainOrHostFromUri
|
||||
#421 GetIESqmMutex
|
||||
#422 ReleaseIESqmMutex
|
||||
#423 LogSqmUXCommandOffsetInternal
|
||||
#430 IsSQMOptionEnabled
|
||||
#431 SetSQMOption
|
||||
#432 GetSQMUrl
|
||||
#433 LCIELowerConnLimit
|
||||
#434 IECompatLogApplicationProtocolDialog
|
||||
#435 IECompatLogNavigationRestricted
|
||||
#436 IECompatLogMimeSniffUnsafe
|
||||
#437 IECompatLogMimeSniffImageNotUpgraded
|
||||
#438 IECompatLogProxyContentManaged
|
||||
#439 IECompatLogNoCompression
|
||||
#440 LCIEGetEffectiveConnLimit
|
||||
#441 UrlmonCreateInstance
|
||||
#442 CreateBrowserEmulationFilter
|
||||
#443 CreateReadOnlyBrowserEmulationFilter
|
||||
#444 MapUriToBrowserEmulationState
|
||||
#445 MapBrowserEmulationModeToUserAgent
|
||||
#446 CoInternetGetBrowserProfile
|
||||
#447 CoInternetSetBrowserProfile
|
||||
#448 DeleteBrowserEmulationUserData
|
||||
#449 CoInternetGetBrowserEmulationMode
|
||||
#450 CoInternetSetBrowserEmulationMode
|
||||
#451 CleanBrowserEmulationCache
|
||||
#452 ClearSessionBasedEmulationData
|
||||
#453 GetSecMgrCacheSeed
|
||||
#454 SeedSecMgrCache
|
||||
#455 FlushUrlmonZonesCache
|
||||
#456 Urlmon_CleanIETldListCache
|
||||
#457 CreateIETldListManager
|
||||
#458 IsClientCertSuppliedInProcess
|
||||
@ stdcall Extract(ptr str)
|
||||
@ stdcall FaultInIEFeature(long ptr ptr long)
|
||||
@ stub FindMediaType
|
||||
@ stub FindMediaTypeClass
|
||||
@ stdcall FindMimeFromData(ptr wstr ptr long wstr long ptr long)
|
||||
@ stdcall GetClassFileOrMime(ptr wstr ptr long wstr long ptr)
|
||||
@ stub GetClassURL
|
||||
@ stub GetComponentIDFromCLSSPEC
|
||||
@ stdcall GetIUriPriv(ptr ptr)
|
||||
@ stub GetMarkOfTheWeb
|
||||
@ stdcall GetSoftwareUpdateInfo(wstr ptr)
|
||||
@ stub HlinkGoBack
|
||||
@ stub HlinkGoForward
|
||||
@ stub HlinkNavigateMoniker
|
||||
@ stdcall HlinkNavigateString(ptr wstr)
|
||||
@ stdcall HlinkSimpleNavigateToMoniker(ptr wstr wstr ptr ptr ptr long long)
|
||||
@ stdcall HlinkSimpleNavigateToString(wstr wstr wstr ptr ptr ptr long long)
|
||||
@ stub IEInstallScope
|
||||
@ stdcall IsAsyncMoniker(ptr)
|
||||
@ stdcall IsLoggingEnabledA(str)
|
||||
@ stdcall IsLoggingEnabledW(wstr)
|
||||
@ stdcall IsValidURL(ptr wstr long)
|
||||
@ stdcall MkParseDisplayNameEx(ptr wstr ptr ptr)
|
||||
@ stdcall ObtainUserAgentString(long str ptr)
|
||||
@ stub PrivateCoInstall
|
||||
@ stdcall RegisterBindStatusCallback(ptr ptr ptr long)
|
||||
@ stdcall RegisterFormatEnumerator(ptr ptr long)
|
||||
@ stub RegisterMediaTypeClass
|
||||
@ stdcall RegisterMediaTypes(long ptr ptr)
|
||||
@ stdcall ReleaseBindInfo(ptr)
|
||||
@ stdcall RevokeBindStatusCallback(ptr ptr)
|
||||
@ stdcall RevokeFormatEnumerator(ptr ptr)
|
||||
@ stub SetSoftwareUpdateAdvertisementState
|
||||
@ stdcall ShouldShowIntranetWarningSecband(long)
|
||||
@ stub URLDownloadA
|
||||
@ stdcall URLDownloadToCacheFileA(ptr str str long long ptr)
|
||||
@ stdcall URLDownloadToCacheFileW(ptr wstr wstr long long ptr)
|
||||
@ stdcall URLDownloadToFileA(ptr str str long ptr)
|
||||
@ stdcall URLDownloadToFileW(ptr wstr wstr long ptr)
|
||||
@ stub URLDownloadW
|
||||
@ stdcall URLOpenBlockingStreamA(ptr str ptr long ptr)
|
||||
@ stdcall URLOpenBlockingStreamW(ptr wstr ptr long ptr)
|
||||
@ stub URLOpenPullStreamA
|
||||
@ stdcall URLOpenPullStreamW(ptr wstr long ptr)
|
||||
@ stdcall URLOpenStreamA(ptr str long ptr)
|
||||
@ stdcall URLOpenStreamW(ptr wstr long ptr)
|
||||
@ stub UrlMkBuildVersion
|
||||
@ stdcall UrlMkGetSessionOption(long ptr long ptr long)
|
||||
@ stdcall UrlMkSetSessionOption(long ptr long long)
|
||||
@ stub WriteHitLogging
|
||||
@ stub ZonesReInit
|
||||
|
||||
108 stdcall @() IsInternetESCEnabledLocal
|
||||
111 stdcall @(wstr) IsProtectedModeURL
|
||||
328 stdcall @(ptr ptr) propsys.VariantCompare
|
||||
329 stdcall @(ptr ptr) propsys.VariantToGUID
|
||||
331 stdcall @(ptr long ptr) propsys.InitPropVariantFromBuffer
|
||||
335 stdcall @(ptr long ptr) propsys.InitVariantFromBuffer
|
||||
350 stdcall @(ptr ptr) propsys.PropVariantToGUID
|
||||
362 stdcall @(ptr ptr) propsys.InitVariantFromGUIDAsString
|
||||
363 stdcall @(long long ptr) propsys.InitVariantFromResource
|
||||
387 stdcall @(ptr long) propsys.VariantToUInt32WithDefault
|
||||
410 stdcall @(long long) LogSqmBits
|
||||
414 stdcall @(long long) LogSqmIncrement
|
||||
423 stdcall @(long long long long) LogSqmUXCommandOffsetInternal
|
||||
444 stdcall @(long long long) MapUriToBrowserEmulationState
|
||||
445 stdcall -noname MapBrowserEmulationModeToUserAgent(ptr ptr)
|
||||
446 stdcall @(long) CoInternetGetBrowserProfile
|
||||
455 stdcall @() FlushUrlmonZonesCache
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "urlmon_main.h"
|
||||
|
||||
#include "winreg.h"
|
||||
@@ -75,7 +73,7 @@ tls_data_t *get_tls_data(void)
|
||||
|
||||
data = TlsGetValue(urlmon_tls);
|
||||
if(!data) {
|
||||
data = heap_alloc_zero(sizeof(tls_data_t));
|
||||
data = calloc(1, sizeof(tls_data_t));
|
||||
if(!data)
|
||||
return NULL;
|
||||
|
||||
@@ -99,7 +97,7 @@ static void free_tls_list(void)
|
||||
while(!list_empty(&tls_list)) {
|
||||
data = LIST_ENTRY(list_head(&tls_list), tls_data_t, entry);
|
||||
list_remove(&data->entry);
|
||||
heap_free(data);
|
||||
free(data);
|
||||
}
|
||||
|
||||
TlsFree(urlmon_tls);
|
||||
@@ -125,7 +123,7 @@ static void detach_thread(void)
|
||||
DestroyWindow(data->notif_hwnd);
|
||||
}
|
||||
|
||||
heap_free(data);
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void process_detach(void)
|
||||
@@ -149,7 +147,7 @@ static void process_detach(void)
|
||||
*/
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
|
||||
{
|
||||
TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, fImpLoad);
|
||||
TRACE("%p 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
|
||||
|
||||
URLMON_DllMain( hinstDLL, fdwReason, fImpLoad );
|
||||
|
||||
@@ -230,7 +228,7 @@ const char *debugstr_bindstatus(ULONG status)
|
||||
X(BINDSTATUS_DISPLAYNAMEAVAILABLE);
|
||||
#undef X
|
||||
default:
|
||||
return wine_dbg_sprintf("(invalid status %u)", status);
|
||||
return wine_dbg_sprintf("(invalid status %lu)", status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,21 +381,14 @@ struct object_creation_info
|
||||
LPCWSTR protocol;
|
||||
};
|
||||
|
||||
static const WCHAR wszFile[] = {'f','i','l','e',0};
|
||||
static const WCHAR wszFtp[] = {'f','t','p',0};
|
||||
static const WCHAR wszGopher[] = {'g','o','p','h','e','r',0};
|
||||
static const WCHAR wszHttp[] = {'h','t','t','p',0};
|
||||
static const WCHAR wszHttps[] = {'h','t','t','p','s',0};
|
||||
static const WCHAR wszMk[] = {'m','k',0};
|
||||
|
||||
static const struct object_creation_info object_creation[] =
|
||||
{
|
||||
{ &CLSID_FileProtocol, &FileProtocolCF.IClassFactory_iface, wszFile },
|
||||
{ &CLSID_FtpProtocol, &FtpProtocolCF.IClassFactory_iface, wszFtp },
|
||||
{ &CLSID_GopherProtocol, &GopherProtocolCF.IClassFactory_iface, wszGopher },
|
||||
{ &CLSID_HttpProtocol, &HttpProtocolCF.IClassFactory_iface, wszHttp },
|
||||
{ &CLSID_HttpSProtocol, &HttpSProtocolCF.IClassFactory_iface, wszHttps },
|
||||
{ &CLSID_MkProtocol, &MkProtocolCF.IClassFactory_iface, wszMk },
|
||||
{ &CLSID_FileProtocol, &FileProtocolCF.IClassFactory_iface, L"file" },
|
||||
{ &CLSID_FtpProtocol, &FtpProtocolCF.IClassFactory_iface, L"ftp" },
|
||||
{ &CLSID_GopherProtocol, &GopherProtocolCF.IClassFactory_iface, L"gopher" },
|
||||
{ &CLSID_HttpProtocol, &HttpProtocolCF.IClassFactory_iface, L"http" },
|
||||
{ &CLSID_HttpSProtocol, &HttpSProtocolCF.IClassFactory_iface, L"https" },
|
||||
{ &CLSID_MkProtocol, &MkProtocolCF.IClassFactory_iface, L"mk" },
|
||||
{ &CLSID_InternetSecurityManager, &SecurityManagerCF.IClassFactory_iface, NULL },
|
||||
{ &CLSID_InternetZoneManager, &ZoneManagerCF.IClassFactory_iface, NULL },
|
||||
{ &CLSID_StdURLMoniker, &StdURLMonikerCF.IClassFactory_iface, NULL },
|
||||
@@ -460,9 +451,7 @@ static HRESULT register_inf(BOOL doregister)
|
||||
HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
|
||||
HMODULE hAdvpack;
|
||||
|
||||
static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
|
||||
|
||||
hAdvpack = LoadLibraryW(wszAdvpack);
|
||||
hAdvpack = LoadLibraryW(L"advpack.dll");
|
||||
pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
|
||||
|
||||
return pRegInstall(hProxyDll, doregister ? "RegisterDll" : "UnregisterDll", NULL);
|
||||
@@ -524,7 +513,7 @@ HRESULT WINAPI DllRegisterServerEx(void)
|
||||
*/
|
||||
HRESULT WINAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved)
|
||||
{
|
||||
FIXME("(%p, %s, %d): stub\n", pBC, debugstr_w(szURL), dwReserved);
|
||||
FIXME("(%p, %s, %ld): stub\n", pBC, debugstr_w(szURL), dwReserved);
|
||||
|
||||
if (dwReserved || !szURL)
|
||||
return E_INVALIDARG;
|
||||
@@ -540,7 +529,7 @@ HRESULT WINAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved)
|
||||
HRESULT WINAPI FaultInIEFeature( HWND hwnd, uCLSSPEC * pClassSpec,
|
||||
QUERYCONTEXT *pQuery, DWORD flags )
|
||||
{
|
||||
FIXME("%p %p %p %08x\n", hwnd, pClassSpec, pQuery, flags);
|
||||
FIXME("%p %p %p %08lx\n", hwnd, pClassSpec, pQuery, flags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -552,7 +541,7 @@ HRESULT WINAPI CoGetClassObjectFromURL( REFCLSID rclsid, LPCWSTR szCodeURL, DWOR
|
||||
LPBINDCTX pBindCtx, DWORD dwClsContext, LPVOID pvReserved,
|
||||
REFIID riid, LPVOID *ppv )
|
||||
{
|
||||
FIXME("(%s %s %d %d %s %p %d %p %s %p) Stub!\n", debugstr_guid(rclsid), debugstr_w(szCodeURL),
|
||||
FIXME("(%s %s %ld %ld %s %p %ld %p %s %p) Stub!\n", debugstr_guid(rclsid), debugstr_w(szCodeURL),
|
||||
dwFileVersionMS, dwFileVersionLS, debugstr_w(szContentType), pBindCtx, dwClsContext, pvReserved,
|
||||
debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
@@ -607,39 +596,39 @@ HRESULT WINAPI CopyStgMedium(const STGMEDIUM *src, STGMEDIUM *dst)
|
||||
case TYMED_NULL:
|
||||
break;
|
||||
case TYMED_FILE:
|
||||
if(src->u.lpszFileName && !src->pUnkForRelease) {
|
||||
DWORD size = (lstrlenW(src->u.lpszFileName)+1)*sizeof(WCHAR);
|
||||
dst->u.lpszFileName = CoTaskMemAlloc(size);
|
||||
if(!dst->u.lpszFileName)
|
||||
if(src->lpszFileName && !src->pUnkForRelease) {
|
||||
DWORD size = (lstrlenW(src->lpszFileName)+1)*sizeof(WCHAR);
|
||||
dst->lpszFileName = CoTaskMemAlloc(size);
|
||||
if(!dst->lpszFileName)
|
||||
return E_OUTOFMEMORY;
|
||||
memcpy(dst->u.lpszFileName, src->u.lpszFileName, size);
|
||||
memcpy(dst->lpszFileName, src->lpszFileName, size);
|
||||
}
|
||||
break;
|
||||
case TYMED_ISTREAM:
|
||||
if(dst->u.pstm)
|
||||
IStream_AddRef(dst->u.pstm);
|
||||
if(dst->pstm)
|
||||
IStream_AddRef(dst->pstm);
|
||||
break;
|
||||
case TYMED_ISTORAGE:
|
||||
if(dst->u.pstg)
|
||||
IStorage_AddRef(dst->u.pstg);
|
||||
if(dst->pstg)
|
||||
IStorage_AddRef(dst->pstg);
|
||||
break;
|
||||
case TYMED_HGLOBAL:
|
||||
if(dst->u.hGlobal) {
|
||||
SIZE_T size = GlobalSize(src->u.hGlobal);
|
||||
if(dst->hGlobal) {
|
||||
SIZE_T size = GlobalSize(src->hGlobal);
|
||||
char *src_ptr, *dst_ptr;
|
||||
|
||||
dst->u.hGlobal = GlobalAlloc(GMEM_FIXED, size);
|
||||
if(!dst->u.hGlobal)
|
||||
dst->hGlobal = GlobalAlloc(GMEM_FIXED, size);
|
||||
if(!dst->hGlobal)
|
||||
return E_OUTOFMEMORY;
|
||||
dst_ptr = GlobalLock(dst->u.hGlobal);
|
||||
src_ptr = GlobalLock(src->u.hGlobal);
|
||||
dst_ptr = GlobalLock(dst->hGlobal);
|
||||
src_ptr = GlobalLock(src->hGlobal);
|
||||
memcpy(dst_ptr, src_ptr, size);
|
||||
GlobalUnlock(src_ptr);
|
||||
GlobalUnlock(dst_ptr);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
FIXME("Unimplemented tymed %d\n", src->tymed);
|
||||
FIXME("Unimplemented tymed %ld\n", src->tymed);
|
||||
}
|
||||
|
||||
if(dst->pUnkForRelease)
|
||||
@@ -721,7 +710,7 @@ HRESULT WINAPI GetClassFileOrMime(LPBC pBC, LPCWSTR pszFilename,
|
||||
LPVOID pBuffer, DWORD cbBuffer, LPCWSTR pszMimeType, DWORD dwReserved,
|
||||
CLSID *pclsid)
|
||||
{
|
||||
FIXME("(%p, %s, %p, %d, %s, 0x%08x, %p): stub\n", pBC, debugstr_w(pszFilename), pBuffer,
|
||||
FIXME("(%p, %s, %p, %ld, %s, 0x%08lx, %p): stub\n", pBC, debugstr_w(pszFilename), pBuffer,
|
||||
cbBuffer, debugstr_w(pszMimeType), dwReserved, pclsid);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
@@ -777,7 +766,17 @@ BOOL WINAPI IsProtectedModeURL(const WCHAR *url)
|
||||
*/
|
||||
int WINAPI LogSqmBits(DWORD unk1, DWORD unk2)
|
||||
{
|
||||
FIXME("stub: %d %d\n", unk1, unk2);
|
||||
FIXME("stub: %ld %ld\n", unk1, unk2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* LogSqmIncrement (URLMON.414)
|
||||
* Undocumented, added in IE8
|
||||
*/
|
||||
int WINAPI LogSqmIncrement(DWORD unk1, DWORD unk2)
|
||||
{
|
||||
FIXME("stub: %ld %ld\n", unk1, unk2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -787,7 +786,7 @@ int WINAPI LogSqmBits(DWORD unk1, DWORD unk2)
|
||||
*/
|
||||
void WINAPI LogSqmUXCommandOffsetInternal(DWORD unk1, DWORD unk2, DWORD unk3, DWORD unk4)
|
||||
{
|
||||
FIXME("stub: %d %d %d %d\n", unk1, unk2, unk3, unk4);
|
||||
FIXME("stub: %ld %ld %ld %ld\n", unk1, unk2, unk3, unk4);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
@@ -796,17 +795,7 @@ void WINAPI LogSqmUXCommandOffsetInternal(DWORD unk1, DWORD unk2, DWORD unk3, DW
|
||||
*/
|
||||
int WINAPI MapUriToBrowserEmulationState(DWORD unk1, DWORD unk2, DWORD unk3)
|
||||
{
|
||||
FIXME("stub: %d %d %d\n", unk1, unk2, unk3);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MapBrowserEmulationModeToUserAgent (URLMON.445)
|
||||
* Undocumented, added in IE8
|
||||
*/
|
||||
int WINAPI MapBrowserEmulationModeToUserAgent(DWORD unk1, DWORD unk2)
|
||||
{
|
||||
FIXME("stub: %d %d\n", unk1, unk2);
|
||||
FIXME("stub: %ld %ld %ld\n", unk1, unk2, unk3);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -816,7 +805,7 @@ int WINAPI MapBrowserEmulationModeToUserAgent(DWORD unk1, DWORD unk2)
|
||||
*/
|
||||
HRESULT WINAPI CoInternetGetBrowserProfile(DWORD unk)
|
||||
{
|
||||
FIXME("%x: stub\n", unk);
|
||||
FIXME("%lx: stub\n", unk);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@@ -845,7 +834,7 @@ HRESULT WINAPI RegisterMediaTypes(UINT types, LPCSTR *szTypes, CLIPFORMAT *cfTyp
|
||||
*/
|
||||
BOOL WINAPI ShouldShowIntranetWarningSecband(DWORD unk)
|
||||
{
|
||||
FIXME("%x: stub\n", unk);
|
||||
FIXME("%lx: stub\n", unk);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
#define __WINE_URLMON_MAIN_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#ifdef __REACTOS__
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
@@ -31,66 +28,65 @@
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#ifdef __REACTOS__
|
||||
#include "winnls.h"
|
||||
#include <winnls.h>
|
||||
#endif
|
||||
#include "ole2.h"
|
||||
#include "urlmon.h"
|
||||
#include "wininet.h"
|
||||
|
||||
#include "wine/heap.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
extern HINSTANCE hProxyDll DECLSPEC_HIDDEN;
|
||||
extern HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT StdURLMoniker_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT HttpSProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HRESULT Uri_Construct(IUnknown *pUnkOuter, LPVOID *ppobj) DECLSPEC_HIDDEN;
|
||||
extern HINSTANCE hProxyDll;
|
||||
extern HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT StdURLMoniker_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT HttpSProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT GopherProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT MimeFilter_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
extern HRESULT Uri_Construct(IUnknown *pUnkOuter, LPVOID *ppobj);
|
||||
|
||||
extern BOOL WINAPI URLMON_DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI URLMON_DllRegisterServer(void) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI URLMON_DllUnregisterServer(void) DECLSPEC_HIDDEN;
|
||||
extern BOOL WINAPI URLMON_DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
|
||||
extern HRESULT WINAPI URLMON_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv);
|
||||
extern HRESULT WINAPI URLMON_DllRegisterServer(void);
|
||||
extern HRESULT WINAPI URLMON_DllUnregisterServer(void);
|
||||
|
||||
extern GUID const CLSID_PSFactoryBuffer DECLSPEC_HIDDEN;
|
||||
extern GUID const CLSID_CUri DECLSPEC_HIDDEN;
|
||||
extern GUID const CLSID_PSFactoryBuffer;
|
||||
extern GUID const CLSID_CUri;
|
||||
|
||||
/**********************************************************************
|
||||
* Dll lifetime tracking declaration for urlmon.dll
|
||||
*/
|
||||
extern LONG URLMON_refCount DECLSPEC_HIDDEN;
|
||||
extern LONG URLMON_refCount;
|
||||
static inline void URLMON_LockModule(void) { InterlockedIncrement( &URLMON_refCount ); }
|
||||
static inline void URLMON_UnlockModule(void) { InterlockedDecrement( &URLMON_refCount ); }
|
||||
|
||||
extern HINSTANCE urlmon_instance;
|
||||
|
||||
IInternetProtocolInfo *get_protocol_info(LPCWSTR) DECLSPEC_HIDDEN;
|
||||
HRESULT get_protocol_handler(IUri*,CLSID*,IClassFactory**) DECLSPEC_HIDDEN;
|
||||
IInternetProtocol *get_mime_filter(LPCWSTR) DECLSPEC_HIDDEN;
|
||||
BOOL is_registered_protocol(LPCWSTR) DECLSPEC_HIDDEN;
|
||||
HRESULT register_namespace(IClassFactory*,REFIID,LPCWSTR,BOOL) DECLSPEC_HIDDEN;
|
||||
HINTERNET get_internet_session(IInternetBindInfo*) DECLSPEC_HIDDEN;
|
||||
WCHAR *get_useragent(void) DECLSPEC_HIDDEN;
|
||||
void update_user_agent(WCHAR*) DECLSPEC_HIDDEN;
|
||||
void free_session(void) DECLSPEC_HIDDEN;
|
||||
IInternetProtocolInfo *get_protocol_info(LPCWSTR);
|
||||
HRESULT get_protocol_handler(IUri*,CLSID*,IClassFactory**);
|
||||
IInternetProtocol *get_mime_filter(LPCWSTR);
|
||||
BOOL is_registered_protocol(LPCWSTR);
|
||||
HRESULT register_namespace(IClassFactory*,REFIID,LPCWSTR,BOOL);
|
||||
HINTERNET get_internet_session(IInternetBindInfo*);
|
||||
WCHAR *get_useragent(void);
|
||||
void update_user_agent(WCHAR*);
|
||||
void free_session(void);
|
||||
|
||||
HRESULT find_mime_from_ext(const WCHAR*,WCHAR**) DECLSPEC_HIDDEN;
|
||||
HRESULT find_mime_from_ext(const WCHAR*,WCHAR**);
|
||||
|
||||
HRESULT bind_to_storage(IUri*,IBindCtx*,REFIID,void**) DECLSPEC_HIDDEN;
|
||||
HRESULT bind_to_object(IMoniker*,IUri*,IBindCtx*,REFIID,void**ppv) DECLSPEC_HIDDEN;
|
||||
HRESULT bind_to_storage(IUri*,IBindCtx*,REFIID,void**);
|
||||
HRESULT bind_to_object(IMoniker*,IUri*,IBindCtx*,REFIID,void**ppv);
|
||||
|
||||
HRESULT create_default_callback(IBindStatusCallback**) DECLSPEC_HIDDEN;
|
||||
HRESULT wrap_callback(IBindStatusCallback*,IBindStatusCallback**) DECLSPEC_HIDDEN;
|
||||
IBindStatusCallback *bsc_from_bctx(IBindCtx*) DECLSPEC_HIDDEN;
|
||||
HRESULT create_default_callback(IBindStatusCallback**);
|
||||
HRESULT wrap_callback(IBindStatusCallback*,IBindStatusCallback**);
|
||||
IBindStatusCallback *bsc_from_bctx(IBindCtx*);
|
||||
|
||||
typedef HRESULT (*stop_cache_binding_proc_t)(void*,const WCHAR*,HRESULT,const WCHAR*);
|
||||
HRESULT download_to_cache(IUri*,stop_cache_binding_proc_t,void*,IBindStatusCallback*) DECLSPEC_HIDDEN;
|
||||
HRESULT download_to_cache(IUri*,stop_cache_binding_proc_t,void*,IBindStatusCallback*);
|
||||
|
||||
typedef struct ProtocolVtbl ProtocolVtbl;
|
||||
|
||||
@@ -158,16 +154,16 @@ struct ProtocolVtbl {
|
||||
#define FLAG_ERROR 0x0040
|
||||
#define FLAG_SYNC_READ 0x0080
|
||||
|
||||
HRESULT protocol_start(Protocol*,IInternetProtocol*,IUri*,IInternetProtocolSink*,IInternetBindInfo*) DECLSPEC_HIDDEN;
|
||||
HRESULT protocol_continue(Protocol*,PROTOCOLDATA*) DECLSPEC_HIDDEN;
|
||||
HRESULT protocol_read(Protocol*,void*,ULONG,ULONG*) DECLSPEC_HIDDEN;
|
||||
HRESULT protocol_lock_request(Protocol*) DECLSPEC_HIDDEN;
|
||||
HRESULT protocol_unlock_request(Protocol*) DECLSPEC_HIDDEN;
|
||||
HRESULT protocol_abort(Protocol*,HRESULT) DECLSPEC_HIDDEN;
|
||||
HRESULT protocol_syncbinding(Protocol*) DECLSPEC_HIDDEN;
|
||||
void protocol_close_connection(Protocol*) DECLSPEC_HIDDEN;
|
||||
HRESULT protocol_start(Protocol*,IInternetProtocol*,IUri*,IInternetProtocolSink*,IInternetBindInfo*);
|
||||
HRESULT protocol_continue(Protocol*,PROTOCOLDATA*);
|
||||
HRESULT protocol_read(Protocol*,void*,ULONG,ULONG*);
|
||||
HRESULT protocol_lock_request(Protocol*);
|
||||
HRESULT protocol_unlock_request(Protocol*);
|
||||
HRESULT protocol_abort(Protocol*,HRESULT);
|
||||
HRESULT protocol_syncbinding(Protocol*);
|
||||
void protocol_close_connection(Protocol*);
|
||||
|
||||
void find_domain_name(const WCHAR*,DWORD,INT*) DECLSPEC_HIDDEN;
|
||||
void find_domain_name(const WCHAR*,DWORD,INT*);
|
||||
|
||||
typedef struct _task_header_t task_header_t;
|
||||
|
||||
@@ -219,8 +215,8 @@ typedef struct {
|
||||
BSTR display_uri;
|
||||
} BindProtocol;
|
||||
|
||||
HRESULT create_binding_protocol(BindProtocol**) DECLSPEC_HIDDEN;
|
||||
void set_binding_sink(BindProtocol*,IInternetProtocolSink*,IInternetBindInfo*) DECLSPEC_HIDDEN;
|
||||
HRESULT create_binding_protocol(BindProtocol**);
|
||||
void set_binding_sink(BindProtocol*,IInternetProtocolSink*,IInternetBindInfo*);
|
||||
|
||||
typedef struct {
|
||||
HWND notif_hwnd;
|
||||
@@ -229,41 +225,20 @@ typedef struct {
|
||||
struct list entry;
|
||||
} tls_data_t;
|
||||
|
||||
tls_data_t *get_tls_data(void) DECLSPEC_HIDDEN;
|
||||
tls_data_t *get_tls_data(void);
|
||||
|
||||
void unregister_notif_wnd_class(void) DECLSPEC_HIDDEN;
|
||||
HWND get_notif_hwnd(void) DECLSPEC_HIDDEN;
|
||||
void release_notif_hwnd(HWND) DECLSPEC_HIDDEN;
|
||||
void unregister_notif_wnd_class(void);
|
||||
HWND get_notif_hwnd(void);
|
||||
void release_notif_hwnd(HWND);
|
||||
|
||||
const char *debugstr_bindstatus(ULONG) DECLSPEC_HIDDEN;
|
||||
const char *debugstr_bindstatus(ULONG);
|
||||
|
||||
static inline void* __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t size)
|
||||
{
|
||||
return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, size);
|
||||
}
|
||||
|
||||
static inline LPWSTR heap_strdupW(LPCWSTR str)
|
||||
static inline WCHAR *strndupW(LPCWSTR str, int len)
|
||||
{
|
||||
LPWSTR ret = NULL;
|
||||
|
||||
if(str) {
|
||||
DWORD size;
|
||||
|
||||
size = (lstrlenW(str)+1)*sizeof(WCHAR);
|
||||
ret = heap_alloc(size);
|
||||
if(ret)
|
||||
memcpy(ret, str, size);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline LPWSTR heap_strndupW(LPCWSTR str, int len)
|
||||
{
|
||||
LPWSTR ret = NULL;
|
||||
|
||||
if(str) {
|
||||
ret = heap_alloc((len+1)*sizeof(WCHAR));
|
||||
ret = malloc((len + 1) * sizeof(WCHAR));
|
||||
if(ret) {
|
||||
memcpy(ret, str, len*sizeof(WCHAR));
|
||||
ret[len] = 0;
|
||||
@@ -273,13 +248,13 @@ static inline LPWSTR heap_strndupW(LPCWSTR str, int len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline LPWSTR heap_strdupAtoW(const char *str)
|
||||
static inline WCHAR *strdupAtoW(const char *str)
|
||||
{
|
||||
LPWSTR ret = NULL;
|
||||
|
||||
if(str) {
|
||||
DWORD len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||
ret = heap_alloc(len*sizeof(WCHAR));
|
||||
ret = malloc(len * sizeof(WCHAR));
|
||||
if(ret)
|
||||
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||
}
|
||||
@@ -287,18 +262,4 @@ static inline LPWSTR heap_strdupAtoW(const char *str)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline char *heap_strdupWtoA(const WCHAR *str)
|
||||
{
|
||||
char *ret = NULL;
|
||||
|
||||
if(str) {
|
||||
size_t size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
||||
ret = heap_alloc(size);
|
||||
if(ret)
|
||||
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* __WINE_URLMON_MAIN_H */
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
HKCR
|
||||
{
|
||||
NoRemove Interface
|
||||
{
|
||||
'{79EAC9C0-BAF9-11CE-8C82-00AA004BA90B}' = s 'IBinding'
|
||||
{
|
||||
NumMethods = s 9
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{79EAC9C1-BAF9-11CE-8C82-00AA004BA90B}' = s 'IBindStatusCallback'
|
||||
{
|
||||
NumMethods = s 11
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{AAA74EF9-8EE7-4659-88D9-F8C504DA73CC}' = s 'IBindStatusCallbackEx'
|
||||
{
|
||||
NumMethods = s 12
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{79EAC9D0-BAF9-11CE-8C82-00AA004BA90B}' = s 'IAuthenticate'
|
||||
{
|
||||
NumMethods = s 4
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{79EAC9D2-BAF9-11CE-8C82-00AA004BA90B}' = s 'IHttpNegotiate'
|
||||
{
|
||||
NumMethods = s 5
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{4F9F9FCB-E0F4-48EB-B7AB-FA2EA9365CB4}' = s 'IHttpNegotiate2'
|
||||
{
|
||||
NumMethods = s 6
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{FC4801A1-2BA9-11CF-A229-00AA003D7352}' = s 'IBindHost'
|
||||
{
|
||||
NumMethods = s 6
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{79EAC9D6-BAFA-11CE-8C82-00AA004BA90B}' = s 'IWinInetInfo'
|
||||
{
|
||||
NumMethods = s 4
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{79EAC9D8-BAFA-11CE-8C82-00AA004BA90B}' = s 'IWinInetHttpInfo'
|
||||
{
|
||||
NumMethods = s 5
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{79EAC9D7-BAFA-11CE-8C82-00AA004BA90B}' = s 'IHttpSecurity'
|
||||
{
|
||||
NumMethods = s 5
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{79EAC9C9-BAF9-11CE-8C82-00AA004BA90B}' = s 'IPersistMoniker'
|
||||
{
|
||||
NumMethods = s 9
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{A5CA5F7F-1847-4D87-9C5B-918509F7511D}' = s 'IMonikerProp'
|
||||
{
|
||||
NumMethods = s 4
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{79EAC9EE-BAF9-11CE-8C82-00AA004BA90B}' = s 'IInternetSecurityManager'
|
||||
{
|
||||
NumMethods = s 11
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{F164EDF1-CC7C-4F0D-9A94-34222625C393}' = s 'IInternetSecurityManagerEx'
|
||||
{
|
||||
NumMethods = s 12
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{F1E50292-A795-4117-8E09-2B560A72AC60}' = s 'IInternetSecurityManagerEx2'
|
||||
{
|
||||
NumMethods = s 16
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
'{A39EE748-6A27-4817-A6F2-13914BEF5890}' = s 'IUri'
|
||||
{
|
||||
NumMethods = s 28
|
||||
ProxyStubClsid32 = s '{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}'
|
||||
}
|
||||
}
|
||||
NoRemove CLSID
|
||||
{
|
||||
'{79EAC9E0-BAF9-11CE-8C82-00AA004BA90B}' = s 'URL Moniker'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{79EAC9E2-BAF9-11CE-8C82-00AA004BA90B}' = s 'http: Asynchronous Pluggable Protocol Handler'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{79EAC9E3-BAF9-11CE-8C82-00AA004BA90B}' = s 'ftp: Asynchronous Pluggable Protocol Handler'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{79EAC9E4-BAF9-11CE-8C82-00AA004BA90B}' = s 'gopher: Asynchronous Pluggable Protocol Handler'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{79EAC9E5-BAF9-11CE-8C82-00AA004BA90B}' = s 'https: Asynchronous Pluggable Protocol Handler'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{79EAC9E6-BAF9-11CE-8C82-00AA004BA90B}' = s 'mk: Asynchronous Pluggable Protocol Handler'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{79EAC9E7-BAF9-11CE-8C82-00AA004BA90B}' = s 'file:, local: Asynchronous Pluggable Protocol Handler'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{3DD53D40-7B8B-11D0-B013-00AA0059CE02}' = s 'CDL: Asynchronous Pluggable Protocol Handler'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{7B8A2D94-0AC9-11D1-896C-00C04FB6BFC4}' = s 'Security Manager'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
|
||||
}
|
||||
'{7B8A2D95-0AC9-11D1-896C-00C04FB6BFC4}' = s 'URL Zone Manager'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
|
||||
}
|
||||
'{79EAC9F1-BAF9-11CE-8C82-00AA004BA90B}' = s 'URLMoniker ProxyStub Factory'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{8F6B0360-B80D-11D0-A9B3-006097942311}' = s 'AP lzdhtml encoding/decoding Filter'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
'{DF2FCE13-25EC-45BB-9D4C-CECD47C2430C}' = s 'CUri'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,6 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "urlmon_main.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
@@ -28,7 +26,7 @@ HRESULT CALLBACK IWinInetHttpInfo_QueryInfo_Proxy(IWinInetHttpInfo* This,
|
||||
DWORD dwOption, LPVOID pBuffer, DWORD *pcbBuf, DWORD *pdwFlags,
|
||||
DWORD *pdwReserved)
|
||||
{
|
||||
TRACE("(%p %x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
|
||||
TRACE("(%p %lx %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
|
||||
return IWinInetHttpInfo_RemoteQueryInfo_Proxy(This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
|
||||
}
|
||||
|
||||
@@ -36,21 +34,21 @@ HRESULT __RPC_STUB IWinInetHttpInfo_QueryInfo_Stub(IWinInetHttpInfo* This,
|
||||
DWORD dwOption, BYTE *pBuffer, DWORD *pcbBuf, DWORD *pdwFlags,
|
||||
DWORD *pdwReserved)
|
||||
{
|
||||
TRACE("(%p %x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
|
||||
TRACE("(%p %lx %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
|
||||
return IWinInetHttpInfo_QueryInfo(This, dwOption, pBuffer, pcbBuf, pdwFlags, pdwReserved);
|
||||
}
|
||||
|
||||
HRESULT CALLBACK IWinInetInfo_QueryOption_Proxy(IWinInetInfo* This,
|
||||
DWORD dwOption, LPVOID pBuffer, DWORD *pcbBuf)
|
||||
{
|
||||
TRACE("(%p %x %p %p)\n", This, dwOption, pBuffer, pcbBuf);
|
||||
TRACE("(%p %lx %p %p)\n", This, dwOption, pBuffer, pcbBuf);
|
||||
return IWinInetInfo_RemoteQueryOption_Proxy(This, dwOption, pBuffer, pcbBuf);
|
||||
}
|
||||
|
||||
HRESULT __RPC_STUB IWinInetInfo_QueryOption_Stub(IWinInetInfo* This,
|
||||
DWORD dwOption, BYTE *pBuffer, DWORD *pcbBuf)
|
||||
{
|
||||
TRACE("(%p %x %p %p)\n", This, dwOption, pBuffer, pcbBuf);
|
||||
TRACE("(%p %lx %p %p)\n", This, dwOption, pBuffer, pcbBuf);
|
||||
return IWinInetInfo_QueryOption(This, dwOption, pBuffer, pcbBuf);
|
||||
}
|
||||
|
||||
@@ -93,7 +91,7 @@ static HRESULT marshal_stgmed(STGMEDIUM *stgmed, RemSTGMEDIUM **ret)
|
||||
ULONG size = 0;
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
if((stgmed->tymed == TYMED_ISTREAM && stgmed->u.pstm) || stgmed->pUnkForRelease) {
|
||||
if((stgmed->tymed == TYMED_ISTREAM && stgmed->pstm) || stgmed->pUnkForRelease) {
|
||||
hres = CreateStreamOnHGlobal(NULL, TRUE, &stream);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
@@ -103,12 +101,12 @@ static HRESULT marshal_stgmed(STGMEDIUM *stgmed, RemSTGMEDIUM **ret)
|
||||
case TYMED_NULL:
|
||||
break;
|
||||
case TYMED_ISTREAM:
|
||||
if(stgmed->u.pstm)
|
||||
hres = CoMarshalInterface(stream, &IID_IStream, (IUnknown*)stgmed->u.pstm,
|
||||
if(stgmed->pstm)
|
||||
hres = CoMarshalInterface(stream, &IID_IStream, (IUnknown*)stgmed->pstm,
|
||||
MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
|
||||
break;
|
||||
default:
|
||||
FIXME("unsupported tymed %u\n", stgmed->tymed);
|
||||
FIXME("unsupported tymed %lu\n", stgmed->tymed);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -131,7 +129,7 @@ static HRESULT marshal_stgmed(STGMEDIUM *stgmed, RemSTGMEDIUM **ret)
|
||||
IStream_Seek(stream, zero, STREAM_SEEK_SET, &off);
|
||||
}
|
||||
|
||||
rem_stgmed = heap_alloc_zero(FIELD_OFFSET(RemSTGMEDIUM, data[size]));
|
||||
rem_stgmed = calloc(1, FIELD_OFFSET(RemSTGMEDIUM, data[size]));
|
||||
if(!rem_stgmed) {
|
||||
if(stream)
|
||||
IStream_Release(stream);
|
||||
@@ -140,7 +138,7 @@ static HRESULT marshal_stgmed(STGMEDIUM *stgmed, RemSTGMEDIUM **ret)
|
||||
|
||||
rem_stgmed->tymed = stgmed->tymed;
|
||||
rem_stgmed->dwHandleType = 0;
|
||||
rem_stgmed->pData = stgmed->u.pstm != NULL;
|
||||
rem_stgmed->pData = stgmed->pstm != NULL;
|
||||
rem_stgmed->pUnkForRelease = stgmed->pUnkForRelease != NULL;
|
||||
rem_stgmed->cbData = size;
|
||||
if(stream) {
|
||||
@@ -181,10 +179,10 @@ static HRESULT unmarshal_stgmed(RemSTGMEDIUM *rem_stgmed, STGMEDIUM *stgmed)
|
||||
break;
|
||||
case TYMED_ISTREAM:
|
||||
if(rem_stgmed->pData)
|
||||
hres = CoUnmarshalInterface(stream, &IID_IStream, (void**)&stgmed->u.pstm);
|
||||
hres = CoUnmarshalInterface(stream, &IID_IStream, (void**)&stgmed->pstm);
|
||||
break;
|
||||
default:
|
||||
FIXME("unsupported tymed %u\n", stgmed->tymed);
|
||||
FIXME("unsupported tymed %lu\n", stgmed->tymed);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -227,7 +225,7 @@ static void stub_unmarshal_bindinfo(RemBINDINFO *rem_bindinfo, BINDINFO *bindinf
|
||||
bindinfo->cbstgmedData = rem_bindinfo->cbstgmedData;
|
||||
|
||||
if(bindinfo->stgmedData.tymed != TYMED_NULL)
|
||||
WARN("stgmed data (tymed %u) will be lost!\n", bindinfo->stgmedData.tymed);
|
||||
WARN("stgmed data (tymed %lu) will be lost!\n", bindinfo->stgmedData.tymed);
|
||||
}
|
||||
|
||||
static void stub_marshal_bindinfo(BINDINFO *bindinfo, RemBINDINFO *rem_bindinfo)
|
||||
@@ -319,7 +317,7 @@ HRESULT CALLBACK IBindStatusCallback_OnDataAvailable_Proxy(
|
||||
RemSTGMEDIUM *rem_stgmed;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%x %u %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
|
||||
TRACE("(%p)->(%lx %lu %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
|
||||
|
||||
hres = marshal_stgmed(pstgmed, &rem_stgmed);
|
||||
if(FAILED(hres))
|
||||
@@ -333,7 +331,7 @@ HRESULT CALLBACK IBindStatusCallback_OnDataAvailable_Proxy(
|
||||
|
||||
hres = IBindStatusCallback_RemoteOnDataAvailable_Proxy(This, grfBSCF, dwSize, &rem_formatetc, rem_stgmed);
|
||||
|
||||
heap_free(rem_stgmed);
|
||||
free(rem_stgmed);
|
||||
return hres;
|
||||
}
|
||||
|
||||
@@ -345,7 +343,7 @@ HRESULT __RPC_STUB IBindStatusCallback_OnDataAvailable_Stub(
|
||||
FORMATETC formatetc;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%x %u %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
|
||||
TRACE("(%p)->(%lx %lu %p %p)\n", This, grfBSCF, dwSize, pformatetc, pstgmed);
|
||||
|
||||
hres = unmarshal_stgmed(pstgmed, &stgmed);
|
||||
if(FAILED(hres))
|
||||
|
||||
@@ -204,7 +204,7 @@ dll/win32/twain_32 # Synced to WineStaging-4.18
|
||||
dll/win32/uiautomationcore # Synced to Wine-10.0
|
||||
dll/win32/updspapi # Synced to WineStaging-4.18
|
||||
dll/win32/url # Synced to WineStaging-3.3
|
||||
dll/win32/urlmon # Synced to WineStaging-4.18
|
||||
dll/win32/urlmon # Synced to Wine-10.0
|
||||
dll/win32/usp10 # Synced to WineStaging-4.18
|
||||
dll/win32/uxtheme # Forked
|
||||
dll/win32/vbscript # Synced to Wine-10.0
|
||||
|
||||
Reference in New Issue
Block a user