urlmon: Added stub for CoInternetCombineUrlEx.

This commit is contained in:
Thomas Mullaly 2010-11-10 22:31:35 -05:00 committed by Alexandre Julliard
parent 48f3335ffa
commit 4d9d4b10e0
4 changed files with 65 additions and 0 deletions

View File

@ -67,6 +67,7 @@ static HRESULT (WINAPI *pCreateUriWithFragment)(LPCWSTR, LPCWSTR, DWORD, DWORD_P
static HRESULT (WINAPI *pCreateIUriBuilder)(IUri*, DWORD, DWORD_PTR, IUriBuilder**);
static HRESULT (WINAPI *pCoInternetCombineIUri)(IUri*,IUri*,DWORD,IUri**,DWORD_PTR);
static HRESULT (WINAPI *pCoInternetGetSession)(DWORD,IInternetSession**,DWORD);
static HRESULT (WINAPI *pCoInternetCombineUrlEx)(IUri*,LPCWSTR,DWORD,IUri**,DWORD_PTR);
static const WCHAR http_urlW[] = { 'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q',
'.','o','r','g','/',0};
@ -9285,6 +9286,39 @@ static void test_CoInternetCombineIUri_Pluggable(void) {
unregister_protocols();
}
static void test_CoInternetCombineUrlEx(void) {
HRESULT hr;
IUri *base, *result;
base = NULL;
hr = pCreateUri(http_urlW, 0, 0, &base);
ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr);
if(SUCCEEDED(hr)) {
result = (void*) 0xdeadbeef;
hr = pCoInternetCombineUrlEx(base, NULL, 0, &result, 0);
ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n",
hr, E_UNEXPECTED);
ok(!result, "Error: Expected 'result' to be NULL was %p instead.\n", result);
}
result = (void*) 0xdeadbeef;
hr = pCoInternetCombineUrlEx(NULL, http_urlW, 0, &result, 0);
ok(hr == E_INVALIDARG, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n",
hr, E_INVALIDARG);
ok(!result, "Error: Expected 'result' to be NULL, but was %p instead.\n", result);
result = (void*) 0xdeadbeef;
hr = pCoInternetCombineUrlEx(NULL, NULL, 0, &result, 0);
ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n",
hr, E_UNEXPECTED);
ok(!result, "Error: Expected 'result' to be NULL, but was %p instead.\n", result);
hr = pCoInternetCombineUrlEx(base, http_urlW, 0, NULL, 0);
ok(hr == E_POINTER, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n",
hr, E_POINTER);
if(base) IUri_Release(base);
}
START_TEST(uri) {
HMODULE hurlmon;
@ -9294,6 +9328,7 @@ START_TEST(uri) {
pCreateUriWithFragment = (void*) GetProcAddress(hurlmon, "CreateUriWithFragment");
pCreateIUriBuilder = (void*) GetProcAddress(hurlmon, "CreateIUriBuilder");
pCoInternetCombineIUri = (void*) GetProcAddress(hurlmon, "CoInternetCombineIUri");
pCoInternetCombineUrlEx = (void*) GetProcAddress(hurlmon, "CoInternetCombineUrlEx");
if(!pCreateUri) {
win_skip("CreateUri is not present, skipping tests.\n");
@ -9369,6 +9404,9 @@ START_TEST(uri) {
trace("test CoInternetCombineIUri...\n");
test_CoInternetCombineIUri();
trace("test CoInternetCombineUrlEx...\n");
test_CoInternetCombineUrlEx();
trace("test CoInternetCombineIUri pluggable...\n");
test_CoInternetCombineIUri_Pluggable();
}

View File

@ -6009,3 +6009,28 @@ HRESULT WINAPI CoInternetCombineIUri(IUri *pBaseUri, IUri *pRelativeUri, DWORD d
return combine_uri(base, relative, dwCombineFlags, ppCombinedUri);
}
/***********************************************************************
* CoInternetCombineUrlEx (urlmon.@)
*/
HRESULT WINAPI CoInternetCombineUrlEx(IUri *pBaseUri, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags,
IUri **ppCombinedUri, DWORD_PTR dwReserved)
{
TRACE("(%p %s %x %p %x) stub\n", pBaseUri, debugstr_w(pwzRelativeUrl), dwCombineFlags,
ppCombinedUri, (DWORD)dwReserved);
if(!ppCombinedUri)
return E_POINTER;
if(!pwzRelativeUrl) {
*ppCombinedUri = NULL;
return E_UNEXPECTED;
}
if(!pBaseUri) {
*ppCombinedUri = NULL;
return E_INVALIDARG;
}
return E_NOTIMPL;
}

View File

@ -11,6 +11,7 @@
@ stdcall CoGetClassObjectFromURL(ptr wstr long long wstr ptr long ptr ptr ptr)
@ stub CoInstall
@ stdcall CoInternetCombineUrl(wstr wstr long wstr 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)

View File

@ -1930,6 +1930,7 @@ cpp_quote("HRESULT WINAPI CreateAsyncBindCtx(DWORD, IBindStatusCallback*, IEnumF
cpp_quote("HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx*,DWORD,IBindStatusCallback*,IEnumFORMATETC*,IBindCtx**,DWORD);")
cpp_quote("HRESULT WINAPI CoInternetCreateSecurityManager(IServiceProvider*,IInternetSecurityManager**,DWORD);")
cpp_quote("HRESULT WINAPI CoInternetCombineUrl(LPCWSTR,LPCWSTR,DWORD,LPWSTR,DWORD,DWORD*,DWORD);")
cpp_quote("HRESULT WINAPI CoInternetCombineUrlEx(IUri*,LPCWSTR,DWORD,IUri**,DWORD_PTR);")
cpp_quote("HRESULT WINAPI CoInternetCompareUrl(LPCWSTR,LPCWSTR,DWORD);")
cpp_quote("HRESULT WINAPI CoInternetCombineIUri(IUri*,IUri*,DWORD,IUri**,DWORD_PTR);")
cpp_quote("HRESULT WINAPI CoInternetCreateZoneManager(IServiceProvider*, IInternetZoneManager**, DWORD);")