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);
/**********************************************************************
* DEVENUM_ICreateDevEnum_QueryInterface (also IUnknown)
*/
static HRESULT WINAPI DEVENUM_ICreateDevEnum_QueryInterface(
ICreateDevEnum * iface,
REFIID riid,
LPVOID *ppvObj)
static HRESULT WINAPI DEVENUM_ICreateDevEnum_QueryInterface(ICreateDevEnum *iface, REFIID riid,
void **ppv)
{
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) ||
IsEqualGUID(riid, &IID_ICreateDevEnum))
{
*ppvObj = iface;
*ppv = iface;
DEVENUM_ICreateDevEnum_AddRef(iface);
return S_OK;
}
FIXME("- no interface IID: %s\n", debugstr_guid(riid));
*ppv = NULL;
return E_NOINTERFACE;
}
......@@ -463,9 +463,9 @@ static HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator(
HKEY hkey;
HKEY hbasekey;
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)
return E_POINTER;
......@@ -519,7 +519,7 @@ static const ICreateDevEnumVtbl ICreateDevEnum_Vtbl =
/**********************************************************************
* static CreateDevEnum instance
*/
CreateDevEnumImpl DEVENUM_CreateDevEnum = { &ICreateDevEnum_Vtbl };
CreateDevEnumImpl DEVENUM_CreateDevEnum = { { &ICreateDevEnum_Vtbl } };
/**********************************************************************
* DEVENUM_CreateAMCategoryKey (INTERNAL)
......
......@@ -62,7 +62,7 @@ typedef struct
typedef struct
{
const ICreateDevEnumVtbl *lpVtbl;
ICreateDevEnum ICreateDevEnum_iface;
} CreateDevEnumImpl;
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