Author: cwittich
Date: Sun Mar 21 18:43:25 2010
New Revision: 46308
URL:
http://svn.reactos.org/svn/reactos?rev=46308&view=rev
Log:
[URLMON]
sync urlmon with wine 1.1.41
Modified:
trunk/reactos/dll/win32/urlmon/internet.c
trunk/reactos/dll/win32/urlmon/sec_mgr.c
trunk/reactos/dll/win32/urlmon/uri.c
trunk/reactos/dll/win32/urlmon/urlmon.spec
trunk/reactos/include/psdk/urlmon.idl
Modified: trunk/reactos/dll/win32/urlmon/internet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/internet.…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/internet.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/internet.c [iso-8859-1] Sun Mar 21 18:43:25 2010
@@ -405,3 +405,12 @@
FIXME("%d, 0x%08x, %x, stub\n", feature, flags, enable);
return E_NOTIMPL;
}
+
+/***********************************************************************
+ * CoInternetIsFeatureEnabled (URLMON.@)
+ */
+HRESULT WINAPI CoInternetIsFeatureEnabled(INTERNETFEATURELIST feature, DWORD flags)
+{
+ FIXME("%d, 0x%08x, stub\n", feature, flags);
+ return E_NOTIMPL;
+}
Modified: trunk/reactos/dll/win32/urlmon/sec_mgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/sec_mgr.c…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/sec_mgr.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/sec_mgr.c [iso-8859-1] Sun Mar 21 18:43:25 2010
@@ -1287,11 +1287,13 @@
return S_OK;
}
- hres = CoInternetParseUrl(url, PARSE_ROOTDOCUMENT, 0, domain, 0, &len, 0);
- if(hres == S_FALSE) {
- hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, domain,
- INTERNET_MAX_URL_LENGTH, &len, 0);
- if(hres == S_OK) {
+ hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, domain,
+ INTERNET_MAX_URL_LENGTH, &len, 0);
+ if(hres == S_OK){
+ const WCHAR fileW[] = {'f','i','l','e',0};
+ if(!strcmpW(domain, fileW)){
+ hres = CoInternetParseUrl(url, PARSE_ROOTDOCUMENT, 0, domain,
INTERNET_MAX_URL_LENGTH, &len, 0);
+ }else{
domain[len] = ':';
hres = CoInternetParseUrl(url, PARSE_DOMAIN, 0, domain+len+1,
INTERNET_MAX_URL_LENGTH-len-1, &len, 0);
@@ -1305,7 +1307,8 @@
return S_OK;
}
}
- }
+ }else
+ return hres;
len = lstrlenW(url)+1;
*ppwzSecUrl = CoTaskMemAlloc(len*sizeof(WCHAR));
Modified: trunk/reactos/dll/win32/urlmon/uri.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/uri.c?rev…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/uri.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/uri.c [iso-8859-1] Sun Mar 21 18:43:25 2010
@@ -26,7 +26,13 @@
LONG ref;
} Uri;
-#define URI(x) ((IUri*) &(x)->lpIUriVtbl)
+typedef struct {
+ const IUriBuilderVtbl *lpIUriBuilderVtbl;
+ LONG ref;
+} UriBuilder;
+
+#define URI(x) ((IUri*) &(x)->lpIUriVtbl)
+#define URIBUILDER(x) ((IUriBuilder*) &(x)->lpIUriBuilderVtbl)
#define URI_THIS(iface) DEFINE_THIS(Uri, IUri, iface)
@@ -300,3 +306,273 @@
*ppURI = URI(ret);
return S_OK;
}
+
+#define URIBUILDER_THIS(iface) DEFINE_THIS(UriBuilder, IUriBuilder, iface)
+
+static HRESULT WINAPI UriBuilder_QueryInterface(IUriBuilder *iface, REFIID riid, void
**ppv)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+
+ if(IsEqualGUID(&IID_IUnknown, riid)) {
+ TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
+ *ppv = URIBUILDER(This);
+ }else if(IsEqualGUID(&IID_IUriBuilder, riid)) {
+ TRACE("(%p)->(IID_IUri %p)\n", This, ppv);
+ *ppv = URIBUILDER(This);
+ }else {
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+
+ IUnknown_AddRef((IUnknown*)*ppv);
+ return S_OK;
+}
+
+static ULONG WINAPI UriBuilder_AddRef(IUriBuilder *iface)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ LONG ref = InterlockedIncrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ return ref;
+}
+
+static ULONG WINAPI UriBuilder_Release(IUriBuilder *iface)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ LONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p) ref=%d\n", This, ref);
+
+ if(!ref)
+ heap_free(This);
+
+ return ref;
+}
+
+static HRESULT WINAPI UriBuilder_CreateUriSimple(IUriBuilder *iface,
+ DWORD
dwAllowEncodingPropertyMask,
+ DWORD_PTR dwReserved,
+ IUri **ppIUri)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%d %d %p)\n", This, dwAllowEncodingPropertyMask,
(DWORD)dwReserved, ppIUri);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_CreateUri(IUriBuilder *iface,
+ DWORD dwCreateFlags,
+ DWORD dwAllowEncodingPropertyMask,
+ DWORD_PTR dwReserved,
+ IUri **ppIUri)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(0x%08x %d %d %p)\n", This, dwCreateFlags,
dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_CreateUriWithFlags(IUriBuilder *iface,
+ DWORD dwCreateFlags,
+ DWORD dwUriBuilderFlags,
+ DWORD dwAllowEncodingPropertyMask,
+ DWORD_PTR dwReserved,
+ IUri **ppIUri)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(0x%08x 0x%08x %d %d %p)\n", This, dwCreateFlags,
dwUriBuilderFlags,
+ dwAllowEncodingPropertyMask, (DWORD)dwReserved, ppIUri);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_GetIUri(IUriBuilder *iface, IUri **ppIUri)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, ppIUri);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_SetIUri(IUriBuilder *iface, IUri *pIUri)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, pIUri);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_GetFragment(IUriBuilder *iface, DWORD *pcchFragment,
LPCWSTR *ppwzFragment)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pcchFragment, ppwzFragment);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_GetHost(IUriBuilder *iface, DWORD *pcchHost, LPCWSTR
*ppwzHost)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pcchHost, ppwzHost);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_GetPassword(IUriBuilder *iface, DWORD *pcchPassword,
LPCWSTR *ppwzPassword)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pcchPassword, ppwzPassword);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_GetPath(IUriBuilder *iface, DWORD *pcchPath, LPCWSTR
*ppwzPath)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pcchPath, ppwzPath);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_GetPort(IUriBuilder *iface, BOOL *pfHasPort, DWORD
*pdwPort)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pfHasPort, pdwPort);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_GetQuery(IUriBuilder *iface, DWORD *pcchQuery, LPCWSTR
*ppwzQuery)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pcchQuery, ppwzQuery);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_GetSchemeName(IUriBuilder *iface, DWORD *pcchSchemeName,
LPCWSTR *ppwzSchemeName)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pcchSchemeName, ppwzSchemeName);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_GetUserName(IUriBuilder *iface, DWORD *pcchUserName,
LPCWSTR *ppwzUserName)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p %p)\n", This, pcchUserName, ppwzUserName);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_SetFragment(IUriBuilder *iface, LPCWSTR pwzNewValue)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_SetHost(IUriBuilder *iface, LPCWSTR pwzNewValue)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_SetPassword(IUriBuilder *iface, LPCWSTR pwzNewValue)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_SetPath(IUriBuilder *iface, LPCWSTR pwzNewValue)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_SetPort(IUriBuilder *iface, BOOL fHasPort, DWORD
dwNewValue)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%d %d)\n", This, fHasPort, dwNewValue);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_SetQuery(IUriBuilder *iface, LPCWSTR pwzNewValue)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_SetSchemeName(IUriBuilder *iface, LPCWSTR pwzNewValue)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_SetUserName(IUriBuilder *iface, LPCWSTR pwzNewValue)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%s)\n", This, debugstr_w(pwzNewValue));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_RemoveProperties(IUriBuilder *iface, DWORD
dwPropertyMask)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(0x%08x)\n", This, dwPropertyMask);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UriBuilder_HasBeenModified(IUriBuilder *iface, BOOL *pfModified)
+{
+ UriBuilder *This = URIBUILDER_THIS(iface);
+ FIXME("(%p)->(%p)\n", This, pfModified);
+ return E_NOTIMPL;
+}
+
+#undef URIBUILDER_THIS
+
+static const IUriBuilderVtbl UriBuilderVtbl = {
+ UriBuilder_QueryInterface,
+ UriBuilder_AddRef,
+ UriBuilder_Release,
+ UriBuilder_CreateUriSimple,
+ UriBuilder_CreateUri,
+ UriBuilder_CreateUriWithFlags,
+ UriBuilder_GetIUri,
+ UriBuilder_SetIUri,
+ UriBuilder_GetFragment,
+ UriBuilder_GetHost,
+ UriBuilder_GetPassword,
+ UriBuilder_GetPath,
+ UriBuilder_GetPort,
+ UriBuilder_GetQuery,
+ UriBuilder_GetSchemeName,
+ UriBuilder_GetUserName,
+ UriBuilder_SetFragment,
+ UriBuilder_SetHost,
+ UriBuilder_SetPassword,
+ UriBuilder_SetPath,
+ UriBuilder_SetPort,
+ UriBuilder_SetQuery,
+ UriBuilder_SetSchemeName,
+ UriBuilder_SetUserName,
+ UriBuilder_RemoveProperties,
+ UriBuilder_HasBeenModified,
+};
+
+/***********************************************************************
+ * CreateIUriBuilder (urlmon.@)
+ */
+HRESULT WINAPI CreateIUriBuilder(IUri *pIUri, DWORD dwFlags, DWORD_PTR dwReserved,
IUriBuilder **ppIUriBuilder)
+{
+ UriBuilder *ret;
+
+ TRACE("(%p %x %x %p)\n", pIUri, dwFlags, (DWORD)dwReserved,
ppIUriBuilder);
+
+ ret = heap_alloc(sizeof(UriBuilder));
+ if(!ret)
+ return E_OUTOFMEMORY;
+
+ ret->lpIUriBuilderVtbl = &UriBuilderVtbl;
+ ret->ref = 1;
+
+ *ppIUriBuilder = URIBUILDER(ret);
+ return S_OK;
+}
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 Mar 21 18:43:25 2010
@@ -17,6 +17,7 @@
@ stub CoInternetGetProtocolFlags
@ stdcall CoInternetGetSecurityUrl(ptr ptr long long)
@ stdcall CoInternetGetSession(long ptr long)
+@ stdcall CoInternetIsFeatureEnabled(long long)
@ stdcall CoInternetParseUrl(wstr long long wstr long ptr long)
@ stdcall CoInternetQueryInfo(ptr long long ptr long ptr long)
@ stdcall CoInternetSetFeatureEnabled(long long long)
@@ -26,6 +27,7 @@
@ 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 CreateURLMoniker(ptr wstr ptr)
@ stdcall CreateURLMonikerEx(ptr wstr ptr long)
Modified: trunk/reactos/include/psdk/urlmon.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/urlmon.idl?re…
==============================================================================
--- trunk/reactos/include/psdk/urlmon.idl [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/urlmon.idl [iso-8859-1] Sun Mar 21 18:43:25 2010
@@ -24,6 +24,7 @@
cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
cpp_quote("#undef GetUserName")
+cpp_quote("#undef SetPort")
cpp_quote("#endif")
interface IInternetProtocolSink;
@@ -1717,6 +1718,105 @@
}
/*****************************************************************************
+ * IUriBuilder interface
+ */
+[
+ local,
+ object,
+ uuid(4221b2e1-8955-46c0-bd5b-de9897565de7),
+ pointer_default(unique)
+]
+interface IUriBuilder: IUnknown
+{
+ HRESULT CreateUriSimple(
+ [in] DWORD dwAllowEncodingPropertyMask,
+ [in] DWORD_PTR dwReserved,
+ [out] IUri **ppIUri);
+
+ HRESULT CreateUri(
+ [in] DWORD dwCreateFlags,
+ [in] DWORD dwAllowEncodingPropertyMask,
+ [in] DWORD_PTR dwReserved,
+ [out] IUri **ppIUri);
+
+ HRESULT CreateUriWithFlags(
+ [in] DWORD dwCreateFlags,
+ [in] DWORD dwUriBuilderFlags,
+ [in] DWORD dwAllowEncodingPropertyMask,
+ [in] DWORD_PTR dwReserved,
+ [out] IUri **ppIUri);
+
+ HRESULT GetIUri(
+ [out] IUri **ppIUri);
+
+ HRESULT SetIUri(
+ [in, unique] IUri *pIUri);
+
+ HRESULT GetFragment(
+ [out] DWORD *pcchFragment,
+ [out] LPCWSTR *ppwzFragment);
+
+ HRESULT GetHost(
+ [out] DWORD *pcchHost,
+ [out] LPCWSTR *ppwzHost);
+
+ HRESULT GetPassword(
+ [out] DWORD *pcchPassword,
+ [out] LPCWSTR *ppwzPassword);
+
+ HRESULT GetPath(
+ [out] DWORD *pcchPath,
+ [out] LPCWSTR *ppwzPath);
+
+ HRESULT GetPort(
+ [out] BOOL *pfHasPort,
+ [out] DWORD *pdwPort);
+
+ HRESULT GetQuery(
+ [out] DWORD *pcchQuery,
+ [out] LPCWSTR *ppwzQuery);
+
+ HRESULT GetSchemeName(
+ [out] DWORD *pcchSchemeName,
+ [out] LPCWSTR *ppwzSchemeName);
+
+ HRESULT GetUserName(
+ [out] DWORD *pcchUserName,
+ [out] LPCWSTR *ppwzUserName);
+
+ HRESULT SetFragment(
+ [in] LPCWSTR pwzNewValue);
+
+ HRESULT SetHost(
+ [in] LPCWSTR pwzNewValue);
+
+ HRESULT SetPassword(
+ [in] LPCWSTR pwzNewValue);
+
+ HRESULT SetPath(
+ [in] LPCWSTR pwzNewValue);
+
+ HRESULT SetPort(
+ [in] BOOL fHasPort,
+ [in] DWORD dwNewValue);
+
+ HRESULT SetQuery(
+ [in] LPCWSTR pwzNewValue);
+
+ HRESULT SetSchemeName(
+ [in] LPCWSTR pwzNewValue);
+
+ HRESULT SetUserName(
+ [in] LPCWSTR pwzNewValue);
+
+ HRESULT RemoveProperties(
+ [in] DWORD dwPropertyMask);
+
+ HRESULT HasBeenModified(
+ [out] BOOL *pfModified);
+};
+
+/*****************************************************************************
* IInternetProtocolEx interface
*/
[