Author: dchapyshev
Date: Sun Jan 11 13:04:02 2009
New Revision: 38707
URL:
http://svn.reactos.org/svn/reactos?rev=38707&view=rev
Log:
- Sync urlmon with Wine head
Modified:
trunk/reactos/dll/win32/urlmon/bindctx.c
trunk/reactos/dll/win32/urlmon/binding.c
trunk/reactos/dll/win32/urlmon/file.c
trunk/reactos/dll/win32/urlmon/http.c
trunk/reactos/dll/win32/urlmon/regsvr.c
trunk/reactos/dll/win32/urlmon/umon.c
trunk/reactos/dll/win32/urlmon/umstream.c
trunk/reactos/dll/win32/urlmon/urlmon.spec
trunk/reactos/dll/win32/urlmon/urlmon_main.c
Modified: trunk/reactos/dll/win32/urlmon/bindctx.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/bindctx.c…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/bindctx.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/bindctx.c [iso-8859-1] Sun Jan 11 13:04:02 2009
@@ -511,7 +511,8 @@
hres = IBindCtx_RegisterObjectParam(pbc, BSCBHolder, (IUnknown*)bsc);
IBindStatusCallback_Release(bsc);
if(FAILED(hres)) {
- IBindStatusCallback_Release(prev);
+ if(prev)
+ IBindStatusCallback_Release(prev);
return hres;
}
Modified: trunk/reactos/dll/win32/urlmon/binding.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/binding.c…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/binding.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/binding.c [iso-8859-1] Sun Jan 11 13:04:02 2009
@@ -1532,7 +1532,8 @@
{wszMk, sizeof(wszMk) /sizeof(WCHAR)}
};
- int i, len = strlenW(url);
+ unsigned int i;
+ int len = lstrlenW(url);
for(i=0; i < sizeof(protocol_list)/sizeof(protocol_list[0]); i++) {
if(len >= protocol_list[i].len
Modified: trunk/reactos/dll/win32/urlmon/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/file.c?re…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/file.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/file.c [iso-8859-1] Sun Jan 11 13:04:02 2009
@@ -109,7 +109,7 @@
TRACE("(%p)->(%s %p %p %08x %d)\n", This, debugstr_w(szUrl),
pOIProtSink,
pOIBindInfo, grfPI, dwReserved);
- if(!szUrl || lstrlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
+ if(!szUrl || strlenW(szUrl) < sizeof(wszFile)/sizeof(WCHAR)
|| memcmp(szUrl, wszFile, sizeof(wszFile)))
return E_INVALIDARG;
Modified: trunk/reactos/dll/win32/urlmon/http.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/http.c?re…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/http.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/http.c [iso-8859-1] Sun Jan 11 13:04:02 2009
@@ -330,7 +330,7 @@
goto done;
}
- if (lstrlenW(szUrl) < sizeof(wszHttp)/sizeof(WCHAR)
+ if (strlenW(szUrl) < sizeof(wszHttp)/sizeof(WCHAR)
|| memcmp(szUrl, wszHttp, sizeof(wszHttp)))
{
hres = MK_E_SYNTAX;
@@ -397,7 +397,7 @@
InternetSetStatusCallbackW(This->internet, HTTPPROTOCOL_InternetStatusCallback);
This->connect = InternetConnectW(This->internet, host, url.nPort, user,
- pass, INTERNET_SERVICE_HTTP, 0, (DWORD)This);
+ pass, INTERNET_SERVICE_HTTP, 0, (DWORD_PTR)This);
if (!This->connect)
{
WARN("InternetConnect failed: %d\n", GetLastError());
@@ -425,7 +425,7 @@
wszBindVerb[This->bind_info.dwBindVerb] :
This->bind_info.szCustomVerb,
path, NULL, NULL, (LPCWSTR *)accept_mimes,
- request_flags, (DWORD)This);
+ request_flags, (DWORD_PTR)This);
if (!This->request)
{
WARN("HttpOpenRequest failed: %d\n", GetLastError());
Modified: trunk/reactos/dll/win32/urlmon/regsvr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/regsvr.c?…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/regsvr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/regsvr.c [iso-8859-1] Sun Jan 11 13:04:02 2009
@@ -26,6 +26,7 @@
#include "advpub.h"
#include "wine/debug.h"
+#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
@@ -152,7 +153,7 @@
KEY_READ | KEY_WRITE, NULL, &key, NULL);
if (res != ERROR_SUCCESS) goto error_close_iid_key;
- wsprintfW(buf, fmt, list->num_methods);
+ sprintfW(buf, fmt, list->num_methods);
res = RegSetValueExW(key, NULL, 0, REG_SZ,
(CONST BYTE*)buf,
(lstrlenW(buf) + 1) * sizeof(WCHAR));
@@ -526,7 +527,7 @@
STRTABLEA strtable;
STRENTRYA pse[7];
static CLSID const *clsids[34];
- int i = 0;
+ unsigned int i = 0;
static const WCHAR wszAdvpack[] =
{'a','d','v','p','a','c','k','.','d','l','l',0};
Modified: trunk/reactos/dll/win32/urlmon/umon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/umon.c?re…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/umon.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/umon.c [iso-8859-1] Sun Jan 11 13:04:02 2009
@@ -237,7 +237,7 @@
IBindStatusCallback_OnProgress(This->pbscb, This->total_read,
This->expected_size,
BINDSTATUS_ENDDOWNLOADDATA, This->URLName);
IBindStatusCallback_OnDataAvailable(This->pbscb, BSCF_LASTDATANOTIFICATION,
This->total_read, &fmt, &stg);
- if (hr)
+ if (hr != S_OK)
{
WCHAR *pwchError = 0;
@@ -606,7 +606,7 @@
}
bind->hconnect = InternetConnectW(bind->hinternet, host,
url.nPort, user, pass,
- dwService, 0, (DWORD)bind);
+ dwService, 0, (DWORD_PTR)bind);
if (!bind->hconnect)
{
hres = HRESULT_FROM_WIN32(GetLastError());
@@ -650,7 +650,7 @@
break;
case INTERNET_SERVICE_HTTP:
- bind->hrequest = HttpOpenRequestW(bind->hconnect, NULL,
path, NULL, NULL, NULL, 0, (DWORD)bind);
+ bind->hrequest = HttpOpenRequestW(bind->hconnect, NULL,
path, NULL, NULL, NULL, 0, (DWORD_PTR)bind);
if (!bind->hrequest)
{
hres = HRESULT_FROM_WIN32(GetLastError());
@@ -1273,7 +1273,7 @@
header, sizeof(header), NULL, NULL))
return E_FAIL;
- if (lstrlenW(cache_path) > dwBufLength)
+ if (strlenW(cache_path) > dwBufLength)
return E_OUTOFMEMORY;
lstrcpyW(szFileName, cache_path);
Modified: trunk/reactos/dll/win32/urlmon/umstream.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/umstream.…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/umstream.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/umstream.c [iso-8859-1] Sun Jan 11 13:04:02 2009
@@ -61,11 +61,11 @@
if(!CreateUrlCacheEntryW(url, dwSize, ext, pszFileName, 0))
hr = HRESULT_FROM_WIN32(GetLastError());
else
- hr = 0;
+ hr = S_OK;
heap_free(url);
- if (hr)
+ if (hr != S_OK)
return hr;
TRACE("Opening %s\n", debugstr_w(pszFileName) );
Modified: trunk/reactos/dll/win32/urlmon/urlmon.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon.sp…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/urlmon.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/urlmon.spec [iso-8859-1] Sun Jan 11 13:04:02 2009
@@ -51,8 +51,8 @@
@ stub HlinkSimpleNavigateToMoniker
@ stdcall HlinkSimpleNavigateToString(wstr wstr wstr ptr ptr ptr long long)
@ stdcall IsAsyncMoniker(ptr)
-@ stub IsLoggingEnabledA
-@ stub IsLoggingEnabledW
+@ stdcall IsLoggingEnabledA(str)
+@ stdcall IsLoggingEnabledW(wstr)
@ stdcall IsValidURL(ptr wstr long)
@ stdcall MkParseDisplayNameEx(ptr wstr ptr ptr)
@ stdcall ObtainUserAgentString(long str ptr)
Modified: trunk/reactos/dll/win32/urlmon/urlmon_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon_ma…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/urlmon_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/urlmon_main.c [iso-8859-1] Sun Jan 11 13:04:02 2009
@@ -210,7 +210,7 @@
static void init_session(BOOL init)
{
- int i;
+ unsigned int i;
for(i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++) {
@@ -240,7 +240,7 @@
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
- int i;
+ unsigned int i;
TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
@@ -435,7 +435,7 @@
static BOOL text_html_filter(const BYTE *b, DWORD size)
{
- int i;
+ DWORD i;
if(size < 5)
return FALSE;
@@ -598,7 +598,7 @@
const BYTE *buf = pBuffer;
DWORD len;
LPCWSTR ret = NULL;
- int i;
+ unsigned int i;
static const WCHAR wszTextHtml[] =
{'t','e','x','t','/','h','t','m','l',0};
static const WCHAR wszTextRichtext[] =
{'t','e','x','t','/','r','i','c','h','t','e','x','t',0};
@@ -767,3 +767,21 @@
return pExtract(dest, szCabName);
}
+
+/***********************************************************************
+ * IsLoggingEnabledA (URLMON.@)
+ */
+BOOL WINAPI IsLoggingEnabledA(LPCSTR url)
+{
+ FIXME("(%s)\n", debugstr_a(url));
+ return FALSE;
+}
+
+/***********************************************************************
+ * IsLoggingEnabledW (URLMON.@)
+ */
+BOOL WINAPI IsLoggingEnabledW(LPCWSTR url)
+{
+ FIXME("(%s)\n", debugstr_w(url));
+ return FALSE;
+}