mirror of
https://github.com/reactos/wine.git
synced 2025-01-26 22:24:37 +00:00
mstask: COM cleanup for the IClassFactory iface.
This commit is contained in:
parent
5fd62154f3
commit
30e90c9ace
@ -21,12 +21,23 @@
|
|||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(mstask);
|
WINE_DEFAULT_DEBUG_CHANNEL(mstask);
|
||||||
|
|
||||||
|
struct ClassFactoryImpl
|
||||||
|
{
|
||||||
|
IClassFactory IClassFactory_iface;
|
||||||
|
LONG ref;
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline ClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, ClassFactoryImpl, IClassFactory_iface);
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI MSTASK_IClassFactory_QueryInterface(
|
static HRESULT WINAPI MSTASK_IClassFactory_QueryInterface(
|
||||||
LPCLASSFACTORY iface,
|
LPCLASSFACTORY iface,
|
||||||
REFIID riid,
|
REFIID riid,
|
||||||
LPVOID *ppvObj)
|
LPVOID *ppvObj)
|
||||||
{
|
{
|
||||||
ClassFactoryImpl *This = (ClassFactoryImpl *)iface;
|
ClassFactoryImpl *This = impl_from_IClassFactory(iface);
|
||||||
|
|
||||||
TRACE("IID: %s\n",debugstr_guid(riid));
|
TRACE("IID: %s\n",debugstr_guid(riid));
|
||||||
if (ppvObj == NULL)
|
if (ppvObj == NULL)
|
||||||
@ -35,7 +46,7 @@ static HRESULT WINAPI MSTASK_IClassFactory_QueryInterface(
|
|||||||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||||
IsEqualGUID(riid, &IID_IClassFactory))
|
IsEqualGUID(riid, &IID_IClassFactory))
|
||||||
{
|
{
|
||||||
*ppvObj = &This->lpVtbl;
|
*ppvObj = &This->IClassFactory_iface;
|
||||||
IClassFactory_AddRef(iface);
|
IClassFactory_AddRef(iface);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
@ -105,4 +116,4 @@ static const IClassFactoryVtbl IClassFactory_Vtbl =
|
|||||||
MSTASK_IClassFactory_LockServer
|
MSTASK_IClassFactory_LockServer
|
||||||
};
|
};
|
||||||
|
|
||||||
ClassFactoryImpl MSTASK_ClassFactory = { &IClassFactory_Vtbl };
|
ClassFactoryImpl MSTASK_ClassFactory = { { &IClassFactory_Vtbl } };
|
||||||
|
@ -31,11 +31,7 @@
|
|||||||
|
|
||||||
extern LONG dll_ref;
|
extern LONG dll_ref;
|
||||||
|
|
||||||
typedef struct
|
typedef struct ClassFactoryImpl ClassFactoryImpl;
|
||||||
{
|
|
||||||
const IClassFactoryVtbl *lpVtbl;
|
|
||||||
LONG ref;
|
|
||||||
} ClassFactoryImpl;
|
|
||||||
extern ClassFactoryImpl MSTASK_ClassFactory;
|
extern ClassFactoryImpl MSTASK_ClassFactory;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
Loading…
x
Reference in New Issue
Block a user