diff --git a/dlls/wmiutils/main.c b/dlls/wmiutils/main.c index c088a682f0e..89fd26b248d 100644 --- a/dlls/wmiutils/main.c +++ b/dlls/wmiutils/main.c @@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmiutils); static HINSTANCE instance; -typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj ); +typedef HRESULT (*fnCreateInstance)( LPVOID *ppObj ); typedef struct { @@ -87,14 +87,11 @@ static HRESULT WINAPI wmiutils_cf_CreateInstance( IClassFactory *iface, LPUNKNOW if (pOuter) return CLASS_E_NOAGGREGATION; - r = This->pfnCreateInstance( pOuter, (LPVOID *)&punk ); + r = This->pfnCreateInstance( (LPVOID *)&punk ); if (FAILED(r)) return r; r = IUnknown_QueryInterface( punk, riid, ppobj ); - if (FAILED(r)) - return r; - IUnknown_Release( punk ); return r; } diff --git a/dlls/wmiutils/path.c b/dlls/wmiutils/path.c index 046f424fe54..647724f13c7 100644 --- a/dlls/wmiutils/path.c +++ b/dlls/wmiutils/path.c @@ -276,11 +276,11 @@ static const struct IWbemPathKeyListVtbl keylist_vtbl = keylist_GetText }; -static HRESULT WbemPathKeyList_create( IUnknown *pUnkOuter, IWbemPath *parent, LPVOID *ppObj ) +static HRESULT WbemPathKeyList_create( IWbemPath *parent, LPVOID *ppObj ) { struct keylist *keylist; - TRACE("%p, %p\n", pUnkOuter, ppObj); + TRACE("%p\n", ppObj); if (!(keylist = heap_alloc( sizeof(*keylist) ))) return E_OUTOFMEMORY; @@ -1178,7 +1178,7 @@ static HRESULT WINAPI path_GetKeyList( LeaveCriticalSection( &path->cs ); return WBEM_E_INVALID_PARAMETER; } - hr = WbemPathKeyList_create( NULL, iface, (void **)pOut ); + hr = WbemPathKeyList_create( iface, (void **)pOut ); LeaveCriticalSection( &path->cs ); return hr; @@ -1269,11 +1269,11 @@ static const struct IWbemPathVtbl path_vtbl = path_IsSameClassName }; -HRESULT WbemPath_create( IUnknown *pUnkOuter, LPVOID *ppObj ) +HRESULT WbemPath_create( LPVOID *ppObj ) { struct path *path; - TRACE("%p, %p\n", pUnkOuter, ppObj); + TRACE("%p\n", ppObj); if (!(path = heap_alloc( sizeof(*path) ))) return E_OUTOFMEMORY; diff --git a/dlls/wmiutils/statuscode.c b/dlls/wmiutils/statuscode.c index 0718c17285e..719f3af8b5d 100644 --- a/dlls/wmiutils/statuscode.c +++ b/dlls/wmiutils/statuscode.c @@ -132,11 +132,11 @@ static const struct IWbemStatusCodeTextVtbl status_code_vtbl = status_code_GetFacilityCodeText }; -HRESULT WbemStatusCodeText_create( IUnknown *pUnkOuter, LPVOID *ppObj ) +HRESULT WbemStatusCodeText_create( LPVOID *ppObj ) { status_code *sc; - TRACE("(%p,%p)\n", pUnkOuter, ppObj); + TRACE("(%p)\n", ppObj); if (!(sc = heap_alloc( sizeof(*sc) ))) return E_OUTOFMEMORY; diff --git a/dlls/wmiutils/wmiutils_private.h b/dlls/wmiutils/wmiutils_private.h index fbd6ab53526..2b76f712e71 100644 --- a/dlls/wmiutils/wmiutils_private.h +++ b/dlls/wmiutils/wmiutils_private.h @@ -18,8 +18,8 @@ #include "wine/unicode.h" -HRESULT WbemPath_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; -HRESULT WbemStatusCodeText_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; +HRESULT WbemPath_create(LPVOID *) DECLSPEC_HIDDEN; +HRESULT WbemStatusCodeText_create(LPVOID *) DECLSPEC_HIDDEN; static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1); static inline void *heap_alloc( size_t len )