Commit 39e80379 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

objsel: COM cleanup for the IClassFactory iface.

parent 1c35951f
......@@ -26,6 +26,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(objsel);
static inline ClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
{
return CONTAINING_RECORD(iface, ClassFactoryImpl, IClassFactory_iface);
}
/**********************************************************************
* OBJSEL_IClassFactory_QueryInterface (also IUnknown)
*/
......@@ -60,7 +65,7 @@ static HRESULT WINAPI OBJSEL_IClassFactory_QueryInterface(
*/
static ULONG WINAPI OBJSEL_IClassFactory_AddRef(LPCLASSFACTORY iface)
{
ClassFactoryImpl *This = (ClassFactoryImpl *)iface;
ClassFactoryImpl *This = impl_from_IClassFactory(iface);
ULONG ref;
TRACE("\n");
......@@ -83,7 +88,7 @@ static ULONG WINAPI OBJSEL_IClassFactory_AddRef(LPCLASSFACTORY iface)
*/
static ULONG WINAPI OBJSEL_IClassFactory_Release(LPCLASSFACTORY iface)
{
ClassFactoryImpl *This = (ClassFactoryImpl *)iface;
ClassFactoryImpl *This = impl_from_IClassFactory(iface);
ULONG ref;
TRACE("\n");
......@@ -160,4 +165,4 @@ static IClassFactoryVtbl IClassFactory_Vtbl =
* static ClassFactory instance
*/
ClassFactoryImpl OBJSEL_ClassFactory = { &IClassFactory_Vtbl, 0 };
ClassFactoryImpl OBJSEL_ClassFactory = { { &IClassFactory_Vtbl }, 0 };
......@@ -54,7 +54,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
*ppv = NULL;
if (IsEqualGUID(rclsid, &CLSID_DsObjectPicker))
return IClassFactory_QueryInterface((IClassFactory*)&OBJSEL_ClassFactory, iid, ppv);
return IClassFactory_QueryInterface(&OBJSEL_ClassFactory.IClassFactory_iface, iid, ppv);
FIXME("CLSID: %s, IID: %s\n", debugstr_guid(rclsid), debugstr_guid(iid));
return CLASS_E_CLASSNOTAVAILABLE;
......
......@@ -49,7 +49,7 @@ extern LONG dll_refs;
*/
typedef struct
{
IClassFactoryVtbl *lpVtbl;
IClassFactory IClassFactory_iface;
LONG ref;
} ClassFactoryImpl;
......
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