ntdll/tests: Win64 printf format warning fixes.
diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in index 98cda37..cccc4c5 100644 --- a/dlls/ntdll/tests/Makefile.in +++ b/dlls/ntdll/tests/Makefile.in
@@ -4,7 +4,6 @@ VPATH = @srcdir@ TESTDLL = ntdll.dll IMPORTS = kernel32 -EXTRADEFS = -DWINE_NO_LONG_AS_INT CTESTS = \ atom.c \
diff --git a/dlls/ntdll/tests/atom.c b/dlls/ntdll/tests/atom.c index a837e8b..1b3f161 100644 --- a/dlls/ntdll/tests/atom.c +++ b/dlls/ntdll/tests/atom.c
@@ -98,30 +98,30 @@ WCHAR Name[64]; res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &Atom); - ok(!res, "Unable to find atom from another thread, retval: %lx\n", res); + ok(!res, "Unable to find atom from another thread, retval: %x\n", res); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &Atom); - ok(!res, "Unable to lookup pinned atom in table, retval: %lx\n", res); + ok(!res, "Unable to lookup pinned atom in table, retval: %x\n", res); res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len); - ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %lx\n", res); + ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %x\n", res); Len = 64; res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len); - ok(!res, "Failed with longenough buffer, retval: %lx\n", res); - ok(RefCount == 1, "Refcount was not 1 but %lx\n", RefCount); - ok(PinCount == 1, "Pincount was not 1 but %lx\n", PinCount); + ok(!res, "Failed with longenough buffer, retval: %x\n", res); + ok(RefCount == 1, "Refcount was not 1 but %x\n", RefCount); + ok(PinCount == 1, "Pincount was not 1 but %x\n", PinCount); ok(!lstrcmpW(Name, testAtom2), "We found wrong atom!!\n"); - ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len); + ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len); Len = 64; res = pRtlQueryAtomInAtomTable(AtomTable, Atom, NULL, NULL, Name, &Len); - ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %lx\n", res); + ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %x\n", res); ok(!lstrcmpW(Name, testAtom2), "Found Wrong atom!\n"); - ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len); + ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len); res = pRtlPinAtomInAtomTable(AtomTable, Atom); - ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); return 0; } @@ -143,65 +143,65 @@ if (!res) { res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %lx\n", res); + ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %x\n", res); } AtomTable = NULL; res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "We're unable to create an atom table with a valid table size retval: %lx\n", res); + ok(!res, "We're unable to create an atom table with a valid table size retval: %x\n", res); if (!res) { res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); - ok(!res, "We were unable to add a simple atom to the atom table, retval: %lx\n", res); + ok(!res, "We were unable to add a simple atom to the atom table, retval: %x\n", res); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Cap, &testAtom); - ok(!res, "We were unable to find capital version of the atom, retval: %lx\n", res); + ok(!res, "We were unable to find capital version of the atom, retval: %x\n", res); ok(Atom1 == testAtom, "Found wrong atom in table when querying capital atom\n"); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Low, &testAtom); - ok(!res, "Unable to find lowercase version of the atom, retval: %lx\n", res); + ok(!res, "Unable to find lowercase version of the atom, retval: %x\n", res); ok(testAtom == Atom1, "Found wrong atom when querying lowercase atom\n"); res = pRtlAddAtomToAtomTable(AtomTable, EmptyAtom, &testEAtom); - ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %lx\n", res); + ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %x\n", res); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(!res, "Failed to find totally legitimate atom, retval: %lx\n", res); + ok(!res, "Failed to find totally legitimate atom, retval: %x\n", res); ok(testAtom == Atom1, "Found wrong atom!\n"); res = pRtlAddAtomToAtomTable(AtomTable, testAtom2, &Atom2); - ok(!res, "Unable to add other legitimate atom to table, retval: %lx\n", res); + ok(!res, "Unable to add other legitimate atom to table, retval: %x\n", res); res = pRtlPinAtomInAtomTable(AtomTable, Atom2); - ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); testThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)RtlAtomTestThread, &AtomTable, 0, NULL); WaitForSingleObject(testThread, INFINITE); Len = 64; res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len); - ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); - ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount); - ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount); + ok(!res, "Unable to query atom in atom table, retval: %x\n", res); + ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount); + ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount); ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n"); - ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len); + ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len); res = pRtlEmptyAtomTable(AtomTable, FALSE); - ok(!res, "Unable to empty atom table, retval %lx\n", res); + ok(!res, "Unable to empty atom table, retval %x\n", res); Len = 64; res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len); - ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %lx\n", res); - ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount); - ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount); + ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %x\n", res); + ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount); + ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount); ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n"); - ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len); + ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len); Len = 8; Name[0] = Name[1] = Name[2] = Name[3] = Name[4] = 0x55AA; res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, NULL, NULL, Name, &Len); - ok(!res, "query atom %lx\n", res); - ok(Len == 6, "wrong length %lu\n", Len); + ok(!res, "query atom %x\n", res); + ok(Len == 6, "wrong length %u\n", Len); ok(!memcmp(Name, testAtom2, Len), "wrong atom string\n"); ok(!Name[3], "wrong string termination\n"); ok(Name[4] == 0x55AA, "buffer overwrite\n"); @@ -209,74 +209,74 @@ Len = lstrlenW(testAtom2) * sizeof(WCHAR); memset(Name, '.', sizeof(Name)); res = pRtlQueryAtomInAtomTable( AtomTable, Atom2, NULL, NULL, Name, &Len ); - ok(!res, "query atom %lx\n", res); - ok(Len == (lstrlenW(testAtom2) - 1) * sizeof(WCHAR), "wrong length %lu\n", Len); + ok(!res, "query atom %x\n", res); + ok(Len == (lstrlenW(testAtom2) - 1) * sizeof(WCHAR), "wrong length %u\n", Len); ok(!memcmp(testAtom2, Name, (lstrlenW(testAtom2) - 1) * sizeof(WCHAR)), "wrong atom name\n"); ok(Name[lstrlenW(testAtom2) - 1] == '\0', "wrong char\n"); ok(Name[lstrlenW(testAtom2)] == ('.' << 8) + '.', "wrong char\n"); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom); - ok(!res, "We can't find our pinned atom!! retval: %lx\n", res); + ok(!res, "We can't find our pinned atom!! retval: %x\n", res); ok(testAtom == Atom2, "We found wrong atom!!!\n"); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %lx\n", res); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %x\n", res); res = pRtlAddAtomToAtomTable(AtomTable, testAtom3, &Atom3); - ok(!res, "Unable to add atom to table, retval: %lx\n", res); + ok(!res, "Unable to add atom to table, retval: %x\n", res); res = pRtlEmptyAtomTable(AtomTable, TRUE); - ok(!res, "Unable to empty atom table, retval: %lx\n", res); + ok(!res, "Unable to empty atom table, retval: %x\n", res); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %lx\n", res); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %x\n", res); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom3, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %lx\n", res); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %x\n", res); res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "Can't destroy atom table, retval: %lx\n", res); + ok(!res, "Can't destroy atom table, retval: %x\n", res); } AtomTable = NULL; res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "Unable to create atom table, retval: %lx\n", res); + ok(!res, "Unable to create atom table, retval: %x\n", res); if (!res) { res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %lx\n", res); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %x\n", res); res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); - ok(!res, "Unable to add atom to atom table, retval %lx\n", res); + ok(!res, "Unable to add atom to atom table, retval %x\n", res); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(!res, "Can't find previously added atom in table, retval: %lx\n", res); - ok(testAtom == Atom1, "Found wrong atom! retval: %lx\n", res); + ok(!res, "Can't find previously added atom in table, retval: %x\n", res); + ok(testAtom == Atom1, "Found wrong atom! retval: %x\n", res); res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1); - ok(!res, "Unable to delete atom from table, retval: %lx\n", res); + ok(!res, "Unable to delete atom from table, retval: %x\n", res); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %lx\n", res); + ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %x\n", res); res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); - ok(!res, "Unable to add atom to atom table, retval: %lx\n", res); + ok(!res, "Unable to add atom to atom table, retval: %x\n", res); Len = 0; res = pRtlQueryAtomInAtomTable(AtomTable, Atom1, NULL, NULL, Name, &Len); - ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %lx\n", res); - ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len, "Got wrong length %lx\n", Len); + ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %x\n", res); + ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len, "Got wrong length %x\n", Len); res = pRtlPinAtomInAtomTable(AtomTable, Atom1); - ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); - ok(!res, "Unable to find atom in atom table, retval: %lx\n", res); + ok(!res, "Unable to find atom in atom table, retval: %x\n", res); ok(testAtom == Atom1, "Wrong atom found\n"); res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1); - ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %lx\n", res); + ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %x\n", res); res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom); ok(!res, "Able to find deleted atom in table\n"); @@ -299,82 +299,82 @@ AtomTable = NULL; res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "Unable to create atom table, %lx\n", res); + ok(!res, "Unable to create atom table, %x\n", res); if (!res) { /* According to the kernel32 functions, integer atoms are only allowd from * 0x0001 to 0xbfff and not 0xc000 to 0xffff, which is correct */ res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)0, &testAtom); - ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %lx\n", res); + ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %x\n", res); for (i = 1; i <= 0xbfff; i++) { res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)i, &testAtom); - ok(!res, "Unable to add valid integer atom %i, retval: %lx\n", i, res); + ok(!res, "Unable to add valid integer atom %i, retval: %x\n", i, res); } for (i = 1; i <= 0xbfff; i++) { res = pRtlLookupAtomInAtomTable(AtomTable, (PWSTR)i, &testAtom); - ok(!res, "Unable to find int atom %i, retval: %lx\n", i, res); + ok(!res, "Unable to find int atom %i, retval: %x\n", i, res); if (!res) { res = pRtlPinAtomInAtomTable(AtomTable, testAtom); - ok(!res, "Unable to pin int atom %i, retval: %lx\n", i, res); + ok(!res, "Unable to pin int atom %i, retval: %x\n", i, res); } } for (i = 0xc000; i <= 0xffff; i++) { res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)i, &testAtom); - ok(res, "Able to illeageal integer atom %i, retval: %lx\n", i, res); + ok(res, "Able to illeageal integer atom %i, retval: %x\n", i, res); } res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "Unable to destroy atom table, retval: %lx\n", res); + ok(!res, "Unable to destroy atom table, retval: %x\n", res); } AtomTable = NULL; res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "Unable to create atom table, %lx\n", res); + ok(!res, "Unable to create atom table, %x\n", res); if (!res) { res = pRtlLookupAtomInAtomTable(AtomTable, (PWSTR)123, &testAtom); - ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); + ok(!res, "Unable to query atom in atom table, retval: %x\n", res); res = pRtlAddAtomToAtomTable(AtomTable, testAtomInt, &testAtom); - ok(!res, "Unable to add int atom to table, retval: %lx\n", res); + ok(!res, "Unable to add int atom to table, retval: %x\n", res); res = pRtlAddAtomToAtomTable(AtomTable, testAtomIntInv, &testAtom); - ok(!res, "Unable to add int atom to table, retval: %lx\n", res); + ok(!res, "Unable to add int atom to table, retval: %x\n", res); res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom); - ok(!res, "Unable to add int atom to table, retval: %lx\n", res); + ok(!res, "Unable to add int atom to table, retval: %x\n", res); res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom); - ok(!res, "Unable to re-add int atom to table, retval: %lx\n", res); + ok(!res, "Unable to re-add int atom to table, retval: %x\n", res); Len = 64; res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, Name, &Len); - ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); - ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount); - ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount); + ok(!res, "Unable to query atom in atom table, retval: %x\n", res); + ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount); + ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount); ok(!lstrcmpW(testAtomOTT, Name), "Got wrong atom name\n"); - ok((lstrlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %ld\n", Len); + ok((lstrlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %d\n", Len); res = pRtlPinAtomInAtomTable(AtomTable, testAtom); - ok(!res, "Unable to pin int atom, retval: %lx\n", res); + ok(!res, "Unable to pin int atom, retval: %x\n", res); res = pRtlPinAtomInAtomTable(AtomTable, testAtom); - ok(!res, "Unable to pin int atom, retval: %lx\n", res); + ok(!res, "Unable to pin int atom, retval: %x\n", res); res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, NULL, NULL); - ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); - ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount); - ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount); + ok(!res, "Unable to query atom in atom table, retval: %x\n", res); + ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount); + ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount); res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "Unable to destroy atom table, retval: %lx\n", res); + ok(!res, "Unable to destroy atom table, retval: %x\n", res); } } @@ -388,40 +388,40 @@ AtomTable = NULL; res = pRtlCreateAtomTable(37, &AtomTable); - ok(!res, "Unable to create atom table, %lx\n", res); + ok(!res, "Unable to create atom table, %x\n", res); if (!res) { res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom); - ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res); + ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res); res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom); - ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res); + ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res); res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom); - ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res); + ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res); res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL); - ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); - ok(PinCount == 0, "Expected pincount 0 but got %lx\n", PinCount); - ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount); + ok(!res, "Unable to query atom in atom table, retval: %x\n", res); + ok(PinCount == 0, "Expected pincount 0 but got %x\n", PinCount); + ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount); res = pRtlPinAtomInAtomTable(AtomTable, Atom); - ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); res = pRtlPinAtomInAtomTable(AtomTable, Atom); - ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); res = pRtlPinAtomInAtomTable(AtomTable, Atom); - ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res); + ok(!res, "Unable to pin atom in atom table, retval: %x\n", res); res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL); - ok(!res, "Unable to query atom in atom table, retval: %lx\n", res); - ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount); - ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount); + ok(!res, "Unable to query atom in atom table, retval: %x\n", res); + ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount); + ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount); res = pRtlDestroyAtomTable(AtomTable); - ok(!res, "Unable to destroy atom table, retval: %lx\n", res); + ok(!res, "Unable to destroy atom table, retval: %x\n", res); } } @@ -434,7 +434,7 @@ ULONG ptr_size = sizeof(ATOM_BASIC_INFORMATION) + 255 * sizeof(WCHAR); res = pNtAddAtom(testAtom1, lstrlenW(testAtom1) * sizeof(WCHAR), &atom); - ok(!res, "Added atom (%lx)\n", res); + ok(!res, "Added atom (%x)\n", res); memset(abi->Name, 0x55, 255 * sizeof(WCHAR)); res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL ); @@ -446,13 +446,13 @@ ptr_size = sizeof(ATOM_BASIC_INFORMATION); res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL ); - ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%lx)\n", res); + ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%x)\n", res); ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR), "ok string length\n"); memset(abi->Name, 0x55, lstrlenW(testAtom1) * sizeof(WCHAR)); ptr_size = sizeof(ATOM_BASIC_INFORMATION) + lstrlenW(testAtom1) * sizeof(WCHAR); res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL ); - ok(!res, "atom lookup %lx\n", res); + ok(!res, "atom lookup %x\n", res); ok(!lstrcmpW(abi->Name, testAtom1), "strings don't match\n"); ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR), "wrong string length\n"); ok(abi->Name[lstrlenW(testAtom1)] == 0, "buffer overwrite %x\n", abi->Name[lstrlenW(testAtom1)]);
diff --git a/dlls/ntdll/tests/env.c b/dlls/ntdll/tests/env.c index b33d387..d822946 100644 --- a/dlls/ntdll/tests/env.c +++ b/dlls/ntdll/tests/env.c
@@ -99,7 +99,7 @@ pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->var, strlen(test->var)+1 ); nts = pRtlQueryEnvironmentVariable_U(small_env, &name, &value); - ok( nts == test->status, "[%d]: Wrong status for '%s', expecting %lx got %lx\n", + ok( nts == test->status, "[%d]: Wrong status for '%s', expecting %x got %x\n", test - tests, test->var, test->status, nts ); if (nts == test->status) switch (nts) { @@ -139,7 +139,7 @@ pRtlMultiByteToUnicodeN( bval1, sizeof(bval1), NULL, val, strlen(val)+1 ); } nts = pRtlSetEnvironmentVariable(env, &uvar, val ? &uval : NULL); - ok(nts == ret, "Setting var %s=%s (%lx/%lx)\n", var, val, nts, ret); + ok(nts == ret, "Setting var %s=%s (%x/%x)\n", var, val, nts, ret); if (nts == STATUS_SUCCESS) { uval.Length = 0; @@ -155,7 +155,7 @@ ok(val == NULL, "Couldn't find variable, but didn't delete it. val = %s\n", val); break; default: - ok(0, "Wrong ret %lu for %s\n", nts, var); + ok(0, "Wrong ret %u for %s\n", nts, var); break; } } @@ -240,18 +240,18 @@ nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), - "Wrong returned length for %s: %lu\n", test->src, ul ); + "Wrong returned length for %s: %u\n", test->src, ul ); us_dst.Length = 0; us_dst.MaximumLength = sizeof(dst); us_dst.Buffer = dst; nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); - ok(nts == STATUS_SUCCESS, "Call failed (%lu)\n", nts); + ok(nts == STATUS_SUCCESS, "Call failed (%u)\n", nts); ok(ul == us_dst.Length + sizeof(WCHAR), - "Wrong returned length for %s: %lu\n", test->src, ul); + "Wrong returned length for %s: %u\n", test->src, ul); ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), - "Wrong returned length for %s: %lu\n", test->src, ul); + "Wrong returned length for %s: %u\n", test->src, ul); ok(lstrcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s\n", test->src, test->dst); @@ -260,9 +260,9 @@ us_dst.Buffer = dst; dst[8] = '-'; nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul); - ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts); + ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%u)\n", nts); ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), - "Wrong returned length for %s (with buffer too small): %lu\n", test->src, ul); + "Wrong returned length for %s (with buffer too small): %u\n", test->src, ul); ok(memcmp(dst, rst, 8*sizeof(WCHAR)) == 0, "Wrong result for %s (with buffer too small): expecting %s\n", test->src, test->dst);
diff --git a/dlls/ntdll/tests/error.c b/dlls/ntdll/tests/error.c index 9679c8f..6d21e02 100644 --- a/dlls/ntdll/tests/error.c +++ b/dlls/ntdll/tests/error.c
@@ -71,7 +71,7 @@ err = statustodoserror(win_nt); ok(err == win32, - "%s (%lx): got %ld, expected %ld\n", + "%s (%x): got %d, expected %d\n", message, win_nt, err, win32); } @@ -82,7 +82,7 @@ err = statustodoserror(win_nt); ok(err == win32 || (!strict && err == ERROR_MR_MID_NOT_FOUND), - "%s (%lx): got %ld, expected %ld (or MID_NOT_FOUND)\n", + "%s (%x): got %d, expected %d (or MID_NOT_FOUND)\n", message, win_nt, err, win32); } @@ -92,7 +92,7 @@ err = statustodoserror(win_nt); ok(err == win32_1 || (!strict && err == win32_2), - "%s (%lx): got %ld, expected %ld or %ld\n", + "%s (%x): got %d, expected %d or %d\n", message, win_nt, err, win32_1, win32_2); } @@ -103,7 +103,7 @@ err = statustodoserror(win_nt); ok(err == win32_1 || (!strict && (err == win32_2 || err == ERROR_MR_MID_NOT_FOUND)), - "%s (%lx): got %ld, expected %ld or %ld\n", + "%s (%x): got %d, expected %d or %d\n", message, win_nt, err, win32_1, win32_2); }
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 84726df..a87cadf 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c
@@ -169,20 +169,20 @@ unsigned int i, entry = except - exceptions; got_exception++; - trace( "exception: %lx flags:%lx addr:%p\n", + trace( "exception: %x flags:%x addr:%p\n", rec->ExceptionCode, rec->ExceptionFlags, rec->ExceptionAddress ); ok( rec->ExceptionCode == except->status, - "%u: Wrong exception code %lx/%lx\n", entry, rec->ExceptionCode, except->status ); + "%u: Wrong exception code %x/%x\n", entry, rec->ExceptionCode, except->status ); ok( rec->ExceptionAddress == except->code + except->offset, "%u: Wrong exception address %p/%p\n", entry, rec->ExceptionAddress, except->code + except->offset ); ok( rec->NumberParameters == except->nb_params, - "%u: Wrong number of parameters %lu/%lu\n", entry, rec->NumberParameters, except->nb_params ); + "%u: Wrong number of parameters %u/%u\n", entry, rec->NumberParameters, except->nb_params ); for (i = 0; i < rec->NumberParameters; i++) ok( rec->ExceptionInformation[i] == except->params[i], - "%u: Wrong parameter %d: %lx/%lx\n", + "%u: Wrong parameter %d: %lx/%x\n", entry, i, rec->ExceptionInformation[i], except->params[i] ); /* don't handle exception if it's not the address we expected */ @@ -277,9 +277,9 @@ pNtCurrentTeb()->Tib.ExceptionList = exc_frame.frame.Prev; ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS; res = pNtGetContextThread(GetCurrentThread(), &ctx); - ok (res == STATUS_SUCCESS,"NtGetContextThread failed with %lx\n", res); - ok(ctx.Dr0 == 0x42424242,"failed to set debugregister 0 to 0x42424242, got %lx\n", ctx.Dr0); - ok(ctx.Dr7 == 0x155,"failed to set debugregister 7 to 0x155, got %lx\n", ctx.Dr7); + ok (res == STATUS_SUCCESS,"NtGetContextThread failed with %x\n", res); + ok(ctx.Dr0 == 0x42424242,"failed to set debugregister 0 to 0x42424242, got %x\n", ctx.Dr0); + ok(ctx.Dr7 == 0x155,"failed to set debugregister 7 to 0x155, got %x\n", ctx.Dr7); } /* test the single step exception behaviour */
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 30e1500..8d288d7 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c
@@ -68,33 +68,33 @@ /* Use a nonexistent info class */ trace("Check nonexistent info class\n"); status = pNtQuerySystemInformation(-1, NULL, 0, NULL); - ok( status == STATUS_INVALID_INFO_CLASS, "Expected STATUS_INVALID_INFO_CLASS, got %08lx\n", status); + ok( status == STATUS_INVALID_INFO_CLASS, "Expected STATUS_INVALID_INFO_CLASS, got %08x\n", status); /* Use an existing class but with a zero-length buffer */ trace("Check zero-length buffer\n"); status = pNtQuerySystemInformation(SystemBasicInformation, NULL, 0, NULL); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); /* Use an existing class, correct length but no SystemInformation buffer */ trace("Check no SystemInformation buffer\n"); status = pNtQuerySystemInformation(SystemBasicInformation, NULL, sizeof(sbi), NULL); - ok( status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %08lx\n", status); + ok( status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %08x\n", status); /* Use a existing class, correct length, a pointer to a buffer but no ReturnLength pointer */ trace("Check no ReturnLength pointer\n"); status = pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), NULL); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); /* Check a too large buffer size */ trace("Check a too large buffer size\n"); status = pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); /* Finally some correct calls */ trace("Check with correct parameters\n"); status = pNtQuerySystemInformation(SystemBasicInformation, &sbi, sizeof(sbi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(sbi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(sbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ trace("Number of Processors : %d\n", sbi.NumberOfProcessors); @@ -108,12 +108,12 @@ SYSTEM_CPU_INFORMATION sci; status = pNtQuerySystemInformation(SystemCpuInformation, &sci, sizeof(sci), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(sci) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(sci) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ - trace("Processor FeatureSet : %08lx\n", sci.FeatureSet); - ok( sci.FeatureSet != 0, "Expected some features for this processor, got %08lx\n", sci.FeatureSet); + trace("Processor FeatureSet : %08x\n", sci.FeatureSet); + ok( sci.FeatureSet != 0, "Expected some features for this processor, got %08x\n", sci.FeatureSet); } static void test_query_performance(void) @@ -123,15 +123,15 @@ SYSTEM_PERFORMANCE_INFORMATION spi; status = pNtQuerySystemInformation(SystemPerformanceInformation, &spi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); status = pNtQuerySystemInformation(SystemPerformanceInformation, &spi, sizeof(spi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(spi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(spi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); status = pNtQuerySystemInformation(SystemPerformanceInformation, &spi, sizeof(spi) + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(spi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(spi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Not return values yet, as struct members are unknown */ } @@ -171,46 +171,46 @@ trace("Windows version is NT, we have to cater for differences with W2K/WinXP\n"); status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); - ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%ld)\n", ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%d)\n", ReturnLength); sti.uCurrentTimeZoneId = 0xdeadbeef; status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 28, &ReturnLength); ok( 0xdeadbeef == sti.uCurrentTimeZoneId, "This part of the buffer should not have been filled\n"); status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 32, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( 32 == ReturnLength, "ReturnLength should be 0, it is (%ld)\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( 32 == ReturnLength, "ReturnLength should be 0, it is (%d)\n", ReturnLength); } else { status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 0, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%ld)\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%d)\n", ReturnLength); sti.uCurrentTimeZoneId = 0xdeadbeef; status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 24, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( 24 == ReturnLength, "ReturnLength should be 24, it is (%ld)\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( 24 == ReturnLength, "ReturnLength should be 24, it is (%d)\n", ReturnLength); ok( 0xdeadbeef == sti.uCurrentTimeZoneId, "This part of the buffer should not have been filled\n"); sti.uCurrentTimeZoneId = 0xdeadbeef; status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 32, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( 32 == ReturnLength, "ReturnLength should be 32, it is (%ld)\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( 32 == ReturnLength, "ReturnLength should be 32, it is (%d)\n", ReturnLength); ok( 0xdeadbeef != sti.uCurrentTimeZoneId, "Buffer should have been partially filled\n"); status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 49, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); - ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%ld)\n", ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%d)\n", ReturnLength); status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, sizeof(sti), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(sti) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(sti) == ReturnLength, "Inconsistent length %d\n", ReturnLength); } /* Check if we have some return values */ - trace("uCurrentTimeZoneId : (%ld)\n", sti.uCurrentTimeZoneId); + trace("uCurrentTimeZoneId : (%d)\n", sti.uCurrentTimeZoneId); } static void test_query_process(void) @@ -256,7 +256,7 @@ spi = HeapReAlloc(GetProcessHeap(), 0, spi , SystemInformationLength *= 2); } - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); /* Get the first dwOffset, from this we can deduce the OS version we're running * @@ -304,7 +304,7 @@ { k++; ok ( spi->ti[j].dwOwningPID == spi->dwProcessID, - "The owning pid of the thread (%ld) doesn't equal the pid (%ld) of the process\n", + "The owning pid of the thread (%d) doesn't equal the pid (%d) of the process\n", spi->ti[j].dwOwningPID, spi->dwProcessID); } } @@ -338,25 +338,25 @@ sppi = HeapAlloc(GetProcessHeap(), 0, NeededLength); status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); /* Try it for 1 processor */ status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) == ReturnLength, - "Inconsistent length %ld\n", ReturnLength); + "Inconsistent length %d\n", ReturnLength); /* Try it for all processors */ status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, NeededLength, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( NeededLength == ReturnLength, "Inconsistent length (%ld) <-> (%ld)\n", NeededLength, ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( NeededLength == ReturnLength, "Inconsistent length (%d) <-> (%d)\n", NeededLength, ReturnLength); /* A too large given buffer size */ sppi = HeapReAlloc(GetProcessHeap(), 0, sppi , NeededLength + 2); status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, NeededLength + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( NeededLength == ReturnLength, "Inconsistent length (%ld) <-> (%ld)\n", NeededLength, ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( NeededLength == ReturnLength, "Inconsistent length (%d) <-> (%d)\n", NeededLength, ReturnLength); HeapFree( GetProcessHeap(), 0, sppi); } @@ -373,13 +373,13 @@ /* Request the needed length */ status = pNtQuerySystemInformation(SystemModuleInformation, smi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); ok( ReturnLength > 0, "Expected a ReturnLength to show the needed length\n"); SystemInformationLength = ReturnLength; smi = HeapReAlloc(GetProcessHeap(), 0, smi , SystemInformationLength); status = pNtQuerySystemInformation(SystemModuleInformation, smi, SystemInformationLength, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ModuleCount = smi->ModulesCount; sm = &smi->Modules[0]; @@ -391,7 +391,7 @@ /* Loop through all the modules/drivers, Wine doesn't get here (yet) */ for (i = 0; i < ModuleCount ; i++) { - ok( i == sm->Id, "Id (%d) should have matched %lu\n", sm->Id, i); + ok( i == sm->Id, "Id (%d) should have matched %u\n", sm->Id, i); sm++; } @@ -411,21 +411,21 @@ /* The following check assumes more than one handle on any given system */ todo_wine { - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); } - ok( ReturnLength > 0, "Expected ReturnLength to be > 0, it was %ld\n", ReturnLength); + ok( ReturnLength > 0, "Expected ReturnLength to be > 0, it was %d\n", ReturnLength); SystemInformationLength = ReturnLength; shi = HeapReAlloc(GetProcessHeap(), 0, shi , SystemInformationLength); status = pNtQuerySystemInformation(SystemHandleInformation, shi, SystemInformationLength, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); /* Check if we have some return values */ - trace("Number of Handles : %ld\n", shi->Count); + trace("Number of Handles : %d\n", shi->Count); todo_wine { /* our implementation is a stub for now */ - ok( shi->Count > 1, "Expected more than 1 handles, got (%ld)\n", shi->Count); + ok( shi->Count > 1, "Expected more than 1 handles, got (%d)\n", shi->Count); } HeapFree( GetProcessHeap(), 0, shi); @@ -438,15 +438,15 @@ SYSTEM_CACHE_INFORMATION sci; status = pNtQuerySystemInformation(SystemCacheInformation, &sci, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); status = pNtQuerySystemInformation(SystemCacheInformation, &sci, sizeof(sci), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(sci) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(sci) == ReturnLength, "Inconsistent length %d\n", ReturnLength); status = pNtQuerySystemInformation(SystemCacheInformation, &sci, sizeof(sci) + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(sci) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(sci) == ReturnLength, "Inconsistent length %d\n", ReturnLength); } static void test_query_interrupt(void) @@ -464,11 +464,11 @@ sii = HeapAlloc(GetProcessHeap(), 0, NeededLength); status = pNtQuerySystemInformation(SystemInterruptInformation, sii, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); /* Try it for all processors */ status = pNtQuerySystemInformation(SystemInterruptInformation, sii, NeededLength, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); /* Windows XP and W2K3 (and others?) always return 0 for the ReturnLength * No test added for this as it's highly unlikely that an app depends on this @@ -484,15 +484,15 @@ SYSTEM_KERNEL_DEBUGGER_INFORMATION skdi; status = pNtQuerySystemInformation(SystemKernelDebuggerInformation, &skdi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); status = pNtQuerySystemInformation(SystemKernelDebuggerInformation, &skdi, sizeof(skdi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(skdi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(skdi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); status = pNtQuerySystemInformation(SystemKernelDebuggerInformation, &skdi, sizeof(skdi) + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(skdi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(skdi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); } static void test_query_regquota(void) @@ -502,15 +502,15 @@ SYSTEM_REGISTRY_QUOTA_INFORMATION srqi; status = pNtQuerySystemInformation(SystemRegistryQuotaInformation, &srqi, 0, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); status = pNtQuerySystemInformation(SystemRegistryQuotaInformation, &srqi, sizeof(srqi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(srqi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(srqi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); status = pNtQuerySystemInformation(SystemRegistryQuotaInformation, &srqi, sizeof(srqi) + 2, &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(srqi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(srqi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); } static void test_query_process_basic(void) @@ -536,48 +536,48 @@ /* Use a nonexistent info class */ trace("Check nonexistent info class\n"); status = pNtQueryInformationProcess(NULL, -1, NULL, 0, NULL); - ok( status == STATUS_INVALID_INFO_CLASS, "Expected STATUS_INVALID_INFO_CLASS, got %08lx\n", status); + ok( status == STATUS_INVALID_INFO_CLASS, "Expected STATUS_INVALID_INFO_CLASS, got %08x\n", status); /* Do not give a handle and buffer */ trace("Check NULL handle and buffer and zero-length buffersize\n"); status = pNtQueryInformationProcess(NULL, ProcessBasicInformation, NULL, 0, NULL); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); /* Use a correct info class and buffer size, but still no handle and buffer */ trace("Check NULL handle and buffer\n"); status = pNtQueryInformationProcess(NULL, ProcessBasicInformation, NULL, sizeof(pbi), NULL); ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n", status); + "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); /* Use a correct info class and buffer size, but still no handle */ trace("Check NULL handle\n"); status = pNtQueryInformationProcess(NULL, ProcessBasicInformation, &pbi, sizeof(pbi), NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08lx\n", status); + ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); /* Use a greater buffer size */ trace("Check NULL handle and too large buffersize\n"); status = pNtQueryInformationProcess(NULL, ProcessBasicInformation, &pbi, sizeof(pbi) * 2, NULL); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); /* Use no ReturnLength */ trace("Check NULL ReturnLength\n"); status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi), NULL); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); /* Finally some correct calls */ trace("Check with correct parameters\n"); status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(pbi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(pbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Everything is correct except a too large buffersize */ trace("Too large buffersize\n"); status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); - ok( sizeof(pbi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + ok( sizeof(pbi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ - trace("ProcessID : %ld\n", pbi.UniqueProcessId); + trace("ProcessID : %d\n", pbi.UniqueProcessId); ok( pbi.UniqueProcessId > 0, "Expected a ProcessID > 0, got 0\n"); } @@ -589,10 +589,10 @@ status = pNtQueryInformationProcess(NULL, ProcessVmCounters, NULL, sizeof(pvi), NULL); ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n", status); + "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); status = pNtQueryInformationProcess(NULL, ProcessVmCounters, &pvi, sizeof(pvi), NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08lx\n", status); + ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); /* Windows XP and W2K3 will report success for a size of 44 AND 48 ! Windows W2K will only report success for 44. @@ -601,15 +601,15 @@ */ status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, 24, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, sizeof(pvi), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(pvi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(pvi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessVmCounters, &pvi, 46, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); - ok( sizeof(pvi) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + ok( sizeof(pvi) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ trace("WorkingSetSize : %ld\n", pvi.WorkingSetSize); @@ -635,24 +635,24 @@ status = pNtQueryInformationProcess(NULL, ProcessIoCounters, NULL, sizeof(pii), NULL); ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n", status); + "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); status = pNtQueryInformationProcess(NULL, ProcessIoCounters, &pii, sizeof(pii), NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08lx\n", status); + ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessIoCounters, &pii, 24, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessIoCounters, &pii, sizeof(pii), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(pii) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(pii) == ReturnLength, "Inconsistent length %d\n", ReturnLength); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessIoCounters, &pii, sizeof(pii) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); - ok( sizeof(pii) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + ok( sizeof(pii) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ - trace("OtherOperationCount : 0x%lx%08lx\n", (DWORD)(pii.OtherOperationCount >> 32), (DWORD)pii.OtherOperationCount); + trace("OtherOperationCount : 0x%x%08x\n", (DWORD)(pii.OtherOperationCount >> 32), (DWORD)pii.OtherOperationCount); todo_wine { ok( pii.OtherOperationCount > 0, "Expected an OtherOperationCount > 0\n"); @@ -669,27 +669,27 @@ status = pNtQueryInformationProcess(NULL, ProcessTimes, NULL, sizeof(spti), NULL); ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n", status); + "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); status = pNtQueryInformationProcess(NULL, ProcessTimes, &spti, sizeof(spti), NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08lx\n", status); + ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessTimes, &spti, 24, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, one_before_last_pid); if (!process) { - trace("Could not open process with ID : %ld, error : %08lx. Going to use current one.\n", one_before_last_pid, GetLastError()); + trace("Could not open process with ID : %d, error : %08x. Going to use current one.\n", one_before_last_pid, GetLastError()); process = GetCurrentProcess(); trace("ProcessTimes for current process\n"); } else - trace("ProcessTimes for process with ID : %ld\n", one_before_last_pid); + trace("ProcessTimes for process with ID : %d\n", one_before_last_pid); status = pNtQueryInformationProcess( process, ProcessTimes, &spti, sizeof(spti), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(spti) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(spti) == ReturnLength, "Inconsistent length %d\n", ReturnLength); CloseHandle(process); FileTimeToSystemTime((const FILETIME *)&spti.CreateTime, &UTC); @@ -709,8 +709,8 @@ trace("UserTime : %02d:%02d:%02d.%03d\n", Local.wHour, Local.wMinute, Local.wSecond, Local.wMilliseconds); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessTimes, &spti, sizeof(spti) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); - ok( sizeof(spti) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + ok( sizeof(spti) == ReturnLength, "Inconsistent length %d\n", ReturnLength); } static void test_query_process_handlecount(void) @@ -722,35 +722,35 @@ status = pNtQueryInformationProcess(NULL, ProcessHandleCount, NULL, sizeof(handlecount), NULL); ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n", status); + "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08x\n", status); status = pNtQueryInformationProcess(NULL, ProcessHandleCount, &handlecount, sizeof(handlecount), NULL); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08lx\n", status); + ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessHandleCount, &handlecount, 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, one_before_last_pid); if (!process) { - trace("Could not open process with ID : %ld, error : %08lx. Going to use current one.\n", one_before_last_pid, GetLastError()); + trace("Could not open process with ID : %d, error : %08x. Going to use current one.\n", one_before_last_pid, GetLastError()); process = GetCurrentProcess(); trace("ProcessHandleCount for current process\n"); } else - trace("ProcessHandleCount for process with ID : %ld\n", one_before_last_pid); + trace("ProcessHandleCount for process with ID : %d\n", one_before_last_pid); status = pNtQueryInformationProcess( process, ProcessHandleCount, &handlecount, sizeof(handlecount), &ReturnLength); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); - ok( sizeof(handlecount) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); + ok( sizeof(handlecount) == ReturnLength, "Inconsistent length %d\n", ReturnLength); CloseHandle(process); status = pNtQueryInformationProcess( GetCurrentProcess(), ProcessHandleCount, &handlecount, sizeof(handlecount) * 2, &ReturnLength); - ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); - ok( sizeof(handlecount) == ReturnLength, "Inconsistent length %ld\n", ReturnLength); + ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); + ok( sizeof(handlecount) == ReturnLength, "Inconsistent length %d\n", ReturnLength); /* Check if we have some return values */ - trace("HandleCount : %ld\n", handlecount); + trace("HandleCount : %d\n", handlecount); todo_wine { ok( handlecount > 0, "Expected some handles, got 0\n"); @@ -771,32 +771,32 @@ /* normal operation */ status = pNtReadVirtualMemory(process, teststring, buffer, 12, &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == 12, "Expected to read 12 bytes, got %ld\n",readcount); ok( strcmp(teststring, buffer) == 0, "Expected read memory to be the same as original memory\n"); /* no number of bytes */ memset(buffer, 0, 12); status = pNtReadVirtualMemory(process, teststring, buffer, 12, NULL); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( strcmp(teststring, buffer) == 0, "Expected read memory to be the same as original memory\n"); /* illegal remote address */ todo_wine{ status = pNtReadVirtualMemory(process, (void *) 0x1234, buffer, 12, &readcount); - ok( status == STATUS_PARTIAL_COPY, "Expected STATUS_PARTIAL_COPY, got %08lx\n", status); + ok( status == STATUS_PARTIAL_COPY, "Expected STATUS_PARTIAL_COPY, got %08x\n", status); ok( readcount == 0, "Expected to read 0 bytes, got %ld\n",readcount); } /* 0 handle */ status = pNtReadVirtualMemory(0, teststring, buffer, 12, &readcount); - ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08lx\n", status); + ok( status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got %08x\n", status); ok( readcount == 0, "Expected to read 0 bytes, got %ld\n",readcount); /* pseudo handle for current process*/ memset(buffer, 0, 12); status = pNtReadVirtualMemory((HANDLE)-1, teststring, buffer, 12, &readcount); - ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status); + ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status); ok( readcount == 12, "Expected to read 12 bytes, got %ld\n",readcount); ok( strcmp(teststring, buffer) == 0, "Expected read memory to be the same as original memory\n");
diff --git a/dlls/ntdll/tests/large_int.c b/dlls/ntdll/tests/large_int.c index 59b1c72..bec8ad9 100644 --- a/dlls/ntdll/tests/large_int.c +++ b/dlls/ntdll/tests/large_int.c
@@ -113,7 +113,7 @@ for (i = 0; i < NB_MAGIC_DIVIDE; i++) { result = pRtlExtendedMagicDivide(magic_divide[i].a, magic_divide[i].b, magic_divide[i].shift); ok(result == magic_divide[i].result, - "call failed: RtlExtendedMagicDivide(0x%lx%08lx, 0x%lx%08lx, %d) has result 0x%lx%08lx, expected 0x%lx%08lx\n", + "call failed: RtlExtendedMagicDivide(0x%x%08x, 0x%x%08x, %d) has result 0x%x%08x, expected 0x%x%08x\n", (DWORD)(magic_divide[i].a >> 32), (DWORD)magic_divide[i].a, (DWORD)(magic_divide[i].b >> 32), (DWORD)magic_divide[i].b, magic_divide[i].shift, (DWORD)(result >> 32), (DWORD)result, (DWORD)(magic_divide[i].result >> 32), (DWORD)magic_divide[i].result); @@ -324,26 +324,26 @@ } /* if */ } else { ok(result == largeint2str->result, - "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) has result %lx, expected: %lx\n", + "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) has result %x, expected: %x\n", test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, result, largeint2str->result); if (result == STATUS_SUCCESS) { ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0', - "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) string \"%s\" is not NULL terminated\n", + "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string \"%s\" is not NULL terminated\n", test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, ansi_str.Buffer); } /* if */ } /* if */ ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", test_num, (DWORD)(largeint2str->value >>32), (DWORD)largeint2str->value, largeint2str->base, ansi_str.Buffer, expected_ansi_str.Buffer); ok(unicode_string.Length == expected_unicode_string.Length, - "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) string has Length %d, expected: %d\n", + "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string has Length %d, expected: %d\n", test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, unicode_string.Length, expected_unicode_string.Length); ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength, - "(test %d): RtlInt64ToUnicodeString(0x%lx%08lx, %d, [out]) string has MaximumLength %d, expected: %d\n", + "(test %d): RtlInt64ToUnicodeString(0x%x%08x, %d, [out]) string has MaximumLength %d, expected: %d\n", test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, unicode_string.MaximumLength, expected_unicode_string.MaximumLength); pRtlFreeAnsiString(&expected_ansi_str); @@ -376,11 +376,11 @@ result = pRtlLargeIntegerToChar(&value, largeint2str->base, largeint2str->MaximumLength, dest_str); } /* if */ ok(result == largeint2str->result, - "(test %d): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, [out]) has result %lx, expected: %lx\n", + "(test %d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, [out]) has result %x, expected: %x\n", test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, largeint2str->MaximumLength, result, largeint2str->result); ok(memcmp(dest_str, largeint2str->Buffer, LARGE_STRI_BUFFER_LENGTH) == 0, - "(test %d): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", test_num, (DWORD)(largeint2str->value >> 32), (DWORD)largeint2str->value, largeint2str->base, largeint2str->MaximumLength, dest_str, largeint2str->Buffer); } @@ -399,25 +399,25 @@ value = largeint2str[0].value; result = pRtlLargeIntegerToChar(&value, 20, largeint2str[0].MaximumLength, NULL); ok(result == STATUS_INVALID_PARAMETER, - "(test a): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n", + "(test a): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n", (DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); result = pRtlLargeIntegerToChar(&value, 20, 0, NULL); ok(result == STATUS_INVALID_PARAMETER, - "(test b): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n", + "(test b): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n", (DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, 0, NULL); ok(result == STATUS_BUFFER_OVERFLOW, - "(test c): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n", + "(test c): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n", (DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, largeint2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW); result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, largeint2str[0].MaximumLength, NULL); ok(result == STATUS_ACCESS_VIOLATION, - "(test d): RtlLargeIntegerToChar(0x%lx%08lx, %d, %d, NULL) has result %lx, expected: %lx\n", + "(test d): RtlLargeIntegerToChar(0x%x%08x, %d, %d, NULL) has result %x, expected: %x\n", (DWORD)(largeint2str[0].value >> 32), (DWORD)largeint2str[0].value, largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION); }
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 2903984..e2c5f6c 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c
@@ -59,22 +59,22 @@ pRtlInitUnicodeString(&str, buffer1); InitializeObjectAttributes(&attr, &str, 0, 0, NULL); status = pNtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_SUCCESS, "Failed to create Mutant(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to create Mutant(%08x)\n", status); status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, FALSE, FALSE); ok(status == STATUS_OBJECT_NAME_COLLISION, - "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION got(%08lx)\n", status); + "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status); pRtlInitUnicodeString(&str, buffer2); InitializeObjectAttributes(&attr, &str, 0, 0, NULL); status = pNtCreateEvent(&Event, GENERIC_ALL, &attr, FALSE, FALSE); - ok(status == STATUS_SUCCESS, "Failed to create Event(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to create Event(%08x)\n", status); pRtlInitUnicodeString(&str, buffer3); InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); status = pNtOpenMutant(&h, GENERIC_ALL, &attr); ok(status == STATUS_OBJECT_TYPE_MISMATCH, - "NtOpenMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08lx)\n", status); + "NtOpenMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08x)\n", status); pNtClose(Mutant); @@ -82,16 +82,16 @@ InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); status = pNtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE); ok(status == STATUS_OBJECT_NAME_COLLISION, - "NtCreateMutant should have failed with STATUS_OBJECT_NAME_COLLISION got(%08lx)\n", status); + "NtCreateMutant should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status); status = pNtCreateEvent(&h, GENERIC_ALL, &attr, FALSE, FALSE); ok(status == STATUS_OBJECT_NAME_COLLISION, - "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION got(%08lx)\n", status); + "NtCreateEvent should have failed with STATUS_OBJECT_NAME_COLLISION got(%08x)\n", status); attr.Attributes = 0; status = pNtCreateMutant(&Mutant, GENERIC_ALL, &attr, FALSE); ok(status == STATUS_OBJECT_PATH_NOT_FOUND, - "NtCreateMutant should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08lx)\n", status); + "NtCreateMutant should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08x)\n", status); pNtClose(Event); } @@ -115,36 +115,36 @@ InitializeObjectAttributes(&attr, &str, 0, 0, NULL); status = pNtCreateNamedPipeFile(&pipe, GENERIC_READ|GENERIC_WRITE, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_CREATE, FILE_PIPE_FULL_DUPLEX, FALSE, FALSE, FALSE, 1, 256, 256, &timeout); - ok(status == STATUS_SUCCESS, "Failed to create NamedPipe(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to create NamedPipe(%08x)\n", status); status = pNtCreateNamedPipeFile(&pipe, GENERIC_READ|GENERIC_WRITE, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_CREATE, FILE_PIPE_FULL_DUPLEX, FALSE, FALSE, FALSE, 1, 256, 256, &timeout); ok(status == STATUS_INSTANCE_NOT_AVAILABLE, - "NtCreateNamedPipeFile should have failed with STATUS_INSTANCE_NOT_AVAILABLE got(%08lx)\n", status); + "NtCreateNamedPipeFile should have failed with STATUS_INSTANCE_NOT_AVAILABLE got(%08x)\n", status); pRtlInitUnicodeString(&str, buffer2); InitializeObjectAttributes(&attr, &str, 0, 0, NULL); status = pNtCreateNamedPipeFile(&pipe, GENERIC_READ|GENERIC_WRITE, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_CREATE, FILE_PIPE_FULL_DUPLEX, FALSE, FALSE, FALSE, 1, 256, 256, &timeout); ok(status == STATUS_INSTANCE_NOT_AVAILABLE, - "NtCreateNamedPipeFile should have failed with STATUS_INSTANCE_NOT_AVAILABLE got(%08lx)\n", status); + "NtCreateNamedPipeFile should have failed with STATUS_INSTANCE_NOT_AVAILABLE got(%08x)\n", status); attr.Attributes = OBJ_CASE_INSENSITIVE; status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN); - ok(status == STATUS_SUCCESS, "Failed to open NamedPipe(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to open NamedPipe(%08x)\n", status); pNtClose(h); pRtlInitUnicodeString(&str, buffer3); InitializeObjectAttributes(&attr, &str, 0, 0, NULL); status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN); ok(status == STATUS_OBJECT_PATH_NOT_FOUND || status == STATUS_PIPE_NOT_AVAILABLE, - "pNtOpenFile should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08lx)\n", status); + "pNtOpenFile should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08x)\n", status); pRtlInitUnicodeString(&str, buffer4); InitializeObjectAttributes(&attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL); status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN); ok(status == STATUS_OBJECT_NAME_NOT_FOUND, - "pNtOpenFile should have failed with STATUS_OBJECT_NAME_NOT_FOUND got(%08lx)\n", status); + "pNtOpenFile should have failed with STATUS_OBJECT_NAME_NOT_FOUND got(%08x)\n", status); pNtClose(pipe); } @@ -154,10 +154,10 @@ #define DIR_TEST_CREATE_FAILURE(h,e) \ status = pNtCreateDirectoryObject(h, DIRECTORY_QUERY, &attr);\ - ok(status == e,"NtCreateDirectoryObject should have failed with %s got(%08lx)\n", #e, status); + ok(status == e,"NtCreateDirectoryObject should have failed with %s got(%08x)\n", #e, status); #define DIR_TEST_OPEN_FAILURE(h,e) \ status = pNtOpenDirectoryObject(h, DIRECTORY_QUERY, &attr);\ - ok(status == e,"NtOpenDirectoryObject should have failed with %s got(%08lx)\n", #e, status); + ok(status == e,"NtOpenDirectoryObject should have failed with %s got(%08x)\n", #e, status); #define DIR_TEST_CREATE_OPEN_FAILURE(h,n,e) \ pRtlCreateUnicodeStringFromAsciiz(&str, n);\ DIR_TEST_CREATE_FAILURE(h,e) DIR_TEST_OPEN_FAILURE(h,e)\ @@ -165,10 +165,10 @@ #define DIR_TEST_CREATE_SUCCESS(h) \ status = pNtCreateDirectoryObject(h, DIRECTORY_QUERY, &attr); \ - ok(status == STATUS_SUCCESS, "Failed to create Directory(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to create Directory(%08x)\n", status); #define DIR_TEST_OPEN_SUCCESS(h) \ status = pNtOpenDirectoryObject(h, DIRECTORY_QUERY, &attr); \ - ok(status == STATUS_SUCCESS, "Failed to open Directory(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to open Directory(%08x)\n", status); #define DIR_TEST_CREATE_OPEN_SUCCESS(h,n) \ pRtlCreateUnicodeStringFromAsciiz(&str, n);\ DIR_TEST_CREATE_SUCCESS(h) pNtClose(h); DIR_TEST_OPEN_SUCCESS(h) pNtClose(h); \ @@ -192,13 +192,13 @@ pNtClose(h); status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); ok(status == STATUS_OBJECT_TYPE_MISMATCH, - "NtCreateMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08lx)\n", status); + "NtCreateMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08x)\n", status); pRtlFreeUnicodeString(&str); pRtlCreateUnicodeStringFromAsciiz(&str, "\\??\\PIPE\\om.c-mutant"); status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); ok(status == STATUS_OBJECT_TYPE_MISMATCH || status == STATUS_OBJECT_PATH_NOT_FOUND, - "NtCreateMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08lx)\n", status); + "NtCreateMutant should have failed with STATUS_OBJECT_TYPE_MISMATCH got(%08x)\n", status); pRtlFreeUnicodeString(&str); @@ -208,68 +208,68 @@ InitializeObjectAttributes(&attr, &str, OBJ_OPENIF, dir, NULL); h = CreateMutexA(NULL, FALSE, "om.c-test"); - ok(h != 0, "CreateMutexA failed got ret=%p (%ld)\n", h, GetLastError()); + ok(h != 0, "CreateMutexA failed got ret=%p (%d)\n", h, GetLastError()); status = pNtCreateMutant(&h1, GENERIC_ALL, &attr, FALSE); ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateMutant should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08lx)\n", status); + "NtCreateMutant should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); h2 = CreateMutexA(NULL, FALSE, "om.c-test"); winerr = GetLastError(); ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateMutexA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%ld)\n", h2, winerr); + "CreateMutexA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); pNtClose(h); pNtClose(h1); pNtClose(h2); h = CreateEventA(NULL, FALSE, FALSE, "om.c-test"); - ok(h != 0, "CreateEventA failed got ret=%p (%ld)\n", h, GetLastError()); + ok(h != 0, "CreateEventA failed got ret=%p (%d)\n", h, GetLastError()); status = pNtCreateEvent(&h1, GENERIC_ALL, &attr, FALSE, FALSE); ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateEvent should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08lx)\n", status); + "NtCreateEvent should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); h2 = CreateEventA(NULL, FALSE, FALSE, "om.c-test"); winerr = GetLastError(); ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateEventA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%ld)\n", h2, winerr); + "CreateEventA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); pNtClose(h); pNtClose(h1); pNtClose(h2); h = CreateSemaphoreA(NULL, 1, 2, "om.c-test"); - ok(h != 0, "CreateSemaphoreA failed got ret=%p (%ld)\n", h, GetLastError()); + ok(h != 0, "CreateSemaphoreA failed got ret=%p (%d)\n", h, GetLastError()); status = pNtCreateSemaphore(&h1, GENERIC_ALL, &attr, 1, 2); ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateSemaphore should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08lx)\n", status); + "NtCreateSemaphore should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); h2 = CreateSemaphoreA(NULL, 1, 2, "om.c-test"); winerr = GetLastError(); ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateSemaphoreA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%ld)\n", h2, winerr); + "CreateSemaphoreA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); pNtClose(h); pNtClose(h1); pNtClose(h2); h = CreateWaitableTimerA(NULL, TRUE, "om.c-test"); - ok(h != 0, "CreateWaitableTimerA failed got ret=%p (%ld)\n", h, GetLastError()); + ok(h != 0, "CreateWaitableTimerA failed got ret=%p (%d)\n", h, GetLastError()); status = pNtCreateTimer(&h1, GENERIC_ALL, &attr, NotificationTimer); ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateTimer should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08lx)\n", status); + "NtCreateTimer should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); h2 = CreateWaitableTimerA(NULL, TRUE, "om.c-test"); winerr = GetLastError(); ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateWaitableTimerA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%ld)\n", h2, winerr); + "CreateWaitableTimerA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); pNtClose(h); pNtClose(h1); pNtClose(h2); h = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 256, "om.c-test"); - ok(h != 0, "CreateFileMappingA failed got ret=%p (%ld)\n", h, GetLastError()); + ok(h != 0, "CreateFileMappingA failed got ret=%p (%d)\n", h, GetLastError()); size.u.LowPart = 256; size.u.HighPart = 0; status = pNtCreateSection(&h1, SECTION_MAP_WRITE, &attr, &size, PAGE_READWRITE, SEC_COMMIT, 0); ok(status == STATUS_OBJECT_NAME_EXISTS && h1 != NULL, - "NtCreateSection should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08lx)\n", status); + "NtCreateSection should have succeeded with STATUS_OBJECT_NAME_EXISTS got(%08x)\n", status); h2 = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 256, "om.c-test"); winerr = GetLastError(); ok(h2 != 0 && winerr == ERROR_ALREADY_EXISTS, - "CreateFileMappingA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%ld)\n", h2, winerr); + "CreateFileMappingA should have succeeded with ERROR_ALREADY_EXISTS got ret=%p (%d)\n", h2, winerr); pNtClose(h); pNtClose(h1); pNtClose(h2); @@ -288,17 +288,17 @@ /* No name and/or no attributes */ status = pNtCreateDirectoryObject(NULL, DIRECTORY_QUERY, &attr); ok(status == STATUS_ACCESS_VIOLATION, - "NtCreateDirectoryObject should have failed with STATUS_ACCESS_VIOLATION got(%08lx)\n", status); + "NtCreateDirectoryObject should have failed with STATUS_ACCESS_VIOLATION got(%08x)\n", status); status = pNtOpenDirectoryObject(NULL, DIRECTORY_QUERY, &attr); ok(status == STATUS_ACCESS_VIOLATION, - "NtOpenDirectoryObject should have failed with STATUS_ACCESS_VIOLATION got(%08lx)\n", status); + "NtOpenDirectoryObject should have failed with STATUS_ACCESS_VIOLATION got(%08x)\n", status); status = pNtCreateDirectoryObject(&h, DIRECTORY_QUERY, NULL); - ok(status == STATUS_SUCCESS, "Failed to create Directory without attributes(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to create Directory without attributes(%08x)\n", status); pNtClose(h); status = pNtOpenDirectoryObject(&h, DIRECTORY_QUERY, NULL); ok(status == STATUS_INVALID_PARAMETER, - "NtOpenDirectoryObject should have failed with STATUS_INVALID_PARAMETER got(%08lx)\n", status); + "NtOpenDirectoryObject should have failed with STATUS_INVALID_PARAMETER got(%08x)\n", status); InitializeObjectAttributes(&attr, NULL, 0, 0, NULL); DIR_TEST_CREATE_SUCCESS(&dir) @@ -334,7 +334,7 @@ pRtlCreateUnicodeStringFromAsciiz(&str, "\\BaseNamedObjects\\Local"); InitializeObjectAttributes(&attr, &str, 0, 0, NULL); status = pNtOpenSymbolicLinkObject(&dir, SYMBOLIC_LINK_QUERY, &attr);\ - ok(status == STATUS_SUCCESS, "Failed to open SymbolicLink(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to open SymbolicLink(%08x)\n", status); pRtlFreeUnicodeString(&str); InitializeObjectAttributes(&attr, &str, 0, dir, NULL); pRtlCreateUnicodeStringFromAsciiz(&str, "one more level"); @@ -421,23 +421,23 @@ pRtlCreateUnicodeStringFromAsciiz(&str, "\\om.c-mutant"); status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, - "NtCreateMutant should have failed with STATUS_OBJECT_PATH_SYNTAX_BAD got(%08lx)\n", status); + "NtCreateMutant should have failed with STATUS_OBJECT_PATH_SYNTAX_BAD got(%08x)\n", status); pRtlFreeUnicodeString(&str); pRtlCreateUnicodeStringFromAsciiz(&str, "\\om.c-mutant\\"); status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); ok(status == STATUS_OBJECT_PATH_SYNTAX_BAD, - "NtCreateMutant should have failed with STATUS_OBJECT_PATH_SYNTAX_BAD got(%08lx)\n", status); + "NtCreateMutant should have failed with STATUS_OBJECT_PATH_SYNTAX_BAD got(%08x)\n", status); pRtlFreeUnicodeString(&str); pRtlCreateUnicodeStringFromAsciiz(&str, "om.c\\-mutant"); status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); ok(status == STATUS_OBJECT_PATH_NOT_FOUND, - "NtCreateMutant should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08lx)\n", status); + "NtCreateMutant should have failed with STATUS_OBJECT_PATH_NOT_FOUND got(%08x)\n", status); pRtlFreeUnicodeString(&str); pRtlCreateUnicodeStringFromAsciiz(&str, "om.c-mutant"); status = pNtCreateMutant(&h, GENERIC_ALL, &attr, FALSE); - ok(status == STATUS_SUCCESS, "Failed to create Mutant(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to create Mutant(%08x)\n", status); pRtlFreeUnicodeString(&str); pNtClose(h); @@ -446,10 +446,10 @@ #define SYMLNK_TEST_CREATE_FAILURE(h,e) \ status = pNtCreateSymbolicLinkObject(h, SYMBOLIC_LINK_QUERY, &attr, &target);\ - ok(status == e,"NtCreateSymbolicLinkObject should have failed with %s got(%08lx)\n", #e, status); + ok(status == e,"NtCreateSymbolicLinkObject should have failed with %s got(%08x)\n", #e, status); #define SYMLNK_TEST_OPEN_FAILURE(h,e) \ status = pNtOpenSymbolicLinkObject(h, SYMBOLIC_LINK_QUERY, &attr);\ - ok(status == e,"NtOpenSymbolicLinkObject should have failed with %s got(%08lx)\n", #e, status); + ok(status == e,"NtOpenSymbolicLinkObject should have failed with %s got(%08x)\n", #e, status); #define SYMLNK_TEST_CREATE_OPEN_FAILURE(h,n,t,e) \ pRtlCreateUnicodeStringFromAsciiz(&str, n);\ pRtlCreateUnicodeStringFromAsciiz(&target, t);\ @@ -460,10 +460,10 @@ #define SYMLNK_TEST_CREATE_SUCCESS(h) \ status = pNtCreateSymbolicLinkObject(h, SYMBOLIC_LINK_QUERY, &attr, &target); \ - ok(status == STATUS_SUCCESS, "Failed to create SymbolicLink(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to create SymbolicLink(%08x)\n", status); #define SYMLNK_TEST_OPEN_SUCCESS(h) \ status = pNtOpenSymbolicLinkObject(h, SYMBOLIC_LINK_QUERY, &attr); \ - ok(status == STATUS_SUCCESS, "Failed to open SymbolicLink(%08lx)\n", status); + ok(status == STATUS_SUCCESS, "Failed to open SymbolicLink(%08x)\n", status); void test_symboliclink(void) { @@ -478,10 +478,10 @@ status = pNtCreateSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, NULL, NULL); ok(status == STATUS_ACCESS_VIOLATION, - "NtCreateSymbolicLinkObject should have failed with STATUS_ACCESS_VIOLATION got(%08lx)\n", status); + "NtCreateSymbolicLinkObject should have failed with STATUS_ACCESS_VIOLATION got(%08x)\n", status); status = pNtOpenSymbolicLinkObject(&h, SYMBOLIC_LINK_QUERY, NULL); ok(status == STATUS_INVALID_PARAMETER, - "NtOpenSymbolicLinkObject should have failed with STATUS_INVALID_PARAMETER got(%08lx)\n", status); + "NtOpenSymbolicLinkObject should have failed with STATUS_INVALID_PARAMETER got(%08x)\n", status); InitializeObjectAttributes(&attr, NULL, 0, 0, NULL); SYMLNK_TEST_CREATE_FAILURE(&link, STATUS_INVALID_PARAMETER) @@ -523,7 +523,7 @@ pRtlCreateUnicodeStringFromAsciiz(&str, "Local\\test-link\\PIPE"); status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN); - todo_wine ok(status == STATUS_SUCCESS, "Failed to open NamedPipe(%08lx)\n", status); + todo_wine ok(status == STATUS_SUCCESS, "Failed to open NamedPipe(%08x)\n", status); pRtlFreeUnicodeString(&str); pNtClose(h);
diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c index 14546f3..9d67b2c 100644 --- a/dlls/ntdll/tests/path.c +++ b/dlls/ntdll/tests/path.c
@@ -266,7 +266,7 @@ len= strlen(test->rname) * sizeof(WCHAR); pRtlMultiByteToUnicodeN(pathbufW , sizeof(pathbufW), NULL, test->path, strlen(test->path)+1 ); ret = pRtlGetFullPathName_U( pathbufW,MAX_PATH, rbufferW, &file_part); - ok( ret == len, "Wrong result %ld/%d for \"%s\"\n", ret, len, test->path ); + ok( ret == len, "Wrong result %d/%d for \"%s\"\n", ret, len, test->path ); ok(pRtlUnicodeToMultiByteN(rbufferA,MAX_PATH,&reslen,rbufferW,(lstrlenW(rbufferW) + 1) * sizeof(WCHAR)) == STATUS_SUCCESS, "RtlUnicodeToMultiByteN failed\n"); ok(lstrcmpiA(rbufferA,test->rname) == 0, "Got \"%s\" expected \"%s\"\n",rbufferA,test->rname);
diff --git a/dlls/ntdll/tests/port.c b/dlls/ntdll/tests/port.c index f751f4a..af9facb 100644 --- a/dlls/ntdll/tests/port.c +++ b/dlls/ntdll/tests/port.c
@@ -153,10 +153,10 @@ ok(!*LpcMessage->Data, "Expected empty string!\n"); status = pNtAcceptConnectPort(pAcceptPortHandle, 0, LpcMessage, 1, 0, NULL); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status); status = pNtCompleteConnectPort(*pAcceptPortHandle); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status); } static void ProcessLpcRequest(HANDLE PortHandle, PLPC_MESSAGE LpcMessage) @@ -171,7 +171,7 @@ lstrcpy((LPSTR)LpcMessage->Data, REPLY); status = pNtReplyPort(PortHandle, LpcMessage); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status); ok(LpcMessage->MessageType == LPC_REQUEST, "Expected LPC_REQUEST, got %d\n", LpcMessage->MessageType); ok(!lstrcmp((LPSTR)LpcMessage->Data, REPLY), @@ -192,10 +192,10 @@ sqos.EffectiveOnly = TRUE; status = pNtConnectPort(&PortHandle, &port, &sqos, 0, 0, &len, NULL, NULL); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status); status = pNtRegisterThreadTerminatePort(PortHandle); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status); size = FIELD_OFFSET(LPC_MESSAGE, Data) + MAX_MESSAGE_LEN; LpcMessage = HeapAlloc(GetProcessHeap(), 0, size); @@ -207,7 +207,7 @@ lstrcpy((LPSTR)LpcMessage->Data, REQUEST1); status = pNtRequestPort(PortHandle, LpcMessage); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status); ok(LpcMessage->MessageType == 0, "Expected 0, got %d\n", LpcMessage->MessageType); ok(!lstrcmp((LPSTR)LpcMessage->Data, REQUEST1), "Expected %s, got %s\n", REQUEST1, LpcMessage->Data); @@ -220,7 +220,7 @@ /* Send the message and wait for the reply */ status = pNtRequestWaitReplyPort(PortHandle, LpcMessage, out); - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status); ok(!lstrcmp((LPSTR)out->Data, REPLY), "Expected %s, got %s\n", REPLY, out->Data); ok(out->MessageType == LPC_REPLY, "Expected LPC_REPLY, got %d\n", out->MessageType); @@ -246,7 +246,7 @@ status = pNtCreatePort(&PortHandle, &obj, 100, 100, 0); todo_wine { - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d\n", status); } size = FIELD_OFFSET(LPC_MESSAGE, Data) + MAX_MESSAGE_LEN; @@ -258,7 +258,7 @@ status = pNtReplyWaitReceivePort(PortHandle, NULL, NULL, LpcMessage); todo_wine { - ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld(%lx)\n", status, status); + ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %d(%x)\n", status, status); } /* STATUS_INVALID_HANDLE: win2k without admin rights will perform an * endless loop here
diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 252a815..262e33f 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c
@@ -289,7 +289,7 @@ QueryTable[2].DefaultLength = 0; status = pRtlQueryRegistryValues(RelativeTo, winetestpath.Buffer, QueryTable, 0, 0); - ok(status == STATUS_SUCCESS, "RtlQueryRegistryValues return: 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "RtlQueryRegistryValues return: 0x%08x\n", status); pRtlFreeHeap(GetProcessHeap(), 0, QueryTable); } @@ -317,13 +317,13 @@ /* NULL key */ status = pNtOpenKey(NULL, 0, &attr); todo_wine - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status); + ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); /* Length > sizeof(OBJECT_ATTRIBUTES) */ attr.Length *= 2; status = pNtOpenKey(&key, am, &attr); todo_wine - ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08lx\n", status); + ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status); } static void test_NtCreateKey(void) @@ -336,35 +336,35 @@ /* All NULL */ status = pNtCreateKey(NULL, 0, NULL, 0, 0, 0, 0); - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status); + ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); /* Only the key */ status = pNtCreateKey(&key, 0, NULL, 0, 0, 0, 0); ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08lx\n", status); + "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status); /* Only accessmask */ status = pNtCreateKey(NULL, am, NULL, 0, 0, 0, 0); - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status); + ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); /* Key and accessmask */ status = pNtCreateKey(&key, am, NULL, 0, 0, 0, 0); ok(status == STATUS_ACCESS_VIOLATION /* W2K3/XP/W2K */ || status == STATUS_INVALID_PARAMETER /* NT4 */, - "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08lx\n", status); + "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x\n", status); InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); /* Only attributes */ status = pNtCreateKey(NULL, 0, &attr, 0, 0, 0, 0); - ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08lx\n", status); + ok(status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got: 0x%08x\n", status); status = pNtCreateKey(&key, am, &attr, 0, 0, 0, 0); - ok(status == STATUS_SUCCESS, "NtCreateKey Failed: 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "NtCreateKey Failed: 0x%08x\n", status); /* Length > sizeof(OBJECT_ATTRIBUTES) */ attr.Length *= 2; status = pNtCreateKey(&key, am, &attr, 0, 0, 0, 0); - ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08lx\n", status); + ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got: 0x%08x\n", status); pNtClose(&key); } @@ -382,10 +382,10 @@ InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); status = pNtOpenKey(&key, am, &attr); - ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "NtOpenKey Failed: 0x%08x\n", status); status = pNtSetValueKey(key, &ValName, 0, REG_DWORD, &data, sizeof(data)); - ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "NtSetValueKey Failed: 0x%08x\n", status); pRtlFreeUnicodeString(&ValName); pNtClose(&key); @@ -396,7 +396,7 @@ NTSTATUS status; HKEY handle; status=pRtlOpenCurrentUser(KEY_READ, &handle); - ok(status == STATUS_SUCCESS, "RtlOpenCurrentUser Failed: 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "RtlOpenCurrentUser Failed: 0x%08x\n", status); pNtClose(&handle); } @@ -405,10 +405,10 @@ NTSTATUS status; status = pRtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, winetestpath.Buffer); - ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE: 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE: 0x%08x\n", status); status = pRtlCheckRegistryKey((RTL_REGISTRY_ABSOLUTE | RTL_REGISTRY_OPTIONAL), winetestpath.Buffer); - ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and RTL_REGISTRY_OPTIONAL: 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "RtlCheckRegistryKey with RTL_REGISTRY_ABSOLUTE and RTL_REGISTRY_OPTIONAL: 0x%08x\n", status); } static void test_NtFlushKey(void) @@ -419,13 +419,13 @@ ACCESS_MASK am = KEY_ALL_ACCESS; status = pNtFlushKey(NULL); - ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08lx\n", status); + ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status); InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); pNtOpenKey(&hkey, am, &attr); status = pNtFlushKey(hkey); - ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08x\n", status); pNtClose(hkey); } @@ -438,13 +438,13 @@ ACCESS_MASK am = KEY_ALL_ACCESS; status = pNtDeleteKey(NULL); - ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08lx\n", status); + ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status); InitializeObjectAttributes(&attr, &winetestpath, 0, 0, 0); status = pNtOpenKey(&hkey, am, &attr); status = pNtDeleteKey(hkey); - ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "NtDeleteKey Failed: 0x%08x\n", status); } static void test_RtlpNtQueryValueKey(void) @@ -452,7 +452,7 @@ NTSTATUS status; status = pRtlpNtQueryValueKey(NULL, NULL, NULL, NULL); - ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08lx\n", status); + ok(status == STATUS_INVALID_HANDLE, "Expected STATUS_INVALID_HANDLE, got: 0x%08x\n", status); } START_TEST(reg)
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c index 9cb0d7f..59871de 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c
@@ -130,39 +130,39 @@ a[2]= 0x89ab; a[3]= 0xcdef; result = pRtlCompareMemoryUlong(a, 0, 0x0123); - ok(result == 0, "RtlCompareMemoryUlong(%p, 0, 0x0123) returns %lu, expected 0\n", a, result); + ok(result == 0, "RtlCompareMemoryUlong(%p, 0, 0x0123) returns %u, expected 0\n", a, result); result = pRtlCompareMemoryUlong(a, 3, 0x0123); - ok(result == 0, "RtlCompareMemoryUlong(%p, 3, 0x0123) returns %lu, expected 0\n", a, result); + ok(result == 0, "RtlCompareMemoryUlong(%p, 3, 0x0123) returns %u, expected 0\n", a, result); result = pRtlCompareMemoryUlong(a, 4, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 4, 0x0123) returns %lu, expected 4\n", a, result); + ok(result == 4, "RtlCompareMemoryUlong(%p, 4, 0x0123) returns %u, expected 4\n", a, result); result = pRtlCompareMemoryUlong(a, 5, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 5, 0x0123) returns %lu, expected 4\n", a, result); + ok(result == 4, "RtlCompareMemoryUlong(%p, 5, 0x0123) returns %u, expected 4\n", a, result); result = pRtlCompareMemoryUlong(a, 7, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 7, 0x0123) returns %lu, expected 4\n", a, result); + ok(result == 4, "RtlCompareMemoryUlong(%p, 7, 0x0123) returns %u, expected 4\n", a, result); result = pRtlCompareMemoryUlong(a, 8, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 8, 0x0123) returns %lu, expected 4\n", a, result); + ok(result == 4, "RtlCompareMemoryUlong(%p, 8, 0x0123) returns %u, expected 4\n", a, result); result = pRtlCompareMemoryUlong(a, 9, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 9, 0x0123) returns %lu, expected 4\n", a, result); + ok(result == 4, "RtlCompareMemoryUlong(%p, 9, 0x0123) returns %u, expected 4\n", a, result); result = pRtlCompareMemoryUlong(a, 4, 0x0127); - ok(result == 0, "RtlCompareMemoryUlong(%p, 4, 0x0127) returns %lu, expected 0\n", a, result); + ok(result == 0, "RtlCompareMemoryUlong(%p, 4, 0x0127) returns %u, expected 0\n", a, result); result = pRtlCompareMemoryUlong(a, 4, 0x7123); - ok(result == 0, "RtlCompareMemoryUlong(%p, 4, 0x7123) returns %lu, expected 0\n", a, result); + ok(result == 0, "RtlCompareMemoryUlong(%p, 4, 0x7123) returns %u, expected 0\n", a, result); result = pRtlCompareMemoryUlong(a, 16, 0x4567); - ok(result == 0, "RtlCompareMemoryUlong(%p, 16, 0x4567) returns %lu, expected 0\n", a, result); + ok(result == 0, "RtlCompareMemoryUlong(%p, 16, 0x4567) returns %u, expected 0\n", a, result); a[1]= 0x0123; result = pRtlCompareMemoryUlong(a, 3, 0x0123); - ok(result == 0, "RtlCompareMemoryUlong(%p, 3, 0x0123) returns %lu, expected 0\n", a, result); + ok(result == 0, "RtlCompareMemoryUlong(%p, 3, 0x0123) returns %u, expected 0\n", a, result); result = pRtlCompareMemoryUlong(a, 4, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 4, 0x0123) returns %lu, expected 4\n", a, result); + ok(result == 4, "RtlCompareMemoryUlong(%p, 4, 0x0123) returns %u, expected 4\n", a, result); result = pRtlCompareMemoryUlong(a, 5, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 5, 0x0123) returns %lu, expected 4\n", a, result); + ok(result == 4, "RtlCompareMemoryUlong(%p, 5, 0x0123) returns %u, expected 4\n", a, result); result = pRtlCompareMemoryUlong(a, 7, 0x0123); - ok(result == 4, "RtlCompareMemoryUlong(%p, 7, 0x0123) returns %lu, expected 4\n", a, result); + ok(result == 4, "RtlCompareMemoryUlong(%p, 7, 0x0123) returns %u, expected 4\n", a, result); result = pRtlCompareMemoryUlong(a, 8, 0x0123); - ok(result == 8, "RtlCompareMemoryUlong(%p, 8, 0x0123) returns %lu, expected 8\n", a, result); + ok(result == 8, "RtlCompareMemoryUlong(%p, 8, 0x0123) returns %u, expected 8\n", a, result); result = pRtlCompareMemoryUlong(a, 9, 0x0123); - ok(result == 8, "RtlCompareMemoryUlong(%p, 9, 0x0123) returns %lu, expected 8\n", a, result); + ok(result == 8, "RtlCompareMemoryUlong(%p, 9, 0x0123) returns %u, expected 8\n", a, result); } #define COPY(len) memset(dest,0,sizeof(dest_aligned_block)); pRtlMoveMemory(dest, src, len) @@ -266,7 +266,7 @@ result = pRtlUlonglongByteSwap( ((ULONGLONG)0x76543210 << 32) | 0x87654321 ); ok( (((ULONGLONG)0x21436587 << 32) | 0x10325476) == result, - "RtlUlonglongByteSwap(0x7654321087654321) returns 0x%lx%08lx, expected 0x2143658710325476\n", + "RtlUlonglongByteSwap(0x7654321087654321) returns 0x%x%08x, expected 0x2143658710325476\n", (DWORD)(result >> 32), (DWORD)result); } @@ -301,7 +301,7 @@ expected = 0x7fffffc3; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0)) returns %lx, expected %lx\n", + "RtlUniform(&seed (seed == 0)) returns %x, expected %x\n", result, expected); /* * The algorithm is now: @@ -322,7 +322,7 @@ expected = seed * 0xffffffed + 0x7fffffc3 + 1; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 1)) returns %lx, expected %lx\n", + "RtlUniform(&seed (seed == 1)) returns %x, expected %x\n", result, expected); /* * For seed = 2 the const_2 is 0x7fffffc3: @@ -331,7 +331,7 @@ expected = seed * 0xffffffed + 0x7fffffc3; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 2)) returns %lx, expected %lx\n", + "RtlUniform(&seed (seed == 2)) returns %x, expected %x\n", result, expected); /* * More tests show that if seed is odd the result must be incremented by 1: @@ -340,21 +340,21 @@ expected = seed * 0xffffffed + 0x7fffffc3 + (seed & 1); result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 2)) returns %lx, expected %lx\n", + "RtlUniform(&seed (seed == 2)) returns %x, expected %x\n", result, expected); seed = 0x6bca1aa; expected = seed * 0xffffffed + 0x7fffffc3; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1aa)) returns %lx, expected %lx\n", + "RtlUniform(&seed (seed == 0x6bca1aa)) returns %x, expected %x\n", result, expected); seed = 0x6bca1ab; expected = seed * 0xffffffed + 0x7fffffc3 + 1; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ab)) returns %lx, expected %lx\n", + "RtlUniform(&seed (seed == 0x6bca1ab)) returns %x, expected %x\n", result, expected); /* * When seed is 0x6bca1ac there is an exception: @@ -363,7 +363,7 @@ expected = seed * 0xffffffed + 0x7fffffc3 + 2; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ac)) returns %lx, expected %lx\n", + "RtlUniform(&seed (seed == 0x6bca1ac)) returns %x, expected %x\n", result, expected); /* * Note that up to here const_3 is not used @@ -375,14 +375,14 @@ expected = (seed * 0xffffffed + 0x7fffffc3) & MAXLONG; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ad)) returns %lx, expected %lx\n", + "RtlUniform(&seed (seed == 0x6bca1ad)) returns %x, expected %x\n", result, expected); seed = 0x6bca1ae; expected = (seed * 0xffffffed + 0x7fffffc3 + 1) & MAXLONG; result = pRtlUniform(&seed); ok(result == expected, - "RtlUniform(&seed (seed == 0x6bca1ae)) returns %lx, expected %lx\n", + "RtlUniform(&seed (seed == 0x6bca1ae)) returns %x, expected %x\n", result, expected); /* * There are several ranges where for odd or even seed the result must be @@ -490,10 +490,10 @@ seed_bak = seed; result = pRtlUniform(&seed); ok(result == expected, - "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n", + "test: 0x%x%08x RtlUniform(&seed (seed == %x)) returns %x, expected %x\n", (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected); ok(seed == expected, - "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n", + "test: 0x%x%08x RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n", (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected); } /* for */ /* @@ -537,10 +537,10 @@ seed_bak = seed; result = pRtlUniform(&seed); ok(result == expected, - "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n", + "test: 0x%x%08x RtlUniform(&seed (seed == %x)) returns %x, expected %x\n", (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected); ok(seed == expected, - "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n", + "test: 0x%x%08x RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n", (DWORD)(num >> 32), (DWORD)num, seed_bak, result, expected); } /* for */ /* @@ -617,10 +617,10 @@ seed_expected =0x44b; result = pRtlRandom(&seed); ok(result == result_expected, - "pRtlRandom(&seed (seed == 0)) returns %lx, expected %lx\n", + "pRtlRandom(&seed (seed == 0)) returns %x, expected %x\n", result, result_expected); ok(seed == seed_expected, - "pRtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx\n", + "pRtlRandom(&seed (seed == 0)) sets seed to %x, expected %x\n", seed, seed_expected); /* * Seed is not equal to result as with RtlUniform. To see more we @@ -631,10 +631,10 @@ seed_expected =0x44b; result = pRtlRandom(&seed); ok(result == result_expected, - "RtlRandom(&seed (seed == 0)) returns %lx, expected %lx\n", + "RtlRandom(&seed (seed == 0)) returns %x, expected %x\n", result, result_expected); ok(seed == seed_expected, - "RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx\n", + "RtlRandom(&seed (seed == 0)) sets seed to %x, expected %x\n", seed, seed_expected); /* * Seed is set to the same value as before but the result is different. @@ -645,10 +645,10 @@ seed_expected =0x44b; result = pRtlRandom(&seed); ok(result == result_expected, - "RtlRandom(&seed (seed == 0)) returns %lx, expected %lx\n", + "RtlRandom(&seed (seed == 0)) returns %x, expected %x\n", result, result_expected); ok(seed == seed_expected, - "RtlRandom(&seed (seed == 0)) sets seed to %lx, expected %lx\n", + "RtlRandom(&seed (seed == 0)) sets seed to %x, expected %x\n", seed, seed_expected); /* * Seed is aggain set to the same value as before. This time we also @@ -693,10 +693,10 @@ seed_expected =0x5a1; result = pRtlRandom(&seed); ok(result == result_expected, - "RtlRandom(&seed (seed == 1)) returns %lx, expected %lx\n", + "RtlRandom(&seed (seed == 1)) returns %x, expected %x\n", result, result_expected); ok(seed == seed_expected, - "RtlRandom(&seed (seed == 1)) sets seed to %lx, expected %lx\n", + "RtlRandom(&seed (seed == 1)) sets seed to %x, expected %x\n", seed, seed_expected); /* * If there is just one saved_value the result now would be @@ -754,10 +754,10 @@ } /* if */ result = pRtlRandom(&seed); ok(result == result_expected, - "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) returns %lx, expected %lx\n", + "test: 0x%x%08x RtlUniform(&seed (seed == %x)) returns %x, expected %x\n", (DWORD)(num >> 32), (DWORD)num, seed_bak, result, result_expected); ok(seed == seed_expected, - "test: 0x%lx%08lx RtlUniform(&seed (seed == %lx)) sets seed to %lx, expected %lx\n", + "test: 0x%x%08x RtlUniform(&seed (seed == %x)) sets seed to %x, expected %x\n", (DWORD)(num >> 32), (DWORD)num, seed_bak, result, seed_expected); } /* for */ } @@ -793,7 +793,7 @@ result = pRtlAreAllAccessesGranted(all_accesses[test_num].GrantedAccess, all_accesses[test_num].DesiredAccess); ok(all_accesses[test_num].result == result, - "(test %d): RtlAreAllAccessesGranted(%08lx, %08lx) returns %d, expected %d\n", + "(test %d): RtlAreAllAccessesGranted(%08x, %08x) returns %d, expected %d\n", test_num, all_accesses[test_num].GrantedAccess, all_accesses[test_num].DesiredAccess, result, all_accesses[test_num].result); @@ -830,7 +830,7 @@ result = pRtlAreAnyAccessesGranted(any_accesses[test_num].GrantedAccess, any_accesses[test_num].DesiredAccess); ok(any_accesses[test_num].result == result, - "(test %d): RtlAreAnyAccessesGranted(%08lx, %08lx) returns %d, expected %d\n", + "(test %d): RtlAreAnyAccessesGranted(%08x, %08x) returns %d, expected %d\n", test_num, any_accesses[test_num].GrantedAccess, any_accesses[test_num].DesiredAccess, result, any_accesses[test_num].result); @@ -845,7 +845,7 @@ return; crc = pRtlComputeCrc32(crc, (LPBYTE)src, LEN); - ok(crc == 0x40861dc2,"Expected 0x40861dc2, got %8lx\n", crc); + ok(crc == 0x40861dc2,"Expected 0x40861dc2, got %8x\n", crc); } @@ -879,7 +879,7 @@ result = pRtlFreeHandle(&HandleTable, &MyHandle->RtlHandle); ok(result, "Couldn't free handle %p\n", MyHandle); status = pRtlDestroyHandleTable(&HandleTable); - ok(status == STATUS_SUCCESS, "RtlDestroyHandleTable failed with error 0x%08lx\n", status); + ok(status == STATUS_SUCCESS, "RtlDestroyHandleTable failed with error 0x%08x\n", status); } static void test_RtlAllocateAndInitializeSid(void) @@ -889,16 +889,16 @@ PSID psid; ret = pRtlAllocateAndInitializeSid(&sia, 0, 1, 2, 3, 4, 5, 6, 7, 8, &psid); - ok(!ret, "RtlAllocateAndInitializeSid error %08lx\n", ret); + ok(!ret, "RtlAllocateAndInitializeSid error %08x\n", ret); ret = pRtlFreeSid(psid); - ok(!ret, "RtlFreeSid error %08lx\n", ret); + ok(!ret, "RtlFreeSid error %08x\n", ret); /* these tests crash on XP ret = pRtlAllocateAndInitializeSid(NULL, 0, 1, 2, 3, 4, 5, 6, 7, 8, &psid); ret = pRtlAllocateAndInitializeSid(&sia, 0, 1, 2, 3, 4, 5, 6, 7, 8, NULL);*/ ret = pRtlAllocateAndInitializeSid(&sia, 9, 1, 2, 3, 4, 5, 6, 7, 8, &psid); - ok(ret == STATUS_INVALID_SID, "wrong error %08lx\n", ret); + ok(ret == STATUS_INVALID_SID, "wrong error %08x\n", ret); } START_TEST(rtl)
diff --git a/dlls/ntdll/tests/rtlbitmap.c b/dlls/ntdll/tests/rtlbitmap.c index b69b66c..fc7f6c5 100644 --- a/dlls/ntdll/tests/rtlbitmap.c +++ b/dlls/ntdll/tests/rtlbitmap.c
@@ -425,14 +425,14 @@ ulLong <<= i; cPos = pRtlFindMostSignificantBit(ulLong); - ok (cPos == i, "didn't find MSB 0x%lx%08lx %d %d\n", + ok (cPos == i, "didn't find MSB 0x%x%08x %d %d\n", (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos); /* Set all bits lower than bit i */ ulLong = ((ulLong - 1) << 1) | 1; cPos = pRtlFindMostSignificantBit(ulLong); - ok (cPos == i, "didn't find MSB 0x%lx%08lx %d %d\n", + ok (cPos == i, "didn't find MSB 0x%x%08x %d %d\n", (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos); } cPos = pRtlFindMostSignificantBit(0); @@ -453,13 +453,13 @@ ulLong = (ULONGLONG)1 << i; cPos = pRtlFindLeastSignificantBit(ulLong); - ok (cPos == i, "didn't find LSB 0x%lx%08lx %d %d\n", + ok (cPos == i, "didn't find LSB 0x%x%08x %d %d\n", (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos); ulLong = ~((ULONGLONG)0) << i; cPos = pRtlFindLeastSignificantBit(ulLong); - ok (cPos == i, "didn't find LSB 0x%lx%08lx %d %d\n", + ok (cPos == i, "didn't find LSB 0x%x%08x %d %d\n", (DWORD)(ulLong >> 32), (DWORD)ulLong, i, cPos); } cPos = pRtlFindLeastSignificantBit(0); @@ -532,7 +532,7 @@ ULONG ulStart = 0; ulCount = pRtlFindLongestRunSet(&bm, &ulStart); - ok(ulCount == 33 && ulStart == 1877,"didn't find longest %ld %ld\n",ulCount,ulStart); + ok(ulCount == 33 && ulStart == 1877,"didn't find longest %d %d\n",ulCount,ulStart); memset(buff, 0, sizeof(buff)); ulCount = pRtlFindLongestRunSet(&bm, &ulStart);
diff --git a/dlls/ntdll/tests/rtlstr.c b/dlls/ntdll/tests/rtlstr.c index a972598..52f0ee3 100644 --- a/dlls/ntdll/tests/rtlstr.c +++ b/dlls/ntdll/tests/rtlstr.c
@@ -199,7 +199,7 @@ uni.Buffer = (void *) 0xdeadbeef; result = pRtlInitUnicodeStringEx(&uni, teststring); ok(result == STATUS_SUCCESS, - "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected 0\n", + "pRtlInitUnicodeStringEx(&uni, 0) returns %x, expected 0\n", result); ok(uni.Length == 32, "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", @@ -230,7 +230,7 @@ uni.Buffer = (void *) 0xdeadbeef; result = pRtlInitUnicodeStringEx(&uni, teststring2); ok(result == STATUS_NAME_TOO_LONG, - "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %lx\n", + "pRtlInitUnicodeStringEx(&uni, 0) returns %x, expected %x\n", result, STATUS_NAME_TOO_LONG); ok(uni.Length == 12345, "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", @@ -263,7 +263,7 @@ uni.Buffer = (void *) 0xdeadbeef; result = pRtlInitUnicodeStringEx(&uni, 0); ok(result == STATUS_SUCCESS, - "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected 0\n", + "pRtlInitUnicodeStringEx(&uni, 0) returns %x, expected 0\n", result); ok(uni.Length == 0, "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", @@ -439,7 +439,7 @@ dest_ansi_buf[dest_ansi_str.Length] = '\0'; dest_ansi_str.Buffer = dest_ansi_buf; ok(result == dupl_ustr[test_num].result, - "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has result %lx, expected %lx\n", + "(test %d): RtlDuplicateUnicodeString(%d, source, dest) has result %x, expected %x\n", test_num, dupl_ustr[test_num].add_nul, result, dupl_ustr[test_num].result); ok(dest_str.Length == dupl_ustr[test_num].res_Length, "(test %d): RtlDuplicateUnicodeString(%d, source, dest) destination has Length %d, expected %d\n", @@ -778,7 +778,7 @@ } result = pRtlUnicodeStringToAnsiString(&ansi_str, &uni_str, ustr2astr[test_num].doalloc); ok(result == ustr2astr[test_num].result, - "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has result %lx, expected %lx\n", + "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) has result %x, expected %x\n", test_num, ustr2astr[test_num].doalloc, result, ustr2astr[test_num].result); ok(ansi_str.Length == ustr2astr[test_num].res_Length, "(test %d): RtlUnicodeStringToAnsiString(ansi, uni, %d) ansi has Length %d, expected %d\n", @@ -839,7 +839,7 @@ } result = pRtlAppendAsciizToString(&dest_str, app_asc2str[test_num].src); ok(result == app_asc2str[test_num].result, - "(test %d): RtlAppendAsciizToString(dest, src) has result %lx, expected %lx\n", + "(test %d): RtlAppendAsciizToString(dest, src) has result %x, expected %x\n", test_num, result, app_asc2str[test_num].result); ok(dest_str.Length == app_asc2str[test_num].res_Length, "(test %d): RtlAppendAsciizToString(dest, src) dest has Length %d, expected %d\n", @@ -920,7 +920,7 @@ } result = pRtlAppendStringToString(&dest_str, &src_str); ok(result == app_str2str[test_num].result, - "(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx\n", + "(test %d): RtlAppendStringToString(dest, src) has result %x, expected %x\n", test_num, result, app_str2str[test_num].result); ok(dest_str.Length == app_str2str[test_num].res_Length, "(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d\n", @@ -992,7 +992,7 @@ } result = pRtlAppendUnicodeToString(&dest_str, (LPCWSTR) app_uni2str[test_num].src); ok(result == app_uni2str[test_num].result, - "(test %d): RtlAppendUnicodeToString(dest, src) has result %lx, expected %lx\n", + "(test %d): RtlAppendUnicodeToString(dest, src) has result %x, expected %x\n", test_num, result, app_uni2str[test_num].result); ok(dest_str.Length == app_uni2str[test_num].res_Length, "(test %d): RtlAppendUnicodeToString(dest, src) dest has Length %d, expected %d\n", @@ -1077,7 +1077,7 @@ } result = pRtlAppendUnicodeStringToString(&dest_str, &src_str); ok(result == app_ustr2str[test_num].result, - "(test %d): RtlAppendStringToString(dest, src) has result %lx, expected %lx\n", + "(test %d): RtlAppendStringToString(dest, src) has result %x, expected %x\n", test_num, result, app_ustr2str[test_num].result); ok(dest_str.Length == app_ustr2str[test_num].res_Length, "(test %d): RtlAppendStringToString(dest, src) dest has Length %d, expected %d\n", @@ -1196,7 +1196,7 @@ pos = 12345; result = pRtlFindCharInUnicodeString(find_ch_in_ustr[test_num].flags, &main_str, &search_chars, &pos); ok(result == find_ch_in_ustr[test_num].result, - "(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) has result %lx, expected %lx\n", + "(test %d): RtlFindCharInUnicodeString(%d, %s, %s, [out]) has result %x, expected %x\n", test_num, find_ch_in_ustr[test_num].flags, find_ch_in_ustr[test_num].main_str, find_ch_in_ustr[test_num].search_chars, result, find_ch_in_ustr[test_num].result); @@ -1347,7 +1347,7 @@ pRtlInitUnicodeString(&uni, wstr); result = pRtlUnicodeStringToInteger(&uni, str2int[test_num].base, &value); ok(result == str2int[test_num].result, - "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx\n", + "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) has result %x, expected: %x\n", test_num, str2int[test_num].str, str2int[test_num].base, result, str2int[test_num].result); ok(value == str2int[test_num].value, "(test %d): RtlUnicodeStringToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n", @@ -1359,17 +1359,17 @@ pRtlInitUnicodeString(&uni, wstr); result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, NULL); ok(result == STATUS_ACCESS_VIOLATION, - "call failed: RtlUnicodeStringToInteger(\"%s\", %d, NULL) has result %lx\n", + "call failed: RtlUnicodeStringToInteger(\"%s\", %d, NULL) has result %x\n", str2int[1].str, str2int[1].base, result); result = pRtlUnicodeStringToInteger(&uni, 20, NULL); ok(result == STATUS_INVALID_PARAMETER, - "call failed: RtlUnicodeStringToInteger(\"%s\", 20, NULL) has result %lx\n", + "call failed: RtlUnicodeStringToInteger(\"%s\", 20, NULL) has result %x\n", str2int[1].str, result); uni.Length = 10; /* Make Length shorter (5 WCHARS instead of 7) */ result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value); ok(result == STATUS_SUCCESS, - "call failed: RtlUnicodeStringToInteger(\"12345\", %d, [out]) has result %lx\n", + "call failed: RtlUnicodeStringToInteger(\"12345\", %d, [out]) has result %x\n", str2int[1].base, result); ok(value == 12345, "didn't return expected value (test a): expected: %d, got: %d\n", @@ -1378,7 +1378,7 @@ uni.Length = 5; /* Use odd Length (2.5 WCHARS) */ result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value); ok(result == STATUS_SUCCESS, - "call failed: RtlUnicodeStringToInteger(\"12\", %d, [out]) has result %lx\n", + "call failed: RtlUnicodeStringToInteger(\"12\", %d, [out]) has result %x\n", str2int[1].base, result); ok(value == 12, "didn't return expected value (test b): expected: %d, got: %d\n", @@ -1387,7 +1387,7 @@ uni.Length = 2; result = pRtlUnicodeStringToInteger(&uni, str2int[1].base, &value); ok(result == STATUS_SUCCESS, - "call failed: RtlUnicodeStringToInteger(\"1\", %d, [out]) has result %lx\n", + "call failed: RtlUnicodeStringToInteger(\"1\", %d, [out]) has result %x\n", str2int[1].base, result); ok(value == 1, "didn't return expected value (test c): expected: %d, got: %d\n", @@ -1409,7 +1409,7 @@ value = 0xdeadbeef; result = pRtlCharToInteger(str2int[test_num].str, str2int[test_num].base, &value); ok(result == str2int[test_num].result, - "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) has result %lx, expected: %lx\n", + "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) has result %x, expected: %x\n", test_num, str2int[test_num].str, str2int[test_num].base, result, str2int[test_num].result); ok(value == str2int[test_num].value, "(test %d): call failed: RtlCharToInteger(\"%s\", %d, [out]) assigns value %d, expected: %d\n", @@ -1419,12 +1419,12 @@ result = pRtlCharToInteger(str2int[1].str, str2int[1].base, NULL); ok(result == STATUS_ACCESS_VIOLATION, - "call failed: RtlCharToInteger(\"%s\", %d, NULL) has result %lx\n", + "call failed: RtlCharToInteger(\"%s\", %d, NULL) has result %x\n", str2int[1].str, str2int[1].base, result); result = pRtlCharToInteger(str2int[1].str, 20, NULL); ok(result == STATUS_INVALID_PARAMETER, - "call failed: RtlCharToInteger(\"%s\", 20, NULL) has result %lx\n", + "call failed: RtlCharToInteger(\"%s\", 20, NULL) has result %x\n", str2int[1].str, result); } @@ -1592,22 +1592,22 @@ } } else { ok(result == int2str->result, - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) has result %lx, expected: %lx\n", + "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) has result %x, expected: %x\n", test_num, int2str->value, int2str->base, result, int2str->result); if (result == STATUS_SUCCESS) { ok(unicode_string.Buffer[unicode_string.Length/sizeof(WCHAR)] == '\0', - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string \"%s\" is not NULL terminated\n", + "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) string \"%s\" is not NULL terminated\n", test_num, int2str->value, int2str->base, ansi_str.Buffer); } } ok(memcmp(unicode_string.Buffer, expected_unicode_string.Buffer, STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", test_num, int2str->value, int2str->base, ansi_str.Buffer, expected_ansi_str.Buffer); ok(unicode_string.Length == expected_unicode_string.Length, - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has Length %d, expected: %d\n", + "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) string has Length %d, expected: %d\n", test_num, int2str->value, int2str->base, unicode_string.Length, expected_unicode_string.Length); ok(unicode_string.MaximumLength == expected_unicode_string.MaximumLength, - "(test %d): RtlIntegerToUnicodeString(%lu, %d, [out]) string has MaximumLength %d, expected: %d\n", + "(test %d): RtlIntegerToUnicodeString(%u, %d, [out]) string has MaximumLength %d, expected: %d\n", test_num, int2str->value, int2str->base, unicode_string.MaximumLength, expected_unicode_string.MaximumLength); pRtlFreeAnsiString(&expected_ansi_str); pRtlFreeAnsiString(&ansi_str); @@ -1632,10 +1632,10 @@ dest_str[STRI_BUFFER_LENGTH] = '\0'; result = pRtlIntegerToChar(int2str->value, int2str->base, int2str->MaximumLength, dest_str); ok(result == int2str->result, - "(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) has result %lx, expected: %lx\n", + "(test %d): RtlIntegerToChar(%u, %d, %d, [out]) has result %x, expected: %x\n", test_num, int2str->value, int2str->base, int2str->MaximumLength, result, int2str->result); ok(memcmp(dest_str, int2str->Buffer, STRI_BUFFER_LENGTH) == 0, - "(test %d): RtlIntegerToChar(%lu, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): RtlIntegerToChar(%u, %d, %d, [out]) assigns string \"%s\", expected: \"%s\"\n", test_num, int2str->value, int2str->base, int2str->MaximumLength, dest_str, int2str->Buffer); } @@ -1650,22 +1650,22 @@ result = pRtlIntegerToChar(int2str[0].value, 20, int2str[0].MaximumLength, NULL); ok(result == STATUS_INVALID_PARAMETER, - "(test a): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %lx\n", + "(test a): RtlIntegerToChar(%u, %d, %d, NULL) has result %x, expected: %x\n", int2str[0].value, 20, int2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); result = pRtlIntegerToChar(int2str[0].value, 20, 0, NULL); ok(result == STATUS_INVALID_PARAMETER, - "(test b): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %lx\n", + "(test b): RtlIntegerToChar(%u, %d, %d, NULL) has result %x, expected: %x\n", int2str[0].value, 20, 0, result, STATUS_INVALID_PARAMETER); result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, 0, NULL); ok(result == STATUS_BUFFER_OVERFLOW, - "(test c): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %lx\n", + "(test c): RtlIntegerToChar(%u, %d, %d, NULL) has result %x, expected: %x\n", int2str[0].value, int2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW); result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, int2str[0].MaximumLength, NULL); ok(result == STATUS_ACCESS_VIOLATION, - "(test d): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %lx\n", + "(test d): RtlIntegerToChar(%u, %d, %d, NULL) has result %x, expected: %x\n", int2str[0].value, int2str[0].base, int2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION); } @@ -1688,7 +1688,7 @@ str.Buffer = (LPWSTR)szGuid; ret = pRtlGUIDFromString(&str, &guid); - ok(ret == 0, "expected ret=0, got 0x%0lx\n", ret); + ok(ret == 0, "expected ret=0, got 0x%0x\n", ret); ok(memcmp(&guid, &IID_Endianess, sizeof(guid)) == 0, "Endianess broken\n"); str.Length = str.MaximumLength = (sizeof(szGuid2) - 1) / sizeof(WCHAR); @@ -1707,7 +1707,7 @@ str.Buffer = NULL; ret = pRtlStringFromGUID(&IID_Endianess, &str); - ok(ret == 0, "expected ret=0, got 0x%0lx\n", ret); + ok(ret == 0, "expected ret=0, got 0x%0x\n", ret); ok(str.Buffer && !lstrcmpW(str.Buffer, szGuid), "Endianess broken\n"); }
diff --git a/dlls/ntdll/tests/string.c b/dlls/ntdll/tests/string.c index 8b427b9..01e671e 100644 --- a/dlls/ntdll/tests/string.c +++ b/dlls/ntdll/tests/string.c
@@ -413,7 +413,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_itow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test a): _itow(%ld, NULL, 10) has result %p, expected: NULL\n", + "(test a): _itow(%d, NULL, 10) has result %p, expected: NULL\n", ulong2str[0].value, result); for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { @@ -422,7 +422,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_ltow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test b): _ltow(%ld, NULL, 10) has result %p, expected: NULL\n", + "(test b): _ltow(%d, NULL, 10) has result %p, expected: NULL\n", ulong2str[0].value, result); for (pos = 0; pos < LARGE_STRI_BUFFER_LENGTH; pos++) { @@ -431,7 +431,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_ultow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test c): _ultow(%ld, NULL, 10) has result %p, expected: NULL\n", + "(test c): _ultow(%d, NULL, 10) has result %p, expected: NULL\n", ulong2str[0].value, result); } @@ -673,7 +673,7 @@ result = p_i64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base); pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); ok(result == dest_wstr, - "(test %d): _i64tow(0x%lx%08lx, [out], %d) has result %p, expected: %p\n", + "(test %d): _i64tow(0x%x%08x, [out], %d) has result %p, expected: %p\n", test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, ulonglong2str->base, result, dest_wstr); if (ulonglong2str->mask & 0x04) { @@ -684,14 +684,14 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; if (memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) != 0) { ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _i64tow(0x%lx%08lx, [out], %d) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): _i64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer); } /* if */ } /* if */ } else { ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _i64tow(0x%lx%08lx, [out], %d) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): _i64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer); } /* if */ @@ -724,11 +724,11 @@ result = p_ui64tow(ulonglong2str->value, dest_wstr, ulonglong2str->base); pRtlUnicodeStringToAnsiString(&ansi_str, &unicode_string, 1); ok(result == dest_wstr, - "(test %d): _ui64tow(0x%lx%08lx, [out], %d) has result %p, expected: %p\n", + "(test %d): _ui64tow(0x%x%08x, [out], %d) has result %p, expected: %p\n", test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, ulonglong2str->base, result, dest_wstr); ok(memcmp(dest_wstr, expected_wstr, LARGE_STRI_BUFFER_LENGTH * sizeof(WCHAR)) == 0, - "(test %d): _ui64tow(0x%lx%08lx, [out], %d) assigns string \"%s\", expected: \"%s\"\n", + "(test %d): _ui64tow(0x%x%08x, [out], %d) assigns string \"%s\", expected: \"%s\"\n", test_num, (DWORD)(ulonglong2str->value >> 32), (DWORD)ulonglong2str->value, ulonglong2str->base, ansi_str.Buffer, ulonglong2str->Buffer); pRtlFreeAnsiString(&ansi_str); @@ -759,7 +759,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_i64tow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test d): _i64tow(0x%lx%08lx, NULL, 10) has result %p, expected: NULL\n", + "(test d): _i64tow(0x%x%08x, NULL, 10) has result %p, expected: NULL\n", (DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result); if (p_ui64tow) { @@ -769,7 +769,7 @@ expected_wstr[LARGE_STRI_BUFFER_LENGTH] = '\0'; result = p_ui64tow(ulong2str[0].value, NULL, 10); ok(result == NULL, - "(test e): _ui64tow(0x%lx%08lx, NULL, 10) has result %p, expected: NULL\n", + "(test e): _ui64tow(0x%x%08x, NULL, 10) has result %p, expected: NULL\n", (DWORD)(ulonglong2str[0].value >> 32), (DWORD)ulonglong2str[0].value, result); } /* if */ } @@ -896,7 +896,7 @@ pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str); result = p_wtoi(uni.Buffer); ok(result == str2long[test_num].value, - "(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %ld\n", + "(test %d): call failed: _wtoi(\"%s\") has result %d, expected: %d\n", test_num, str2long[test_num].str, result, str2long[test_num].value); pRtlFreeUnicodeString(&uni); } /* for */ @@ -913,7 +913,7 @@ pRtlCreateUnicodeStringFromAsciiz(&uni, str2long[test_num].str); result = p_wtol(uni.Buffer); ok(result == str2long[test_num].value, - "(test %d): call failed: _wtol(\"%s\") has result %ld, expected: %ld\n", + "(test %d): call failed: _wtol(\"%s\") has result %d, expected: %d\n", test_num, str2long[test_num].str, result, str2long[test_num].value); pRtlFreeUnicodeString(&uni); } /* for */ @@ -1051,7 +1051,7 @@ for (test_num = 0; test_num < NB_STR2LONGLONG; test_num++) { result = p_atoi64(str2longlong[test_num].str); ok(result == str2longlong[test_num].value, - "(test %d): call failed: _atoi64(\"%s\") has result 0x%lx%08lx, expected: 0x%lx%08lx\n", + "(test %d): call failed: _atoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n", test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result, (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value); } /* for */ @@ -1068,7 +1068,7 @@ pRtlCreateUnicodeStringFromAsciiz(&uni, str2longlong[test_num].str); result = p_wtoi64(uni.Buffer); ok(result == str2longlong[test_num].value, - "(test %d): call failed: _wtoi64(\"%s\") has result 0x%lx%08lx, expected: 0x%lx%08lx\n", + "(test %d): call failed: _wtoi64(\"%s\") has result 0x%x%08x, expected: 0x%x%08x\n", test_num, str2longlong[test_num].str, (DWORD)(result >> 32), (DWORD)result, (DWORD)(str2longlong[test_num].value >> 32), (DWORD)str2longlong[test_num].value); pRtlFreeUnicodeString(&uni);