[PATCH] bits: Implemented BITS_IBackgroundCopyManager_QueryInterface (10/12)
Roy Shea
roy at cs.hmc.edu
Thu Nov 15 10:24:24 CST 2007
---
dlls/qmgr/factory.c | 2 +-
dlls/qmgr/qmgr.c | 18 ++++++++++++++++--
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/dlls/qmgr/factory.c b/dlls/qmgr/factory.c
index f70fdef..609b869 100644
--- a/dlls/qmgr/factory.c
+++ b/dlls/qmgr/factory.c
@@ -69,7 +69,7 @@ static HRESULT WINAPI BITS_IClassFactory_QueryInterface(
if (IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IClassFactory))
{
- *ppvObj = (LPVOID)iface;
+ *ppvObj = &This->classFactoryVtbl;
BITS_IClassFactory_AddRef(iface);
return S_OK;
}
diff --git a/dlls/qmgr/qmgr.c b/dlls/qmgr/qmgr.c
index a42479b..2b4400e 100644
--- a/dlls/qmgr/qmgr.c
+++ b/dlls/qmgr/qmgr.c
@@ -39,8 +39,22 @@ static HRESULT WINAPI BITS_IBackgroundCopyManager_QueryInterface(
REFIID riid,
LPVOID *ppvObject)
{
- FIXME("Not implemented\n");
- return E_NOTIMPL;
+ ICOM_THIS_MULTI(BackgroundCopyManagerImpl, bitsVtbl, iface);
+ TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
+
+ if (This == NULL || ppvObject == NULL)
+ {
+ return E_POINTER;
+ }
+
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
+ IsEqualGUID(riid, &IID_IBackgroundCopyManager)) {
+ *ppvObject = &This->bitsVtbl;
+ BITS_IBackgroundCopyManager_AddRef(iface);
+ return S_OK;
+ }
+
+ return E_NOINTERFACE;
}
/* Release an interface to iface */
--
1.5.3.1
More information about the wine-patches
mailing list