From 691b0a3d68a329139ad2bc8d0b954b722b603b40 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Sun, 22 Apr 2007 11:38:15 +0200 Subject: [PATCH] urlmon: Add an implementation for CreateURLMonikerEx based on existing code for CreateURLMoniker. --- dlls/urlmon/umon.c | 29 ++++++++++++++++++++++++++--- dlls/urlmon/urlmon.spec | 1 + include/urlmon.idl | 2 ++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index 03289ff4418..7765f27d8d1 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c @@ -1149,7 +1149,7 @@ HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options, /*********************************************************************** - * CreateURLMoniker (URLMON.@) + * CreateURLMonikerEx (URLMON.@) * * Create a url moniker. * @@ -1157,19 +1157,22 @@ HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options, * pmkContext [I] Context * szURL [I] Url to create the moniker for * ppmk [O] Destination for created moniker. + * dwFlags [I] Flags. * * RETURNS * Success: S_OK. ppmk contains the created IMoniker object. * Failure: MK_E_SYNTAX if szURL is not a valid url, or * E_OUTOFMEMORY if memory allocation fails. */ -HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk) +HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk, DWORD dwFlags) { URLMonikerImpl *obj; HRESULT hres; LPOLESTR lefturl = NULL; - TRACE("(%p, %s, %p)\n", pmkContext, debugstr_w(szURL), ppmk); + TRACE("(%p, %s, %p, %08x)\n", pmkContext, debugstr_w(szURL), ppmk, dwFlags); + + if (dwFlags & URL_MK_UNIFORM) FIXME("ignoring flag URL_MK_UNIFORM\n"); if(!(obj = HeapAlloc(GetProcessHeap(), 0, sizeof(*obj)))) return E_OUTOFMEMORY; @@ -1194,6 +1197,26 @@ HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker ** return hres; } +/********************************************************************** + * CreateURLMoniker (URLMON.@) + * + * Create a url moniker. + * + * PARAMS + * pmkContext [I] Context + * szURL [I] Url to create the moniker for + * ppmk [O] Destination for created moniker. + * + * RETURNS + * Success: S_OK. ppmk contains the created IMoniker object. + * Failure: MK_E_SYNTAX if szURL is not a valid url, or + * E_OUTOFMEMORY if memory allocation fails. + */ +HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk) +{ + return CreateURLMonikerEx(pmkContext, szURL, ppmk, URL_MK_LEGACY); +} + /*********************************************************************** * CoInternetQueryInfo (URLMON.@) * diff --git a/dlls/urlmon/urlmon.spec b/dlls/urlmon/urlmon.spec index 7821486d121..c72c0ebb5ef 100644 --- a/dlls/urlmon/urlmon.spec +++ b/dlls/urlmon/urlmon.spec @@ -26,6 +26,7 @@ @ stdcall CreateAsyncBindCtxEx(ptr long ptr ptr ptr long) @ stdcall CreateFormatEnumerator(long ptr ptr) @ stdcall CreateURLMoniker(ptr wstr ptr) +@ stdcall CreateURLMonikerEx(ptr wstr ptr long) @ stdcall -private DllCanUnloadNow() @ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall -private DllInstall(long wstr) diff --git a/include/urlmon.idl b/include/urlmon.idl index da068684cb8..5f640862083 100644 --- a/include/urlmon.idl +++ b/include/urlmon.idl @@ -1284,3 +1284,5 @@ cpp_quote("#define OInetCompareUrl CoInternetCompareUrl") cpp_quote("#define OInetGetSession CoInternetGetSession") cpp_quote("#define MKSYS_URLMONIKER 6") +cpp_quote("#define URL_MK_LEGACY 0") +cpp_quote("#define URL_MK_UNIFORM 1") -- 2.11.4.GIT