Commit 7eab62d3 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

qmgr/tests: Enable compilation with long types.

parent 9c02d53c
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = qmgr.dll
IMPORTS = uuid ole32 shlwapi user32
......
......@@ -135,7 +135,7 @@ static void test_GetCount(void)
ULONG fileCount;
hres = IEnumBackgroundCopyFiles_GetCount(test_enumFiles, &fileCount);
ok(hres == S_OK, "GetCount failed: %08x\n", hres);
ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
ok(fileCount == test_fileCount, "Got incorrect count\n");
}
......@@ -150,13 +150,13 @@ static void test_Next_walkListNull(void)
for (i = 0; i < test_fileCount; i++)
{
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, NULL);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
IBackgroundCopyFile_Release(file);
}
/* Attempt to fetch one more than the number of available files */
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, NULL);
ok(hres == S_FALSE, "Next off end of available files failed: %08x\n", hres);
ok(hres == S_FALSE, "Next off end of available files failed: %08lx\n", hres);
}
/* Test Next by requesting one file at a time */
......@@ -173,8 +173,8 @@ static void test_Next_walkList_1(void)
file = NULL;
fetched = 0;
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, &fetched);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(fetched == 1, "Next returned the incorrect number of files: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
ok(fetched == 1, "Next returned the incorrect number of files: %08lx\n", hres);
ok(file != NULL, "Next returned NULL\n");
if (file)
IBackgroundCopyFile_Release(file);
......@@ -183,8 +183,8 @@ static void test_Next_walkList_1(void)
/* Attempt to fetch one more than the number of available files */
fetched = 0;
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, &fetched);
ok(hres == S_FALSE, "Next off end of available files failed: %08x\n", hres);
ok(fetched == 0, "Next returned the incorrect number of files: %08x\n", hres);
ok(hres == S_FALSE, "Next off end of available files failed: %08lx\n", hres);
ok(fetched == 0, "Next returned the incorrect number of files: %08lx\n", hres);
}
/* Test Next by requesting multiple files at a time */
......@@ -200,8 +200,8 @@ static void test_Next_walkList_2(void)
fetched = 0;
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, test_fileCount, files, &fetched);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(fetched == test_fileCount, "Next returned the incorrect number of files: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
ok(fetched == test_fileCount, "Next returned the incorrect number of files: %08lx\n", hres);
for (i = 0; i < test_fileCount; i++)
{
......@@ -219,7 +219,7 @@ static void test_Next_errors(void)
/* E_INVALIDARG: pceltFetched can ONLY be NULL if celt is 1 */
hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 2, files, NULL);
ok(hres == E_INVALIDARG, "Invalid call to Next succeeded: %08x\n", hres);
ok(hres == E_INVALIDARG, "Invalid call to Next succeeded: %08lx\n", hres);
}
/* Test skipping through the files in a list */
......@@ -231,11 +231,11 @@ static void test_Skip_walkList(void)
for (i = 0; i < test_fileCount; i++)
{
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, 1);
ok(hres == S_OK, "Skip failed: %08x\n", hres);
ok(hres == S_OK, "Skip failed: %08lx\n", hres);
}
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, 1);
ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres);
ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres);
}
/* Test skipping off the end of the list */
......@@ -244,7 +244,7 @@ static void test_Skip_offEnd(void)
HRESULT hres;
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount + 1);
ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres);
ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres);
}
/* Test resetting the file enumerator */
......@@ -253,11 +253,11 @@ static void test_Reset(void)
HRESULT hres;
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount);
ok(hres == S_OK, "Skip failed: %08x\n", hres);
ok(hres == S_OK, "Skip failed: %08lx\n", hres);
hres = IEnumBackgroundCopyFiles_Reset(test_enumFiles);
ok(hres == S_OK, "Reset failed: %08x\n", hres);
ok(hres == S_OK, "Reset failed: %08lx\n", hres);
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount);
ok(hres == S_OK, "Reset failed: %08x\n", hres);
ok(hres == S_OK, "Reset failed: %08lx\n", hres);
}
typedef void (*test_t)(void);
......
......@@ -108,10 +108,10 @@ static void test_GetCount(void)
ULONG jobCountA, jobCountB;
hres = IEnumBackgroundCopyJobs_GetCount(test_enumJobsA, &jobCountA);
ok(hres == S_OK, "GetCount failed: %08x\n", hres);
ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
hres = IEnumBackgroundCopyJobs_GetCount(test_enumJobsB, &jobCountB);
ok(hres == S_OK, "GetCount failed: %08x\n", hres);
ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
ok(jobCountB == jobCountA + 1, "Got incorrect count\n");
}
......@@ -127,13 +127,13 @@ static void test_Next_walkListNull(void)
for (i = 0; i < test_jobCountB; i++)
{
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, NULL);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
IBackgroundCopyJob_Release(job);
}
/* Attempt to fetch one more than the number of available jobs */
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, NULL);
ok(hres == S_FALSE, "Next off end of available jobs failed: %08x\n", hres);
ok(hres == S_FALSE, "Next off end of available jobs failed: %08lx\n", hres);
}
/* Test Next */
......@@ -149,16 +149,16 @@ static void test_Next_walkList_1(void)
{
fetched = 0;
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, &fetched);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(fetched == 1, "Next returned the incorrect number of jobs: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
ok(fetched == 1, "Next returned the incorrect number of jobs: %08lx\n", hres);
IBackgroundCopyJob_Release(job);
}
/* Attempt to fetch one more than the number of available jobs */
fetched = 0;
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, &fetched);
ok(hres == S_FALSE, "Next off end of available jobs failed: %08x\n", hres);
ok(fetched == 0, "Next returned the incorrect number of jobs: %08x\n", hres);
ok(hres == S_FALSE, "Next off end of available jobs failed: %08lx\n", hres);
ok(fetched == 0, "Next returned the incorrect number of jobs: %08lx\n", hres);
}
/* Test Next by requesting multiple files at a time */
......@@ -175,8 +175,8 @@ static void test_Next_walkList_2(void)
fetched = 0;
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, test_jobCountB, jobs, &fetched);
ok(hres == S_OK, "Next failed: %08x\n", hres);
ok(fetched == test_jobCountB, "Next returned the incorrect number of jobs: %08x\n", hres);
ok(hres == S_OK, "Next failed: %08lx\n", hres);
ok(fetched == test_jobCountB, "Next returned the incorrect number of jobs: %08lx\n", hres);
for (i = 0; i < test_jobCountB; i++)
{
......@@ -196,7 +196,7 @@ static void test_Next_errors(void)
/* E_INVALIDARG: pceltFetched can ONLY be NULL if celt is 1 */
hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 2, jobs, NULL);
ok(hres != S_OK, "Invalid call to Next succeeded: %08x\n", hres);
ok(hres != S_OK, "Invalid call to Next succeeded: %08lx\n", hres);
}
/* Test skipping through the jobs in a list */
......@@ -208,11 +208,11 @@ static void test_Skip_walkList(void)
for (i = 0; i < test_jobCountB; i++)
{
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, 1);
ok(hres == S_OK, "Skip failed: %08x\n", hres);
ok(hres == S_OK, "Skip failed: %08lx\n", hres);
}
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, 1);
ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres);
ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres);
}
/* Test skipping off the end of the list */
......@@ -221,7 +221,7 @@ static void test_Skip_offEnd(void)
HRESULT hres;
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB + 1);
ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres);
ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres);
}
/* Test reset */
......@@ -230,13 +230,13 @@ static void test_Reset(void)
HRESULT hres;
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB);
ok(hres == S_OK, "Skip failed: %08x\n", hres);
ok(hres == S_OK, "Skip failed: %08lx\n", hres);
hres = IEnumBackgroundCopyJobs_Reset(test_enumJobsB);
ok(hres == S_OK, "Reset failed: %08x\n", hres);
ok(hres == S_OK, "Reset failed: %08lx\n", hres);
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB);
ok(hres == S_OK, "Reset failed: %08x\n", hres);
ok(hres == S_OK, "Reset failed: %08lx\n", hres);
}
typedef void (*test_t)(void);
......
......@@ -147,7 +147,7 @@ static void test_GetRemoteName(void)
LPWSTR name;
hres = IBackgroundCopyFile_GetRemoteName(test_file, &name);
ok(hres == S_OK, "GetRemoteName failed: %08x\n", hres);
ok(hres == S_OK, "GetRemoteName failed: %08lx\n", hres);
ok(lstrcmpW(name, test_remoteUrl) == 0, "Got incorrect remote name\n");
CoTaskMemFree(name);
}
......@@ -159,7 +159,7 @@ static void test_GetLocalName(void)
LPWSTR name;
hres = IBackgroundCopyFile_GetLocalName(test_file, &name);
ok(hres == S_OK, "GetLocalName failed: %08x\n", hres);
ok(hres == S_OK, "GetLocalName failed: %08lx\n", hres);
ok(lstrcmpW(name, test_localFile) == 0, "Got incorrect local name\n");
CoTaskMemFree(name);
}
......@@ -171,7 +171,7 @@ static void test_GetProgress_PreTransfer(void)
BG_FILE_PROGRESS progress;
hres = IBackgroundCopyFile_GetProgress(test_file, &progress);
ok(hres == S_OK, "GetProgress failed: %08x\n", hres);
ok(hres == S_OK, "GetProgress failed: %08lx\n", hres);
ok(progress.BytesTotal == BG_SIZE_UNKNOWN, "Got incorrect total size: %s\n",
wine_dbgstr_longlong(progress.BytesTotal));
ok(progress.BytesTransferred == 0, "Got incorrect number of transferred bytes: %s\n",
......
......@@ -80,7 +80,7 @@ static ULONG WINAPI IBackgroundCopyCallback2Impl_AddRef(IBackgroundCopyCallback2
IBackgroundCopyCallback2Impl *This = impl_from_IBackgroundCopyCallback2(iface);
ULONG ref = InterlockedIncrement(&This->ref);
trace("IBackgroundCopyCallback2Impl_AddRef called (%p, ref = %d)\n", This, ref);
trace("IBackgroundCopyCallback2Impl_AddRef called (%p, ref = %ld)\n", This, ref);
return ref;
}
......@@ -89,7 +89,7 @@ static ULONG WINAPI IBackgroundCopyCallback2Impl_Release(IBackgroundCopyCallback
IBackgroundCopyCallback2Impl *This = impl_from_IBackgroundCopyCallback2(iface);
ULONG ref = InterlockedDecrement(&This->ref);
trace("IBackgroundCopyCallback2Impl_Release called (%p, ref = %d)\n", This, ref);
trace("IBackgroundCopyCallback2Impl_Release called (%p, ref = %ld)\n", This, ref);
if (ref == 0)
{
......@@ -230,7 +230,7 @@ static BOOL setup(void)
workaround is only applied on Windows 10, so it's fine if this fails. */
if (SUCCEEDED(hres)) {
hres = IBackgroundCopyJob5_SetProperty(test_job_5, BITS_JOB_PROPERTY_ID_COST_FLAGS, prop_val);
ok(hres == S_OK, "Failed to set the cost flags: %08x\n", hres);
ok(hres == S_OK, "Failed to set the cost flags: %08lx\n", hres);
IBackgroundCopyJob5_Release(test_job_5);
}
......@@ -317,7 +317,7 @@ static void test_GetId(void)
GUID tmpId;
hres = IBackgroundCopyJob_GetId(test_job, &tmpId);
ok(hres == S_OK, "GetId failed: %08x\n", hres);
ok(hres == S_OK, "GetId failed: %08lx\n", hres);
ok(memcmp(&tmpId, &test_jobId, sizeof tmpId) == 0, "Got incorrect GUID\n");
}
......@@ -328,7 +328,7 @@ static void test_GetType(void)
BG_JOB_TYPE type;
hres = IBackgroundCopyJob_GetType(test_job, &type);
ok(hres == S_OK, "GetType failed: %08x\n", hres);
ok(hres == S_OK, "GetType failed: %08lx\n", hres);
ok(type == test_type, "Got incorrect type\n");
}
......@@ -339,7 +339,7 @@ static void test_GetName(void)
LPWSTR displayName;
hres = IBackgroundCopyJob_GetDisplayName(test_job, &displayName);
ok(hres == S_OK, "GetName failed: %08x\n", hres);
ok(hres == S_OK, "GetName failed: %08lx\n", hres);
ok(lstrcmpW(displayName, L"Test") == 0, "Got incorrect type\n");
CoTaskMemFree(displayName);
}
......@@ -351,11 +351,11 @@ static void test_AddFile(void)
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA,
test_localPathA);
ok(hres == S_OK, "First call to AddFile failed: 0x%08x\n", hres);
ok(hres == S_OK, "First call to AddFile failed: 0x%08lx\n", hres);
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathB,
test_localPathB);
ok(hres == S_OK, "Second call to AddFile failed: 0x%08x\n", hres);
ok(hres == S_OK, "Second call to AddFile failed: 0x%08lx\n", hres);
}
/* Test adding a set of files */
......@@ -368,7 +368,7 @@ static void test_AddFileSet(void)
{test_remotePathB, test_localPathB}
};
hres = IBackgroundCopyJob_AddFileSet(test_job, 2, files);
ok(hres == S_OK, "AddFileSet failed: 0x%08x\n", hres);
ok(hres == S_OK, "AddFileSet failed: 0x%08lx\n", hres);
}
/* Test creation of a job enumerator */
......@@ -380,13 +380,13 @@ static void test_EnumFiles(void)
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA,
test_localPathA);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_EnumFiles(test_job, &enumFiles);
ok(hres == S_OK, "EnumFiles failed: 0x%08x\n", hres);
ok(hres == S_OK, "EnumFiles failed: 0x%08lx\n", hres);
res = IEnumBackgroundCopyFiles_Release(enumFiles);
ok(res == 0, "Bad ref count on release: %u\n", res);
ok(res == 0, "Bad ref count on release: %lu\n", res);
}
/* Test getting job progress */
......@@ -396,14 +396,14 @@ static void test_GetProgress_preTransfer(void)
BG_JOB_PROGRESS progress;
hres = IBackgroundCopyJob_GetProgress(test_job, &progress);
ok(hres == S_OK, "GetProgress failed: 0x%08x\n", hres);
ok(hres == S_OK, "GetProgress failed: 0x%08lx\n", hres);
ok(progress.BytesTotal == 0, "Incorrect BytesTotal: %s\n",
wine_dbgstr_longlong(progress.BytesTotal));
ok(progress.BytesTransferred == 0, "Incorrect BytesTransferred: %s\n",
wine_dbgstr_longlong(progress.BytesTransferred));
ok(progress.FilesTotal == 0, "Incorrect FilesTotal: %u\n", progress.FilesTotal);
ok(progress.FilesTransferred == 0, "Incorrect FilesTransferred %u\n", progress.FilesTransferred);
ok(progress.FilesTotal == 0, "Incorrect FilesTotal: %lu\n", progress.FilesTotal);
ok(progress.FilesTransferred == 0, "Incorrect FilesTransferred %lu\n", progress.FilesTransferred);
}
/* Test getting job state */
......@@ -414,7 +414,7 @@ static void test_GetState(void)
state = BG_JOB_STATE_ERROR;
hres = IBackgroundCopyJob_GetState(test_job, &state);
ok(hres == S_OK, "GetState failed: 0x%08x\n", hres);
ok(hres == S_OK, "GetState failed: 0x%08lx\n", hres);
ok(state == BG_JOB_STATE_SUSPENDED, "Incorrect job state: %d\n", state);
}
......@@ -425,11 +425,11 @@ static void test_ResumeEmpty(void)
BG_JOB_STATE state;
hres = IBackgroundCopyJob_Resume(test_job);
ok(hres == BG_E_EMPTY, "Resume failed to return BG_E_EMPTY error: 0x%08x\n", hres);
ok(hres == BG_E_EMPTY, "Resume failed to return BG_E_EMPTY error: 0x%08lx\n", hres);
state = BG_JOB_STATE_ERROR;
hres = IBackgroundCopyJob_GetState(test_job, &state);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
ok(state == BG_JOB_STATE_SUSPENDED, "Incorrect job state: %d\n", state);
}
......@@ -486,26 +486,26 @@ static void handle_job_err(void)
if (SUCCEEDED(hres)) {
hres = IBackgroundCopyError_GetError(err, &errContext, &errCode);
if (SUCCEEDED(hres)) {
ok(0, "Got context: %d code: %d\n", errContext, errCode);
ok(0, "Got context: %d code: %ld\n", errContext, errCode);
} else {
ok(0, "Failed to get error info: 0x%08x\n", hres);
ok(0, "Failed to get error info: 0x%08lx\n", hres);
}
hres = IBackgroundCopyError_GetErrorContextDescription(err, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), &contextDesc);
if (SUCCEEDED(hres)) {
ok(0, "Got context desc: %s\n", wine_dbgstr_w(contextDesc));
} else {
ok(0, "Failed to get context desc: 0x%08x\n", hres);
ok(0, "Failed to get context desc: 0x%08lx\n", hres);
}
hres = IBackgroundCopyError_GetErrorDescription(err, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), &errDesc);
if (SUCCEEDED(hres)) {
ok(0, "Got error desc: %s\n", wine_dbgstr_w(errDesc));
} else {
ok(0, "Failed to get error desc: 0x%08x\n", hres);
ok(0, "Failed to get error desc: 0x%08lx\n", hres);
}
} else {
ok(0, "Failed to get error: 0x%08x\n", hres);
ok(0, "Failed to get error: 0x%08lx\n", hres);
}
}
......@@ -524,11 +524,11 @@ static void test_CompleteLocal(void)
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA,
test_localPathA);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathB,
test_localPathB);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_Resume(test_job);
ok(hres == S_OK, "IBackgroundCopyJob_Resume\n");
......@@ -603,10 +603,10 @@ static void test_CompleteLocalURL(void)
lstrcatW(urlB, test_remotePathB);
hres = IBackgroundCopyJob_AddFile(test_job, urlA, test_localPathA);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_AddFile(test_job, urlB, test_localPathB);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_Resume(test_job);
ok(hres == S_OK, "IBackgroundCopyJob_Resume\n");
......@@ -661,8 +661,8 @@ static void test_NotifyFlags(void)
/* check default flags */
flags = 0;
hr = IBackgroundCopyJob_GetNotifyFlags(test_job, &flags);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(flags == (BG_NOTIFY_JOB_ERROR | BG_NOTIFY_JOB_TRANSFERRED), "flags 0x%08x\n", flags);
ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(flags == (BG_NOTIFY_JOB_ERROR | BG_NOTIFY_JOB_TRANSFERRED), "flags 0x%08lx\n", flags);
}
static void test_NotifyInterface(void)
......@@ -672,7 +672,7 @@ static void test_NotifyInterface(void)
unk = (IUnknown*)0xdeadbeef;
hr = IBackgroundCopyJob_GetNotifyInterface(test_job, &unk);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(unk == NULL, "got %p\n", unk);
}
......@@ -683,19 +683,19 @@ static void test_Cancel(void)
state = BG_JOB_STATE_ERROR;
hr = IBackgroundCopyJob_GetState(test_job, &state);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(state != BG_JOB_STATE_CANCELLED, "got %u\n", state);
hr = IBackgroundCopyJob_Cancel(test_job);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
state = BG_JOB_STATE_ERROR;
hr = IBackgroundCopyJob_GetState(test_job, &state);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(state == BG_JOB_STATE_CANCELLED, "got %u\n", state);
hr = IBackgroundCopyJob_Cancel(test_job);
ok(hr == BG_E_INVALID_STATE, "got 0x%08x\n", hr);
ok(hr == BG_E_INVALID_STATE, "got 0x%08lx\n", hr);
}
static void test_HttpOptions(void)
......@@ -715,35 +715,35 @@ static void test_HttpOptions(void)
ok(create_background_copy_callback2(&copyCallback) == TRUE, "create_background_copy_callback2 failed\n");
hr = IBackgroundCopyCallback2_QueryInterface(copyCallback, &IID_IUnknown, (LPVOID*)&copyCallbackUnknown);
ok(hr == S_OK,"IBackgroundCopyCallback_QueryInterface(IID_IUnknown) failed: %08x\n", hr);
ok(hr == S_OK,"IBackgroundCopyCallback_QueryInterface(IID_IUnknown) failed: %08lx\n", hr);
hr = IBackgroundCopyJob_SetNotifyInterface(test_job, copyCallbackUnknown);
ok(hr == S_OK,"IBackgroundCopyCallback_SetNotifyInterface failed: %08x\n", hr);
ok(hr == S_OK,"IBackgroundCopyCallback_SetNotifyInterface failed: %08lx\n", hr);
hr = IBackgroundCopyJob_SetNotifyFlags(test_job, BG_NOTIFY_JOB_TRANSFERRED | BG_NOTIFY_JOB_ERROR | BG_NOTIFY_DISABLE | BG_NOTIFY_JOB_MODIFICATION | BG_NOTIFY_FILE_TRANSFERRED);
ok(hr == S_OK,"IBackgroundCopyCallback_SetNotifyFlags failed: %08x\n", hr);
ok(hr == S_OK,"IBackgroundCopyCallback_SetNotifyFlags failed: %08lx\n", hr);
DeleteFileW(test_localPathA);
hr = IBackgroundCopyJob_AddFile(test_job, L"http://test.winehq.org/", test_localPathA);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IBackgroundCopyJob_QueryInterface(test_job, &IID_IBackgroundCopyJobHttpOptions, (void **)&options);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
if (options)
{
headers = (WCHAR *)0xdeadbeef;
hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers);
ok(hr == S_FALSE, "got 0x%08x\n", hr);
ok(hr == S_FALSE, "got 0x%08lx\n", hr);
ok(headers == NULL, "got %p\n", headers);
hr = IBackgroundCopyJobHttpOptions_SetCustomHeaders(options, winetestW);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
headers = (WCHAR *)0xdeadbeef;
hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
if (hr == S_OK)
{
ok(!lstrcmpW(headers, winetestW), "got %s\n", wine_dbgstr_w(headers));
......@@ -751,34 +751,34 @@ static void test_HttpOptions(void)
}
hr = IBackgroundCopyJobHttpOptions_SetCustomHeaders(options, NULL);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
headers = (WCHAR *)0xdeadbeef;
hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers);
ok(hr == S_FALSE, "got 0x%08x\n", hr);
ok(hr == S_FALSE, "got 0x%08lx\n", hr);
ok(headers == NULL, "got %p\n", headers);
orig_flags = 0xdeadbeef;
hr = IBackgroundCopyJobHttpOptions_GetSecurityFlags(options, &orig_flags);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(!orig_flags, "got 0x%08x\n", orig_flags);
ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(!orig_flags, "got 0x%08lx\n", orig_flags);
hr = IBackgroundCopyJobHttpOptions_SetSecurityFlags(options, 0);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
flags = 0xdeadbeef;
hr = IBackgroundCopyJobHttpOptions_GetSecurityFlags(options, &flags);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(!flags, "got 0x%08x\n", flags);
ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(!flags, "got 0x%08lx\n", flags);
}
hr = IBackgroundCopyJob_Resume(test_job);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
for (i = 0; i < timeout; i++)
{
hr = IBackgroundCopyJob_GetState(test_job, &state);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(state == BG_JOB_STATE_QUEUED ||
state == BG_JOB_STATE_CONNECTING ||
......@@ -803,47 +803,47 @@ static void test_HttpOptions(void)
if (i < timeout)
{
hr = IBackgroundCopyJob_GetError(test_job, &error);
ok(hr == BG_E_ERROR_INFORMATION_UNAVAILABLE, "got 0x%08x\n", hr);
ok(hr == BG_E_ERROR_INFORMATION_UNAVAILABLE, "got 0x%08lx\n", hr);
}
if (options)
{
headers = (WCHAR *)0xdeadbeef;
hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers);
ok(hr == S_FALSE, "got 0x%08x\n", hr);
ok(hr == S_FALSE, "got 0x%08lx\n", hr);
ok(headers == NULL, "got %p\n", headers);
hr = IBackgroundCopyJobHttpOptions_SetCustomHeaders(options, NULL);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers);
ok(hr == S_FALSE, "got 0x%08x\n", hr);
ok(hr == S_FALSE, "got 0x%08lx\n", hr);
flags = 0xdeadbeef;
hr = IBackgroundCopyJobHttpOptions_GetSecurityFlags(options, &flags);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(!flags, "got 0x%08x\n", flags);
ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(!flags, "got 0x%08lx\n", flags);
hr = IBackgroundCopyJobHttpOptions_SetSecurityFlags(options, orig_flags);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
IBackgroundCopyJobHttpOptions_Release(options);
}
hr = IBackgroundCopyJob_Complete(test_job);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IBackgroundCopyJob_GetState(test_job, &state);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(state == BG_JOB_STATE_ACKNOWLEDGED, "unexpected state: %u\n", state);
hr = IBackgroundCopyJob_Complete(test_job);
ok(hr == BG_E_INVALID_STATE, "got 0x%08x\n", hr);
ok(hr == BG_E_INVALID_STATE, "got 0x%08lx\n", hr);
DeleteFileW(test_localPathA);
hr = IBackgroundCopyJob_SetNotifyInterface(test_job, NULL);
ok(hr == BG_E_INVALID_STATE, "got 0x%08x\n", hr);
ok(hr == BG_E_INVALID_STATE, "got 0x%08lx\n", hr);
IUnknown_Release(copyCallbackUnknown);
IBackgroundCopyCallback2_Release(copyCallback);
......@@ -888,7 +888,7 @@ START_TEST(job)
*/
hres = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
if (FAILED(hres)) {
ok(0, "CoInitializeEx failed: %0x\n", hres);
ok(0, "CoInitializeEx failed: %0lx\n", hres);
return;
}
......@@ -897,7 +897,7 @@ START_TEST(job)
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL, EOAC_NONE, 0);
if (FAILED(hres)) {
ok(0, "CoInitializeSecurity failed: %0x\n", hres);
ok(0, "CoInitializeSecurity failed: %0lx\n", hres);
return;
}
......
......@@ -60,14 +60,14 @@ static void test_CreateJob(void)
hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL,
CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager,
(void **) &manager);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
/* Create bits job */
hres = IBackgroundCopyManager_CreateJob(manager, L"Test", BG_JOB_TYPE_DOWNLOAD, &tmpId, &job);
ok(hres == S_OK, "CreateJob failed: %08x\n", hres);
ok(hres == S_OK, "CreateJob failed: %08lx\n", hres);
res = IBackgroundCopyJob_Release(job);
ok(res == 0, "Bad ref count on release: %u\n", res);
ok(res == 0, "Bad ref count on release: %lu\n", res);
IBackgroundCopyManager_Release(manager);
}
......@@ -84,13 +84,13 @@ static void test_EnumJobs(void)
hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL,
CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager,
(void **) &manager);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyManager_CreateJob(manager, L"Test", BG_JOB_TYPE_DOWNLOAD, &tmpId, &job);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyManager_EnumJobs(manager, 0, &enumJobs);
ok(hres == S_OK, "EnumJobs failed: %08x\n", hres);
ok(hres == S_OK, "EnumJobs failed: %08lx\n", hres);
IEnumBackgroundCopyJobs_Release(enumJobs);
/* Tear down */
......@@ -124,7 +124,7 @@ static void do_child(const char *secretA)
hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL,
CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager,
(void **) &manager);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
MultiByteToWideChar(CP_ACP, 0, secretA, -1, secretW, MAX_PATH);
hres = IBackgroundCopyManager_CreateJob(manager, secretW,
......@@ -143,13 +143,13 @@ static void test_globalness(void)
hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL,
CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager,
(void **) &manager);
ok(hres == S_OK, "got 0x%08x\n", hres);
ok(hres == S_OK, "got 0x%08lx\n", hres);
wsprintfW(secretName, L"test_%u", GetTickCount());
run_child(secretName);
hres = IBackgroundCopyManager_EnumJobs(manager, 0, &enumJobs);
ok(hres == S_OK, "EnumJobs failed: %08x\n", hres);
ok(hres == S_OK, "EnumJobs failed: %08lx\n", hres);
if(hres != S_OK)
skip("Unable to create job enumerator.\n");
else
......@@ -159,7 +159,7 @@ static void test_globalness(void)
BOOL found = FALSE;
hres = IEnumBackgroundCopyJobs_GetCount(enumJobs, &n);
ok(hres == S_OK, "GetCount failed: %08x\n", hres);
ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
for (i = 0; i < n && !found; ++i)
{
LPWSTR name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment