Commit 1e40dea1 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

devenum: COM cleanup for ICreateDevEnum.

parent 9d541301
...@@ -59,24 +59,24 @@ static HRESULT DEVENUM_CreateSpecialCategories(void); ...@@ -59,24 +59,24 @@ static HRESULT DEVENUM_CreateSpecialCategories(void);
/********************************************************************** /**********************************************************************
* DEVENUM_ICreateDevEnum_QueryInterface (also IUnknown) * DEVENUM_ICreateDevEnum_QueryInterface (also IUnknown)
*/ */
static HRESULT WINAPI DEVENUM_ICreateDevEnum_QueryInterface( static HRESULT WINAPI DEVENUM_ICreateDevEnum_QueryInterface(ICreateDevEnum *iface, REFIID riid,
ICreateDevEnum * iface, void **ppv)
REFIID riid,
LPVOID *ppvObj)
{ {
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
if (ppvObj == NULL) return E_POINTER; if (!ppv)
return E_POINTER;
if (IsEqualGUID(riid, &IID_IUnknown) || if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_ICreateDevEnum)) IsEqualGUID(riid, &IID_ICreateDevEnum))
{ {
*ppvObj = iface; *ppv = iface;
DEVENUM_ICreateDevEnum_AddRef(iface); DEVENUM_ICreateDevEnum_AddRef(iface);
return S_OK; return S_OK;
} }
FIXME("- no interface IID: %s\n", debugstr_guid(riid)); FIXME("- no interface IID: %s\n", debugstr_guid(riid));
*ppv = NULL;
return E_NOINTERFACE; return E_NOINTERFACE;
} }
...@@ -463,9 +463,9 @@ static HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator( ...@@ -463,9 +463,9 @@ static HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator(
HKEY hkey; HKEY hkey;
HKEY hbasekey; HKEY hbasekey;
HRESULT hr; HRESULT hr;
CreateDevEnumImpl *This = (CreateDevEnumImpl *)iface;
TRACE("(%p)->(%s, %p, %x)\n\tDeviceClass:\t%s\n", This, debugstr_guid(clsidDeviceClass), ppEnumMoniker, dwFlags, debugstr_guid(clsidDeviceClass)); TRACE("(%p)->(%s, %p, %x)\n\tDeviceClass:\t%s\n", iface, debugstr_guid(clsidDeviceClass),
ppEnumMoniker, dwFlags, debugstr_guid(clsidDeviceClass));
if (!ppEnumMoniker) if (!ppEnumMoniker)
return E_POINTER; return E_POINTER;
...@@ -519,7 +519,7 @@ static const ICreateDevEnumVtbl ICreateDevEnum_Vtbl = ...@@ -519,7 +519,7 @@ static const ICreateDevEnumVtbl ICreateDevEnum_Vtbl =
/********************************************************************** /**********************************************************************
* static CreateDevEnum instance * static CreateDevEnum instance
*/ */
CreateDevEnumImpl DEVENUM_CreateDevEnum = { &ICreateDevEnum_Vtbl }; CreateDevEnumImpl DEVENUM_CreateDevEnum = { { &ICreateDevEnum_Vtbl } };
/********************************************************************** /**********************************************************************
* DEVENUM_CreateAMCategoryKey (INTERNAL) * DEVENUM_CreateAMCategoryKey (INTERNAL)
......
...@@ -62,7 +62,7 @@ typedef struct ...@@ -62,7 +62,7 @@ typedef struct
typedef struct typedef struct
{ {
const ICreateDevEnumVtbl *lpVtbl; ICreateDevEnum ICreateDevEnum_iface;
} CreateDevEnumImpl; } CreateDevEnumImpl;
typedef struct typedef struct
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment