devenum: COM cleanup for the IClassFactory iface.

This commit is contained in:
Michael Stefaniuc 2011-08-01 10:34:09 +02:00 committed by Alexandre Julliard
parent 2cfc711a68
commit aa591dcd9d
3 changed files with 10 additions and 17 deletions

View File

@ -75,7 +75,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
* Oh well - works just fine as it is */
if (IsEqualGUID(rclsid, &CLSID_SystemDeviceEnum) ||
IsEqualGUID(rclsid, &CLSID_CDeviceMoniker))
return IClassFactory_QueryInterface((IClassFactory*)&DEVENUM_ClassFactory, iid, ppv);
return IClassFactory_QueryInterface(&DEVENUM_ClassFactory.IClassFactory_iface, iid, ppv);
FIXME("CLSID: %s, IID: %s\n", debugstr_guid(rclsid), debugstr_guid(iid));
return CLASS_E_CLASSNOTAVAILABLE;

View File

@ -57,7 +57,7 @@ static inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs);
*/
typedef struct
{
const IClassFactoryVtbl *lpVtbl;
IClassFactory IClassFactory_iface;
} ClassFactoryImpl;
typedef struct

View File

@ -28,10 +28,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(devenum);
/**********************************************************************
* DEVENUM_IClassFactory_QueryInterface (also IUnknown)
*/
static HRESULT WINAPI DEVENUM_IClassFactory_QueryInterface(
LPCLASSFACTORY iface,
REFIID riid,
LPVOID *ppvObj)
static HRESULT WINAPI DEVENUM_IClassFactory_QueryInterface(IClassFactory *iface, REFIID riid,
void **ppvObj)
{
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
@ -56,7 +54,7 @@ static HRESULT WINAPI DEVENUM_IClassFactory_QueryInterface(
/**********************************************************************
* DEVENUM_IClassFactory_AddRef (also IUnknown)
*/
static ULONG WINAPI DEVENUM_IClassFactory_AddRef(LPCLASSFACTORY iface)
static ULONG WINAPI DEVENUM_IClassFactory_AddRef(IClassFactory *iface)
{
TRACE("\n");
@ -68,7 +66,7 @@ static ULONG WINAPI DEVENUM_IClassFactory_AddRef(LPCLASSFACTORY iface)
/**********************************************************************
* DEVENUM_IClassFactory_Release (also IUnknown)
*/
static ULONG WINAPI DEVENUM_IClassFactory_Release(LPCLASSFACTORY iface)
static ULONG WINAPI DEVENUM_IClassFactory_Release(IClassFactory *iface)
{
TRACE("\n");
@ -80,11 +78,8 @@ static ULONG WINAPI DEVENUM_IClassFactory_Release(LPCLASSFACTORY iface)
/**********************************************************************
* DEVENUM_IClassFactory_CreateInstance
*/
static HRESULT WINAPI DEVENUM_IClassFactory_CreateInstance(
LPCLASSFACTORY iface,
LPUNKNOWN pUnkOuter,
REFIID riid,
LPVOID *ppvObj)
static HRESULT WINAPI DEVENUM_IClassFactory_CreateInstance(IClassFactory *iface,
IUnknown *pUnkOuter, REFIID riid, void **ppvObj)
{
TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
@ -110,9 +105,7 @@ static HRESULT WINAPI DEVENUM_IClassFactory_CreateInstance(
/**********************************************************************
* DEVENUM_IClassFactory_LockServer
*/
static HRESULT WINAPI DEVENUM_IClassFactory_LockServer(
LPCLASSFACTORY iface,
BOOL fLock)
static HRESULT WINAPI DEVENUM_IClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
{
TRACE("\n");
@ -138,4 +131,4 @@ static const IClassFactoryVtbl IClassFactory_Vtbl =
/**********************************************************************
* static ClassFactory instance
*/
ClassFactoryImpl DEVENUM_ClassFactory = { &IClassFactory_Vtbl };
ClassFactoryImpl DEVENUM_ClassFactory = { { &IClassFactory_Vtbl } };