bits: Implemented BITS_IClassFactory_CreateInstance (15/27)
Roy Shea
roy at cs.hmc.edu
Fri Nov 16 18:18:55 CST 2007
---
dlls/qmgr/factory.c | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/dlls/qmgr/factory.c b/dlls/qmgr/factory.c
index b8146e0..a418105 100644
--- a/dlls/qmgr/factory.c
+++ b/dlls/qmgr/factory.c
@@ -101,8 +101,36 @@ static HRESULT WINAPI BITS_IClassFactory_CreateInstance(
REFIID riid,
LPVOID *ppvObj)
{
- FIXME("Not implemented\n");
- return E_NOTIMPL;
+ ICOM_THIS_MULTI(ClassFactoryImpl, lpVtbl, iface);
+ HRESULT res;
+ IUnknown *punk = NULL;
+
+ TRACE("IID: %s\n",debugstr_guid(riid));
+
+ if (This == NULL || ppvObj == NULL)
+ {
+ return E_POINTER;
+ }
+
+ if (pUnkOuter != NULL)
+ {
+ return CLASS_E_NOAGGREGATION;
+ }
+
+ res = BackgroundCopyManagerConstructor(pUnkOuter, (LPVOID*) &punk);
+ if (FAILED(res))
+ {
+ return res;
+ }
+
+ res = IBackgroundCopyManager_QueryInterface(punk, riid, ppvObj);
+ if (FAILED(res))
+ {
+ return res;
+ }
+
+ IBackgroundCopyManager_Release(punk);
+ return res;
}
static HRESULT WINAPI BITS_IClassFactory_LockServer(
--
1.5.3.1
More information about the wine-patches
mailing list