Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/schedsvc/tests/Makefile.in | 1 dlls/schedsvc/tests/atsvcapi.c | 44 ++++---- dlls/schedsvc/tests/rpcapi.c | 210 ++++++++++++++++++++------------------- 3 files changed, 127 insertions(+), 128 deletions(-)
diff --git a/dlls/schedsvc/tests/Makefile.in b/dlls/schedsvc/tests/Makefile.in index 8f328a94a82..b8e7448bb76 100644 --- a/dlls/schedsvc/tests/Makefile.in +++ b/dlls/schedsvc/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = schedsvc.dll IMPORTS = rpcrt4 ole32
diff --git a/dlls/schedsvc/tests/atsvcapi.c b/dlls/schedsvc/tests/atsvcapi.c index 5f5ca06627a..3aaad8b5cfe 100644 --- a/dlls/schedsvc/tests/atsvcapi.c +++ b/dlls/schedsvc/tests/atsvcapi.c @@ -38,11 +38,11 @@ static int test_failures, test_skipped; static LONG CALLBACK rpc_exception_filter(EXCEPTION_POINTERS *ptrs) { if (test_skipped) - skip("Can't connect to ATSvc service: %#x\n", ptrs->ExceptionRecord->ExceptionCode); + skip("Can't connect to ATSvc service: %#lx\n", ptrs->ExceptionRecord->ExceptionCode);
if (winetest_debug) { - fprintf(stdout, "%04x:atsvcapi: 1 tests executed (0 marked as todo, %d %s), %d skipped.\n", + fprintf(stdout, "%04lx:atsvcapi: 1 tests executed (0 marked as todo, %d %s), %d skipped.\n", GetCurrentProcessId(), test_failures, test_failures != 1 ? "failures" : "failure", test_skipped); fflush(stdout); } @@ -65,14 +65,14 @@ START_TEST(atsvcapi) total = MAX_COMPUTERNAME_LENGTH + 1; SetLastError(0xdeadbeef); ret = GetComputerNameW(server_name, &total); - ok(ret, "GetComputerName error %u\n", GetLastError()); + ok(ret, "GetComputerName error %lu\n", GetLastError());
hr = RpcStringBindingComposeA(NULL, ncalrpc, NULL, NULL, NULL, &binding_str); - ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#lx\n", hr); hr = RpcBindingFromStringBindingA(binding_str, &atsvc_handle); - ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#lx\n", hr); hr = RpcStringFreeA(&binding_str); - ok(hr == RPC_S_OK, "RpcStringFree error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringFree error %#lx\n", hr);
/* widl generated RpcTryExcept/RpcExcept can't catch raised exceptions */ old_exception_filter = SetUnhandledExceptionFilter(rpc_exception_filter); @@ -91,7 +91,7 @@ START_TEST(atsvcapi) win_skip("NetrJobAdd: Access denied, skipping the tests\n"); goto skip_tests; } - ok(ret == ERROR_SUCCESS || broken(ret == ERROR_NOT_SUPPORTED) /* Win8+ */, "NetrJobAdd error %u\n", ret); + ok(ret == ERROR_SUCCESS || broken(ret == ERROR_NOT_SUPPORTED) /* Win8+ */, "NetrJobAdd error %lu\n", ret); if (ret == ERROR_NOT_SUPPORTED) { /* FIXME: use win_skip() when todo_wine above is removed */ @@ -106,10 +106,10 @@ START_TEST(atsvcapi)
info2 = NULL; ret = NetrJobGetInfo(server_name, 0xdeadbeef, &info2); - ok(ret == APE_AT_ID_NOT_FOUND || broken(1) /* vista and w2008 return rubbish here */, "wrong error %u\n", ret); + ok(ret == APE_AT_ID_NOT_FOUND || broken(1) /* vista and w2008 return rubbish here */, "wrong error %lu\n", ret);
ret = NetrJobDel(server_name, 0xdeadbeef, 0xdeadbeef); - ok(ret == APE_AT_ID_NOT_FOUND, "wrong error %u\n", ret); + ok(ret == APE_AT_ID_NOT_FOUND, "wrong error %lu\n", ret);
try_count = 5;
@@ -124,31 +124,31 @@ START_TEST(atsvcapi) win_skip("NetrJobEnum: Access denied, skipping the tests\n"); goto skip_tests_delete; } - ok(ret == ERROR_SUCCESS, "NetrJobEnum error %u (%#x)\n", ret, ret); - ok(total != 0, "total %u\n", total); - ok(start_index == 0, "start_index %u\n", start_index); + ok(ret == ERROR_SUCCESS, "NetrJobEnum error %lu (%#lx)\n", ret, ret); + ok(total != 0, "total %lu\n", total); + ok(start_index == 0, "start_index %lu\n", start_index); ok(container.Buffer != NULL, "Buffer %p\n", container.Buffer); - ok(container.EntriesRead != 0, "EntriesRead %u\n", container.EntriesRead); + ok(container.EntriesRead != 0, "EntriesRead %lu\n", container.EntriesRead);
found = FALSE;
for (i = 0; i < container.EntriesRead; i++) { - trace("%u: jobid %u, command %s\n", i, container.Buffer[i].JobId, wine_dbgstr_w(container.Buffer[i].Command)); + trace("%lu: jobid %lu, command %s\n", i, container.Buffer[i].JobId, wine_dbgstr_w(container.Buffer[i].Command));
if (container.Buffer[i].JobId == jobid || !lstrcmpW(container.Buffer[i].Command, task1W)) { found = TRUE; - trace("found %u: jobid %u, command %s\n", i, container.Buffer[i].JobId, wine_dbgstr_w(container.Buffer[i].Command)); + trace("found %lu: jobid %lu, command %s\n", i, container.Buffer[i].JobId, wine_dbgstr_w(container.Buffer[i].Command)); }
info2 = NULL; ret = NetrJobGetInfo(server_name, container.Buffer[i].JobId, &info2); - ok(ret == ERROR_SUCCESS, "NetrJobGetInfo error %u\n", ret); + ok(ret == ERROR_SUCCESS, "NetrJobGetInfo error %lu\n", ret);
ok(container.Buffer[i].JobTime == info2->JobTime, "%u != %u\n", (UINT)container.Buffer[i].JobTime, (UINT)info2->JobTime); - ok(container.Buffer[i].DaysOfMonth == info2->DaysOfMonth, "%u != %u\n", container.Buffer[i].DaysOfMonth, info2->DaysOfMonth); + ok(container.Buffer[i].DaysOfMonth == info2->DaysOfMonth, "%lu != %lu\n", container.Buffer[i].DaysOfMonth, info2->DaysOfMonth); ok(container.Buffer[i].DaysOfWeek == info2->DaysOfWeek, "%u != %u\n", container.Buffer[i].DaysOfWeek, info2->DaysOfWeek); ok(container.Buffer[i].Flags == info2->Flags, "%#x != %#x\n", container.Buffer[i].Flags, info2->Flags); ok(!lstrcmpW(container.Buffer[i].Command, info2->Command), "%s != %s\n", wine_dbgstr_w(container.Buffer[i].Command), wine_dbgstr_w(info2->Command)); @@ -164,17 +164,17 @@ START_TEST(atsvcapi)
MIDL_user_free(container.Buffer);
- ok(found, "just added jobid %u should be found\n", jobid); + ok(found, "just added jobid %lu should be found\n", jobid);
skip_tests_delete: ret = NetrJobDel(server_name, jobid, jobid); - ok(ret == ERROR_SUCCESS, "NetrJobDel error %u\n", ret); + ok(ret == ERROR_SUCCESS, "NetrJobDel error %lu\n", ret);
skip_tests: SetUnhandledExceptionFilter(old_exception_filter);
hr = RpcBindingFree(&atsvc_handle); - ok(hr == RPC_S_OK, "RpcBindingFree error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFree error %#lx\n", hr); }
DECLSPEC_HIDDEN handle_t __RPC_USER ATSVC_HANDLE_bind(ATSVC_HANDLE str) @@ -185,10 +185,10 @@ DECLSPEC_HIDDEN handle_t __RPC_USER ATSVC_HANDLE_bind(ATSVC_HANDLE str) HRESULT hr;
hr = RpcStringBindingComposeA(NULL, ncalrpc, NULL, NULL, NULL, &binding_str); - ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#lx\n", hr);
hr = RpcBindingFromStringBindingA(binding_str, &rpc_handle); - ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#lx\n", hr);
RpcStringFreeA(&binding_str); return rpc_handle; diff --git a/dlls/schedsvc/tests/rpcapi.c b/dlls/schedsvc/tests/rpcapi.c index 09523df4fd6..56e3f836a17 100644 --- a/dlls/schedsvc/tests/rpcapi.c +++ b/dlls/schedsvc/tests/rpcapi.c @@ -29,11 +29,11 @@ extern handle_t schrpc_handle;
static LONG CALLBACK rpc_exception_filter(EXCEPTION_POINTERS *ptrs) { - skip("Can't connect to Scheduler service: %#x\n", ptrs->ExceptionRecord->ExceptionCode); + skip("Can't connect to Scheduler service: %#lx\n", ptrs->ExceptionRecord->ExceptionCode);
if (winetest_debug) { - fprintf(stdout, "%04x:rpcapi: 0 tests executed (0 marked as todo, 0 failures), 1 skipped.\n", GetCurrentProcessId()); + fprintf(stdout, "%04lx:rpcapi: 0 tests executed (0 marked as todo, 0 failures), 1 skipped.\n", GetCurrentProcessId()); fflush(stdout); } ExitProcess(0); @@ -89,69 +89,69 @@ START_TEST(rpcapi) IID iid;
hr = RpcStringBindingComposeA(NULL, ncalrpc, NULL, NULL, NULL, &binding_str); - ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#lx\n", hr); hr = RpcBindingFromStringBindingA(binding_str, &schrpc_handle); - ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#lx\n", hr); hr = RpcStringFreeA(&binding_str); - ok(hr == RPC_S_OK, "RpcStringFree error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringFree error %#lx\n", hr);
/* widl generated RpcTryExcept/RpcExcept can't catch raised exceptions */ old_exception_filter = SetUnhandledExceptionFilter(rpc_exception_filter);
version = 0; hr = SchRpcHighestVersion(&version); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(version == 0x10002 /* vista */ || version == 0x10003 /* win7 */ || version == 0x10004 /* win8 */ || version == 0x10005 /* win10 */ || version == 0x10006 /* win10 1709 */, - "wrong version %#x\n", version); + "wrong version %#lx\n", version);
SetUnhandledExceptionFilter(old_exception_filter);
hr = SchRpcCreateFolder(L"\Wine\Folder1", NULL, 1); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
hr = SchRpcCreateFolder(L"\Wine\Folder1", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcCreateFolder(L"\Wine\Folder1", NULL, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr);
hr = SchRpcCreateFolder(L"Wine\Folder2", L"", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcDelete(L"Wine", 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_DIR_NOT_EMPTY), "expected ERROR_DIR_NOT_EMPTY, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_DIR_NOT_EMPTY), "expected ERROR_DIR_NOT_EMPTY, got %#lx\n", hr);
hr = SchRpcDelete(L"Wine\Folder1", 1); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
hr = SchRpcDelete(L"Wine\Folder1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcDelete(L"\Wine\Folder2", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcDelete(L"\Wine", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcDelete(L"\Wine", 0); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || broken(hr == S_OK), /* Early versions of Win 10 */ - "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); + "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr);
hr = SchRpcDelete(L"", 0); - ok(hr == E_ACCESSDENIED /* win7 */ || hr == E_INVALIDARG /* vista */, "expected E_ACCESSDENIED, got %#x\n", hr); + ok(hr == E_ACCESSDENIED /* win7 */ || hr == E_INVALIDARG /* vista */, "expected E_ACCESSDENIED, got %#lx\n", hr);
hr = SchRpcCreateFolder(L"\Wine", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, ARRAY_SIZE(xmlW));
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine", xmlW, TASK_VALIDATE_ONLY, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!path, "expected NULL, path %p\n", path); ok(!info, "expected NULL, info %p\n", info);
@@ -161,12 +161,12 @@ START_TEST(rpcapi) info = NULL; hr = SchRpcRegisterTask(L"\Wine\Task1", xmlW, create_new_task[i].flags, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == create_new_task[i].hr, "%u: expected %#x, got %#x\n", i, create_new_task[i].hr, hr); + ok(hr == create_new_task[i].hr, "%lu: expected %#lx, got %#lx\n", i, create_new_task[i].hr, hr);
if (hr == S_OK) { hr = SchRpcDelete(L"\Wine\Task1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!info, "expected NULL, info %p\n", info); MIDL_user_free(path); } @@ -175,21 +175,21 @@ START_TEST(rpcapi) path = NULL; info = NULL; hr = SchRpcRegisterTask(L"\Wine\Task1", xmlW, TASK_VALIDATE_ONLY, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!path, "expected NULL, path %p\n", path); ok(!info, "expected NULL, info %p\n", info);
path = NULL; info = NULL; hr = SchRpcRegisterTask(NULL, xmlW, TASK_VALIDATE_ONLY, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!path, "expected NULL, path %p\n", path); ok(!info, "expected NULL, info %p\n", info);
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine\Folder1\Task1", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!lstrcmpW(path, L"\Wine\Folder1\Task1") /* win7 */ || !lstrcmpW(path, L"Wine\Folder1\Task1") /* vista */, "expected \Wine\Folder1\Task1, task actual path %s\n", wine_dbgstr_w(path)); ok(!info, "expected NULL, info %p\n", info); @@ -201,7 +201,7 @@ START_TEST(rpcapi) info = NULL; hr = SchRpcRegisterTask(L"Wine\Folder1\Task1", xmlW, open_existing_task[i].flags, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == open_existing_task[i].hr, "%u: expected %#x, got %#x\n", i, open_existing_task[i].hr, hr); + ok(hr == open_existing_task[i].hr, "%lu: expected %#lx, got %#lx\n", i, open_existing_task[i].hr, hr); if (hr == S_OK) { ok(!lstrcmpW(path, L"\Wine\Folder1\Task1") /* win7 */ || @@ -210,64 +210,64 @@ START_TEST(rpcapi) MIDL_user_free(path); } else - ok(!path, "%u: expected NULL, path %p\n", i, path); - ok(!info, "%u: expected NULL, info %p\n", i, info); + ok(!path, "%lu: expected NULL, path %p\n", i, path); + ok(!info, "%lu: expected NULL, info %p\n", i, info); }
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine\Folder1\Task1", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr); ok(!path, "expected NULL, path %p\n", path); ok(!info, "expected NULL, info %p\n", info);
count = 0; xml = NULL; hr = SchRpcRetrieveTask(L"\Wine\Folder1\Task1", L"", &count, &xml); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); if (hr == S_OK) trace("%s\n", wine_dbgstr_w(xml)); MIDL_user_free(xml);
hr = SchRpcDelete(L"Wine\Folder1\Task1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"Wine\Folder1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"Wine", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", TASK_ENUM_HIDDEN, &start_index, 0, &count, &names); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); - ok(!count, "expected 0, got %u\n", count); - ok(!start_index, "expected 0, got %u\n", start_index); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr); + ok(!count, "expected 0, got %lu\n", count); + ok(!start_index, "expected 0, got %lu\n", start_index); ok(!names, "expected NULL, got %p\n", names);
hr = SchRpcCreateFolder(L"\Wine", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 0, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(!count, "expected 0, got %u\n", count); - ok(!start_index, "expected 0, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(!count, "expected 0, got %lu\n", count); + ok(!start_index, "expected 0, got %lu\n", start_index); ok(!names, "expected NULL, got %p\n", names);
hr = SchRpcCreateFolder(L"\Wine\Folder1", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcCreateFolder(L"\Wine\Folder2", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 0, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -279,15 +279,15 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 1, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 1, "expected 1, got %u\n", count); - ok(start_index == 1, "expected 1, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 1, "expected 1, got %lu\n", count); + ok(start_index == 1, "expected 1, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); ok(!lstrcmpW(names[0], L"Folder1") || !lstrcmpW(names[0], L"Folder2"), "got %s\n", wine_dbgstr_w(names[0])); MIDL_user_free(names[0]); @@ -297,9 +297,9 @@ START_TEST(rpcapi) count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 2, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -311,15 +311,15 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 10, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -331,35 +331,35 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 10; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 0, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(!count, "expected 0, got %u\n", count); - ok(start_index == 10, "expected 10, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(!count, "expected 0, got %lu\n", count); + ok(start_index == 10, "expected 10, got %lu\n", start_index); ok(!names, "expected NULL, got %p\n", names);
hr = SchRpcDelete(L"Wine\Folder1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"\Wine\Folder2", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine\Folder1", TASK_ENUM_HIDDEN, &start_index, 0, &count, &names); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); - ok(!count, "expected 0, got %u\n", count); - ok(!start_index, "expected 0, got %u\n", start_index); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr); + ok(!count, "expected 0, got %lu\n", count); + ok(!start_index, "expected 0, got %lu\n", start_index); ok(!names, "expected NULL, got %p\n", names);
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine\Task1", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!lstrcmpW(path, L"\Wine\Task1") /* win7 */ || !lstrcmpW(path, L"Wine\Task1") /* vista */, "expected \Wine\Task1, task actual path %s\n", wine_dbgstr_w(path)); ok(!info, "expected NULL, info %p\n", info); @@ -368,7 +368,7 @@ START_TEST(rpcapi) path = NULL; info = NULL; hr = SchRpcRegisterTask(L"\Wine\Task2", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!lstrcmpW(path, L"\Wine\Task2"), "expected \Wine\Task2, task actual path %s\n", wine_dbgstr_w(path)); ok(!info, "expected NULL, info %p\n", info); MIDL_user_free(path); @@ -377,9 +377,9 @@ START_TEST(rpcapi) count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine", 0, &start_index, 0, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -391,15 +391,15 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine", 0, &start_index, 1, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 1, "expected 1, got %u\n", count); - ok(start_index == 1, "expected 1, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 1, "expected 1, got %lu\n", count); + ok(start_index == 1, "expected 1, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); /* returned name depends whether directory randomization is on */ ok(!lstrcmpW(names[0], L"Task1") || !lstrcmpW(names[0], L"Task2"), @@ -411,9 +411,9 @@ START_TEST(rpcapi) count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine", 0, &start_index, 2, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -425,15 +425,15 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine", 0, &start_index, 10, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -445,12 +445,12 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine\Task3", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!lstrcmpW(path, L"\Wine\Task3") /* win7 */ || !lstrcmpW(path, L"Wine\Task3") /* vista */, "expected \Wine\Task3, task actual path %s\n", wine_dbgstr_w(path)); ok(!info, "expected NULL, info %p\n", info); @@ -459,9 +459,9 @@ START_TEST(rpcapi) count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"Wine", 0, &start_index, 10, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 1, "expected 1, got %u\n", count); - ok(start_index == 3, "expected 3, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 1, "expected 1, got %lu\n", count); + ok(start_index == 3, "expected 3, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); /* returned name depends whether directory randomization is on */ ok(!lstrcmpW(names[0], L"Task1") || !lstrcmpW(names[0], L"Task2") || !lstrcmpW(names[0], L"Task3"), @@ -478,45 +478,45 @@ START_TEST(rpcapi) }
hr = SchRpcGetTaskInfo(L"Task1", 0, &enabled, &state); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr);
enabled = state = 0xdeadbeef; hr = SchRpcGetTaskInfo(L"\Wine\Task1", 0, &enabled, &state); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(enabled == 0, "expected 0, got %u\n", enabled); - ok(state == TASK_STATE_UNKNOWN, "expected TASK_STATE_UNKNOWN, got %u\n", state); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(enabled == 0, "expected 0, got %lu\n", enabled); + ok(state == TASK_STATE_UNKNOWN, "expected TASK_STATE_UNKNOWN, got %lu\n", state);
enabled = state = 0xdeadbeef; hr = SchRpcGetTaskInfo(L"\Wine\Task1", SCH_FLAG_STATE, &enabled, &state); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(enabled == 0, "expected 0, got %u\n", enabled); - ok(state == TASK_STATE_DISABLED, "expected TASK_STATE_DISABLED, got %u\n", state); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(enabled == 0, "expected 0, got %lu\n", enabled); + ok(state == TASK_STATE_DISABLED, "expected TASK_STATE_DISABLED, got %lu\n", state);
hr = SchRpcEnableTask(L"\Wine\Task1", 0xdeadbeef); todo_wine - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
enabled = state = 0xdeadbeef; hr = SchRpcGetTaskInfo(L"\Wine\Task1", SCH_FLAG_STATE, &enabled, &state); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); todo_wine - ok(enabled == 1, "expected 1, got %u\n", enabled); + ok(enabled == 1, "expected 1, got %lu\n", enabled); todo_wine - ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %u\n", state); + ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %lu\n", state);
hr = SchRpcDelete(L"Wine\Task1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"Wine\Task2", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"Wine\Task3", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"\Wine", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
path = NULL; info = NULL; hr = SchRpcRegisterTask(NULL, xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK || hr == E_ACCESSDENIED, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK || hr == E_ACCESSDENIED, "expected S_OK, got %#lx\n", hr); if (hr != E_ACCESSDENIED) { ok(!info, "expected NULL, info %p\n", info); @@ -524,14 +524,14 @@ START_TEST(rpcapi) hr = IIDFromString(path + 1, &iid); else hr = IIDFromString(path, &iid); - ok(hr == S_OK, "IIDFromString(%s) error %#x\n", wine_dbgstr_w(path), hr); + ok(hr == S_OK, "IIDFromString(%s) error %#lx\n", wine_dbgstr_w(path), hr); hr = SchRpcDelete(path, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); MIDL_user_free(path); }
hr = RpcBindingFree(&schrpc_handle); - ok(hr == RPC_S_OK, "RpcBindingFree error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFree error %#lx\n", hr); }
void __RPC_FAR *__RPC_USER MIDL_user_allocate(SIZE_T n)