From d34bbb2b52615a88cac8f2f0dca0a48b6e46bb25 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 3 Jan 2011 23:48:18 +0100 Subject: [PATCH] urlmon: Fixed IUriBuilderFactory declaration. --- dlls/urlmon/tests/uri.c | 19 ++++++++----------- dlls/urlmon/uri.c | 20 ++++++++++---------- include/urlmon.idl | 12 ++++++------ 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c index fd9099ce83..44f438f358 100644 --- a/dlls/urlmon/tests/uri.c +++ b/dlls/urlmon/tests/uri.c @@ -9090,23 +9090,23 @@ static void test_IUriBuilderFactory(void) { if(SUCCEEDED(hr)) { builder = (void*) 0xdeadbeef; - hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 10, 0, &builder); + hr = IUriBuilderFactory_CreateIUriBuilder(factory, 10, 0, &builder); ok(hr == E_INVALIDARG, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder); builder = (void*) 0xdeadbeef; - hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 10, &builder); + hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 10, &builder); ok(hr == E_INVALIDARG, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder); - hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 0, NULL); + hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 0, NULL); ok(hr == E_POINTER, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); builder = NULL; - hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 0, &builder); + hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 0, &builder); ok(hr == S_OK, "Error: CreateInitializedIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); if(SUCCEEDED(hr)) { @@ -9114,9 +9114,6 @@ static void test_IUriBuilderFactory(void) { LPCWSTR result; DWORD result_len; - /* Seems microsoft had a bit of mixup naming this function. It - * returns an uninitialized IUriBuilder. - */ hr = IUriBuilder_GetIUri(builder, &tmp); ok(hr == S_OK, "Error: GetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK); @@ -9129,23 +9126,23 @@ static void test_IUriBuilderFactory(void) { if(builder) IUriBuilder_Release(builder); builder = (void*) 0xdeadbeef; - hr = IUriBuilderFactory_CreateIUriBuilder(factory, 10, 0, &builder); + hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 10, 0, &builder); ok(hr == E_INVALIDARG, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder); builder = (void*) 0xdeadbeef; - hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 10, &builder); + hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 10, &builder); ok(hr == E_INVALIDARG, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG); ok(!builder, "Error: Expected 'builder' to be NULL, but was %p.\n", builder); - hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 0, NULL); + hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 0, NULL); ok(hr == E_POINTER, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER); builder = NULL; - hr = IUriBuilderFactory_CreateIUriBuilder(factory, 0, 0, &builder); + hr = IUriBuilderFactory_CreateInitializedIUriBuilder(factory, 0, 0, &builder); ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK); if(SUCCEEDED(hr)) { diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index 825c6c5020..7f8a441c21 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -5007,10 +5007,10 @@ static ULONG WINAPI UriBuilderFactory_Release(IUriBuilderFactory *iface) return ref; } -static HRESULT WINAPI UriBuilderFactory_CreateInitializedIUriBuilder(IUriBuilderFactory *iface, - DWORD dwFlags, - DWORD_PTR dwReserved, - IUriBuilder **ppIUriBuilder) +static HRESULT WINAPI UriBuilderFactory_CreateIUriBuilder(IUriBuilderFactory *iface, + DWORD dwFlags, + DWORD_PTR dwReserved, + IUriBuilder **ppIUriBuilder) { Uri *This = impl_from_IUriBuilderFactory(iface); TRACE("(%p)->(%08x %08x %p)\n", This, dwFlags, (DWORD)dwReserved, ppIUriBuilder); @@ -5026,10 +5026,10 @@ static HRESULT WINAPI UriBuilderFactory_CreateInitializedIUriBuilder(IUriBuilder return CreateIUriBuilder(NULL, 0, 0, ppIUriBuilder); } -static HRESULT WINAPI UriBuilderFactory_CreateIUriBuilder(IUriBuilderFactory *iface, - DWORD dwFlags, - DWORD_PTR dwReserved, - IUriBuilder **ppIUriBuilder) +static HRESULT WINAPI UriBuilderFactory_CreateInitializedIUriBuilder(IUriBuilderFactory *iface, + DWORD dwFlags, + DWORD_PTR dwReserved, + IUriBuilder **ppIUriBuilder) { Uri *This = impl_from_IUriBuilderFactory(iface); TRACE("(%p)->(%08x %08x %p)\n", This, dwFlags, (DWORD)dwReserved, ppIUriBuilder); @@ -5049,8 +5049,8 @@ static const IUriBuilderFactoryVtbl UriBuilderFactoryVtbl = { UriBuilderFactory_QueryInterface, UriBuilderFactory_AddRef, UriBuilderFactory_Release, - UriBuilderFactory_CreateInitializedIUriBuilder, - UriBuilderFactory_CreateIUriBuilder + UriBuilderFactory_CreateIUriBuilder, + UriBuilderFactory_CreateInitializedIUriBuilder }; static Uri* create_uri_obj(void) { diff --git a/include/urlmon.idl b/include/urlmon.idl index d2a46a08cc..240b6a738e 100644 --- a/include/urlmon.idl +++ b/include/urlmon.idl @@ -1839,16 +1839,16 @@ cpp_quote("HRESULT WINAPI CreateIUriBuilder(IUri*,DWORD,DWORD_PTR,IUriBuilder**) ] interface IUriBuilderFactory : IUnknown { - HRESULT CreateInitializedIUriBuilder( - [in] DWORD dwFlags, - [in] DWORD_PTR dwReserved, - [out] IUriBuilder **ppIUriBuilder); - HRESULT CreateIUriBuilder( [in] DWORD dwFlags, [in] DWORD_PTR dwReserved, [out] IUriBuilder **ppIUriBuilder); -}; + + HRESULT CreateInitializedIUriBuilder( + [in] DWORD dwFlags, + [in] DWORD_PTR dwReserved, + [out] IUriBuilder **ppIUriBuilder); +} /***************************************************************************** * IInternetProtocolEx interface