devenum: COM cleanup for ICreateDevEnum.
This commit is contained in:
parent
9d54130128
commit
1e40dea125
|
@ -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(
|
||||||
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 =
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* 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
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const ICreateDevEnumVtbl *lpVtbl;
|
ICreateDevEnum ICreateDevEnum_iface;
|
||||||
} CreateDevEnumImpl;
|
} CreateDevEnumImpl;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
Loading…
Reference in New Issue