* Sync with Wine 1.7.17.
CORE-8080

svn path=/trunk/; revision=62929
This commit is contained in:
Amine Khaldi 2014-04-23 17:35:17 +00:00
parent 926fd03c31
commit 6cd097f7e5
13 changed files with 247 additions and 35 deletions

View file

@ -439,7 +439,7 @@ static HRESULT install_file(install_ctx_t *ctx, const WCHAR *cache_file)
if(!ext)
ext = ptr;
if(!strcmpW(ext, cab_extW)) {
if(!strcmpiW(ext, cab_extW)) {
hres = install_cab_file(ctx);
}else {
FIXME("Unsupported extension %s\n", debugstr_w(ext));

View file

@ -204,7 +204,7 @@ static HRESULT handle_mime_filter(BindProtocol *This, IInternetProtocol *mime_fi
return hres;
}
/* NOTE: IE9 calls it on the new protocol_sink. It doesn't make sense to is seems to be a bug there. */
/* NOTE: IE9 calls it on the new protocol_sink. It doesn't make sense so it seems to be a bug there. */
IInternetProtocolSink_ReportProgress(This->protocol_sink, BINDSTATUS_LOADINGMIMEHANDLER, NULL);
return S_OK;

View file

@ -274,7 +274,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
HINTERNET internet_session, IInternetBindInfo *bind_info)
{
HttpProtocol *This = impl_from_Protocol(prot);
LPWSTR addl_header = NULL, post_cookie = NULL;
WCHAR *addl_header = NULL, *post_cookie = NULL, *rootdoc_url = NULL;
IServiceProvider *service_provider = NULL;
IHttpNegotiate2 *http_negotiate2 = NULL;
BSTR url, host, user, pass, path;
@ -318,6 +318,13 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, IUri *uri, DWORD reques
return INET_E_CANNOT_CONNECT;
}
num = 0;
hres = IInternetBindInfo_GetBindString(bind_info, BINDSTRING_ROOTDOC_URL, &rootdoc_url, 1, &num);
if(hres == S_OK && num) {
FIXME("Use root doc URL %s\n", debugstr_w(rootdoc_url));
CoTaskMemFree(rootdoc_url);
}
num = sizeof(accept_mimes)/sizeof(accept_mimes[0])-1;
hres = IInternetBindInfo_GetBindString(bind_info, BINDSTRING_ACCEPT_MIMES, accept_mimes, num, &num);
if(hres == INET_E_USE_DEFAULT_SETTING) {

View file

@ -631,22 +631,17 @@ static HRESULT load_process_feature(INTERNETFEATURELIST feature)
static HRESULT get_feature_from_process(INTERNETFEATURELIST feature)
{
HRESULT hres;
HRESULT hres = S_OK;
EnterCriticalSection(&process_features_cs);
/* Try loading the feature from the registry, if it hasn't already
* been done.
*/
if(process_feature_controls[feature].check_registry) {
if(process_feature_controls[feature].check_registry)
hres = load_process_feature(feature);
if(FAILED(hres)) {
LeaveCriticalSection(&process_features_cs);
return hres;
}
}
hres = process_feature_controls[feature].enabled ? S_OK : S_FALSE;
if(SUCCEEDED(hres))
hres = process_feature_controls[feature].enabled ? S_OK : S_FALSE;
LeaveCriticalSection(&process_features_cs);

View file

@ -512,6 +512,7 @@ HRESULT protocol_abort(Protocol *protocol, HRESULT reason)
if(!protocol->protocol_sink)
return S_OK;
/* NOTE: IE10 returns S_OK here */
if(protocol->flags & FLAG_RESULT_REPORTED)
return INET_E_RESULT_DISPATCHED;

View file

@ -38,6 +38,12 @@ static const WCHAR wszZonesKey[] = {'S','o','f','t','w','a','r','e','\\',
'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','\\',
@ -283,7 +289,7 @@ static BOOL get_zone_for_scheme(HKEY key, LPCWSTR schema, DWORD *zone)
* search_domain_for_zone [internal]
*
* Searches the specified 'domain' registry key to see if 'host' maps into it, or any
* of it's subdomain registry keys.
* of its subdomain registry keys.
*
* Returns S_OK if a match is found, S_FALSE if no matches were found, or an error code.
*/
@ -375,7 +381,7 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain
/* There's a chance that 'host' implicitly mapped into 'domain', in
* which case we check to see if 'domain' contains zone information.
*
* This can only happen if 'domain' is it's own domain name.
* This can only happen if 'domain' is its own domain name.
* Example:
* "google.com" (domain name = "google.com")
*
@ -384,7 +390,7 @@ static HRESULT search_domain_for_zone(HKEY domains, LPCWSTR domain, DWORD domain
*
* Then host would map directly into the "google.com" domain key.
*
* If 'domain' has more than just it's domain name, or it does not
* If 'domain' has more than just its domain name, or it does not
* have a domain name, then we don't perform the check. The reason
* for this is that these domains don't allow implicit mappings.
* Example:
@ -2056,3 +2062,32 @@ HRESULT WINAPI CompareSecurityIds(BYTE *secid1, DWORD size1, BYTE *secid2, DWORD
FIXME("(%p %d %p %d %x)\n", secid1, size1, secid2, size2, reserved);
return E_NOTIMPL;
}
/********************************************************************
* IsInternetESCEnabledLocal (URLMON.108)
*
* Undocumented, returns if IE is running in Enhanced Security Configuration.
*/
BOOL WINAPI IsInternetESCEnabledLocal(void)
{
static BOOL esc_initialized, esc_enabled;
TRACE("()\n");
if(!esc_initialized) {
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)
esc_enabled = type == REG_DWORD && val != 0;
RegCloseKey(zone_map);
}
esc_initialized = TRUE;
}
return esc_enabled;
}

View file

@ -529,15 +529,26 @@ static void ensure_useragent(void)
{
OSVERSIONINFOW info = {sizeof(info)};
const WCHAR *os_type, *is_nt;
WCHAR buf[512];
WCHAR buf[512], *ret, *tmp;
DWORD res, idx=0;
size_t len, size;
BOOL is_wow;
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};
' ','%','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 win32W[] = {'W','i','n','3','2',0};
static const WCHAR win64W[] = {'W','i','n','6','4',0};
@ -558,7 +569,48 @@ static void ensure_useragent(void)
os_type = win32W;
sprintfW(buf, formatW, is_nt, info.dwMajorVersion, info.dwMinorVersion, os_type);
user_agent = heap_strdupW(buf);
len = strlenW(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 = sizeof(buf)/sizeof(WCHAR);
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;
}
RegCloseKey(key);
}
ret[len++] = ')';
ret[len++] = 0;
user_agent = ret;
TRACE("Using user agent %s\n", debugstr_w(user_agent));
}
LPWSTR get_useragent(void)

View file

@ -566,7 +566,7 @@ void find_domain_name(const WCHAR *host, DWORD host_len,
DWORD i;
/* If the sec_last_tld is 3 characters long it HAS to be on the list of
* recognized to still be considered part of the TLD name, otherwise
* its considered the domain name.
* it's considered the domain name.
* Ex: www.google.com.uk -> google.com.uk as the domain name.
* www.google.foo.uk -> foo.uk as the domain name.
*/
@ -1610,7 +1610,7 @@ static BOOL parse_ipv6address(const WCHAR **ptr, parse_data *data, DWORD flags)
/* An IPv6 address can have no more than 8 h16 components. */
if(ip.h16_count >= 8) {
*ptr = start;
TRACE("(%p %p %x): Not a IPv6 address, to many h16 components.\n",
TRACE("(%p %p %x): Not a IPv6 address, too many h16 components.\n",
ptr, data, flags);
return FALSE;
}
@ -1896,7 +1896,7 @@ static BOOL parse_path_hierarchical(const WCHAR **ptr, parse_data *data, DWORD f
return TRUE;
}
/* Parses the path of an opaque URI (much less strict then the parser
/* Parses the path of an opaque URI (much less strict than the parser
* for a hierarchical URI).
*
* NOTE:
@ -4271,16 +4271,16 @@ static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BST
return E_POINTER;
if(uriProp > Uri_PROPERTY_STRING_LAST) {
/* Windows allocates an empty BSTR for invalid Uri_PROPERTY's. */
*pbstrProperty = SysAllocStringLen(NULL, 0);
if(!(*pbstrProperty))
return E_OUTOFMEMORY;
/* It only returns S_FALSE for the ZONE property... */
if(uriProp == Uri_PROPERTY_ZONE)
if(uriProp == Uri_PROPERTY_ZONE) {
*pbstrProperty = SysAllocStringLen(NULL, 0);
if(!(*pbstrProperty))
return E_OUTOFMEMORY;
return S_FALSE;
else
return S_OK;
}
*pbstrProperty = NULL;
return E_INVALIDARG;
}
/* Don't have support for flags yet. */
@ -6031,7 +6031,7 @@ static HRESULT WINAPI UriBuilder_SetIUri(IUriBuilder *iface, IUri *pIUri)
Uri *uri;
if((uri = get_uri_obj(pIUri))) {
/* Only reset the builder if it's Uri isn't the same as
/* Only reset the builder if its Uri isn't the same as
* the Uri passed to the function.
*/
if(This->uri != uri) {
@ -6048,7 +6048,7 @@ static HRESULT WINAPI UriBuilder_SetIUri(IUriBuilder *iface, IUri *pIUri)
return E_NOTIMPL;
}
} else if(This->uri)
/* Only reset the builder if it's Uri isn't NULL. */
/* Only reset the builder if its Uri isn't NULL. */
reset_builder(This);
return S_OK;
@ -6534,7 +6534,7 @@ static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result,
data.path_len = proc_uri->path_len;
} else if(!data.is_opaque) {
/* Just set the path as a '/' if the base didn't have
* one and if it's an hierarchical URI.
* one and if it's a hierarchical URI.
*/
static const WCHAR slashW[] = {'/',0};
data.path = slashW;

View file

@ -95,6 +95,7 @@
@ stub WriteHitLogging
@ stub ZonesReInit
108 stdcall @() IsInternetESCEnabledLocal
111 stdcall @(wstr) IsProtectedModeURL
328 stdcall @(ptr ptr) propsys.VariantCompare
329 stdcall @(ptr ptr) propsys.VariantToGUID

View file

@ -0,0 +1,96 @@
diff -prudN e:\Wine\dlls\urlmon/bindprot.c e:\reactos\dll\win32\urlmon/bindprot.c
--- e:\Wine\dlls\urlmon/bindprot.c 2014-04-04 14:12:42.439519600 +0100
+++ e:\reactos\dll\win32\urlmon/bindprot.c 2014-04-11 16:18:48.958227500 +0100
@@ -83,36 +80,14 @@ static LRESULT WINAPI notif_wnd_proc(HWN
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)
-{
- static WNDCLASSEXW wndclass = {
- sizeof(wndclass), 0, notif_wnd_proc, 0, 0,
- NULL, NULL, NULL, NULL, NULL,
- wszURLMonikerNotificationWindow, NULL
- };
-
- wndclass.hInstance = hProxyDll;
- notif_wnd_class = RegisterClassExW(&wndclass);
- return TRUE;
-}
-
-void unregister_notif_wnd_class(void)
-{
- if(notif_wnd_class)
- UnregisterClassW(MAKEINTRESOURCEW(notif_wnd_class), hProxyDll);
-}
-
HWND get_notif_hwnd(void)
{
+ static ATOM wnd_class = 0;
tls_data_t *tls_data;
- static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
+ 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};
tls_data = get_tls_data();
if(!tls_data)
@@ -123,11 +98,23 @@ HWND get_notif_hwnd(void)
return tls_data->notif_hwnd;
}
- InitOnceExecuteOnce(&init_once, register_notif_wnd_class, NULL, NULL);
- if(!notif_wnd_class)
- return NULL;
+ if(!wnd_class) {
+ static WNDCLASSEXW wndclass = {
+ sizeof(wndclass), 0,
+ notif_wnd_proc, 0, 0,
+ NULL, NULL, NULL, NULL, NULL,
+ wszURLMonikerNotificationWindow,
+ NULL
+ };
- tls_data->notif_hwnd = CreateWindowExW(0, MAKEINTRESOURCEW(notif_wnd_class),
+ wndclass.hInstance = hProxyDll;
+
+ wnd_class = RegisterClassExW(&wndclass);
+ if (!wnd_class && GetLastError() == ERROR_CLASS_ALREADY_EXISTS)
+ wnd_class = 1;
+ }
+
+ tls_data->notif_hwnd = CreateWindowExW(0, wszURLMonikerNotificationWindow,
wszURLMonikerNotificationWindow, 0, 0, 0, 0, 0, HWND_MESSAGE,
NULL, hProxyDll, NULL);
if(tls_data->notif_hwnd)
diff -prudN e:\Wine\dlls\urlmon/urlmon_main.c e:\reactos\dll\win32\urlmon/urlmon_main.c
--- e:\Wine\dlls\urlmon/urlmon_main.c 2014-04-04 14:12:42.460533100 +0100
+++ e:\reactos\dll\win32\urlmon/urlmon_main.c 2014-04-11 16:19:12.473179000 +0100
@@ -139,7 +127,6 @@ static void process_detach(void)
free_session();
free_tls_list();
- unregister_notif_wnd_class();
}
/***********************************************************************
diff -prudN e:\Wine\dlls\urlmon/urlmon_main.h e:\reactos\dll\win32\urlmon/urlmon_main.h
--- e:\Wine\dlls\urlmon/urlmon_main.h 2014-04-04 14:12:42.461533700 +0100
+++ e:\reactos\dll\win32\urlmon/urlmon_main.h 2014-04-11 16:19:21.822446700 +0100
@@ -225,7 +236,6 @@ typedef struct {
tls_data_t *get_tls_data(void) DECLSPEC_HIDDEN;
-void unregister_notif_wnd_class(void) DECLSPEC_HIDDEN;
HWND get_notif_hwnd(void) DECLSPEC_HIDDEN;
void release_notif_hwnd(HWND) DECLSPEC_HIDDEN;

View file

@ -16,6 +16,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep proxy
#pragma makedep register
#include "urlmon.idl"
[

View file

@ -258,7 +258,23 @@ interface IBindStatusCallback : IUnknown
BINDSTATUS_CONTENTDISPOSITIONFILENAME,
BINDSTATUS_MIMETEXTPLAINMISMATCH,
BINDSTATUS_PUBLISHERAVAILABLE,
BINDSTATUS_DISPLAYNAMEAVAILABLE
BINDSTATUS_DISPLAYNAMEAVAILABLE,
BINDSTATUS_SSLUX_NAVBLOCKED,
BINDSTATUS_SERVER_MIMETYPEAVAILABLE,
BINDSTATUS_SNIFFED_CLASSIDAVAILABLE,
BINDSTATUS_64BIT_PROGRESS,
BINDSTATUS_LAST = BINDSTATUS_64BIT_PROGRESS,
BINDSTATUS_RESERVED_0 = (BINDSTATUS_LAST+1),
BINDSTATUS_RESERVED_1 = (BINDSTATUS_RESERVED_0+1),
BINDSTATUS_RESERVED_2 = (BINDSTATUS_RESERVED_1+1),
BINDSTATUS_RESERVED_3 = (BINDSTATUS_RESERVED_2+1),
BINDSTATUS_RESERVED_4 = (BINDSTATUS_RESERVED_3+1),
BINDSTATUS_RESERVED_5 = (BINDSTATUS_RESERVED_4+1),
BINDSTATUS_RESERVED_6 = (BINDSTATUS_RESERVED_5+1),
BINDSTATUS_RESERVED_7 = (BINDSTATUS_RESERVED_6+1),
BINDSTATUS_RESERVED_8 = (BINDSTATUS_RESERVED_7+1),
BINDSTATUS_RESERVED_9 = (BINDSTATUS_RESERVED_8+1),
BINDSTATUS_LAST_PRIVATE = BINDSTATUS_RESERVED_9
} BINDSTATUS;
@ -706,7 +722,13 @@ interface IInternetBindInfo : IUnknown
BINDSTRING_URL,
BINDSTRING_IID,
BINDSTRING_FLAG_BIND_TO_OBJECT,
BINDSTRING_PTR_BIND_CONTEXT
BINDSTRING_PTR_BIND_CONTEXT,
BINDSTRING_XDR_ORIGIN,
BINDSTRING_DOWNLOADPATH,
BINDSTRING_ROOTDOC_URL,
BINDSTRING_INITIAL_FILENAME,
BINDSTRING_PROXY_USERNAME,
BINDSTRING_PROXY_PASSWORD
} BINDSTRING;
HRESULT GetBindInfo(

View file

@ -195,7 +195,7 @@ reactos/dll/win32/twain_32 # Synced to Wine-1.7.17
reactos/dll/win32/unicows # Synced to Wine-1.3.32 (Win9x only, why do we need this?!)
reactos/dll/win32/updspapi # Synced to Wine-1.7.1
reactos/dll/win32/url # Synced to Wine-1.7.17
reactos/dll/win32/urlmon # Synced to Wine-1.7.1
reactos/dll/win32/urlmon # Synced to Wine-1.7.17
reactos/dll/win32/usp10 # Synced to Wine-1.7.17
reactos/dll/win32/uxtheme # Forked
reactos/dll/win32/vbscript # Synced to Wine-1.7.1