bits: Implemented BITS_IBackgroundCopyManager_CreateJob (24/27)
Roy Shea
roy at cs.hmc.edu
Fri Nov 16 18:21:03 CST 2007
---
dlls/qmgr/qmgr.c | 19 +++++++++++++++++--
dlls/qmgr/tests/qmgr.c | 15 +++++++++++++++
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/dlls/qmgr/qmgr.c b/dlls/qmgr/qmgr.c
index d0b7de2..75348a9 100644
--- a/dlls/qmgr/qmgr.c
+++ b/dlls/qmgr/qmgr.c
@@ -104,8 +104,23 @@ static HRESULT WINAPI BITS_IBackgroundCopyManager_CreateJob(
GUID *pJobId,
IBackgroundCopyJob **ppJob)
{
- FIXME("Not implemented\n");
- return E_NOTIMPL;
+ HRESULT res;
+
+ TRACE("\n");
+
+ if (!pJobId || !ppJob)
+ {
+ return E_POINTER;
+ }
+
+ res = BackgroundCopyJobConstructor(DisplayName, Type, pJobId, (LPVOID*) ppJob);
+ if (res != S_OK)
+ {
+ return res;
+ }
+
+ TRACE("Success\n");
+ return S_OK;
}
static HRESULT WINAPI BITS_IBackgroundCopyManager_GetJob(
diff --git a/dlls/qmgr/tests/qmgr.c b/dlls/qmgr/tests/qmgr.c
index 64c8e08..dec353e 100644
--- a/dlls/qmgr/tests/qmgr.c
+++ b/dlls/qmgr/tests/qmgr.c
@@ -30,6 +30,12 @@ static void test_CreateInstance(void)
HRESULT hres;
IBackgroundCopyManager* manager = NULL;
+ /* Job information */
+ static const WCHAR copyNameW[] = {'T', 'e', 's', 't', 0};
+ IBackgroundCopyJob* job = NULL;
+ GUID tmpId;
+
+ /* Creating BITS instance */
hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL,
CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager,
(void **) &manager);
@@ -40,6 +46,15 @@ static void test_CreateInstance(void)
return;
}
+ /* Creating bits job */
+ hres = IBackgroundCopyManager_CreateJob(manager, copyNameW,
+ BG_JOB_TYPE_DOWNLOAD, &tmpId, &job);
+ ok(hres == S_OK, "CreateJob failed: %08x\n", hres);
+ if(hres != S_OK)
+ {
+ skip("Unable to create bits job.\n");
+ return;
+ }
}
START_TEST(qmgr)
--
1.5.3.1
More information about the wine-patches
mailing list