qmgr: COM cleanup for the IClassFactory iface.
This commit is contained in:
parent
2507d6e581
commit
3de56aa9a7
|
@ -26,20 +26,17 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(qmgr);
|
||||
|
||||
static ULONG WINAPI
|
||||
BITS_IClassFactory_AddRef(LPCLASSFACTORY iface)
|
||||
BITS_IClassFactory_AddRef(IClassFactory *iface)
|
||||
{
|
||||
return 2;
|
||||
return 2; /* non-heap based object */
|
||||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
BITS_IClassFactory_QueryInterface(LPCLASSFACTORY iface, REFIID riid,
|
||||
LPVOID *ppvObj)
|
||||
BITS_IClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppvObj)
|
||||
{
|
||||
ClassFactoryImpl *This = (ClassFactoryImpl *) iface;
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IClassFactory))
|
||||
{
|
||||
*ppvObj = &This->lpVtbl;
|
||||
*ppvObj = &BITS_ClassFactory.IClassFactory_iface;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -48,14 +45,14 @@ BITS_IClassFactory_QueryInterface(LPCLASSFACTORY iface, REFIID riid,
|
|||
}
|
||||
|
||||
static ULONG WINAPI
|
||||
BITS_IClassFactory_Release(LPCLASSFACTORY iface)
|
||||
BITS_IClassFactory_Release(IClassFactory *iface)
|
||||
{
|
||||
return 1;
|
||||
return 1; /* non-heap based object */
|
||||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
BITS_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter,
|
||||
REFIID riid, LPVOID *ppvObj)
|
||||
BITS_IClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid,
|
||||
void **ppvObj)
|
||||
{
|
||||
HRESULT res;
|
||||
IUnknown *punk = NULL;
|
||||
|
@ -75,7 +72,7 @@ BITS_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter,
|
|||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
BITS_IClassFactory_LockServer(LPCLASSFACTORY iface, BOOL fLock)
|
||||
BITS_IClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
|
||||
{
|
||||
FIXME("Not implemented\n");
|
||||
return E_NOTIMPL;
|
||||
|
@ -92,5 +89,5 @@ static const IClassFactoryVtbl BITS_IClassFactory_Vtbl =
|
|||
|
||||
ClassFactoryImpl BITS_ClassFactory =
|
||||
{
|
||||
&BITS_IClassFactory_Vtbl
|
||||
{ &BITS_IClassFactory_Vtbl }
|
||||
};
|
||||
|
|
|
@ -90,7 +90,7 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
const IClassFactoryVtbl *lpVtbl;
|
||||
IClassFactory IClassFactory_iface;
|
||||
} ClassFactoryImpl;
|
||||
|
||||
extern HANDLE stop_event DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -95,9 +95,8 @@ StartCount(void)
|
|||
return FALSE;
|
||||
|
||||
hr = CoRegisterClassObject(&CLSID_BackgroundCopyManager,
|
||||
(IUnknown *) &BITS_ClassFactory,
|
||||
CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE,
|
||||
&dwReg);
|
||||
(IUnknown *) &BITS_ClassFactory.IClassFactory_iface,
|
||||
CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE, &dwReg);
|
||||
if (FAILED(hr))
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue