Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/heap.c | 179 ++++++++++++++++++++++---------------------- 1 file changed, 90 insertions(+), 89 deletions(-)
diff --git a/dlls/kernel32/tests/heap.c b/dlls/kernel32/tests/heap.c index 8558bd7f1b3..a910645e666 100644 --- a/dlls/kernel32/tests/heap.c +++ b/dlls/kernel32/tests/heap.c @@ -19,6 +19,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdarg.h> #include <stdlib.h> @@ -107,7 +108,7 @@ static void test_heap(void) mem = HeapAlloc(GetProcessHeap(), 0, size); heap_size = HeapSize(GetProcessHeap(), 0, mem); ok(heap_size == size || heap_size == resize_9x(size), - "HeapSize returned %lu instead of %lu or %lu\n", heap_size, size, resize_9x(size)); + "HeapSize returned %Iu instead of %Iu or %Iu\n", heap_size, size, resize_9x(size)); HeapFree(GetProcessHeap(), 0, mem); }
@@ -126,7 +127,7 @@ static void test_heap(void) ok(msecond != NULL, "HeapReAlloc(0) should have succeeded\n"); size = HeapSize(GetProcessHeap(), 0, msecond); ok(size == 0 || broken(size == 1) /* some vista and win7 */, - "HeapSize should have returned 0 instead of %lu\n", size); + "HeapSize should have returned 0 instead of %Iu\n", size); HeapFree(GetProcessHeap(), 0, msecond);
/* large blocks must be 16-byte aligned */ @@ -143,16 +144,16 @@ static void test_heap(void) gbl = GlobalReAlloc(gbl, 10, GMEM_MOVEABLE); ok(gbl != NULL, "Can't realloc global memory\n"); size = GlobalSize(gbl); - ok(size >= 10 && size <= 16, "Memory not resized to size 10, instead size=%ld\n", size); + ok(size >= 10 && size <= 16, "Memory not resized to size 10, instead size=%Id\n", size);
gbl = GlobalReAlloc(gbl, 0, GMEM_MOVEABLE); ok(gbl != NULL, "GlobalReAlloc should not fail on size 0\n");
size = GlobalSize(gbl); - ok(size == 0, "Memory not resized to size 0, instead size=%ld\n", size); + ok(size == 0, "Memory not resized to size 0, instead size=%Id\n", size); ok(GlobalFree(gbl) == NULL, "Memory not freed\n"); size = GlobalSize(gbl); - ok(size == 0, "Memory should have been freed, size=%ld\n", size); + ok(size == 0, "Memory should have been freed, size=%Id\n", size);
gbl = GlobalReAlloc(0, 10, GMEM_MOVEABLE); ok(gbl == NULL, "global realloc allocated memory\n"); @@ -162,39 +163,39 @@ static void test_heap(void)
SetLastError(MAGIC_DEAD); mem = GlobalLock(gbl); /* #1 */ - ok(mem != NULL, "returned %p with %d (expected '!= NULL')\n", mem, GetLastError()); + ok(mem != NULL, "returned %p with %ld (expected '!= NULL')\n", mem, GetLastError()); SetLastError(MAGIC_DEAD); flags = GlobalFlags(gbl); - ok( flags == 1, "returned 0x%04x with %d (expected '0x0001')\n", + ok( flags == 1, "returned 0x%04x with %ld (expected '0x0001')\n", flags, GetLastError());
SetLastError(MAGIC_DEAD); msecond = GlobalLock(gbl); /* #2 */ - ok( msecond == mem, "returned %p with %d (expected '%p')\n", + ok( msecond == mem, "returned %p with %ld (expected '%p')\n", msecond, GetLastError(), mem); SetLastError(MAGIC_DEAD); flags = GlobalFlags(gbl); - ok( flags == 2, "returned 0x%04x with %d (expected '0x0002')\n", + ok( flags == 2, "returned 0x%04x with %ld (expected '0x0002')\n", flags, GetLastError()); SetLastError(MAGIC_DEAD);
SetLastError(MAGIC_DEAD); res = GlobalUnlock(gbl); /* #1 */ - ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError()); + ok(res, "returned %ld with %ld (expected '!= 0')\n", res, GetLastError()); SetLastError(MAGIC_DEAD); flags = GlobalFlags(gbl); - ok( flags , "returned 0x%04x with %d (expected '!= 0')\n", + ok( flags , "returned 0x%04x with %ld (expected '!= 0')\n", flags, GetLastError());
SetLastError(MAGIC_DEAD); res = GlobalUnlock(gbl); /* #0 */ /* NT: ERROR_SUCCESS (documented on MSDN), 9x: untouched */ ok(!res && ((GetLastError() == ERROR_SUCCESS) || (GetLastError() == MAGIC_DEAD)), - "returned %d with %d (expected '0' with: ERROR_SUCCESS or " + "returned %ld with %ld (expected '0' with: ERROR_SUCCESS or " "MAGIC_DEAD)\n", res, GetLastError()); SetLastError(MAGIC_DEAD); flags = GlobalFlags(gbl); - ok( !flags , "returned 0x%04x with %d (expected '0')\n", + ok( !flags , "returned 0x%04x with %ld (expected '0')\n", flags, GetLastError());
/* Unlock an already unlocked Handle */ @@ -203,7 +204,7 @@ static void test_heap(void) /* NT: ERROR_NOT_LOCKED, 9x: untouched */ ok( !res && ((GetLastError() == ERROR_NOT_LOCKED) || (GetLastError() == MAGIC_DEAD)), - "returned %d with %d (expected '0' with: ERROR_NOT_LOCKED or " + "returned %ld with %ld (expected '0' with: ERROR_NOT_LOCKED or " "MAGIC_DEAD)\n", res, GetLastError());
GlobalFree(gbl); @@ -211,35 +212,35 @@ static void test_heap(void) SetLastError(MAGIC_DEAD); hsecond = GlobalFree(gbl); /* invalid handle: free memory twice */ ok( (hsecond == gbl) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %p with 0x%08x (expected %p with ERROR_INVALID_HANDLE)\n", + "returned %p with 0x%08lx (expected %p with ERROR_INVALID_HANDLE)\n", hsecond, GetLastError(), gbl); SetLastError(MAGIC_DEAD); hsecond = GlobalFree(LongToHandle(0xdeadbeef)); /* bogus handle */ ok( (hsecond == LongToHandle(0xdeadbeef)) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %p with 0x%08x (expected %p with ERROR_INVALID_HANDLE)\n", + "returned %p with 0x%08lx (expected %p with ERROR_INVALID_HANDLE)\n", hsecond, GetLastError(), LongToHandle(0xdeadbeef)); SetLastError(MAGIC_DEAD); hsecond = GlobalFree(LongToHandle(0xdeadbee0)); /* bogus pointer */ ok( (hsecond == LongToHandle(0xdeadbee0)) && ((GetLastError() == ERROR_INVALID_HANDLE) || broken(GetLastError() == ERROR_NOACCESS) /* wvista+ */), - "returned %p with 0x%08x (expected %p with ERROR_NOACCESS)\n", + "returned %p with 0x%08lx (expected %p with ERROR_NOACCESS)\n", hsecond, GetLastError(), LongToHandle(0xdeadbee0));
SetLastError(MAGIC_DEAD); flags = GlobalFlags(gbl); ok( (flags == GMEM_INVALID_HANDLE) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned 0x%04x with 0x%08x (expected GMEM_INVALID_HANDLE with " + "returned 0x%04x with 0x%08lx (expected GMEM_INVALID_HANDLE with " "ERROR_INVALID_HANDLE)\n", flags, GetLastError()); SetLastError(MAGIC_DEAD); size = GlobalSize(gbl); ok( (size == 0) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %ld with 0x%08x (expected '0' with ERROR_INVALID_HANDLE)\n", + "returned %Id with 0x%08lx (expected '0' with ERROR_INVALID_HANDLE)\n", size, GetLastError());
SetLastError(MAGIC_DEAD); mem = GlobalLock(gbl); ok( (mem == NULL) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %p with 0x%08x (expected NULL with ERROR_INVALID_HANDLE)\n", + "returned %p with 0x%08lx (expected NULL with ERROR_INVALID_HANDLE)\n", mem, GetLastError());
/* documented on MSDN: GlobalUnlock() return FALSE on failure. @@ -249,7 +250,7 @@ static void test_heap(void) SetLastError(MAGIC_DEAD); res = GlobalUnlock(gbl); ok(GetLastError() == ERROR_INVALID_HANDLE, - "returned %d with %d (expected ERROR_INVALID_HANDLE)\n", + "returned %ld with %ld (expected ERROR_INVALID_HANDLE)\n", res, GetLastError());
gbl = GlobalAlloc(GMEM_DDESHARE, 100); @@ -267,7 +268,7 @@ static void test_heap(void) if (mem == gbl) ok(GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); }
/* GMEM_FIXED block expands in place only without flags */ @@ -276,7 +277,7 @@ static void test_heap(void) SetLastError(MAGIC_DEAD); hsecond = GlobalReAlloc(gbl, size + init_size, 0); ok(hsecond == gbl || (hsecond == NULL && GetLastError() == ERROR_NOT_ENOUGH_MEMORY), - "got %p with %x (expected %p or NULL) @%ld\n", hsecond, GetLastError(), gbl, size); + "got %p with %lx (expected %p or NULL) @%Id\n", hsecond, GetLastError(), gbl, size); GlobalFree(gbl); }
@@ -286,9 +287,9 @@ static void test_heap(void) SetLastError(MAGIC_DEAD); hsecond = GlobalReAlloc(gbl, size + init_size, GMEM_MOVEABLE); ok(hsecond != NULL, - "got %p with %x (expected non-NULL) @%ld\n", hsecond, GetLastError(), size); + "got %p with %lx (expected non-NULL) @%Id\n", hsecond, GetLastError(), size); mem = GlobalLock(hsecond); - ok(mem == hsecond, "got %p (expected %p) @%ld\n", mem, hsecond, size); + ok(mem == hsecond, "got %p (expected %p) @%Id\n", mem, hsecond, size); GlobalFree(hsecond); }
@@ -297,12 +298,12 @@ static void test_heap(void) res = GlobalUnlock(gbl); ok(res == 1 || broken(res == 0), /* win9x */ - "Expected 1 or 0, got %d\n", res); + "Expected 1 or 0, got %ld\n", res);
res = GlobalUnlock(gbl); ok(res == 1 || broken(res == 0), /* win9x */ - "Expected 1 or 0, got %d\n", res); + "Expected 1 or 0, got %ld\n", res);
GlobalFree(gbl);
@@ -312,8 +313,8 @@ static void test_heap(void) res = GlobalUnlock(gbl); ok(res == 1 || broken(res == 0), /* win9x */ - "Expected 1 or 0, got %d\n", res); - ok(GetLastError() == 0xdeadbeef, "got %d\n", GetLastError()); + "Expected 1 or 0, got %ld\n", res); + ok(GetLastError() == 0xdeadbeef, "got %ld\n", GetLastError());
GlobalFree(gbl);
@@ -322,16 +323,16 @@ static void test_heap(void) { SetLastError(MAGIC_DEAD); size = GlobalSize((HGLOBAL)0xc042); - ok(size == 0, "Expected 0, got %ld\n", size); + ok(size == 0, "Expected 0, got %Id\n", size); ok(GetLastError() == ERROR_INVALID_HANDLE || GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); }
gbl = GlobalAlloc( GMEM_FIXED, 0 ); SetLastError(0xdeadbeef); size = GlobalSize( gbl ); - ok( size == 1, "wrong size %lu\n", size ); + ok( size == 1, "wrong size %Iu\n", size ); GlobalFree( gbl );
/* ####################################### */ @@ -342,16 +343,16 @@ static void test_heap(void) gbl = LocalReAlloc(gbl, 10, LMEM_MOVEABLE); ok(gbl != NULL, "Can't realloc local memory\n"); size = LocalSize(gbl); - ok(size >= 10 && size <= 16, "Memory not resized to size 10, instead size=%ld\n", size); + ok(size >= 10 && size <= 16, "Memory not resized to size 10, instead size=%Id\n", size);
gbl = LocalReAlloc(gbl, 0, LMEM_MOVEABLE); ok(gbl != NULL, "LocalReAlloc should not fail on size 0\n");
size = LocalSize(gbl); - ok(size == 0, "Memory not resized to size 0, instead size=%ld\n", size); + ok(size == 0, "Memory not resized to size 0, instead size=%Id\n", size); ok(LocalFree(gbl) == NULL, "Memory not freed\n"); size = LocalSize(gbl); - ok(size == 0, "Memory should have been freed, size=%ld\n", size); + ok(size == 0, "Memory should have been freed, size=%Id\n", size);
gbl = LocalReAlloc(0, 10, LMEM_MOVEABLE); ok(gbl == NULL, "local realloc allocated memory\n"); @@ -360,39 +361,39 @@ static void test_heap(void) gbl = LocalAlloc(LMEM_MOVEABLE, 256); SetLastError(MAGIC_DEAD); mem = LocalLock(gbl); /* #1 */ - ok(mem != NULL, "returned %p with %d (expected '!= NULL')\n", mem, GetLastError()); + ok(mem != NULL, "returned %p with %ld (expected '!= NULL')\n", mem, GetLastError()); SetLastError(MAGIC_DEAD); flags = LocalFlags(gbl); - ok( flags == 1, "returned 0x%04x with %d (expected '0x0001')\n", + ok( flags == 1, "returned 0x%04x with %ld (expected '0x0001')\n", flags, GetLastError());
SetLastError(MAGIC_DEAD); msecond = LocalLock(gbl); /* #2 */ - ok( msecond == mem, "returned %p with %d (expected '%p')\n", + ok( msecond == mem, "returned %p with %ld (expected '%p')\n", msecond, GetLastError(), mem); SetLastError(MAGIC_DEAD); flags = LocalFlags(gbl); - ok( flags == 2, "returned 0x%04x with %d (expected '0x0002')\n", + ok( flags == 2, "returned 0x%04x with %ld (expected '0x0002')\n", flags, GetLastError()); SetLastError(MAGIC_DEAD);
SetLastError(MAGIC_DEAD); res = LocalUnlock(gbl); /* #1 */ - ok(res, "returned %d with %d (expected '!= 0')\n", res, GetLastError()); + ok(res, "returned %ld with %ld (expected '!= 0')\n", res, GetLastError()); SetLastError(MAGIC_DEAD); flags = LocalFlags(gbl); - ok( flags , "returned 0x%04x with %d (expected '!= 0')\n", + ok( flags , "returned 0x%04x with %ld (expected '!= 0')\n", flags, GetLastError());
SetLastError(MAGIC_DEAD); res = LocalUnlock(gbl); /* #0 */ /* NT: ERROR_SUCCESS (documented on MSDN), 9x: untouched */ ok(!res && ((GetLastError() == ERROR_SUCCESS) || (GetLastError() == MAGIC_DEAD)), - "returned %d with %d (expected '0' with: ERROR_SUCCESS or " + "returned %ld with %ld (expected '0' with: ERROR_SUCCESS or " "MAGIC_DEAD)\n", res, GetLastError()); SetLastError(MAGIC_DEAD); flags = LocalFlags(gbl); - ok( !flags , "returned 0x%04x with %d (expected '0')\n", + ok( !flags , "returned 0x%04x with %ld (expected '0')\n", flags, GetLastError());
/* Unlock an already unlocked Handle */ @@ -401,7 +402,7 @@ static void test_heap(void) /* NT: ERROR_NOT_LOCKED, 9x: untouched */ ok( !res && ((GetLastError() == ERROR_NOT_LOCKED) || (GetLastError() == MAGIC_DEAD)), - "returned %d with %d (expected '0' with: ERROR_NOT_LOCKED or " + "returned %ld with %ld (expected '0' with: ERROR_NOT_LOCKED or " "MAGIC_DEAD)\n", res, GetLastError());
LocalFree(gbl); @@ -409,30 +410,30 @@ static void test_heap(void) SetLastError(MAGIC_DEAD); hsecond = LocalFree(gbl); /* invalid handle: free memory twice */ ok( (hsecond == gbl) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %p with 0x%08x (expected %p with ERROR_INVALID_HANDLE)\n", + "returned %p with 0x%08lx (expected %p with ERROR_INVALID_HANDLE)\n", hsecond, GetLastError(), gbl); SetLastError(MAGIC_DEAD); flags = LocalFlags(gbl); ok( (flags == LMEM_INVALID_HANDLE) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned 0x%04x with 0x%08x (expected LMEM_INVALID_HANDLE with " + "returned 0x%04x with 0x%08lx (expected LMEM_INVALID_HANDLE with " "ERROR_INVALID_HANDLE)\n", flags, GetLastError()); SetLastError(MAGIC_DEAD); size = LocalSize(gbl); ok( (size == 0) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %ld with 0x%08x (expected '0' with ERROR_INVALID_HANDLE)\n", + "returned %Id with 0x%08lx (expected '0' with ERROR_INVALID_HANDLE)\n", size, GetLastError());
SetLastError(MAGIC_DEAD); mem = LocalLock(gbl); ok( (mem == NULL) && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %p with 0x%08x (expected NULL with ERROR_INVALID_HANDLE)\n", + "returned %p with 0x%08lx (expected NULL with ERROR_INVALID_HANDLE)\n", mem, GetLastError());
/* This Test works the same on all Systems (GlobalUnlock() is different) */ SetLastError(MAGIC_DEAD); res = LocalUnlock(gbl); ok(!res && (GetLastError() == ERROR_INVALID_HANDLE), - "returned %d with %d (expected '0' with ERROR_INVALID_HANDLE)\n", + "returned %ld with %ld (expected '0' with ERROR_INVALID_HANDLE)\n", res, GetLastError());
/* LMEM_FIXED block expands in place only without flags */ @@ -441,7 +442,7 @@ static void test_heap(void) SetLastError(MAGIC_DEAD); hsecond = LocalReAlloc(gbl, size + init_size, 0); ok(hsecond == gbl || (hsecond == NULL && GetLastError() == ERROR_NOT_ENOUGH_MEMORY), - "got %p with %x (expected %p or NULL) @%ld\n", hsecond, GetLastError(), gbl, size); + "got %p with %lx (expected %p or NULL) @%Id\n", hsecond, GetLastError(), gbl, size); LocalFree(gbl); }
@@ -451,9 +452,9 @@ static void test_heap(void) SetLastError(MAGIC_DEAD); hsecond = LocalReAlloc(gbl, size + init_size, LMEM_MOVEABLE); ok(hsecond != NULL, - "got %p with %x (expected non-NULL) @%ld\n", hsecond, GetLastError(), size); + "got %p with %lx (expected non-NULL) @%Id\n", hsecond, GetLastError(), size); mem = LocalLock(hsecond); - ok(mem == hsecond, "got %p (expected %p) @%ld\n", mem, hsecond, size); + ok(mem == hsecond, "got %p (expected %p) @%Id\n", mem, hsecond, size); LocalFree(hsecond); }
@@ -461,16 +462,16 @@ static void test_heap(void) gbl = LocalAlloc(LMEM_FIXED, 100); SetLastError(0xdeadbeef); res = LocalUnlock(gbl); - ok(res == 0, "Expected 0, got %d\n", res); + ok(res == 0, "Expected 0, got %ld\n", res); ok(GetLastError() == ERROR_NOT_LOCKED || - broken(GetLastError() == 0xdeadbeef) /* win9x */, "got %d\n", GetLastError()); + broken(GetLastError() == 0xdeadbeef) /* win9x */, "got %ld\n", GetLastError()); LocalFree(gbl);
gbl = LocalAlloc( LMEM_FIXED, 0 ); SetLastError(0xdeadbeef); size = LocalSize( gbl ); ok( !size || broken(size == 1), /* vistau64 */ - "wrong size %lu\n", size ); + "wrong size %Iu\n", size ); LocalFree( gbl );
/* trying to lock empty memory should give an error */ @@ -481,7 +482,7 @@ static void test_heap(void) /* NT: ERROR_DISCARDED, 9x: untouched */ ok( (mem == NULL) && ((GetLastError() == ERROR_DISCARDED) || (GetLastError() == MAGIC_DEAD)), - "returned %p with 0x%x/%d (expected 'NULL' with: ERROR_DISCARDED or " + "returned %p with 0x%lx/%ld (expected 'NULL' with: ERROR_DISCARDED or " "MAGIC_DEAD)\n", mem, GetLastError(), GetLastError());
GlobalFree(gbl); @@ -495,8 +496,8 @@ static void test_heap(void)
size = GlobalSize(gbl); size2 = GlobalSize(mem); - ok(size == 0x123, "got %lu\n", size); - ok(size2 == 0x123, "got %lu\n", size2); + ok(size == 0x123, "got %Iu\n", size); + ok(size2 == 0x123, "got %Iu\n", size2);
GlobalFree(gbl);
@@ -508,12 +509,12 @@ static void test_heap(void) ok(gbl == mem, "got %p, %p.\n", gbl, mem);
size = GlobalSize(gbl); - ok(size == 0x123, "got %lu\n", size); + ok(size == 0x123, "got %Iu\n", size);
GlobalFree(gbl);
size = GlobalSize((void *)0xdeadbee0); - ok(size == 0, "got %lu\n", size); + ok(size == 0, "got %Iu\n", size);
}
@@ -646,7 +647,7 @@ static void test_GlobalAlloc(void)
/* Check that a 'zeroing' alloc works */ mem2=GlobalAlloc(GMEM_ZEROINIT,memchunk); - ok(mem2!=NULL,"GlobalAlloc failed: error=%d\n",GetLastError()); + ok(mem2!=NULL,"GlobalAlloc failed: error=%ld\n",GetLastError()); if(mem2) { ok(GlobalSize(mem2)>=memchunk,"GlobalAlloc should return a big enough memory block\n"); mem2ptr=GlobalLock(mem2); @@ -720,18 +721,18 @@ static void test_LocalAlloc(void)
/* Check that a normal alloc works */ mem1=LocalAlloc(0,memchunk); - ok(mem1!=NULL,"LocalAlloc failed: error=%d\n",GetLastError()); + ok(mem1!=NULL,"LocalAlloc failed: error=%ld\n",GetLastError()); if(mem1) { ok(LocalSize(mem1)>=memchunk, "LocalAlloc should return a big enough memory block\n"); }
/* Check that a 'zeroing' and lock alloc works */ mem2=LocalAlloc(LMEM_ZEROINIT|LMEM_MOVEABLE,memchunk); - ok(mem2!=NULL,"LocalAlloc failed: error=%d\n",GetLastError()); + ok(mem2!=NULL,"LocalAlloc failed: error=%ld\n",GetLastError()); if(mem2) { ok(LocalSize(mem2)>=memchunk,"LocalAlloc should return a big enough memory block\n"); mem2ptr=LocalLock(mem2); - ok(mem2ptr!=NULL,"LocalLock: error=%d\n",GetLastError()); + ok(mem2ptr!=NULL,"LocalLock: error=%ld\n",GetLastError()); if(mem2ptr) { error=FALSE; for(i=0;i<memchunk;i++) { @@ -743,7 +744,7 @@ static void test_LocalAlloc(void) SetLastError(0); error=LocalUnlock(mem2); ok(!error && GetLastError()==NO_ERROR, - "LocalUnlock Failed: rc=%d err=%d\n",error,GetLastError()); + "LocalUnlock Failed: rc=%d err=%ld\n",error,GetLastError()); } } mem2a=LocalFree(mem2); @@ -751,11 +752,11 @@ static void test_LocalAlloc(void)
/* Reallocate mem2 as moveable memory */ mem2=LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT,memchunk); - ok(mem2!=NULL, "LocalAlloc failed to create moveable memory, error=%d\n",GetLastError()); + ok(mem2!=NULL, "LocalAlloc failed to create moveable memory, error=%ld\n",GetLastError());
/* Check that ReAllocing memory works as expected */ mem2a=LocalReAlloc(mem2,2*memchunk,LMEM_MOVEABLE | LMEM_ZEROINIT); - ok(mem2a!=NULL,"LocalReAlloc failed, error=%d\n",GetLastError()); + ok(mem2a!=NULL,"LocalReAlloc failed, error=%ld\n",GetLastError()); if(mem2a) { ok(LocalSize(mem2a)>=2*memchunk,"LocalReAlloc failed\n"); mem2ptr=LocalLock(mem2a); @@ -830,7 +831,7 @@ static void test_obsolete_flags(void)
ok( resultflags == test_global_flags[i].globalflags || broken(resultflags == (test_global_flags[i].globalflags & ~GMEM_DDESHARE)), /* win9x */ - "%u: expected 0x%08x, but returned 0x%08x with %d\n", + "%u: expected 0x%08x, but returned 0x%08x with %ld\n", i, test_global_flags[i].globalflags, resultflags, GetLastError() );
GlobalFree(gbl); @@ -869,8 +870,8 @@ static void test_HeapQueryInformation(void) NULL, 0, &size); ok(!ret, "HeapQueryInformation should fail\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "expected ERROR_INSUFFICIENT_BUFFER got %u\n", GetLastError()); - ok(size == sizeof(ULONG), "expected 4, got %lu\n", size); + "expected ERROR_INSUFFICIENT_BUFFER got %lu\n", GetLastError()); + ok(size == sizeof(ULONG), "expected 4, got %Iu\n", size);
SetLastError(0xdeadbeef); ret = pHeapQueryInformation(GetProcessHeap(), @@ -878,15 +879,15 @@ static void test_HeapQueryInformation(void) NULL, 0, NULL); ok(!ret, "HeapQueryInformation should fail\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "expected ERROR_INSUFFICIENT_BUFFER got %u\n", GetLastError()); + "expected ERROR_INSUFFICIENT_BUFFER got %lu\n", GetLastError());
info = 0xdeadbeaf; SetLastError(0xdeadbeef); ret = pHeapQueryInformation(GetProcessHeap(), HeapCompatibilityInformation, &info, sizeof(info) + 1, NULL); - ok(ret, "HeapQueryInformation error %u\n", GetLastError()); - ok(info == 0 || info == 1 || info == 2, "expected 0, 1 or 2, got %u\n", info); + ok(ret, "HeapQueryInformation error %lu\n", GetLastError()); + ok(info == 0 || info == 1 || info == 2, "expected 0, 1 or 2, got %lu\n", info); }
static void test_heap_checks( DWORD flags ) @@ -896,7 +897,7 @@ static void test_heap_checks( DWORD flags ) SIZE_T i, size, large_size = 3000 * 1024 + 37;
if (flags & HEAP_PAGE_ALLOCS) return; /* no tests for that case yet */ - trace( "testing heap flags %08x\n", flags ); + trace( "testing heap flags %08lx\n", flags );
p = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, 17 ); ok( p != NULL, "HeapAlloc failed\n" ); @@ -905,7 +906,7 @@ static void test_heap_checks( DWORD flags ) ok( ret, "HeapValidate failed\n" );
size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == 17, "Wrong size %lu\n", size ); + ok( size == 17, "Wrong size %Iu\n", size );
ok( p[14] == 0, "wrong data %x\n", p[14] ); ok( p[15] == 0, "wrong data %x\n", p[15] ); @@ -952,7 +953,7 @@ static void test_heap_checks( DWORD flags ) if (flags & HEAP_VALIDATE) { size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == ~(SIZE_T)0 || broken(size == ~0u), "Wrong size %lu\n", size ); + ok( size == ~(SIZE_T)0 || broken(size == ~0u), "Wrong size %Iu\n", size );
p2 = HeapReAlloc( GetProcessHeap(), 0, p, 14 ); ok( p2 == NULL, "HeapReAlloc succeeded\n" ); @@ -964,7 +965,7 @@ static void test_heap_checks( DWORD flags )
p[17] = old; size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == 17, "Wrong size %lu\n", size ); + ok( size == 17, "Wrong size %Iu\n", size );
p2 = HeapReAlloc( GetProcessHeap(), 0, p, 14 ); ok( p2 != NULL, "HeapReAlloc failed\n" ); @@ -1010,7 +1011,7 @@ static void test_heap_checks( DWORD flags ) ok( ret, "HeapValidate failed\n" );
size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == large_size, "Wrong size %lu\n", size ); + ok( size == large_size, "Wrong size %Iu\n", size );
ok( p[large_size - 2] == 0, "wrong data %x\n", p[large_size - 2] ); ok( p[large_size - 1] == 0, "wrong data %x\n", p[large_size - 1] ); @@ -1031,7 +1032,7 @@ static void test_heap_checks( DWORD flags ) if (flags & HEAP_VALIDATE) { size = HeapSize( GetProcessHeap(), 0, p ); - ok( size == ~(SIZE_T)0, "Wrong size %lu\n", size ); + ok( size == ~(SIZE_T)0, "Wrong size %Iu\n", size );
p2 = HeapReAlloc( GetProcessHeap(), 0, p, large_size - 3 ); ok( p2 == NULL, "HeapReAlloc succeeded\n" ); @@ -1053,7 +1054,7 @@ static void test_heap_checks( DWORD flags ) { p = HeapAlloc( GetProcessHeap(), 0, size ); for (i = 0; i < 32; i++) if (p[size + i] != 0xab) break; - ok( i >= 8, "only %lu tail bytes for size %lu\n", i, size ); + ok( i >= 8, "only %Iu tail bytes for size %Iu\n", i, size ); HeapFree( GetProcessHeap(), 0, p ); } } @@ -1083,7 +1084,7 @@ static void test_debug_heap( const char *argv0, DWORD flags ) skip("Not authorized to change the image file execution options\n"); return; } - ok( !err, "failed to create '%s' error %u\n", keyname, err ); + ok( !err, "failed to create '%s' error %lu\n", keyname, err ); if (err) return;
if (flags == 0xdeadbeef) /* magic value for unsetting it */ @@ -1094,9 +1095,9 @@ static void test_debug_heap( const char *argv0, DWORD flags ) memset( &startup, 0, sizeof(startup) ); startup.cb = sizeof(startup);
- sprintf( buffer, "%s heap.c 0x%x", argv0, flags ); + sprintf( buffer, "%s heap.c 0x%lx", argv0, flags ); ret = CreateProcessA( NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info ); - ok( ret, "failed to create child process error %u\n", GetLastError() ); + ok( ret, "failed to create child process error %lu\n", GetLastError() ); if (ret) { wait_child_process( info.hProcess ); @@ -1157,13 +1158,13 @@ static void test_child_heap( const char *arg ) }
ok( pRtlGetNtGlobalFlags() == expected, - "%s: got global flags %08x expected %08x\n", arg, pRtlGetNtGlobalFlags(), expected ); + "%s: got global flags %08lx expected %08lx\n", arg, pRtlGetNtGlobalFlags(), expected );
expect_heap = heap_flags_from_global_flag( expected );
if (!(heap->flags & HEAP_GROWABLE) || heap->pattern == 0xffeeffee) /* vista layout */ { - ok( (heap->flags & ~HEAP_GROWABLE) == 0, "%s: got heap flags %08x\n", arg, heap->flags ); + ok( (heap->flags & ~HEAP_GROWABLE) == 0, "%s: got heap flags %08lx\n", arg, heap->flags ); } else if (heap->pattern == 0xeeeeeeee && heap->flags == 0xeeeeeeee) { @@ -1172,9 +1173,9 @@ static void test_child_heap( const char *arg ) else { ok( heap->flags == (expect_heap | HEAP_GROWABLE), - "%s: got heap flags %08x expected %08x\n", arg, heap->flags, expect_heap ); + "%s: got heap flags %08lx expected %08lx\n", arg, heap->flags, expect_heap ); ok( heap->force_flags == (expect_heap & ~0x18000080), - "%s: got heap force flags %08x expected %08x\n", arg, heap->force_flags, expect_heap ); + "%s: got heap force flags %08lx expected %08lx\n", arg, heap->force_flags, expect_heap ); expect_heap = heap->flags; }
@@ -1199,11 +1200,11 @@ static void test_GetPhysicallyInstalledSystemMemory(void) ret = pGetPhysicallyInstalledSystemMemory(NULL); ok(!ret, "GetPhysicallyInstalledSystemMemory should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
total_memory = 0; ret = pGetPhysicallyInstalledSystemMemory(&total_memory); - ok(ret, "GetPhysicallyInstalledSystemMemory unexpectedly failed (%u)\n", GetLastError()); + ok(ret, "GetPhysicallyInstalledSystemMemory unexpectedly failed (%lu)\n", GetLastError()); ok(total_memory != 0, "expected total_memory != 0\n");
memstatus.dwLength = sizeof(memstatus);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/loader.c | 969 +++++++++++++++++++++--------------------- 1 file changed, 485 insertions(+), 484 deletions(-)
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c index 6b5099ea612..1037094bb8d 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -17,6 +17,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */
#define NONAMELESSUNION #define NONAMELESSSTRUCT @@ -211,16 +212,16 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size, GetTempFileNameA(temp_path, "ldr", 0, dll_name);
hfile = CreateFileA(dll_name, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, 0); - ok( hfile != INVALID_HANDLE_VALUE, "failed to create %s err %u\n", dll_name, GetLastError() ); + ok( hfile != INVALID_HANDLE_VALUE, "failed to create %s err %lu\n", dll_name, GetLastError() ); if (hfile == INVALID_HANDLE_VALUE) return 0;
SetLastError(0xdeadbeef); ret = WriteFile(hfile, dos_header, dos_size, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WriteFile(hfile, nt_header, sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
if (nt_header->FileHeader.SizeOfOptionalHeader) { @@ -228,14 +229,14 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size, ret = WriteFile(hfile, &nt_header->OptionalHeader, sizeof(IMAGE_OPTIONAL_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); if (nt_header->FileHeader.SizeOfOptionalHeader > sizeof(IMAGE_OPTIONAL_HEADER)) { file_align = nt_header->FileHeader.SizeOfOptionalHeader - sizeof(IMAGE_OPTIONAL_HEADER); assert(file_align < sizeof(filler)); SetLastError(0xdeadbeef); ret = WriteFile(hfile, filler, file_align, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); } }
@@ -261,12 +262,12 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size,
SetLastError(0xdeadbeef); ret = WriteFile(hfile, §ion, sizeof(section), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
/* section data */ SetLastError(0xdeadbeef); ret = WriteFile(hfile, section_data, sizeof(section_data), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); }
/* Minimal PE image that Windows7+ is able to load: 268 bytes */ @@ -276,7 +277,7 @@ static DWORD create_test_dll( const IMAGE_DOS_HEADER *dos_header, UINT dos_size, file_align = 268 - size; SetLastError(0xdeadbeef); ret = WriteFile(hfile, filler, file_align, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); }
size = GetFileSize(hfile, NULL); @@ -297,28 +298,28 @@ static DWORD create_test_dll_sections( const IMAGE_DOS_HEADER *dos_header, const GetTempFileNameA(temp_path, "ldr", 0, dll_name);
hfile = CreateFileA(dll_name, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, 0); - ok( hfile != INVALID_HANDLE_VALUE, "failed to create %s err %u\n", dll_name, GetLastError() ); + ok( hfile != INVALID_HANDLE_VALUE, "failed to create %s err %lu\n", dll_name, GetLastError() ); if (hfile == INVALID_HANDLE_VALUE) return 0;
SetLastError(0xdeadbeef); ret = WriteFile(hfile, dos_header, sizeof(*dos_header), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WriteFile(hfile, nt_header, offsetof(IMAGE_NT_HEADERS, OptionalHeader) + nt_header->FileHeader.SizeOfOptionalHeader, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WriteFile(hfile, sections, sizeof(*sections) * nt_header->FileHeader.NumberOfSections, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++) { SetFilePointer(hfile, sections[i].PointerToRawData, NULL, FILE_BEGIN); SetLastError(0xdeadbeef); ret = WriteFile(hfile, section_data, sections[i].SizeOfRawData, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); } size = GetFileSize(hfile, NULL); CloseHandle(hfile); @@ -345,20 +346,20 @@ static BOOL query_image_section( int id, const char *dll_name, const IMAGE_NT_HE
file = CreateFileA( dll_name, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "%u: CreateFile error %d\n", id, GetLastError() ); + ok( file != INVALID_HANDLE_VALUE, "%u: CreateFile error %ld\n", id, GetLastError() ); file_size = GetFileSize( file, NULL );
status = pNtCreateSection( &mapping, STANDARD_RIGHTS_REQUIRED | SECTION_MAP_READ | SECTION_QUERY, NULL, NULL, PAGE_READONLY, SEC_IMAGE, file ); - ok( !status, "%u: NtCreateSection failed err %x\n", id, status ); + ok( !status, "%u: NtCreateSection failed err %lx\n", id, status ); if (status) { CloseHandle( file ); return FALSE; } status = pNtQuerySection( mapping, SectionImageInformation, &image, sizeof(image), &info_size ); - ok( !status, "%u: NtQuerySection failed err %x\n", id, status ); - ok( info_size == sizeof(image), "%u: NtQuerySection wrong size %lu\n", id, info_size ); + ok( !status, "%u: NtQuerySection failed err %lx\n", id, status ); + ok( info_size == sizeof(image), "%u: NtQuerySection wrong size %Iu\n", id, info_size ); if (nt_header->OptionalHeader.Magic == (is_win64 ? IMAGE_NT_OPTIONAL_HDR64_MAGIC : IMAGE_NT_OPTIONAL_HDR32_MAGIC)) { @@ -397,19 +398,19 @@ static BOOL query_image_section( int id, const char *dll_name, const IMAGE_NT_HE } ok( (char *)image.TransferAddress == (char *)entry_point || (S(U(image)).ImageDynamicallyRelocated && LOWORD(image.TransferAddress) == LOWORD(entry_point)), - "%u: TransferAddress wrong %p / %p (%08x)\n", id, + "%u: TransferAddress wrong %p / %p (%08lx)\n", id, image.TransferAddress, entry_point, nt_header->OptionalHeader.AddressOfEntryPoint ); - ok( image.ZeroBits == 0, "%u: ZeroBits wrong %08x\n", id, image.ZeroBits ); + ok( image.ZeroBits == 0, "%u: ZeroBits wrong %08lx\n", id, image.ZeroBits ); ok( image.MaximumStackSize == max_stack || broken(truncated), - "%u: MaximumStackSize wrong %lx / %lx\n", id, image.MaximumStackSize, max_stack ); + "%u: MaximumStackSize wrong %Ix / %Ix\n", id, image.MaximumStackSize, max_stack ); ok( image.CommittedStackSize == commit_stack || broken(truncated), - "%u: CommittedStackSize wrong %lx / %lx\n", id, image.CommittedStackSize, commit_stack ); + "%u: CommittedStackSize wrong %Ix / %Ix\n", id, image.CommittedStackSize, commit_stack ); if (truncated) ok( !image.SubSystemType || broken(truncated), - "%u: SubSystemType wrong %08x / 00000000\n", id, image.SubSystemType ); + "%u: SubSystemType wrong %08lx / 00000000\n", id, image.SubSystemType ); else ok( image.SubSystemType == nt_header->OptionalHeader.Subsystem, - "%u: SubSystemType wrong %08x / %08x\n", id, + "%u: SubSystemType wrong %08lx / %08x\n", id, image.SubSystemType, nt_header->OptionalHeader.Subsystem ); ok( image.MinorSubsystemVersion == nt_header->OptionalHeader.MinorSubsystemVersion, "%u: MinorSubsystemVersion wrong %04x / %04x\n", id, @@ -432,11 +433,11 @@ static BOOL query_image_section( int id, const char *dll_name, const IMAGE_NT_HE image.DllCharacteristics, nt_header->OptionalHeader.DllCharacteristics ); ok( image.Machine == nt_header->FileHeader.Machine, "%u: Machine wrong %04x / %04x\n", id, image.Machine, nt_header->FileHeader.Machine ); - ok( image.LoaderFlags == (cor_header != NULL), "%u: LoaderFlags wrong %08x\n", id, image.LoaderFlags ); + ok( image.LoaderFlags == (cor_header != NULL), "%u: LoaderFlags wrong %08lx\n", id, image.LoaderFlags ); ok( image.ImageFileSize == file_size || broken(!image.ImageFileSize), /* winxpsp1 */ - "%u: ImageFileSize wrong %08x / %08x\n", id, image.ImageFileSize, file_size ); + "%u: ImageFileSize wrong %08lx / %08lx\n", id, image.ImageFileSize, file_size ); ok( image.CheckSum == nt_header->OptionalHeader.CheckSum || broken(truncated), - "%u: CheckSum wrong %08x / %08x\n", id, + "%u: CheckSum wrong %08lx / %08lx\n", id, image.CheckSum, nt_header->OptionalHeader.CheckSum );
if (nt_header->OptionalHeader.SizeOfCode || nt_header->OptionalHeader.AddressOfEntryPoint) @@ -500,39 +501,39 @@ static BOOL query_image_section( int id, const char *dll_name, const IMAGE_NT_HE
map_size.QuadPart = (nt_header->OptionalHeader.SizeOfImage + page_size - 1) & ~(page_size - 1); status = pNtQuerySection( mapping, SectionBasicInformation, &info, sizeof(info), NULL ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( info.Size.QuadPart == map_size.QuadPart, "NtQuerySection wrong size %x%08x / %x%08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( info.Size.QuadPart == map_size.QuadPart, "NtQuerySection wrong size %lx%08lx / %lx%08lx\n", info.Size.u.HighPart, info.Size.u.LowPart, map_size.u.HighPart, map_size.u.LowPart ); CloseHandle( mapping );
map_size.QuadPart = (nt_header->OptionalHeader.SizeOfImage + page_size - 1) & ~(page_size - 1); status = pNtCreateSection( &mapping, STANDARD_RIGHTS_REQUIRED | SECTION_MAP_READ | SECTION_QUERY, NULL, &map_size, PAGE_READONLY, SEC_IMAGE, file ); - ok( !status, "%u: NtCreateSection failed err %x\n", id, status ); + ok( !status, "%u: NtCreateSection failed err %lx\n", id, status ); status = pNtQuerySection( mapping, SectionBasicInformation, &info, sizeof(info), NULL ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( info.Size.QuadPart == map_size.QuadPart, "NtQuerySection wrong size %x%08x / %x%08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( info.Size.QuadPart == map_size.QuadPart, "NtQuerySection wrong size %lx%08lx / %lx%08lx\n", info.Size.u.HighPart, info.Size.u.LowPart, map_size.u.HighPart, map_size.u.LowPart ); CloseHandle( mapping );
map_size.QuadPart++; status = pNtCreateSection( &mapping, STANDARD_RIGHTS_REQUIRED | SECTION_MAP_READ | SECTION_QUERY, NULL, &map_size, PAGE_READONLY, SEC_IMAGE, file ); - ok( status == STATUS_SECTION_TOO_BIG, "%u: NtCreateSection failed err %x\n", id, status ); + ok( status == STATUS_SECTION_TOO_BIG, "%u: NtCreateSection failed err %lx\n", id, status );
SetFilePointerEx( file, map_size, NULL, FILE_BEGIN ); SetEndOfFile( file ); status = pNtCreateSection( &mapping, STANDARD_RIGHTS_REQUIRED | SECTION_MAP_READ | SECTION_QUERY, NULL, &map_size, PAGE_READONLY, SEC_IMAGE, file ); - ok( status == STATUS_SECTION_TOO_BIG, "%u: NtCreateSection failed err %x\n", id, status ); + ok( status == STATUS_SECTION_TOO_BIG, "%u: NtCreateSection failed err %lx\n", id, status );
map_size.QuadPart = 1; status = pNtCreateSection( &mapping, STANDARD_RIGHTS_REQUIRED | SECTION_MAP_READ | SECTION_QUERY, NULL, &map_size, PAGE_READONLY, SEC_IMAGE, file ); - ok( !status, "%u: NtCreateSection failed err %x\n", id, status ); + ok( !status, "%u: NtCreateSection failed err %lx\n", id, status ); status = pNtQuerySection( mapping, SectionBasicInformation, &info, sizeof(info), NULL ); - ok( !status, "NtQuerySection failed err %x\n", status ); - ok( info.Size.QuadPart == map_size.QuadPart, "NtQuerySection wrong size %x%08x / %x%08x\n", + ok( !status, "NtQuerySection failed err %lx\n", status ); + ok( info.Size.QuadPart == map_size.QuadPart, "NtQuerySection wrong size %lx%08lx / %lx%08lx\n", info.Size.u.HighPart, info.Size.u.LowPart, map_size.u.HighPart, map_size.u.LowPart ); CloseHandle( mapping );
@@ -612,7 +613,7 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG file_size = create_test_dll_sections( &dos_header, nt_header, sections, section_data, dll_name );
file = CreateFileA(dll_name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
size.QuadPart = file_size; status = pNtCreateSection(&map, STANDARD_RIGHTS_REQUIRED | SECTION_MAP_READ | SECTION_QUERY, @@ -631,11 +632,11 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG SECTION_BASIC_INFORMATION info; SIZE_T info_size = 0xdeadbeef; NTSTATUS ret = pNtQuerySection( map, SectionBasicInformation, &info, sizeof(info), &info_size ); - ok( !ret, "NtQuerySection failed err %x\n", ret ); - ok( info_size == sizeof(info), "NtQuerySection wrong size %lu\n", info_size ); - ok( info.Attributes == (SEC_IMAGE | SEC_FILE), "NtQuerySection wrong attr %x\n", info.Attributes ); + ok( !ret, "NtQuerySection failed err %lx\n", ret ); + ok( info_size == sizeof(info), "NtQuerySection wrong size %Iu\n", info_size ); + ok( info.Attributes == (SEC_IMAGE | SEC_FILE), "NtQuerySection wrong attr %lx\n", info.Attributes ); ok( info.BaseAddress == NULL, "NtQuerySection wrong base %p\n", info.BaseAddress ); - ok( info.Size.QuadPart == file_size, "NtQuerySection wrong size %x%08x / %08x\n", + ok( info.Size.QuadPart == file_size, "NtQuerySection wrong size %lx%08lx / %08lx\n", info.Size.u.HighPart, info.Size.u.LowPart, file_size ); has_code = query_image_section( line, dll_name, nt_header, section_data );
@@ -655,12 +656,12 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG if (!has_code && is_win64) { ok_(__FILE__,line)( mod != NULL || want_32bit || broken(il_only), /* <= win7 */ - "loading failed err %u\n", GetLastError() ); + "loading failed err %lu\n", GetLastError() ); } else { ok_(__FILE__, line)( !mod, "loading succeeded\n" ); - ok_(__FILE__, line)( GetLastError() == ERROR_BAD_EXE_FORMAT, "wrong error %u\n", GetLastError() ); + ok_(__FILE__, line)( GetLastError() == ERROR_BAD_EXE_FORMAT, "wrong error %lu\n", GetLastError() ); } } else @@ -669,7 +670,7 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG
ok( mod != NULL || broken(il_only) || /* <= win7 */ broken( wrong_machine ), /* win8 */ - "%u: loading failed err %u\n", line, GetLastError() ); + "%u: loading failed err %lu\n", line, GetLastError() ); if (!mod && wrong_machine) expect_status = STATUS_INVALID_IMAGE_FORMAT; } if (mod) FreeLibrary( mod ); @@ -690,7 +691,7 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG if (!expect_status) ok( !expect_fallback, "%u: got test dll but expected fallback\n", line ); else - ok( !expect_fallback, "%u: got test dll but expected failure %x\n", line, expect_status ); + ok( !expect_fallback, "%u: got test dll but expected failure %lx\n", line, expect_status ); } else if (!lstrcmpiW( path, load_fallback_name )) { @@ -703,7 +704,7 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG "%u: got fallback but expected test dll\n", line ); else ok( broken(expect_status == STATUS_INVALID_IMAGE_FORMAT), /* <= vista */ - "%u: got fallback but expected failure %x\n", line, expect_status ); + "%u: got fallback but expected failure %lx\n", line, expect_status ); } else ok( 0, "%u: got unexpected path %s instead of %s\n", line, wine_dbgstr_w(path), wine_dbgstr_w(load_test_name)); pLdrUnloadDll( ldr_mod ); @@ -720,9 +721,9 @@ static NTSTATUS map_image_section( const IMAGE_NT_HEADERS *nt_header, const IMAG ok( ldr_status == expect_status || broken(il_only && !expect_status && ldr_status == STATUS_INVALID_IMAGE_FORMAT) || broken(nt_header->Signature == IMAGE_OS2_SIGNATURE && ldr_status == STATUS_INVALID_IMAGE_NE_FORMAT), - "%u: wrong status %x/%x\n", line, ldr_status, expect_status ); + "%u: wrong status %lx/%lx\n", line, ldr_status, expect_status ); ok( !expect_fallback || broken(il_only) || broken(wrong_machine), - "%u: failed with %x expected fallback\n", line, ldr_status ); + "%u: failed with %lx expected fallback\n", line, ldr_status ); }
done: @@ -925,50 +926,50 @@ static void test_Loader(void) SetLastError(0xdeadbeef); size = VirtualQuery(hlib, &info, sizeof(info)); ok(size == sizeof(info), - "%d: VirtualQuery error %d\n", i, GetLastError()); + "%d: VirtualQuery error %ld\n", i, GetLastError()); ok(info.BaseAddress == hlib, "%p != %p\n", info.BaseAddress, hlib); ok(info.AllocationBase == hlib, "%p != %p\n", info.AllocationBase, hlib); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%x != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); - ok(info.RegionSize == ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, page_size), "got %lx != expected %x\n", + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%lx != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); + ok(info.RegionSize == ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, page_size), "got %Ix != expected %lx\n", info.RegionSize, ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, page_size)); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); + ok(info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State); if (nt_header.OptionalHeader.SectionAlignment < page_size) - ok(info.Protect == PAGE_EXECUTE_WRITECOPY, "%x != PAGE_EXECUTE_WRITECOPY\n", info.Protect); + ok(info.Protect == PAGE_EXECUTE_WRITECOPY, "%lx != PAGE_EXECUTE_WRITECOPY\n", info.Protect); else - ok(info.Protect == PAGE_READONLY, "%x != PAGE_READONLY\n", info.Protect); - ok(info.Type == SEC_IMAGE, "%x != SEC_IMAGE\n", info.Type); + ok(info.Protect == PAGE_READONLY, "%lx != PAGE_READONLY\n", info.Protect); + ok(info.Type == SEC_IMAGE, "%lx != SEC_IMAGE\n", info.Type);
SetLastError(0xdeadbeef); ptr = VirtualAlloc(hlib, page_size, MEM_COMMIT, info.Protect); ok(!ptr, "VirtualAlloc should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); size = VirtualQuery((char *)hlib + info.RegionSize, &info, sizeof(info)); - ok(size == sizeof(info), "VirtualQuery error %d\n", GetLastError()); + ok(size == sizeof(info), "VirtualQuery error %ld\n", GetLastError()); if (nt_header.OptionalHeader.SectionAlignment == page_size || nt_header.OptionalHeader.SectionAlignment == nt_header.OptionalHeader.FileAlignment) { ok(info.BaseAddress == (char *)hlib + ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, page_size), "got %p != expected %p\n", info.BaseAddress, (char *)hlib + ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, page_size)); ok(info.AllocationBase == 0, "%p != 0\n", info.AllocationBase); - ok(info.AllocationProtect == 0, "%x != 0\n", info.AllocationProtect); + ok(info.AllocationProtect == 0, "%lx != 0\n", info.AllocationProtect); /*ok(info.RegionSize == not_practical_value, "%d: %lx != not_practical_value\n", i, info.RegionSize);*/ - ok(info.State == MEM_FREE, "%x != MEM_FREE\n", info.State); - ok(info.Type == 0, "%x != 0\n", info.Type); - ok(info.Protect == PAGE_NOACCESS, "%x != PAGE_NOACCESS\n", info.Protect); + ok(info.State == MEM_FREE, "%lx != MEM_FREE\n", info.State); + ok(info.Type == 0, "%lx != 0\n", info.Type); + ok(info.Protect == PAGE_NOACCESS, "%lx != PAGE_NOACCESS\n", info.Protect); } else { - ok(info.Protect == PAGE_EXECUTE_WRITECOPY, "%x != PAGE_EXECUTE_WRITECOPY\n", info.Protect); + ok(info.Protect == PAGE_EXECUTE_WRITECOPY, "%lx != PAGE_EXECUTE_WRITECOPY\n", info.Protect); ok(info.BaseAddress == hlib, "got %p != expected %p\n", info.BaseAddress, hlib); ok(info.AllocationBase == hlib, "%p != %p\n", info.AllocationBase, hlib); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%x != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); - ok(info.RegionSize == ALIGN_SIZE(file_size, page_size), "got %lx != expected %x\n", + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%lx != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); + ok(info.RegionSize == ALIGN_SIZE(file_size, page_size), "got %Ix != expected %lx\n", info.RegionSize, ALIGN_SIZE(file_size, page_size)); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READONLY, "%x != PAGE_READONLY\n", info.Protect); - ok(info.Type == SEC_IMAGE, "%x != SEC_IMAGE\n", info.Type); + ok(info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State); + ok(info.Protect == PAGE_READONLY, "%lx != PAGE_READONLY\n", info.Protect); + ok(info.Type == SEC_IMAGE, "%lx != SEC_IMAGE\n", info.Type); }
/* header: check the zeroing of alignment */ @@ -986,25 +987,25 @@ static void test_Loader(void) SetLastError(0xdeadbeef); size = VirtualQuery((char *)hlib + section.VirtualAddress, &info, sizeof(info)); ok(size == sizeof(info), - "VirtualQuery error %d\n", GetLastError()); + "VirtualQuery error %ld\n", GetLastError()); if (nt_header.OptionalHeader.SectionAlignment < page_size) { ok(info.BaseAddress == hlib, "got %p != expected %p\n", info.BaseAddress, hlib); - ok(info.RegionSize == ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, page_size), "got %lx != expected %x\n", + ok(info.RegionSize == ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, page_size), "got %Ix != expected %lx\n", info.RegionSize, ALIGN_SIZE(nt_header.OptionalHeader.SizeOfImage, page_size)); - ok(info.Protect == PAGE_EXECUTE_WRITECOPY, "%x != PAGE_EXECUTE_WRITECOPY\n", info.Protect); + ok(info.Protect == PAGE_EXECUTE_WRITECOPY, "%lx != PAGE_EXECUTE_WRITECOPY\n", info.Protect); } else { ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "got %p != expected %p\n", info.BaseAddress, (char *)hlib + section.VirtualAddress); - ok(info.RegionSize == ALIGN_SIZE(section.Misc.VirtualSize, page_size), "got %lx != expected %x\n", + ok(info.RegionSize == ALIGN_SIZE(section.Misc.VirtualSize, page_size), "got %Ix != expected %lx\n", info.RegionSize, ALIGN_SIZE(section.Misc.VirtualSize, page_size)); - ok(info.Protect == PAGE_READONLY, "%x != PAGE_READONLY\n", info.Protect); + ok(info.Protect == PAGE_READONLY, "%lx != PAGE_READONLY\n", info.Protect); } ok(info.AllocationBase == hlib, "%p != %p\n", info.AllocationBase, hlib); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%x != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); - ok(info.Type == SEC_IMAGE, "%x != SEC_IMAGE\n", info.Type); + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%lx != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State); + ok(info.Type == SEC_IMAGE, "%lx != SEC_IMAGE\n", info.Type);
if (nt_header.OptionalHeader.SectionAlignment >= page_size) ok(!memcmp((const char *)hlib + section.VirtualAddress + section.PointerToRawData, &nt_header, section.SizeOfRawData), "wrong section data\n"); @@ -1025,32 +1026,32 @@ static void test_Loader(void) ptr = VirtualAlloc((char *)hlib + section.VirtualAddress, page_size, MEM_COMMIT, info.Protect); ok(!ptr, "VirtualAlloc should fail\n"); ok(GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_INVALID_ADDRESS, - "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); }
SetLastError(0xdeadbeef); hlib_as_data_file = LoadLibraryExA(dll_name, 0, LOAD_LIBRARY_AS_DATAFILE); - ok(hlib_as_data_file != 0, "LoadLibraryEx error %u\n", GetLastError()); + ok(hlib_as_data_file != 0, "LoadLibraryEx error %lu\n", GetLastError()); ok(hlib_as_data_file == hlib, "hlib_as_file and hlib are different\n");
SetLastError(0xdeadbeef); ret = FreeLibrary(hlib); - ok(ret, "FreeLibrary error %d\n", GetLastError()); + ok(ret, "FreeLibrary error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hlib = GetModuleHandleA(dll_name); - ok(hlib != 0, "GetModuleHandle error %u\n", GetLastError()); + ok(hlib != 0, "GetModuleHandle error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = FreeLibrary(hlib_as_data_file); - ok(ret, "FreeLibrary error %d\n", GetLastError()); + ok(ret, "FreeLibrary error %ld\n", GetLastError());
hlib = GetModuleHandleA(dll_name); ok(!hlib, "GetModuleHandle should fail\n");
SetLastError(0xdeadbeef); hlib_as_data_file = LoadLibraryExA(dll_name, 0, LOAD_LIBRARY_AS_DATAFILE); - ok(hlib_as_data_file != 0, "LoadLibraryEx error %u\n", GetLastError()); + ok(hlib_as_data_file != 0, "LoadLibraryEx error %lu\n", GetLastError()); ok(((ULONG_PTR)hlib_as_data_file & 3) == 1, "hlib_as_data_file got %p\n", hlib_as_data_file);
hlib = GetModuleHandleA(dll_name); @@ -1058,12 +1059,12 @@ static void test_Loader(void)
SetLastError(0xdeadbeef); h = CreateFileA( dll_name, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); - ok( h != INVALID_HANDLE_VALUE, "open failed err %u\n", GetLastError() ); + ok( h != INVALID_HANDLE_VALUE, "open failed err %lu\n", GetLastError() ); CloseHandle( h );
SetLastError(0xdeadbeef); ret = FreeLibrary(hlib_as_data_file); - ok(ret, "FreeLibrary error %d\n", GetLastError()); + ok(ret, "FreeLibrary error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hlib_as_data_file = LoadLibraryExA(dll_name, 0, LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE); @@ -1075,22 +1076,22 @@ static void test_Loader(void) } else { - ok(hlib_as_data_file != 0, "LoadLibraryEx error %u\n", GetLastError()); + ok(hlib_as_data_file != 0, "LoadLibraryEx error %lu\n", GetLastError());
SetLastError(0xdeadbeef); h = CreateFileA( dll_name, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); ok( h == INVALID_HANDLE_VALUE, "open succeeded\n" ); - ok( GetLastError() == ERROR_SHARING_VIOLATION, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_SHARING_VIOLATION, "wrong error %lu\n", GetLastError() ); CloseHandle( h );
SetLastError(0xdeadbeef); h = CreateFileA( dll_name, GENERIC_READ | DELETE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); - ok( h != INVALID_HANDLE_VALUE, "open failed err %u\n", GetLastError() ); + ok( h != INVALID_HANDLE_VALUE, "open failed err %lu\n", GetLastError() ); CloseHandle( h );
SetLastError(0xdeadbeef); ret = FreeLibrary(hlib_as_data_file); - ok(ret, "FreeLibrary error %d\n", GetLastError()); + ok(ret, "FreeLibrary error %ld\n", GetLastError()); }
SetLastError(0xdeadbeef); @@ -1103,7 +1104,7 @@ static void test_Loader(void) } else { - ok(hlib_as_data_file != 0, "LoadLibraryEx error %u\n", GetLastError()); + ok(hlib_as_data_file != 0, "LoadLibraryEx error %lu\n", GetLastError()); ok(((ULONG_PTR)hlib_as_data_file & 3) == 2, "hlib_as_data_file got %p\n", hlib_as_data_file);
@@ -1112,12 +1113,12 @@ static void test_Loader(void)
SetLastError(0xdeadbeef); ret = FreeLibrary(hlib_as_data_file); - ok(ret, "FreeLibrary error %d\n", GetLastError()); + ok(ret, "FreeLibrary error %ld\n", GetLastError()); }
SetLastError(0xdeadbeef); ret = DeleteFileA(dll_name); - ok(ret, "DeleteFile error %d\n", GetLastError()); + ok(ret, "DeleteFile error %ld\n", GetLastError());
nt_header.OptionalHeader.AddressOfEntryPoint = 0x12345678; file_size = create_test_dll( &dos_header, td[i].size_of_dos_header, &nt_header, dll_name ); @@ -1142,12 +1143,12 @@ static void test_Loader(void) { error_match = td[i].errors[error_index] == GetLastError(); } - ok(error_match, "unexpected error %d\n", GetLastError()); + ok(error_match, "unexpected error %ld\n", GetLastError()); }
SetLastError(0xdeadbeef); ret = DeleteFileA(dll_name); - ok(ret, "DeleteFile error %d\n", GetLastError()); + ok(ret, "DeleteFile error %ld\n", GetLastError()); winetest_pop_context(); }
@@ -1171,26 +1172,26 @@ static void test_Loader(void)
nt_header.OptionalHeader.AddressOfEntryPoint = 0x1234; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt_header.OptionalHeader.DllCharacteristics = IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt_header.OptionalHeader.SizeOfCode = 0x1000; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status ); nt_header.OptionalHeader.SizeOfCode = 0; nt_header.OptionalHeader.DllCharacteristics = IMAGE_DLLCHARACTERISTICS_NX_COMPAT;
dos_header.e_magic = 0; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); - ok( status == STATUS_INVALID_IMAGE_NOT_MZ, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_INVALID_IMAGE_NOT_MZ, "NtCreateSection error %08lx\n", status );
dos_header.e_magic = IMAGE_DOS_SIGNATURE; nt_header.Signature = IMAGE_OS2_SIGNATURE; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); - ok( status == STATUS_INVALID_IMAGE_NE_FORMAT, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_INVALID_IMAGE_NE_FORMAT, "NtCreateSection error %08lx\n", status ); for (i = 0; i < 16; i++) { ((IMAGE_OS2_HEADER *)&nt_header)->ne_exetyp = i; @@ -1198,13 +1199,13 @@ static void test_Loader(void) switch (i) { case 2: - ok( status == STATUS_INVALID_IMAGE_WIN_16, "NtCreateSection %u error %08x\n", i, status ); + ok( status == STATUS_INVALID_IMAGE_WIN_16, "NtCreateSection %u error %08lx\n", i, status ); break; case 5: - ok( status == STATUS_INVALID_IMAGE_PROTECT, "NtCreateSection %u error %08x\n", i, status ); + ok( status == STATUS_INVALID_IMAGE_PROTECT, "NtCreateSection %u error %08lx\n", i, status ); break; default: - ok( status == STATUS_INVALID_IMAGE_NE_FORMAT, "NtCreateSection %u error %08x\n", i, status ); + ok( status == STATUS_INVALID_IMAGE_NE_FORMAT, "NtCreateSection %u error %08lx\n", i, status ); break; } } @@ -1212,38 +1213,38 @@ static void test_Loader(void)
dos_header.e_lfanew = 0x98760000; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); - ok( status == STATUS_INVALID_IMAGE_PROTECT, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_INVALID_IMAGE_PROTECT, "NtCreateSection error %08lx\n", status );
dos_header.e_lfanew = sizeof(dos_header); nt_header.Signature = 0xdeadbeef; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); - ok( status == STATUS_INVALID_IMAGE_PROTECT, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_INVALID_IMAGE_PROTECT, "NtCreateSection error %08lx\n", status );
nt_header.Signature = IMAGE_NT_SIGNATURE; nt_header.OptionalHeader.Magic = 0xdead; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); - ok( status == STATUS_INVALID_IMAGE_FORMAT, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_INVALID_IMAGE_FORMAT, "NtCreateSection error %08lx\n", status );
nt_header.OptionalHeader.Magic = IMAGE_NT_OPTIONAL_HDR_MAGIC; nt_header.FileHeader.Machine = 0xdead; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); ok( status == STATUS_INVALID_IMAGE_FORMAT || broken(status == STATUS_SUCCESS), /* win2k */ - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt_header.FileHeader.Machine = IMAGE_FILE_MACHINE_UNKNOWN; status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); ok( status == STATUS_INVALID_IMAGE_FORMAT || broken(status == STATUS_SUCCESS), /* win2k */ - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt_header.FileHeader.Machine = get_alt_machine( orig_machine ); status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); ok( status == STATUS_INVALID_IMAGE_FORMAT || broken(status == STATUS_SUCCESS), /* win2k */ - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt_header.FileHeader.Machine = get_alt_bitness_machine( orig_machine ); status = map_image_section( &nt_header, §ion, section_data, __LINE__ ); ok( status == STATUS_INVALID_IMAGE_FORMAT || broken(status == STATUS_SUCCESS), /* win2k */ - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt_header.FileHeader.Machine = orig_machine; nt_header.OptionalHeader.NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; @@ -1258,33 +1259,33 @@ static void test_Loader(void) cor_header.Flags = COMIMAGE_FLAGS_ILONLY; U(cor_header).EntryPointToken = 0xbeef; status = map_image_section( &nt_header, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
cor_header.MinorRuntimeVersion = 5; status = map_image_section( &nt_header, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
cor_header.MajorRuntimeVersion = 3; cor_header.MinorRuntimeVersion = 0; status = map_image_section( &nt_header, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
cor_header.Flags = COMIMAGE_FLAGS_ILONLY | COMIMAGE_FLAGS_32BITREQUIRED; status = map_image_section( &nt_header, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
cor_header.Flags = COMIMAGE_FLAGS_ILONLY | COMIMAGE_FLAGS_32BITPREFERRED; status = map_image_section( &nt_header, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
cor_header.Flags = 0; status = map_image_section( &nt_header, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress = 1; nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].Size = 1; status = map_image_section( &nt_header, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
if (nt_header.OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) { @@ -1315,7 +1316,7 @@ static void test_Loader(void)
status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, section_data, __LINE__ ); ok( status == (is_wow64 ? STATUS_INVALID_IMAGE_FORMAT : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
switch (orig_machine) { @@ -1324,26 +1325,26 @@ static void test_Loader(void) } status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, section_data, __LINE__ ); ok( status == (is_wow64 ? STATUS_INVALID_IMAGE_FORMAT : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt64.FileHeader.Machine = get_alt_bitness_machine( orig_machine ); status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, section_data, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt64.OptionalHeader.SizeOfCode = 0; nt64.OptionalHeader.AddressOfEntryPoint = 0x1000; section.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_CODE; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, section_data, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt64.OptionalHeader.SizeOfCode = 0; nt64.OptionalHeader.AddressOfEntryPoint = 0; section.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, section_data, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt64.OptionalHeader.SizeOfCode = 0x1000; nt64.OptionalHeader.AddressOfEntryPoint = 0; @@ -1351,14 +1352,14 @@ static void test_Loader(void) section.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_CODE; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, section_data, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt64.OptionalHeader.SizeOfCode = 0; nt64.OptionalHeader.AddressOfEntryPoint = 0; section.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_CODE; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, section_data, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt64.OptionalHeader.NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; nt64.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress = page_size; @@ -1368,38 +1369,38 @@ static void test_Loader(void) cor_header.Flags = COMIMAGE_FLAGS_ILONLY; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, &cor_header, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt64.OptionalHeader.SizeOfCode = 0x1000; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, &cor_header, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
cor_header.MinorRuntimeVersion = 5; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, &cor_header, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
cor_header.Flags = COMIMAGE_FLAGS_ILONLY | COMIMAGE_FLAGS_32BITREQUIRED; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, &cor_header, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
cor_header.Flags = COMIMAGE_FLAGS_ILONLY | COMIMAGE_FLAGS_32BITPREFERRED; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, &cor_header, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
cor_header.Flags = 0; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, &cor_header, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress = 1; nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].Size = 1; status = map_image_section( (IMAGE_NT_HEADERS *)&nt64, §ion, &cor_header, __LINE__ ); ok( status == (is_wow64 ? STATUS_SUCCESS : STATUS_INVALID_IMAGE_WIN_64), - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status ); } else { @@ -1429,7 +1430,7 @@ static void test_Loader(void) section.Characteristics = IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_EXECUTE;
status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, section_data, __LINE__ ); - ok( status == STATUS_INVALID_IMAGE_FORMAT, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_INVALID_IMAGE_FORMAT, "NtCreateSection error %08lx\n", status );
switch (orig_machine) { @@ -1438,36 +1439,36 @@ static void test_Loader(void) } status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, section_data, __LINE__ ); ok( status == STATUS_INVALID_IMAGE_FORMAT || broken(!status) /* win8 */, - "NtCreateSection error %08x\n", status ); + "NtCreateSection error %08lx\n", status );
nt32.FileHeader.Machine = get_alt_bitness_machine( orig_machine ); status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, section_data, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt32.OptionalHeader.SizeOfCode = 0; nt32.OptionalHeader.AddressOfEntryPoint = 0x1000; section.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_CODE; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, section_data, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt32.OptionalHeader.SizeOfCode = 0; nt32.OptionalHeader.AddressOfEntryPoint = 0; section.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, section_data, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt32.OptionalHeader.SizeOfCode = 0x1000; nt32.OptionalHeader.AddressOfEntryPoint = 0; nt32.OptionalHeader.DllCharacteristics = IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE; section.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_CODE; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, section_data, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt32.OptionalHeader.SizeOfCode = 0; nt32.OptionalHeader.AddressOfEntryPoint = 0; section.Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_CNT_CODE; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, section_data, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt32.OptionalHeader.NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; nt32.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress = page_size; @@ -1476,32 +1477,32 @@ static void test_Loader(void) cor_header.MinorRuntimeVersion = 4; cor_header.Flags = COMIMAGE_FLAGS_ILONLY; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt32.OptionalHeader.SizeOfCode = 0x1000; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
cor_header.MinorRuntimeVersion = 5; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
cor_header.Flags = COMIMAGE_FLAGS_ILONLY | COMIMAGE_FLAGS_32BITREQUIRED; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
cor_header.Flags = COMIMAGE_FLAGS_ILONLY | COMIMAGE_FLAGS_32BITPREFERRED; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
cor_header.Flags = 0; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].VirtualAddress = 1; nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].Size = 1; status = map_image_section( (IMAGE_NT_HEADERS *)&nt32, §ion, &cor_header, __LINE__ ); - ok( status == STATUS_SUCCESS, "NtCreateSection error %08x\n", status ); + ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status ); }
section.Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ; @@ -1528,11 +1529,11 @@ static void test_filenames(void) strcpy( long_path, dll_name ); strcpy( strrchr( long_path, '\' ), "\this-is-a-long-name.dll" ); ret = MoveFileA( dll_name, long_path ); - ok( ret, "MoveFileA failed err %u\n", GetLastError() ); + ok( ret, "MoveFileA failed err %lu\n", GetLastError() ); GetShortPathNameA( long_path, short_path, MAX_PATH );
mod = LoadLibraryA( short_path ); - ok( mod != NULL, "loading failed err %u\n", GetLastError() ); + ok( mod != NULL, "loading failed err %lu\n", GetLastError() ); GetModuleFileNameA( mod, buffer, MAX_PATH ); ok( !lstrcmpiA( buffer, short_path ), "got wrong path %s / %s\n", buffer, short_path ); mod2 = GetModuleHandleA( short_path ); @@ -1540,7 +1541,7 @@ static void test_filenames(void) mod2 = GetModuleHandleA( long_path ); ok( mod == mod2, "wrong module %p for %s\n", mod2, long_path ); mod2 = LoadLibraryA( long_path ); - ok( mod2 != NULL, "loading failed err %u\n", GetLastError() ); + ok( mod2 != NULL, "loading failed err %lu\n", GetLastError() ); ok( mod == mod2, "library loaded twice\n" ); GetModuleFileNameA( mod2, buffer, MAX_PATH ); ok( !lstrcmpiA( buffer, short_path ), "got wrong path %s / %s\n", buffer, short_path ); @@ -1548,7 +1549,7 @@ static void test_filenames(void) FreeLibrary( mod );
mod = LoadLibraryA( long_path ); - ok( mod != NULL, "loading failed err %u\n", GetLastError() ); + ok( mod != NULL, "loading failed err %lu\n", GetLastError() ); GetModuleFileNameA( mod, buffer, MAX_PATH ); ok( !lstrcmpiA( buffer, long_path ), "got wrong path %s / %s\n", buffer, long_path ); mod2 = GetModuleHandleA( short_path ); @@ -1556,7 +1557,7 @@ static void test_filenames(void) mod2 = GetModuleHandleA( long_path ); ok( mod == mod2, "wrong module %p for %s\n", mod2, long_path ); mod2 = LoadLibraryA( short_path ); - ok( mod2 != NULL, "loading failed err %u\n", GetLastError() ); + ok( mod2 != NULL, "loading failed err %lu\n", GetLastError() ); ok( mod == mod2, "library loaded twice\n" ); GetModuleFileNameA( mod2, buffer, MAX_PATH ); ok( !lstrcmpiA( buffer, long_path ), "got wrong path %s / %s\n", buffer, long_path ); @@ -1566,17 +1567,17 @@ static void test_filenames(void) strcpy( dll_name, long_path ); strcpy( strrchr( dll_name, '\' ), "\this-is-another-name.dll" ); ret = CreateHardLinkA( dll_name, long_path, NULL ); - ok( ret, "CreateHardLinkA failed err %u\n", GetLastError() ); + ok( ret, "CreateHardLinkA failed err %lu\n", GetLastError() ); if (ret) { mod = LoadLibraryA( dll_name ); - ok( mod != NULL, "loading failed err %u\n", GetLastError() ); + ok( mod != NULL, "loading failed err %lu\n", GetLastError() ); GetModuleFileNameA( mod, buffer, MAX_PATH ); ok( !lstrcmpiA( buffer, dll_name ), "got wrong path %s / %s\n", buffer, dll_name ); mod2 = GetModuleHandleA( long_path ); ok( mod == mod2, "wrong module %p for %s\n", mod2, long_path ); mod2 = LoadLibraryA( long_path ); - ok( mod2 != NULL, "loading failed err %u\n", GetLastError() ); + ok( mod2 != NULL, "loading failed err %lu\n", GetLastError() ); ok( mod == mod2, "library loaded twice\n" ); GetModuleFileNameA( mod2, buffer, MAX_PATH ); ok( !lstrcmpiA( buffer, dll_name ), "got wrong path %s / %s\n", buffer, short_path ); @@ -1655,11 +1656,11 @@ static void test_image_mapping(const char *dll_name, DWORD scn_page_access, BOOL
SetLastError(0xdeadbeef); hfile = CreateFileA(dll_name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hmap = CreateFileMappingW(hfile, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, 0); - ok(hmap != 0, "CreateFileMapping error %d\n", GetLastError()); + ok(hmap != 0, "CreateFileMapping error %ld\n", GetLastError());
offset.u.LowPart = 0; offset.u.HighPart = 0; @@ -1668,41 +1669,41 @@ static void test_image_mapping(const char *dll_name, DWORD scn_page_access, BOOL size = 0; status = pNtMapViewOfSection(hmap, GetCurrentProcess(), &addr1, 0, 0, &offset, &size, 1 /* ViewShare */, 0, PAGE_READONLY); - ok(status == STATUS_SUCCESS, "NtMapViewOfSection error %x\n", status); + ok(status == STATUS_SUCCESS, "NtMapViewOfSection error %lx\n", status); ok(addr1 != 0, "mapped address should be valid\n");
SetLastError(0xdeadbeef); size = VirtualQuery((char *)addr1 + section.VirtualAddress, &info, sizeof(info)); - ok(size == sizeof(info), "VirtualQuery error %d\n", GetLastError()); + ok(size == sizeof(info), "VirtualQuery error %ld\n", GetLastError()); ok(info.BaseAddress == (char *)addr1 + section.VirtualAddress, "got %p != expected %p\n", info.BaseAddress, (char *)addr1 + section.VirtualAddress); - ok(info.RegionSize == page_size, "got %#lx != expected %#x\n", info.RegionSize, page_size); - ok(info.Protect == scn_page_access, "got %#x != expected %#x\n", info.Protect, scn_page_access); + ok(info.RegionSize == page_size, "got %#Ix != expected %#lx\n", info.RegionSize, page_size); + ok(info.Protect == scn_page_access, "got %#lx != expected %#lx\n", info.Protect, scn_page_access); ok(info.AllocationBase == addr1, "%p != %p\n", info.AllocationBase, addr1); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%#x != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%#x != MEM_COMMIT\n", info.State); - ok(info.Type == SEC_IMAGE, "%#x != SEC_IMAGE\n", info.Type); + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%#lx != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%#lx != MEM_COMMIT\n", info.State); + ok(info.Type == SEC_IMAGE, "%#lx != SEC_IMAGE\n", info.Type);
addr2 = NULL; size = 0; status = pNtMapViewOfSection(hmap, GetCurrentProcess(), &addr2, 0, 0, &offset, &size, 1 /* ViewShare */, 0, PAGE_READONLY); - ok(status == STATUS_IMAGE_NOT_AT_BASE, "expected STATUS_IMAGE_NOT_AT_BASE, got %x\n", status); + ok(status == STATUS_IMAGE_NOT_AT_BASE, "expected STATUS_IMAGE_NOT_AT_BASE, got %lx\n", status); ok(addr2 != 0, "mapped address should be valid\n"); ok(addr2 != addr1, "mapped addresses should be different\n");
SetLastError(0xdeadbeef); size = VirtualQuery((char *)addr2 + section.VirtualAddress, &info, sizeof(info)); - ok(size == sizeof(info), "VirtualQuery error %d\n", GetLastError()); + ok(size == sizeof(info), "VirtualQuery error %ld\n", GetLastError()); ok(info.BaseAddress == (char *)addr2 + section.VirtualAddress, "got %p != expected %p\n", info.BaseAddress, (char *)addr2 + section.VirtualAddress); - ok(info.RegionSize == page_size, "got %#lx != expected %#x\n", info.RegionSize, page_size); - ok(info.Protect == scn_page_access, "got %#x != expected %#x\n", info.Protect, scn_page_access); + ok(info.RegionSize == page_size, "got %#Ix != expected %#lx\n", info.RegionSize, page_size); + ok(info.Protect == scn_page_access, "got %#lx != expected %#lx\n", info.Protect, scn_page_access); ok(info.AllocationBase == addr2, "%p != %p\n", info.AllocationBase, addr2); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%#x != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%#x != MEM_COMMIT\n", info.State); - ok(info.Type == SEC_IMAGE, "%#x != SEC_IMAGE\n", info.Type); + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%#lx != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%#lx != MEM_COMMIT\n", info.State); + ok(info.Type == SEC_IMAGE, "%#lx != SEC_IMAGE\n", info.Type);
status = pNtUnmapViewOfSection(GetCurrentProcess(), addr2); - ok(status == STATUS_SUCCESS, "NtUnmapViewOfSection error %x\n", status); + ok(status == STATUS_SUCCESS, "NtUnmapViewOfSection error %lx\n", status);
addr2 = MapViewOfFile(hmap, 0, 0, 0, 0); ok(addr2 != 0, "mapped address should be valid\n"); @@ -1710,14 +1711,14 @@ static void test_image_mapping(const char *dll_name, DWORD scn_page_access, BOOL
SetLastError(0xdeadbeef); size = VirtualQuery((char *)addr2 + section.VirtualAddress, &info, sizeof(info)); - ok(size == sizeof(info), "VirtualQuery error %d\n", GetLastError()); + ok(size == sizeof(info), "VirtualQuery error %ld\n", GetLastError()); ok(info.BaseAddress == (char *)addr2 + section.VirtualAddress, "got %p != expected %p\n", info.BaseAddress, (char *)addr2 + section.VirtualAddress); - ok(info.RegionSize == page_size, "got %#lx != expected %#x\n", info.RegionSize, page_size); - ok(info.Protect == scn_page_access, "got %#x != expected %#x\n", info.Protect, scn_page_access); + ok(info.RegionSize == page_size, "got %#Ix != expected %#lx\n", info.RegionSize, page_size); + ok(info.Protect == scn_page_access, "got %#lx != expected %#lx\n", info.Protect, scn_page_access); ok(info.AllocationBase == addr2, "%p != %p\n", info.AllocationBase, addr2); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%#x != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%#x != MEM_COMMIT\n", info.State); - ok(info.Type == SEC_IMAGE, "%#x != SEC_IMAGE\n", info.Type); + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%#lx != PAGE_EXECUTE_WRITECOPY\n", info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%#lx != MEM_COMMIT\n", info.State); + ok(info.Type == SEC_IMAGE, "%#lx != SEC_IMAGE\n", info.Type);
UnmapViewOfFile(addr2);
@@ -1726,21 +1727,21 @@ static void test_image_mapping(const char *dll_name, DWORD scn_page_access, BOOL if (is_dll) { ok(!addr2, "LoadLibrary should fail, is_dll %d\n", is_dll); - ok(GetLastError() == ERROR_INVALID_ADDRESS, "expected ERROR_INVALID_ADDRESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_ADDRESS, "expected ERROR_INVALID_ADDRESS, got %ld\n", GetLastError()); } else { BOOL ret; - ok(addr2 != 0, "LoadLibrary error %d, is_dll %d\n", GetLastError(), is_dll); + ok(addr2 != 0, "LoadLibrary error %ld, is_dll %d\n", GetLastError(), is_dll); ok(addr2 != addr1, "mapped addresses should be different\n");
SetLastError(0xdeadbeef); ret = FreeLibrary(addr2); - ok(ret, "FreeLibrary error %d\n", GetLastError()); + ok(ret, "FreeLibrary error %ld\n", GetLastError()); }
status = pNtUnmapViewOfSection(GetCurrentProcess(), addr1); - ok(status == STATUS_SUCCESS, "NtUnmapViewOfSection error %x\n", status); + ok(status == STATUS_SUCCESS, "NtUnmapViewOfSection error %lx\n", status);
CloseHandle(hmap); CloseHandle(hfile); @@ -1806,7 +1807,7 @@ static void test_VirtualProtect(void *base, void *section)
SetLastError(0xdeadbeef); ret = VirtualProtect(section, page_size, PAGE_NOACCESS, &old_prot); - ok(ret, "VirtualProtect error %d\n", GetLastError()); + ok(ret, "VirtualProtect error %ld\n", GetLastError());
orig_prot = old_prot;
@@ -1814,48 +1815,48 @@ static void test_VirtualProtect(void *base, void *section) { SetLastError(0xdeadbeef); ret = VirtualQuery(section, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.BaseAddress == section, "%d: got %p != expected %p\n", i, info.BaseAddress, section); - ok(info.RegionSize == page_size, "%d: got %#lx != expected %#x\n", i, info.RegionSize, page_size); - ok(info.Protect == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, info.Protect); - ok(info.AllocationBase == base, "%d: %p != %p\n", i, info.AllocationBase, base); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == SEC_IMAGE, "%d: %#x != SEC_IMAGE\n", i, info.Type); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); + ok(info.BaseAddress == section, "%ld: got %p != expected %p\n", i, info.BaseAddress, section); + ok(info.RegionSize == page_size, "%ld: got %#Ix != expected %#lx\n", i, info.RegionSize, page_size); + ok(info.Protect == PAGE_NOACCESS, "%ld: got %#lx != expected PAGE_NOACCESS\n", i, info.Protect); + ok(info.AllocationBase == base, "%ld: %p != %p\n", i, info.AllocationBase, base); + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%ld: %#lx != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%ld: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == SEC_IMAGE, "%ld: %#lx != SEC_IMAGE\n", i, info.Type);
old_prot = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VirtualProtect(section, page_size, td[i].prot_set, &old_prot); if (td[i].prot_get) { - ok(ret, "%d: VirtualProtect error %d, requested prot %#x\n", i, GetLastError(), td[i].prot_set); - ok(old_prot == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, old_prot); + ok(ret, "%ld: VirtualProtect error %ld, requested prot %#lx\n", i, GetLastError(), td[i].prot_set); + ok(old_prot == PAGE_NOACCESS, "%ld: got %#lx != expected PAGE_NOACCESS\n", i, old_prot);
SetLastError(0xdeadbeef); ret = VirtualQuery(section, &info, sizeof(info)); - ok(ret, "VirtualQuery failed %d\n", GetLastError()); - ok(info.BaseAddress == section, "%d: got %p != expected %p\n", i, info.BaseAddress, section); - ok(info.RegionSize == page_size, "%d: got %#lx != expected %#x\n", i, info.RegionSize, page_size); - ok(info.Protect == td[i].prot_get, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot_get); - ok(info.AllocationBase == base, "%d: %p != %p\n", i, info.AllocationBase, base); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == SEC_IMAGE, "%d: %#x != SEC_IMAGE\n", i, info.Type); + ok(ret, "VirtualQuery failed %ld\n", GetLastError()); + ok(info.BaseAddress == section, "%ld: got %p != expected %p\n", i, info.BaseAddress, section); + ok(info.RegionSize == page_size, "%ld: got %#Ix != expected %#lx\n", i, info.RegionSize, page_size); + ok(info.Protect == td[i].prot_get, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot_get); + ok(info.AllocationBase == base, "%ld: %p != %p\n", i, info.AllocationBase, base); + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%ld: %#lx != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%ld: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == SEC_IMAGE, "%ld: %#lx != SEC_IMAGE\n", i, info.Type); } else { - ok(!ret, "%d: VirtualProtect should fail\n", i); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); + ok(!ret, "%ld: VirtualProtect should fail\n", i); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%ld: expected ERROR_INVALID_PARAMETER, got %ld\n", i, GetLastError()); }
old_prot = 0xdeadbeef; SetLastError(0xdeadbeef); ret = VirtualProtect(section, page_size, PAGE_NOACCESS, &old_prot); - ok(ret, "%d: VirtualProtect error %d\n", i, GetLastError()); + ok(ret, "%ld: VirtualProtect error %ld\n", i, GetLastError()); if (td[i].prot_get) - ok(old_prot == td[i].prot_get, "%d: got %#x != expected %#x\n", i, old_prot, td[i].prot_get); + ok(old_prot == td[i].prot_get, "%ld: got %#lx != expected %#lx\n", i, old_prot, td[i].prot_get); else - ok(old_prot == PAGE_NOACCESS, "%d: got %#x != expected PAGE_NOACCESS\n", i, old_prot); + ok(old_prot == PAGE_NOACCESS, "%ld: got %#lx != expected PAGE_NOACCESS\n", i, old_prot); }
exec_prot = 0; @@ -1872,11 +1873,11 @@ static void test_VirtualProtect(void *base, void *section) ret = VirtualProtect(section, page_size, prot, &old_prot); if ((rw_prot && exec_prot) || (!rw_prot && !exec_prot)) { - ok(!ret, "VirtualProtect(%02x) should fail\n", prot); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(!ret, "VirtualProtect(%02lx) should fail\n", prot); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); } else - ok(ret, "VirtualProtect(%02x) error %d\n", prot, GetLastError()); + ok(ret, "VirtualProtect(%02lx) error %ld\n", prot, GetLastError());
rw_prot = 1 << j; } @@ -1886,7 +1887,7 @@ static void test_VirtualProtect(void *base, void *section)
SetLastError(0xdeadbeef); ret = VirtualProtect(section, page_size, orig_prot, &old_prot); - ok(ret, "VirtualProtect error %d\n", GetLastError()); + ok(ret, "VirtualProtect error %ld\n", GetLastError()); }
static void test_section_access(void) @@ -1959,7 +1960,7 @@ static void test_section_access(void)
SetLastError(0xdeadbeef); ret = WriteFile(hfile, &dos_header, sizeof(dos_header), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
nt_header = nt_header_template; nt_header.FileHeader.NumberOfSections = 1; @@ -1982,42 +1983,42 @@ static void test_section_access(void)
SetLastError(0xdeadbeef); ret = WriteFile(hfile, &nt_header, sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = WriteFile(hfile, &nt_header.OptionalHeader, sizeof(IMAGE_OPTIONAL_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
ret = WriteFile(hfile, §ion, sizeof(section), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
file_align = nt_header.OptionalHeader.FileAlignment - nt_header.OptionalHeader.SizeOfHeaders; assert(file_align < sizeof(filler)); SetLastError(0xdeadbeef); ret = WriteFile(hfile, filler, file_align, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
/* section data */ SetLastError(0xdeadbeef); ret = WriteFile(hfile, section_data, sizeof(section_data), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
CloseHandle(hfile);
SetLastError(0xdeadbeef); hlib = LoadLibraryExA(dll_name, NULL, DONT_RESOLVE_DLL_REFERENCES); - ok(hlib != 0, "LoadLibrary error %d\n", GetLastError()); + ok(hlib != 0, "LoadLibrary error %ld\n", GetLastError());
SetLastError(0xdeadbeef); size = VirtualQuery((char *)hlib + section.VirtualAddress, &info, sizeof(info)); ok(size == sizeof(info), - "%d: VirtualQuery error %d\n", i, GetLastError()); + "%d: VirtualQuery error %ld\n", i, GetLastError()); ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress); - ok(info.RegionSize == page_size, "%d: got %#lx != expected %#x\n", i, info.RegionSize, page_size); - ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access); + ok(info.RegionSize == page_size, "%d: got %#Ix != expected %#lx\n", i, info.RegionSize, page_size); + ok(info.Protect == td[i].scn_page_access, "%d: got %#lx != expected %#lx\n", i, info.Protect, td[i].scn_page_access); ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == SEC_IMAGE, "%d: %#x != SEC_IMAGE\n", i, info.Type); + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#lx != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%d: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == SEC_IMAGE, "%d: %#lx != SEC_IMAGE\n", i, info.Type); if (info.Protect != PAGE_NOACCESS) ok(!memcmp((const char *)info.BaseAddress, section_data, section.SizeOfRawData), "wrong section data\n");
@@ -2030,15 +2031,15 @@ static void test_section_access(void) *p = 0xfe; SetLastError(0xdeadbeef); size = VirtualQuery((char *)hlib + section.VirtualAddress, &info, sizeof(info)); - ok(size == sizeof(info), "%d: VirtualQuery error %d\n", i, GetLastError()); + ok(size == sizeof(info), "%d: VirtualQuery error %ld\n", i, GetLastError()); /* FIXME: remove the condition below once Wine is fixed */ todo_wine_if (info.Protect == PAGE_WRITECOPY || info.Protect == PAGE_EXECUTE_WRITECOPY) - ok(info.Protect == td[i].scn_page_access_after_write, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access_after_write); + ok(info.Protect == td[i].scn_page_access_after_write, "%d: got %#lx != expected %#lx\n", i, info.Protect, td[i].scn_page_access_after_write); }
SetLastError(0xdeadbeef); ret = FreeLibrary(hlib); - ok(ret, "FreeLibrary error %d\n", GetLastError()); + ok(ret, "FreeLibrary error %ld\n", GetLastError());
test_image_mapping(dll_name, td[i].scn_page_access, TRUE);
@@ -2053,57 +2054,57 @@ static void test_section_access(void) * but leave a not deletable temporary file. */ ok(hfile != INVALID_HANDLE_VALUE || broken(hfile == INVALID_HANDLE_VALUE) /* nt4 */, - "CreateFile error %d\n", GetLastError()); + "CreateFile error %ld\n", GetLastError()); if (hfile == INVALID_HANDLE_VALUE) goto nt4_is_broken; SetFilePointer(hfile, sizeof(dos_header), NULL, FILE_BEGIN); SetLastError(0xdeadbeef); ret = WriteFile(hfile, &nt_header, sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); CloseHandle(hfile);
memset(&sti, 0, sizeof(sti)); sti.cb = sizeof(sti); SetLastError(0xdeadbeef); ret = CreateProcessA(dll_name, NULL, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &sti, &pi); - ok(ret, "CreateProcess() error %d\n", GetLastError()); + ok(ret, "CreateProcess() error %ld\n", GetLastError());
SetLastError(0xdeadbeef); size = VirtualQueryEx(pi.hProcess, (char *)hlib + section.VirtualAddress, &info, sizeof(info)); ok(size == sizeof(info), - "%d: VirtualQuery error %d\n", i, GetLastError()); + "%d: VirtualQuery error %ld\n", i, GetLastError()); ok(info.BaseAddress == (char *)hlib + section.VirtualAddress, "%d: got %p != expected %p\n", i, info.BaseAddress, (char *)hlib + section.VirtualAddress); - ok(info.RegionSize == page_size, "%d: got %#lx != expected %#x\n", i, info.RegionSize, page_size); - ok(info.Protect == td[i].scn_page_access, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].scn_page_access); + ok(info.RegionSize == page_size, "%d: got %#Ix != expected %#lx\n", i, info.RegionSize, page_size); + ok(info.Protect == td[i].scn_page_access, "%d: got %#lx != expected %#lx\n", i, info.Protect, td[i].scn_page_access); ok(info.AllocationBase == hlib, "%d: %p != %p\n", i, info.AllocationBase, hlib); - ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#x != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); - ok(info.State == MEM_COMMIT, "%d: %#x != MEM_COMMIT\n", i, info.State); - ok(info.Type == SEC_IMAGE, "%d: %#x != SEC_IMAGE\n", i, info.Type); + ok(info.AllocationProtect == PAGE_EXECUTE_WRITECOPY, "%d: %#lx != PAGE_EXECUTE_WRITECOPY\n", i, info.AllocationProtect); + ok(info.State == MEM_COMMIT, "%d: %#lx != MEM_COMMIT\n", i, info.State); + ok(info.Type == SEC_IMAGE, "%d: %#lx != SEC_IMAGE\n", i, info.Type); if (info.Protect != PAGE_NOACCESS) { SetLastError(0xdeadbeef); ret = ReadProcessMemory(pi.hProcess, info.BaseAddress, buf, section.SizeOfRawData, NULL); - ok(ret, "ReadProcessMemory() error %d\n", GetLastError()); + ok(ret, "ReadProcessMemory() error %ld\n", GetLastError()); ok(!memcmp(buf, section_data, section.SizeOfRawData), "wrong section data\n"); }
status = NtQueryInformationProcess(pi.hProcess, ProcessImageInformation, &image_info, sizeof(image_info), NULL ); - ok(!status, "Got unexpected status %#x.\n", status); + ok(!status, "Got unexpected status %#lx.\n", status); ok(!(image_info.ImageCharacteristics & IMAGE_FILE_DLL), "Got unexpected characteristics %#x.\n", nt_header.FileHeader.Characteristics); status = NtUnmapViewOfSection(pi.hProcess, info.BaseAddress); - ok(!status, "Got unexpected status %#x.\n", status); + ok(!status, "Got unexpected status %#lx.\n", status); status = NtQueryInformationProcess(pi.hProcess, ProcessImageInformation, &image_info, sizeof(image_info), NULL ); - ok(!status, "Got unexpected status %#x.\n", status); + ok(!status, "Got unexpected status %#lx.\n", status); ok(!(image_info.ImageCharacteristics & IMAGE_FILE_DLL), "Got unexpected characteristics %#x.\n", nt_header.FileHeader.Characteristics);
SetLastError(0xdeadbeef); ret = TerminateProcess(pi.hProcess, 0); - ok(ret, "TerminateProcess() error %d\n", GetLastError()); + ok(ret, "TerminateProcess() error %ld\n", GetLastError()); ret = WaitForSingleObject(pi.hProcess, 3000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed: %x\n", ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed: %lx\n", ret);
CloseHandle(pi.hThread); CloseHandle(pi.hProcess); @@ -2113,7 +2114,7 @@ static void test_section_access(void) nt4_is_broken: SetLastError(0xdeadbeef); ret = DeleteFileA(dll_name); - ok(ret || broken(!ret) /* nt4 */, "DeleteFile error %d\n", GetLastError()); + ok(ret || broken(!ret) /* nt4 */, "DeleteFile error %ld\n", GetLastError()); } }
@@ -2203,7 +2204,7 @@ static void test_import_resolution(void) { case 0: /* normal load */ mod = LoadLibraryA( dll_name ); - ok( mod != NULL, "failed to load err %u\n", GetLastError() ); + ok( mod != NULL, "failed to load err %lu\n", GetLastError() ); if (!mod) break; ptr = (struct imports *)((char *)mod + page_size); expect = GetProcAddress( GetModuleHandleA( data.module ), data.function.name ); @@ -2220,7 +2221,7 @@ static void test_import_resolution(void) break; case 1: /* load with DONT_RESOLVE_DLL_REFERENCES doesn't resolve imports */ mod = LoadLibraryExA( dll_name, 0, DONT_RESOLVE_DLL_REFERENCES ); - ok( mod != NULL, "failed to load err %u\n", GetLastError() ); + ok( mod != NULL, "failed to load err %lu\n", GetLastError() ); if (!mod) break; ptr = (struct imports *)((char *)mod + page_size); ok( ptr->thunks[0].u1.Function == 0xdeadbeef, "thunk resolved to %p for %s.%s\n", @@ -2237,7 +2238,7 @@ static void test_import_resolution(void) break; case 2: /* load without IMAGE_FILE_DLL doesn't resolve imports */ mod = LoadLibraryA( dll_name ); - ok( mod != NULL, "failed to load err %u\n", GetLastError() ); + ok( mod != NULL, "failed to load err %lu\n", GetLastError() ); if (!mod) break; ptr = (struct imports *)((char *)mod + page_size); ok( ptr->thunks[0].u1.Function == 0xdeadbeef, "thunk resolved to %p for %s.%s\n", @@ -2266,7 +2267,7 @@ static DWORD WINAPI mutex_thread_proc(void *param) DWORD ret;
ret = WaitForSingleObject(mutex, 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#x\n", ret); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#lx\n", ret);
SetEvent(param);
@@ -2276,7 +2277,7 @@ static DWORD WINAPI mutex_thread_proc(void *param) wait_list[3] = heap_lock_event; wait_list[4] = cs_lock_event;
- trace("%04x: mutex_thread_proc: starting\n", GetCurrentThreadId()); + trace("%04lx: mutex_thread_proc: starting\n", GetCurrentThreadId()); while (1) { ret = WaitForMultipleObjects(ARRAY_SIZE(wait_list), wait_list, FALSE, 50); @@ -2284,36 +2285,36 @@ static DWORD WINAPI mutex_thread_proc(void *param) else if (ret == WAIT_OBJECT_0 + 1) { ULONG_PTR loader_lock_magic; - trace("%04x: mutex_thread_proc: Entering loader lock\n", GetCurrentThreadId()); + trace("%04lx: mutex_thread_proc: Entering loader lock\n", GetCurrentThreadId()); ret = pLdrLockLoaderLock(0, NULL, &loader_lock_magic); - ok(!ret, "LdrLockLoaderLock error %#x\n", ret); + ok(!ret, "LdrLockLoaderLock error %#lx\n", ret); inside_loader_lock++; SetEvent(ack_event); } else if (ret == WAIT_OBJECT_0 + 2) { - trace("%04x: mutex_thread_proc: Entering PEB lock\n", GetCurrentThreadId()); + trace("%04lx: mutex_thread_proc: Entering PEB lock\n", GetCurrentThreadId()); pRtlAcquirePebLock(); inside_peb_lock++; SetEvent(ack_event); } else if (ret == WAIT_OBJECT_0 + 3) { - trace("%04x: mutex_thread_proc: Entering heap lock\n", GetCurrentThreadId()); + trace("%04lx: mutex_thread_proc: Entering heap lock\n", GetCurrentThreadId()); HeapLock(GetProcessHeap()); inside_heap_lock++; SetEvent(ack_event); } else if (ret == WAIT_OBJECT_0 + 4) { - trace("%04x: mutex_thread_proc: Entering CS lock\n", GetCurrentThreadId()); + trace("%04lx: mutex_thread_proc: Entering CS lock\n", GetCurrentThreadId()); EnterCriticalSection(&cs_lock); inside_cs_lock++; SetEvent(ack_event); } }
- trace("%04x: mutex_thread_proc: exiting\n", GetCurrentThreadId()); + trace("%04lx: mutex_thread_proc: exiting\n", GetCurrentThreadId()); return 196; }
@@ -2322,18 +2323,18 @@ static DWORD WINAPI semaphore_thread_proc(void *param) DWORD ret;
ret = WaitForSingleObject(semaphore, 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#x\n", ret); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#lx\n", ret);
SetEvent(param);
while (1) { if (winetest_debug > 1) - trace("%04x: semaphore_thread_proc: still alive\n", GetCurrentThreadId()); + trace("%04lx: semaphore_thread_proc: still alive\n", GetCurrentThreadId()); if (WaitForSingleObject(stop_event, 50) != WAIT_TIMEOUT) break; }
- trace("%04x: semaphore_thread_proc: exiting\n", GetCurrentThreadId()); + trace("%04lx: semaphore_thread_proc: exiting\n", GetCurrentThreadId()); return 196; }
@@ -2345,7 +2346,7 @@ static DWORD WINAPI noop_thread_proc(void *param) InterlockedIncrement(noop_thread_started); }
- trace("%04x: noop_thread_proc: exiting\n", GetCurrentThreadId()); + trace("%04lx: noop_thread_proc: exiting\n", GetCurrentThreadId()); return 195; }
@@ -2394,7 +2395,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) trace("dll: %p, DLL_PROCESS_ATTACH, %p\n", hinst, param);
ret = pRtlDllShutdownInProgress(); - ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret, "RtlDllShutdownInProgress returned %ld\n", ret);
/* Set up the FLS slot, if FLS is available */ if (pFlsGetValue) @@ -2402,18 +2403,18 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) void* value; BOOL bret; ret = pFlsAlloc(&fls_callback); - ok(ret != FLS_OUT_OF_INDEXES, "FlsAlloc returned %d\n", ret); + ok(ret != FLS_OUT_OF_INDEXES, "FlsAlloc returned %ld\n", ret); fls_index = ret; SetLastError(0xdeadbeef); value = pFlsGetValue(fls_index); ok(!value, "FlsGetValue returned %p, expected NULL\n", value); - ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %lu\n", GetLastError()); bret = pFlsSetValue(fls_index, (void*) 0x31415); ok(bret, "FlsSetValue failed\n"); fls_count++;
fls_index2 = pFlsAlloc(&fls_callback); - ok(fls_index2 != FLS_OUT_OF_INDEXES, "FlsAlloc returned %d\n", ret); + ok(fls_index2 != FLS_OUT_OF_INDEXES, "FlsAlloc returned %ld\n", ret); } ++thread_count; break; @@ -2464,7 +2465,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) if (test_dll_phase == 3) { ret = pRtlDllShutdownInProgress(); - ok(ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(ret, "RtlDllShutdownInProgress returned %ld\n", ret); } else { @@ -2472,7 +2473,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
/* FIXME: remove once Wine is fixed */ todo_wine_if (!(expected_code == STILL_ACTIVE || expected_code == 196)) - ok(!ret || broken(ret) /* before Vista */, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret || broken(ret) /* before Vista */, "RtlDllShutdownInProgress returned %ld\n", ret); }
/* In the case that the process is terminating, FLS slots should still be accessible, but @@ -2487,20 +2488,20 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) value = pFlsGetValue(fls_index); ok(broken(value == (void*) 0x31415) || /* Win2k3 */ value == NULL, "FlsGetValue returned %p, expected NULL\n", value); - ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %lu\n", GetLastError()); ok(broken(fls_callback_count == thread_detach_count) || /* Win2k3 */ fls_callback_count == thread_detach_count + 1, - "wrong FLS callback count %d, expected %d\n", fls_callback_count, thread_detach_count + 1); + "wrong FLS callback count %ld, expected %d\n", fls_callback_count, thread_detach_count + 1); } if (pFlsFree) { BOOL ret; /* Call FlsFree now and run the remaining callbacks from uncleanly terminated threads */ ret = pFlsFree(fls_index); - ok(ret, "FlsFree failed with error %u\n", GetLastError()); + ok(ret, "FlsFree failed with error %lu\n", GetLastError()); fls_index = FLS_OUT_OF_INDEXES; ok(fls_callback_count == fls_count, - "wrong FLS callback count %d, expected %d\n", fls_callback_count, fls_count); + "wrong FLS callback count %ld, expected %d\n", fls_callback_count, fls_count); }
ok(attached_thread_count >= 2, "attached thread count should be >= 2\n"); @@ -2513,40 +2514,40 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) if (expected_code != STILL_ACTIVE) { ret = WaitForSingleObject(attached_thread[i], 1000); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#x\n", ret); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#lx\n", ret); } ret = GetExitCodeThread(attached_thread[i], &code); - trace("dll: GetExitCodeThread(%u) => %d,%u\n", i, ret, code); - ok(ret == 1, "GetExitCodeThread returned %d, expected 1\n", ret); - ok(code == expected_code, "expected thread exit code %u, got %u\n", expected_code, code); + trace("dll: GetExitCodeThread(%lu) => %ld,%lu\n", i, ret, code); + ok(ret == 1, "GetExitCodeThread returned %ld, expected 1\n", ret); + ok(code == expected_code, "expected thread exit code %lu, got %lu\n", expected_code, code); }
ret = WaitForSingleObject(event, 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret);
ret = WaitForSingleObject(mutex, 0); if (expected_code == STILL_ACTIVE) - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); else - ok(ret == WAIT_ABANDONED, "expected WAIT_ABANDONED, got %#x\n", ret); + ok(ret == WAIT_ABANDONED, "expected WAIT_ABANDONED, got %#lx\n", ret);
/* semaphore is not abandoned on thread termination */ ret = WaitForSingleObject(semaphore, 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret);
if (expected_code == STILL_ACTIVE) { ret = WaitForSingleObject(attached_thread[0], 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); ret = WaitForSingleObject(attached_thread[1], 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); } else { ret = WaitForSingleObject(attached_thread[0], 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#x\n", ret); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#lx\n", ret); ret = WaitForSingleObject(attached_thread[1], 0); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#x\n", ret); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#lx\n", ret); }
/* win7 doesn't allow creating a thread during process shutdown but @@ -2559,26 +2560,26 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) { ok(!handle || broken(handle != 0) /* before win7 */, "CreateThread should fail\n"); if (!handle) - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); else { ret = WaitForSingleObject(handle, 1000); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); CloseHandle(handle); } } else { - ok(handle != 0, "CreateThread error %d\n", GetLastError()); + ok(handle != 0, "CreateThread error %ld\n", GetLastError()); ret = WaitForSingleObject(handle, 1000); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); ok(!noop_thread_started || broken(noop_thread_started) /* XP64 */, "thread shouldn't start yet\n"); CloseHandle(handle); }
SetLastError(0xdeadbeef); process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, GetCurrentProcessId()); - ok(process != NULL, "OpenProcess error %d\n", GetLastError()); + ok(process != NULL, "OpenProcess error %ld\n", GetLastError());
noop_thread_started = 0; SetLastError(0xdeadbeef); @@ -2587,26 +2588,26 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) { ok(!handle || broken(handle != 0) /* before win7 */, "CreateRemoteThread should fail\n"); if (!handle) - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); else { ret = WaitForSingleObject(handle, 1000); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); CloseHandle(handle); } } else { - ok(handle != 0, "CreateRemoteThread error %d\n", GetLastError()); + ok(handle != 0, "CreateRemoteThread error %ld\n", GetLastError()); ret = WaitForSingleObject(handle, 1000); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); ok(!noop_thread_started || broken(noop_thread_started) /* XP64 */, "thread shouldn't start yet\n"); CloseHandle(handle); }
SetLastError(0xdeadbeef); handle = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, NULL); - ok(handle != 0, "CreateFileMapping error %d\n", GetLastError()); + ok(handle != 0, "CreateFileMapping error %ld\n", GetLastError());
offset.u.LowPart = 0; offset.u.HighPart = 0; @@ -2614,9 +2615,9 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) size = 0; ret = pNtMapViewOfSection(handle, process, &addr, 0, 0, &offset, &size, 1 /* ViewShare */, 0, PAGE_READONLY); - ok(ret == STATUS_SUCCESS, "NtMapViewOfSection error %#x\n", ret); + ok(ret == STATUS_SUCCESS, "NtMapViewOfSection error %#lx\n", ret); ret = pNtUnmapViewOfSection(process, addr); - ok(ret == STATUS_SUCCESS, "NtUnmapViewOfSection error %#x\n", ret); + ok(ret == STATUS_SUCCESS, "NtUnmapViewOfSection error %#lx\n", ret);
CloseHandle(handle); CloseHandle(process); @@ -2625,10 +2626,10 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) ok(!handle, "winver.exe shouldn't be loaded yet\n"); SetLastError(0xdeadbeef); handle = LoadLibraryA("winver.exe"); - ok(handle != 0, "LoadLibrary error %d\n", GetLastError()); + ok(handle != 0, "LoadLibrary error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = FreeLibrary(handle); - ok(ret, "FreeLibrary error %d\n", GetLastError()); + ok(ret, "FreeLibrary error %ld\n", GetLastError()); handle = GetModuleHandleA("winver.exe"); if (param) ok(handle != 0, "winver.exe should not be unloaded\n"); @@ -2639,17 +2640,17 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) SetLastError(0xdeadbeef); ret = WaitForDebugEvent(&de, 0); ok(!ret, "WaitForDebugEvent should fail\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = DebugActiveProcess(GetCurrentProcessId()); ok(!ret, "DebugActiveProcess should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WaitForDebugEvent(&de, 0); ok(!ret, "WaitForDebugEvent should fail\n"); - ok(GetLastError() == ERROR_SEM_TIMEOUT, "expected ERROR_SEM_TIMEOUT, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SEM_TIMEOUT, "expected ERROR_SEM_TIMEOUT, got %ld\n", GetLastError());
if (test_dll_phase == 2) { @@ -2666,7 +2667,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) ++thread_count;
ret = pRtlDllShutdownInProgress(); - ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret, "RtlDllShutdownInProgress returned %ld\n", ret);
if (attached_thread_count < MAX_COUNT) { @@ -2683,7 +2684,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) SetLastError(0xdeadbeef); value = pFlsGetValue(fls_index); ok(!value, "FlsGetValue returned %p, expected NULL\n", value); - ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %lu\n", GetLastError()); ret = pFlsSetValue(fls_index, (void*) 0x31415); ok(ret, "FlsSetValue failed\n"); fls_count++; @@ -2701,9 +2702,9 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) * sent on thread exit, but DLL_THREAD_ATTACH is never received. */ if (noop_thread_started) - ok(ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(ret, "RtlDllShutdownInProgress returned %ld\n", ret); else - ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret, "RtlDllShutdownInProgress returned %ld\n", ret);
/* FLS data should already be destroyed, if FLS is available. * Note that this is broken for Win2k3, which runs the callbacks *after* the DLL entry @@ -2719,7 +2720,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) value = pFlsGetValue(fls_index); ok(broken(value == (void*) 0x31415) || /* Win2k3 */ !value, "FlsGetValue returned %p, expected NULL\n", value); - ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "FlsGetValue failed with error %lu\n", GetLastError());
bret = pFlsSetValue(fls_index2, (void*) 0x31415); ok(bret, "FlsSetValue failed\n"); @@ -2734,7 +2735,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
break; default: - trace("dll: %p, %d, %p\n", hinst, reason, param); + trace("dll: %p, %ld, %p\n", hinst, reason, param); break; }
@@ -2752,7 +2753,7 @@ static void child_process(const char *dll_name, DWORD target_offset) struct PROCESS_BASIC_INFORMATION_PRIVATE pbi; DWORD_PTR affinity;
- trace("phase %d: writing %p at %#x\n", test_dll_phase, dll_entry_point, target_offset); + trace("phase %d: writing %p at %#lx\n", test_dll_phase, dll_entry_point, target_offset);
if (pFlsAlloc) { @@ -2762,36 +2763,36 @@ static void child_process(const char *dll_name, DWORD target_offset)
SetLastError(0xdeadbeef); mutex = CreateMutexW(NULL, FALSE, NULL); - ok(mutex != 0, "CreateMutex error %d\n", GetLastError()); + ok(mutex != 0, "CreateMutex error %ld\n", GetLastError());
SetLastError(0xdeadbeef); semaphore = CreateSemaphoreW(NULL, 1, 1, NULL); - ok(semaphore != 0, "CreateSemaphore error %d\n", GetLastError()); + ok(semaphore != 0, "CreateSemaphore error %ld\n", GetLastError());
SetLastError(0xdeadbeef); event = CreateEventW(NULL, TRUE, FALSE, NULL); - ok(event != 0, "CreateEvent error %d\n", GetLastError()); + ok(event != 0, "CreateEvent error %ld\n", GetLastError());
SetLastError(0xdeadbeef); loader_lock_event = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(loader_lock_event != 0, "CreateEvent error %d\n", GetLastError()); + ok(loader_lock_event != 0, "CreateEvent error %ld\n", GetLastError());
SetLastError(0xdeadbeef); peb_lock_event = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(peb_lock_event != 0, "CreateEvent error %d\n", GetLastError()); + ok(peb_lock_event != 0, "CreateEvent error %ld\n", GetLastError());
SetLastError(0xdeadbeef); heap_lock_event = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(heap_lock_event != 0, "CreateEvent error %d\n", GetLastError()); + ok(heap_lock_event != 0, "CreateEvent error %ld\n", GetLastError());
InitializeCriticalSection(&cs_lock); SetLastError(0xdeadbeef); cs_lock_event = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(cs_lock_event != 0, "CreateEvent error %d\n", GetLastError()); + ok(cs_lock_event != 0, "CreateEvent error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ack_event = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(ack_event != 0, "CreateEvent error %d\n", GetLastError()); + ok(ack_event != 0, "CreateEvent error %ld\n", GetLastError());
file = CreateFileA(dll_name, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); if (file == INVALID_HANDLE_VALUE) @@ -2803,20 +2804,20 @@ static void child_process(const char *dll_name, DWORD target_offset) SetLastError(0xdeadbeef); target = dll_entry_point; ret = WriteFile(file, &target, sizeof(target), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); CloseHandle(file);
SetLastError(0xdeadbeef); hmod = LoadLibraryA(dll_name); - ok(hmod != 0, "LoadLibrary error %d\n", GetLastError()); + ok(hmod != 0, "LoadLibrary error %ld\n", GetLastError());
SetLastError(0xdeadbeef); stop_event = CreateEventW(NULL, TRUE, FALSE, NULL); - ok(stop_event != 0, "CreateEvent error %d\n", GetLastError()); + ok(stop_event != 0, "CreateEvent error %ld\n", GetLastError());
SetLastError(0xdeadbeef); thread = CreateThread(NULL, 0, mutex_thread_proc, event, 0, &dummy); - ok(thread != 0, "CreateThread error %d\n", GetLastError()); + ok(thread != 0, "CreateThread error %ld\n", GetLastError()); WaitForSingleObject(event, 3000); CloseHandle(thread);
@@ -2824,7 +2825,7 @@ static void child_process(const char *dll_name, DWORD target_offset)
SetLastError(0xdeadbeef); thread = CreateThread(NULL, 0, semaphore_thread_proc, event, 0, &dummy); - ok(thread != 0, "CreateThread error %d\n", GetLastError()); + ok(thread != 0, "CreateThread error %ld\n", GetLastError()); WaitForSingleObject(event, 3000); CloseHandle(thread);
@@ -2835,62 +2836,62 @@ static void child_process(const char *dll_name, DWORD target_offset) for (i = 0; i < attached_thread_count; i++) { ret = GetExitCodeThread(attached_thread[i], &code); - trace("child: GetExitCodeThread(%u) => %d,%u\n", i, ret, code); - ok(ret == 1, "GetExitCodeThread returned %d, expected 1\n", ret); - ok(code == STILL_ACTIVE, "expected thread exit code STILL_ACTIVE, got %u\n", code); + trace("child: GetExitCodeThread(%lu) => %ld,%lu\n", i, ret, code); + ok(ret == 1, "GetExitCodeThread returned %ld, expected 1\n", ret); + ok(code == STILL_ACTIVE, "expected thread exit code STILL_ACTIVE, got %lu\n", code); }
ret = WaitForSingleObject(attached_thread[0], 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); ret = WaitForSingleObject(attached_thread[1], 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret);
ret = WaitForSingleObject(event, 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); ret = WaitForSingleObject(mutex, 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); ret = WaitForSingleObject(semaphore, 0); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret);
ret = pRtlDllShutdownInProgress(); - ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret, "RtlDllShutdownInProgress returned %ld\n", ret);
SetLastError(0xdeadbeef); process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, GetCurrentProcessId()); - ok(process != NULL, "OpenProcess error %d\n", GetLastError()); + ok(process != NULL, "OpenProcess error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = TerminateProcess(0, 195); ok(!ret, "TerminateProcess(0) should fail\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
Sleep(100);
affinity = 1; ret = pNtSetInformationProcess(process, ProcessAffinityMask, &affinity, sizeof(affinity)); - ok(!ret, "NtSetInformationProcess error %#x\n", ret); + ok(!ret, "NtSetInformationProcess error %#lx\n", ret);
switch (test_dll_phase) { case 0: ret = pRtlDllShutdownInProgress(); - ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret, "RtlDllShutdownInProgress returned %ld\n", ret);
trace("call NtTerminateProcess(0, 195)\n"); ret = pNtTerminateProcess(0, 195); - ok(!ret, "NtTerminateProcess error %#x\n", ret); + ok(!ret, "NtTerminateProcess error %#lx\n", ret);
memset(&pbi, 0, sizeof(pbi)); ret = pNtQueryInformationProcess(process, ProcessBasicInformation, &pbi, sizeof(pbi), NULL); - ok(!ret, "NtQueryInformationProcess error %#x\n", ret); + ok(!ret, "NtQueryInformationProcess error %#lx\n", ret); ok(pbi.ExitStatus == STILL_ACTIVE || pbi.ExitStatus == 195, - "expected STILL_ACTIVE, got %lu\n", pbi.ExitStatus); + "expected STILL_ACTIVE, got %Iu\n", pbi.ExitStatus); affinity = 1; ret = pNtSetInformationProcess(process, ProcessAffinityMask, &affinity, sizeof(affinity)); - ok(!ret, "NtSetInformationProcess error %#x\n", ret); + ok(!ret, "NtSetInformationProcess error %#lx\n", ret);
ret = pRtlDllShutdownInProgress(); - ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret, "RtlDllShutdownInProgress returned %ld\n", ret);
hmod = GetModuleHandleA(dll_name); ok(hmod != 0, "DLL should not be unloaded\n"); @@ -2899,11 +2900,11 @@ static void child_process(const char *dll_name, DWORD target_offset) thread = CreateThread(NULL, 0, noop_thread_proc, &dummy, 0, &ret); ok(!thread || broken(thread != 0) /* before win7 */, "CreateThread should fail\n"); if (!thread) - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); else { ret = WaitForSingleObject(thread, 1000); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#x\n", ret); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#lx\n", ret); CloseHandle(thread); }
@@ -2911,34 +2912,34 @@ static void child_process(const char *dll_name, DWORD target_offset) pLdrShutdownProcess();
ret = pRtlDllShutdownInProgress(); - ok(ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(ret, "RtlDllShutdownInProgress returned %ld\n", ret);
hmod = GetModuleHandleA(dll_name); ok(hmod != 0, "DLL should not be unloaded\n");
memset(&pbi, 0, sizeof(pbi)); ret = pNtQueryInformationProcess(process, ProcessBasicInformation, &pbi, sizeof(pbi), NULL); - ok(!ret, "NtQueryInformationProcess error %#x\n", ret); + ok(!ret, "NtQueryInformationProcess error %#lx\n", ret); ok(pbi.ExitStatus == STILL_ACTIVE || pbi.ExitStatus == 195, - "expected STILL_ACTIVE, got %lu\n", pbi.ExitStatus); + "expected STILL_ACTIVE, got %Iu\n", pbi.ExitStatus); affinity = 1; ret = pNtSetInformationProcess(process, ProcessAffinityMask, &affinity, sizeof(affinity)); - ok(!ret, "NtSetInformationProcess error %#x\n", ret); + ok(!ret, "NtSetInformationProcess error %#lx\n", ret); break;
case 1: /* normal ExitProcess */ ret = pRtlDllShutdownInProgress(); - ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret, "RtlDllShutdownInProgress returned %ld\n", ret); break;
case 2: /* ExitProcess will be called by the PROCESS_DETACH handler */ ret = pRtlDllShutdownInProgress(); - ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret, "RtlDllShutdownInProgress returned %ld\n", ret);
trace("call FreeLibrary(%p)\n", hmod); SetLastError(0xdeadbeef); ret = FreeLibrary(hmod); - ok(ret, "FreeLibrary error %d\n", GetLastError()); + ok(ret, "FreeLibrary error %ld\n", GetLastError()); hmod = GetModuleHandleA(dll_name); ok(!hmod, "DLL should be unloaded\n");
@@ -2946,7 +2947,7 @@ static void child_process(const char *dll_name, DWORD target_offset) ok(0, "FreeLibrary+ExitProcess should never return\n");
ret = pRtlDllShutdownInProgress(); - ok(!ret, "RtlDllShutdownInProgress returned %d\n", ret); + ok(!ret, "RtlDllShutdownInProgress returned %ld\n", ret);
break;
@@ -2964,7 +2965,7 @@ static void child_process(const char *dll_name, DWORD target_offset) /* calling NtTerminateProcess should not cause a deadlock */ trace("call NtTerminateProcess(0, 198)\n"); ret = pNtTerminateProcess(0, 198); - ok(!ret, "NtTerminateProcess error %#x\n", ret); + ok(!ret, "NtTerminateProcess error %#lx\n", ret);
*child_failures = winetest_get_failures();
@@ -3032,24 +3033,24 @@ static void child_process(const char *dll_name, DWORD target_offset) if (expected_code == STILL_ACTIVE) { ret = WaitForSingleObject(attached_thread[0], 100); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); ret = WaitForSingleObject(attached_thread[1], 100); - ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#x\n", ret); + ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %#lx\n", ret); } else { ret = WaitForSingleObject(attached_thread[0], 2000); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#x\n", ret); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#lx\n", ret); ret = WaitForSingleObject(attached_thread[1], 2000); - ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#x\n", ret); + ok(ret == WAIT_OBJECT_0, "expected WAIT_OBJECT_0, got %#lx\n", ret); }
for (i = 0; i < attached_thread_count; i++) { ret = GetExitCodeThread(attached_thread[i], &code); - trace("child: GetExitCodeThread(%u) => %d,%u\n", i, ret, code); - ok(ret == 1, "GetExitCodeThread returned %d, expected 1\n", ret); - ok(code == expected_code, "expected thread exit code %u, got %u\n", expected_code, code); + trace("child: GetExitCodeThread(%lu) => %ld,%lu\n", i, ret, code); + ok(ret == 1, "GetExitCodeThread returned %ld, expected 1\n", ret); + ok(code == expected_code, "expected thread exit code %lu, got %lu\n", expected_code, code); }
*child_failures = winetest_get_failures(); @@ -3133,7 +3134,7 @@ static void test_ExitProcess(void)
SetLastError(0xdeadbeef); ret = WriteFile(file, &dos_header, sizeof(dos_header), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
nt_header = nt_header_template; nt_header.FileHeader.NumberOfSections = 1; @@ -3147,10 +3148,10 @@ static void test_ExitProcess(void) nt_header.OptionalHeader.SizeOfHeaders = sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER); SetLastError(0xdeadbeef); ret = WriteFile(file, &nt_header, sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = WriteFile(file, &nt_header.OptionalHeader, sizeof(IMAGE_OPTIONAL_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
section.SizeOfRawData = sizeof(section_data); section.PointerToRawData = nt_header.OptionalHeader.FileAlignment; @@ -3159,20 +3160,20 @@ static void test_ExitProcess(void) section.Characteristics = IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_EXECUTE; SetLastError(0xdeadbeef); ret = WriteFile(file, §ion, sizeof(section), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
file_align = nt_header.OptionalHeader.FileAlignment - nt_header.OptionalHeader.SizeOfHeaders; assert(file_align < sizeof(filler)); SetLastError(0xdeadbeef); ret = WriteFile(file, filler, file_align, &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
target_offset = SetFilePointer(file, 0, NULL, FILE_CURRENT) + FIELD_OFFSET(struct section_data, target);
/* section data */ SetLastError(0xdeadbeef); ret = WriteFile(file, §ion_data, sizeof(section_data), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
CloseHandle(file);
@@ -3180,17 +3181,17 @@ static void test_ExitProcess(void)
/* phase 0 */ *child_failures = -1; - sprintf(cmdline, ""%s" loader %s %u 0", argv[0], dll_name, target_offset); + sprintf(cmdline, ""%s" loader %s %lu 0", argv[0], dll_name, target_offset); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); ret = WaitForSingleObject(pi.hProcess, 10000); ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n"); if (ret != WAIT_OBJECT_0) TerminateProcess(pi.hProcess, 0); GetExitCodeProcess(pi.hProcess, &ret); - ok(ret == 195, "expected exit code 195, got %u\n", ret); + ok(ret == 195, "expected exit code 195, got %lu\n", ret); if (*child_failures) { - trace("%d failures in child process\n", *child_failures); + trace("%ld failures in child process\n", *child_failures); winetest_add_failures(*child_failures); } CloseHandle(pi.hThread); @@ -3198,17 +3199,17 @@ static void test_ExitProcess(void)
/* phase 1 */ *child_failures = -1; - sprintf(cmdline, ""%s" loader %s %u 1", argv[0], dll_name, target_offset); + sprintf(cmdline, ""%s" loader %s %lu 1", argv[0], dll_name, target_offset); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); ret = WaitForSingleObject(pi.hProcess, 10000); ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n"); if (ret != WAIT_OBJECT_0) TerminateProcess(pi.hProcess, 0); GetExitCodeProcess(pi.hProcess, &ret); - ok(ret == 195, "expected exit code 195, got %u\n", ret); + ok(ret == 195, "expected exit code 195, got %lu\n", ret); if (*child_failures) { - trace("%d failures in child process\n", *child_failures); + trace("%ld failures in child process\n", *child_failures); winetest_add_failures(*child_failures); } CloseHandle(pi.hThread); @@ -3216,17 +3217,17 @@ static void test_ExitProcess(void)
/* phase 2 */ *child_failures = -1; - sprintf(cmdline, ""%s" loader %s %u 2", argv[0], dll_name, target_offset); + sprintf(cmdline, ""%s" loader %s %lu 2", argv[0], dll_name, target_offset); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); ret = WaitForSingleObject(pi.hProcess, 10000); ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n"); if (ret != WAIT_OBJECT_0) TerminateProcess(pi.hProcess, 0); GetExitCodeProcess(pi.hProcess, &ret); - ok(ret == 197, "expected exit code 197, got %u\n", ret); + ok(ret == 197, "expected exit code 197, got %lu\n", ret); if (*child_failures) { - trace("%d failures in child process\n", *child_failures); + trace("%ld failures in child process\n", *child_failures); winetest_add_failures(*child_failures); } CloseHandle(pi.hThread); @@ -3234,17 +3235,17 @@ static void test_ExitProcess(void)
/* phase 3 */ *child_failures = -1; - sprintf(cmdline, ""%s" loader %s %u 3", argv[0], dll_name, target_offset); + sprintf(cmdline, ""%s" loader %s %lu 3", argv[0], dll_name, target_offset); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); ret = WaitForSingleObject(pi.hProcess, 10000); ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n"); if (ret != WAIT_OBJECT_0) TerminateProcess(pi.hProcess, 0); GetExitCodeProcess(pi.hProcess, &ret); - ok(ret == 195, "expected exit code 195, got %u\n", ret); + ok(ret == 195, "expected exit code 195, got %lu\n", ret); if (*child_failures) { - trace("%d failures in child process\n", *child_failures); + trace("%ld failures in child process\n", *child_failures); winetest_add_failures(*child_failures); } CloseHandle(pi.hThread); @@ -3254,17 +3255,17 @@ static void test_ExitProcess(void) if (pLdrLockLoaderLock && pLdrUnlockLoaderLock) { *child_failures = -1; - sprintf(cmdline, ""%s" loader %s %u 4", argv[0], dll_name, target_offset); + sprintf(cmdline, ""%s" loader %s %lu 4", argv[0], dll_name, target_offset); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); ret = WaitForSingleObject(pi.hProcess, 10000); ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n"); if (ret != WAIT_OBJECT_0) TerminateProcess(pi.hProcess, 0); GetExitCodeProcess(pi.hProcess, &ret); - ok(ret == 198, "expected exit code 198, got %u\n", ret); + ok(ret == 198, "expected exit code 198, got %lu\n", ret); if (*child_failures) { - trace("%d failures in child process\n", *child_failures); + trace("%ld failures in child process\n", *child_failures); winetest_add_failures(*child_failures); } CloseHandle(pi.hThread); @@ -3277,9 +3278,9 @@ static void test_ExitProcess(void) if (pRtlAcquirePebLock && pRtlReleasePebLock) { *child_failures = -1; - sprintf(cmdline, ""%s" loader %s %u 5", argv[0], dll_name, target_offset); + sprintf(cmdline, ""%s" loader %s %lu 5", argv[0], dll_name, target_offset); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); ret = WaitForSingleObject(pi.hProcess, 5000); ok(ret == WAIT_TIMEOUT, "child process should fail to terminate\n"); if (ret != WAIT_OBJECT_0) @@ -3290,10 +3291,10 @@ static void test_ExitProcess(void) ret = WaitForSingleObject(pi.hProcess, 1000); ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n"); GetExitCodeProcess(pi.hProcess, &ret); - ok(ret == 199, "expected exit code 199, got %u\n", ret); + ok(ret == 199, "expected exit code 199, got %lu\n", ret); if (*child_failures) { - trace("%d failures in child process\n", *child_failures); + trace("%ld failures in child process\n", *child_failures); winetest_add_failures(*child_failures); } CloseHandle(pi.hThread); @@ -3304,9 +3305,9 @@ static void test_ExitProcess(void)
/* phase 6 */ *child_failures = -1; - sprintf(cmdline, ""%s" loader %s %u 6", argv[0], dll_name, target_offset); + sprintf(cmdline, ""%s" loader %s %lu 6", argv[0], dll_name, target_offset); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); ret = WaitForSingleObject(pi.hProcess, 5000); todo_wine ok(ret == WAIT_TIMEOUT || broken(ret == WAIT_OBJECT_0) /* XP */, "child process should fail to terminate\n"); @@ -3319,10 +3320,10 @@ static void test_ExitProcess(void) ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n"); GetExitCodeProcess(pi.hProcess, &ret); todo_wine - ok(ret == 201 || broken(ret == 1) /* XP */, "expected exit code 201, got %u\n", ret); + ok(ret == 201 || broken(ret == 1) /* XP */, "expected exit code 201, got %lu\n", ret); if (*child_failures) { - trace("%d failures in child process\n", *child_failures); + trace("%ld failures in child process\n", *child_failures); winetest_add_failures(*child_failures); } CloseHandle(pi.hThread); @@ -3330,9 +3331,9 @@ static void test_ExitProcess(void)
/* phase 7 */ *child_failures = -1; - sprintf(cmdline, ""%s" loader %s %u 7", argv[0], dll_name, target_offset); + sprintf(cmdline, ""%s" loader %s %lu 7", argv[0], dll_name, target_offset); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", cmdline, GetLastError()); ret = WaitForSingleObject(pi.hProcess, 5000); ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n"); if (ret != WAIT_OBJECT_0) @@ -3343,10 +3344,10 @@ static void test_ExitProcess(void) ret = WaitForSingleObject(pi.hProcess, 1000); ok(ret == WAIT_OBJECT_0, "child process failed to terminate\n"); GetExitCodeProcess(pi.hProcess, &ret); - ok(ret == 199, "expected exit code 199, got %u\n", ret); + ok(ret == 199, "expected exit code 199, got %lu\n", ret); if (*child_failures) { - trace("%d failures in child process\n", *child_failures); + trace("%ld failures in child process\n", *child_failures); winetest_add_failures(*child_failures); } CloseHandle(pi.hThread); @@ -3355,32 +3356,32 @@ static void test_ExitProcess(void) /* test remote process termination */ SetLastError(0xdeadbeef); ret = CreateProcessA(argv[0], NULL, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess(%s) error %d\n", argv[0], GetLastError()); + ok(ret, "CreateProcess(%s) error %ld\n", argv[0], GetLastError());
SetLastError(0xdeadbeef); addr = VirtualAllocEx(pi.hProcess, NULL, 4096, MEM_COMMIT, PAGE_READWRITE); - ok(addr != NULL, "VirtualAllocEx error %d\n", GetLastError()); + ok(addr != NULL, "VirtualAllocEx error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = VirtualProtectEx(pi.hProcess, addr, 4096, PAGE_READONLY, &old_prot); - ok(ret, "VirtualProtectEx error %d\n", GetLastError()); - ok(old_prot == PAGE_READWRITE, "expected PAGE_READWRITE, got %#x\n", old_prot); + ok(ret, "VirtualProtectEx error %ld\n", GetLastError()); + ok(old_prot == PAGE_READWRITE, "expected PAGE_READWRITE, got %#lx\n", old_prot); SetLastError(0xdeadbeef); size = VirtualQueryEx(pi.hProcess, NULL, &mbi, sizeof(mbi)); - ok(size == sizeof(mbi), "VirtualQueryEx error %d\n", GetLastError()); + ok(size == sizeof(mbi), "VirtualQueryEx error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = ReadProcessMemory(pi.hProcess, addr, buf, 4, &size); - ok(ret, "ReadProcessMemory error %d\n", GetLastError()); - ok(size == 4, "expected 4, got %lu\n", size); + ok(ret, "ReadProcessMemory error %ld\n", GetLastError()); + ok(size == 4, "expected 4, got %Iu\n", size);
SetLastError(0xdeadbeef); hmap = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, NULL); - ok(hmap != 0, "CreateFileMapping error %d\n", GetLastError()); + ok(hmap != 0, "CreateFileMapping error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = DuplicateHandle(GetCurrentProcess(), hmap, pi.hProcess, &hmap_dup, 0, FALSE, DUPLICATE_SAME_ACCESS); - ok(ret, "DuplicateHandle error %d\n", GetLastError()); + ok(ret, "DuplicateHandle error %ld\n", GetLastError());
offset.u.LowPart = 0; offset.u.HighPart = 0; @@ -3388,57 +3389,57 @@ static void test_ExitProcess(void) size = 0; ret = pNtMapViewOfSection(hmap, pi.hProcess, &addr, 0, 0, &offset, &size, 1 /* ViewShare */, 0, PAGE_READONLY); - ok(!ret, "NtMapViewOfSection error %#x\n", ret); + ok(!ret, "NtMapViewOfSection error %#lx\n", ret); ret = pNtUnmapViewOfSection(pi.hProcess, addr); - ok(!ret, "NtUnmapViewOfSection error %#x\n", ret); + ok(!ret, "NtUnmapViewOfSection error %#lx\n", ret);
SetLastError(0xdeadbeef); thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void *)0xdeadbeef, NULL, CREATE_SUSPENDED, &ret); - ok(thread != 0, "CreateRemoteThread error %d\n", GetLastError()); + ok(thread != 0, "CreateRemoteThread error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ctx.ContextFlags = CONTEXT_INTEGER; ret = GetThreadContext(thread, &ctx); - ok(ret, "GetThreadContext error %d\n", GetLastError()); + ok(ret, "GetThreadContext error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ctx.ContextFlags = CONTEXT_INTEGER; ret = SetThreadContext(thread, &ctx); - ok(ret, "SetThreadContext error %d\n", GetLastError()); + ok(ret, "SetThreadContext error %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = SetThreadPriority(thread, 0); - ok(ret, "SetThreadPriority error %d\n", GetLastError()); + ok(ret, "SetThreadPriority error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = TerminateThread(thread, 199); - ok(ret, "TerminateThread error %d\n", GetLastError()); + ok(ret, "TerminateThread error %ld\n", GetLastError()); /* Calling GetExitCodeThread() without waiting for thread termination * leads to different results due to a race condition. */ ret = WaitForSingleObject(thread, 1000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed: %x\n", ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed: %lx\n", ret); GetExitCodeThread(thread, &ret); - ok(ret == 199, "expected exit code 199, got %u\n", ret); + ok(ret == 199, "expected exit code 199, got %lu\n", ret);
SetLastError(0xdeadbeef); ret = TerminateProcess(pi.hProcess, 198); - ok(ret, "TerminateProcess error %d\n", GetLastError()); + ok(ret, "TerminateProcess error %ld\n", GetLastError()); /* Checking process state without waiting for process termination * leads to different results due to a race condition. */ ret = WaitForSingleObject(pi.hProcess, 1000); - ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed: %x\n", ret); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed: %lx\n", ret);
SetLastError(0xdeadbeef); process = OpenProcess(PROCESS_ALL_ACCESS_NT4, FALSE, pi.dwProcessId); - ok(process != NULL, "OpenProcess error %d\n", GetLastError()); + ok(process != NULL, "OpenProcess error %ld\n", GetLastError()); CloseHandle(process);
memset(&pbi, 0, sizeof(pbi)); ret = pNtQueryInformationProcess(pi.hProcess, ProcessBasicInformation, &pbi, sizeof(pbi), NULL); - ok(!ret, "NtQueryInformationProcess error %#x\n", ret); - ok(pbi.ExitStatus == 198, "expected 198, got %lu\n", pbi.ExitStatus); + ok(!ret, "NtQueryInformationProcess error %#lx\n", ret); + ok(pbi.ExitStatus == 198, "expected 198, got %Iu\n", pbi.ExitStatus); affinity = 1; ret = pNtSetInformationProcess(pi.hProcess, ProcessAffinityMask, &affinity, sizeof(affinity)); - ok(ret == STATUS_PROCESS_IS_TERMINATING, "expected STATUS_PROCESS_IS_TERMINATING, got %#x\n", ret); + ok(ret == STATUS_PROCESS_IS_TERMINATING, "expected STATUS_PROCESS_IS_TERMINATING, got %#lx\n", ret);
SetLastError(0xdeadbeef); ctx.ContextFlags = CONTEXT_INTEGER; @@ -3449,7 +3450,7 @@ static void test_ExitProcess(void) GetLastError() == ERROR_GEN_FAILURE /* win7 64-bit */ || GetLastError() == ERROR_INVALID_FUNCTION /* vista 64-bit */ || GetLastError() == ERROR_ACCESS_DENIED /* Win10 32-bit */, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); ctx.ContextFlags = CONTEXT_INTEGER; ret = SetThreadContext(thread, &ctx); @@ -3458,10 +3459,10 @@ static void test_ExitProcess(void) ok(GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_GEN_FAILURE /* win7 64-bit */ || GetLastError() == ERROR_INVALID_FUNCTION /* vista 64-bit */, - "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = SetThreadPriority(thread, 0); - ok(ret, "SetThreadPriority error %d\n", GetLastError()); + ok(ret, "SetThreadPriority error %ld\n", GetLastError()); CloseHandle(thread);
SetLastError(0xdeadbeef); @@ -3473,7 +3474,7 @@ static void test_ExitProcess(void) GetLastError() == ERROR_GEN_FAILURE /* win7 64-bit */ || GetLastError() == ERROR_INVALID_FUNCTION /* vista 64-bit */ || GetLastError() == ERROR_ACCESS_DENIED /* Win10 32-bit */, - "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); ctx.ContextFlags = CONTEXT_INTEGER; ret = SetThreadContext(pi.hThread, &ctx); @@ -3482,30 +3483,30 @@ static void test_ExitProcess(void) ok(GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_GEN_FAILURE /* win7 64-bit */ || GetLastError() == ERROR_INVALID_FUNCTION /* vista 64-bit */, - "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = VirtualProtectEx(pi.hProcess, addr, 4096, PAGE_READWRITE, &old_prot); ok(!ret, "VirtualProtectEx should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); size = 0; ret = ReadProcessMemory(pi.hProcess, addr, buf, 4, &size); ok(!ret, "ReadProcessMemory should fail\n"); ok(GetLastError() == ERROR_PARTIAL_COPY || GetLastError() == ERROR_ACCESS_DENIED, - "expected ERROR_PARTIAL_COPY, got %d\n", GetLastError()); - ok(!size, "expected 0, got %lu\n", size); + "expected ERROR_PARTIAL_COPY, got %ld\n", GetLastError()); + ok(!size, "expected 0, got %Iu\n", size); SetLastError(0xdeadbeef); ret = VirtualFreeEx(pi.hProcess, addr, 0, MEM_RELEASE); ok(!ret, "VirtualFreeEx should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); addr = VirtualAllocEx(pi.hProcess, NULL, 4096, MEM_COMMIT, PAGE_READWRITE); ok(!addr, "VirtualAllocEx should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError()); SetLastError(0xdeadbeef); size = VirtualQueryEx(pi.hProcess, NULL, &mbi, sizeof(mbi)); ok(!size, "VirtualQueryEx should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
/* CloseHandle() call below leads to premature process termination * under some Windows versions. @@ -3521,7 +3522,7 @@ if (0) ret = DuplicateHandle(GetCurrentProcess(), hmap, pi.hProcess, &hmap_dup, 0, FALSE, DUPLICATE_SAME_ACCESS); ok(!ret, "DuplicateHandle should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
offset.u.LowPart = 0; offset.u.HighPart = 0; @@ -3529,27 +3530,27 @@ if (0) size = 0; ret = pNtMapViewOfSection(hmap, pi.hProcess, &addr, 0, 0, &offset, &size, 1 /* ViewShare */, 0, PAGE_READONLY); - ok(ret == STATUS_PROCESS_IS_TERMINATING, "expected STATUS_PROCESS_IS_TERMINATING, got %#x\n", ret); + ok(ret == STATUS_PROCESS_IS_TERMINATING, "expected STATUS_PROCESS_IS_TERMINATING, got %#lx\n", ret);
SetLastError(0xdeadbeef); thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void *)0xdeadbeef, NULL, CREATE_SUSPENDED, &ret); ok(!thread, "CreateRemoteThread should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = DebugActiveProcess(pi.dwProcessId); ok(!ret, "DebugActiveProcess should fail\n"); ok(GetLastError() == ERROR_ACCESS_DENIED /* 64-bit */ || GetLastError() == ERROR_NOT_SUPPORTED /* 32-bit */, - "ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + "ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
GetExitCodeProcess(pi.hProcess, &ret); ok(ret == 198 || broken(ret != 198) /* some 32-bit XP version in a VM returns random exit code */, - "expected exit code 198, got %u\n", ret); + "expected exit code 198, got %lu\n", ret); CloseHandle(pi.hThread); CloseHandle(pi.hProcess);
ret = DeleteFileA(dll_name); - ok(ret, "DeleteFile error %d\n", GetLastError()); + ok(ret, "DeleteFile error %ld\n", GetLastError()); #else skip("x86 specific ExitProcess test\n"); #endif @@ -3557,32 +3558,32 @@ if (0)
static PVOID WINAPI failuredllhook(ULONG ul, DELAYLOAD_INFO* pd) { - ok(ul == 4, "expected 4, got %u\n", ul); + ok(ul == 4, "expected 4, got %lu\n", ul); ok(!!pd, "no delayload info supplied\n"); if (pd) { - ok(pd->Size == sizeof(*pd), "got %u\n", pd->Size); + ok(pd->Size == sizeof(*pd), "got %lu\n", pd->Size); ok(!!pd->DelayloadDescriptor, "no DelayloadDescriptor supplied\n"); if (pd->DelayloadDescriptor) { ok(pd->DelayloadDescriptor->Attributes.AllAttributes == 1, - "expected 1, got %u\n", pd->DelayloadDescriptor->Attributes.AllAttributes); + "expected 1, got %lu\n", pd->DelayloadDescriptor->Attributes.AllAttributes); ok(pd->DelayloadDescriptor->DllNameRVA == 0x2000, - "expected 0x2000, got %x\n", pd->DelayloadDescriptor->DllNameRVA); + "expected 0x2000, got %lx\n", pd->DelayloadDescriptor->DllNameRVA); ok(pd->DelayloadDescriptor->ModuleHandleRVA == 0x201a, - "expected 0x201a, got %x\n", pd->DelayloadDescriptor->ModuleHandleRVA); + "expected 0x201a, got %lx\n", pd->DelayloadDescriptor->ModuleHandleRVA); ok(pd->DelayloadDescriptor->ImportAddressTableRVA > pd->DelayloadDescriptor->ModuleHandleRVA, - "expected %x > %x\n", pd->DelayloadDescriptor->ImportAddressTableRVA, + "expected %lx > %lx\n", pd->DelayloadDescriptor->ImportAddressTableRVA, pd->DelayloadDescriptor->ModuleHandleRVA); ok(pd->DelayloadDescriptor->ImportNameTableRVA > pd->DelayloadDescriptor->ImportAddressTableRVA, - "expected %x > %x\n", pd->DelayloadDescriptor->ImportNameTableRVA, + "expected %lx > %lx\n", pd->DelayloadDescriptor->ImportNameTableRVA, pd->DelayloadDescriptor->ImportAddressTableRVA); ok(pd->DelayloadDescriptor->BoundImportAddressTableRVA == 0, - "expected 0, got %x\n", pd->DelayloadDescriptor->BoundImportAddressTableRVA); + "expected 0, got %lx\n", pd->DelayloadDescriptor->BoundImportAddressTableRVA); ok(pd->DelayloadDescriptor->UnloadInformationTableRVA == 0, - "expected 0, got %x\n", pd->DelayloadDescriptor->UnloadInformationTableRVA); + "expected 0, got %lx\n", pd->DelayloadDescriptor->UnloadInformationTableRVA); ok(pd->DelayloadDescriptor->TimeDateStamp == 0, - "expected 0, got %x\n", pd->DelayloadDescriptor->TimeDateStamp); + "expected 0, got %lx\n", pd->DelayloadDescriptor->TimeDateStamp); }
ok(!!pd->ThunkAddress, "no ThunkAddress supplied\n"); @@ -3595,10 +3596,10 @@ static PVOID WINAPI failuredllhook(ULONG ul, DELAYLOAD_INFO* pd) "expected "secur32.dll", got "%s"\n", pd->TargetDllName);
ok(pd->TargetApiDescriptor.ImportDescribedByName == 0, - "expected 0, got %x\n", pd->TargetApiDescriptor.ImportDescribedByName); + "expected 0, got %lx\n", pd->TargetApiDescriptor.ImportDescribedByName); ok(pd->TargetApiDescriptor.Description.Ordinal == 0 || pd->TargetApiDescriptor.Description.Ordinal == 999, - "expected 0, got %x\n", pd->TargetApiDescriptor.Description.Ordinal); + "expected 0, got %lx\n", pd->TargetApiDescriptor.Description.Ordinal);
ok(!!pd->TargetModuleBase, "no TargetModuleBase supplied\n"); ok(pd->Unused == NULL, "expected NULL, got %p\n", pd->Unused); @@ -3666,13 +3667,13 @@ static void test_ResolveDelayLoadedAPI(void) SetLastError(0xdeadbeef); ok(!pResolveDelayLoadedAPI(NULL, NULL, NULL, NULL, NULL, 0), "ResolveDelayLoadedAPI succeeded\n"); - ok(GetLastError() == 0xdeadbeef, "GetLastError changed to %x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError changed to %lx\n", GetLastError());
cb_count = 0; SetLastError(0xdeadbeef); ok(!pResolveDelayLoadedAPI(NULL, NULL, failuredllhook, NULL, NULL, 0), "ResolveDelayLoadedAPI succeeded\n"); - ok(GetLastError() == 0xdeadbeef, "GetLastError changed to %x\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "GetLastError changed to %lx\n", GetLastError()); ok(cb_count == 1, "Wrong callback count: %d\n", cb_count); }
@@ -3688,7 +3689,7 @@ static void test_ResolveDelayLoadedAPI(void)
SetLastError(0xdeadbeef); ret = WriteFile(hfile, &dos_header, sizeof(dos_header), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
nt_header = nt_header_template; nt_header.FileHeader.NumberOfSections = 2; @@ -3704,11 +3705,11 @@ static void test_ResolveDelayLoadedAPI(void)
SetLastError(0xdeadbeef); ret = WriteFile(hfile, &nt_header, sizeof(DWORD) + sizeof(IMAGE_FILE_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WriteFile(hfile, &nt_header.OptionalHeader, sizeof(IMAGE_OPTIONAL_HEADER), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
/* sections */ section.PointerToRawData = nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT].VirtualAddress; @@ -3718,7 +3719,7 @@ static void test_ResolveDelayLoadedAPI(void) section.Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ; SetLastError(0xdeadbeef); ret = WriteFile(hfile, §ion, sizeof(section), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
section.PointerToRawData = 0x2000; section.VirtualAddress = 0x2000; @@ -3730,7 +3731,7 @@ static void test_ResolveDelayLoadedAPI(void) section.Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE; SetLastError(0xdeadbeef); ret = WriteFile(hfile, §ion, sizeof(section), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
/* fill up to delay data */ SetFilePointer( hfile, nt_header.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT].VirtualAddress, NULL, SEEK_SET ); @@ -3747,11 +3748,11 @@ static void test_ResolveDelayLoadedAPI(void)
SetLastError(0xdeadbeef); ret = WriteFile(hfile, &idd, sizeof(idd), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WriteFile(hfile, filler, sizeof(idd), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
/* fill up to extended delay data */ SetFilePointer( hfile, idd.DllNameRVA, NULL, SEEK_SET ); @@ -3759,15 +3760,15 @@ static void test_ResolveDelayLoadedAPI(void) /* extended delay data */ SetLastError(0xdeadbeef); ret = WriteFile(hfile, test_dll, sizeof(test_dll), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WriteFile(hfile, &hint, sizeof(hint), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = WriteFile(hfile, test_func, sizeof(test_func), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
SetFilePointer( hfile, idd.ImportAddressTableRVA, NULL, SEEK_SET );
@@ -3777,13 +3778,13 @@ static void test_ResolveDelayLoadedAPI(void) itd32.u1.Function = nt_header.OptionalHeader.ImageBase + 0x1a00 + i * 0x20; SetLastError(0xdeadbeef); ret = WriteFile(hfile, &itd32, sizeof(itd32), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); }
itd32.u1.Function = 0; SetLastError(0xdeadbeef); ret = WriteFile(hfile, &itd32, sizeof(itd32), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(td); i++) { @@ -3793,13 +3794,13 @@ static void test_ResolveDelayLoadedAPI(void) itd32.u1.Ordinal = td[i].ordinal; SetLastError(0xdeadbeef); ret = WriteFile(hfile, &itd32, sizeof(itd32), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError()); }
itd32.u1.Ordinal = 0; SetLastError(0xdeadbeef); ret = WriteFile(hfile, &itd32, sizeof(itd32), &dummy, NULL); - ok(ret, "WriteFile error %d\n", GetLastError()); + ok(ret, "WriteFile error %ld\n", GetLastError());
/* fill up to eof */ SetFilePointer( hfile, section.VirtualAddress + section.Misc.VirtualSize, NULL, SEEK_SET ); @@ -3808,7 +3809,7 @@ static void test_ResolveDelayLoadedAPI(void)
SetLastError(0xdeadbeef); hlib = LoadLibraryA(dll_name); - ok(hlib != NULL, "LoadLibrary error %u\n", GetLastError()); + ok(hlib != NULL, "LoadLibrary error %lu\n", GetLastError()); if (!hlib) { skip("couldn't load %s.\n", dll_name); @@ -3855,18 +3856,18 @@ static void test_ResolveDelayLoadedAPI(void) ret = pResolveDelayLoadedAPI(hlib, delaydir, NULL, failuresyshook, &itda[i], 0); if (td[i].succeeds) { - ok(ret != NULL, "Test %u: ResolveDelayLoadedAPI failed\n", i); - ok(ret == load, "Test %u: expected %p, got %p\n", i, load, ret); - ok(ret == (void*)itda[i].u1.AddressOfData, "Test %u: expected %p, got %p\n", + ok(ret != NULL, "Test %lu: ResolveDelayLoadedAPI failed\n", i); + ok(ret == load, "Test %lu: expected %p, got %p\n", i, load, ret); + ok(ret == (void*)itda[i].u1.AddressOfData, "Test %lu: expected %p, got %p\n", i, ret, (void*)itda[i].u1.AddressOfData); - ok(!cb_count, "Test %u: Wrong callback count: %d\n", i, cb_count); - ok(!cb_count_sys, "Test %u: Wrong sys callback count: %d\n", i, cb_count_sys); + ok(!cb_count, "Test %lu: Wrong callback count: %d\n", i, cb_count); + ok(!cb_count_sys, "Test %lu: Wrong sys callback count: %d\n", i, cb_count_sys); } else { - ok(ret == (void*)0x12345678, "Test %u: ResolveDelayLoadedAPI succeeded with %p\n", i, ret); - ok(!cb_count, "Test %u: Wrong callback count: %d\n", i, cb_count); - ok(cb_count_sys == 1, "Test %u: Wrong sys callback count: %d\n", i, cb_count_sys); + ok(ret == (void*)0x12345678, "Test %lu: ResolveDelayLoadedAPI succeeded with %p\n", i, ret); + ok(!cb_count, "Test %lu: Wrong callback count: %d\n", i, cb_count); + ok(cb_count_sys == 1, "Test %lu: Wrong sys callback count: %d\n", i, cb_count_sys); }
/* test with failure dll callback */ @@ -3874,28 +3875,28 @@ static void test_ResolveDelayLoadedAPI(void) ret = pResolveDelayLoadedAPI(hlib, delaydir, failuredllhook, failuresyshook, &itda[i], 0); if (td[i].succeeds) { - ok(ret != NULL, "Test %u: ResolveDelayLoadedAPI failed\n", i); - ok(ret == load, "Test %u: expected %p, got %p\n", i, load, ret); - ok(ret == (void*)itda[i].u1.AddressOfData, "Test %u: expected %p, got %p\n", + ok(ret != NULL, "Test %lu: ResolveDelayLoadedAPI failed\n", i); + ok(ret == load, "Test %lu: expected %p, got %p\n", i, load, ret); + ok(ret == (void*)itda[i].u1.AddressOfData, "Test %lu: expected %p, got %p\n", i, ret, (void*)itda[i].u1.AddressOfData); - ok(!cb_count, "Test %u: Wrong callback count: %d\n", i, cb_count); - ok(!cb_count_sys, "Test %u: Wrong sys callback count: %d\n", i, cb_count_sys); + ok(!cb_count, "Test %lu: Wrong callback count: %d\n", i, cb_count); + ok(!cb_count_sys, "Test %lu: Wrong sys callback count: %d\n", i, cb_count_sys); } else { if (ret == (void*)0x12345678) { /* Win10+ sometimes buffers the address of the stub function */ - ok(!cb_count, "Test %u: Wrong callback count: %d\n", i, cb_count); - ok(!cb_count_sys, "Test %u: Wrong sys callback count: %d\n", i, cb_count_sys); + ok(!cb_count, "Test %lu: Wrong callback count: %d\n", i, cb_count); + ok(!cb_count_sys, "Test %lu: Wrong sys callback count: %d\n", i, cb_count_sys); } else if (ret == (void*)0xdeadbeef) { - ok(cb_count == 1, "Test %u: Wrong callback count: %d\n", i, cb_count); - ok(!cb_count_sys, "Test %u: Wrong sys callback count: %d\n", i, cb_count_sys); + ok(cb_count == 1, "Test %lu: Wrong callback count: %d\n", i, cb_count); + ok(!cb_count_sys, "Test %lu: Wrong sys callback count: %d\n", i, cb_count_sys); } else - ok(0, "Test %u: ResolveDelayLoadedAPI succeeded with %p\n", i, ret); + ok(0, "Test %lu: ResolveDelayLoadedAPI succeeded with %p\n", i, ret); } } delaydir++; @@ -3983,26 +3984,26 @@ static void test_dll_file( const char *name )
GetModuleFileNameA( module, path, MAX_PATH ); file = CreateFileA( path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); - ok( file != INVALID_HANDLE_VALUE, "can't open '%s': %u\n", path, GetLastError() ); + ok( file != INVALID_HANDLE_VALUE, "can't open '%s': %lu\n", path, GetLastError() );
mapping = CreateFileMappingA( file, NULL, PAGE_READONLY, 0, 0, NULL ); - ok( mapping != NULL, "%s: CreateFileMappingW failed err %u\n", name, GetLastError() ); + ok( mapping != NULL, "%s: CreateFileMappingW failed err %lu\n", name, GetLastError() ); ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); - ok( ptr != NULL, "%s: MapViewOfFile failed err %u\n", name, GetLastError() ); + ok( ptr != NULL, "%s: MapViewOfFile failed err %lu\n", name, GetLastError() ); CloseHandle( mapping ); CloseHandle( file );
nt = pRtlImageNtHeader( module ); nt_file = pRtlImageNtHeader( ptr ); ok( nt_file != NULL, "%s: invalid header\n", path ); -#define OK_FIELD(x) ok( nt->x == nt_file->x, "%s:%u: wrong " #x " %x / %x\n", name, i, nt->x, nt_file->x ) - OK_FIELD( FileHeader.NumberOfSections ); - OK_FIELD( OptionalHeader.AddressOfEntryPoint ); - OK_FIELD( OptionalHeader.NumberOfRvaAndSizes ); +#define OK_FIELD(x, f) ok( nt->x == nt_file->x, "%s:%u: wrong " #x " " f " / " f "\n", name, i, nt->x, nt_file->x ) + OK_FIELD( FileHeader.NumberOfSections, "%x" ); + OK_FIELD( OptionalHeader.AddressOfEntryPoint, "%lx" ); + OK_FIELD( OptionalHeader.NumberOfRvaAndSizes, "%lx" ); for (i = 0; i < nt->OptionalHeader.NumberOfRvaAndSizes; i++) { - OK_FIELD( OptionalHeader.DataDirectory[i].VirtualAddress ); - OK_FIELD( OptionalHeader.DataDirectory[i].Size ); + OK_FIELD( OptionalHeader.DataDirectory[i].VirtualAddress, "%lx" ); + OK_FIELD( OptionalHeader.DataDirectory[i].Size, "%lx" ); } sec = (IMAGE_SECTION_HEADER *)((char *)&nt->OptionalHeader + nt->FileHeader.SizeOfOptionalHeader); sec_file = (IMAGE_SECTION_HEADER *)((char *)&nt_file->OptionalHeader + nt_file->FileHeader.SizeOfOptionalHeader); @@ -4024,7 +4025,7 @@ static void test_LoadPackagedLibrary(void)
SetLastError( 0xdeadbeef ); h = pLoadPackagedLibrary(L"kernel32.dll", 0); - ok(!h && GetLastError() == APPMODEL_ERROR_NO_PACKAGE, "Got unexpected handle %p, GetLastError() %u.\n", + ok(!h && GetLastError() == APPMODEL_ERROR_NO_PACKAGE, "Got unexpected handle %p, GetLastError() %lu.\n", h, GetLastError()); }
@@ -4049,7 +4050,7 @@ static void test_Wow64Transition(void)
status = NtQueryVirtualMemory(GetCurrentProcess(), *pWow64Transition, MemoryMappedFilenameInformation, name, sizeof(buffer), NULL); - ok(!status, "got %#x\n", status); + ok(!status, "got %#lx\n", status); filepart = name->SectionFileName.Buffer + name->SectionFileName.Length / sizeof(WCHAR); while (*filepart != '\') --filepart; ok(!wcsnicmp(filepart, L"\wow64cpu.dll", wcslen(L"\wow64cpu.dll")), "got file name %s\n",
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109754
Your paranoid android.
=== w10pro64_ar (64 bit report) ===
kernel32: loader.c:721: Test failed: 1193: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c0000131 loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c0000130 loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1215: wrong status c000012f/c0000130 loader.c:721: Test failed: 1220: wrong status c000012f/c0000130 loader.c:721: Test failed: 1225: wrong status c000012f/c000007b loader.c:721: Test failed: 1230: wrong status c000012f/c000007b loader.c:721: Test failed: 1235: wrong status c000012f/c000007b loader.c:721: Test failed: 1240: wrong status c000012f/c000007b loader.c:721: Test failed: 1245: wrong status c000012f/c000007b loader.c:721: Test failed: 1261: wrong status c000012f/0 loader.c:721: Test failed: 1265: wrong status c000012f/0 loader.c:721: Test failed: 1270: wrong status c000012f/0 loader.c:721: Test failed: 1274: wrong status c000012f/0 loader.c:721: Test failed: 1278: wrong status c000012f/0 loader.c:721: Test failed: 1432: wrong status c000012f/c000007b loader.c:721: Test failed: 1440: wrong status c000012f/c000007b loader.c:721: Test failed: 1445: wrong status c000012f/0 loader.c:725: Test failed: 1445: failed with c000012f expected fallback loader.c:721: Test failed: 1451: wrong status c000012f/0 loader.c:725: Test failed: 1451: failed with c000012f expected fallback loader.c:721: Test failed: 1457: wrong status c000012f/0 loader.c:725: Test failed: 1457: failed with c000012f expected fallback loader.c:721: Test failed: 1464: wrong status c000012f/0 loader.c:725: Test failed: 1464: failed with c000012f expected fallback loader.c:721: Test failed: 1470: wrong status c000012f/0 loader.c:721: Test failed: 1479: wrong status c000012f/0 loader.c:721: Test failed: 1483: wrong status c000012f/0 loader.c:721: Test failed: 1487: wrong status c000012f/0 loader.c:721: Test failed: 1491: wrong status c000012f/0 loader.c:721: Test failed: 1495: wrong status c000012f/0
=== w10pro64_he (64 bit report) ===
kernel32: loader.c:721: Test failed: 1193: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c0000131 loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c0000130 loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1198: wrong status c000012f/c000011b loader.c:721: Test failed: 1215: wrong status c000012f/c0000130 loader.c:721: Test failed: 1220: wrong status c000012f/c0000130 loader.c:721: Test failed: 1225: wrong status c000012f/c000007b loader.c:721: Test failed: 1230: wrong status c000012f/c000007b loader.c:721: Test failed: 1235: wrong status c000012f/c000007b loader.c:721: Test failed: 1240: wrong status c000012f/c000007b loader.c:721: Test failed: 1245: wrong status c000012f/c000007b loader.c:721: Test failed: 1261: wrong status c000012f/0 loader.c:721: Test failed: 1265: wrong status c000012f/0 loader.c:721: Test failed: 1270: wrong status c000012f/0 loader.c:721: Test failed: 1274: wrong status c000012f/0 loader.c:721: Test failed: 1278: wrong status c000012f/0 loader.c:721: Test failed: 1432: wrong status c000012f/c000007b loader.c:721: Test failed: 1440: wrong status c000012f/c000007b loader.c:721: Test failed: 1445: wrong status c000012f/0 loader.c:725: Test failed: 1445: failed with c000012f expected fallback
=== w10pro64_zh_CN (64 bit report) ===
kernel32: loader.c:721: Test failed: 1220: wrong status c000011b/c0000130 loader.c:721: Test failed: 1225: wrong status c000011b/c000007b loader.c:721: Test failed: 1230: wrong status c000011b/c000007b loader.c:721: Test failed: 1235: wrong status c000011b/c000007b loader.c:721: Test failed: 1240: wrong status c000011b/c000007b loader.c:721: Test failed: 1245: wrong status c000011b/c000007b loader.c:721: Test failed: 1261: wrong status c000011b/0 loader.c:721: Test failed: 1265: wrong status c000011b/0 loader.c:721: Test failed: 1270: wrong status c000011b/0 loader.c:721: Test failed: 1274: wrong status c000011b/0 loader.c:721: Test failed: 1278: wrong status c000011b/0 loader.c:721: Test failed: 1432: wrong status c000011b/c000007b loader.c:721: Test failed: 1440: wrong status c000011b/c000007b loader.c:721: Test failed: 1445: wrong status c000011b/0 loader.c:725: Test failed: 1445: failed with c000011b expected fallback loader.c:721: Test failed: 1451: wrong status c000011b/0 loader.c:725: Test failed: 1451: failed with c000011b expected fallback loader.c:721: Test failed: 1457: wrong status c000011b/0 loader.c:725: Test failed: 1457: failed with c000011b expected fallback loader.c:721: Test failed: 1464: wrong status c000011b/0 loader.c:725: Test failed: 1464: failed with c000011b expected fallback loader.c:721: Test failed: 1470: wrong status c000011b/0 loader.c:721: Test failed: 1479: wrong status c000011b/0 loader.c:721: Test failed: 1483: wrong status c000011b/0 loader.c:721: Test failed: 1487: wrong status c000011b/0 loader.c:721: Test failed: 1491: wrong status c000011b/0 loader.c:721: Test failed: 1495: wrong status c000011b/0
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/locale.c | 859 +++++++++++++++++++++--------------------- 1 file changed, 430 insertions(+), 429 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c index 8f48b89334c..91c317aa06c 100644 --- a/dlls/kernel32/tests/locale.c +++ b/dlls/kernel32/tests/locale.c @@ -24,6 +24,7 @@ * even when the user has overridden their default i8n settings (e.g. in * the control panel i8n page), we will still get the expected results. */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */
#define _CRT_NON_CONFORMING_WCSTOK
@@ -165,20 +166,20 @@ static void expect_str_(int line, int ret, const char *str, const char *expected { if (ret) { - ok_(__FILE__, line)(GetLastError() == 0xdeadbeef, "unexpected gle %u\n", GetLastError()); - ok_(__FILE__, line)(ret == strlen(expected) + 1, "Expected ret %d, got %d\n", strlen(expected) + 1, ret); + ok_(__FILE__, line)(GetLastError() == 0xdeadbeef, "unexpected gle %lu\n", GetLastError()); + ok_(__FILE__, line)(ret == strlen(expected) + 1, "Expected ret %Id, got %d\n", strlen(expected) + 1, ret); if (str) ok_(__FILE__, line)(strcmp(str, expected) == 0, "Expected '%s', got '%s'\n", expected, str); } else - ok_(__FILE__, line)(0, "expected success, got error %d\n", GetLastError()); + ok_(__FILE__, line)(0, "expected success, got error %ld\n", GetLastError()); }
#define expect_err(r,s,e) expect_err_(__LINE__, r, s, e, #e) static void expect_err_(int line, int ret, const char *str, DWORD err, const char* err_name) { ok_(__FILE__, line)(!ret && GetLastError() == err, - "Expected %s, got %d and ret=%d\n", err_name, GetLastError(), ret); + "Expected %s, got %ld and ret=%d\n", err_name, GetLastError(), ret); if (str) ok_(__FILE__, line)(strcmp(str, "pristine") == 0, "Expected a pristine buffer, got '%s'\n", str); } @@ -188,20 +189,20 @@ static void expect_wstr_(int line, int ret, const WCHAR *str, const WCHAR *expec { if (ret) { - ok_(__FILE__, line)(GetLastError() == 0xdeadbeef, "unexpected gle %u\n", GetLastError()); - ok_(__FILE__, line)(ret == wcslen(expected) + 1, "Expected ret %d, got %d\n", wcslen(expected) + 1, ret); + ok_(__FILE__, line)(GetLastError() == 0xdeadbeef, "unexpected gle %lu\n", GetLastError()); + ok_(__FILE__, line)(ret == wcslen(expected) + 1, "Expected ret %Id, got %d\n", wcslen(expected) + 1, ret); if (str) ok_(__FILE__, line)(wcscmp(str, expected) == 0, "Expected %s, got %s\n", wine_dbgstr_w(expected), wine_dbgstr_w(str)); } else - ok_(__FILE__, line)(0, "expected success, got error %d\n", GetLastError()); + ok_(__FILE__, line)(0, "expected success, got error %ld\n", GetLastError()); }
#define expect_werr(r,s,e) expect_werr_(__LINE__, r, s, e, #e) static void expect_werr_(int line, int ret, const WCHAR *str, DWORD err, const char* err_name) { ok_(__FILE__, line)(!ret && GetLastError() == err, - "Expected %s, got %d and ret=%d\n", err_name, GetLastError(), ret); + "Expected %s, got %ld and ret=%d\n", err_name, GetLastError(), ret); if (str) ok_(__FILE__, line)(wcscmp(str, L"pristine") == 0, "Expected a pristine buffer, got %s\n", wine_dbgstr_w(str)); } @@ -217,11 +218,11 @@ static void test_GetLocaleInfoA(void) char expected[BUFFER_SIZE]; DWORD val;
- ok(lcid == 0x409, "wrong LCID calculated - %d\n", lcid); + ok(lcid == 0x409, "wrong LCID calculated - %ld\n", lcid);
ret = GetLocaleInfoA(lcid, LOCALE_ILANGUAGE|LOCALE_RETURN_NUMBER, (char*)&val, sizeof(val)); ok(ret, "got %d\n", ret); - ok(val == lcid, "got 0x%08x\n", val); + ok(val == lcid, "got 0x%08lx\n", val);
/* en and ar use SUBLANG_NEUTRAL, but GetLocaleInfo assume SUBLANG_DEFAULT Same is true for zh on pre-Vista, but on Vista and higher GetLocaleInfo @@ -271,13 +272,13 @@ static void test_GetLocaleInfoA(void) memset(buffer, 0, ARRAY_SIZE(buffer)); ret = GetLocaleInfoA(lcid, NUO|LOCALE_SDAYNAME1, buffer, 3); ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); ok(!strcmp(buffer, "Mon"), "Expected 'Mon', got '%s'\n", buffer);
SetLastError(0xdeadbeef); memset(buffer, 0, ARRAY_SIZE(buffer)); ret = GetLocaleInfoA(lcid, NUO|LOCALE_SDAYNAME1, buffer, 10); - ok(ret == 7, "Expected ret == 7, got %d, error %d\n", ret, GetLastError()); + ok(ret == 7, "Expected ret == 7, got %d, error %ld\n", ret, GetLastError()); ok(!strcmp(buffer, "Monday"), "Expected 'Monday', got '%s'\n", buffer); }
@@ -341,8 +342,8 @@ static void test_GetLocaleInfoW(void) }
ret = GetLocaleInfoW(lcid_en, LOCALE_ILANGUAGE|LOCALE_RETURN_NUMBER, (WCHAR*)&val, sizeof(val)/sizeof(WCHAR)); - ok(ret, "got %d\n", ret); - ok(val == lcid_en, "got 0x%08x\n", val); + ok(ret, "got %ld\n", ret); + ok(val == lcid_en, "got 0x%08lx\n", val);
ret = GetLocaleInfoW(lcid_en_neut, LOCALE_SNAME, bufferW, ARRAY_SIZE(bufferW)); if (ret) @@ -356,7 +357,7 @@ static void test_GetLocaleInfoW(void) ok(!lstrcmpW(bufferW, enW), "got wrong name %s\n", wine_dbgstr_w(bufferW));
ret = GetLocaleInfoW(lcid_en_neut, LOCALE_SCOUNTRY, bufferW, ARRAY_SIZE(bufferW)); - ok(ret, "got %d\n", ret); + ok(ret, "got %ld\n", ret); if ((PRIMARYLANGID(LANGIDFROMLCID(GetSystemDefaultLCID())) != LANG_ENGLISH) || (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) != LANG_ENGLISH)) { @@ -366,7 +367,7 @@ static void test_GetLocaleInfoW(void) ok(!lstrcmpW(statesW, bufferW), "got wrong name %s\n", wine_dbgstr_w(bufferW));
ret = GetLocaleInfoW(lcid_en_neut, LOCALE_SLANGUAGE, bufferW, ARRAY_SIZE(bufferW)); - ok(ret, "got %d\n", ret); + ok(ret, "got %ld\n", ret); if ((PRIMARYLANGID(LANGIDFROMLCID(GetSystemDefaultLCID())) != LANG_ENGLISH) || (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) != LANG_ENGLISH)) { @@ -386,7 +387,7 @@ static void test_GetLocaleInfoW(void)
val = 0; GetLocaleInfoW(lcid, LOCALE_ILANGUAGE|LOCALE_RETURN_NUMBER, (WCHAR*)&val, sizeof(val)/sizeof(WCHAR)); - ok(val == ptr->lcid || (val && broken(val == ptr->lcid_broken)), "%s: got wrong lcid 0x%04x, expected 0x%04x\n", + ok(val == ptr->lcid || (val && broken(val == ptr->lcid_broken)), "%s: got wrong lcid 0x%04lx, expected 0x%04lx\n", wine_dbgstr_w(ptr->name), val, ptr->lcid);
/* now check LOCALE_SNAME */ @@ -420,16 +421,16 @@ static void test_GetLocaleInfoW(void) ok(ret == 0, "LOCALE_RETURN_GENITIVE_NAMES should fail with GetLocaleInfoA\n"); ok(bufferA[0] == 'a', "Expected buffer to be untouched\n"); ok(GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %x\n", GetLastError()); + "Expected ERROR_INVALID_FLAGS, got %lx\n", GetLastError());
bufferW[0] = 'a'; SetLastError(0xdeadbeef); ret = GetLocaleInfoW(lcid_ru, LOCALE_RETURN_GENITIVE_NAMES, bufferW, ARRAY_SIZE(bufferW)); ok(ret == 0, - "LOCALE_RETURN_GENITIVE_NAMES itself doesn't return anything, got %d\n", ret); + "LOCALE_RETURN_GENITIVE_NAMES itself doesn't return anything, got %ld\n", ret); ok(bufferW[0] == 'a', "Expected buffer to be untouched\n"); ok(GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %x\n", GetLastError()); + "Expected ERROR_INVALID_FLAGS, got %lx\n", GetLastError());
/* yes, test empty 13 month entry too */ for (i = 0; i < 12; i++) { @@ -437,12 +438,12 @@ static void test_GetLocaleInfoW(void) ret = GetLocaleInfoW(lcid_ru, (LOCALE_SMONTHNAME1+i)|LOCALE_RETURN_GENITIVE_NAMES, bufferW, ARRAY_SIZE(bufferW)); ok(ret, "Expected non zero result\n"); - ok(ret == lstrlenW(bufferW)+1, "Expected actual length, got %d, length %d\n", + ok(ret == lstrlenW(bufferW)+1, "Expected actual length, got %ld, length %d\n", ret, lstrlenW(bufferW)); buffer2W[0] = 0; ret = GetLocaleInfoW(lcid_ru, LOCALE_SMONTHNAME1+i, buffer2W, ARRAY_SIZE(buffer2W)); ok(ret, "Expected non zero result\n"); - ok(ret == lstrlenW(buffer2W)+1, "Expected actual length, got %d, length %d\n", + ok(ret == lstrlenW(buffer2W)+1, "Expected actual length, got %ld, length %d\n", ret, lstrlenW(buffer2W));
ok(lstrcmpW(bufferW, buffer2W) != 0, @@ -453,12 +454,12 @@ static void test_GetLocaleInfoW(void) ret = GetLocaleInfoW(lcid_en, (LOCALE_SMONTHNAME1+i)|LOCALE_RETURN_GENITIVE_NAMES, bufferW, ARRAY_SIZE(bufferW)); ok(ret, "Expected non zero result\n"); - ok(ret == lstrlenW(bufferW)+1, "Expected actual length, got %d, length %d\n", + ok(ret == lstrlenW(bufferW)+1, "Expected actual length, got %ld, length %d\n", ret, lstrlenW(bufferW)); buffer2W[0] = 0; ret = GetLocaleInfoW(lcid_en, LOCALE_SMONTHNAME1+i, buffer2W, ARRAY_SIZE(buffer2W)); ok(ret, "Expected non zero result\n"); - ok(ret == lstrlenW(buffer2W)+1, "Expected actual length, got %d, length %d\n", + ok(ret == lstrlenW(buffer2W)+1, "Expected actual length, got %ld, length %d\n", ret, lstrlenW(buffer2W));
ok(lstrcmpW(bufferW, buffer2W) == 0, @@ -885,7 +886,7 @@ static void test_GetDateFormatA(void)
/* DATE_LONGDATE */ ret = GetDateFormatA(lcid, NUO|DATE_LONGDATE, &curtime, NULL, buffer, ARRAY_SIZE(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(ret, "Expected ret != 0, got %d, error %ld\n", ret, GetLastError()); ok(strcmp(buffer, "Saturday, May 04, 2002") == 0 || strcmp(buffer, "Saturday, May 4, 2002") == 0 /* Win 8 */, "got an unexpected date string '%s'\n", buffer); @@ -913,12 +914,12 @@ static void test_GetDateFormatA(void) /* month part should be in genitive form */ strcpy(genitive_month, buffer + 2); ret = GetDateFormatA(lcid_ru, 0, &curtime, "MMMM", buffer, ARRAY_SIZE(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(ret, "Expected ret != 0, got %d, error %ld\n", ret, GetLastError()); strcpy(month, buffer); ok(strcmp(genitive_month, month) != 0, "Expected different month forms\n");
ret = GetDateFormatA(lcid_ru, 0, &curtime, "ddd", buffer, ARRAY_SIZE(buffer)); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(ret, "Expected ret != 0, got %d, error %ld\n", ret, GetLastError()); strcpy(short_day, buffer);
ret = GetDateFormatA(lcid_ru, 0, &curtime, "dd MMMMddd dd", buffer, ARRAY_SIZE(buffer)); @@ -1724,7 +1725,7 @@ static void test_CompareStringA(void) ret = CompareStringA(entry->lcid, entry->flags, entry->first, entry->first_len, entry->second, entry->second_len); ok(ret == entry->ret, "%d: got %d, expected %d\n", i, ret, entry->ret); - ok(GetLastError() == (ret ? 0xdeadbeef : entry->le), "%d: got last error %d, expected %d\n", + ok(GetLastError() == (ret ? 0xdeadbeef : entry->le), "%d: got last error %ld, expected %ld\n", i, GetLastError(), (ret ? 0xdeadbeef : entry->le)); }
@@ -1846,7 +1847,7 @@ static void test_CompareStringA(void) SetLastError(0xdeadbeef); ret = CompareStringA(lcid, 0, a, sizeof(a), a, sizeof(a)); ok (GetLastError() == 0xdeadbeef && ret == CSTR_EQUAL, - "ret %d, error %d, expected value %d\n", ret, GetLastError(), CSTR_EQUAL); + "ret %d, error %ld, expected value %d\n", ret, GetLastError(), CSTR_EQUAL);
ret = CompareStringA(CP_ACP, 0, ABC_EE, 3, ABC_FF, 3); ok(ret == CSTR_EQUAL, "expected CSTR_EQUAL, got %d\n", ret); @@ -1876,11 +1877,11 @@ static void test_CompareStringW(void)
GetSystemInfo(&si); buf = VirtualAlloc(NULL, si.dwPageSize * 4, MEM_COMMIT, PAGE_READWRITE); - ok(buf != NULL, "VirtualAlloc failed with %u\n", GetLastError()); + ok(buf != NULL, "VirtualAlloc failed with %lu\n", GetLastError()); success = VirtualProtect(buf + si.dwPageSize, si.dwPageSize, PAGE_NOACCESS, &old_prot); - ok(success, "VirtualProtect failed with %u\n", GetLastError()); + ok(success, "VirtualProtect failed with %lu\n", GetLastError()); success = VirtualProtect(buf + 3 * si.dwPageSize, si.dwPageSize, PAGE_NOACCESS, &old_prot); - ok(success, "VirtualProtect failed with %u\n", GetLastError()); + ok(success, "VirtualProtect failed with %lu\n", GetLastError());
str1 = (WCHAR *)(buf + si.dwPageSize - sizeof(WCHAR)); str2 = (WCHAR *)(buf + 3 * si.dwPageSize - sizeof(WCHAR)); @@ -1892,12 +1893,12 @@ static void test_CompareStringW(void) ok(ret == CSTR_LESS_THAN, "expected CSTR_LESS_THAN, got %d\n", ret);
success = VirtualFree(buf, 0, MEM_RELEASE); - ok(success, "VirtualFree failed with %u\n", GetLastError()); + ok(success, "VirtualFree failed with %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = CompareStringW(CP_ACP, SORT_DIGITSASNUMBERS, L"NULL", -1, L"NULL", -1); ok(ret == CSTR_EQUAL || broken(!ret && GetLastError() == ERROR_INVALID_FLAGS) /* <Win7 */, - "expected CSTR_EQUAL, got %d, last error %d\n", ret, GetLastError()); + "expected CSTR_EQUAL, got %d, last error %ld\n", ret, GetLastError());
ret = CompareStringW(CP_ACP, 0, ABC_EE, 3, ABC_FF, 3); ok(ret == CSTR_EQUAL, "expected CSTR_EQUAL, got %d\n", ret); @@ -2169,7 +2170,7 @@ static void test_LCMapStringA(void) ret = LCMapStringA(LOCALE_USER_DEFAULT, LOCALE_USE_CP_ACP | LCMAP_LOWERCASE, lower_case, -1, buf, sizeof(buf)); ok(ret == lstrlenA(lower_case) + 1, - "ret %d, error %d, expected value %d\n", + "ret %d, error %ld, expected value %d\n", ret, GetLastError(), lstrlenA(lower_case) + 1); ok(!memcmp(buf, lower_case, ret), "LCMapStringA should return %s, but not %s\n", lower_case, buf);
@@ -2177,7 +2178,7 @@ static void test_LCMapStringA(void) upper_case, -1, buf, sizeof(buf)); ok(!ret, "LCMAP_LOWERCASE and LCMAP_UPPERCASE are mutually exclusive\n"); ok(GetLastError() == ERROR_INVALID_FLAGS, - "unexpected error code %d\n", GetLastError()); + "unexpected error code %ld\n", GetLastError());
/* test invalid flag combinations */ for (i = 0; i < ARRAY_SIZE(lcmap_invalid_flags); i++) { @@ -2186,9 +2187,9 @@ static void test_LCMapStringA(void) ret = LCMapStringA(LOCALE_USER_DEFAULT, lcmap_invalid_flags[i], lower_case, -1, buf, sizeof(buf)); ok(GetLastError() == ERROR_INVALID_FLAGS, - "LCMapStringA (flag %08x) unexpected error code %d\n", + "LCMapStringA (flag %08lx) unexpected error code %ld\n", lcmap_invalid_flags[i], GetLastError()); - ok(!ret, "LCMapStringA (flag %08x) should return 0, got %d\n", + ok(!ret, "LCMapStringA (flag %08lx) should return 0, got %d\n", lcmap_invalid_flags[i], ret); }
@@ -2196,7 +2197,7 @@ static void test_LCMapStringA(void) ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_LOWERCASE, upper_case, -1, buf, sizeof(buf)); ok(ret == lstrlenA(upper_case) + 1, - "ret %d, error %d, expected value %d\n", + "ret %d, error %ld, expected value %d\n", ret, GetLastError(), lstrlenA(upper_case) + 1); ok(!lstrcmpA(buf, lower_case), "LCMapStringA should return %s, but not %s\n", lower_case, buf);
@@ -2204,7 +2205,7 @@ static void test_LCMapStringA(void) ret = LCMapStringA(LOCALE_USER_DEFAULT, LCMAP_UPPERCASE, lower_case, -1, buf, sizeof(buf)); ok(ret == lstrlenA(lower_case) + 1, - "ret %d, error %d, expected value %d\n", + "ret %d, error %ld, expected value %d\n", ret, GetLastError(), lstrlenA(lower_case) + 1); ok(!lstrcmpA(buf, upper_case), "LCMapStringA should return %s, but not %s\n", upper_case, buf);
@@ -2224,7 +2225,7 @@ static void test_LCMapStringA(void) else { ok(ret == lstrlenA(lower_case) + 1, - "ret %d, error %d, expected value %d\n", + "ret %d, error %ld, expected value %d\n", ret, GetLastError(), lstrlenA(lower_case) + 1); ok(!lstrcmpA(buf, upper_case), "LCMapStringA should return %s, but not %s\n", upper_case, buf); } @@ -2236,7 +2237,7 @@ static void test_LCMapStringA(void) else { ok(ret == lstrlenA(upper_case) + 1, - "ret %d, error %d, expected value %d\n", + "ret %d, error %ld, expected value %d\n", ret, GetLastError(), lstrlenA(lower_case) + 1); ok(!lstrcmpA(buf, lower_case), "LCMapStringA should return %s, but not %s\n", lower_case, buf); } @@ -2247,7 +2248,7 @@ static void test_LCMapStringA(void) buf, 10, buf, sizeof(buf)); ok(GetLastError() == ERROR_INVALID_FLAGS /* NT */ || GetLastError() == ERROR_INVALID_PARAMETER /* Win9x */, - "unexpected error code %d\n", GetLastError()); + "unexpected error code %ld\n", GetLastError()); ok(!ret, "src == dst without LCMAP_UPPERCASE or LCMAP_LOWERCASE must fail\n");
/* test whether '\0' is always appended */ @@ -2321,7 +2322,7 @@ static void test_LCMapStringA(void) ret = LCMapStringA(LOCALE_USER_DEFAULT, 0, upper_case, 0, buf, sizeof(buf)); ok(!ret, "LCMapStringA should fail with srclen = 0\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "unexpected error code %d\n", GetLastError()); + "unexpected error code %ld\n", GetLastError()); }
typedef INT (*lcmapstring_wrapper)(DWORD, LPCWSTR, INT, LPWSTR, INT); @@ -2360,7 +2361,7 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f /* LCMAP_LOWERCASE | LCMAP_UPPERCASE makes LCMAP_TITLECASE, so it's valid now. */ ret = func_ptr(LCMAP_LOWERCASE | LCMAP_UPPERCASE, lower_case, -1, buf, ARRAY_SIZE(buf)); todo_wine ok(ret == lstrlenW(title_case) + 1 || broken(!ret), - "%s ret %d, error %d, expected value %d\n", func_name, + "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(title_case) + 1); todo_wine ok(lstrcmpW(buf, title_case) == 0 || broken(!ret), "Expected title case string\n"); @@ -2372,33 +2373,33 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f ret = func_ptr(lcmap_invalid_flags[i], lower_case, -1, buf, sizeof(buf)); ok(GetLastError() == ERROR_INVALID_FLAGS, - "%s (flag %08x) unexpected error code %d\n", + "%s (flag %08lx) unexpected error code %ld\n", func_name, lcmap_invalid_flags[i], GetLastError()); - ok(!ret, "%s (flag %08x) should return 0, got %d\n", + ok(!ret, "%s (flag %08lx) should return 0, got %d\n", func_name, lcmap_invalid_flags[i], ret); }
/* test LCMAP_LOWERCASE */ ret = func_ptr(LCMAP_LOWERCASE, upper_case, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(upper_case) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(upper_case) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(upper_case) + 1); ok(!lstrcmpW(buf, lower_case), "%s string compare mismatch\n", func_name);
/* test LCMAP_UPPERCASE */ ret = func_ptr(LCMAP_UPPERCASE, lower_case, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(lower_case) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(lower_case) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(lower_case) + 1); ok(!lstrcmpW(buf, upper_case), "%s string compare mismatch\n", func_name);
/* test LCMAP_HIRAGANA */ ret = func_ptr(LCMAP_HIRAGANA, japanese_text, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(hiragana_text) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(hiragana_text) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(hiragana_text) + 1); ok(!lstrcmpW(buf, hiragana_text), "%s string compare mismatch\n", func_name);
buf[0] = 0x30f5; /* KATAKANA LETTER SMALL KA */ ret = func_ptr(LCMAP_HIRAGANA, buf, 1, buf2, 1); - ok(ret == 1, "%s ret %d, error %d, expected value 1\n", func_name, + ok(ret == 1, "%s ret %d, error %ld, expected value 1\n", func_name, ret, GetLastError()); /* U+3095: HIRAGANA LETTER SMALL KA was added in Unicode 3.2 */ ok(buf2[0] == 0x3095 || broken(buf2[0] == 0x30f5 /* Vista and earlier versions */), @@ -2406,13 +2407,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
/* test LCMAP_KATAKANA | LCMAP_LOWERCASE */ ret = func_ptr(LCMAP_KATAKANA | LCMAP_LOWERCASE, japanese_text, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(katakana_text) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(katakana_text) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(katakana_text) + 1); ok(!lstrcmpW(buf, katakana_text), "%s string compare mismatch\n", func_name);
/* test LCMAP_FULLWIDTH */ ret = func_ptr(LCMAP_FULLWIDTH, halfwidth_text, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(japanese_text) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(japanese_text) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(japanese_text) + 1); ok(!lstrcmpW(buf, japanese_text), "%s string compare mismatch\n", func_name);
@@ -2422,7 +2423,7 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f /* test LCMAP_FULLWIDTH | LCMAP_HIRAGANA (half-width katakana is converted into full-width hiragana) */ ret = func_ptr(LCMAP_FULLWIDTH | LCMAP_HIRAGANA, halfwidth_text, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(hiragana_text) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(hiragana_text) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(hiragana_text) + 1); ok(!lstrcmpW(buf, hiragana_text), "%s string compare mismatch\n", func_name);
@@ -2431,7 +2432,7 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f
/* test LCMAP_HALFWIDTH */ ret = func_ptr(LCMAP_HALFWIDTH, japanese_text, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(halfwidth_text) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(halfwidth_text) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(halfwidth_text) + 1); ok(!lstrcmpW(buf, halfwidth_text), "%s string compare mismatch\n", func_name);
@@ -2441,7 +2442,7 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f /* test LCMAP_HALFWIDTH | LCMAP_KATAKANA (hiragana character is converted into half-width katakana) */ ret = func_ptr(LCMAP_HALFWIDTH | LCMAP_KATAKANA, japanese_text, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(halfwidth_text2) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(halfwidth_text2) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(halfwidth_text2) + 1); ok(!lstrcmpW(buf, halfwidth_text2), "%s string compare mismatch\n", func_name);
@@ -2487,13 +2488,13 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f /* LCMAP_UPPERCASE or LCMAP_LOWERCASE should accept src == dst */ lstrcpyW(buf, lower_case); ret = func_ptr(LCMAP_UPPERCASE, buf, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(lower_case) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(lower_case) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(lower_case) + 1); ok(!lstrcmpW(buf, upper_case), "%s string compare mismatch\n", func_name);
lstrcpyW(buf, upper_case); ret = func_ptr(LCMAP_LOWERCASE, buf, -1, buf, ARRAY_SIZE(buf)); - ok(ret == lstrlenW(upper_case) + 1, "%s ret %d, error %d, expected value %d\n", func_name, + ok(ret == lstrlenW(upper_case) + 1, "%s ret %d, error %ld, expected value %d\n", func_name, ret, GetLastError(), lstrlenW(lower_case) + 1); ok(!lstrcmpW(buf, lower_case), "%s string compare mismatch\n", func_name);
@@ -2503,7 +2504,7 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f buf, 10, buf, sizeof(buf)); ok(GetLastError() == ERROR_INVALID_FLAGS /* NT */ || GetLastError() == ERROR_INVALID_PARAMETER /* Win7+ */, - "%s unexpected error code %d\n", func_name, GetLastError()); + "%s unexpected error code %ld\n", func_name, GetLastError()); ok(!ret, "%s src == dst without LCMAP_UPPERCASE or LCMAP_LOWERCASE must fail\n", func_name);
/* test whether '\0' is always appended */ @@ -2565,7 +2566,7 @@ static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *f ret = func_ptr(0, upper_case, 0, buf, ARRAY_SIZE(buf)); ok(!ret, "%s func_ptr should fail with srclen = 0\n", func_name); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "%s unexpected error code %d\n", func_name, GetLastError()); + "%s unexpected error code %ld\n", func_name, GetLastError()); }
static INT LCMapStringW_wrapper(DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen) @@ -2584,7 +2585,7 @@ static void test_LCMapStringW(void) ret = LCMapStringW((LCID)-1, LCMAP_LOWERCASE, upper_case, -1, buf, ARRAY_SIZE(buf)); todo_wine { ok(!ret, "LCMapStringW should fail with bad lcid\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "unexpected error code %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "unexpected error code %ld\n", GetLastError()); }
test_lcmapstring_unicode(LCMapStringW_wrapper, "LCMapStringW:"); @@ -2613,19 +2614,19 @@ static void test_LCMapStringEx(void) upper_case, -1, buf, ARRAY_SIZE(buf), NULL, NULL, 0); todo_wine { ok(!ret, "LCMapStringEx should fail with bad locale name\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "unexpected error code %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "unexpected error code %ld\n", GetLastError()); }
/* test reserved parameters */ ret = pLCMapStringEx(LOCALE_NAME_USER_DEFAULT, LCMAP_LOWERCASE, upper_case, -1, buf, ARRAY_SIZE(buf), NULL, NULL, 1); - ok(ret == lstrlenW(upper_case) + 1, "ret %d, error %d, expected value %d\n", + ok(ret == lstrlenW(upper_case) + 1, "ret %d, error %ld, expected value %d\n", ret, GetLastError(), lstrlenW(upper_case) + 1); ok(!lstrcmpW(buf, lower_case), "string compare mismatch\n");
ret = pLCMapStringEx(LOCALE_NAME_USER_DEFAULT, LCMAP_LOWERCASE, upper_case, -1, buf, ARRAY_SIZE(buf), NULL, (void*)1, 0); - ok(ret == lstrlenW(upper_case) + 1, "ret %d, error %d, expected value %d\n", + ok(ret == lstrlenW(upper_case) + 1, "ret %d, error %ld, expected value %d\n", ret, GetLastError(), lstrlenW(upper_case) + 1); ok(!lstrcmpW(buf, lower_case), "string compare mismatch\n");
@@ -2689,51 +2690,51 @@ static void test_LocaleNameToLCID(void) SetLastError(0xdeadbeef); lcid = pLocaleNameToLCID(LOCALE_NAME_USER_DEFAULT, 0); ok(lcid == GetUserDefaultLCID() || broken(GetLastError() == ERROR_INVALID_PARAMETER /* Vista */), - "Expected lcid == %08x, got %08x, error %d\n", GetUserDefaultLCID(), lcid, GetLastError()); + "Expected lcid == %08lx, got %08lx, error %ld\n", GetUserDefaultLCID(), lcid, GetLastError()); ret = pLCIDToLocaleName(lcid, buffer, LOCALE_NAME_MAX_LENGTH, 0); - ok(ret > 0, "Expected ret > 0, got %d, error %d\n", ret, GetLastError()); - trace("%08x, %s\n", lcid, wine_dbgstr_w(buffer)); + ok(ret > 0, "Expected ret > 0, got %d, error %ld\n", ret, GetLastError()); + trace("%08lx, %s\n", lcid, wine_dbgstr_w(buffer));
buffer[0] = 0; SetLastError(0xdeadbeef); lcid = pLocaleNameToLCID(LOCALE_NAME_SYSTEM_DEFAULT, 0); ok(!lcid && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected lcid == 0, got %08x, error %d\n", lcid, GetLastError()); + "Expected lcid == 0, got %08lx, error %ld\n", lcid, GetLastError()); ret = pLCIDToLocaleName(lcid, buffer, LOCALE_NAME_MAX_LENGTH, 0); - ok(ret > 0, "Expected ret > 0, got %d, error %d\n", ret, GetLastError()); - trace("%08x, %s\n", lcid, wine_dbgstr_w(buffer)); + ok(ret > 0, "Expected ret > 0, got %d, error %ld\n", ret, GetLastError()); + trace("%08lx, %s\n", lcid, wine_dbgstr_w(buffer));
buffer[0] = 0; SetLastError(0xdeadbeef); lcid = pLocaleNameToLCID(LOCALE_NAME_INVARIANT, 0); - ok(lcid == 0x7F, "Expected lcid = 0x7F, got %08x, error %d\n", lcid, GetLastError()); + ok(lcid == 0x7F, "Expected lcid = 0x7F, got %08lx, error %ld\n", lcid, GetLastError()); ret = pLCIDToLocaleName(lcid, buffer, LOCALE_NAME_MAX_LENGTH, 0); - ok(ret > 0, "Expected ret > 0, got %d, error %d\n", ret, GetLastError()); - trace("%08x, %s\n", lcid, wine_dbgstr_w(buffer)); + ok(ret > 0, "Expected ret > 0, got %d, error %ld\n", ret, GetLastError()); + trace("%08lx, %s\n", lcid, wine_dbgstr_w(buffer));
/* bad name */ SetLastError(0xdeadbeef); lcid = pLocaleNameToLCID(invalidW, 0); ok(!lcid && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected lcid == 0, got %08x, error %d\n", lcid, GetLastError()); + "Expected lcid == 0, got %08lx, error %ld\n", lcid, GetLastError());
/* lower-case */ lcid = pLocaleNameToLCID(esesW, 0); - ok(lcid == MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), SORT_DEFAULT), "Got wrong lcid for es-es: 0x%x\n", lcid); + ok(lcid == MAKELCID(MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), SORT_DEFAULT), "Got wrong lcid for es-es: 0x%lx\n", lcid);
/* english neutral name */ lcid = pLocaleNameToLCID(enW, LOCALE_ALLOW_NEUTRAL_NAMES); ok(lcid == MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), SORT_DEFAULT) || - broken(lcid == 0) /* Vista */, "got 0x%04x\n", lcid); + broken(lcid == 0) /* Vista */, "got 0x%04lx\n", lcid); lcid = pLocaleNameToLCID(enW, 0); ok(lcid == MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT) || - broken(lcid == 0) /* Vista */, "got 0x%04x\n", lcid); + broken(lcid == 0) /* Vista */, "got 0x%04lx\n", lcid); if (lcid) { for (ptr = neutralsublang_names; *ptr->name; ptr++) { lcid = pLocaleNameToLCID(ptr->name, 0); - ok(lcid == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", + ok(lcid == ptr->lcid, "%s: got wrong lcid 0x%04lx, expected 0x%04lx\n", wine_dbgstr_w(ptr->name), lcid, ptr->lcid);
*buffer = 0; @@ -2747,7 +2748,7 @@ static void test_LocaleNameToLCID(void) /* zh-Hant has LCID 0x7c04, but LocaleNameToLCID actually returns 0x0c04, which is the LCID of zh-HK */ lcid = pLocaleNameToLCID(zhHantW, 0); ok(lcid == MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_HONGKONG), SORT_DEFAULT), - "%s: got wrong lcid 0x%04x\n", wine_dbgstr_w(zhHantW), lcid); + "%s: got wrong lcid 0x%04lx\n", wine_dbgstr_w(zhHantW), lcid); ret = pLCIDToLocaleName(lcid, buffer, ARRAY_SIZE(buffer), 0); ok(ret > 0, "%s: got %d\n", wine_dbgstr_w(zhHantW), ret); ok(!lstrcmpW(zhhkW, buffer), "%s: got wrong locale name %s\n", @@ -2762,7 +2763,7 @@ static void test_LocaleNameToLCID(void) /* zh-hant */ lcid = pLocaleNameToLCID(zhhantW, 0); ok(lcid == MAKELCID(MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_HONGKONG), SORT_DEFAULT), - "%s: got wrong lcid 0x%04x\n", wine_dbgstr_w(zhhantW), lcid); + "%s: got wrong lcid 0x%04lx\n", wine_dbgstr_w(zhhantW), lcid); ret = pLCIDToLocaleName(lcid, buffer, ARRAY_SIZE(buffer), 0); ok(ret > 0, "%s: got %d\n", wine_dbgstr_w(zhhantW), ret); ok(!lstrcmpW(zhhkW, buffer), "%s: got wrong locale name %s\n", @@ -2772,7 +2773,7 @@ static void test_LocaleNameToLCID(void) lcid = pLocaleNameToLCID(zhHansW, 0); /* check that LocaleNameToLCID actually returns 0x0804 */ ok(lcid == MAKELCID(MAKELANGID(LANG_CHINESE_SIMPLIFIED, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT), - "%s: got wrong lcid 0x%04x\n", wine_dbgstr_w(zhHansW), lcid); + "%s: got wrong lcid 0x%04lx\n", wine_dbgstr_w(zhHansW), lcid); ret = pLCIDToLocaleName(lcid, buffer, ARRAY_SIZE(buffer), 0); ok(ret > 0, "%s: got %d\n", wine_dbgstr_w(zhHansW), ret); ok(!lstrcmpW(zhcnW, buffer), "%s: got wrong locale name %s\n", @@ -2786,7 +2787,7 @@ static void test_LocaleNameToLCID(void) /* zh-hans */ lcid = pLocaleNameToLCID(zhhansW, 0); ok(lcid == MAKELCID(MAKELANGID(LANG_CHINESE_SIMPLIFIED, SUBLANG_CHINESE_SIMPLIFIED), SORT_DEFAULT), - "%s: got wrong lcid 0x%04x\n", wine_dbgstr_w(zhhansW), lcid); + "%s: got wrong lcid 0x%04lx\n", wine_dbgstr_w(zhhansW), lcid); ret = pLCIDToLocaleName(lcid, buffer, ARRAY_SIZE(buffer), 0); ok(ret > 0, "%s: got %d\n", wine_dbgstr_w(zhhansW), ret); ok(!lstrcmpW(zhcnW, buffer), "%s: got wrong locale name %s\n", @@ -2796,39 +2797,39 @@ static void test_LocaleNameToLCID(void) if (pRtlLocaleNameToLcid) { status = pRtlLocaleNameToLcid( LOCALE_NAME_USER_DEFAULT, &lcid, 0 ); - ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %x\n", status ); + ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %lx\n", status ); status = pRtlLocaleNameToLcid( LOCALE_NAME_SYSTEM_DEFAULT, &lcid, 0 ); - ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %x\n", status ); + ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %lx\n", status ); status = pRtlLocaleNameToLcid( invalidW, &lcid, 0 ); - ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %x\n", status ); + ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %lx\n", status );
lcid = 0; status = pRtlLocaleNameToLcid( LOCALE_NAME_INVARIANT, &lcid, 0 ); - ok( !status, "failed error %x\n", status ); - ok( lcid == LANG_INVARIANT, "got %08x\n", lcid ); + ok( !status, "failed error %lx\n", status ); + ok( lcid == LANG_INVARIANT, "got %08lx\n", lcid );
lcid = 0; status = pRtlLocaleNameToLcid( localeW, &lcid, 0 ); - ok( !status, "failed error %x\n", status ); - ok( lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got %08x\n", lcid ); + ok( !status, "failed error %lx\n", status ); + ok( lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), "got %08lx\n", lcid );
lcid = 0; status = pRtlLocaleNameToLcid( esesW, &lcid, 0 ); - ok( !status, "failed error %x\n", status ); - ok( lcid == MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), "got %08x\n", lcid ); + ok( !status, "failed error %lx\n", status ); + ok( lcid == MAKELANGID(LANG_SPANISH, SUBLANG_SPANISH_MODERN), "got %08lx\n", lcid );
lcid = 0; status = pRtlLocaleNameToLcid( enW, &lcid, 0 ); - ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %x\n", status ); + ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %lx\n", status ); status = pRtlLocaleNameToLcid( enW, &lcid, 1 ); - ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %x\n", status ); + ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %lx\n", status ); status = pRtlLocaleNameToLcid( enW, &lcid, 2 ); - ok( !status, "failed error %x\n", status ); - ok( lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), "got %08x\n", lcid ); + ok( !status, "failed error %lx\n", status ); + ok( lcid == MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL), "got %08lx\n", lcid ); status = pRtlLocaleNameToLcid( L"en-RR", &lcid, 2 ); - ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %x\n", status ); + ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %lx\n", status ); status = pRtlLocaleNameToLcid( L"en-Latn-RR", &lcid, 2 ); - ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %x\n", status ); + ok( status == STATUS_INVALID_PARAMETER_1, "wrong error %lx\n", status );
for (ptr = neutralsublang_names; *ptr->name; ptr++) { @@ -2843,13 +2844,13 @@ static void test_LocaleNameToLCID(void)
status = pRtlLocaleNameToLcid( ptr->name, &lcid, 2 ); ok( !status || broken(ptr->lcid == MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)), /* vista */ - "%s failed error %x\n", wine_dbgstr_w(ptr->name), status ); - if (!status) ok( lcid == expect, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", + "%s failed error %lx\n", wine_dbgstr_w(ptr->name), status ); + if (!status) ok( lcid == expect, "%s: got wrong lcid 0x%04lx, expected 0x%04lx\n", wine_dbgstr_w(ptr->name), lcid, expect ); status = pRtlLocaleNameToLcid( ptr->sname, &lcid, 0 ); ok( !status || broken(ptr->lcid == MAKELANGID(LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN)), /* vista */ - "%s failed error %x\n", wine_dbgstr_w(ptr->name), status ); - if (!status) ok( lcid == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", + "%s failed error %lx\n", wine_dbgstr_w(ptr->name), status ); + if (!status) ok( lcid == ptr->lcid, "%s: got wrong lcid 0x%04lx, expected 0x%04lx\n", wine_dbgstr_w(ptr->name), lcid, ptr->lcid ); } } @@ -3087,7 +3088,7 @@ static void test_FoldStringA(void) /* MAP_FOLDDIGITS */ SetLastError(0xdeadbeef); ret = FoldStringA(MAP_FOLDDIGITS, digits_src, -1, dst, 256); - ok(ret == 4, "Expected ret == 4, got %d, error %d\n", ret, GetLastError()); + ok(ret == 4, "Expected ret == 4, got %d, error %ld\n", ret, GetLastError()); ok(strcmp(dst, digits_dst) == 0, "MAP_FOLDDIGITS: Expected '%s', got '%s'\n", digits_dst, dst); for (i = 1; i < 256; i++) @@ -3097,7 +3098,7 @@ static void test_FoldStringA(void) src[0] = i; src[1] = '\0'; ret = FoldStringA(MAP_FOLDDIGITS, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(ret == 2, "Expected ret == 2, got %d, error %ld\n", ret, GetLastError()); ok(dst[0] == src[0], "MAP_FOLDDIGITS: Expected '%s', got '%s'\n", src, dst); } @@ -3106,7 +3107,7 @@ static void test_FoldStringA(void) /* MAP_EXPAND_LIGATURES */ SetLastError(0xdeadbeef); ret = FoldStringA(MAP_EXPAND_LIGATURES, ligatures_src, -1, dst, 256); - ok(ret == sizeof(ligatures_dst), "Got %d, error %d\n", ret, GetLastError()); + ok(ret == sizeof(ligatures_dst), "Got %d, error %ld\n", ret, GetLastError()); ok(strcmp(dst, ligatures_dst) == 0, "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n", ligatures_dst, dst); for (i = 1; i < 256; i++) @@ -3125,7 +3126,7 @@ static void test_FoldStringA(void) } else { - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(ret == 2, "Expected ret == 2, got %d, error %ld\n", ret, GetLastError()); ok(dst[0] == src[0], "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n", src, dst); } @@ -3135,9 +3136,9 @@ static void test_FoldStringA(void) /* MAP_COMPOSITE */ SetLastError(0xdeadbeef); ret = FoldStringA(MAP_COMPOSITE, composite_src, -1, dst, 256); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(ret, "Expected ret != 0, got %d, error %ld\n", ret, GetLastError()); ok( GetLastError() == 0xdeadbeef || broken(!GetLastError()), /* vista */ - "wrong error %u\n", GetLastError()); + "wrong error %lu\n", GetLastError()); ok(ret == 121 || ret == 119, "Expected 121 or 119, got %d\n", ret); ok(strcmp(dst, composite_dst) == 0 || strcmp(dst, composite_dst_alt) == 0, "MAP_COMPOSITE: Mismatch, got '%s'\n", dst); @@ -3149,7 +3150,7 @@ static void test_FoldStringA(void) src[0] = i; src[1] = '\0'; ret = FoldStringA(MAP_COMPOSITE, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(ret == 2, "Expected ret == 2, got %d, error %ld\n", ret, GetLastError()); ok(dst[0] == src[0], "0x%02x, 0x%02x,0x%02x,0x%02x,\n", (unsigned char)src[0], (unsigned char)dst[0],(unsigned char)dst[1],(unsigned char)dst[2]); @@ -3169,7 +3170,7 @@ static void test_FoldStringA(void) if (foldczone_special[j].src == src[0]) { ok(ret == 2 || ret == lstrlenA(foldczone_special[j].dst) + 1, - "Expected ret == 2 or %d, got %d, error %d\n", + "Expected ret == 2 or %d, got %d, error %ld\n", lstrlenA(foldczone_special[j].dst) + 1, ret, GetLastError()); ok(src[0] == dst[0] || lstrcmpA(foldczone_special[j].dst, dst) == 0, "MAP_FOLDCZONE: string mismatch for 0x%02x\n", @@ -3179,7 +3180,7 @@ static void test_FoldStringA(void) } if (! is_special) { - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(ret == 2, "Expected ret == 2, got %d, error %ld\n", ret, GetLastError()); ok(src[0] == dst[0], "MAP_FOLDCZONE: Expected 0x%02x, got 0x%02x\n", (unsigned char)src[0], (unsigned char)dst[0]); @@ -3192,7 +3193,7 @@ static void test_FoldStringA(void) src[0] = i; src[1] = '\0'; ret = FoldStringA(MAP_PRECOMPOSED, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(ret == 2, "Expected ret == 2, got %d, error %ld\n", ret, GetLastError()); ok(src[0] == dst[0], "MAP_PRECOMPOSED: Expected 0x%02x, got 0x%02x\n", (unsigned char)src[0], (unsigned char)dst[0]); @@ -3340,32 +3341,32 @@ static void test_FoldStringW(void) SetLastError(0xdeadbeef); ret = FoldStringW(badFlags[i], src, 256, dst, 256); ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); + "Expected ERROR_INVALID_FLAGS, got %ld\n", GetLastError()); }
/* src & dst cannot be the same */ SetLastError(0xdeadbeef); ret = FoldStringW(MAP_FOLDCZONE, src, -1, src, 256); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* src can't be NULL */ SetLastError(0xdeadbeef); ret = FoldStringW(MAP_FOLDCZONE, NULL, -1, dst, 256); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* srclen can't be 0 */ SetLastError(0xdeadbeef); ret = FoldStringW(MAP_FOLDCZONE, src, 0, dst, 256); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* dstlen can't be < 0 */ SetLastError(0xdeadbeef); ret = FoldStringW(MAP_FOLDCZONE, src, -1, dst, -1); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Ret includes terminating NUL which is appended if srclen = -1 */ SetLastError(0xdeadbeef); @@ -3373,9 +3374,9 @@ static void test_FoldStringW(void) src[1] = '\0'; dst[0] = '\0'; ret = FoldStringW(MAP_FOLDCZONE, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(ret == 2, "Expected ret == 2, got %d, error %ld\n", ret, GetLastError()); ok(dst[0] == 'A' && dst[1] == '\0', - "srclen=-1: Expected ret=2 [%d,%d], got ret=%d [%d,%d], err=%d\n", + "srclen=-1: Expected ret=2 [%d,%d], got ret=%d [%d,%d], err=%ld\n", 'A', '\0', ret, dst[0], dst[1], GetLastError());
/* If size is given, result is not NUL terminated */ @@ -3385,9 +3386,9 @@ static void test_FoldStringW(void) dst[0] = 'X'; dst[1] = 'X'; ret = FoldStringW(MAP_FOLDCZONE, src, 1, dst, 256); - ok(ret == 1, "Expected ret == 1, got %d, error %d\n", ret, GetLastError()); + ok(ret == 1, "Expected ret == 1, got %d, error %ld\n", ret, GetLastError()); ok(dst[0] == 'A' && dst[1] == 'X', - "srclen=1: Expected ret=1, [%d,%d], got ret=%d,[%d,%d], err=%d\n", + "srclen=1: Expected ret=1, [%d,%d], got ret=%d,[%d,%d], err=%ld\n", 'A','X', ret, dst[0], dst[1], GetLastError());
/* MAP_FOLDDIGITS */ @@ -3400,7 +3401,7 @@ static void test_FoldStringW(void) src[0] = ch; src[1] = dst[0] = '\0'; ret = FoldStringW(MAP_FOLDDIGITS, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(ret == 2, "Expected ret == 2, got %d, error %ld\n", ret, GetLastError());
ok(dst[0] == ch || wcschr(outOfSequenceDigits, ch) || (ch >= 0xa8e0 && ch <= 0xa8e9), /* combining Devanagari on Win8 */ @@ -3428,7 +3429,7 @@ static void test_FoldStringW(void) src[0] = c; src[1] = dst[0] = '\0'; ret = FoldStringW(MAP_FOLDDIGITS, src, -1, dst, 256); - ok(ret == 2, "Expected ret == 2, got %d, error %d\n", ret, GetLastError()); + ok(ret == 2, "Expected ret == 2, got %d, error %ld\n", ret, GetLastError());
ok((dst[0] == '0' + ch - digitRanges[j] && dst[1] == '\0') || broken( dst[0] == ch ) || /* old Windows versions don't have all mappings */ @@ -3446,7 +3447,7 @@ static void test_FoldStringW(void) ret = FoldStringW(MAP_FOLDCZONE, foldczone_src, -1, dst, 256); ok(ret == ARRAY_SIZE(foldczone_dst) || broken(ret == ARRAY_SIZE(foldczone_broken_dst)), /* winxp, win2003 */ - "Got %d, error %d.\n", ret, GetLastError()); + "Got %d, error %ld.\n", ret, GetLastError()); ok(!memcmp(dst, foldczone_dst, sizeof(foldczone_dst)) || broken(!memcmp(dst, foldczone_broken_dst, sizeof(foldczone_broken_dst))), /* winxp, win2003 */ "Got unexpected string %s.\n", wine_dbgstr_w(dst)); @@ -3454,7 +3455,7 @@ static void test_FoldStringW(void) /* MAP_EXPAND_LIGATURES */ SetLastError(0xdeadbeef); ret = FoldStringW(MAP_EXPAND_LIGATURES, ligatures_src, -1, dst, 256); - ok(ret == ARRAY_SIZE(ligatures_dst), "Got %d, error %d\n", ret, GetLastError()); + ok(ret == ARRAY_SIZE(ligatures_dst), "Got %d, error %ld\n", ret, GetLastError()); ok(!memcmp(dst, ligatures_dst, sizeof(ligatures_dst)), "Got unexpected string %s.\n", wine_dbgstr_w(dst));
@@ -3464,7 +3465,7 @@ static void test_FoldStringW(void)
#define LCID_OK(l) \ - ok(lcid == l, "Expected lcid = %08x, got %08x\n", l, lcid) + ok(lcid == l, "Expected lcid = %08lx, got %08lx\n", l, lcid) #define MKLCID(x,y,z) MAKELCID(MAKELANGID(x, y), z) #define LCID_RES(src, res) do { lcid = ConvertDefaultLocale(src); LCID_OK(res); } while (0) #define TEST_LCIDLANG(a,b) LCID_RES(MAKELCID(a,b), MAKELCID(a,b)) @@ -3496,12 +3497,12 @@ static void test_ConvertDefaultLocale(void) lcid = ConvertDefaultLocale( MKLCID( LANG_JAPANESE, SUBLANG_NEUTRAL, SORT_JAPANESE_UNICODE )); ok( lcid == MKLCID( LANG_JAPANESE, SUBLANG_NEUTRAL, SORT_JAPANESE_UNICODE ) || broken( lcid == MKLCID( LANG_JAPANESE, SUBLANG_DEFAULT, SORT_JAPANESE_UNICODE )), /* <= vista */ - "Expected lcid = %08x got %08x\n", + "Expected lcid = %08lx got %08lx\n", MKLCID( LANG_JAPANESE, SUBLANG_NEUTRAL, SORT_JAPANESE_UNICODE ), lcid ); lcid = ConvertDefaultLocale( MKLCID( LANG_IRISH, SUBLANG_NEUTRAL, SORT_JAPANESE_UNICODE )); ok( lcid == MKLCID( LANG_IRISH, SUBLANG_NEUTRAL, SORT_JAPANESE_UNICODE ) || broken( lcid == MKLCID( LANG_IRISH, SUBLANG_DEFAULT, SORT_JAPANESE_UNICODE )), /* <= vista */ - "Expected lcid = %08x got %08x\n", + "Expected lcid = %08lx got %08lx\n", MKLCID( LANG_IRISH, SUBLANG_NEUTRAL, SORT_JAPANESE_UNICODE ), lcid );
/* SUBLANG_NEUTRAL -> SUBLANG_DEFAULT */ @@ -3515,22 +3516,22 @@ static void test_ConvertDefaultLocale(void) ok( lcid == MAKELANGID( nondefault_langs[i].lang, nondefault_langs[i].sublang ) || broken( lcid == MAKELANGID( nondefault_langs[i].lang, SUBLANG_DEFAULT )) || /* <= vista */ broken( lcid == MAKELANGID( nondefault_langs[i].lang, SUBLANG_NEUTRAL )), /* w7 */ - "Expected lcid = %08x got %08x\n", + "Expected lcid = %08x got %08lx\n", MAKELANGID( nondefault_langs[i].lang, nondefault_langs[i].sublang ), lcid ); } lcid = ConvertDefaultLocale( 0x7804 ); ok( lcid == MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED ) || broken( lcid == 0x7804 ), /* <= vista */ - "Expected lcid = %08x got %08x\n", MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED ), lcid ); + "Expected lcid = %08x got %08lx\n", MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED ), lcid ); lcid = ConvertDefaultLocale( 0x7c04 ); ok( lcid == MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_HONGKONG ) || broken( lcid == 0x7c04 ) || /* winxp */ broken( lcid == 0x0404 ), /* vista */ - "Expected lcid = %08x got %08x\n", MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_HONGKONG ), lcid ); + "Expected lcid = %08x got %08lx\n", MAKELANGID( LANG_CHINESE, SUBLANG_CHINESE_HONGKONG ), lcid ); lcid = ConvertDefaultLocale( LANG_SERBIAN_NEUTRAL ); ok( lcid == MAKELANGID( LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN ) || broken( lcid == MAKELANGID( LANG_SERBIAN, SUBLANG_SERBIAN_LATIN ) ), /* <= vista */ - "Expected lcid = %08x got %08x\n", MAKELANGID( LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN ), lcid ); + "Expected lcid = %08x got %08lx\n", MAKELANGID( LANG_SERBIAN, SUBLANG_SERBIAN_SERBIA_LATIN ), lcid );
/* Invariant language is not treated specially */ TEST_LCID(LANG_INVARIANT, SUBLANG_DEFAULT, SORT_DEFAULT); @@ -3545,22 +3546,22 @@ static void test_ConvertDefaultLocale(void) LCID_RES(LOCALE_NEUTRAL, GetUserDefaultLCID()); lcid = ConvertDefaultLocale(LOCALE_INVARIANT); ok(lcid == LOCALE_INVARIANT || broken(lcid == 0x47f) /* win2k[3]/winxp */, - "Expected lcid = %08x, got %08x\n", LOCALE_INVARIANT, lcid); + "Expected lcid = %08lx, got %08lx\n", LOCALE_INVARIANT, lcid); }
static BOOL CALLBACK langgrp_procA(LGRPID lgrpid, LPSTR lpszNum, LPSTR lpszName, DWORD dwFlags, LONG_PTR lParam) { if (winetest_debug > 1) - trace("%08x, %s, %s, %08x, %08lx\n", + trace("%08lx, %s, %s, %08lx, %08Ix\n", lgrpid, lpszNum, lpszName, dwFlags, lParam);
ok(pIsValidLanguageGroup(lgrpid, dwFlags) == TRUE, - "Enumerated grp %d not valid (flags %d)\n", lgrpid, dwFlags); + "Enumerated grp %ld not valid (flags %ld)\n", lgrpid, dwFlags);
/* If lParam is one, we are calling with flags defaulted from 0 */ ok(!lParam || (dwFlags == LGRPID_INSTALLED || dwFlags == LGRPID_SUPPORTED), - "Expected dwFlags == LGRPID_INSTALLED || dwFlags == LGRPID_SUPPORTED, got %d\n", dwFlags); + "Expected dwFlags == LGRPID_INSTALLED || dwFlags == LGRPID_SUPPORTED, got %ld\n", dwFlags);
return TRUE; } @@ -3584,17 +3585,17 @@ static void test_EnumSystemLanguageGroupsA(void) return; } ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* Invalid flags */ SetLastError(0); pEnumSystemLanguageGroupsA(langgrp_procA, LGRPID_INSTALLED|LGRPID_SUPPORTED, 0); - ok(GetLastError() == ERROR_INVALID_FLAGS, "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_FLAGS, "Expected ERROR_INVALID_FLAGS, got %ld\n", GetLastError());
/* No flags - defaults to LGRPID_INSTALLED */ SetLastError(0xdeadbeef); pEnumSystemLanguageGroupsA(langgrp_procA, 0, 1); - ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "got error %ld\n", GetLastError());
pEnumSystemLanguageGroupsA(langgrp_procA, LGRPID_INSTALLED, 0); pEnumSystemLanguageGroupsA(langgrp_procA, LGRPID_SUPPORTED, 0); @@ -3603,7 +3604,7 @@ static void test_EnumSystemLanguageGroupsA(void) static BOOL CALLBACK enum_func( LPWSTR name, DWORD flags, LPARAM lparam ) { if (winetest_debug > 1) - trace( "%s %x\n", wine_dbgstr_w(name), flags ); + trace( "%s %lx\n", wine_dbgstr_w(name), flags ); return TRUE; }
@@ -3619,26 +3620,26 @@ static void test_EnumSystemLocalesEx(void) SetLastError( 0xdeadbeef ); ret = pEnumSystemLocalesEx( enum_func, LOCALE_ALL, 0, (void *)1 ); ok( !ret, "should have failed\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); ret = pEnumSystemLocalesEx( enum_func, 0, 0, NULL ); - ok( ret, "failed err %u\n", GetLastError() ); + ok( ret, "failed err %lu\n", GetLastError() ); }
static BOOL CALLBACK lgrplocale_procA(LGRPID lgrpid, LCID lcid, LPSTR lpszNum, LONG_PTR lParam) { if (winetest_debug > 1) - trace("%08x, %08x, %s, %08lx\n", lgrpid, lcid, lpszNum, lParam); + trace("%08lx, %08lx, %s, %08Ix\n", lgrpid, lcid, lpszNum, lParam);
/* invalid locale enumerated on some platforms */ if (lcid == 0) return TRUE;
ok(pIsValidLanguageGroup(lgrpid, LGRPID_SUPPORTED) == TRUE, - "Enumerated grp %d not valid\n", lgrpid); + "Enumerated grp %ld not valid\n", lgrpid); ok(IsValidLocale(lcid, LCID_SUPPORTED) == TRUE, - "Enumerated grp locale %04x not valid\n", lcid); + "Enumerated grp locale %04lx not valid\n", lcid); return TRUE; }
@@ -3661,25 +3662,25 @@ static void test_EnumLanguageGroupLocalesA(void) return; } ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* lgrpid too small */ SetLastError(0); ret = pEnumLanguageGroupLocalesA(lgrplocale_procA, 0, 0, 0); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* lgrpid too big */ SetLastError(0); ret = pEnumLanguageGroupLocalesA(lgrplocale_procA, LGRPID_ARMENIAN + 1, 0, 0); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* dwFlags is reserved */ SetLastError(0); ret = pEnumLanguageGroupLocalesA(0, LGRPID_WESTERN_EUROPE, 0x1, 0); ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
pEnumLanguageGroupLocalesA(lgrplocale_procA, LGRPID_WESTERN_EUROPE, 0, 0); } @@ -3693,25 +3694,25 @@ static void test_SetLocaleInfoA(void) SetLastError(0); bRet = SetLocaleInfoA(lcid, LOCALE_SDATE, 0); ok( !bRet && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* IDATE */ SetLastError(0); bRet = SetLocaleInfoA(lcid, LOCALE_IDATE, "test_SetLocaleInfoA"); ok(!bRet && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); + "Expected ERROR_INVALID_FLAGS, got %ld\n", GetLastError());
/* ILDATE */ SetLastError(0); bRet = SetLocaleInfoA(lcid, LOCALE_ILDATE, "test_SetLocaleInfoA"); ok(!bRet && GetLastError() == ERROR_INVALID_FLAGS, - "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); + "Expected ERROR_INVALID_FLAGS, got %ld\n", GetLastError()); }
static BOOL CALLBACK luilocale_proc1A(LPSTR value, LONG_PTR lParam) { if (winetest_debug > 1) - trace("%s %08lx\n", value, lParam); + trace("%s %08Ix\n", value, lParam); return(TRUE); }
@@ -3743,37 +3744,37 @@ static void test_EnumUILanguageA(void) win_skip("EnumUILanguagesA is not implemented\n"); return; } - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(ret, "Expected ret != 0, got %d, error %ld\n", ret, GetLastError());
enumCount = 0; SetLastError(ERROR_SUCCESS); ret = pEnumUILanguagesA(luilocale_proc2A, 0, 0); - ok(ret, "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + ok(ret, "Expected ret != 0, got %d, error %ld\n", ret, GetLastError()); ok(enumCount == 1, "enumCount = %u\n", enumCount);
enumCount = 0; SetLastError(ERROR_SUCCESS); ret = pEnumUILanguagesA(luilocale_proc2A, MUI_LANGUAGE_ID, 0); ok(ret || broken(!ret && GetLastError() == ERROR_INVALID_FLAGS), /* winxp */ - "Expected ret != 0, got %d, error %d\n", ret, GetLastError()); + "Expected ret != 0, got %d, error %ld\n", ret, GetLastError()); if (ret) ok(enumCount == 1, "enumCount = %u\n", enumCount);
SetLastError(ERROR_SUCCESS); ret = pEnumUILanguagesA(NULL, 0, 0); ok(!ret, "Expected return value FALSE, got %u\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(ERROR_SUCCESS); ret = pEnumUILanguagesA(luilocale_proc3A, 0x5a5a5a5a, 0); ok(!ret, "Expected return value FALSE, got %u\n", ret); - ok(GetLastError() == ERROR_INVALID_FLAGS, "Expected ERROR_INVALID_FLAGS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_FLAGS, "Expected ERROR_INVALID_FLAGS, got %ld\n", GetLastError());
SetLastError(ERROR_SUCCESS); ret = pEnumUILanguagesA(NULL, 0x5a5a5a5a, 0); ok(!ret, "Expected return value FALSE, got %u\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); }
static char date_fmt_buf[1024]; @@ -3807,12 +3808,12 @@ static void test_EnumDateFormatsA(void) } else { - ok(ret, "EnumDateFormatsA(0) error %d\n", GetLastError()); + ok(ret, "EnumDateFormatsA(0) error %ld\n", GetLastError()); trace("EnumDateFormatsA(0): %s\n", date_fmt_buf); /* test the 1st enumerated format */ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %ld\n", GetLastError()); ok(!lstrcmpA(date_fmt_buf, buf), "expected "%s" got "%s"\n", date_fmt_buf, buf); }
@@ -3825,33 +3826,33 @@ static void test_EnumDateFormatsA(void) } else { - ok(ret, "EnumDateFormatsA(LOCALE_USE_CP_ACP) error %d\n", GetLastError()); + ok(ret, "EnumDateFormatsA(LOCALE_USE_CP_ACP) error %ld\n", GetLastError()); trace("EnumDateFormatsA(LOCALE_USE_CP_ACP): %s\n", date_fmt_buf); /* test the 1st enumerated format */ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %ld\n", GetLastError()); ok(!lstrcmpA(date_fmt_buf, buf), "expected "%s" got "%s"\n", date_fmt_buf, buf); }
date_fmt_buf[0] = 0; ret = EnumDateFormatsA(enum_datetime_procA, lcid, DATE_SHORTDATE); - ok(ret, "EnumDateFormatsA(DATE_SHORTDATE) error %d\n", GetLastError()); + ok(ret, "EnumDateFormatsA(DATE_SHORTDATE) error %ld\n", GetLastError()); trace("EnumDateFormatsA(DATE_SHORTDATE): %s\n", date_fmt_buf); /* test the 1st enumerated format */ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; ret = GetLocaleInfoA(lcid, LOCALE_SSHORTDATE, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoA(LOCALE_SSHORTDATE) error %ld\n", GetLastError()); ok(!lstrcmpA(date_fmt_buf, buf), "expected "%s" got "%s"\n", date_fmt_buf, buf);
date_fmt_buf[0] = 0; ret = EnumDateFormatsA(enum_datetime_procA, lcid, DATE_LONGDATE); - ok(ret, "EnumDateFormatsA(DATE_LONGDATE) error %d\n", GetLastError()); + ok(ret, "EnumDateFormatsA(DATE_LONGDATE) error %ld\n", GetLastError()); trace("EnumDateFormatsA(DATE_LONGDATE): %s\n", date_fmt_buf); /* test the 1st enumerated format */ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; ret = GetLocaleInfoA(lcid, LOCALE_SLONGDATE, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SLONGDATE) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoA(LOCALE_SLONGDATE) error %ld\n", GetLastError()); ok(!lstrcmpA(date_fmt_buf, buf), "expected "%s" got "%s"\n", date_fmt_buf, buf);
date_fmt_buf[0] = 0; @@ -3862,12 +3863,12 @@ static void test_EnumDateFormatsA(void) win_skip("DATE_YEARMONTH is only present on W2K and later\n"); return; } - ok(ret, "EnumDateFormatsA(DATE_YEARMONTH) error %d\n", GetLastError()); + ok(ret, "EnumDateFormatsA(DATE_YEARMONTH) error %ld\n", GetLastError()); trace("EnumDateFormatsA(DATE_YEARMONTH): %s\n", date_fmt_buf); /* test the 1st enumerated format */ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; ret = GetLocaleInfoA(lcid, LOCALE_SYEARMONTH, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_SYEARMONTH) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoA(LOCALE_SYEARMONTH) error %ld\n", GetLastError()); ok(!lstrcmpA(date_fmt_buf, buf) || broken(!buf[0]) /* win9x */, "expected "%s" got "%s"\n", date_fmt_buf, buf); } @@ -3880,22 +3881,22 @@ static void test_EnumTimeFormatsA(void)
date_fmt_buf[0] = 0; ret = EnumTimeFormatsA(enum_datetime_procA, lcid, 0); - ok(ret, "EnumTimeFormatsA(0) error %d\n", GetLastError()); + ok(ret, "EnumTimeFormatsA(0) error %ld\n", GetLastError()); trace("EnumTimeFormatsA(0): %s\n", date_fmt_buf); /* test the 1st enumerated format */ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; ret = GetLocaleInfoA(lcid, LOCALE_STIMEFORMAT, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_STIMEFORMAT) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoA(LOCALE_STIMEFORMAT) error %ld\n", GetLastError()); ok(!lstrcmpA(date_fmt_buf, buf), "expected "%s" got "%s"\n", date_fmt_buf, buf);
date_fmt_buf[0] = 0; ret = EnumTimeFormatsA(enum_datetime_procA, lcid, LOCALE_USE_CP_ACP); - ok(ret, "EnumTimeFormatsA(LOCALE_USE_CP_ACP) error %d\n", GetLastError()); + ok(ret, "EnumTimeFormatsA(LOCALE_USE_CP_ACP) error %ld\n", GetLastError()); trace("EnumTimeFormatsA(LOCALE_USE_CP_ACP): %s\n", date_fmt_buf); /* test the 1st enumerated format */ if ((p = strchr(date_fmt_buf, '\n'))) *p = 0; ret = GetLocaleInfoA(lcid, LOCALE_STIMEFORMAT, buf, sizeof(buf)); - ok(ret, "GetLocaleInfoA(LOCALE_STIMEFORMAT) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoA(LOCALE_STIMEFORMAT) error %ld\n", GetLastError()); ok(!lstrcmpA(date_fmt_buf, buf), "expected "%s" got "%s"\n", date_fmt_buf, buf); }
@@ -3907,17 +3908,17 @@ static void test_EnumTimeFormatsW(void)
date_fmt_bufW[0] = 0; ret = EnumTimeFormatsW(enum_datetime_procW, lcid, 0); - ok(ret, "EnumTimeFormatsW(0) error %d\n", GetLastError()); + ok(ret, "EnumTimeFormatsW(0) error %ld\n", GetLastError()); ret = GetLocaleInfoW(lcid, LOCALE_STIMEFORMAT, bufW, ARRAY_SIZE(bufW)); - ok(ret, "GetLocaleInfoW(LOCALE_STIMEFORMAT) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoW(LOCALE_STIMEFORMAT) error %ld\n", GetLastError()); ok(!lstrcmpW(date_fmt_bufW, bufW), "expected "%s" got "%s"\n", wine_dbgstr_w(date_fmt_bufW), wine_dbgstr_w(bufW));
date_fmt_bufW[0] = 0; ret = EnumTimeFormatsW(enum_datetime_procW, lcid, LOCALE_USE_CP_ACP); - ok(ret, "EnumTimeFormatsW(LOCALE_USE_CP_ACP) error %d\n", GetLastError()); + ok(ret, "EnumTimeFormatsW(LOCALE_USE_CP_ACP) error %ld\n", GetLastError()); ret = GetLocaleInfoW(lcid, LOCALE_STIMEFORMAT, bufW, ARRAY_SIZE(bufW)); - ok(ret, "GetLocaleInfoW(LOCALE_STIMEFORMAT) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoW(LOCALE_STIMEFORMAT) error %ld\n", GetLastError()); ok(!lstrcmpW(date_fmt_bufW, bufW), "expected "%s" got "%s"\n", wine_dbgstr_w(date_fmt_bufW), wine_dbgstr_w(bufW));
@@ -3929,24 +3930,24 @@ static void test_EnumTimeFormatsW(void) else { char buf[256];
- ok(ret, "EnumTimeFormatsW(TIME_NOSECONDS) error %d\n", GetLastError()); + ok(ret, "EnumTimeFormatsW(TIME_NOSECONDS) error %ld\n", GetLastError()); ret = GetLocaleInfoW(lcid, LOCALE_SSHORTTIME, bufW, ARRAY_SIZE(bufW)); - ok(ret, "GetLocaleInfoW(LOCALE_SSHORTTIME) error %d\n", GetLastError()); + ok(ret, "GetLocaleInfoW(LOCALE_SSHORTTIME) error %ld\n", GetLastError()); ok(!lstrcmpW(date_fmt_bufW, bufW), "expected "%s" got "%s"\n", wine_dbgstr_w(date_fmt_bufW), wine_dbgstr_w(bufW));
/* EnumTimeFormatsA doesn't support this flag */ ret = EnumTimeFormatsA(enum_datetime_procA, lcid, TIME_NOSECONDS); - ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "EnumTimeFormatsA(TIME_NOSECONDS) ret %d, error %d\n", ret, + ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "EnumTimeFormatsA(TIME_NOSECONDS) ret %d, error %ld\n", ret, GetLastError());
ret = EnumTimeFormatsA(NULL, lcid, TIME_NOSECONDS); - ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "EnumTimeFormatsA(TIME_NOSECONDS) ret %d, error %d\n", ret, + ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "EnumTimeFormatsA(TIME_NOSECONDS) ret %d, error %ld\n", ret, GetLastError());
/* And it's not supported by GetLocaleInfoA either */ ret = GetLocaleInfoA(lcid, LOCALE_SSHORTTIME, buf, ARRAY_SIZE(buf)); - ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "GetLocaleInfoA(LOCALE_SSHORTTIME) ret %d, error %d\n", ret, + ok(!ret && GetLastError() == ERROR_INVALID_FLAGS, "GetLocaleInfoA(LOCALE_SSHORTTIME) ret %d, error %ld\n", ret, GetLastError()); } } @@ -3960,7 +3961,7 @@ static void test_GetCPInfo(void) ret = GetCPInfo(CP_SYMBOL, &cpinfo); ok(!ret, "GetCPInfo(CP_SYMBOL) should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
memset(cpinfo.LeadByte, '-', ARRAY_SIZE(cpinfo.LeadByte)); SetLastError(0xdeadbeef); @@ -3973,7 +3974,7 @@ static void test_GetCPInfo(void) { unsigned int i;
- ok(ret, "GetCPInfo(CP_UTF7) error %u\n", GetLastError()); + ok(ret, "GetCPInfo(CP_UTF7) error %lu\n", GetLastError()); ok(cpinfo.DefaultChar[0] == 0x3f, "expected 0x3f, got 0x%x\n", cpinfo.DefaultChar[0]); ok(cpinfo.DefaultChar[1] == 0, "expected 0, got 0x%x\n", cpinfo.DefaultChar[1]); for (i = 0; i < sizeof(cpinfo.LeadByte); i++) @@ -3992,7 +3993,7 @@ static void test_GetCPInfo(void) { unsigned int i;
- ok(ret, "GetCPInfo(CP_UTF8) error %u\n", GetLastError()); + ok(ret, "GetCPInfo(CP_UTF8) error %lu\n", GetLastError()); ok(cpinfo.DefaultChar[0] == 0x3f, "expected 0x3f, got 0x%x\n", cpinfo.DefaultChar[0]); ok(cpinfo.DefaultChar[1] == 0, "expected 0, got 0x%x\n", cpinfo.DefaultChar[1]); for (i = 0; i < sizeof(cpinfo.LeadByte); i++) @@ -4019,18 +4020,18 @@ static void test_GetCPInfo(void) case 9: /* sortkeys */ case 13: /* unknown */ ok( status == STATUS_INVALID_PARAMETER_1 || status == STATUS_INVALID_PARAMETER_3, /* vista */ - "%u: failed %x\n", i, status ); + "%u: failed %lx\n", i, status ); break; case 10: /* casemap */ ok( status == STATUS_INVALID_PARAMETER_1 || status == STATUS_UNSUCCESSFUL, - "%u: failed %x\n", i, status ); + "%u: failed %lx\n", i, status ); break; case 11: /* codepage */ case 12: /* normalization */ - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "%u: failed %x\n", i, status ); + ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "%u: failed %lx\n", i, status ); break; default: - ok( status == STATUS_INVALID_PARAMETER_1, "%u: failed %x\n", i, status ); + ok( status == STATUS_INVALID_PARAMETER_1, "%u: failed %lx\n", i, status ); break; } } @@ -4040,15 +4041,15 @@ static void test_GetCPInfo(void) status = pNtGetNlsSectionPtr( 10, 0, NULL, &ptr, &size ); if (status != STATUS_INVALID_PARAMETER_1) { - ok( !status, "failed %x\n", status ); - ok( size > 0x1000 && size <= 0x8000 , "wrong size %lx\n", size ); + ok( !status, "failed %lx\n", status ); + ok( size > 0x1000 && size <= 0x8000 , "wrong size %Ix\n", size ); status = pNtGetNlsSectionPtr( 10, 0, NULL, &ptr2, &size ); - ok( !status, "failed %x\n", status ); + ok( !status, "failed %lx\n", status ); ok( ptr != ptr2, "got same pointer\n" ); ret = UnmapViewOfFile( ptr ); - ok( ret, "UnmapViewOfFile failed err %u\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed err %lu\n", GetLastError() ); ret = UnmapViewOfFile( ptr2 ); - ok( ret, "UnmapViewOfFile failed err %u\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed err %lu\n", GetLastError() ); }
/* codepage tables */ @@ -4056,8 +4057,8 @@ static void test_GetCPInfo(void) ptr = (void *)0xdeadbeef; size = 0xdeadbeef; status = pNtGetNlsSectionPtr( 11, 437, NULL, &ptr, &size ); - ok( !status, "failed %x\n", status ); - ok( size > 0x10000 && size <= 0x20000, "wrong size %lx\n", size ); + ok( !status, "failed %lx\n", status ); + ok( size > 0x10000 && size <= 0x20000, "wrong size %Ix\n", size ); memset( &table, 0xcc, sizeof(table) ); if (pRtlInitCodePageTable) { @@ -4068,11 +4069,11 @@ static void test_GetCPInfo(void) ok( !table.DBCSCodePage, "wrong dbcs %u\n", table.DBCSCodePage ); } ret = UnmapViewOfFile( ptr ); - ok( ret, "UnmapViewOfFile failed err %u\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed err %lu\n", GetLastError() );
status = pNtGetNlsSectionPtr( 11, 936, NULL, &ptr, &size ); - ok( !status, "failed %x\n", status ); - ok( size > 0x30000 && size <= 0x40000, "wrong size %lx\n", size ); + ok( !status, "failed %lx\n", status ); + ok( size > 0x30000 && size <= 0x40000, "wrong size %Ix\n", size ); memset( &table, 0xcc, sizeof(table) ); if (pRtlInitCodePageTable) { @@ -4099,14 +4100,14 @@ static void test_GetCPInfo(void) memset( wbuf, 0xcc, sizeof(wbuf) ); pRtlCustomCPToUnicodeN( &table, wbuf, sizeof(wbuf), &reslen, (char *)buf, i ); for (j = 0; j < 4; j++) if (expect[i][j] == 0xcccc) break; - ok( reslen == j * sizeof(WCHAR), "%u: wrong len %u\n", i, reslen ); + ok( reslen == j * sizeof(WCHAR), "%lu: wrong len %lu\n", i, reslen ); for (j = 0; j < 4; j++) - ok( wbuf[j] == expect[i][j], "%u: char %u got %04x\n", i, j, wbuf[j] ); + ok( wbuf[j] == expect[i][j], "%lu: char %lu got %04x\n", i, j, wbuf[j] ); } } } ret = UnmapViewOfFile( ptr ); - ok( ret, "UnmapViewOfFile failed err %u\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed err %lu\n", GetLastError() );
/* normalization tables */
@@ -4120,14 +4121,14 @@ static void test_GetCPInfo(void) case NormalizationKC: case NormalizationKD: case 13: /* IDN */ - ok( !status, "%u: failed %x\n", i, status ); + ok( !status, "%u: failed %lx\n", i, status ); if (status) break; - ok( size > 0x8000 && size <= 0x30000 , "wrong size %lx\n", size ); + ok( size > 0x8000 && size <= 0x30000 , "wrong size %Ix\n", size ); ret = UnmapViewOfFile( ptr ); - ok( ret, "UnmapViewOfFile failed err %u\n", GetLastError() ); + ok( ret, "UnmapViewOfFile failed err %lu\n", GetLastError() ); break; default: - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "%u: failed %x\n", i, status ); + ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "%u: failed %lx\n", i, status ); break; } } @@ -4210,17 +4211,17 @@ static void test_GetStringTypeW(void) SetLastError(0xdeadbeef); ret = GetStringTypeW(CT_CTYPE1, NULL, 0, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetStringTypeW(CT_CTYPE1, NULL, 0, types); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetStringTypeW(CT_CTYPE1, NULL, 5, types); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %ld\n", GetLastError());
memset(types,0,sizeof(types)); GetStringTypeW(CT_CTYPE1, blanks, 5, types); @@ -4359,49 +4360,49 @@ static void test_IdnToNameprepUnicode(void)
ret = pIdnToNameprepUnicode(0, test_data[0].in, test_data[0].in_len, NULL, 0); - ok(ret == test_data[0].ret, "ret = %d\n", ret); + ok(ret == test_data[0].ret, "ret = %ld\n", ret);
SetLastError(0xdeadbeef); ret = pIdnToNameprepUnicode(0, test_data[1].in, test_data[1].in_len, NULL, 0); err = GetLastError(); - ok(ret == test_data[1].ret, "ret = %d\n", ret); - ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "err = %d\n", err); + ok(ret == test_data[1].ret, "ret = %ld\n", ret); + ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "err = %ld\n", err);
SetLastError(0xdeadbeef); ret = pIdnToNameprepUnicode(0, test_data[0].in, -1, buf, ARRAY_SIZE(buf)); err = GetLastError(); - ok(ret == test_data[0].ret, "ret = %d\n", ret); - ok(err == 0xdeadbeef, "err = %d\n", err); + ok(ret == test_data[0].ret, "ret = %ld\n", ret); + ok(err == 0xdeadbeef, "err = %ld\n", err);
SetLastError(0xdeadbeef); ret = pIdnToNameprepUnicode(0, test_data[0].in, -2, buf, ARRAY_SIZE(buf)); err = GetLastError(); - ok(ret == 0, "ret = %d\n", ret); - ok(err == ERROR_INVALID_PARAMETER, "err = %d\n", err); + ok(ret == 0, "ret = %ld\n", ret); + ok(err == ERROR_INVALID_PARAMETER, "err = %ld\n", err);
SetLastError(0xdeadbeef); ret = pIdnToNameprepUnicode(0, test_data[0].in, 0, buf, ARRAY_SIZE(buf)); err = GetLastError(); - ok(ret == 0, "ret = %d\n", ret); - ok(err == ERROR_INVALID_NAME, "err = %d\n", err); + ok(ret == 0, "ret = %ld\n", ret); + ok(err == ERROR_INVALID_NAME, "err = %ld\n", err);
ret = pIdnToNameprepUnicode(IDN_ALLOW_UNASSIGNED|IDN_USE_STD3_ASCII_RULES, test_data[0].in, -1, buf, ARRAY_SIZE(buf)); - ok(ret == test_data[0].ret, "ret = %d\n", ret); + ok(ret == test_data[0].ret, "ret = %ld\n", ret);
SetLastError(0xdeadbeef); ret = pIdnToNameprepUnicode(0, NULL, 0, NULL, 0); err = GetLastError(); - ok(ret == 0, "ret = %d\n", ret); - ok(err == ERROR_INVALID_PARAMETER, "err = %d\n", err); + ok(ret == 0, "ret = %ld\n", ret); + ok(err == ERROR_INVALID_PARAMETER, "err = %ld\n", err);
SetLastError(0xdeadbeef); ret = pIdnToNameprepUnicode(4, NULL, 0, NULL, 0); err = GetLastError(); - ok(ret == 0, "ret = %d\n", ret); + ok(ret == 0, "ret = %ld\n", ret); ok(err == ERROR_INVALID_FLAGS || err == ERROR_INVALID_PARAMETER /* Win8 */, - "err = %d\n", err); + "err = %ld\n", err);
for (i=0; i<ARRAY_SIZE(test_data); i++) { @@ -4411,12 +4412,12 @@ static void test_IdnToNameprepUnicode(void) buf, ARRAY_SIZE(buf)); err = GetLastError();
- ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%d: ret = %d\n", i, ret); + ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%ld: ret = %ld\n", i, ret);
if (ret == test_data[i].ret) { - ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "%d: err = %d\n", i, err); - ok(!wcsncmp(test_data[i].out, buf, ret), "%d: buf = %s\n", i, wine_dbgstr_wn(buf, ret)); + ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "%ld: err = %ld\n", i, err); + ok(!wcsncmp(test_data[i].out, buf, ret), "%ld: buf = %s\n", i, wine_dbgstr_wn(buf, ret)); } if (pRtlNormalizeString) { @@ -4425,8 +4426,8 @@ static void test_IdnToNameprepUnicode(void) memset( buf, 0xcc, sizeof(buf) ); status = pRtlNormalizeString( 13, test_data[i].in, test_data[i].in_len, buf, &len ); ok( status == test_data[i].status || broken(status == test_data[i].broken_status), - "%d: failed %x\n", i, status ); - if (!status) ok( !wcsnicmp(test_data[i].out, buf, len), "%d: buf = %s\n", i, wine_dbgstr_wn(buf, len)); + "%ld: failed %lx\n", i, status ); + if (!status) ok( !wcsnicmp(test_data[i].out, buf, len), "%ld: buf = %s\n", i, wine_dbgstr_wn(buf, len)); } } } @@ -4470,9 +4471,9 @@ static void test_IdnToAscii(void) SetLastError(0xdeadbeef); ret = pIdnToAscii(test_data[i].flags, test_data[i].in, test_data[i].in_len, buf, ARRAY_SIZE(buf)); err = GetLastError(); - ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%d: ret = %d\n", i, ret); - ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "%d: err = %d\n", i, err); - ok(!wcsnicmp(test_data[i].out, buf, ret), "%d: buf = %s\n", i, wine_dbgstr_wn(buf, ret)); + ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%ld: ret = %ld\n", i, ret); + ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "%ld: err = %ld\n", i, err); + ok(!wcsnicmp(test_data[i].out, buf, ret), "%ld: buf = %s\n", i, wine_dbgstr_wn(buf, ret)); } }
@@ -4513,14 +4514,14 @@ static void test_IdnToUnicode(void) for (i=0; i<ARRAY_SIZE(test_data); i++) { ret = pIdnToUnicode(test_data[i].flags, test_data[i].in, test_data[i].in_len, NULL, 0); - ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%d: ret = %d\n", i, ret); + ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%ld: ret = %ld\n", i, ret);
SetLastError(0xdeadbeef); ret = pIdnToUnicode(test_data[i].flags, test_data[i].in, test_data[i].in_len, buf, ARRAY_SIZE(buf)); err = GetLastError(); - ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%d: ret = %d\n", i, ret); - ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "%d: err = %d\n", i, err); - ok(!wcsncmp(test_data[i].out, buf, ret), "%d: buf = %s\n", i, wine_dbgstr_wn(buf, ret)); + ok(ret == test_data[i].ret || broken(ret == test_data[i].broken_ret), "%ld: ret = %ld\n", i, ret); + ok(err == ret ? 0xdeadbeef : ERROR_INVALID_NAME, "%ld: err = %ld\n", i, err); + ok(!wcsncmp(test_data[i].out, buf, ret), "%ld: buf = %s\n", i, wine_dbgstr_wn(buf, ret)); } }
@@ -4657,11 +4658,11 @@ static void test_GetLocaleInfoEx(void)
SetLastError(0xdeadbeef); ret = pGetLocaleInfoEx(enW, LOCALE_SNAME, bufferW, 2); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d, %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d, %ld\n", ret, GetLastError());
SetLastError(0xdeadbeef); ret = pGetLocaleInfoEx(enW, LOCALE_SNAME, NULL, 0); - ok(ret == 3 && GetLastError() == 0xdeadbeef, "got %d, %d\n", ret, GetLastError()); + ok(ret == 3 && GetLastError() == 0xdeadbeef, "got %d, %ld\n", ret, GetLastError());
ret = pGetLocaleInfoEx(enusW, LOCALE_SNAME, bufferW, ARRAY_SIZE(bufferW)); ok(ret == lstrlenW(bufferW)+1, "got %d\n", ret); @@ -4700,13 +4701,13 @@ static void test_GetLocaleInfoEx(void) bufferW[0] = 0; SetLastError(0xdeadbeef); ret = pGetLocaleInfoEx(dummyW, LOCALE_SNAME, bufferW, ARRAY_SIZE(bufferW)); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "got %d, error %ld\n", ret, GetLastError());
while (*ptr->name) { val = 0; pGetLocaleInfoEx(ptr->name, LOCALE_ILANGUAGE|LOCALE_RETURN_NUMBER, (WCHAR*)&val, sizeof(val)/sizeof(WCHAR)); - ok(val == ptr->lcid, "%s: got wrong lcid 0x%04x, expected 0x%04x\n", wine_dbgstr_w(ptr->name), val, ptr->lcid); + ok(val == ptr->lcid, "%s: got wrong lcid 0x%04lx, expected 0x%04lx\n", wine_dbgstr_w(ptr->name), val, ptr->lcid); bufferW[0] = 0; ret = pGetLocaleInfoEx(ptr->name, LOCALE_SNAME, bufferW, ARRAY_SIZE(bufferW)); ok(ret == lstrlenW(bufferW)+1, "%s: got ret value %d\n", wine_dbgstr_w(ptr->name), ret); @@ -4779,15 +4780,15 @@ static void test_CompareStringOrdinal(void) SetLastError(0xdeadbeef); ret = pCompareStringOrdinal(NULL, 0, NULL, 0, FALSE); ok(!ret, "Got %u, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got %x, expected %x\n", GetLastError(), ERROR_INVALID_PARAMETER); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got %lx, expected %x\n", GetLastError(), ERROR_INVALID_PARAMETER); SetLastError(0xdeadbeef); ret = pCompareStringOrdinal(test1, -1, NULL, 0, FALSE); ok(!ret, "Got %u, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got %x, expected %x\n", GetLastError(), ERROR_INVALID_PARAMETER); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got %lx, expected %x\n", GetLastError(), ERROR_INVALID_PARAMETER); SetLastError(0xdeadbeef); ret = pCompareStringOrdinal(NULL, 0, test1, -1, FALSE); ok(!ret, "Got %u, expected 0\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got %x, expected %x\n", GetLastError(), ERROR_INVALID_PARAMETER); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got %lx, expected %x\n", GetLastError(), ERROR_INVALID_PARAMETER);
/* Check case */ ret = pCompareStringOrdinal(test1, -1, test1, -1, FALSE); @@ -4857,7 +4858,7 @@ static void test_GetGeoInfo(void) ret = pGetGeoInfoA(344, GEO_ISO2, NULL, 0, 0); ok(ret == 0, "got %d\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || - broken(GetLastError() == 0xdeadbeef /* Win10 */), "got %d\n", GetLastError()); + broken(GetLastError() == 0xdeadbeef /* Win10 */), "got %ld\n", GetLastError());
ret = pGetGeoInfoA(203, GEO_ISO2, NULL, 0, 0); ok(ret == 3, "got %d\n", ret); @@ -4886,7 +4887,7 @@ static void test_GetGeoInfo(void) ret = pGetGeoInfoA(203, GEO_ISO2, buffA, 2, 0); ok(ret == 0, "got %d\n", ret); ok(!strcmp(buffA, "RU"), "got %s\n", buffA); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %ld\n", GetLastError());
/* GEO_NATION returns GEOID in a string form, but only for GEOCLASS_NATION-type IDs */ ret = pGetGeoInfoA(203, GEO_NATION, buffA, 20, 0); /* GEOCLASS_NATION */ @@ -4951,16 +4952,16 @@ static void test_GetGeoInfo(void) SetLastError(0xdeadbeef); ret = pGetGeoInfoA(203, GEO_ID + 1, NULL, 0, 0); ok(ret == 0, "got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_FLAGS, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_FLAGS, "got %ld\n", GetLastError()); }
static int geoidenum_count; static BOOL CALLBACK test_geoid_enumproc(GEOID geoid) { INT ret = pGetGeoInfoA(geoid, GEO_ISO2, NULL, 0, 0); - ok(ret == 3, "got %d for %d\n", ret, geoid); + ok(ret == 3, "got %d for %ld\n", ret, geoid); /* valid geoid starts at 2 */ - ok(geoid >= 2, "got geoid %d\n", geoid); + ok(geoid >= 2, "got geoid %ld\n", geoid);
return geoidenum_count++ < 5; } @@ -4984,17 +4985,17 @@ static void test_EnumSystemGeoID(void) SetLastError(0xdeadbeef); ret = pEnumSystemGeoID(GEOCLASS_NATION, 0, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pEnumSystemGeoID(GEOCLASS_NATION+1, 0, test_geoid_enumproc); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_FLAGS, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_FLAGS, "got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pEnumSystemGeoID(GEOCLASS_NATION+1, 0, NULL); ok(!ret, "got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %ld\n", GetLastError());
ret = pEnumSystemGeoID(GEOCLASS_NATION, 0, test_geoid_enumproc); ok(ret, "got %d\n", ret); @@ -5176,7 +5177,7 @@ static void test_invariant(void) { len = strlen(ptr->expect)+1; /* include \0 */ ok(ret == len || (ptr->expect2 && ret == strlen(ptr->expect2)+1), - "For id %d, expected ret == %d, got %d, error %d\n", + "For id %d, expected ret == %d, got %d, error %ld\n", ptr->id, len, ret, GetLastError()); ok(!strcmp(buffer, ptr->expect) || (ptr->expect2 && !strcmp(buffer, ptr->expect2)), "For id %d, Expected %s, got '%s'\n", @@ -5202,16 +5203,16 @@ static void test_invariant(void)
ret = GetLocaleInfoA(LOCALE_INVARIANT, NUO|LOCALE_SLANGUAGE, buffer, sizeof(buffer)); len = lstrlenA(lang) + 1; - ok(ret == len, "Expected ret == %d, got %d, error %d\n", len, ret, GetLastError()); + ok(ret == len, "Expected ret == %d, got %d, error %ld\n", len, ret, GetLastError()); ok(!strcmp(buffer, lang), "Expected %s, got '%s'\n", lang, buffer);
ret = GetLocaleInfoA(LOCALE_INVARIANT, NUO|LOCALE_SCOUNTRY, buffer, sizeof(buffer)); len = lstrlenA(cntry) + 1; - ok(ret == len, "Expected ret == %d, got %d, error %d\n", len, ret, GetLastError()); + ok(ret == len, "Expected ret == %d, got %d, error %ld\n", len, ret, GetLastError()); ok(!strcmp(buffer, cntry), "Expected %s, got '%s'\n", cntry, buffer);
ret = GetLocaleInfoA(LOCALE_INVARIANT, NUO|LOCALE_SSORTNAME, buffer, sizeof(buffer)); - ok(ret, "Failed err %d\n", GetLastError()); + ok(ret, "Failed err %ld\n", GetLastError()); ok(!strcmp(buffer, sortm) || !strcmp(buffer, sortd) || !strcmp(buffer, sortms), "Got '%s'\n", buffer); } } @@ -5236,28 +5237,28 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(0, &count, NULL, &size); ok(ret, "Expected GetSystemPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 6 == 1, "Expected size (%d) %% 6 == 1\n", size); + ok(size % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size);
size = 0; SetLastError(0xdeadbeef); ret = pGetSystemPreferredUILanguages(MUI_FULL_LANGUAGE, &count, NULL, &size); ok(!ret, "Expected GetSystemPreferredUILanguages to fail\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected error ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected error ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
size = 0; SetLastError(0xdeadbeef); ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID | MUI_FULL_LANGUAGE, &count, NULL, &size); ok(!ret, "Expected GetSystemPreferredUILanguages to fail\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected error ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected error ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
size = 0; SetLastError(0xdeadbeef); ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID | MUI_LANGUAGE_NAME, &count, NULL, &size); ok(!ret, "Expected GetSystemPreferredUILanguages to fail\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected error ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected error ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
count = 0; size = 0; @@ -5265,7 +5266,7 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID | MUI_MACHINE_LANGUAGE_SETTINGS, &count, NULL, &size); ok(ret, "Expected GetSystemPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 5 == 1, "Expected size (%d) %% 5 == 1\n", size); + ok(size % 5 == 1, "Expected size (%ld) %% 5 == 1\n", size);
count = 0; size = 0; @@ -5273,7 +5274,7 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_NAME | MUI_MACHINE_LANGUAGE_SETTINGS, &count, NULL, &size); ok(ret, "Expected GetSystemPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 6 == 1, "Expected size (%d) %% 6 == 1\n", size); + ok(size % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size);
/* second parameter * ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, NULL, NULL, &size); @@ -5286,7 +5287,7 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &count, NULL, &size); ok(!ret, "Expected GetSystemPreferredUILanguages to fail\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected error ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected error ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* fourth parameter * ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &count, NULL, NULL); @@ -5299,7 +5300,7 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &count, NULL, &size_id); ok(ret, "Expected GetSystemPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size_id % 5 == 1, "Expected size (%d) %% 5 == 1\n", size_id); + ok(size_id % 5 == 1, "Expected size (%ld) %% 5 == 1\n", size_id);
count = 0; size_name = 0; @@ -5307,7 +5308,7 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_NAME, &count, NULL, &size_name); ok(ret, "Expected GetSystemPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size_name % 6 == 1, "Expected size (%d) %% 6 == 1\n", size_name); + ok(size_name % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size_name);
size_buffer = max(size_id, size_name); if(!size_buffer) @@ -5319,7 +5320,7 @@ static void test_GetSystemPreferredUILanguages(void) buffer = HeapAlloc(GetProcessHeap(), 0, size_buffer * sizeof(WCHAR)); if (!buffer) { - skip("Failed to allocate memory for %d chars\n", size_buffer); + skip("Failed to allocate memory for %ld chars\n", size_buffer); return; }
@@ -5330,7 +5331,7 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(0, &count, buffer, &size); ok(ret, "Expected GetSystemPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 6 == 1, "Expected size (%d) %% 6 == 1\n", size); + ok(size % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size); if (ret && size % 6 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5343,7 +5344,7 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &count, buffer, &size); ok(ret, "Expected GetSystemPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 5 == 1, "Expected size (%d) %% 5 == 1\n", size); + ok(size % 5 == 1, "Expected size (%ld) %% 5 == 1\n", size); if (ret && size % 5 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5351,7 +5352,7 @@ static void test_GetSystemPreferredUILanguages(void) for (i = 0; buffer[i]; i++) ok(('0' <= buffer[i] && buffer[i] <= '9') || ('A' <= buffer[i] && buffer[i] <= 'F'), - "MUI_LANGUAGE_ID [%d] is bad in %s\n", i, wine_dbgstr_w(buffer)); + "MUI_LANGUAGE_ID [%ld] is bad in %s\n", i, wine_dbgstr_w(buffer));
count = 0; size = size_buffer; @@ -5359,7 +5360,7 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_NAME, &count, buffer, &size); ok(ret, "Expected GetSystemPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 6 == 1, "Expected size (%d) %% 6 == 1\n", size); + ok(size % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size); if (ret && size % 5 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5371,7 +5372,7 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_MACHINE_LANGUAGE_SETTINGS, &count, NULL, &size); ok(ret, "Expected GetSystemPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 6 == 1, "Expected size (%d) %% 6 == 1\n", size); + ok(size % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size); if (ret && size % 6 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5382,9 +5383,9 @@ static void test_GetSystemPreferredUILanguages(void) size = size_buffer; memset(buffer, 0x5a, size_buffer * sizeof(WCHAR)); status = pRtlGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, 0, &count, buffer, &size); - ok(!status, "got %x\n", status); + ok(!status, "got %lx\n", status); ok(count, "Expected count > 0\n"); - ok(size % 5 == 1, "Expected size (%d) %% 5 == 1\n", size); + ok(size % 5 == 1, "Expected size (%ld) %% 5 == 1\n", size); if (ret && size % 5 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5393,9 +5394,9 @@ static void test_GetSystemPreferredUILanguages(void) count = 0; size = size_buffer; status = pRtlGetSystemPreferredUILanguages(MUI_LANGUAGE_NAME, 0, &count, buffer, &size); - ok(!status, "got %x\n", status); + ok(!status, "got %lx\n", status); ok(count, "Expected count > 0\n"); - ok(size % 6 == 1, "Expected size (%d) %% 6 == 1\n", size); + ok(size % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size); if (ret && size % 5 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5404,9 +5405,9 @@ static void test_GetSystemPreferredUILanguages(void) count = 0; size = 0; status = pRtlGetSystemPreferredUILanguages(MUI_MACHINE_LANGUAGE_SETTINGS, 0, &count, NULL, &size); - ok(!status, "got %x\n", status); + ok(!status, "got %lx\n", status); ok(count, "Expected count > 0\n"); - ok(size % 6 == 1, "Expected size (%d) %% 6 == 1\n", size); + ok(size % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size); if (ret && size % 6 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5417,16 +5418,16 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &count, buffer, &size); ok(!ret, "Expected GetSystemPreferredUILanguages to fail\n"); ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(size == size_id, "expected %u, got %u\n", size_id, size); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(size == size_id, "expected %lu, got %lu\n", size_id, size);
size = 1; SetLastError(0xdeadbeef); ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &count, buffer, &size); ok(!ret, "Expected GetSystemPreferredUILanguages to fail\n"); ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(size == size_id, "expected %u, got %u\n", size_id, size); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(size == size_id, "expected %lu, got %lu\n", size_id, size);
size = size_id -1; memset(buffer, 0x5a, size_buffer * sizeof(WCHAR)); @@ -5434,8 +5435,8 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &count, buffer, &size); ok(!ret, "Expected GetSystemPreferredUILanguages to fail\n"); ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(size == size_id, "expected %u, got %u\n", size_id, size); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(size == size_id, "expected %lu, got %lu\n", size_id, size);
size = size_id -2; memset(buffer, 0x5a, size_buffer * sizeof(WCHAR)); @@ -5443,8 +5444,8 @@ static void test_GetSystemPreferredUILanguages(void) ret = pGetSystemPreferredUILanguages(0, &count, buffer, &size); ok(!ret, "Expected GetSystemPreferredUILanguages to fail\n"); ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(size == size_id + 2 || size == size_id + 1 /* before win10 1809 */, "expected %u, got %u\n", size_id + 2, size); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(size == size_id + 2 || size == size_id + 1 /* before win10 1809 */, "expected %lu, got %lu\n", size_id + 2, size);
HeapFree(GetProcessHeap(), 0, buffer); } @@ -5464,19 +5465,19 @@ static void test_GetThreadPreferredUILanguages(void)
size = count = 0; ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID|MUI_UI_FALLBACK, &count, NULL, &size); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); ok(count, "expected count > 0\n"); ok(size, "expected size > 0\n");
count = 0; buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size * sizeof(WCHAR)); ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID|MUI_UI_FALLBACK, &count, buf, &size); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); ok(count, "expected count > 0\n");
size_id = count = 0; ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID, &count, NULL, &size_id); - ok(ret, "got %u\n", GetLastError()); + ok(ret, "got %lu\n", GetLastError()); ok(count, "expected count > 0\n"); ok(size_id, "expected size > 0\n"); ok(size_id <= size, "expected size > 0\n"); @@ -5484,7 +5485,7 @@ static void test_GetThreadPreferredUILanguages(void) /* ntdll function is the same */ size_id = count = 0; status = pRtlGetThreadPreferredUILanguages(MUI_LANGUAGE_ID, &count, NULL, &size_id); - ok(!status, "got %x\n", status); + ok(!status, "got %lx\n", status); ok(count, "expected count > 0\n"); ok(size_id, "expected size > 0\n"); ok(size_id <= size, "expected size > 0\n"); @@ -5494,33 +5495,33 @@ static void test_GetThreadPreferredUILanguages(void) ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID, &count, buf, &size); ok(!ret, "Expected GetThreadPreferredUILanguages to fail\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(size == size_id, "expected %u, got %u\n", size_id, size); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(size == size_id, "expected %lu, got %lu\n", size_id, size);
size = 1; SetLastError(0xdeadbeef); ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID, &count, buf, &size); ok(!ret, "Expected GetThreadPreferredUILanguages to fail\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(size == size_id, "expected %u, got %u\n", size_id, size); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(size == size_id, "expected %lu, got %lu\n", size_id, size);
size = size_id - 1; SetLastError(0xdeadbeef); ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID, &count, buf, &size); ok(!ret, "Expected GetThreadPreferredUILanguages to fail\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); - ok(size == size_id, "expected %u, got %u\n", size_id, size); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); + ok(size == size_id, "expected %lu, got %lu\n", size_id, size);
size = size_id - 2; SetLastError(0xdeadbeef); ret = pGetThreadPreferredUILanguages(0, &count, buf, &size); ok(!ret, "Expected GetThreadPreferredUILanguages to fail\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); todo_wine - ok(size == size_id || size == size_id - 1 /* before win10 1809 */, "expected %u, got %u\n", size_id, size); + ok(size == size_id || size == size_id - 1 /* before win10 1809 */, "expected %lu, got %lu\n", size_id, size);
HeapFree(GetProcessHeap(), 0, buf); } @@ -5543,28 +5544,28 @@ static void test_GetUserPreferredUILanguages(void) ret = pGetUserPreferredUILanguages(MUI_FULL_LANGUAGE, &count, NULL, &size); ok(!ret, "Expected GetUserPreferredUILanguages to fail\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected error ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected error ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
size = 0; SetLastError(0xdeadbeef); ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID | MUI_FULL_LANGUAGE, &count, NULL, &size); ok(!ret, "Expected GetUserPreferredUILanguages to fail\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected error ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected error ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
size = 0; SetLastError(0xdeadbeef); ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID | MUI_MACHINE_LANGUAGE_SETTINGS, &count, NULL, &size); ok(!ret, "Expected GetUserPreferredUILanguages to fail\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected error ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected error ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
size = 1; SetLastError(0xdeadbeef); ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID, &count, NULL, &size); ok(!ret, "Expected GetUserPreferredUILanguages to fail\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected error ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected error ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
count = 0; size_id = 0; @@ -5572,7 +5573,7 @@ static void test_GetUserPreferredUILanguages(void) ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID, &count, NULL, &size_id); ok(ret, "Expected GetUserPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size_id % 5 == 1, "Expected size (%d) %% 5 == 1\n", size_id); + ok(size_id % 5 == 1, "Expected size (%ld) %% 5 == 1\n", size_id);
count = 0; size_name = 0; @@ -5580,7 +5581,7 @@ static void test_GetUserPreferredUILanguages(void) ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &count, NULL, &size_name); ok(ret, "Expected GetUserPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size_name % 6 == 1, "Expected size (%d) %% 6 == 1\n", size_name); + ok(size_name % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size_name);
size_buffer = max(size_id, size_name); if(!size_buffer) @@ -5594,9 +5595,9 @@ static void test_GetUserPreferredUILanguages(void) size_id = 0; SetLastError(0xdeadbeef); status = pRtlGetUserPreferredUILanguages(MUI_LANGUAGE_ID, 0, &count, NULL, &size_id); - ok(!status, "got %x\n", status); + ok(!status, "got %lx\n", status); ok(count, "Expected count > 0\n"); - ok(size_id % 5 == 1, "Expected size (%d) %% 5 == 1\n", size_id); + ok(size_id % 5 == 1, "Expected size (%ld) %% 5 == 1\n", size_id);
buffer = HeapAlloc(GetProcessHeap(), 0, size_buffer * sizeof(WCHAR));
@@ -5607,7 +5608,7 @@ static void test_GetUserPreferredUILanguages(void) ret = pGetUserPreferredUILanguages(0, &count, buffer, &size); ok(ret, "Expected GetUserPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 6 == 1, "Expected size (%d) %% 6 == 1\n", size); + ok(size % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size); if (ret && size % 6 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5620,7 +5621,7 @@ static void test_GetUserPreferredUILanguages(void) ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID, &count, buffer, &size); ok(ret, "Expected GetUserPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 5 == 1, "Expected size (%d) %% 5 == 1\n", size); + ok(size % 5 == 1, "Expected size (%ld) %% 5 == 1\n", size); if (ret && size % 5 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5632,7 +5633,7 @@ static void test_GetUserPreferredUILanguages(void) ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &count, buffer, &size); ok(ret, "Expected GetUserPreferredUILanguages to succeed\n"); ok(count, "Expected count > 0\n"); - ok(size % 6 == 1, "Expected size (%d) %% 6 == 1\n", size); + ok(size % 6 == 1, "Expected size (%ld) %% 6 == 1\n", size); if (ret && size % 5 == 1) ok(!buffer[size -2] && !buffer[size -1], "Expected last two WCHARs being empty, got 0x%x 0x%x\n", @@ -5643,7 +5644,7 @@ static void test_GetUserPreferredUILanguages(void) ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID, &count, buffer, &size); ok(!ret, "Expected GetUserPreferredUILanguages to fail\n"); ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
size = size_id -1; memset(buffer, 0x5a, size_buffer * sizeof(WCHAR)); @@ -5651,7 +5652,7 @@ static void test_GetUserPreferredUILanguages(void) ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID, &count, buffer, &size); ok(!ret, "Expected GetUserPreferredUILanguages to fail\n"); ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
count = 0; size = size_id -2; @@ -5660,7 +5661,7 @@ static void test_GetUserPreferredUILanguages(void) ret = pGetUserPreferredUILanguages(0, &count, buffer, &size); ok(!ret, "Expected GetUserPreferredUILanguages to fail\n"); ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), - "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected error ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, buffer); } @@ -5717,35 +5718,35 @@ static void test_FindNLSStringEx(void) 3, NULL, NULL, NULL, 0); ok(res, "Expected failure of FindNLSStringEx. Return value was %d\n", res); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected ERROR_INVALID_PARAMETER as last error; got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER as last error; got %ld\n", GetLastError());
SetLastError( 0xdeadbeef ); res = pFindNLSStringEx(localeW, FIND_FROMSTART, NULL, 3, fooW, 3, NULL, NULL, NULL, 0); ok(res, "Expected failure of FindNLSStringEx. Return value was %d\n", res); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected ERROR_INVALID_PARAMETER as last error; got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER as last error; got %ld\n", GetLastError());
SetLastError( 0xdeadbeef ); res = pFindNLSStringEx(localeW, FIND_FROMSTART, fooW, -5, fooW, 3, NULL, NULL, NULL, 0); ok(res, "Expected failure of FindNLSStringEx. Return value was %d\n", res); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected ERROR_INVALID_PARAMETER as last error; got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER as last error; got %ld\n", GetLastError());
SetLastError( 0xdeadbeef ); res = pFindNLSStringEx(localeW, FIND_FROMSTART, fooW, 3, NULL, 3, NULL, NULL, NULL, 0); ok(res, "Expected failure of FindNLSStringEx. Return value was %d\n", res); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected ERROR_INVALID_PARAMETER as last error; got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER as last error; got %ld\n", GetLastError());
SetLastError( 0xdeadbeef ); res = pFindNLSStringEx(localeW, FIND_FROMSTART, fooW, 3, fooW, -5, NULL, NULL, NULL, 0); ok(res, "Expected failure of FindNLSStringEx. Return value was %d\n", res); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "Expected ERROR_INVALID_PARAMETER as last error; got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER as last error; got %ld\n", GetLastError());
for (ptest = test_arr; ptest->src != NULL; ptest++) { @@ -5840,7 +5841,7 @@ static void test_FindStringOrdinal(void) tests[i].ignore_case); err = GetLastError(); ok(ret == tests[i].ret, "Item %d expected %d, got %d\n", i, tests[i].ret, ret); - ok(err == tests[i].err, "Item %d expected %#x, got %#x\n", i, tests[i].err, err); + ok(err == tests[i].err, "Item %d expected %#lx, got %#lx\n", i, tests[i].err, err); } }
@@ -6070,11 +6071,11 @@ static void test_NormalizeString(void) dstlen = pNormalizeString( norm_forms[i], ptest->str, -1, NULL, 0 ); ok( dstlen > lstrlenW(ptest->str), "%s:%d: wrong len %d / %d\n", wine_dbgstr_w(ptest->str), i, dstlen, lstrlenW(ptest->str) ); - ok(GetLastError() == ERROR_SUCCESS, "%s:%d: got error %u\n", + ok(GetLastError() == ERROR_SUCCESS, "%s:%d: got error %lu\n", wine_dbgstr_w(ptest->str), i, GetLastError()); SetLastError(0xdeadbeef); dstlen = pNormalizeString( norm_forms[i], ptest->str, -1, dst, dstlen ); - ok(GetLastError() == ERROR_SUCCESS, "%s:%d: got error %u\n", + ok(GetLastError() == ERROR_SUCCESS, "%s:%d: got error %lu\n", wine_dbgstr_w(ptest->str), i, GetLastError()); ok(dstlen == lstrlenW( dst )+1, "%s:%d: Copied length differed: was %d, should be %d\n", wine_dbgstr_w(ptest->str), i, dstlen, lstrlenW( dst )+1); @@ -6095,12 +6096,12 @@ static void test_NormalizeString(void) { dstlen = 0; status = pRtlNormalizeString( norm_forms[i], ptest->str, lstrlenW(ptest->str), NULL, &dstlen ); - ok( !status, "%s:%d: failed %x\n", wine_dbgstr_w(ptest->str), i, status ); + ok( !status, "%s:%d: failed %lx\n", wine_dbgstr_w(ptest->str), i, status ); ok( dstlen > lstrlenW(ptest->str), "%s:%d: wrong len %d / %d\n", wine_dbgstr_w(ptest->str), i, dstlen, lstrlenW(ptest->str) ); memset(dst, 0, sizeof(dst)); status = pRtlNormalizeString( norm_forms[i], ptest->str, lstrlenW(ptest->str), dst, &dstlen ); - ok( !status, "%s:%d: failed %x\n", wine_dbgstr_w(ptest->str), i, status ); + ok( !status, "%s:%d: failed %lx\n", wine_dbgstr_w(ptest->str), i, status ); ok(dstlen == lstrlenW( dst ), "%s:%d: Copied length differed: was %d, should be %d\n", wine_dbgstr_w(ptest->str), i, dstlen, lstrlenW( dst )); str_cmp = wcsncmp( ptest->expected[i], dst, dstlen ); @@ -6108,14 +6109,14 @@ static void test_NormalizeString(void) wine_dbgstr_w(dst), wine_dbgstr_w(ptest->expected[i]) ); ret = FALSE; status = pRtlIsNormalizedString( norm_forms[i], ptest->str, -1, &ret ); - ok( !status, "%s:%d: failed %x\n", wine_dbgstr_w(ptest->str), i, status ); + ok( !status, "%s:%d: failed %lx\n", wine_dbgstr_w(ptest->str), i, status ); if (!wcscmp( ptest->str, dst )) ok( ret, "%s:%d: not normalized\n", wine_dbgstr_w(ptest->str), i ); else ok( !ret, "%s:%d: normalized (dst %s)\n", wine_dbgstr_w(ptest->str), i, wine_dbgstr_w(dst) ); ret = FALSE; status = pRtlIsNormalizedString( norm_forms[i], dst, dstlen, &ret ); - ok( !status, "%s:%d: failed %x\n", wine_dbgstr_w(ptest->str), i, status ); + ok( !status, "%s:%d: failed %lx\n", wine_dbgstr_w(ptest->str), i, status ); ok( ret, "%s:%d: not normalized\n", wine_dbgstr_w(ptest->str), i ); } } @@ -6127,32 +6128,32 @@ static void test_NormalizeString(void) SetLastError(0xdeadbeef); dstlen = pNormalizeString( NormalizationD, part0_str1, -1, dst, 1 ); ok( dstlen <= 0, "wrong len %d\n", dstlen ); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); dstlen = pNormalizeString( NormalizationC, part0_str2, -1, dst, 1 ); ok( dstlen <= 0, "wrong len %d\n", dstlen ); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); dstlen = pNormalizeString( NormalizationC, part0_str2, -1, NULL, 0 ); ok( dstlen == 12, "wrong len %d\n", dstlen ); - ok(GetLastError() == ERROR_SUCCESS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); dstlen = pNormalizeString( NormalizationC, part0_str2, -1, dst, 3 ); ok( dstlen == 3, "wrong len %d\n", dstlen ); - ok(GetLastError() == ERROR_SUCCESS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); dstlen = pNormalizeString( NormalizationC, part0_str2, 0, NULL, 0 ); ok( dstlen == 0, "wrong len %d\n", dstlen ); - ok(GetLastError() == ERROR_SUCCESS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); dstlen = pNormalizeString( NormalizationC, part0_str2, 0, dst, 3 ); ok( dstlen == 0, "wrong len %d\n", dstlen ); - ok(GetLastError() == ERROR_SUCCESS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "got error %lu\n", GetLastError());
/* size estimations */
@@ -6169,7 +6170,7 @@ static void test_NormalizeString(void) { dstlen = 0; status = pRtlNormalizeString( norm_forms[i], dst, j, NULL, &dstlen ); - ok( !status, "%d: failed %x\n", i, status ); + ok( !status, "%d: failed %lx\n", i, status ); ok( dstlen == expect, "%d: %d -> wrong len %d\n", i, j, dstlen ); } } @@ -6184,28 +6185,28 @@ static void test_NormalizeString(void) if (i == 0 || i == 2) { ok( dstlen == srclen, "%d: wrong len %d\n", i, dstlen ); - ok(GetLastError() == ERROR_SUCCESS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "got error %lu\n", GetLastError()); } else { ok( dstlen < -expect, "%d: wrong len %d\n", i, dstlen ); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got error %lu\n", GetLastError()); } if (pRtlNormalizeString) { dstlen = 0; status = pRtlNormalizeString( norm_forms[i], composite_src, srclen, NULL, &dstlen ); - ok( !status, "%d: failed %x\n", i, status ); + ok( !status, "%d: failed %lx\n", i, status ); ok( dstlen == expect, "%d: wrong len %d\n", i, dstlen ); status = pRtlNormalizeString( norm_forms[i], composite_src, srclen, dst, &dstlen ); if (i == 0 || i == 2) { - ok( !status, "%d: failed %x\n", i, status ); + ok( !status, "%d: failed %lx\n", i, status ); ok( dstlen == srclen, "%d: wrong len %d\n", i, dstlen ); } else { - ok( status == STATUS_BUFFER_TOO_SMALL, "%d: failed %x\n", i, status ); + ok( status == STATUS_BUFFER_TOO_SMALL, "%d: failed %lx\n", i, status ); ok( dstlen > expect, "%d: wrong len %d\n", i, dstlen ); } } @@ -6225,11 +6226,11 @@ static void test_NormalizeString(void) case NormalizationKD: case 13: /* Idn */ ok( dstlen > 0, "%d: wrong len %d\n", i, dstlen ); - ok( GetLastError() == ERROR_SUCCESS, "%d: got error %u\n", i, GetLastError()); + ok( GetLastError() == ERROR_SUCCESS, "%d: got error %lu\n", i, GetLastError()); break; default: ok( dstlen <= 0, "%d: wrong len %d\n", i, dstlen ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "%d: got error %u\n", i, GetLastError()); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "%d: got error %lu\n", i, GetLastError()); break; } if (pRtlNormalizeString) @@ -6239,17 +6240,17 @@ static void test_NormalizeString(void) switch (i) { case 0: - ok( status == STATUS_INVALID_PARAMETER, "%d: failed %x\n", i, status ); + ok( status == STATUS_INVALID_PARAMETER, "%d: failed %lx\n", i, status ); break; case NormalizationC: case NormalizationD: case NormalizationKC: case NormalizationKD: case 13: /* Idn */ - ok( status == STATUS_SUCCESS, "%d: failed %x\n", i, status ); + ok( status == STATUS_SUCCESS, "%d: failed %lx\n", i, status ); break; default: - ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "%d: failed %x\n", i, status ); + ok( status == STATUS_OBJECT_NAME_NOT_FOUND, "%d: failed %lx\n", i, status ); break; } } @@ -6264,38 +6265,38 @@ static void test_NormalizeString(void) SetLastError( 0xdeadbeef ); dstlen = pNormalizeString( norm_forms[i], L"AB\xd800Z", -1, dst, ARRAY_SIZE(dst) ); ok( dstlen == -3, "%d: wrong len %d\n", i, dstlen ); - ok( GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%d: wrong error %d\n", i, GetLastError() ); + ok( GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%d: wrong error %ld\n", i, GetLastError() ); dstlen = pNormalizeString( norm_forms[i], L"ABCD\xdc12Z", -1, NULL, 0 ); ok( dstlen == (i < 2 ? 21 : 64), "%d: wrong len %d\n", i, dstlen ); SetLastError( 0xdeadbeef ); dstlen = pNormalizeString( norm_forms[i], L"ABCD\xdc12Z", -1, dst, ARRAY_SIZE(dst) ); ok( dstlen == -4, "%d: wrong len %d\n", i, dstlen ); - ok( GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%d: wrong error %d\n", i, GetLastError() ); + ok( GetLastError() == ERROR_NO_UNICODE_TRANSLATION, "%d: wrong error %ld\n", i, GetLastError() ); SetLastError( 0xdeadbeef ); dstlen = pNormalizeString( norm_forms[i], L"ABCD\xdc12Z", -1, dst, 2 ); todo_wine ok( dstlen == (i < 2 ? -18 : -74), "%d: wrong len %d\n", i, dstlen ); todo_wine_if (i == 0 || i == 2) - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "%d: wrong error %d\n", i, GetLastError() ); + ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "%d: wrong error %ld\n", i, GetLastError() ); if (pRtlNormalizeString) { dstlen = 0; status = pRtlNormalizeString( norm_forms[i], L"AB\xd800Z", -1, NULL, &dstlen ); - ok( !status, "%d: failed %x\n", i, status ); + ok( !status, "%d: failed %lx\n", i, status ); ok( dstlen == (i < 2 ? 15 : 64), "%d: wrong len %d\n", i, dstlen ); dstlen = ARRAY_SIZE(dst); status = pRtlNormalizeString( norm_forms[i], L"AB\xd800Z", -1, dst, &dstlen ); - ok( status == STATUS_NO_UNICODE_TRANSLATION, "%d: failed %x\n", i, status ); + ok( status == STATUS_NO_UNICODE_TRANSLATION, "%d: failed %lx\n", i, status ); ok( dstlen == 3, "%d: wrong len %d\n", i, dstlen ); dstlen = 1; status = pRtlNormalizeString( norm_forms[i], L"AB\xd800Z", -1, dst, &dstlen ); todo_wine_if( i == 0 || i == 2) - ok( status == STATUS_BUFFER_TOO_SMALL, "%d: failed %x\n", i, status ); + ok( status == STATUS_BUFFER_TOO_SMALL, "%d: failed %lx\n", i, status ); todo_wine_if( i != 3) ok( dstlen == (i < 2 ? 14 : 73), "%d: wrong len %d\n", i, dstlen ); dstlen = 2; status = pRtlNormalizeString( norm_forms[i], L"AB\xd800Z", -1, dst, &dstlen ); - ok( status == STATUS_NO_UNICODE_TRANSLATION, "%d: failed %x\n", i, status ); + ok( status == STATUS_NO_UNICODE_TRANSLATION, "%d: failed %lx\n", i, status ); ok( dstlen == 3, "%d: wrong len %d\n", i, dstlen ); } } @@ -6343,14 +6344,14 @@ static void test_NormalizeString(void)
ret = FALSE; status = pRtlIsNormalizedString( norm_forms[i], srcW, -1, &ret ); - ok( !status, "line %u form %u: RtlIsNormalizedString failed %x\n", line, i, status ); + ok( !status, "line %u form %u: RtlIsNormalizedString failed %lx\n", line, i, status ); if (!wcscmp( srcW, dstW )) ok( ret, "line %u form %u: source not normalized %s\n", line, i, wine_dbgstr_w(srcW) ); else ok( !ret, "line %u form %u: source normalized %s\n", line, i, wine_dbgstr_w(srcW) ); ret = FALSE; status = pRtlIsNormalizedString( norm_forms[i], dstW, -1, &ret ); - ok( !status, "line %u form %u: RtlIsNormalizedString failed %x\n", line, i, status ); + ok( !status, "line %u form %u: RtlIsNormalizedString failed %lx\n", line, i, status ); ok( ret, "line %u form %u: dest not normalized %s\n", line, i, wine_dbgstr_w(dstW) );
for (j = 0; j < 4; j++) @@ -6383,10 +6384,10 @@ static void test_NormalizeString(void) ok( dstlen <= 0, "char %04x form %u: wrong result %d %s expected error\n", ch, i, dstlen, wine_dbgstr_w( dstW )); ok( GetLastError() == ERROR_NO_UNICODE_TRANSLATION, - "char %04x form %u: error %u\n", str[0], i, GetLastError() ); + "char %04x form %u: error %lu\n", str[0], i, GetLastError() ); status = pRtlIsNormalizedString( norm_forms[i], str, -1, &ret ); ok( status == STATUS_NO_UNICODE_TRANSLATION, - "char %04x form %u: failed %x\n", ch, i, status ); + "char %04x form %u: failed %lx\n", ch, i, status ); } else { @@ -6395,7 +6396,7 @@ static void test_NormalizeString(void) ch, i, wine_dbgstr_w( dstW )); ret = FALSE; status = pRtlIsNormalizedString( norm_forms[i], str, -1, &ret ); - ok( !status, "char %04x form %u: failed %x\n", ch, i, status ); + ok( !status, "char %04x form %u: failed %lx\n", ch, i, status ); ok( ret, "char %04x form %u: not normalized\n", ch, i ); } } @@ -6604,7 +6605,7 @@ static void test_NLSVersion(void) info.dwNLSVersionInfoSize = offsetof( NLSVERSIONINFO, dwEffectiveId ); ret = pGetNLSVersion( COMPARE_STRING, MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), (NLSVERSIONINFO *)&info ); - ok( ret, "GetNLSVersion failed err %u\n", GetLastError() ); + ok( ret, "GetNLSVersion failed err %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); memset( &info, 0xcc, sizeof(info) ); @@ -6612,11 +6613,11 @@ static void test_NLSVersion(void) ret = pGetNLSVersion( COMPARE_STRING, MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), (NLSVERSIONINFO *)&info ); ok( ret || GetLastError() == ERROR_INSUFFICIENT_BUFFER /* < Vista */, - "GetNLSVersion failed err %u\n", GetLastError() ); + "GetNLSVersion failed err %lu\n", GetLastError() ); if (ret) { ok( info.dwEffectiveId == MAKELANGID( LANG_FRENCH, SUBLANG_FRENCH_CANADIAN ), - "wrong id %x\n", info.dwEffectiveId ); + "wrong id %lx\n", info.dwEffectiveId ); ok( IsEqualIID( &info.guidCustomVersion, &guid_fr ) || broken( IsEqualIID( &info.guidCustomVersion, &guid_null )), /* <= win7 */ "wrong guid %s\n", debugstr_guid(&info.guidCustomVersion) ); @@ -6626,7 +6627,7 @@ static void test_NLSVersion(void) info.dwNLSVersionInfoSize = 8; ret = pGetNLSVersion( COMPARE_STRING, LOCALE_USER_DEFAULT, (NLSVERSIONINFO *)&info ); ok( !ret, "GetNLSVersion succeeded\n" ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = sizeof(info); @@ -6634,13 +6635,13 @@ static void test_NLSVersion(void) ok( !ret, "GetNLSVersion succeeded\n" ); ok( GetLastError() == ERROR_INVALID_FLAGS || broken( GetLastError() == ERROR_INSUFFICIENT_BUFFER ), /* win2003 */ - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = sizeof(info); ret = pGetNLSVersion( COMPARE_STRING, 0xdeadbeef, (NLSVERSIONINFO *)&info ); ok( !ret, "GetNLSVersion succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
if (pGetNLSVersionEx) { @@ -6648,13 +6649,13 @@ static void test_NLSVersion(void) memset( &info, 0xcc, sizeof(info) ); info.dwNLSVersionInfoSize = sizeof(info); ret = pGetNLSVersionEx( COMPARE_STRING, L"ja-JP", &info ); - ok( ret, "GetNLSVersionEx failed err %u\n", GetLastError() ); + ok( ret, "GetNLSVersionEx failed err %lu\n", GetLastError() ); ok( info.dwEffectiveId == MAKELANGID( LANG_JAPANESE, SUBLANG_JAPANESE_JAPAN ), - "wrong id %x\n", info.dwEffectiveId ); + "wrong id %lx\n", info.dwEffectiveId ); ok( IsEqualIID( &info.guidCustomVersion, &guid_ja ) || broken( IsEqualIID( &info.guidCustomVersion, &guid_null )), /* <= win7 */ "wrong guid %s\n", debugstr_guid(&info.guidCustomVersion) ); - trace( "version %08x %08x %08x %s\n", info.dwNLSVersion, info.dwDefinedVersion, info.dwEffectiveId, + trace( "version %08lx %08lx %08lx %s\n", info.dwNLSVersion, info.dwDefinedVersion, info.dwEffectiveId, debugstr_guid(&info.guidCustomVersion) );
SetLastError( 0xdeadbeef ); @@ -6665,7 +6666,7 @@ static void test_NLSVersion(void) if (ret) { ok( info.dwEffectiveId == MAKELANGID( LANG_FRENCH, SUBLANG_DEFAULT ), - "wrong id %x\n", info.dwEffectiveId ); + "wrong id %lx\n", info.dwEffectiveId ); ok( IsEqualIID( &info.guidCustomVersion, &guid_fr ) || broken( IsEqualIID( &info.guidCustomVersion, &guid_null )), /* <= win7 */ "wrong guid %s\n", debugstr_guid(&info.guidCustomVersion) ); @@ -6675,36 +6676,36 @@ static void test_NLSVersion(void) info.dwNLSVersionInfoSize = sizeof(info) - 1; ret = pGetNLSVersionEx( COMPARE_STRING, L"en-US", &info ); ok( !ret, "GetNLSVersionEx succeeded\n" ); - ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); memset( &info, 0xcc, sizeof(info) ); info.dwNLSVersionInfoSize = offsetof( NLSVERSIONINFO, dwEffectiveId ); ret = pGetNLSVersionEx( COMPARE_STRING, L"en-US", &info ); - ok( ret, "GetNLSVersionEx failed err %u\n", GetLastError() ); - ok( info.dwEffectiveId == 0xcccccccc, "wrong id %x\n", info.dwEffectiveId ); + ok( ret, "GetNLSVersionEx failed err %lu\n", GetLastError() ); + ok( info.dwEffectiveId == 0xcccccccc, "wrong id %lx\n", info.dwEffectiveId );
SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = sizeof(info); ret = pGetNLSVersionEx( 2, L"en-US", &info ); ok( !ret, "GetNLSVersionEx succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_FLAGS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_FLAGS, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = sizeof(info); ret = pGetNLSVersionEx( COMPARE_STRING, L"foobar", &info ); ok( !ret, "GetNLSVersionEx succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); memset( &info, 0xcc, sizeof(info) ); info.dwNLSVersionInfoSize = sizeof(info); ret = pGetNLSVersionEx( COMPARE_STRING, L"zz-XX", &info ); - if (!ret) ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + if (!ret) ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); ok( !ret == !pIsValidLocaleName(L"zz-XX"), "GetNLSVersionEx doesn't match IsValidLocaleName\n" ); if (ret) { - ok( info.dwEffectiveId == LOCALE_CUSTOM_UNSPECIFIED, "wrong id %x\n", info.dwEffectiveId ); + ok( info.dwEffectiveId == LOCALE_CUSTOM_UNSPECIFIED, "wrong id %lx\n", info.dwEffectiveId ); ok( IsEqualIID( &info.guidCustomVersion, &guid_def ), "wrong guid %s\n", debugstr_guid(&info.guidCustomVersion) ); } @@ -6713,15 +6714,15 @@ static void test_NLSVersion(void) memset( &info, 0xcc, sizeof(info) ); info.dwNLSVersionInfoSize = sizeof(info); ret = pGetNLSVersionEx( COMPARE_STRING, LOCALE_NAME_INVARIANT, &info ); - ok( ret, "GetNLSVersionEx failed err %u\n", GetLastError() ); + ok( ret, "GetNLSVersionEx failed err %lu\n", GetLastError() ); if (ret) { - ok( info.dwEffectiveId == LOCALE_INVARIANT, "wrong id %x\n", info.dwEffectiveId ); + ok( info.dwEffectiveId == LOCALE_INVARIANT, "wrong id %lx\n", info.dwEffectiveId ); ok( IsEqualIID( &info.guidCustomVersion, &guid_def ) || broken( IsEqualIID( &info.guidCustomVersion, &guid_null )), /* <= win7 */ "wrong guid %s\n", debugstr_guid(&info.guidCustomVersion) ); } - else ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + else ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); } else win_skip( "GetNLSVersionEx not available\n" );
@@ -6733,73 +6734,73 @@ static void test_NLSVersion(void) SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = sizeof(info); ret = pIsValidNLSVersion( COMPARE_STRING, L"ja-JP", &info ); - ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); - ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + ok( ret, "IsValidNLSVersion failed err %lu\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = offsetof( NLSVERSIONINFO, dwEffectiveId ); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); - ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); - ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + ok( ret, "IsValidNLSVersion failed err %lu\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = sizeof(info); ret = pIsValidNLSVersion( 2, L"en-US", &info ); ok( !ret, "IsValidNLSVersion succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); info.dwNLSVersionInfoSize = sizeof(info); ret = pIsValidNLSVersion( COMPARE_STRING, L"foobar", &info ); ok( !ret, "IsValidNLSVersion succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); memset( &info, 0xcc, sizeof(info) ); info.dwNLSVersionInfoSize = sizeof(info); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); ok( !ret, "IsValidNLSVersion succeeded\n" ); - ok( GetLastError() == ERROR_SUCCESS, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_SUCCESS, "wrong error %lu\n", GetLastError() );
info.dwNLSVersionInfoSize = sizeof(info); pGetNLSVersion( COMPARE_STRING, LOCALE_USER_DEFAULT, (NLSVERSIONINFO *)&info ); info.dwNLSVersion++; SetLastError( 0xdeadbeef ); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); - ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); - ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + ok( ret, "IsValidNLSVersion failed err %lu\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError() );
info.dwNLSVersion += 0x100; SetLastError( 0xdeadbeef ); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); ok( !ret, "IsValidNLSVersion succeeded\n" ); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == 0, "wrong error %lu\n", GetLastError() );
info.dwNLSVersion -= 0x800; SetLastError( 0xdeadbeef ); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); ok( !ret, "IsValidNLSVersion succeeded\n" ); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == 0, "wrong error %lu\n", GetLastError() );
info.dwNLSVersion += 0x700; info.dwDefinedVersion += 0x100; SetLastError( 0xdeadbeef ); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); - ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); - ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + ok( ret, "IsValidNLSVersion failed err %lu\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError() );
info.dwDefinedVersion -= 0x100; info.guidCustomVersion.Data1 = 0x123; SetLastError( 0xdeadbeef ); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); ok( !ret, "IsValidNLSVersion succeeded\n" ); - ok( GetLastError() == 0, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == 0, "wrong error %lu\n", GetLastError() );
info.guidCustomVersion = guid_null; SetLastError( 0xdeadbeef ); ret = pIsValidNLSVersion( COMPARE_STRING, L"en-US", &info ); - ok( ret, "IsValidNLSVersion failed err %u\n", GetLastError() ); - ok( GetLastError() == 0xdeadbeef, "wrong error %u\n", GetLastError() ); + ok( ret, "IsValidNLSVersion failed err %lu\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "wrong error %lu\n", GetLastError() ); } else win_skip( "IsValidNLSVersion not available\n" ); } @@ -6822,7 +6823,7 @@ static void test_geo_name(void) }
status = RegOpenKeyExA(HKEY_CURRENT_USER, "Control Panel\International\Geo", 0, KEY_READ | KEY_WRITE, &key); - ok(status == ERROR_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == ERROR_SUCCESS, "Got unexpected status %#lx.\n", status);
size = sizeof(reg_name); if (!RegQueryValueExW(key, L"Name", NULL, &type, (BYTE *)reg_name, &size)) @@ -6837,7 +6838,7 @@ static void test_geo_name(void) if (have_name) { status = RegSetValueExW(key, L"Name", 0, REG_SZ, (BYTE *)reg_name, (lstrlenW(reg_name) + 1) * sizeof(*reg_name)); - ok(status == ERROR_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == ERROR_SUCCESS, "Got unexpected status %#lx.\n", status); } else { @@ -6856,136 +6857,136 @@ static void test_geo_name(void)
SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(NULL, 0); - ok((ret == 3 || ret == 4) && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok((ret == 3 || ret == 4) && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); name_size = ret;
SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, 0); - ok(ret >= 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(ret >= 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError());
SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, 2); - ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError());
SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(NULL, 1); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError());
SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(NULL, name_size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError());
SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, name_size); - ok(ret == name_size && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(ret == name_size && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"QQ"), "Got unexpected name %s.\n", wine_dbgstr_w(buf));
SetLastError(0xdeadbeef); bret = pSetUserGeoName(NULL); - ok(!bret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + ok(!bret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
lstrcpyW(set_name, L"QQ"); SetLastError(0xdeadbeef); bret = pSetUserGeoName(set_name); - ok(!bret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + ok(!bret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
lstrcpyW(set_name, L"Xx"); SetLastError(0xdeadbeef); bret = pSetUserGeoName(set_name); ok((bret && GetLastError() == 0xdeadbeef) || broken(bret && GetLastError() == 0), - "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, ARRAY_SIZE(buf)); - ok(ret == 4 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(ret == 4 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"001"), "Got unexpected name %s.\n", wine_dbgstr_w(buf)); geoid = GetUserGeoID(GEOCLASS_REGION); - ok(geoid == 39070, "Got unexpected geoid %u.\n", geoid); + ok(geoid == 39070, "Got unexpected geoid %lu.\n", geoid); size = sizeof(buf); status = RegQueryValueExW(key, L"Name", NULL, &type, (BYTE *)buf, &size); - ok(status == ERROR_SUCCESS, "Got unexpected status %#x.\n", status); - ok(type == REG_SZ, "Got unexpected type %#x.\n", type); + ok(status == ERROR_SUCCESS, "Got unexpected status %#lx.\n", status); + ok(type == REG_SZ, "Got unexpected type %#lx.\n", type); ok(!lstrcmpW(buf, L"001"), "Got unexpected name %s.\n", wine_dbgstr_w(buf));
lstrcpyW(set_name, L"ar"); SetLastError(0xdeadbeef); bret = pSetUserGeoName(set_name); ok((bret && GetLastError() == 0xdeadbeef) || broken(bret && GetLastError() == 0), - "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError()); ret = pGetUserDefaultGeoName(buf, ARRAY_SIZE(buf)); ok((ret == 3 && GetLastError() == 0xdeadbeef) || broken(ret == 3 && GetLastError() == 0), - "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"AR"), "Got unexpected name %s.\n", wine_dbgstr_w(buf)); geoid = GetUserGeoID(GEOCLASS_NATION); - ok(geoid == 11, "Got unexpected geoid %u.\n", geoid); + ok(geoid == 11, "Got unexpected geoid %lu.\n", geoid);
lstrcpyW(set_name, L"150"); SetLastError(0xdeadbeef); bret = pSetUserGeoName(set_name); ok((bret && GetLastError() == 0xdeadbeef) || broken(bret && GetLastError() == 0), - "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError()); ret = pGetUserDefaultGeoName(buf, ARRAY_SIZE(buf)); ok((ret == 4 && GetLastError() == 0xdeadbeef) || broken(ret == 4 && GetLastError() == 0), - "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"150"), "Got unexpected name %s.\n", wine_dbgstr_w(buf)); geoid = GetUserGeoID(GEOCLASS_NATION); - ok(geoid == 11, "Got unexpected geoid %u.\n", geoid); + ok(geoid == 11, "Got unexpected geoid %lu.\n", geoid);
lstrcpyW(set_name, L"150a"); SetLastError(0xdeadbeef); bret = pSetUserGeoName(set_name); - ok(!bret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + ok(!bret && GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError());
bret = SetUserGeoID(21242); - ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError()); SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, ARRAY_SIZE(buf)); - ok(ret == 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(ret == 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"XX"), "Got unexpected name %s.\n", wine_dbgstr_w(buf));
bret = SetUserGeoID(42483); - ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError()); SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, ARRAY_SIZE(buf)); - ok(ret == 4 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(ret == 4 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"011"), "Got unexpected name %s.\n", wine_dbgstr_w(buf));
bret = SetUserGeoID(333); - ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + ok(bret, "Got unexpected bret %#x, GetLastError() %lu.\n", bret, GetLastError()); SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, ARRAY_SIZE(buf)); - ok(ret == 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(ret == 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"AN"), "Got unexpected name %s.\n", wine_dbgstr_w(buf));
RegDeleteValueW(key, L"Name"); RegDeleteValueW(key, L"Region"); lstrcpyW(buf, L"124"); status = RegSetValueExW(key, L"Nation", 0, REG_SZ, (BYTE *)buf, (lstrlenW(buf) + 1) * sizeof(*buf)); - ok(status == ERROR_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == ERROR_SUCCESS, "Got unexpected status %#lx.\n", status); SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, ARRAY_SIZE(buf)); - ok(ret == 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(ret == 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"JM"), "Got unexpected name %s.\n", wine_dbgstr_w(buf));
lstrcpyW(buf, L"333"); status = RegSetValueExW(key, L"Region", 0, REG_SZ, (BYTE *)buf, (lstrlenW(buf) + 1) * sizeof(*buf)); - ok(status == ERROR_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == ERROR_SUCCESS, "Got unexpected status %#lx.\n", status); SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, ARRAY_SIZE(buf)); - ok(ret == 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(ret == 3 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"JM"), "Got unexpected name %s.\n", wine_dbgstr_w(buf));
RegDeleteValueW(key, L"Nation"); SetLastError(0xdeadbeef); ret = pGetUserDefaultGeoName(buf, ARRAY_SIZE(buf)); - ok(ret == 4 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %u.\n", ret, GetLastError()); + ok(ret == 4 && GetLastError() == 0xdeadbeef, "Got unexpected ret %u, GetLastError() %lu.\n", ret, GetLastError()); ok(!lstrcmpW(buf, L"001"), "Got unexpected name %s.\n", wine_dbgstr_w(buf));
/* Restore user geo data. */ if (have_name) { status = RegSetValueExW(key, L"Name", 0, REG_SZ, (BYTE *)reg_name, (lstrlenW(reg_name) + 1) * sizeof(*reg_name)); - ok(status == ERROR_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == ERROR_SUCCESS, "Got unexpected status %#lx.\n", status); } else { @@ -6994,7 +6995,7 @@ static void test_geo_name(void) if (have_nation) { status = RegSetValueExW(key, L"Nation", 0, REG_SZ, (BYTE *)nation, (lstrlenW(nation) + 1) * sizeof(*nation)); - ok(status == ERROR_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == ERROR_SUCCESS, "Got unexpected status %#lx.\n", status); } else { @@ -7003,7 +7004,7 @@ static void test_geo_name(void) if (have_region) { status = RegSetValueExW(key, L"Region", 0, REG_SZ, (BYTE *)region, (lstrlenW(region) + 1) * sizeof(*region)); - ok(status == ERROR_SUCCESS, "Got unexpected status %#x.\n", status); + ok(status == ERROR_SUCCESS, "Got unexpected status %#lx.\n", status); } else { @@ -7053,7 +7054,7 @@ static void test_EnumCalendarInfoA(void)
ret = EnumCalendarInfoA( calinfo_procA, LOCALE_USER_DEFAULT, ENUM_ALL_CALENDARS, CAL_RETURN_NUMBER | CAL_ICALINTVALUE ); - ok( ret, "EnumCalendarInfoA for user default locale failed: %u\n", GetLastError() ); + ok( ret, "EnumCalendarInfoA for user default locale failed: %lu\n", GetLastError() );
for (i = 0; i < ARRAY_SIZE( locales_with_optional_calendars ); i++) { @@ -7061,7 +7062,7 @@ static void test_EnumCalendarInfoA(void) ret = EnumCalendarInfoA( calinfo_procA, lcid, ENUM_ALL_CALENDARS, CAL_RETURN_NUMBER | CAL_ICALINTVALUE ); ok( ret || broken( GetLastError() == ERROR_INVALID_FLAGS ) /* no locale */, - "EnumCalendarInfoA for LCID %#06x failed: %u\n", lcid, GetLastError() ); + "EnumCalendarInfoA for LCID %#06lx failed: %lu\n", lcid, GetLastError() ); } }
@@ -7078,7 +7079,7 @@ static void test_EnumCalendarInfoW(void)
ret = EnumCalendarInfoW( calinfo_procW, LOCALE_USER_DEFAULT, ENUM_ALL_CALENDARS, CAL_RETURN_NUMBER | CAL_ICALINTVALUE ); - ok( ret, "EnumCalendarInfoW for user default locale failed: %u\n", GetLastError() ); + ok( ret, "EnumCalendarInfoW for user default locale failed: %lu\n", GetLastError() );
for (i = 0; i < ARRAY_SIZE( locales_with_optional_calendars ); i++) { @@ -7086,7 +7087,7 @@ static void test_EnumCalendarInfoW(void) ret = EnumCalendarInfoW( calinfo_procW, lcid, ENUM_ALL_CALENDARS, CAL_RETURN_NUMBER | CAL_ICALINTVALUE ); ok( ret || broken( GetLastError() == ERROR_INVALID_FLAGS ) /* no locale */, - "EnumCalendarInfoW for LCID %#06x failed: %u\n", lcid, GetLastError() ); + "EnumCalendarInfoW for LCID %#06lx failed: %lu\n", lcid, GetLastError() ); } }
@@ -7104,7 +7105,7 @@ static void test_EnumCalendarInfoExA(void)
ret = EnumCalendarInfoExA( calinfoex_procA, LOCALE_USER_DEFAULT, ENUM_ALL_CALENDARS, CAL_RETURN_NUMBER | CAL_ICALINTVALUE ); - ok( ret, "EnumCalendarInfoExA for user default locale failed: %u\n", GetLastError() ); + ok( ret, "EnumCalendarInfoExA for user default locale failed: %lu\n", GetLastError() );
for (i = 0; i < ARRAY_SIZE( locales_with_optional_calendars ); i++) { @@ -7112,7 +7113,7 @@ static void test_EnumCalendarInfoExA(void) ret = EnumCalendarInfoExA( calinfoex_procA, lcid, ENUM_ALL_CALENDARS, CAL_RETURN_NUMBER | CAL_ICALINTVALUE ); ok( ret || broken( GetLastError() == ERROR_INVALID_FLAGS ) /* no locale */, - "EnumCalendarInfoExA for LCID %#06x failed: %u\n", lcid, GetLastError() ); + "EnumCalendarInfoExA for LCID %#06lx failed: %lu\n", lcid, GetLastError() ); } }
@@ -7130,7 +7131,7 @@ static void test_EnumCalendarInfoExW(void)
ret = EnumCalendarInfoExW( calinfoex_procW, LOCALE_USER_DEFAULT, ENUM_ALL_CALENDARS, CAL_RETURN_NUMBER | CAL_ICALINTVALUE ); - ok( ret, "EnumCalendarInfoExW for user default locale failed: %u\n", GetLastError() ); + ok( ret, "EnumCalendarInfoExW for user default locale failed: %lu\n", GetLastError() );
for (i = 0; i < ARRAY_SIZE( locales_with_optional_calendars ); i++) { @@ -7138,7 +7139,7 @@ static void test_EnumCalendarInfoExW(void) ret = EnumCalendarInfoExW( calinfoex_procW, lcid, ENUM_ALL_CALENDARS, CAL_RETURN_NUMBER | CAL_ICALINTVALUE ); ok( ret || broken( GetLastError() == ERROR_INVALID_FLAGS ) /* no locale */, - "EnumCalendarInfoExW for LCID %#06x failed: %u\n", lcid, GetLastError() ); + "EnumCalendarInfoExW for LCID %#06lx failed: %lu\n", lcid, GetLastError() ); } }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/module.c | 285 +++++++++++++++++++++--------------------- 1 file changed, 143 insertions(+), 142 deletions(-)
diff --git a/dlls/kernel32/tests/module.c b/dlls/kernel32/tests/module.c index 6d44b50e122..027669f5e07 100644 --- a/dlls/kernel32/tests/module.c +++ b/dlls/kernel32/tests/module.c @@ -17,6 +17,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdio.h> #include "ntstatus.h" @@ -134,7 +135,7 @@ static void create_test_dll( const char *name ) DWORD dummy; HANDLE handle = CreateFileA( name, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, 0 );
- ok( handle != INVALID_HANDLE_VALUE, "failed to create file err %u\n", GetLastError() ); + ok( handle != INVALID_HANDLE_VALUE, "failed to create file err %lu\n", GetLastError() ); WriteFile( handle, &dll_image, sizeof(dll_image), &dummy, NULL ); SetFilePointer( handle, dll_image.nt.OptionalHeader.SizeOfImage, NULL, FILE_BEGIN ); SetEndOfFile( handle ); @@ -156,7 +157,7 @@ static void testGetModuleFileName(const char* name) len1A = GetModuleFileNameA(hMod, bufA, sizeof(bufA)); ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef), /* <= XP SP3 */ - "LastError was not reset: %u\n", GetLastError()); + "LastError was not reset: %lu\n", GetLastError()); ok(len1A > 0, "Getting module filename for handle %p\n", hMod);
if (is_unicode_enabled) @@ -166,15 +167,15 @@ static void testGetModuleFileName(const char* name) len1W = GetModuleFileNameW(hMod, bufW, ARRAY_SIZE(bufW)); ok(GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef), /* <= XP SP3 */ - "LastError was not reset: %u\n", GetLastError()); + "LastError was not reset: %lu\n", GetLastError()); ok(len1W > 0, "Getting module filename for handle %p\n", hMod); }
- ok(len1A == strlen(bufA), "Unexpected length of GetModuleFilenameA (%d/%d)\n", len1A, lstrlenA(bufA)); + ok(len1A == strlen(bufA), "Unexpected length of GetModuleFilenameA (%ld/%d)\n", len1A, lstrlenA(bufA));
if (is_unicode_enabled) { - ok(len1W == lstrlenW(bufW), "Unexpected length of GetModuleFilenameW (%d/%d)\n", len1W, lstrlenW(bufW)); + ok(len1W == lstrlenW(bufW), "Unexpected length of GetModuleFilenameW (%ld/%d)\n", len1W, lstrlenW(bufW)); ok(cmpStrAW(bufA, bufW, len1A, len1W), "Comparing GetModuleFilenameAW results\n"); }
@@ -189,11 +190,11 @@ static void testGetModuleFileName(const char* name) len2W = GetModuleFileNameW(hMod, bufW, len1W / 2); ok(len2W > 0, "Getting module filename for handle %p\n", hMod); ok(cmpStrAW(bufA, bufW, len2A, len2W), "Comparing GetModuleFilenameAW results with buffer too small\n" ); - ok(len1W / 2 == len2W, "Correct length in GetModuleFilenameW with buffer too small (%d/%d)\n", len1W / 2, len2W); + ok(len1W / 2 == len2W, "Correct length in GetModuleFilenameW with buffer too small (%ld/%ld)\n", len1W / 2, len2W); }
ok(len1A / 2 == len2A, - "Correct length in GetModuleFilenameA with buffer too small (%d/%d)\n", len1A / 2, len2A); + "Correct length in GetModuleFilenameA with buffer too small (%ld/%ld)\n", len1A / 2, len2A);
len1A = GetModuleFileNameA(hMod, bufA, 0x10000); ok(len1A > 0, "Getting module filename for handle %p\n", hMod); @@ -228,16 +229,16 @@ static void testLoadLibraryA(void) SetLastError(0xdeadbeef); hModule = LoadLibraryA("kernel32.dll"); ok( hModule != NULL, "kernel32.dll should be loadable\n"); - ok( GetLastError() == 0xdeadbeef, "GetLastError should be 0xdeadbeef but is %d\n", GetLastError()); + ok( GetLastError() == 0xdeadbeef, "GetLastError should be 0xdeadbeef but is %ld\n", GetLastError());
fp = GetProcAddress(hModule, "CreateFileA"); ok( fp != NULL, "CreateFileA should be there\n"); - ok( GetLastError() == 0xdeadbeef, "GetLastError should be 0xdeadbeef but is %d\n", GetLastError()); + ok( GetLastError() == 0xdeadbeef, "GetLastError should be 0xdeadbeef but is %ld\n", GetLastError());
SetLastError(0xdeadbeef); hModule1 = LoadLibraryA("kernel32 "); ok( hModule1 != NULL, ""kernel32 " should be loadable\n" ); - ok( GetLastError() == 0xdeadbeef, "GetLastError should be 0xdeadbeef but is %d\n", GetLastError() ); + ok( GetLastError() == 0xdeadbeef, "GetLastError should be 0xdeadbeef but is %ld\n", GetLastError() ); ok( hModule == hModule1, "Loaded wrong module\n" ); FreeLibrary(hModule1); FreeLibrary(hModule); @@ -302,7 +303,7 @@ static void testLoadLibraryA_Wrong(void) SetLastError(0xdeadbeef); hModule = LoadLibraryA("non_ex_pv.dll"); ok( !hModule, "non_ex_pv.dll should be not loadable\n"); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "Expected ERROR_MOD_NOT_FOUND, got %d\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "Expected ERROR_MOD_NOT_FOUND, got %ld\n", GetLastError() );
/* Just in case */ FreeLibrary(hModule); @@ -315,12 +316,12 @@ static void testGetProcAddress_Wrong(void) SetLastError(0xdeadbeef); fp = GetProcAddress(NULL, "non_ex_call"); ok( !fp, "non_ex_call should not be found\n"); - ok( GetLastError() == ERROR_PROC_NOT_FOUND, "Expected ERROR_PROC_NOT_FOUND, got %d\n", GetLastError() ); + ok( GetLastError() == ERROR_PROC_NOT_FOUND, "Expected ERROR_PROC_NOT_FOUND, got %ld\n", GetLastError() );
SetLastError(0xdeadbeef); fp = GetProcAddress((HMODULE)0xdeadbeef, "non_ex_call"); ok( !fp, "non_ex_call should not be found\n"); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "Expected ERROR_MOD_NOT_FOUND, got %d\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "Expected ERROR_MOD_NOT_FOUND, got %ld\n", GetLastError() ); }
static void testLoadLibraryEx(void) @@ -341,7 +342,7 @@ static void testLoadLibraryEx(void) ok(hmodule == 0, "Expected 0, got %p\n", hmodule); ok(GetLastError() == ERROR_MOD_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* empty lpFileName */ SetLastError(0xdeadbeef); @@ -349,7 +350,7 @@ static void testLoadLibraryEx(void) ok(hmodule == 0, "Expected 0, got %p\n", hmodule); ok(GetLastError() == ERROR_MOD_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER /* win8 */, - "Expected ERROR_MOD_NOT_FOUND or ERROR_DLL_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_MOD_NOT_FOUND or ERROR_DLL_NOT_FOUND, got %ld\n", GetLastError());
/* hFile is non-NULL */ SetLastError(0xdeadbeef); @@ -357,21 +358,21 @@ static void testLoadLibraryEx(void) ok(hmodule == 0, "Expected 0, got %p\n", hmodule); ok(GetLastError() == ERROR_SHARING_VIOLATION || GetLastError() == ERROR_INVALID_PARAMETER, /* win2k3 */ - "Unexpected last error, got %d\n", GetLastError()); + "Unexpected last error, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); hmodule = LoadLibraryExA("testfile.dll", (HANDLE)0xdeadbeef, 0); ok(hmodule == 0, "Expected 0, got %p\n", hmodule); ok(GetLastError() == ERROR_SHARING_VIOLATION || GetLastError() == ERROR_INVALID_PARAMETER, /* win2k3 */ - "Unexpected last error, got %d\n", GetLastError()); + "Unexpected last error, got %ld\n", GetLastError());
/* try to open a file that is locked */ SetLastError(0xdeadbeef); hmodule = LoadLibraryExA("testfile.dll", NULL, 0); ok(hmodule == 0, "Expected 0, got %p\n", hmodule); ok(GetLastError() == ERROR_SHARING_VIOLATION, - "Expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + "Expected ERROR_SHARING_VIOLATION, got %ld\n", GetLastError());
/* lpFileName does not matter */ if (is_unicode_enabled) @@ -381,7 +382,7 @@ static void testLoadLibraryEx(void) ok(hmodule == 0, "Expected 0, got %p\n", hmodule); ok(GetLastError() == ERROR_MOD_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER, /* win2k3 */ - "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); }
CloseHandle(hfile); @@ -390,7 +391,7 @@ static void testLoadLibraryEx(void) SetLastError(0xdeadbeef); hmodule = LoadLibraryExA("testfile.dll", NULL, LOAD_LIBRARY_AS_DATAFILE); ok(hmodule == 0, "Expected 0, got %p\n", hmodule); - ok(GetLastError() == ERROR_FILE_INVALID, "Expected ERROR_FILE_INVALID, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_INVALID, "Expected ERROR_FILE_INVALID, got %ld\n", GetLastError());
DeleteFileA("testfile.dll");
@@ -405,13 +406,13 @@ static void testLoadLibraryEx(void) ok(hmodule != 0, "Expected valid module handle\n"); ok(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_SUCCESS, - "Expected 0xdeadbeef or ERROR_SUCCESS, got %d\n", GetLastError()); + "Expected 0xdeadbeef or ERROR_SUCCESS, got %ld\n", GetLastError());
/* try invalid file handle */ SetLastError(0xdeadbeef); hmodule = LoadLibraryExA(path, (HANDLE)0xdeadbeef, 0); if (!hmodule) /* succeeds on xp and older */ - ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError());
FreeLibrary(hmodule);
@@ -419,7 +420,7 @@ static void testLoadLibraryEx(void) SetLastError(0xdeadbeef); hmodule = LoadLibraryExA("kernel32.dll", NULL, LOAD_LIBRARY_AS_DATAFILE); ok(hmodule != 0, "Expected valid module handle\n"); - ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
FreeLibrary(hmodule);
@@ -433,7 +434,7 @@ static void testLoadLibraryEx(void) hmodule = LoadLibraryExA(path, NULL, LOAD_LIBRARY_AS_DATAFILE); ok(hmodule == 0, "Expected 0, got %p\n", hmodule); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
/* Free the loaded dll when it's the first time this dll is loaded in process - First time should pass, second fail */ @@ -444,14 +445,14 @@ static void testLoadLibraryEx(void) SetLastError(0xdeadbeef); ret = FreeLibrary( (HMODULE)((ULONG_PTR)hmodule + 0x1230)); ok(!ret, "Free succeeded on wrong handle\n"); - ok(GetLastError() == ERROR_BAD_EXE_FORMAT, "wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_BAD_EXE_FORMAT, "wrong error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = FreeLibrary(hmodule); - ok(ret, "Expected to be able to free the module, failed with %d\n", GetLastError()); + ok(ret, "Expected to be able to free the module, failed with %ld\n", GetLastError()); SetLastError(0xdeadbeef); ret = FreeLibrary(hmodule); - ok(!ret, "Unexpected ability to free the module, failed with %d\n", GetLastError()); + ok(!ret, "Unexpected ability to free the module, failed with %ld\n", GetLastError());
/* load with full path, name without extension */ GetSystemDirectoryA(path, MAX_PATH); @@ -499,13 +500,13 @@ static void test_LoadLibraryEx_search_flags(void) GetTempFileNameA( path, "tmp", 0, buf ); DeleteFileA( buf ); ret = CreateDirectoryA( buf, NULL ); - ok( ret, "CreateDirectory failed err %u\n", GetLastError() ); + ok( ret, "CreateDirectory failed err %lu\n", GetLastError() ); p = buf + strlen( buf ); for (i = 1; i <= 6; i++) { sprintf( p, "\%u", i ); ret = CreateDirectoryA( buf, NULL ); - ok( ret, "CreateDirectory failed err %u\n", GetLastError() ); + ok( ret, "CreateDirectory failed err %lu\n", GetLastError() ); if (i >= 5) continue; /* dirs 5 and 6 are left empty */ sprintf( p, "\%u\winetestdll.dll", i ); create_test_dll( buf ); @@ -517,13 +518,13 @@ static void test_LoadLibraryEx_search_flags(void)
SetLastError( 0xdeadbeef ); mod = LoadLibraryA( "1\winetestdll.dll" ); - ok( mod != NULL, "LoadLibrary failed err %u\n", GetLastError() ); + ok( mod != NULL, "LoadLibrary failed err %lu\n", GetLastError() ); FreeLibrary( mod );
SetLastError( 0xdeadbeef ); sprintf( path, "%c:1\winetestdll.dll", buf[0] ); mod = LoadLibraryA( path ); - ok( mod != NULL, "LoadLibrary failed err %u\n", GetLastError() ); + ok( mod != NULL, "LoadLibrary failed err %lu\n", GetLastError() ); FreeLibrary( mod );
if (pAddDllDirectory) @@ -531,11 +532,11 @@ static void test_LoadLibraryEx_search_flags(void) SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "1\winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_SYSTEM32 ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32 ); - ok( mod != NULL, "LoadLibrary failed err %u\n", GetLastError() ); + ok( mod != NULL, "LoadLibrary failed err %lu\n", GetLastError() ); FreeLibrary( mod ); }
@@ -544,21 +545,21 @@ static void test_LoadLibraryEx_search_flags(void)
SetLastError( 0xdeadbeef ); mod = LoadLibraryA( "winetestdll.dll" ); - ok( mod != NULL, "LoadLibrary failed err %u\n", GetLastError() ); + ok( mod != NULL, "LoadLibrary failed err %lu\n", GetLastError() ); FreeLibrary( mod );
SetLastError( 0xdeadbeef ); sprintf( path, "%c:winetestdll.dll", buf[0] ); mod = LoadLibraryA( path ); ok( mod != NULL || broken(!mod), /* win10 disallows this but allows c:1\winetestdll.dll */ - "LoadLibrary failed err %u\n", GetLastError() ); - if (!mod) ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + "LoadLibrary failed err %lu\n", GetLastError() ); + if (!mod) ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() ); else FreeLibrary( mod );
SetLastError( 0xdeadbeef ); sprintf( path, "%s\winetestdll.dll", buf + 2 ); mod = LoadLibraryA( path ); - ok( mod != NULL, "LoadLibrary failed err %u\n", GetLastError() ); + ok( mod != NULL, "LoadLibrary failed err %lu\n", GetLastError() ); FreeLibrary( mod );
if (pAddDllDirectory) @@ -566,43 +567,43 @@ static void test_LoadLibraryEx_search_flags(void) SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_SYSTEM32 ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32 ); - ok( mod != NULL, "LoadLibrary failed err %u\n", GetLastError() ); + ok( mod != NULL, "LoadLibrary failed err %lu\n", GetLastError() ); FreeLibrary( mod );
SetLastError( 0xdeadbeef ); sprintf( path, "%s\winetestdll.dll", buf + 2 ); mod = LoadLibraryExA( path, 0, LOAD_LIBRARY_SEARCH_SYSTEM32 ); - ok( mod != NULL, "LoadLibrary failed err %u\n", GetLastError() ); + ok( mod != NULL, "LoadLibrary failed err %lu\n", GetLastError() ); FreeLibrary( mod );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_APPLICATION_DIR | LOAD_WITH_ALTERED_SEARCH_PATH ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_WITH_ALTERED_SEARCH_PATH ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_SYSTEM32 | LOAD_WITH_ALTERED_SEARCH_PATH ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_WITH_ALTERED_SEARCH_PATH ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_USER_DIRS | LOAD_WITH_ALTERED_SEARCH_PATH ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); }
SetCurrentDirectoryA( curdir ); @@ -612,7 +613,7 @@ static void test_LoadLibraryEx_search_flags(void) SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_APPLICATION_DIR ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() );
if (0) /* crashes on win10 */ { @@ -620,38 +621,38 @@ static void test_LoadLibraryEx_search_flags(void) mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_USER_DIRS ); ok( !mod, "LoadLibrary succeeded\n" ); ok( GetLastError() == ERROR_MOD_NOT_FOUND || broken(GetLastError() == ERROR_NOT_ENOUGH_MEMORY), - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); }
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_SYSTEM32 ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32 ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "foo\winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "\windows\winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); mod = LoadLibraryA( "1\winetestdll.dll" ); ok( !mod, "LoadLibrary succeeded\n" ); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() );
for (j = 0; j < ARRAY_SIZE(tests); j++) { @@ -673,7 +674,7 @@ static void test_LoadLibraryEx_search_flags(void) mod = LoadLibraryExA( "winetestdll.dll", 0, LOAD_LIBRARY_SEARCH_USER_DIRS ); if (tests[j].expect) { - ok( mod != NULL, "%u: LoadLibrary failed err %u\n", j, GetLastError() ); + ok( mod != NULL, "%u: LoadLibrary failed err %lu\n", j, GetLastError() ); GetModuleFileNameA( mod, path, MAX_PATH ); sprintf( p, "\%u\winetestdll.dll", tests[j].expect ); ok( !lstrcmpiA( path, buf ), "%u: wrong module %s expected %s\n", j, path, buf ); @@ -682,7 +683,7 @@ static void test_LoadLibraryEx_search_flags(void) { ok( !mod, "%u: LoadLibrary succeeded\n", j ); ok( GetLastError() == ERROR_MOD_NOT_FOUND || broken(GetLastError() == ERROR_NOT_ENOUGH_MEMORY), - "%u: wrong error %u\n", j, GetLastError() ); + "%u: wrong error %lu\n", j, GetLastError() ); } FreeLibrary( mod );
@@ -705,12 +706,12 @@ static void test_LoadLibraryEx_search_flags(void)
FreeLibrary(mod); mod = LoadLibraryExA( apiset_dll, NULL, LOAD_LIBRARY_SEARCH_APPLICATION_DIR ); - ok( !!mod, "Got NULL module, error %u.\n", GetLastError() ); + ok( !!mod, "Got NULL module, error %lu.\n", GetLastError() ); ok( !!GetModuleHandleA( apiset_dll ), "Got NULL handle.\n" ); shcore = GetModuleHandleA( "shcore.dll" ); ok( mod == shcore, "wrong module %p/%p\n", mod, shcore ); ret = FreeLibrary( mod ); - ok( ret, "FreeLibrary failed, error %u.\n", GetLastError() ); + ok( ret, "FreeLibrary failed, error %lu.\n", GetLastError() ); shcore = GetModuleHandleA( "shcore.dll" ); ok( !shcore, "shcore not unloaded\n" );
@@ -718,12 +719,12 @@ static void test_LoadLibraryEx_search_flags(void) strcpy( buffer, apiset_dll ); buffer[strlen(buffer) - 4] = 0; mod = LoadLibraryExA( buffer, NULL, LOAD_LIBRARY_SEARCH_APPLICATION_DIR ); - ok( !!mod, "Got NULL module, error %u.\n", GetLastError() ); + ok( !!mod, "Got NULL module, error %lu.\n", GetLastError() ); ok( !!GetModuleHandleA( apiset_dll ), "Got NULL handle.\n" ); shcore = GetModuleHandleA( "shcore.dll" ); ok( mod == shcore, "wrong module %p/%p\n", mod, shcore ); ret = FreeLibrary( mod ); - ok( ret, "FreeLibrary failed, error %u.\n", GetLastError() ); + ok( ret, "FreeLibrary failed, error %lu.\n", GetLastError() ); shcore = GetModuleHandleA( "shcore.dll" ); ok( !shcore, "shcore not unloaded\n" );
@@ -731,14 +732,14 @@ static void test_LoadLibraryEx_search_flags(void) strcpy( buffer, apiset_dll ); buffer[strlen(buffer) - 5] = '9'; mod = LoadLibraryExA( buffer, NULL, LOAD_LIBRARY_SEARCH_APPLICATION_DIR ); - ok( !!mod || broken(!mod) /* win8 */, "Got NULL module, error %u.\n", GetLastError() ); + ok( !!mod || broken(!mod) /* win8 */, "Got NULL module, error %lu.\n", GetLastError() ); if (mod) { ok( !!GetModuleHandleA( apiset_dll ), "Got NULL handle.\n" ); shcore = GetModuleHandleA( "shcore.dll" ); ok( mod == shcore, "wrong module %p/%p\n", mod, shcore ); ret = FreeLibrary( mod ); - ok( ret, "FreeLibrary failed, error %u.\n", GetLastError() ); + ok( ret, "FreeLibrary failed, error %lu.\n", GetLastError() ); } shcore = GetModuleHandleA( "shcore.dll" ); ok( !shcore, "shcore not unloaded\n" ); @@ -750,11 +751,11 @@ static void test_LoadLibraryEx_search_flags(void) SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( buffer, NULL, LOAD_LIBRARY_SEARCH_APPLICATION_DIR ); ok( !mod, "Loaded %s\n", debugstr_a(buffer) ); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); mod = LoadLibraryA( buffer ); ok( !mod, "Loaded %s\n", debugstr_a(buffer) ); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() ); } else { @@ -765,20 +766,20 @@ static void test_LoadLibraryEx_search_flags(void) mod = GetModuleHandleA( "rasapi32.dll" ); ok( !mod, "rasapi32 already loaded\n" ); mod = LoadLibraryA( "rasapi32.dll" ); - ok( !!mod, "rasapi32 not found %u\n", GetLastError() ); + ok( !!mod, "rasapi32 not found %lu\n", GetLastError() ); FreeLibrary( mod ); SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "rasapi32.dll", NULL, LOAD_LIBRARY_SEARCH_APPLICATION_DIR ); ok( !mod, "rasapi32 loaded\n" ); - ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); mod = LoadLibraryExA( "ext-ms-win-ras-rasapi32-l1-1-0.dll", NULL, LOAD_LIBRARY_SEARCH_APPLICATION_DIR ); todo_wine /* rasapi32 doesn't have interesting dependencies on wine */ ok( !mod, "rasapi32 loaded\n" ); if (mod) FreeLibrary( mod ); - else ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %u\n", GetLastError() ); + else ok( GetLastError() == ERROR_MOD_NOT_FOUND, "wrong error %lu\n", GetLastError() ); mod = LoadLibraryA( "ext-ms-win-ras-rasapi32-l1-1-0.dll" ); - ok( !!mod || broken(!mod) /* win7 */, "rasapi32 not found %u\n", GetLastError() ); + ok( !!mod || broken(!mod) /* win7 */, "rasapi32 not found %lu\n", GetLastError() ); if (mod) FreeLibrary( mod ); mod = GetModuleHandleA( "rasapi32.dll" ); ok( !mod, "rasapi32 still loaded\n" ); @@ -832,24 +833,24 @@ static void testGetDllDirectory(void)
/* no buffer, determine length */ ret = pGetDllDirectoryA(0, NULL); - ok(ret == length + 1, "Expected %u, got %u\n", length + 1, ret); + ok(ret == length + 1, "Expected %lu, got %lu\n", length + 1, ret);
ret = pGetDllDirectoryW(0, NULL); - ok(ret == length + 1, "Expected %u, got %u\n", length + 1, ret); + ok(ret == length + 1, "Expected %lu, got %lu\n", length + 1, ret);
/* buffer of exactly the right size */ bufferA[length] = 'A'; bufferA[length + 1] = 'A'; ret = pGetDllDirectoryA(length + 1, bufferA); ok(ret == length || broken(ret + 1 == length) /* win8 */, - "i=%d, Expected %u(+1), got %u\n", i, length, ret); + "i=%d, Expected %lu(+1), got %lu\n", i, length, ret); ok(bufferA[length + 1] == 'A', "i=%d, Buffer overflow\n", i); ok(strcmp(bufferA, dll_directories[i]) == 0, "i=%d, Wrong path returned: '%s'\n", i, bufferA);
bufferW[length] = 'A'; bufferW[length + 1] = 'A'; ret = pGetDllDirectoryW(length + 1, bufferW); - ok(ret == length, "i=%d, Expected %u, got %u\n", i, length, ret); + ok(ret == length, "i=%d, Expected %lu, got %lu\n", i, length, ret); ok(bufferW[length + 1] == 'A', "i=%d, Buffer overflow\n", i); ok(cmpStrAW(dll_directories[i], bufferW, length, length), "i=%d, Wrong path returned: %s\n", i, wine_dbgstr_w(bufferW)); @@ -858,24 +859,24 @@ static void testGetDllDirectory(void) * on the Windows version and whether the A or W API is called. */ bufferA[0] = 'A'; ret = pGetDllDirectoryA(0, bufferA); - ok(ret == length + 1, "i=%d, Expected %u, got %u\n", i, length + 1, ret); + ok(ret == length + 1, "i=%d, Expected %lu, got %lu\n", i, length + 1, ret);
bufferW[0] = 'A'; ret = pGetDllDirectoryW(0, bufferW); - ok(ret == length + 1, "i=%d, Expected %u, got %u\n", i, length + 1, ret); + ok(ret == length + 1, "i=%d, Expected %lu, got %lu\n", i, length + 1, ret); ok(bufferW[0] == 'A' || broken(bufferW[0] == 0), /* XP, 2003 */ "i=%d, Buffer overflow\n", i);
/* buffer just one too short */ bufferA[0] = 'A'; ret = pGetDllDirectoryA(length, bufferA); - ok(ret == length + 1, "i=%d, Expected %u, got %u\n", i, length + 1, ret); + ok(ret == length + 1, "i=%d, Expected %lu, got %lu\n", i, length + 1, ret); if (length != 0) ok(bufferA[0] == 0, "i=%d, Buffer not null terminated\n", i);
bufferW[0] = 'A'; ret = pGetDllDirectoryW(length, bufferW); - ok(ret == length + 1, "i=%d, Expected %u, got %u\n", i, length + 1, ret); + ok(ret == length + 1, "i=%d, Expected %lu, got %lu\n", i, length + 1, ret); if (length != 0) ok(bufferW[0] == 0, "i=%d, Buffer overflow\n", i);
@@ -884,10 +885,10 @@ static void testGetDllDirectory(void) /* crashes on win8 */ /* no buffer, but too short length */ ret = pGetDllDirectoryA(length, NULL); - ok(ret == length + 1, "i=%d, Expected %u, got %u\n", i, length + 1, ret); + ok(ret == length + 1, "i=%d, Expected %lu, got %lu\n", i, length + 1, ret);
ret = pGetDllDirectoryW(length, NULL); - ok(ret == length + 1, "i=%d, Expected %u, got %u\n", i, length + 1, ret); + ok(ret == length + 1, "i=%d, Expected %lu, got %lu\n", i, length + 1, ret); }
if (pLdrGetDllDirectory) @@ -897,7 +898,7 @@ static void testGetDllDirectory(void) str.Buffer = bufferW; str.MaximumLength = sizeof(bufferW); status = pLdrGetDllDirectory( &str ); - ok( !status, "LdrGetDllDirectory failed %x\n", status ); + ok( !status, "LdrGetDllDirectory failed %lx\n", status ); ok( cmpStrAW( dll_directories[i], bufferW, strlen(dll_directories[i]), str.Length / sizeof(WCHAR) ), "%u: got %s instead of %s\n", i, wine_dbgstr_w(bufferW), dll_directories[i] ); @@ -906,11 +907,11 @@ static void testGetDllDirectory(void) memset( bufferW, 0xcc, sizeof(bufferW) ); str.MaximumLength = (strlen( dll_directories[i] ) - 1) * sizeof(WCHAR); status = pLdrGetDllDirectory( &str ); - ok( status == STATUS_BUFFER_TOO_SMALL, "%u: LdrGetDllDirectory failed %x\n", i, status ); + ok( status == STATUS_BUFFER_TOO_SMALL, "%u: LdrGetDllDirectory failed %lx\n", i, status ); ok( bufferW[0] == 0 && bufferW[1] == 0xcccc, "%u: buffer %x %x\n", i, bufferW[0], bufferW[1] ); length = (strlen( dll_directories[i] ) + 1) * sizeof(WCHAR); - ok( str.Length == length, "%u: wrong len %u / %u\n", i, str.Length, length ); + ok( str.Length == length, "%u: wrong len %u / %lu\n", i, str.Length, length ); } } } @@ -963,18 +964,18 @@ static void testGetModuleHandleEx(void) ret = GetModuleHandleExA( 0, NULL, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExA( 0, "kernel32", NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); mod = (HMODULE)0xdeadbeef; ret = GetModuleHandleExA( 0, "kernel32", &mod ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( mod != (HMODULE)0xdeadbeef, "got %p\n", mod ); FreeLibrary( mod );
@@ -983,25 +984,25 @@ static void testGetModuleHandleEx(void) ret = GetModuleHandleExA( 0, "nosuchmod", &mod ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_MOD_NOT_FOUND, "got %u\n", error ); + ok( error == ERROR_MOD_NOT_FOUND, "got %lu\n", error ); ok( mod == NULL, "got %p\n", mod );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExW( 0, NULL, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExW( 0, kernel32W, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); mod = (HMODULE)0xdeadbeef; ret = GetModuleHandleExW( 0, kernel32W, &mod ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( mod != (HMODULE)0xdeadbeef, "got %p\n", mod ); FreeLibrary( mod );
@@ -1010,25 +1011,25 @@ static void testGetModuleHandleEx(void) ret = GetModuleHandleExW( 0, nosuchmodW, &mod ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_MOD_NOT_FOUND, "got %u\n", error ); + ok( error == ERROR_MOD_NOT_FOUND, "got %lu\n", error ); ok( mod == NULL, "got %p\n", mod );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, NULL, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, "kernel32", NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); mod = (HMODULE)0xdeadbeef; ret = GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, "kernel32", &mod ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( mod != (HMODULE)0xdeadbeef, "got %p\n", mod );
SetLastError( 0xdeadbeef ); @@ -1036,25 +1037,25 @@ static void testGetModuleHandleEx(void) ret = GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, "nosuchmod", &mod ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_MOD_NOT_FOUND, "got %u\n", error ); + ok( error == ERROR_MOD_NOT_FOUND, "got %lu\n", error ); ok( mod == NULL, "got %p\n", mod );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, NULL, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, kernel32W, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); mod = (HMODULE)0xdeadbeef; ret = GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, kernel32W, &mod ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( mod != (HMODULE)0xdeadbeef, "got %p\n", mod );
SetLastError( 0xdeadbeef ); @@ -1062,7 +1063,7 @@ static void testGetModuleHandleEx(void) ret = GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, nosuchmodW, &mod ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_MOD_NOT_FOUND, "got %u\n", error ); + ok( error == ERROR_MOD_NOT_FOUND, "got %lu\n", error ); ok( mod == NULL, "got %p\n", mod );
mod_kernel32 = LoadLibraryA( "kernel32" ); @@ -1071,18 +1072,18 @@ static void testGetModuleHandleEx(void) ret = GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, NULL, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCSTR)mod_kernel32, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); mod = (HMODULE)0xdeadbeef; ret = GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCSTR)mod_kernel32, &mod ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( mod == mod_kernel32, "got %p\n", mod ); FreeLibrary( mod );
@@ -1091,25 +1092,25 @@ static void testGetModuleHandleEx(void) ret = GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCSTR)0xbeefdead, &mod ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_MOD_NOT_FOUND, "got %u\n", error ); + ok( error == ERROR_MOD_NOT_FOUND, "got %lu\n", error ); ok( mod == NULL, "got %p\n", mod );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, NULL, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); ret = GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)mod_kernel32, NULL ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
SetLastError( 0xdeadbeef ); mod = (HMODULE)0xdeadbeef; ret = GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)mod_kernel32, &mod ); - ok( ret, "unexpected failure %u\n", GetLastError() ); + ok( ret, "unexpected failure %lu\n", GetLastError() ); ok( mod == mod_kernel32, "got %p\n", mod ); FreeLibrary( mod );
@@ -1118,7 +1119,7 @@ static void testGetModuleHandleEx(void) ret = GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)0xbeefdead, &mod ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_MOD_NOT_FOUND, "got %u\n", error ); + ok( error == ERROR_MOD_NOT_FOUND, "got %lu\n", error ); ok( mod == NULL, "got %p\n", mod );
SetLastError( 0xdeadbeef ); @@ -1127,7 +1128,7 @@ static void testGetModuleHandleEx(void) | GET_MODULE_HANDLE_EX_FLAG_PIN, (LPCWSTR)mod_kernel32, &mod ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error ); ok( mod == NULL, "got %p\n", mod );
SetLastError( 0xdeadbeef ); @@ -1135,7 +1136,7 @@ static void testGetModuleHandleEx(void) ret = GetModuleHandleExW( 8, kernel32W, &mod ); error = GetLastError(); ok( !ret, "unexpected success\n" ); - ok( error == ERROR_INVALID_PARAMETER, "got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error ); ok( mod == NULL, "got %p\n", mod );
FreeLibrary( mod_kernel32 ); @@ -1180,32 +1181,32 @@ static void test_AddDllDirectory(void) buf[0] = '\0'; GetTempPathW(ARRAY_SIZE(path), path ); ret = GetTempFileNameW( path, tmpW, 0, buf ); - ok( ret, "GetTempFileName failed err %u\n", GetLastError() ); + ok( ret, "GetTempFileName failed err %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); cookie = pAddDllDirectory( buf ); - ok( cookie != NULL, "AddDllDirectory failed err %u\n", GetLastError() ); + ok( cookie != NULL, "AddDllDirectory failed err %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); ret = pRemoveDllDirectory( cookie ); - ok( ret, "RemoveDllDirectory failed err %u\n", GetLastError() ); + ok( ret, "RemoveDllDirectory failed err %lu\n", GetLastError() );
DeleteFileW( buf ); SetLastError( 0xdeadbeef ); cookie = pAddDllDirectory( buf ); ok( !cookie, "AddDllDirectory succeeded\n" ); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %lu\n", GetLastError() ); cookie = pAddDllDirectory( dotW ); ok( !cookie, "AddDllDirectory succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); cookie = pAddDllDirectory( rootW ); - ok( cookie != NULL, "AddDllDirectory failed err %u\n", GetLastError() ); + ok( cookie != NULL, "AddDllDirectory failed err %lu\n", GetLastError() ); SetLastError( 0xdeadbeef ); ret = pRemoveDllDirectory( cookie ); - ok( ret, "RemoveDllDirectory failed err %u\n", GetLastError() ); + ok( ret, "RemoveDllDirectory failed err %lu\n", GetLastError() ); GetWindowsDirectoryW( buf, MAX_PATH ); lstrcpyW( buf + 2, tmpW ); cookie = pAddDllDirectory( buf ); ok( !cookie, "AddDllDirectory succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); }
static void test_SetDefaultDllDirectories(void) @@ -1223,12 +1224,12 @@ static void test_SetDefaultDllDirectories(void) ok( mod != NULL, "loading authz failed\n" ); FreeLibrary( mod ); ret = pSetDefaultDllDirectories( LOAD_LIBRARY_SEARCH_USER_DIRS ); - ok( ret, "SetDefaultDllDirectories failed err %u\n", GetLastError() ); + ok( ret, "SetDefaultDllDirectories failed err %lu\n", GetLastError() ); mod = LoadLibraryA( "authz.dll" ); ok( !mod, "loading authz succeeded\n" ); FreeLibrary( mod ); ret = pSetDefaultDllDirectories( LOAD_LIBRARY_SEARCH_SYSTEM32 ); - ok( ret, "SetDefaultDllDirectories failed err %u\n", GetLastError() ); + ok( ret, "SetDefaultDllDirectories failed err %lu\n", GetLastError() ); mod = LoadLibraryA( "authz.dll" ); ok( mod != NULL, "loading authz failed\n" ); FreeLibrary( mod ); @@ -1236,12 +1237,12 @@ static void test_SetDefaultDllDirectories(void) ok( !mod, "loading authz succeeded\n" ); FreeLibrary( mod ); ret = pSetDefaultDllDirectories( LOAD_LIBRARY_SEARCH_APPLICATION_DIR ); - ok( ret, "SetDefaultDllDirectories failed err %u\n", GetLastError() ); + ok( ret, "SetDefaultDllDirectories failed err %lu\n", GetLastError() ); mod = LoadLibraryA( "authz.dll" ); ok( !mod, "loading authz succeeded\n" ); FreeLibrary( mod ); ret = pSetDefaultDllDirectories( LOAD_LIBRARY_SEARCH_DEFAULT_DIRS ); - ok( ret, "SetDefaultDllDirectories failed err %u\n", GetLastError() ); + ok( ret, "SetDefaultDllDirectories failed err %lu\n", GetLastError() ); mod = LoadLibraryA( "authz.dll" ); ok( mod != NULL, "loading authz failed\n" ); FreeLibrary( mod ); @@ -1249,27 +1250,27 @@ static void test_SetDefaultDllDirectories(void) SetLastError( 0xdeadbeef ); ret = pSetDefaultDllDirectories( 0 ); ok( !ret, "SetDefaultDllDirectories succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetDefaultDllDirectories( 3 ); ok( !ret, "SetDefaultDllDirectories succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetDefaultDllDirectories( LOAD_LIBRARY_SEARCH_APPLICATION_DIR | 0x8000 ); ok( !ret, "SetDefaultDllDirectories succeeded\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetDefaultDllDirectories( LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR ); ok( !ret || broken(ret) /* win7 */, "SetDefaultDllDirectories succeeded\n" ); - if (!ret) ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + if (!ret) ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
SetLastError( 0xdeadbeef ); ret = pSetDefaultDllDirectories( LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_USER_DIRS ); ok( !ret || broken(ret) /* win7 */, "SetDefaultDllDirectories succeeded\n" ); - if (!ret) ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + if (!ret) ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() );
/* restore some sane defaults */ pSetDefaultDllDirectories( LOAD_LIBRARY_SEARCH_DEFAULT_DIRS ); @@ -1284,13 +1285,13 @@ static void check_refcount( HMODULE mod, unsigned int refcount ) { ret = FreeLibrary( mod ); ok( ret || broken( refcount == ~0u && GetLastError() == ERROR_MOD_NOT_FOUND && i == 2 ) /* Win8 */, - "Refcount test failed, i %u, error %u.\n", i, GetLastError() ); + "Refcount test failed, i %u, error %lu.\n", i, GetLastError() ); if (!ret) return; } if (refcount != ~0u) { ret = FreeLibrary( mod ); - ok( !ret && GetLastError() == ERROR_MOD_NOT_FOUND, "Refcount test failed, ret %d, error %u.\n", + ok( !ret && GetLastError() == ERROR_MOD_NOT_FOUND, "Refcount test failed, ret %d, error %lu.\n", ret, GetLastError() ); } } @@ -1310,13 +1311,13 @@ static void test_LdrGetDllHandleEx(void)
RtlInitUnicodeString( &name, L"unknown.dll" ); status = pLdrGetDllHandleEx( 0, NULL, NULL, &name, &mod ); - ok( status == STATUS_DLL_NOT_FOUND, "Got unexpected status %#x.\n", status ); + ok( status == STATUS_DLL_NOT_FOUND, "Got unexpected status %#lx.\n", status );
RtlInitUnicodeString( &name, L"authz.dll" ); loaded_mod = LoadLibraryW( name.Buffer ); ok( !!loaded_mod, "Failed to load module.\n" ); status = pLdrGetDllHandleEx( 0, NULL, NULL, &name, &mod ); - ok( !status, "Got unexpected status %#x.\n", status ); + ok( !status, "Got unexpected status %#lx.\n", status ); ok( mod == loaded_mod, "got %p\n", mod ); winetest_push_context( "Flags 0" ); check_refcount( loaded_mod, 2 ); @@ -1326,7 +1327,7 @@ static void test_LdrGetDllHandleEx(void) ok( !!loaded_mod, "Failed to load module.\n" ); status = pLdrGetDllHandleEx( LDR_GET_DLL_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, NULL, NULL, &name, &mod ); - ok( !status, "Got unexpected status %#x.\n", status ); + ok( !status, "Got unexpected status %#lx.\n", status ); ok( mod == loaded_mod, "got %p\n", mod ); winetest_push_context( "LDR_GET_DLL_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT" ); check_refcount( loaded_mod, 1 ); @@ -1335,7 +1336,7 @@ static void test_LdrGetDllHandleEx(void) loaded_mod = LoadLibraryW( name.Buffer ); ok( !!loaded_mod, "Failed to load module.\n" ); status = pLdrGetDllHandle( NULL, ~0u, &name, &mod ); - ok( !status, "Got unexpected status %#x.\n", status ); + ok( !status, "Got unexpected status %#lx.\n", status ); ok( mod == loaded_mod, "got %p\n", mod ); winetest_push_context( "LdrGetDllHandle" ); check_refcount( loaded_mod, 1 ); @@ -1344,7 +1345,7 @@ static void test_LdrGetDllHandleEx(void) loaded_mod = LoadLibraryW( name.Buffer ); ok( !!loaded_mod, "Failed to load module.\n" ); status = pLdrGetDllHandleEx( 4, NULL, NULL, (void *)&name, &mod ); - ok( !status, "Got unexpected status %#x.\n", status ); + ok( !status, "Got unexpected status %#lx.\n", status ); ok( mod == loaded_mod, "got %p\n", mod ); winetest_push_context( "Flag 4" ); check_refcount( loaded_mod, 2 ); @@ -1355,7 +1356,7 @@ static void test_LdrGetDllHandleEx(void) loaded_mod = LoadLibraryW( name.Buffer ); ok( !!loaded_mod, "Failed to load module.\n" ); status = pLdrGetDllHandleEx( 1 << i, NULL, NULL, &name, &mod ); - ok( status == STATUS_INVALID_PARAMETER, "Got unexpected status %#x.\n", status ); + ok( status == STATUS_INVALID_PARAMETER, "Got unexpected status %#lx.\n", status ); winetest_push_context( "Invalid flags, i %u", i ); check_refcount( loaded_mod, 1 ); winetest_pop_context(); @@ -1363,13 +1364,13 @@ static void test_LdrGetDllHandleEx(void)
status = pLdrGetDllHandleEx( LDR_GET_DLL_HANDLE_EX_FLAG_PIN | LDR_GET_DLL_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, NULL, NULL, &name, &mod ); - ok( status == STATUS_INVALID_PARAMETER, "Got unexpected status %#x.\n", status ); + ok( status == STATUS_INVALID_PARAMETER, "Got unexpected status %#lx.\n", status );
loaded_mod = LoadLibraryW( name.Buffer ); ok( !!loaded_mod, "Failed to load module.\n" ); status = pLdrGetDllHandleEx( LDR_GET_DLL_HANDLE_EX_FLAG_PIN, NULL, NULL, &name, &mod ); - ok( !status, "Got unexpected status %#x.\n", status ); + ok( !status, "Got unexpected status %#lx.\n", status ); ok( mod == loaded_mod, "got %p\n", mod ); winetest_push_context( "LDR_GET_DLL_HANDLE_EX_FLAG_PIN" ); check_refcount( loaded_mod, ~0u ); @@ -1398,7 +1399,7 @@ static void test_LdrGetDllFullName(void) memset( path_buffer, 0x23, sizeof(path_buffer) );
status = pLdrGetDllFullName( ntdll, &path ); - ok( status == STATUS_BUFFER_TOO_SMALL, "Got unexpected status %#x.\n", status ); + ok( status == STATUS_BUFFER_TOO_SMALL, "Got unexpected status %#lx.\n", status ); ok( path.Length == 0, "Expected length 0, got %d.\n", path.Length ); ok( path_buffer[0] == 0x2323, "Expected 0x2323, got 0x%x.\n", path_buffer[0] );
@@ -1406,7 +1407,7 @@ static void test_LdrGetDllFullName(void) path.MaximumLength = 5; /* odd numbers produce partially copied characters */
status = pLdrGetDllFullName( ntdll, &path ); - ok( status == STATUS_BUFFER_TOO_SMALL, "Got unexpected status %#x.\n", status ); + ok( status == STATUS_BUFFER_TOO_SMALL, "Got unexpected status %#lx.\n", status ); ok( path.Length == path.MaximumLength, "Expected length %u, got %u.\n", path.MaximumLength, path.Length ); expected_terminator = 0x2300 | (expected_path[path.MaximumLength / sizeof(WCHAR)] & 0xFF); ok( path_buffer[path.MaximumLength / sizeof(WCHAR)] == expected_terminator, @@ -1421,12 +1422,12 @@ static void test_LdrGetDllFullName(void) path.MaximumLength = sizeof(path_buffer);
status = pLdrGetDllFullName( ntdll, &path ); - ok( status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status ); + ok( status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status ); ok( !lstrcmpiW(path_buffer, expected_path), "Expected %s, got %s\n", wine_dbgstr_w(expected_path), wine_dbgstr_w(path_buffer) );
status = pLdrGetDllFullName( NULL, &path ); - ok( status == STATUS_SUCCESS, "Got unexpected status %#x.\n", status ); + ok( status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status ); GetModuleFileNameW( NULL, expected_path, ARRAY_SIZE(expected_path) ); ok( !lstrcmpiW(path_buffer, expected_path), "Expected %s, got %s.\n", wine_dbgstr_w(expected_path), wine_dbgstr_w(path_buffer) ); @@ -1478,14 +1479,14 @@ static void test_apisets(void) winetest_push_context( "%u:%s", i, tests[i].name ); present = 0xff; status = pApiSetQueryApiSetPresence( &name, &present ); - ok( status == STATUS_SUCCESS, "wrong ret %x\n", status ); + ok( status == STATUS_SUCCESS, "wrong ret %lx\n", status ); ok( present == tests[i].present || broken(!present && tests[i].broken) /* win8 */, "wrong present %u\n", present ); if (pApiSetQueryApiSetPresenceEx) { present = in_schema = 0xff; status = pApiSetQueryApiSetPresenceEx( &name, &in_schema, &present ); - ok( status == tests[i].status, "wrong ret %x\n", status ); + ok( status == tests[i].status, "wrong ret %lx\n", status ); if (!status) { ok( in_schema == tests[i].in_schema, "wrong in_schema %u\n", in_schema ); @@ -1532,7 +1533,7 @@ static void test_ddag_node(void) ok( !!hexe, "Got NULL exe handle.\n" );
status = LdrFindEntryForAddress( hexe, &mod ); - ok( !status, "Got unexpected status %#x.\n", status ); + ok( !status, "Got unexpected status %#lx.\n", status );
if (!(node = mod->DdagNode)) { @@ -1561,7 +1562,7 @@ static void test_ddag_node(void) win_skip( "Empty dependencies list.\n" ); return; } - todo_wine ok( node->LoadCount == -1, "Got unexpected LoadCount %d.\n", node->LoadCount ); + todo_wine ok( node->LoadCount == -1, "Got unexpected LoadCount %ld.\n", node->LoadCount );
prev_node = NULL; se = node->Dependencies.Tail; @@ -1601,7 +1602,7 @@ static void test_ddag_node(void) ok( dep2 == dep, "Dependency not found in incoming deps list.\n" );
todo_wine ok( dep_node->LoadCount > 0 || broken(!dep_node->LoadCount) /* Win8 */, - "Got unexpected LoadCount %d.\n", dep_node->LoadCount ); + "Got unexpected LoadCount %ld.\n", dep_node->LoadCount );
winetest_pop_context(); prev_node = dep_node;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/mf/tests/mf.c | 102 +++++++++++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 49 deletions(-)
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index e61442bb512..09c8cfa54e0 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -206,11 +206,11 @@ static void test_topology(void) IUnknown test_unk = { &test_unk_vtbl }; IMFTopologyNode *node, *node2, *node3; IMFTopology *topology, *topology2; + DWORD size, io_count, index; MF_TOPOLOGY_TYPE node_type; - UINT32 count, index; IUnknown *object; WORD node_count; - DWORD size; + UINT32 count; HRESULT hr; TOPOID id;
@@ -526,9 +526,9 @@ static void test_topology(void) ok(count == 1, "Unexpected attribute count %u.\n", count);
/* Preferred stream types. */ - hr = IMFTopologyNode_GetInputCount(node, &count); + hr = IMFTopologyNode_GetInputCount(node, &io_count); ok(hr == S_OK, "Failed to get input count, hr %#x.\n", hr); - ok(count == 0, "Unexpected count %u.\n", count); + ok(io_count == 0, "Unexpected count %u.\n", io_count);
hr = IMFTopologyNode_GetInputPrefType(node, 0, &mediatype); ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); @@ -557,13 +557,13 @@ static void test_topology(void) hr = IMFTopologyNode_SetInputPrefType(node, 1, mediatype); ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr);
- hr = IMFTopologyNode_GetInputCount(node, &count); + hr = IMFTopologyNode_GetInputCount(node, &io_count); ok(hr == S_OK, "Failed to get input count, hr %#x.\n", hr); - ok(count == 2, "Unexpected count %u.\n", count); + ok(io_count == 2, "Unexpected count %u.\n", io_count);
- hr = IMFTopologyNode_GetOutputCount(node, &count); + hr = IMFTopologyNode_GetOutputCount(node, &io_count); ok(hr == S_OK, "Failed to get input count, hr %#x.\n", hr); - ok(count == 0, "Unexpected count %u.\n", count); + ok(io_count == 0, "Unexpected count %u.\n", io_count);
hr = IMFTopologyNode_SetOutputPrefType(node, 0, mediatype); ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); @@ -584,9 +584,9 @@ static void test_topology(void) ok(hr == E_FAIL, "Failed to get preferred type, hr %#x.\n", hr); ok(!mediatype2, "Unexpected mediatype instance.\n");
- hr = IMFTopologyNode_GetOutputCount(node, &count); + hr = IMFTopologyNode_GetOutputCount(node, &io_count); ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(count == 3, "Unexpected count %u.\n", count); + ok(io_count == 3, "Unexpected count %u.\n", io_count);
IMFTopologyNode_Release(node);
@@ -605,9 +605,9 @@ static void test_topology(void) hr = IMFTopologyNode_GetOutputPrefType(node, 0, &mediatype2); ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
- hr = IMFTopologyNode_GetInputCount(node, &count); + hr = IMFTopologyNode_GetInputCount(node, &io_count); ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(count == 0, "Unexpected count %u.\n", count); + ok(io_count == 0, "Unexpected count %u.\n", io_count);
hr = IMFTopologyNode_SetInputPrefType(node, 1, mediatype); ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#x.\n", hr); @@ -635,13 +635,13 @@ static void test_topology(void)
IMFMediaType_Release(mediatype2);
- hr = IMFTopologyNode_GetInputCount(node, &count); + hr = IMFTopologyNode_GetInputCount(node, &io_count); ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(count == 0, "Unexpected count %u.\n", count); + ok(io_count == 0, "Unexpected count %u.\n", io_count);
- hr = IMFTopologyNode_GetOutputCount(node, &count); + hr = IMFTopologyNode_GetOutputCount(node, &io_count); ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(count == 5, "Unexpected count %u.\n", count); + ok(io_count == 5, "Unexpected count %u.\n", io_count);
IMFTopologyNode_Release(node);
@@ -652,20 +652,20 @@ static void test_topology(void) hr = IMFTopologyNode_SetInputPrefType(node, 3, mediatype); ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr);
- hr = IMFTopologyNode_GetInputCount(node, &count); + hr = IMFTopologyNode_GetInputCount(node, &io_count); ok(hr == S_OK, "Failed to get input count, hr %#x.\n", hr); - ok(count == 4, "Unexpected count %u.\n", count); + ok(io_count == 4, "Unexpected count %u.\n", io_count);
hr = IMFTopologyNode_SetOutputPrefType(node, 4, mediatype); ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr);
- hr = IMFTopologyNode_GetInputCount(node, &count); + hr = IMFTopologyNode_GetInputCount(node, &io_count); ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(count == 4, "Unexpected count %u.\n", count); + ok(io_count == 4, "Unexpected count %u.\n", io_count);
- hr = IMFTopologyNode_GetOutputCount(node, &count); + hr = IMFTopologyNode_GetOutputCount(node, &io_count); ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(count == 5, "Unexpected count %u.\n", count); + ok(io_count == 5, "Unexpected count %u.\n", io_count);
IMFTopologyNode_Release(node);
@@ -819,16 +819,16 @@ static void test_topology(void) hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node2); ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr);
- hr = IMFTopologyNode_GetOutputCount(node, &count); + hr = IMFTopologyNode_GetOutputCount(node, &io_count); ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(count == 1, "Unexpected output count.\n"); + ok(io_count == 1, "Unexpected output count.\n");
hr = IMFTopologyNode_CloneFrom(node, node2); ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Vista */, "Failed to clone a node, hr %#x.\n", hr);
- hr = IMFTopologyNode_GetOutputCount(node, &count); + hr = IMFTopologyNode_GetOutputCount(node, &io_count); ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(count == 1, "Unexpected output count.\n"); + ok(io_count == 1, "Unexpected output count.\n");
hr = IMFTopologyNode_GetOutputPrefType(node, 0, &mediatype2); ok(hr == S_OK, "Failed to get preferred type, hr %#x.\n", hr); @@ -838,9 +838,9 @@ static void test_topology(void) hr = IMFTopologyNode_CloneFrom(node2, node); ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Vista */, "Failed to clone a node, hr %#x.\n", hr);
- hr = IMFTopologyNode_GetOutputCount(node2, &count); + hr = IMFTopologyNode_GetOutputCount(node2, &io_count); ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(count == 1, "Unexpected output count.\n"); + ok(io_count == 1, "Unexpected output count.\n");
IMFTopologyNode_Release(node2); IMFTopologyNode_Release(node); @@ -915,7 +915,7 @@ static void test_topology_tee_node(void) IMFTopologyNode *src_node, *tee_node; IMFMediaType *mediatype, *mediatype2; IMFTopology *topology; - unsigned int count; + DWORD count; HRESULT hr;
hr = MFCreateTopology(&topology); @@ -1227,12 +1227,13 @@ static void test_media_session(void) IMFRateSupport *rate_support; IMFAttributes *attributes; IMFMediaSession *session; + MFSHUTDOWN_STATUS status; IMFTopology *topology; IMFShutdown *shutdown; PROPVARIANT propvar; - DWORD status, caps; IMFGetService *gs; IMFClock *clock; + DWORD caps; HRESULT hr;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); @@ -1920,8 +1921,8 @@ static void test_topology_loader(void) IMFTopologyNode *src_node, *sink_node, *src_node2, *sink_node2, *mft_node; IMFTopology *topology, *topology2, *full_topology; IMFMediaType *media_type, *input_type, *output_type; - unsigned int i, count, value, index; IMFPresentationDescriptor *pd; + unsigned int i, count, value; IMFActivate *sink_activate; MF_TOPOLOGY_TYPE node_type; IMFStreamDescriptor *sd; @@ -1931,6 +1932,7 @@ static void test_topology_loader(void) IUnknown *node_object; WORD node_count; TOPOID node_id; + DWORD index; HRESULT hr; BOOL ret;
@@ -2851,6 +2853,7 @@ static void test_sample_grabber(void) DWORD flags, count, id; IMFActivate *activate; IMFMediaEvent *event; + UINT32 attr_count; ULONG refcount; IUnknown *unk; float rate; @@ -2879,9 +2882,9 @@ static void test_sample_grabber(void) ok(hr == S_OK, "Failed to create grabber activate, hr %#x.\n", hr); EXPECT_REF(media_type, 2);
- hr = IMFActivate_GetCount(activate, &count); + hr = IMFActivate_GetCount(activate, &attr_count); ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); - ok(!count, "Unexpected count %u.\n", count); + ok(!attr_count, "Unexpected count %u.\n", attr_count);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); ok(hr == S_OK, "Failed to activate object, hr %#x.\n", hr); @@ -3263,7 +3266,7 @@ static void test_sample_grabber(void) hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr);
- hr = IMFActivate_GetCount(activate, &count); + hr = IMFActivate_GetCount(activate, &attr_count); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFActivate_DetachObject(activate); @@ -3419,7 +3422,7 @@ static BOOL is_supported_video_type(const GUID *guid) static void test_video_processor(void) { DWORD input_count, output_count, input_id, output_id, flags; - DWORD input_min, input_max, output_min, output_max, i, count; + DWORD input_min, input_max, output_min, output_max, i; IMFAttributes *attributes, *attributes2; IMFMediaType *media_type, *media_type2; MFT_OUTPUT_DATA_BUFFER output_buffer; @@ -3430,6 +3433,7 @@ static void test_video_processor(void) IMFMediaBuffer *buffer; IMFMediaEvent *event; unsigned int value; + UINT32 count; HRESULT hr; GUID guid;
@@ -3967,6 +3971,7 @@ static void test_sar(void) IMFAttributes *attributes; DWORD i, id, flags, count; IMFActivate *activate; + UINT32 channel_count; MFCLOCK_STATE state; IMFClock *clock; IUnknown *unk; @@ -4251,7 +4256,7 @@ if (SUCCEEDED(hr)) hr = MFGetService((IUnknown *)sink, &MR_STREAM_VOLUME_SERVICE, &IID_IMFAudioStreamVolume, (void **)&stream_volume); ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr);
- hr = IMFAudioStreamVolume_GetChannelCount(stream_volume, &count); + hr = IMFAudioStreamVolume_GetChannelCount(stream_volume, &channel_count); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFAudioStreamVolume_GetChannelCount(stream_volume, NULL); @@ -4392,10 +4397,11 @@ static void test_evr(void) IMFPresentationClock *clock; IMFMediaSink *sink, *sink2; IMFAttributes *attributes; - DWORD flags, count, value; + UINT32 attr_count, value; IMFActivate *activate; HWND window, window2; IMFRateSupport *rs; + DWORD flags, count; LONG sample_count; IMFSample *sample; unsigned int i; @@ -4466,9 +4472,9 @@ static void test_evr(void) hr = MFCreateVideoRendererActivate(NULL, &activate); ok(hr == S_OK, "Failed to create activate object, hr %#x.\n", hr);
- hr = IMFActivate_GetCount(activate, &count); + hr = IMFActivate_GetCount(activate, &attr_count); ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); - ok(count == 1, "Unexpected count %u.\n", count); + ok(attr_count == 1, "Unexpected count %u.\n", attr_count);
hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &window3); ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr); @@ -4482,9 +4488,9 @@ static void test_evr(void) hr = IMFAttributes_QueryInterface(attributes, &IID_IMFMediaSink, (void **)&unk); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); IUnknown_Release(unk); - hr = IMFAttributes_GetCount(attributes, &count); + hr = IMFAttributes_GetCount(attributes, &attr_count); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!!count, "Unexpected count %u.\n", count); + ok(!!attr_count, "Unexpected count %u.\n", attr_count); /* Rendering preferences are not immediately propagated to the presenter. */ hr = IMFAttributes_SetUINT32(attributes, &EVRConfig_ForceBob, 1); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); @@ -4502,9 +4508,9 @@ static void test_evr(void)
hr = IMFStreamSink_QueryInterface(stream_sink, &IID_IMFAttributes, (void **)&attributes); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - hr = IMFAttributes_GetCount(attributes, &count); + hr = IMFAttributes_GetCount(attributes, &attr_count); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(count == 2, "Unexpected count %u.\n", count); + ok(attr_count == 2, "Unexpected count %u.\n", attr_count); value = 0; hr = IMFAttributes_GetUINT32(attributes, &MF_SA_REQUIRED_SAMPLE_COUNT, &value); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); @@ -5059,9 +5065,9 @@ static void test_sample_copier(void) DWORD input_count, output_count; MFT_OUTPUT_DATA_BUFFER buffer; IMFMediaBuffer *media_buffer; - DWORD count, flags, status; IMFTransform *copier; - UINT32 value; + DWORD flags, status; + UINT32 value, count; HRESULT hr;
if (!pMFCreateSampleCopierMFT) @@ -5332,9 +5338,8 @@ static void sample_copier_process(IMFTransform *copier, IMFMediaBuffer *input_bu static const struct sample_metadata zero_md = { 0, ~0u, ~0u }; IMFSample *input_sample, *output_sample; MFT_OUTPUT_DATA_BUFFER buffer; - unsigned int flags; + DWORD flags, status; LONGLONG time; - DWORD status; HRESULT hr;
hr = MFCreateSample(&input_sample); @@ -5618,9 +5623,8 @@ static BOOL create_transform(GUID category, MFT_REGISTER_TYPE_INFO *input_type, IMFTransform **transform, GUID *class_id) { MFT_REGISTER_TYPE_INFO *input_types = NULL, *output_types = NULL; - UINT32 input_count = 0, output_count = 0; + UINT32 input_count = 0, output_count = 0, count = 0, i; GUID *class_ids = NULL; - ULONG count = 0, i; WCHAR *name; HRESULT hr;
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/mf/tests/Makefile.in | 1 dlls/mf/tests/mf.c | 2670 +++++++++++++++++++++++---------------------- 2 files changed, 1335 insertions(+), 1336 deletions(-)
diff --git a/dlls/mf/tests/Makefile.in b/dlls/mf/tests/Makefile.in index 53592a8758d..a0ca40481da 100644 --- a/dlls/mf/tests/Makefile.in +++ b/dlls/mf/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = mf.dll IMPORTS = mf mfplat mfuuid ole32 user32 propsys
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 09c8cfa54e0..d23dcdce064 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -66,7 +66,7 @@ static void _expect_ref(IUnknown* obj, ULONG expected_refcount, int line) ULONG refcount; IUnknown_AddRef(obj); refcount = IUnknown_Release(obj); - ok_(__FILE__, line)(refcount == expected_refcount, "Unexpected refcount %d, expected %d.\n", refcount, + ok_(__FILE__, line)(refcount == expected_refcount, "Unexpected refcount %ld, expected %ld.\n", refcount, expected_refcount); }
@@ -80,7 +80,7 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = IUnknown_QueryInterface(iface, iid, (void **)&unk); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); if (SUCCEEDED(hr)) IUnknown_Release(unk); } @@ -95,7 +95,7 @@ static void check_service_interface_(unsigned int line, void *iface_ptr, REFGUID expected_hr = supported ? S_OK : E_NOINTERFACE;
hr = MFGetService(iface, service, iid, (void **)&unk); - ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#lx, expected %#lx.\n", hr, expected_hr); if (SUCCEEDED(hr)) IUnknown_Release(unk); } @@ -127,22 +127,22 @@ static void check_attributes_(int line, IMFAttributes *attributes, const struct for (i = 0; i < limit && desc[i].key; ++i) { hr = IMFAttributes_GetItem(attributes, desc[i].key, &value); - ok_(__FILE__, line)(hr == S_OK, "%s missing, hr %#x\n", debugstr_a(desc[i].name), hr); + ok_(__FILE__, line)(hr == S_OK, "%s missing, hr %#lx\n", debugstr_a(desc[i].name), hr); if (hr != S_OK) continue;
switch (value.vt) { default: sprintf(buffer, "??"); break; case VT_CLSID: sprintf(buffer, "%s", debugstr_guid(value.puuid)); break; - case VT_UI4: sprintf(buffer, "%u", value.ulVal); break; + case VT_UI4: sprintf(buffer, "%lu", value.ulVal); break; case VT_UI8: if (desc[i].ratio) - sprintf(buffer, "%u:%u", value.uhVal.HighPart, value.uhVal.LowPart); + sprintf(buffer, "%lu:%lu", value.uhVal.HighPart, value.uhVal.LowPart); else sprintf(buffer, "%I64u", value.uhVal.QuadPart); break; case VT_VECTOR | VT_UI1: - buf += sprintf(buf, "size %u, data {", value.caub.cElems); + buf += sprintf(buf, "size %lu, data {", value.caub.cElems); for (j = 0; j < 16 && j < value.caub.cElems; ++j) buf += sprintf(buf, "0x%02x,", value.caub.pElems[i + j]); if (value.caub.cElems > 16) @@ -215,26 +215,26 @@ static void test_topology(void) TOPOID id;
hr = MFCreateTopology(NULL); - ok(hr == E_POINTER, "got %#x\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr);
hr = MFCreateTopology(&topology); - ok(hr == S_OK, "Failed to create topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology, hr %#lx.\n", hr); hr = IMFTopology_GetTopologyID(topology, &id); - ok(hr == S_OK, "Failed to get id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get id, hr %#lx.\n", hr); ok(id == 1, "Unexpected id.\n");
hr = MFCreateTopology(&topology2); - ok(hr == S_OK, "Failed to create topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology, hr %#lx.\n", hr); hr = IMFTopology_GetTopologyID(topology2, &id); - ok(hr == S_OK, "Failed to get id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get id, hr %#lx.\n", hr); ok(id == 2, "Unexpected id.\n");
IMFTopology_Release(topology);
hr = MFCreateTopology(&topology); - ok(hr == S_OK, "Failed to create topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology, hr %#lx.\n", hr); hr = IMFTopology_GetTopologyID(topology, &id); - ok(hr == S_OK, "Failed to get id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get id, hr %#lx.\n", hr); ok(id == 3, "Unexpected id.\n");
IMFTopology_Release(topology2); @@ -243,152 +243,152 @@ static void test_topology(void) for (node_type = MF_TOPOLOGY_OUTPUT_NODE; node_type < MF_TOPOLOGY_TEE_NODE; ++node_type) { hr = MFCreateTopologyNode(node_type, &node); - ok(hr == S_OK, "Failed to create a node for type %d, hr %#x.\n", node_type, hr); + ok(hr == S_OK, "Failed to create a node for type %d, hr %#lx.\n", node_type, hr); hr = IMFTopologyNode_GetCount(node, &count); - ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr); ok(!count, "Unexpected attribute count %u.\n", count); IMFTopologyNode_Release(node); }
hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_TEE_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetTopoNodeID(node, &id); - ok(hr == S_OK, "Failed to get node id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node id, hr %#lx.\n", hr); ok(((id >> 32) == GetCurrentProcessId()) && !!(id & 0xffff), "Unexpected node id %s.\n", wine_dbgstr_longlong(id));
hr = IMFTopologyNode_SetTopoNodeID(node2, id); - ok(hr == S_OK, "Failed to set node id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set node id, hr %#lx.\n", hr);
hr = IMFTopology_GetNodeCount(topology, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
node_count = 1; hr = IMFTopology_GetNodeCount(topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 0, "Unexpected node count %u.\n", node_count);
/* Same id, different nodes. */ hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
node_count = 0; hr = IMFTopology_GetNodeCount(topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 1, "Unexpected node count %u.\n", node_count);
hr = IMFTopology_AddNode(topology, node2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); IMFTopologyNode_Release(node2);
hr = IMFTopology_GetNodeByID(topology, id, &node2); - ok(hr == S_OK, "Failed to get a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a node, hr %#lx.\n", hr); ok(node2 == node, "Unexpected node.\n"); IMFTopologyNode_Release(node2);
/* Change node id, add it again. */ hr = IMFTopologyNode_SetTopoNodeID(node, ++id); - ok(hr == S_OK, "Failed to set node id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set node id, hr %#lx.\n", hr);
hr = IMFTopology_GetNodeByID(topology, id, &node2); - ok(hr == S_OK, "Failed to get a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a node, hr %#lx.\n", hr); ok(node2 == node, "Unexpected node.\n"); IMFTopologyNode_Release(node2);
hr = IMFTopology_GetNodeByID(topology, id + 1, &node2); - ok(hr == MF_E_NOT_FOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_FOUND, "Unexpected hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, node); - ok(hr == E_INVALIDARG, "Failed to add a node, hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Failed to add a node, hr %#lx.\n", hr);
hr = IMFTopology_GetNode(topology, 0, &node2); - ok(hr == S_OK, "Failed to get a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a node, hr %#lx.\n", hr); ok(node2 == node, "Unexpected node.\n"); IMFTopologyNode_Release(node2);
hr = IMFTopology_GetNode(topology, 1, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTopology_GetNode(topology, 1, &node2); - ok(hr == MF_E_INVALIDINDEX, "Failed to get a node, hr %#x.\n", hr); + ok(hr == MF_E_INVALIDINDEX, "Failed to get a node, hr %#lx.\n", hr);
hr = IMFTopology_GetNode(topology, -2, &node2); - ok(hr == MF_E_INVALIDINDEX, "Failed to get a node, hr %#x.\n", hr); + ok(hr == MF_E_INVALIDINDEX, "Failed to get a node, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_TEE_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr); hr = IMFTopology_AddNode(topology, node2); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr); IMFTopologyNode_Release(node2);
node_count = 0; hr = IMFTopology_GetNodeCount(topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 2, "Unexpected node count %u.\n", node_count);
/* Remove with detached node, existing id. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_TEE_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr); hr = IMFTopologyNode_SetTopoNodeID(node2, id); - ok(hr == S_OK, "Failed to set node id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set node id, hr %#lx.\n", hr); hr = IMFTopology_RemoveNode(topology, node2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); IMFTopologyNode_Release(node2);
hr = IMFTopology_RemoveNode(topology, node); - ok(hr == S_OK, "Failed to remove a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to remove a node, hr %#lx.\n", hr);
node_count = 0; hr = IMFTopology_GetNodeCount(topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 1, "Unexpected node count %u.\n", node_count);
hr = IMFTopology_Clear(topology); - ok(hr == S_OK, "Failed to clear topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear topology, hr %#lx.\n", hr);
node_count = 1; hr = IMFTopology_GetNodeCount(topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 0, "Unexpected node count %u.\n", node_count);
hr = IMFTopology_Clear(topology); - ok(hr == S_OK, "Failed to clear topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear topology, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetTopoNodeID(node, 123); - ok(hr == S_OK, "Failed to set node id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set node id, hr %#lx.\n", hr);
IMFTopologyNode_Release(node);
/* Change id for attached node. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_TEE_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, node2); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetTopoNodeID(node, &id); - ok(hr == S_OK, "Failed to get node id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node id, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetTopoNodeID(node2, id); - ok(hr == S_OK, "Failed to get node id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node id, hr %#lx.\n", hr);
hr = IMFTopology_GetNodeByID(topology, id, &node3); - ok(hr == S_OK, "Failed to get a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a node, hr %#lx.\n", hr); ok(node3 == node, "Unexpected node.\n"); IMFTopologyNode_Release(node3);
@@ -397,33 +397,33 @@ static void test_topology(void)
/* Source/output collections. */ hr = IMFTopology_Clear(topology); - ok(hr == S_OK, "Failed to clear topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear topology, hr %#lx.\n", hr);
hr = IMFTopology_GetSourceNodeCollection(topology, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTopology_GetSourceNodeCollection(topology, &collection); - ok(hr == S_OK, "Failed to get source node collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get source node collection, hr %#lx.\n", hr); ok(!!collection, "Unexpected object pointer.\n");
hr = IMFTopology_GetSourceNodeCollection(topology, &collection2); - ok(hr == S_OK, "Failed to get source node collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get source node collection, hr %#lx.\n", hr); ok(!!collection2, "Unexpected object pointer.\n"); ok(collection2 != collection, "Expected cloned collection.\n");
hr = IMFCollection_GetElementCount(collection, &size); - ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item count, hr %#lx.\n", hr); ok(!size, "Unexpected item count.\n");
hr = IMFCollection_AddElement(collection, (IUnknown *)collection); - ok(hr == S_OK, "Failed to add element, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add element, hr %#lx.\n", hr);
hr = IMFCollection_GetElementCount(collection, &size); - ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item count, hr %#lx.\n", hr); ok(size == 1, "Unexpected item count.\n");
hr = IMFCollection_GetElementCount(collection2, &size); - ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item count, hr %#lx.\n", hr); ok(!size, "Unexpected item count.\n");
IMFCollection_Release(collection2); @@ -431,253 +431,253 @@ static void test_topology(void)
/* Add some nodes. */ hr = IMFTopology_GetSourceNodeCollection(topology, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFTopology_GetOutputNodeCollection(topology, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node); - ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a node, hr %#lx.\n", hr); hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr); IMFTopologyNode_Release(node);
hr = IMFTopology_GetSourceNodeCollection(topology, &collection); - ok(hr == S_OK, "Failed to get source node collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get source node collection, hr %#lx.\n", hr); ok(!!collection, "Unexpected object pointer.\n"); hr = IMFCollection_GetElementCount(collection, &size); - ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item count, hr %#lx.\n", hr); ok(size == 1, "Unexpected item count.\n"); IMFCollection_Release(collection);
hr = MFCreateTopologyNode(MF_TOPOLOGY_TEE_NODE, &node); - ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a node, hr %#lx.\n", hr); hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr); IMFTopologyNode_Release(node);
hr = IMFTopology_GetSourceNodeCollection(topology, &collection); - ok(hr == S_OK, "Failed to get source node collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get source node collection, hr %#lx.\n", hr); ok(!!collection, "Unexpected object pointer.\n"); hr = IMFCollection_GetElementCount(collection, &size); - ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item count, hr %#lx.\n", hr); ok(size == 1, "Unexpected item count.\n"); IMFCollection_Release(collection);
hr = MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &node); - ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a node, hr %#lx.\n", hr); hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr); IMFTopologyNode_Release(node);
hr = IMFTopology_GetSourceNodeCollection(topology, &collection); - ok(hr == S_OK, "Failed to get source node collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get source node collection, hr %#lx.\n", hr); ok(!!collection, "Unexpected object pointer.\n"); hr = IMFCollection_GetElementCount(collection, &size); - ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item count, hr %#lx.\n", hr); ok(size == 1, "Unexpected item count.\n"); IMFCollection_Release(collection);
hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node); - ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a node, hr %#lx.\n", hr); hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
/* Associated object. */ hr = IMFTopologyNode_SetObject(node, NULL); - ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set object, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetObject(node, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
object = (void *)0xdeadbeef; hr = IMFTopologyNode_GetObject(node, &object); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr); ok(!object, "Unexpected object %p.\n", object);
hr = IMFTopologyNode_SetObject(node, &test_unk); - ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set object, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetObject(node, &object); - ok(hr == S_OK, "Failed to get object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get object, hr %#lx.\n", hr); ok(object == &test_unk, "Unexpected object %p.\n", object); IUnknown_Release(object);
hr = IMFTopologyNode_SetObject(node, &test_unk2); - ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set object, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetCount(node, &count); - ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr); ok(count == 0, "Unexpected attribute count %u.\n", count);
hr = IMFTopologyNode_SetGUID(node, &MF_TOPONODE_TRANSFORM_OBJECTID, &MF_TOPONODE_TRANSFORM_OBJECTID); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetObject(node, NULL); - ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set object, hr %#lx.\n", hr);
object = (void *)0xdeadbeef; hr = IMFTopologyNode_GetObject(node, &object); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr); ok(!object, "Unexpected object %p.\n", object);
hr = IMFTopologyNode_GetCount(node, &count); - ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr); ok(count == 1, "Unexpected attribute count %u.\n", count);
/* Preferred stream types. */ hr = IMFTopologyNode_GetInputCount(node, &io_count); - ok(hr == S_OK, "Failed to get input count, hr %#x.\n", hr); - ok(io_count == 0, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get input count, hr %#lx.\n", hr); + ok(io_count == 0, "Unexpected count %lu.\n", io_count);
hr = IMFTopologyNode_GetInputPrefType(node, 0, &mediatype); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetInputPrefType(node, 0, mediatype); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputPrefType(node, 0, &mediatype2); - ok(hr == S_OK, "Failed to get preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get preferred type, hr %#lx.\n", hr); ok(mediatype2 == mediatype, "Unexpected mediatype instance.\n"); IMFMediaType_Release(mediatype2);
hr = IMFTopologyNode_SetInputPrefType(node, 0, NULL); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputPrefType(node, 0, &mediatype2); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr); ok(!mediatype2, "Unexpected mediatype instance.\n");
hr = IMFTopologyNode_SetInputPrefType(node, 1, mediatype); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetInputPrefType(node, 1, mediatype); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputCount(node, &io_count); - ok(hr == S_OK, "Failed to get input count, hr %#x.\n", hr); - ok(io_count == 2, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get input count, hr %#lx.\n", hr); + ok(io_count == 2, "Unexpected count %lu.\n", io_count);
hr = IMFTopologyNode_GetOutputCount(node, &io_count); - ok(hr == S_OK, "Failed to get input count, hr %#x.\n", hr); - ok(io_count == 0, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get input count, hr %#lx.\n", hr); + ok(io_count == 0, "Unexpected count %lu.\n", io_count);
hr = IMFTopologyNode_SetOutputPrefType(node, 0, mediatype); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
IMFTopologyNode_Release(node);
/* Source node. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node); - ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a node, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetInputPrefType(node, 0, mediatype); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_SetOutputPrefType(node, 2, mediatype); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetOutputPrefType(node, 0, &mediatype2); - ok(hr == E_FAIL, "Failed to get preferred type, hr %#x.\n", hr); + ok(hr == E_FAIL, "Failed to get preferred type, hr %#lx.\n", hr); ok(!mediatype2, "Unexpected mediatype instance.\n");
hr = IMFTopologyNode_GetOutputCount(node, &io_count); - ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(io_count == 3, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get output count, hr %#lx.\n", hr); + ok(io_count == 3, "Unexpected count %lu.\n", io_count);
IMFTopologyNode_Release(node);
/* Tee node. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_TEE_NODE, &node); - ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a node, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetInputPrefType(node, 0, mediatype); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputPrefType(node, 0, &mediatype2); - ok(hr == S_OK, "Failed to get preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get preferred type, hr %#lx.\n", hr); ok(mediatype2 == mediatype, "Unexpected mediatype instance.\n"); IMFMediaType_Release(mediatype2);
hr = IMFTopologyNode_GetOutputPrefType(node, 0, &mediatype2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputCount(node, &io_count); - ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(io_count == 0, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get output count, hr %#lx.\n", hr); + ok(io_count == 0, "Unexpected count %lu.\n", io_count);
hr = IMFTopologyNode_SetInputPrefType(node, 1, mediatype); - ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_SetInputPrefType(node, 3, mediatype); - ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_SetOutputPrefType(node, 4, mediatype); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetOutputPrefType(node, 0, &mediatype2); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&mediatype2); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
/* Changing output type does not change input type. */ hr = IMFTopologyNode_SetOutputPrefType(node, 4, mediatype2); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputPrefType(node, 0, &mediatype3); - ok(hr == S_OK, "Failed to get preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get preferred type, hr %#lx.\n", hr); ok(mediatype3 == mediatype, "Unexpected mediatype instance.\n"); IMFMediaType_Release(mediatype3);
IMFMediaType_Release(mediatype2);
hr = IMFTopologyNode_GetInputCount(node, &io_count); - ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(io_count == 0, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get output count, hr %#lx.\n", hr); + ok(io_count == 0, "Unexpected count %lu.\n", io_count);
hr = IMFTopologyNode_GetOutputCount(node, &io_count); - ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(io_count == 5, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get output count, hr %#lx.\n", hr); + ok(io_count == 5, "Unexpected count %lu.\n", io_count);
IMFTopologyNode_Release(node);
/* Transform node. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &node); - ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a node, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetInputPrefType(node, 3, mediatype); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputCount(node, &io_count); - ok(hr == S_OK, "Failed to get input count, hr %#x.\n", hr); - ok(io_count == 4, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get input count, hr %#lx.\n", hr); + ok(io_count == 4, "Unexpected count %lu.\n", io_count);
hr = IMFTopologyNode_SetOutputPrefType(node, 4, mediatype); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputCount(node, &io_count); - ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(io_count == 4, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get output count, hr %#lx.\n", hr); + ok(io_count == 4, "Unexpected count %lu.\n", io_count);
hr = IMFTopologyNode_GetOutputCount(node, &io_count); - ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); - ok(io_count == 5, "Unexpected count %u.\n", io_count); + ok(hr == S_OK, "Failed to get output count, hr %#lx.\n", hr); + ok(io_count == 5, "Unexpected count %lu.\n", io_count);
IMFTopologyNode_Release(node);
IMFMediaType_Release(mediatype);
hr = IMFTopology_GetOutputNodeCollection(topology, &collection); - ok(hr == S_OK || broken(hr == E_FAIL) /* before Win8 */, "Failed to get output node collection, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_FAIL) /* before Win8 */, "Failed to get output node collection, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(!!collection, "Unexpected object pointer.\n"); hr = IMFCollection_GetElementCount(collection, &size); - ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item count, hr %#lx.\n", hr); ok(size == 1, "Unexpected item count.\n"); IMFCollection_Release(collection); } @@ -686,16 +686,16 @@ static void test_topology(void)
/* Connect nodes. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
EXPECT_REF(node, 1); EXPECT_REF(node2, 1);
hr = IMFTopologyNode_ConnectOutput(node, 0, node2, 1); - ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to connect nodes, hr %#lx.\n", hr);
EXPECT_REF(node, 2); EXPECT_REF(node2, 2); @@ -711,68 +711,68 @@ static void test_topology(void) EXPECT_REF(node2, 1);
hr = IMFTopologyNode_GetNodeType(node2, &node_type); - ok(hr == S_OK, "Failed to get node type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node type, hr %#lx.\n", hr);
IMFTopologyNode_Release(node);
/* Connect within topology. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateTopology(&topology); - ok(hr == S_OK, "Failed to create topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology, hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, node2); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
EXPECT_REF(node, 2); EXPECT_REF(node2, 2);
hr = IMFTopologyNode_ConnectOutput(node, 0, node2, 1); - ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to connect nodes, hr %#lx.\n", hr);
EXPECT_REF(node, 3); EXPECT_REF(node2, 3);
hr = IMFTopology_Clear(topology); - ok(hr == S_OK, "Failed to clear topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear topology, hr %#lx.\n", hr);
EXPECT_REF(node, 1); EXPECT_REF(node2, 1);
/* Removing connected node breaks connection. */ hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, node2); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
hr = IMFTopologyNode_ConnectOutput(node, 0, node2, 1); - ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to connect nodes, hr %#lx.\n", hr);
hr = IMFTopology_RemoveNode(topology, node); - ok(hr == S_OK, "Failed to remove a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to remove a node, hr %#lx.\n", hr);
EXPECT_REF(node, 1); EXPECT_REF(node2, 2);
hr = IMFTopologyNode_GetOutput(node, 0, &node3, &index); - ok(hr == MF_E_NOT_FOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_FOUND, "Unexpected hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
hr = IMFTopologyNode_ConnectOutput(node, 0, node2, 1); - ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to connect nodes, hr %#lx.\n", hr);
hr = IMFTopology_RemoveNode(topology, node2); - ok(hr == S_OK, "Failed to remove a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to remove a node, hr %#lx.\n", hr);
EXPECT_REF(node, 2); EXPECT_REF(node2, 1); @@ -782,32 +782,32 @@ static void test_topology(void)
/* Cloning nodes of different types. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = IMFTopologyNode_CloneFrom(node, node2); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
IMFTopologyNode_Release(node2);
/* Cloning preferred types. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetOutputPrefType(node2, 0, mediatype); - ok(hr == S_OK, "Failed to set preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set preferred type, hr %#lx.\n", hr);
/* Vista checks for additional attributes. */ hr = IMFTopologyNode_CloneFrom(node, node2); - ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Vista */, "Failed to clone a node, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Vista */, "Failed to clone a node, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetOutputPrefType(node, 0, &mediatype2); - ok(hr == S_OK, "Failed to get preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get preferred type, hr %#lx.\n", hr); ok(mediatype == mediatype2, "Unexpected media type.\n");
IMFMediaType_Release(mediatype2); @@ -817,29 +817,29 @@ static void test_topology(void)
/* Existing preferred types are not cleared. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetOutputCount(node, &io_count); - ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get output count, hr %#lx.\n", hr); ok(io_count == 1, "Unexpected output count.\n");
hr = IMFTopologyNode_CloneFrom(node, node2); - ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Vista */, "Failed to clone a node, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Vista */, "Failed to clone a node, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetOutputCount(node, &io_count); - ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get output count, hr %#lx.\n", hr); ok(io_count == 1, "Unexpected output count.\n");
hr = IMFTopologyNode_GetOutputPrefType(node, 0, &mediatype2); - ok(hr == S_OK, "Failed to get preferred type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get preferred type, hr %#lx.\n", hr); ok(!!mediatype2, "Unexpected media type.\n"); IMFMediaType_Release(mediatype2);
hr = IMFTopologyNode_CloneFrom(node2, node); - ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Vista */, "Failed to clone a node, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Vista */, "Failed to clone a node, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetOutputCount(node2, &io_count); - ok(hr == S_OK, "Failed to get output count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get output count, hr %#lx.\n", hr); ok(io_count == 1, "Unexpected output count.\n");
IMFTopologyNode_Release(node2); @@ -847,26 +847,26 @@ static void test_topology(void)
/* Add one node, connect to another that hasn't been added. */ hr = IMFTopology_Clear(topology); - ok(hr == S_OK, "Failed to clear topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear topology, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node2); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
hr = IMFTopology_GetNodeCount(topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 1, "Unexpected node count.\n");
hr = IMFTopologyNode_ConnectOutput(node, 0, node2, 0); - ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to connect nodes, hr %#lx.\n", hr);
hr = IMFTopology_GetNodeCount(topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 1, "Unexpected node count.\n");
IMFTopologyNode_Release(node); @@ -874,36 +874,36 @@ static void test_topology(void)
/* Add same node to different topologies. */ hr = IMFTopology_Clear(topology); - ok(hr == S_OK, "Failed to clear topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear topology, hr %#lx.\n", hr);
hr = MFCreateTopology(&topology2); - ok(hr == S_OK, "Failed to create topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr); EXPECT_REF(node, 2);
hr = IMFTopology_GetNodeCount(topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 1, "Unexpected node count.\n");
hr = IMFTopology_GetNodeCount(topology2, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 0, "Unexpected node count.\n");
hr = IMFTopology_AddNode(topology2, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr); EXPECT_REF(node, 3);
hr = IMFTopology_GetNodeCount(topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 1, "Unexpected node count.\n");
hr = IMFTopology_GetNodeCount(topology2, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); ok(node_count == 1, "Unexpected node count.\n");
IMFTopology_Release(topology2); @@ -919,54 +919,54 @@ static void test_topology_tee_node(void) HRESULT hr;
hr = MFCreateTopology(&topology); - ok(hr == S_OK, "Failed to create topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology, hr %#lx.\n", hr);
hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_TEE_NODE, &tee_node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &src_node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetInputPrefType(tee_node, 0, mediatype); - ok(hr == S_OK, "Failed to set type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set type, hr %#lx.\n", hr);
/* Even though tee node has only one input and source has only one output, it's possible to connect to higher inputs/outputs. */
/* SRC(0) -> TEE(0) */ hr = IMFTopologyNode_ConnectOutput(src_node, 0, tee_node, 0); - ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to connect nodes, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputCount(tee_node, &count); - ok(hr == S_OK, "Failed to get count, hr %#x.\n", hr); - ok(count == 1, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get count, hr %#lx.\n", hr); + ok(count == 1, "Unexpected count %lu.\n", count);
hr = IMFTopologyNode_GetInputPrefType(tee_node, 0, &mediatype2); - ok(hr == S_OK, "Failed to get type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type, hr %#lx.\n", hr); ok(mediatype2 == mediatype, "Unexpected type.\n"); IMFMediaType_Release(mediatype2);
/* SRC(0) -> TEE(1) */ hr = IMFTopologyNode_ConnectOutput(src_node, 0, tee_node, 1); - ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to connect nodes, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetInputCount(tee_node, &count); - ok(hr == S_OK, "Failed to get count, hr %#x.\n", hr); - ok(count == 2, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get count, hr %#lx.\n", hr); + ok(count == 2, "Unexpected count %lu.\n", count);
hr = IMFTopologyNode_SetInputPrefType(tee_node, 1, mediatype); - ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#lx.\n", hr);
/* SRC(1) -> TEE(1) */ hr = IMFTopologyNode_ConnectOutput(src_node, 1, tee_node, 1); - ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to connect nodes, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetOutputCount(src_node, &count); - ok(hr == S_OK, "Failed to get count, hr %#x.\n", hr); - ok(count == 2, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get count, hr %#lx.\n", hr); + ok(count == 2, "Unexpected count %lu.\n", count);
IMFMediaType_Release(mediatype); IMFTopologyNode_Release(src_node); @@ -1079,24 +1079,24 @@ static void test_MFGetService(void) HRESULT hr;
hr = MFGetService(NULL, NULL, NULL, NULL); - ok(hr == E_POINTER, "Unexpected return value %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected return value %#lx.\n", hr);
unk = (void *)0xdeadbeef; hr = MFGetService(NULL, NULL, NULL, (void **)&unk); - ok(hr == E_POINTER, "Unexpected return value %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected return value %#lx.\n", hr); ok(unk == (void *)0xdeadbeef, "Unexpected out object.\n");
hr = MFGetService(&testservice, NULL, NULL, NULL); - ok(hr == 0x82eddead, "Unexpected return value %#x.\n", hr); + ok(hr == 0x82eddead, "Unexpected return value %#lx.\n", hr);
unk = (void *)0xdeadbeef; hr = MFGetService(&testservice, NULL, NULL, (void **)&unk); - ok(hr == 0x82eddead, "Unexpected return value %#x.\n", hr); + ok(hr == 0x82eddead, "Unexpected return value %#lx.\n", hr); ok(unk == (void *)0xdeadbeef, "Unexpected out object.\n");
unk = NULL; hr = MFGetService(&testservice2, NULL, NULL, (void **)&unk); - ok(hr == 0x83eddead, "Unexpected return value %#x.\n", hr); + ok(hr == 0x83eddead, "Unexpected return value %#lx.\n", hr); ok(unk == (void *)0xdeadbeef, "Unexpected out object.\n"); }
@@ -1106,17 +1106,17 @@ static void test_sequencer_source(void) HRESULT hr;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Startup failure, hr %#x.\n", hr); + ok(hr == S_OK, "Startup failure, hr %#lx.\n", hr);
hr = MFCreateSequencerSource(NULL, &seq_source); - ok(hr == S_OK, "Failed to create sequencer source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create sequencer source, hr %#lx.\n", hr);
check_interface(seq_source, &IID_IMFMediaSourceTopologyProvider, TRUE);
IMFSequencerSource_Release(seq_source);
hr = MFShutdown(); - ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr); + ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr); }
struct test_callback @@ -1186,40 +1186,40 @@ static void test_session_events(IMFMediaSession *session) init_test_callback(&callback2);
hr = IMFMediaSession_GetEvent(session, MF_EVENT_FLAG_NO_WAIT, &event); - ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Unexpected hr %#lx.\n", hr);
/* Async case. */ hr = IMFMediaSession_BeginGetEvent(session, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_BeginGetEvent(session, &callback.IMFAsyncCallback_iface, (IUnknown *)session); - ok(hr == S_OK, "Failed to Begin*, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to Begin*, hr %#lx.\n", hr);
/* Same callback, same state. */ hr = IMFMediaSession_BeginGetEvent(session, &callback.IMFAsyncCallback_iface, (IUnknown *)session); - ok(hr == MF_S_MULTIPLE_BEGIN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_S_MULTIPLE_BEGIN, "Unexpected hr %#lx.\n", hr);
/* Same callback, different state. */ hr = IMFMediaSession_BeginGetEvent(session, &callback.IMFAsyncCallback_iface, (IUnknown *)&callback.IMFAsyncCallback_iface); - ok(hr == MF_E_MULTIPLE_BEGIN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_MULTIPLE_BEGIN, "Unexpected hr %#lx.\n", hr);
/* Different callback, same state. */ hr = IMFMediaSession_BeginGetEvent(session, &callback2.IMFAsyncCallback_iface, (IUnknown *)session); - ok(hr == MF_E_MULTIPLE_SUBSCRIBERS, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_MULTIPLE_SUBSCRIBERS, "Unexpected hr %#lx.\n", hr);
/* Different callback, different state. */ hr = IMFMediaSession_BeginGetEvent(session, &callback2.IMFAsyncCallback_iface, (IUnknown *)&callback.IMFAsyncCallback_iface); - ok(hr == MF_E_MULTIPLE_SUBSCRIBERS, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_MULTIPLE_SUBSCRIBERS, "Unexpected hr %#lx.\n", hr);
hr = MFCreateAsyncResult(NULL, &callback.IMFAsyncCallback_iface, NULL, &result); - ok(hr == S_OK, "Failed to create result, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create result, hr %#lx.\n", hr);
hr = IMFMediaSession_EndGetEvent(session, result, &event); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
/* Shutdown behavior. */ hr = IMFMediaSession_Shutdown(session); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr); }
static void test_media_session(void) @@ -1237,10 +1237,10 @@ static void test_media_session(void) HRESULT hr;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Startup failure, hr %#x.\n", hr); + ok(hr == S_OK, "Startup failure, hr %#lx.\n", hr);
hr = MFCreateMediaSession(NULL, &session); - ok(hr == S_OK, "Failed to create media session, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media session, hr %#lx.\n", hr);
check_interface(session, &IID_IMFGetService, TRUE); check_interface(session, &IID_IMFRateSupport, TRUE); @@ -1254,100 +1254,100 @@ static void test_media_session(void) check_service_interface(session, &MF_LOCAL_MFT_REGISTRATION_SERVICE, &IID_IMFLocalMFTRegistration, TRUE);
hr = IMFMediaSession_GetClock(session, &clock); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFClock_QueryInterface(clock, &IID_IMFShutdown, (void **)&shutdown); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFShutdown_GetShutdownStatus(shutdown, &status); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_Shutdown(session); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
check_interface(session, &IID_IMFGetService, TRUE);
hr = IMFMediaSession_QueryInterface(session, &IID_IMFGetService, (void **)&gs); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFGetService_GetService(gs, &MF_RATE_CONTROL_SERVICE, &IID_IMFRateSupport, (void **)&rate_support); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
IMFGetService_Release(gs);
hr = IMFShutdown_GetShutdownStatus(shutdown, &status); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(status == MFSHUTDOWN_COMPLETED, "Unexpected shutdown status %u.\n", status);
IMFShutdown_Release(shutdown);
hr = IMFMediaSession_ClearTopologies(session); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_Start(session, &GUID_NULL, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
propvar.vt = VT_EMPTY; hr = IMFMediaSession_Start(session, &GUID_NULL, &propvar); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_Pause(session); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_Stop(session); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_Close(session); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_GetClock(session, &clock); - ok(hr == MF_E_SHUTDOWN || broken(hr == E_UNEXPECTED) /* Win7 */, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN || broken(hr == E_UNEXPECTED) /* Win7 */, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_GetSessionCapabilities(session, &caps); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_GetSessionCapabilities(session, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_GetFullTopology(session, MFSESSION_GETFULLTOPOLOGY_CURRENT, 0, &topology); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSession_Shutdown(session); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
IMFMediaSession_Release(session);
/* Custom topology loader, GUID is not registered. */ hr = MFCreateAttributes(&attributes, 1); - ok(hr == S_OK, "Failed to create attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create attributes, hr %#lx.\n", hr);
hr = IMFAttributes_SetGUID(attributes, &MF_SESSION_TOPOLOADER, &MF_SESSION_TOPOLOADER); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = MFCreateMediaSession(attributes, &session); - ok(hr == S_OK, "Failed to create media session, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media session, hr %#lx.\n", hr); IMFMediaSession_Release(session);
/* Disabled quality manager. */ hr = IMFAttributes_SetGUID(attributes, &MF_SESSION_QUALITY_MANAGER, &GUID_NULL); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = MFCreateMediaSession(attributes, &session); - ok(hr == S_OK, "Failed to create media session, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media session, hr %#lx.\n", hr); IMFMediaSession_Release(session);
IMFAttributes_Release(attributes);
/* Basic events behavior. */ hr = MFCreateMediaSession(NULL, &session); - ok(hr == S_OK, "Failed to create media session, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media session, hr %#lx.\n", hr);
test_session_events(session);
IMFMediaSession_Release(session);
hr = MFShutdown(); - ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr); + ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr); }
static void test_media_session_rate_control(void) @@ -1364,70 +1364,70 @@ static void test_media_session_rate_control(void) BOOL thin;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Startup failure, hr %#x.\n", hr); + ok(hr == S_OK, "Startup failure, hr %#lx.\n", hr);
hr = MFCreateMediaSession(NULL, &session); - ok(hr == S_OK, "Failed to create media session, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media session, hr %#lx.\n", hr);
hr = MFGetService((IUnknown *)session, &MF_RATE_CONTROL_SERVICE, &IID_IMFRateSupport, (void **)&rate_support); - ok(hr == S_OK, "Failed to get rate support interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get rate support interface, hr %#lx.\n", hr);
hr = MFGetService((IUnknown *)session, &MF_RATE_CONTROL_SERVICE, &IID_IMFRateControl, (void **)&rate_control); - ok(hr == S_OK, "Failed to get rate control interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get rate control interface, hr %#lx.\n", hr);
hr = IMFRateControl_GetRate(rate_control, NULL, NULL); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
rate = 0.0f; hr = IMFRateControl_GetRate(rate_control, NULL, &rate); - ok(hr == S_OK, "Failed to get playback rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get playback rate, hr %#lx.\n", hr); ok(rate == 1.0f, "Unexpected rate %f.\n", rate);
hr = IMFRateControl_GetRate(rate_control, &thin, NULL); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
thin = TRUE; rate = 0.0f; hr = IMFRateControl_GetRate(rate_control, &thin, &rate); - ok(hr == S_OK, "Failed to get playback rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get playback rate, hr %#lx.\n", hr); ok(!thin, "Unexpected thinning.\n"); ok(rate == 1.0f, "Unexpected rate %f.\n", rate);
hr = IMFMediaSession_GetClock(session, &clock); - ok(hr == S_OK, "Failed to get clock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock, hr %#lx.\n", hr);
hr = IMFClock_QueryInterface(clock, &IID_IMFPresentationClock, (void **)&presentation_clock); - ok(hr == S_OK, "Failed to get rate control, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get rate control, hr %#lx.\n", hr);
hr = IMFClock_QueryInterface(clock, &IID_IMFRateControl, (void **)&clock_rate_control); - ok(hr == S_OK, "Failed to get rate control, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get rate control, hr %#lx.\n", hr);
rate = 0.0f; hr = IMFRateControl_GetRate(clock_rate_control, NULL, &rate); - ok(hr == S_OK, "Failed to get clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock rate, hr %#lx.\n", hr); ok(rate == 1.0f, "Unexpected rate %f.\n", rate);
hr = IMFRateControl_SetRate(clock_rate_control, FALSE, 1.5f); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFRateControl_SetRate(rate_control, FALSE, 1.5f); - ok(hr == S_OK, "Failed to set rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set rate, hr %#lx.\n", hr);
hr = IMFClock_GetProperties(clock, &clock_props); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = MFCreateSystemTimeSource(&time_source); - ok(hr == S_OK, "Failed to create time source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create time source, hr %#lx.\n", hr);
hr = IMFPresentationClock_SetTimeSource(presentation_clock, time_source); - ok(hr == S_OK, "Failed to set time source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set time source, hr %#lx.\n", hr);
hr = IMFRateControl_SetRate(rate_control, FALSE, 1.5f); - ok(hr == S_OK, "Failed to set rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set rate, hr %#lx.\n", hr);
rate = 0.0f; hr = IMFRateControl_GetRate(clock_rate_control, NULL, &rate); - ok(hr == S_OK, "Failed to get clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock rate, hr %#lx.\n", hr); ok(rate == 1.0f, "Unexpected rate %f.\n", rate);
IMFPresentationTimeSource_Release(time_source); @@ -1442,7 +1442,7 @@ static void test_media_session_rate_control(void) IMFMediaSession_Release(session);
hr = MFShutdown(); - ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr); + ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr); }
static HRESULT WINAPI test_grabber_callback_QueryInterface(IMFSampleGrabberSinkCallback *iface, REFIID riid, @@ -1671,12 +1671,12 @@ static void init_media_type(IMFMediaType *mediatype, const struct attribute_desc ULONG i;
hr = IMFMediaType_DeleteAllItems(mediatype); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < limit && desc[i].key; ++i) { hr = IMFMediaType_SetItem(mediatype, desc[i].key, &desc[i].value); - ok(hr == S_OK, "SetItem %s returned %#x\n", debugstr_a(desc[i].name), hr); + ok(hr == S_OK, "SetItem %s returned %#lx\n", debugstr_a(desc[i].name), hr); } }
@@ -1688,34 +1688,34 @@ static void init_source_node(IMFMediaType *mediatype, IMFMediaSource *source, IM HRESULT hr;
hr = IMFTopologyNode_DeleteAllItems(node); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateStreamDescriptor(0, 1, &mediatype, &sd); - ok(hr == S_OK, "Failed to create stream descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create stream descriptor, hr %#lx.\n", hr);
hr = IMFStreamDescriptor_GetMediaTypeHandler(sd, &handler); - ok(hr == S_OK, "Failed to get media type handler, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get media type handler, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, mediatype); - ok(hr == S_OK, "Failed to set current media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current media type, hr %#lx.\n", hr);
IMFMediaTypeHandler_Release(handler);
hr = MFCreatePresentationDescriptor(1, &sd, &pd); - ok(hr == S_OK, "Failed to create presentation descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create presentation descriptor, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetUnknown(node, &MF_TOPONODE_PRESENTATION_DESCRIPTOR, (IUnknown *)pd); - ok(hr == S_OK, "Failed to set node pd, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set node pd, hr %#lx.\n", hr);
IMFPresentationDescriptor_Release(pd);
hr = IMFTopologyNode_SetUnknown(node, &MF_TOPONODE_STREAM_DESCRIPTOR, (IUnknown *)sd); - ok(hr == S_OK, "Failed to set node sd, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set node sd, hr %#lx.\n", hr);
if (source) { hr = IMFTopologyNode_SetUnknown(node, &MF_TOPONODE_SOURCE, (IUnknown *)source); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); }
IMFStreamDescriptor_Release(sd); @@ -1728,23 +1728,23 @@ static void init_sink_node(IMFActivate *sink_activate, unsigned int method, IMFT HRESULT hr;
hr = IMFTopologyNode_DeleteAllItems(node); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(sink_activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate, hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream_sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaSink_Release(sink);
hr = IMFTopologyNode_SetObject(node, (IUnknown *)stream_sink); - ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set object, hr %#lx.\n", hr);
IMFStreamSink_Release(stream_sink);
hr = IMFTopologyNode_SetUINT32(node, &MF_TOPONODE_CONNECT_METHOD, method); - ok(hr == S_OK, "Failed to set connect method, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set connect method, hr %#lx.\n", hr); }
enum loader_test_flags @@ -1937,102 +1937,102 @@ static void test_topology_loader(void) BOOL ret;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Startup failure, hr %#x.\n", hr); + ok(hr == S_OK, "Startup failure, hr %#lx.\n", hr);
hr = MFCreateTopoLoader(NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = MFCreateTopoLoader(&loader); - ok(hr == S_OK, "Failed to create topology loader, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology loader, hr %#lx.\n", hr);
hr = MFCreateTopology(&topology); - ok(hr == S_OK, "Failed to create topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology, hr %#lx.\n", hr);
/* Empty topology */ hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL); todo_wine - ok(hr == MF_E_TOPO_UNSUPPORTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TOPO_UNSUPPORTED, "Unexpected hr %#lx.\n", hr);
/* Add source node. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &src_node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
/* When a decoder is involved, windows requires this attribute to be present */ source = create_test_source();
hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_SOURCE, (IUnknown *)source); - ok(hr == S_OK, "Failed to set node source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set node source, hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr); hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = MFCreateStreamDescriptor(0, 1, &media_type, &sd); - ok(hr == S_OK, "Failed to create stream descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create stream descriptor, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_STREAM_DESCRIPTOR, (IUnknown *)sd); - ok(hr == S_OK, "Failed to set node sd, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set node sd, hr %#lx.\n", hr);
hr = MFCreatePresentationDescriptor(1, &sd, &pd); - ok(hr == S_OK, "Failed to create presentation descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create presentation descriptor, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetUnknown(src_node, &MF_TOPONODE_PRESENTATION_DESCRIPTOR, (IUnknown *)pd); - ok(hr == S_OK, "Failed to set node pd, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set node pd, hr %#lx.\n", hr);
IMFPresentationDescriptor_Release(pd); IMFStreamDescriptor_Release(sd); IMFMediaType_Release(media_type);
hr = IMFTopology_AddNode(topology, src_node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a node, hr %#lx.\n", hr);
/* Source node only. */ hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL); todo_wine - ok(hr == MF_E_TOPO_UNSUPPORTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TOPO_UNSUPPORTED, "Unexpected hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &sink_node); - ok(hr == S_OK, "Failed to create output node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create output node, hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr); hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = MFCreateSampleGrabberSinkActivate(media_type, &test_grabber_callback, &sink_activate); - ok(hr == S_OK, "Failed to create grabber sink, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create grabber sink, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetObject(sink_node, (IUnknown *)sink_activate); - ok(hr == S_OK, "Failed to set object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set object, hr %#lx.\n", hr);
IMFMediaType_Release(media_type);
hr = IMFTopology_AddNode(topology, sink_node); - ok(hr == S_OK, "Failed to add sink node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add sink node, hr %#lx.\n", hr);
hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL); todo_wine - ok(hr == MF_E_TOPO_UNSUPPORTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TOPO_UNSUPPORTED, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_ConnectOutput(src_node, 0, sink_node, 0); - ok(hr == S_OK, "Failed to connect nodes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to connect nodes, hr %#lx.\n", hr);
/* Sink was not resolved. */ hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL); - ok(hr == MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&input_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = MFCreateMediaType(&output_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(loader_tests); ++i) { @@ -2042,31 +2042,31 @@ static void test_topology_loader(void) init_media_type(output_type, test->output_type, -1);
hr = MFCreateSampleGrabberSinkActivate(output_type, &test_grabber_callback, &sink_activate); - ok(hr == S_OK, "Failed to create grabber sink, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create grabber sink, hr %#lx.\n", hr);
init_source_node(input_type, source, src_node); init_sink_node(sink_activate, test->method, sink_node);
hr = IMFTopology_GetCount(topology, &count); - ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr); ok(!count, "Unexpected count %u.\n", count);
hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL); todo_wine_if(test->flags & LOADER_TODO) - ok(hr == test->expected_result, "Unexpected hr %#x on test %u.\n", hr, i); + ok(hr == test->expected_result, "Unexpected hr %#lx on test %u.\n", hr, i); ok(full_topology != topology, "Unexpected instance.\n");
if (test->expected_result == S_OK && hr == S_OK) { hr = IMFTopology_GetCount(full_topology, &count); - ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr); todo_wine ok(count == 1, "Unexpected count %u.\n", count);
value = 0xdeadbeef; hr = IMFTopology_GetUINT32(full_topology, &MF_TOPOLOGY_RESOLUTION_STATUS, &value); todo_wine { - ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute, hr %#lx.\n", hr); ok(value == MF_TOPOLOGY_RESOLUTION_SUCCEEDED, "Unexpected value %#x.\n", value); } count = 2; @@ -2076,55 +2076,55 @@ todo_wine { count++;
hr = IMFTopology_GetNodeCount(full_topology, &node_count); - ok(hr == S_OK, "Failed to get node count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get node count, hr %#lx.\n", hr); todo_wine_if(test->flags & (LOADER_EXPECTED_CONVERTER | LOADER_EXPECTED_DECODER)) ok(node_count == count, "Unexpected node count %u.\n", node_count);
hr = IMFTopologyNode_GetTopoNodeID(src_node, &node_id); - ok(hr == S_OK, "Failed to get source node id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get source node id, hr %#lx.\n", hr);
hr = IMFTopology_GetNodeByID(full_topology, node_id, &src_node2); - ok(hr == S_OK, "Failed to get source in resolved topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get source in resolved topology, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetTopoNodeID(sink_node, &node_id); - ok(hr == S_OK, "Failed to get sink node id, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sink node id, hr %#lx.\n", hr);
hr = IMFTopology_GetNodeByID(full_topology, node_id, &sink_node2); - ok(hr == S_OK, "Failed to get sink in resolved topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sink in resolved topology, hr %#lx.\n", hr);
if (test->flags & (LOADER_EXPECTED_DECODER | LOADER_EXPECTED_CONVERTER) && strcmp(winetest_platform, "wine")) { hr = IMFTopologyNode_GetOutput(src_node2, 0, &mft_node, &index); - ok(hr == S_OK, "Failed to get transform node in resolved topology, hr %#x.\n", hr); - ok(!index, "Unexpected stream index %u.\n", index); + ok(hr == S_OK, "Failed to get transform node in resolved topology, hr %#lx.\n", hr); + ok(!index, "Unexpected stream index %lu.\n", index);
hr = IMFTopologyNode_GetNodeType(mft_node, &node_type); - ok(hr == S_OK, "Failed to get transform node type in resolved topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get transform node type in resolved topology, hr %#lx.\n", hr); ok(node_type == MF_TOPOLOGY_TRANSFORM_NODE, "Unexpected node type %u.\n", node_type);
hr = IMFTopologyNode_GetObject(mft_node, &node_object); - ok(hr == S_OK, "Failed to get object of transform node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get object of transform node, hr %#lx.\n", hr);
if (test->flags & LOADER_EXPECTED_DECODER) { value = 0; hr = IMFTopologyNode_GetUINT32(mft_node, &MF_TOPONODE_DECODER, &value); - ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute, hr %#lx.\n", hr); ok(value == 1, "Unexpected value.\n"); }
hr = IMFTopologyNode_GetItem(mft_node, &MF_TOPONODE_TRANSFORM_OBJECTID, NULL); - ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute, hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(node_object, &IID_IMFTransform, (void **)&transform); - ok(hr == S_OK, "Failed to get IMFTransform from transform node's object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IMFTransform from transform node's object, hr %#lx.\n", hr); IUnknown_Release(node_object);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type); - ok(hr == S_OK, "Failed to get transform input type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get transform input type, hr %#lx.\n", hr);
hr = IMFMediaType_Compare(input_type, (IMFAttributes *)media_type, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &ret); - ok(hr == S_OK, "Failed to compare media types, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare media types, hr %#lx.\n", hr); ok(ret, "Input type of first transform doesn't match source node type.\n");
IMFTopologyNode_Release(mft_node); @@ -2132,28 +2132,28 @@ todo_wine { IMFTransform_Release(transform);
hr = IMFTopologyNode_GetInput(sink_node2, 0, &mft_node, &index); - ok(hr == S_OK, "Failed to get transform node in resolved topology, hr %#x.\n", hr); - ok(!index, "Unexpected stream index %u.\n", index); + ok(hr == S_OK, "Failed to get transform node in resolved topology, hr %#lx.\n", hr); + ok(!index, "Unexpected stream index %lu.\n", index);
hr = IMFTopologyNode_GetNodeType(mft_node, &node_type); - ok(hr == S_OK, "Failed to get transform node type in resolved topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get transform node type in resolved topology, hr %#lx.\n", hr); ok(node_type == MF_TOPOLOGY_TRANSFORM_NODE, "Unexpected node type %u.\n", node_type);
hr = IMFTopologyNode_GetItem(mft_node, &MF_TOPONODE_TRANSFORM_OBJECTID, NULL); - ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute, hr %#lx.\n", hr);
hr = IMFTopologyNode_GetObject(mft_node, &node_object); - ok(hr == S_OK, "Failed to get object of transform node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get object of transform node, hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(node_object, &IID_IMFTransform, (void**) &transform); - ok(hr == S_OK, "Failed to get IMFTransform from transform node's object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get IMFTransform from transform node's object, hr %#lx.\n", hr); IUnknown_Release(node_object);
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type); - ok(hr == S_OK, "Failed to get transform output type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get transform output type, hr %#lx.\n", hr);
hr = IMFMediaType_Compare(output_type, (IMFAttributes *)media_type, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &ret); - ok(hr == S_OK, "Failed to compare media types, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare media types, hr %#lx.\n", hr); ok(ret, "Output type of last transform doesn't match sink node type.\n");
IMFTopologyNode_Release(mft_node); @@ -2164,19 +2164,19 @@ todo_wine { IMFTopologyNode_Release(sink_node2);
hr = IMFTopology_SetUINT32(full_topology, &IID_IMFTopology, 123); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFTopoLoader_Load(loader, full_topology, &topology2, NULL); - ok(hr == S_OK, "Failed to resolve topology, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resolve topology, hr %#lx.\n", hr); ok(full_topology != topology2, "Unexpected instance.\n"); hr = IMFTopology_GetUINT32(topology2, &IID_IMFTopology, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFTopology_Release(topology2); IMFTopology_Release(full_topology); }
hr = IMFTopology_GetCount(topology, &count); - ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr); ok(!count, "Unexpected count %u.\n", count);
IMFActivate_ShutdownObject(sink_activate); @@ -2190,7 +2190,7 @@ todo_wine { IMFTopoLoader_Release(loader);
hr = MFShutdown(); - ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr); + ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr); }
static void test_topology_loader_evr(void) @@ -2210,26 +2210,26 @@ static void test_topology_loader_evr(void) HRESULT hr;
hr = CoInitialize(NULL); - ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
hr = MFCreateTopoLoader(&loader); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Source node. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_SOURCESTREAM_NODE, &source_node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_RGB32); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_SetUINT64(media_type, &MF_MT_FRAME_SIZE, (UINT64)640 << 32 | 480); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_SetUINT32(media_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
init_source_node(media_type, NULL, source_node);
@@ -2237,51 +2237,51 @@ static void test_topology_loader_evr(void) window = create_window();
hr = MFCreateVideoRendererActivate(window, &activate); - ok(hr == S_OK, "Failed to create activate object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create activate object, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkById(sink, 0, &stream_sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &evr_node); - ok(hr == S_OK, "Failed to create topology node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create topology node, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetObject(evr_node, (IUnknown *)stream_sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamSink_GetMediaTypeHandler(stream_sink, &handler); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFMediaTypeHandler_Release(handler);
IMFStreamSink_Release(stream_sink); IMFMediaSink_Release(sink);
hr = MFCreateTopology(&topology); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopology_AddNode(topology, source_node); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFTopology_AddNode(topology, evr_node); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFTopologyNode_ConnectOutput(source_node, 0, evr_node, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_SetUINT32(evr_node, &MF_TOPONODE_CONNECT_METHOD, MF_CONNECT_DIRECT); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_GetCount(evr_node, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(count == 1, "Unexpected attribute count %u.\n", count);
hr = IMFTopoLoader_Load(loader, topology, &full_topology, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopology_GetNodeCount(full_topology, &node_count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(node_count == 3, "Unexpected node count %u.\n", node_count);
for (i = 0; i < node_count; ++i) @@ -2289,23 +2289,23 @@ static void test_topology_loader_evr(void) MF_TOPOLOGY_TYPE node_type;
hr = IMFTopology_GetNode(full_topology, i, &node); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_GetNodeType(node, &node_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (node_type == MF_TOPOLOGY_OUTPUT_NODE) { value = 1; hr = IMFTopologyNode_GetUINT32(node, &MF_TOPONODE_STREAMID, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!value, "Unexpected stream id %u.\n", value); } else if (node_type == MF_TOPOLOGY_SOURCESTREAM_NODE) { value64 = 1; hr = IMFTopologyNode_GetUINT64(node, &MF_TOPONODE_MEDIASTART, &value64); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!value64, "Unexpected value.\n"); } } @@ -2374,13 +2374,13 @@ static void test_MFShutdownObject(void) HRESULT hr;
hr = MFShutdownObject(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFShutdownObject((IUnknown *)&testshutdown); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
hr = MFShutdownObject(&testshutdown2); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr); }
enum clock_action @@ -2495,10 +2495,10 @@ static void test_presentation_clock(void) BOOL thin;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Failed to start up, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start up, hr %#lx.\n", hr);
hr = MFCreatePresentationClock(&clock); - ok(hr == S_OK, "Failed to create presentation clock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create presentation clock, hr %#lx.\n", hr);
check_interface(clock, &IID_IMFTimer, TRUE); check_interface(clock, &IID_IMFRateControl, TRUE); @@ -2507,115 +2507,115 @@ static void test_presentation_clock(void) check_interface(clock, &IID_IMFClock, TRUE);
hr = IMFPresentationClock_QueryInterface(clock, &IID_IMFRateControl, (void **)&rate_control); - ok(hr == S_OK, "Failed to get rate control interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get rate control interface, hr %#lx.\n", hr);
hr = IMFPresentationClock_GetTimeSource(clock, &time_source); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_GetTimeSource(clock, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_GetClockCharacteristics(clock, &value); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_GetClockCharacteristics(clock, NULL); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_GetTime(clock, &time); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_GetTime(clock, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
value = 1; hr = IMFPresentationClock_GetContinuityKey(clock, &value); - ok(hr == S_OK, "Failed to get continuity key, hr %#x.\n", hr); - ok(value == 0, "Unexpected value %u.\n", value); + ok(hr == S_OK, "Failed to get continuity key, hr %#lx.\n", hr); + ok(value == 0, "Unexpected value %lu.\n", value);
hr = IMFPresentationClock_GetProperties(clock, &props); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_GetState(clock, 0, &state); - ok(hr == S_OK, "Failed to get state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get state, hr %#lx.\n", hr); ok(state == MFCLOCK_STATE_INVALID, "Unexpected state %d.\n", state);
hr = IMFPresentationClock_GetCorrelatedTime(clock, 0, &clock_time, &systime); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_GetCorrelatedTime(clock, 0, NULL, &systime); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_GetCorrelatedTime(clock, 0, &time, NULL); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
/* Sinks. */ hr = IMFPresentationClock_AddClockStateSink(clock, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_AddClockStateSink(clock, &test_sink); - ok(hr == S_OK, "Failed to add a sink, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a sink, hr %#lx.\n", hr);
hr = IMFPresentationClock_AddClockStateSink(clock, &test_sink); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_RemoveClockStateSink(clock, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_RemoveClockStateSink(clock, &test_sink); - ok(hr == S_OK, "Failed to remove sink, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to remove sink, hr %#lx.\n", hr);
hr = IMFPresentationClock_RemoveClockStateSink(clock, &test_sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* State change commands, time source is not set yet. */ hr = IMFPresentationClock_Start(clock, 0); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_Pause(clock); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_Stop(clock); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = IMFRateControl_SetRate(rate_control, FALSE, 0.0f); - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
/* Set default time source. */ hr = MFCreateSystemTimeSource(&time_source); - ok(hr == S_OK, "Failed to create time source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create time source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetClockCharacteristics(time_source, &value); - ok(hr == S_OK, "Failed to get time source flags, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get time source flags, hr %#lx.\n", hr); ok(value == (MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ | MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK), - "Unexpected clock flags %#x.\n", value); + "Unexpected clock flags %#lx.\n", value);
hr = IMFPresentationClock_SetTimeSource(clock, time_source); - ok(hr == S_OK, "Failed to set time source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set time source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetProperties(time_source, &props2); - ok(hr == S_OK, "Failed to get time source properties, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get time source properties, hr %#lx.\n", hr);
hr = IMFPresentationClock_GetClockCharacteristics(clock, &value); - ok(hr == S_OK, "Failed to get clock flags, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock flags, hr %#lx.\n", hr); ok(value == (MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ | MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK), - "Unexpected clock flags %#x.\n", value); + "Unexpected clock flags %#lx.\n", value);
hr = IMFPresentationClock_GetProperties(clock, &props); - ok(hr == S_OK, "Failed to get clock properties, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock properties, hr %#lx.\n", hr); ok(!memcmp(&props, &props2, sizeof(props)), "Unexpected clock properties.\n");
/* Changing rate at initial state. */ hr = IMFPresentationClock_GetState(clock, 0, &state); - ok(hr == S_OK, "Failed to get clock state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock state, hr %#lx.\n", hr); ok(state == MFCLOCK_STATE_INVALID, "Unexpected state %d.\n", state);
hr = IMFRateControl_SetRate(rate_control, FALSE, 0.0f); - ok(hr == S_OK, "Failed to set clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set clock rate, hr %#lx.\n", hr); hr = IMFRateControl_GetRate(rate_control, &thin, &rate); - ok(hr == S_OK, "Failed to get clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock rate, hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate.\n"); hr = IMFRateControl_SetRate(rate_control, FALSE, 1.0f); - ok(hr == S_OK, "Failed to set clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set clock rate, hr %#lx.\n", hr);
/* State changes. */ for (i = 0; i < ARRAY_SIZE(clock_state_change); ++i) @@ -2634,126 +2634,126 @@ static void test_presentation_clock(void) default: ; } - ok(hr == clock_state_change[i].hr, "%u: unexpected hr %#x.\n", i, hr); + ok(hr == clock_state_change[i].hr, "%u: unexpected hr %#lx.\n", i, hr);
hr = IMFPresentationTimeSource_GetState(time_source, 0, &state); - ok(hr == S_OK, "%u: failed to get state, hr %#x.\n", i, hr); + ok(hr == S_OK, "%u: failed to get state, hr %#lx.\n", i, hr); ok(state == clock_state_change[i].source_state, "%u: unexpected state %d.\n", i, state);
hr = IMFPresentationClock_GetState(clock, 0, &state); - ok(hr == S_OK, "%u: failed to get state, hr %#x.\n", i, hr); + ok(hr == S_OK, "%u: failed to get state, hr %#lx.\n", i, hr); ok(state == clock_state_change[i].clock_state, "%u: unexpected state %d.\n", i, state); }
/* Clock time stamps. */ hr = IMFPresentationClock_Start(clock, 10); - ok(hr == S_OK, "Failed to start presentation clock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start presentation clock, hr %#lx.\n", hr);
hr = IMFPresentationClock_Pause(clock); - ok(hr == S_OK, "Failed to pause presentation clock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause presentation clock, hr %#lx.\n", hr);
hr = IMFPresentationClock_GetTime(clock, &time); - ok(hr == S_OK, "Failed to get clock time, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock time, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &clock_time, &systime); - ok(hr == S_OK, "Failed to get time source time, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get time source time, hr %#lx.\n", hr); ok(time == clock_time, "Unexpected clock time.\n");
hr = IMFPresentationClock_GetCorrelatedTime(clock, 0, &time, &systime); - ok(hr == S_OK, "Failed to get clock time, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock time, hr %#lx.\n", hr); ok(time == clock_time, "Unexpected clock time.\n");
IMFPresentationTimeSource_Release(time_source);
hr = IMFRateControl_GetRate(rate_control, NULL, &rate); - ok(hr == S_OK, "Failed to get clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock rate, hr %#lx.\n", hr);
hr = IMFRateControl_GetRate(rate_control, &thin, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFRateControl_GetRate(rate_control, &thin, &rate); - ok(hr == S_OK, "Failed to get clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock rate, hr %#lx.\n", hr); ok(rate == 1.0f, "Unexpected rate.\n"); ok(!thin, "Unexpected thinning.\n");
hr = IMFPresentationClock_GetState(clock, 0, &state); - ok(hr == S_OK, "Failed to get clock state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock state, hr %#lx.\n", hr); ok(state == MFCLOCK_STATE_PAUSED, "Unexpected state %d.\n", state);
hr = IMFPresentationClock_Start(clock, 0); - ok(hr == S_OK, "Failed to stop, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to stop, hr %#lx.\n", hr);
hr = IMFRateControl_SetRate(rate_control, FALSE, 0.0f); - ok(hr == S_OK, "Failed to set clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set clock rate, hr %#lx.\n", hr); hr = IMFRateControl_GetRate(rate_control, &thin, &rate); - ok(hr == S_OK, "Failed to get clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock rate, hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate.\n"); hr = IMFRateControl_SetRate(rate_control, FALSE, 1.0f); - ok(hr == S_OK, "Failed to set clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set clock rate, hr %#lx.\n", hr); hr = IMFRateControl_SetRate(rate_control, FALSE, 0.0f); - ok(hr == S_OK, "Failed to set clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set clock rate, hr %#lx.\n", hr); hr = IMFRateControl_SetRate(rate_control, FALSE, 0.5f); - ok(hr == S_OK, "Failed to set clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set clock rate, hr %#lx.\n", hr); hr = IMFRateControl_SetRate(rate_control, TRUE, -1.0f); - ok(hr == MF_E_THINNING_UNSUPPORTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_THINNING_UNSUPPORTED, "Unexpected hr %#lx.\n", hr); hr = IMFRateControl_SetRate(rate_control, TRUE, 0.0f); - ok(hr == MF_E_THINNING_UNSUPPORTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_THINNING_UNSUPPORTED, "Unexpected hr %#lx.\n", hr); hr = IMFRateControl_SetRate(rate_control, TRUE, 1.0f); - ok(hr == MF_E_THINNING_UNSUPPORTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_THINNING_UNSUPPORTED, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_GetState(clock, 0, &state); - ok(hr == S_OK, "Failed to get clock state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock state, hr %#lx.\n", hr); ok(state == MFCLOCK_STATE_RUNNING, "Unexpected state %d.\n", state);
hr = IMFRateControl_GetRate(rate_control, &thin, &rate); - ok(hr == S_OK, "Failed to get clock rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock rate, hr %#lx.\n", hr); ok(rate == 0.5f, "Unexpected rate.\n"); ok(!thin, "Unexpected thinning.\n");
IMFRateControl_Release(rate_control);
hr = IMFPresentationClock_QueryInterface(clock, &IID_IMFShutdown, (void **)&shutdown); - ok(hr == S_OK, "Failed to get shutdown interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get shutdown interface, hr %#lx.\n", hr);
/* Shutdown behavior. */ hr = IMFShutdown_GetShutdownStatus(shutdown, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFShutdown_GetShutdownStatus(shutdown, &status); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFShutdown_Shutdown(shutdown); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
time_source = NULL; hr = IMFPresentationClock_GetTimeSource(clock, &time_source); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!time_source, "Unexpected instance %p.\n", time_source); IMFPresentationTimeSource_Release(time_source);
hr = IMFPresentationClock_GetTime(clock, &time); - ok(hr == S_OK, "Failed to get time, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get time, hr %#lx.\n", hr);
hr = IMFShutdown_GetShutdownStatus(shutdown, &status); - ok(hr == S_OK, "Failed to get status, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get status, hr %#lx.\n", hr); ok(status == MFSHUTDOWN_COMPLETED, "Unexpected status.\n");
hr = IMFPresentationClock_Start(clock, 0); - ok(hr == S_OK, "Failed to start the clock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start the clock, hr %#lx.\n", hr);
hr = IMFShutdown_GetShutdownStatus(shutdown, &status); - ok(hr == S_OK, "Failed to get status, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get status, hr %#lx.\n", hr); ok(status == MFSHUTDOWN_COMPLETED, "Unexpected status.\n");
hr = IMFShutdown_Shutdown(shutdown); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFShutdown_Release(shutdown);
IMFPresentationClock_Release(clock);
hr = MFShutdown(); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr); }
static HRESULT WINAPI grabber_callback_QueryInterface(IMFSampleGrabberSinkCallback *iface, REFIID riid, void **obj) @@ -2861,33 +2861,33 @@ static void test_sample_grabber(void) GUID guid;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Failed to start up, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start up, hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = MFCreateSampleGrabberSinkActivate(NULL, NULL, &activate); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = MFCreateSampleGrabberSinkActivate(NULL, &grabber_callback, &activate); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr); hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
EXPECT_REF(media_type, 1); hr = MFCreateSampleGrabberSinkActivate(media_type, &grabber_callback, &activate); - ok(hr == S_OK, "Failed to create grabber activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create grabber activate, hr %#lx.\n", hr); EXPECT_REF(media_type, 2);
hr = IMFActivate_GetCount(activate, &attr_count); - ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr); ok(!attr_count, "Unexpected count %u.\n", attr_count);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Failed to activate object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate object, hr %#lx.\n", hr);
check_interface(sink, &IID_IMFClockStateSink, TRUE); check_interface(sink, &IID_IMFMediaEventGenerator, TRUE); @@ -2898,102 +2898,102 @@ static void test_sample_grabber(void) if (SUCCEEDED(MFGetService((IUnknown *)sink, &MF_RATE_CONTROL_SERVICE, &IID_IMFRateSupport, (void **)&rate_support))) { hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == FLT_MAX, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == FLT_MAX, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_REVERSE, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == -FLT_MAX, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_REVERSE, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == -FLT_MAX, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_IsRateSupported(rate_support, TRUE, 1.0f, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 1.0f, "Unexpected rate %f.\n", rate);
IMFRateSupport_Release(rate_support); }
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == S_OK, "Failed to get sink flags, hr %#x.\n", hr); - ok(flags & MEDIASINK_FIXED_STREAMS, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get sink flags, hr %#lx.\n", hr); + ok(flags & MEDIASINK_FIXED_STREAMS, "Unexpected flags %#lx.\n", flags);
hr = IMFMediaSink_GetStreamSinkCount(sink, &count); - ok(hr == S_OK, "Failed to get stream count, hr %#x.\n", hr); - ok(count == 1, "Unexpected stream count %u.\n", count); + ok(hr == S_OK, "Failed to get stream count, hr %#lx.\n", hr); + ok(count == 1, "Unexpected stream count %lu.\n", count);
hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream); - ok(hr == S_OK, "Failed to get sink stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sink stream, hr %#lx.\n", hr);
check_interface(stream, &IID_IMFMediaEventGenerator, TRUE); check_interface(stream, &IID_IMFMediaTypeHandler, TRUE);
hr = IMFStreamSink_GetIdentifier(stream, &id); - ok(hr == S_OK, "Failed to get stream id, hr %#x.\n", hr); - ok(id == 0, "Unexpected id %#x.\n", id); + ok(hr == S_OK, "Failed to get stream id, hr %#lx.\n", hr); + ok(id == 0, "Unexpected id %#lx.\n", id);
hr = IMFStreamSink_GetMediaSink(stream, &sink2); - ok(hr == S_OK, "Failed to get media sink, hr %x.\n", hr); + ok(hr == S_OK, "Failed to get media sink, hr %lx.\n", hr); ok(sink2 == sink, "Unexpected sink.\n"); IMFMediaSink_Release(sink2);
hr = IMFMediaSink_GetStreamSinkByIndex(sink, 1, &stream2); - ok(hr == MF_E_INVALIDINDEX, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDINDEX, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkById(sink, 1, &stream2); - ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_AddStreamSink(sink, 1, NULL, &stream2); - ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_RemoveStreamSink(sink, 0); - ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_RemoveStreamSink(sink, 1); - ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#lx.\n", hr);
check_interface(sink, &IID_IMFClockStateSink, TRUE);
/* Event generator. */ hr = IMFMediaSink_QueryInterface(sink, &IID_IMFMediaEventGenerator, (void **)&eg); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
hr = IMFMediaEventGenerator_GetEvent(eg, MF_EVENT_FLAG_NO_WAIT, &event); - ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFPresentationTimeSource, (void **)&unk); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamSink_QueryInterface(stream, &IID_IMFMediaTypeHandler, (void **)&handler2); - ok(hr == S_OK, "Failed to get handler interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get handler interface, hr %#lx.\n", hr);
hr = IMFStreamSink_GetMediaTypeHandler(stream, &handler); - ok(hr == S_OK, "Failed to get type handler, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type handler, hr %#lx.\n", hr); hr = IMFMediaTypeHandler_GetMediaTypeCount(handler, &count); - ok(hr == S_OK, "Failed to get media type count, hr %#x.\n", hr); - ok(count == 0, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get media type count, hr %#lx.\n", hr); + ok(count == 0, "Unexpected count %lu.\n", count); ok(handler == handler2, "Unexpected handler.\n");
IMFMediaTypeHandler_Release(handler); @@ -3001,276 +3001,276 @@ static void test_sample_grabber(void)
/* Set clock. */ hr = MFCreatePresentationClock(&clock); - ok(hr == S_OK, "Failed to create clock object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create clock object, hr %#lx.\n", hr);
hr = IMFMediaSink_GetPresentationClock(sink, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetPresentationClock(sink, &clock2); - ok(hr == MF_E_NO_CLOCK, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_CLOCK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_SetPresentationClock(sink, NULL); - ok(hr == S_OK, "Failed to set presentation clock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set presentation clock, hr %#lx.\n", hr);
hr = IMFMediaSink_SetPresentationClock(sink, clock); - ok(hr == S_OK, "Failed to set presentation clock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set presentation clock, hr %#lx.\n", hr);
hr = MFCreateSystemTimeSource(&time_source); - ok(hr == S_OK, "Failed to create time source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create time source, hr %#lx.\n", hr);
hr = IMFPresentationClock_SetTimeSource(clock, time_source); - ok(hr == S_OK, "Failed to set time source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set time source, hr %#lx.\n", hr); IMFPresentationTimeSource_Release(time_source);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == S_OK, "Failed to get sink flags, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sink flags, hr %#lx.\n", hr);
hr = IMFActivate_ShutdownObject(activate); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == S_OK, "Failed to get sink flags, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sink flags, hr %#lx.\n", hr);
hr = IMFStreamSink_GetMediaTypeHandler(stream, &handler); - ok(hr == S_OK, "Failed to get type handler, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type handler, hr %#lx.\n", hr);
/* On Win8+ this initialization happens automatically. */ hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeCount(handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeCount(handler, &count); - ok(hr == S_OK, "Failed to get media type count, hr %#x.\n", hr); - ok(count == 0, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get media type count, hr %#lx.\n", hr); + ok(count == 0, "Unexpected count %lu.\n", count);
hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); - ok(hr == S_OK, "Failed to get major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get major type, hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MFMediaType_Audio), "Unexpected major type %s.\n", wine_dbgstr_guid(&guid));
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &media_type2); - ok(hr == S_OK, "Failed to get current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get current type, hr %#lx.\n", hr); ok(media_type2 == media_type, "Unexpected media type.\n"); IMFMediaType_Release(media_type2);
hr = MFCreateMediaType(&media_type2); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type2); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type2, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type2); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type2, &MF_MT_SUBTYPE, &MFAudioFormat_Float); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type2); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type2, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(media_type2, &MF_MT_AUDIO_SAMPLES_PER_SECOND, 44100); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type2); - ok(hr == S_OK, "Failed to get current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get current type, hr %#lx.\n", hr); IMFMediaType_Release(media_type);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &media_type); - ok(hr == S_OK, "Failed to get current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get current type, hr %#lx.\n", hr); ok(media_type2 == media_type, "Unexpected media type.\n"); IMFMediaType_Release(media_type);
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, 0, &media_type); - ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, 0, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type2, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type, NULL); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type, &media_type3); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
media_type3 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type, &media_type3); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(media_type3 == (void *)0xdeadbeef, "Unexpected media type %p.\n", media_type3);
hr = IMFMediaType_SetUINT32(media_type, &MF_MT_FIXED_SIZE_SAMPLES, 1); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(media_type, &MF_MT_SAMPLE_SIZE, 1024); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
media_type3 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type, &media_type3); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(media_type3 == (void *)0xdeadbeef, "Unexpected media type %p.\n", media_type3);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, NULL, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaEventGenerator_GetEvent(eg, MF_EVENT_FLAG_NO_WAIT, &event); - ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamSink_GetEvent(stream, MF_EVENT_FLAG_NO_WAIT, &event); - ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_EVENTS_AVAILABLE, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(clock, 3); hr = IMFMediaSink_Shutdown(sink); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr); EXPECT_REF(clock, 1);
hr = IMFMediaEventGenerator_GetEvent(eg, MF_EVENT_FLAG_NO_WAIT, &event); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_Shutdown(sink); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_AddStreamSink(sink, 1, NULL, &stream2); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkCount(sink, &count); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream2); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamSink_GetEvent(stream, MF_EVENT_FLAG_NO_WAIT, &event); - ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamSink_GetMediaSink(stream, &sink2); - ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#lx.\n", hr);
id = 1; hr = IMFStreamSink_GetIdentifier(stream, &id); - ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#x.\n", hr); - ok(id == 1, "Unexpected id %u.\n", id); + ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#lx.\n", hr); + ok(id == 1, "Unexpected id %lu.\n", id);
media_type3 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type, &media_type3); - ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#lx.\n", hr); ok(media_type3 == (void *)0xdeadbeef, "Unexpected media type %p.\n", media_type3);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, NULL, NULL); - ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, NULL); - ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeCount(handler, &count); - ok(hr == S_OK, "Failed to get type count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type count, hr %#lx.\n", hr);
IMFMediaType_Release(media_type2); IMFMediaType_Release(media_type);
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, 0, &media_type); - ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &media_type); - ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMajorType(handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); - ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#lx.\n", hr);
IMFMediaTypeHandler_Release(handler);
handler = (void *)0xdeadbeef; hr = IMFStreamSink_GetMediaTypeHandler(stream, &handler); - ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINK_REMOVED, "Unexpected hr %#lx.\n", hr); ok(handler == (void *)0xdeadbeef, "Unexpected pointer.\n");
hr = IMFStreamSink_GetMediaTypeHandler(stream, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IMFMediaEventGenerator_Release(eg); IMFMediaSink_Release(sink); IMFStreamSink_Release(stream);
refcount = IMFActivate_Release(activate); - ok(!refcount, "Unexpected refcount %u.\n", refcount); + ok(!refcount, "Unexpected refcount %lu.\n", refcount);
/* Rateless mode with MF_SAMPLEGRABBERSINK_IGNORE_CLOCK. */ hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr); hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = MFCreateSampleGrabberSinkActivate(media_type, &grabber_callback, &activate); - ok(hr == S_OK, "Failed to create grabber activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create grabber activate, hr %#lx.\n", hr);
hr = IMFActivate_SetUINT32(activate, &MF_SAMPLEGRABBERSINK_IGNORE_CLOCK, 1); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Failed to activate object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate object, hr %#lx.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == S_OK, "Failed to get sink flags, hr %#x.\n", hr); - ok(flags & MEDIASINK_RATELESS, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get sink flags, hr %#lx.\n", hr); + ok(flags & MEDIASINK_RATELESS, "Unexpected flags %#lx.\n", flags);
hr = IMFActivate_ShutdownObject(activate); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
hr = IMFMediaSink_Shutdown(sink); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
IMFMediaSink_Release(sink);
/* Detaching */ hr = MFCreateSampleGrabberSinkActivate(media_type, &grabber_callback, &activate); - ok(hr == S_OK, "Failed to create grabber activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create grabber activate, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Failed to activate object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate object, hr %#lx.\n", hr); IMFMediaSink_Release(sink);
hr = IMFActivate_ShutdownObject(activate); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFActivate_GetCount(activate, &attr_count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFActivate_DetachObject(activate); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
IMFActivate_Release(activate);
@@ -3278,7 +3278,7 @@ static void test_sample_grabber(void) IMFPresentationClock_Release(clock);
hr = MFShutdown(); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr); }
static void test_sample_grabber_is_mediatype_supported(void) @@ -3294,85 +3294,85 @@ static void test_sample_grabber_is_mediatype_supported(void)
/* IsMediaTypeSupported checks are done against the creation type, and check format data */ hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr); hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr); hr = IMFMediaType_SetUINT32(media_type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, 44100); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = MFCreateSampleGrabberSinkActivate(media_type, &grabber_callback, &activate); - ok(hr == S_OK, "Failed to create grabber activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create grabber activate, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Failed to activate object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate object, hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream); - ok(hr == S_OK, "Failed to get sink stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sink stream, hr %#lx.\n", hr); hr = IMFStreamSink_GetMediaTypeHandler(stream, &handler); - ok(hr == S_OK, "Failed to get type handler, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get type handler, hr %#lx.\n", hr); IMFStreamSink_Release(stream);
IMFMediaSink_Release(sink);
/* On Win8+ this initialization happens automatically. */ hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type2); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type2, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr); hr = IMFMediaType_SetGUID(media_type2, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr); hr = IMFMediaType_SetUINT32(media_type2, &MF_MT_AUDIO_SAMPLES_PER_SECOND, 48000); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type2, NULL); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type2); - ok(hr == MF_E_INVALIDMEDIATYPE, "Failed to set media type, hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Failed to set media type, hr %#lx.\n", hr);
/* Make it match grabber type sample rate. */ hr = IMFMediaType_SetUINT32(media_type2, &MF_MT_AUDIO_SAMPLES_PER_SECOND, 44100); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type2, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type2); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr); hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &media_type3); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr); ok(media_type3 == media_type2, "Unexpected media type instance.\n"); IMFMediaType_Release(media_type3);
/* Change original type. */ hr = IMFMediaType_SetUINT32(media_type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, 48000); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type2, NULL); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(media_type2, &MF_MT_AUDIO_SAMPLES_PER_SECOND, 48000); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type2, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MFMediaType_Audio), "Unexpected major type.\n");
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MFMediaType_Audio), "Unexpected major type.\n");
IMFMediaType_Release(media_type2); @@ -3381,7 +3381,7 @@ static void test_sample_grabber_is_mediatype_supported(void) IMFMediaTypeHandler_Release(handler);
refcount = IMFActivate_Release(activate); - ok(!refcount, "Unexpected refcount %u.\n", refcount); + ok(!refcount, "Unexpected refcount %lu.\n", refcount); }
static BOOL is_supported_video_type(const GUID *guid) @@ -3438,7 +3438,7 @@ static void test_video_processor(void) GUID guid;
hr = CoInitialize(NULL); - ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_VideoProcessorMFT, NULL, CLSCTX_INPROC_SERVER, &IID_IMFTransform, (void **)&transform); @@ -3457,102 +3457,102 @@ static void test_video_processor(void)
/* Transform global attributes. */ hr = IMFTransform_GetAttributes(transform, &attributes); - ok(hr == S_OK, "Failed to get attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attributes, hr %#lx.\n", hr);
hr = IMFAttributes_GetCount(attributes, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); todo_wine ok(!!count, "Unexpected attribute count %u.\n", count);
value = 0; hr = IMFAttributes_GetUINT32(attributes, &MF_SA_D3D11_AWARE, &value); todo_wine { - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(value == 1, "Unexpected attribute value %u.\n", value); } hr = IMFTransform_GetAttributes(transform, &attributes2); - ok(hr == S_OK, "Failed to get attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attributes, hr %#lx.\n", hr); ok(attributes == attributes2, "Unexpected instance.\n"); IMFAttributes_Release(attributes); IMFAttributes_Release(attributes2);
hr = IMFTransform_GetStreamLimits(transform, &input_min, &input_max, &output_min, &output_max); - ok(hr == S_OK, "Failed to get stream limits, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream limits, hr %#lx.\n", hr); ok(input_min == input_max && input_min == 1 && output_min == output_max && output_min == 1, "Unexpected stream limits.\n");
hr = IMFTransform_GetStreamCount(transform, &input_count, &output_count); - ok(hr == S_OK, "Failed to get stream count, hr %#x.\n", hr); - ok(input_count == 1 && output_count == 1, "Unexpected stream count %u, %u.\n", input_count, output_count); + ok(hr == S_OK, "Failed to get stream count, hr %#lx.\n", hr); + ok(input_count == 1 && output_count == 1, "Unexpected stream count %lu, %lu.\n", input_count, output_count);
hr = IMFTransform_GetStreamIDs(transform, 1, &input_id, 1, &output_id); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
input_id = 100; hr = IMFTransform_AddInputStreams(transform, 1, &input_id); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_DeleteInputStream(transform, 0); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(transform, 0, &flags); todo_wine - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStreamAttributes(transform, 0, &attributes); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStatus(transform, &flags); todo_wine - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamAttributes(transform, 0, &attributes); - ok(hr == S_OK, "Failed to get output attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get output attributes, hr %#lx.\n", hr); hr = IMFTransform_GetOutputStreamAttributes(transform, 0, &attributes2); - ok(hr == S_OK, "Failed to get output attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get output attributes, hr %#lx.\n", hr); ok(attributes == attributes2, "Unexpected instance.\n"); IMFAttributes_Release(attributes); IMFAttributes_Release(attributes2);
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type); todo_wine - ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type); todo_wine - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 1, &media_type); todo_wine - ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type); todo_wine - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputCurrentType(transform, 1, &media_type); todo_wine - ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStreamInfo(transform, 1, &input_info); todo_wine - ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
memset(&input_info, 0xcc, sizeof(input_info)); hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); todo_wine { - ok(hr == S_OK, "Failed to get stream info, hr %#x.\n", hr); - ok(input_info.dwFlags == 0, "Unexpected flag %#x.\n", input_info.dwFlags); - ok(input_info.cbSize == 0, "Unexpected size %u.\n", input_info.cbSize); - ok(input_info.cbMaxLookahead == 0, "Unexpected lookahead length %u.\n", input_info.cbMaxLookahead); - ok(input_info.cbAlignment == 0, "Unexpected alignment %u.\n", input_info.cbAlignment); + ok(hr == S_OK, "Failed to get stream info, hr %#lx.\n", hr); + ok(input_info.dwFlags == 0, "Unexpected flag %#lx.\n", input_info.dwFlags); + ok(input_info.cbSize == 0, "Unexpected size %lu.\n", input_info.cbSize); + ok(input_info.cbMaxLookahead == 0, "Unexpected lookahead length %lu.\n", input_info.cbMaxLookahead); + ok(input_info.cbAlignment == 0, "Unexpected alignment %lu.\n", input_info.cbAlignment); } hr = MFCreateMediaEvent(MEUnknown, &GUID_NULL, S_OK, NULL, &event); - ok(hr == S_OK, "Failed to create event object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create event object, hr %#lx.\n", hr); hr = IMFTransform_ProcessEvent(transform, 0, event); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); hr = IMFTransform_ProcessEvent(transform, 1, event); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr); IMFMediaEvent_Release(event);
/* Configure stream types. */ @@ -3561,35 +3561,35 @@ todo_wine { if (FAILED(hr = IMFTransform_GetInputAvailableType(transform, 0, i, &media_type))) { todo_wine - ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#lx.\n", hr); break; }
hr = IMFTransform_GetInputAvailableType(transform, 0, i, &media_type2); - ok(hr == S_OK, "Failed to get available type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get available type, hr %#lx.\n", hr); ok(media_type != media_type2, "Unexpected instance.\n"); IMFMediaType_Release(media_type2);
hr = IMFMediaType_GetMajorType(media_type, &guid); - ok(hr == S_OK, "Failed to get major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get major type, hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MFMediaType_Video), "Unexpected major type.\n");
hr = IMFMediaType_GetCount(media_type, &count); - ok(hr == S_OK, "Failed to get attributes count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attributes count, hr %#lx.\n", hr); ok(count == 2, "Unexpected count %u.\n", count);
hr = IMFMediaType_GetGUID(media_type, &MF_MT_SUBTYPE, &guid); - ok(hr == S_OK, "Failed to get subtype, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get subtype, hr %#lx.\n", hr); ok(is_supported_video_type(&guid), "Unexpected media type %s.\n", wine_dbgstr_guid(&guid));
hr = IMFTransform_SetInputType(transform, 0, media_type, MFT_SET_TYPE_TEST_ONLY); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, 0); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type2); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
/* FIXME: figure out if those require additional attributes or simply advertised but not supported */ if (IsEqualGUID(&guid, &MFVideoFormat_L8) || IsEqualGUID(&guid, &MFVideoFormat_L16) @@ -3601,125 +3601,125 @@ todo_wine { }
hr = IMFMediaType_SetUINT64(media_type, &MF_MT_FRAME_SIZE, ((UINT64)16 << 32) | 16); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, MFT_SET_TYPE_TEST_ONLY); - ok(hr == S_OK, "Failed to test input type %s, hr %#x.\n", wine_dbgstr_guid(&guid), hr); + ok(hr == S_OK, "Failed to test input type %s, hr %#lx.\n", wine_dbgstr_guid(&guid), hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, 0); - ok(hr == S_OK, "Failed to test input type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to test input type, hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type2); - ok(hr == S_OK, "Failed to get current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get current type, hr %#lx.\n", hr); ok(media_type != media_type2, "Unexpected instance.\n"); IMFMediaType_Release(media_type2);
hr = IMFTransform_GetInputStatus(transform, 0, &flags); - ok(hr == S_OK, "Failed to get input status, hr %#x.\n", hr); - ok(flags == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected input status %#x.\n", flags); + ok(hr == S_OK, "Failed to get input status, hr %#lx.\n", hr); + ok(flags == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected input status %#lx.\n", flags);
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); - ok(hr == S_OK, "Failed to get stream info, hr %#x.\n", hr); - ok(input_info.dwFlags == 0, "Unexpected flags %#x.\n", input_info.dwFlags); - ok(input_info.cbMaxLookahead == 0, "Unexpected lookahead length %u.\n", input_info.cbMaxLookahead); - ok(input_info.cbAlignment == 0, "Unexpected alignment %u.\n", input_info.cbAlignment); + ok(hr == S_OK, "Failed to get stream info, hr %#lx.\n", hr); + ok(input_info.dwFlags == 0, "Unexpected flags %#lx.\n", input_info.dwFlags); + ok(input_info.cbMaxLookahead == 0, "Unexpected lookahead length %lu.\n", input_info.cbMaxLookahead); + ok(input_info.cbAlignment == 0, "Unexpected alignment %lu.\n", input_info.cbAlignment);
IMFMediaType_Release(media_type); }
/* IYUV -> RGB32 */ hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_IYUV); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT64(media_type, &MF_MT_FRAME_SIZE, ((UINT64)16 << 32) | 16); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(transform, 0, media_type, 0); todo_wine - ok(hr == S_OK, "Failed to set input type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set input type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_RGB32); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); todo_wine - ok(hr == S_OK, "Failed to set output type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set output type, hr %#lx.\n", hr);
memset(&output_info, 0, sizeof(output_info)); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); todo_wine - ok(hr == S_OK, "Failed to get stream info, hr %#x.\n", hr); - ok(output_info.dwFlags == 0, "Unexpected flags %#x.\n", output_info.dwFlags); + ok(hr == S_OK, "Failed to get stream info, hr %#lx.\n", hr); + ok(output_info.dwFlags == 0, "Unexpected flags %#lx.\n", output_info.dwFlags); todo_wine - ok(output_info.cbSize > 0, "Unexpected size %u.\n", output_info.cbSize); - ok(output_info.cbAlignment == 0, "Unexpected alignment %u.\n", output_info.cbAlignment); + ok(output_info.cbSize > 0, "Unexpected size %lu.\n", output_info.cbSize); + ok(output_info.cbAlignment == 0, "Unexpected alignment %lu.\n", output_info.cbAlignment);
hr = MFCreateSample(&sample); - ok(hr == S_OK, "Failed to create a sample, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a sample, hr %#lx.\n", hr);
hr = MFCreateSample(&sample2); - ok(hr == S_OK, "Failed to create a sample, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a sample, hr %#lx.\n", hr);
memset(&output_buffer, 0, sizeof(output_buffer)); output_buffer.pSample = sample; flags = 0; hr = IMFTransform_ProcessOutput(transform, 0, 1, &output_buffer, &flags); todo_wine - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Unexpected hr %#x.\n", hr); - ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#x.\n", output_buffer.dwStatus); - ok(flags == 0, "Unexpected status %#x.\n", flags); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Unexpected hr %#lx.\n", hr); + ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#lx.\n", output_buffer.dwStatus); + ok(flags == 0, "Unexpected status %#lx.\n", flags);
hr = IMFTransform_ProcessInput(transform, 0, sample2, 0); todo_wine - ok(hr == S_OK, "Failed to push a sample, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to push a sample, hr %#lx.\n", hr);
hr = IMFTransform_ProcessInput(transform, 0, sample2, 0); todo_wine - ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#lx.\n", hr);
memset(&output_buffer, 0, sizeof(output_buffer)); output_buffer.pSample = sample; flags = 0; hr = IMFTransform_ProcessOutput(transform, 0, 1, &output_buffer, &flags); todo_wine - ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr); - ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#x.\n", output_buffer.dwStatus); - ok(flags == 0, "Unexpected status %#x.\n", flags); + ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#lx.\n", hr); + ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#lx.\n", output_buffer.dwStatus); + ok(flags == 0, "Unexpected status %#lx.\n", flags);
hr = IMFSample_SetSampleTime(sample2, 0); - ok(hr == S_OK, "Failed to set sample time, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set sample time, hr %#lx.\n", hr); memset(&output_buffer, 0, sizeof(output_buffer)); output_buffer.pSample = sample; flags = 0; hr = IMFTransform_ProcessOutput(transform, 0, 1, &output_buffer, &flags); todo_wine - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); - ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#x.\n", output_buffer.dwStatus); - ok(flags == 0, "Unexpected status %#x.\n", flags); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); + ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#lx.\n", output_buffer.dwStatus); + ok(flags == 0, "Unexpected status %#lx.\n", flags);
hr = MFCreateMemoryBuffer(1024 * 1024, &buffer); - ok(hr == S_OK, "Failed to create a buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a buffer, hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(sample2, buffer); - ok(hr == S_OK, "Failed to add a buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a buffer, hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(sample, buffer); - ok(hr == S_OK, "Failed to add a buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a buffer, hr %#lx.\n", hr);
memset(&output_buffer, 0, sizeof(output_buffer)); output_buffer.pSample = sample; flags = 0; hr = IMFTransform_ProcessOutput(transform, 0, 1, &output_buffer, &flags); todo_wine - ok(hr == S_OK || broken(FAILED(hr)) /* Win8 */, "Failed to get output buffer, hr %#x.\n", hr); - ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#x.\n", output_buffer.dwStatus); - ok(flags == 0, "Unexpected status %#x.\n", flags); + ok(hr == S_OK || broken(FAILED(hr)) /* Win8 */, "Failed to get output buffer, hr %#lx.\n", hr); + ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#lx.\n", output_buffer.dwStatus); + ok(flags == 0, "Unexpected status %#lx.\n", flags);
if (SUCCEEDED(hr)) { @@ -3727,9 +3727,9 @@ todo_wine { output_buffer.pSample = sample; flags = 0; hr = IMFTransform_ProcessOutput(transform, 0, 1, &output_buffer, &flags); - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Unexpected hr %#x.\n", hr); - ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#x.\n", output_buffer.dwStatus); - ok(flags == 0, "Unexpected status %#x.\n", flags); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Unexpected hr %#lx.\n", hr); + ok(output_buffer.dwStatus == 0, "Unexpected buffer status, %#lx.\n", output_buffer.dwStatus); + ok(flags == 0, "Unexpected status %#lx.\n", flags); }
IMFSample_Release(sample2); @@ -3752,56 +3752,56 @@ static void test_quality_manager(void) HRESULT hr;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Startup failure, hr %#x.\n", hr); + ok(hr == S_OK, "Startup failure, hr %#lx.\n", hr);
hr = MFCreatePresentationClock(&clock); - ok(hr == S_OK, "Failed to create presentation clock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create presentation clock, hr %#lx.\n", hr);
hr = MFCreateStandardQualityManager(&manager); - ok(hr == S_OK, "Failed to create quality manager, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create quality manager, hr %#lx.\n", hr);
check_interface(manager, &IID_IMFQualityManager, TRUE); check_interface(manager, &IID_IMFClockStateSink, TRUE);
hr = IMFQualityManager_NotifyPresentationClock(manager, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityManager_NotifyTopology(manager, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Set clock, then shutdown. */ EXPECT_REF(clock, 1); EXPECT_REF(manager, 1); hr = IMFQualityManager_NotifyPresentationClock(manager, clock); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(clock, 2); EXPECT_REF(manager, 2);
hr = IMFQualityManager_Shutdown(manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(clock, 1);
hr = IMFQualityManager_NotifyPresentationClock(manager, clock); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityManager_NotifyTopology(manager, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityManager_NotifyPresentationClock(manager, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFQualityManager_Shutdown(manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFQualityManager_Release(manager);
/* Set clock, then release without shutting down. */ hr = MFCreateStandardQualityManager(&manager); - ok(hr == S_OK, "Failed to create quality manager, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create quality manager, hr %#lx.\n", hr);
EXPECT_REF(clock, 1); hr = IMFQualityManager_NotifyPresentationClock(manager, clock); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(clock, 2);
IMFQualityManager_Release(manager); @@ -3811,39 +3811,39 @@ static void test_quality_manager(void)
/* Set topology. */ hr = MFCreateStandardQualityManager(&manager); - ok(hr == S_OK, "Failed to create quality manager, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create quality manager, hr %#lx.\n", hr);
hr = MFCreateTopology(&topology); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(topology, 1); hr = IMFQualityManager_NotifyTopology(manager, topology); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(topology, 2);
hr = IMFQualityManager_NotifyTopology(manager, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(topology, 1);
hr = IMFQualityManager_NotifyTopology(manager, topology); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(topology, 2); hr = IMFQualityManager_Shutdown(manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(topology, 1);
hr = IMFQualityManager_NotifyTopology(manager, topology); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
IMFQualityManager_Release(manager);
hr = MFCreateStandardQualityManager(&manager); - ok(hr == S_OK, "Failed to create quality manager, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create quality manager, hr %#lx.\n", hr);
EXPECT_REF(topology, 1); hr = IMFQualityManager_NotifyTopology(manager, topology); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(topology, 2);
IMFQualityManager_Release(manager); @@ -3852,7 +3852,7 @@ static void test_quality_manager(void) IMFTopology_Release(topology);
hr = MFShutdown(); - ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr); + ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr); }
static void check_sar_rate_support(IMFMediaSink *sink) @@ -3866,91 +3866,91 @@ static void check_sar_rate_support(IMFMediaSink *sink)
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFRateSupport, (void **)&rate_support); todo_wine - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (FAILED(hr)) return;
hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream_sink); if (hr == MF_E_SHUTDOWN) { hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, FALSE, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
IMFRateSupport_Release(rate_support); return; } - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamSink_GetMediaTypeHandler(stream_sink, &handler); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFStreamSink_Release(stream_sink);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, FALSE, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, FALSE, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &media_type); if (SUCCEEDED(hr)) { hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_REVERSE, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_REVERSE, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(media_type); } else { hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, TRUE, &rate); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, FALSE, &rate); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, TRUE, &rate); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, TRUE, &rate); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_REVERSE, FALSE, &rate); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_REVERSE, TRUE, &rate); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr); }
IMFMediaTypeHandler_Release(handler); @@ -3981,7 +3981,7 @@ static void test_sar(void) int found;
hr = CoInitialize(NULL); - ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
hr = MFCreateAudioRenderer(NULL, &sink); if (hr == MF_E_NO_AUDIO_PLAYBACK_DEVICE) @@ -3990,65 +3990,65 @@ static void test_sar(void) CoUninitialize(); return; } - ok(hr == S_OK, "Failed to create renderer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create renderer, hr %#lx.\n", hr);
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Startup failure, hr %#x.\n", hr); + ok(hr == S_OK, "Startup failure, hr %#lx.\n", hr);
hr = MFCreatePresentationClock(&present_clock); - ok(hr == S_OK, "Failed to create presentation clock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create presentation clock, hr %#lx.\n", hr);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFPresentationTimeSource, (void **)&time_source); todo_wine - ok(hr == S_OK, "Failed to get time source interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get time source interface, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { hr = IMFPresentationTimeSource_QueryInterface(time_source, &IID_IMFClockStateSink, (void **)&state_sink2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFPresentationTimeSource_QueryInterface(time_source, &IID_IMFClockStateSink, (void **)&state_sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(state_sink == state_sink2, "Unexpected clock sink.\n"); IMFClockStateSink_Release(state_sink2); IMFClockStateSink_Release(state_sink);
hr = IMFPresentationTimeSource_GetUnderlyingClock(time_source, &clock); - ok(hr == MF_E_NO_CLOCK, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_CLOCK, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetClockCharacteristics(time_source, &flags); - ok(hr == S_OK, "Failed to get flags, hr %#x.\n", hr); - ok(flags == MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get flags, hr %#lx.\n", hr); + ok(flags == MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ, "Unexpected flags %#lx.\n", flags);
hr = IMFPresentationTimeSource_GetState(time_source, 0, &state); - ok(hr == S_OK, "Failed to get clock state, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get clock state, hr %#lx.\n", hr); ok(state == MFCLOCK_STATE_INVALID, "Unexpected state %d.\n", state);
hr = IMFPresentationTimeSource_QueryInterface(time_source, &IID_IMFClockStateSink, (void **)&state_sink); - ok(hr == S_OK, "Failed to get state sink, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get state sink, hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockStart(state_sink, 0, 0); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
IMFClockStateSink_Release(state_sink);
IMFPresentationTimeSource_Release(time_source); } hr = IMFMediaSink_AddStreamSink(sink, 123, NULL, &stream_sink); - ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_RemoveStreamSink(sink, 0); - ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_STREAMSINKS_FIXED, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkCount(sink, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkCount(sink, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(count == 1, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(count == 1, "Unexpected count %lu.\n", count);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(flags == (MEDIASINK_FIXED_STREAMS | MEDIASINK_CAN_PREROLL), "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(flags == (MEDIASINK_FIXED_STREAMS | MEDIASINK_CAN_PREROLL), "Unexpected flags %#lx.\n", flags);
check_interface(sink, &IID_IMFMediaSinkPreroll, TRUE); check_interface(sink, &IID_IMFMediaEventGenerator, TRUE); @@ -4062,80 +4062,80 @@ if (SUCCEEDED(hr))
/* Clock */ hr = IMFMediaSink_QueryInterface(sink, &IID_IMFClockStateSink, (void **)&state_sink); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockStart(state_sink, 0, 0); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockPause(state_sink, 0); - ok(hr == MF_E_INVALID_STATE_TRANSITION, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALID_STATE_TRANSITION, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockStop(state_sink, 0); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockRestart(state_sink, 0); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
IMFClockStateSink_Release(state_sink);
hr = IMFMediaSink_SetPresentationClock(sink, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_SetPresentationClock(sink, present_clock); todo_wine - ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_CLOCK_NO_TIME_SOURCE, "Unexpected hr %#lx.\n", hr);
hr = MFCreateSystemTimeSource(&time_source); - ok(hr == S_OK, "Failed to create time source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create time source, hr %#lx.\n", hr);
hr = IMFPresentationClock_SetTimeSource(present_clock, time_source); - ok(hr == S_OK, "Failed to set time source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set time source, hr %#lx.\n", hr); IMFPresentationTimeSource_Release(time_source);
hr = IMFMediaSink_SetPresentationClock(sink, present_clock); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetPresentationClock(sink, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetPresentationClock(sink, &present_clock2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(present_clock == present_clock2, "Unexpected instance.\n"); IMFPresentationClock_Release(present_clock2);
/* Stream */ hr = IMFMediaSink_GetStreamSinkByIndex(sink, 0, &stream_sink); - ok(hr == S_OK, "Failed to get a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get a stream, hr %#lx.\n", hr);
check_interface(stream_sink, &IID_IMFMediaEventGenerator, TRUE); check_interface(stream_sink, &IID_IMFMediaTypeHandler, TRUE); todo_wine check_interface(stream_sink, &IID_IMFGetService, TRUE);
hr = IMFStreamSink_GetIdentifier(stream_sink, &id); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!id, "Unexpected id.\n");
hr = IMFStreamSink_GetMediaSink(stream_sink, &sink2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(sink == sink2, "Unexpected object.\n"); IMFMediaSink_Release(sink2);
hr = IMFStreamSink_GetMediaTypeHandler(stream_sink, &handler); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamSink_QueryInterface(stream_sink, &IID_IMFMediaTypeHandler, (void **)&handler2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(handler2 == handler, "Unexpected instance.\n"); IMFMediaTypeHandler_Release(handler2);
hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); - ok(hr == S_OK, "Failed to get major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get major type, hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MFMediaType_Audio), "Unexpected type %s.\n", wine_dbgstr_guid(&guid));
count = 0; hr = IMFMediaTypeHandler_GetMediaTypeCount(handler, &count); - ok(hr == S_OK, "Failed to get type count, hr %#x.\n", hr); - ok(!!count, "Unexpected type count %u.\n", count); + ok(hr == S_OK, "Failed to get type count, hr %#lx.\n", hr); + ok(!!count, "Unexpected type count %lu.\n", count);
/* A number of same major/subtype entries are returned, with different degrees of finer format details. Some incomplete types are not accepted, check that at least one of them is considered supported. */ @@ -4143,7 +4143,7 @@ if (SUCCEEDED(hr)) for (i = 0, found = -1; i < count; ++i) { hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, i, &mediatype); - ok(hr == S_OK, "Failed to get media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get media type, hr %#lx.\n", hr);
if (SUCCEEDED(IMFMediaTypeHandler_IsMediaTypeSupported(handler, mediatype, NULL))) found = i; @@ -4154,50 +4154,50 @@ if (SUCCEEDED(hr)) ok(found != -1, "Haven't found a supported type.\n");
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &mediatype); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
/* Actual return value is MF_E_ATRIBUTENOTFOUND triggered by missing MF_MT_MAJOR_TYPE */ hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, mediatype, NULL); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, mediatype, NULL); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, mediatype, NULL); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, mediatype); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, found, &mediatype2); - ok(hr == S_OK, "Failed to get media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get media type, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, found, &mediatype3); - ok(hr == S_OK, "Failed to get media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get media type, hr %#lx.\n", hr); ok(mediatype2 == mediatype3, "Unexpected instance.\n"); IMFMediaType_Release(mediatype3);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, mediatype2, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(mediatype);
check_sar_rate_support(sink);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, mediatype2); - ok(hr == S_OK, "Failed to set current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current type, hr %#lx.\n", hr);
check_sar_rate_support(sink);
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &mediatype); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(mediatype == mediatype2, "Unexpected instance.\n"); IMFMediaType_Release(mediatype);
@@ -4205,40 +4205,40 @@ if (SUCCEEDED(hr))
/* Reset back to uninitialized state. */ hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IMFMediaTypeHandler_Release(handler);
/* State change with initialized stream. */ hr = IMFMediaSink_QueryInterface(sink, &IID_IMFClockStateSink, (void **)&state_sink); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockStart(state_sink, 0, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockStart(state_sink, 0, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockPause(state_sink, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockStop(state_sink, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockStop(state_sink, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockPause(state_sink, 0); - ok(hr == MF_E_INVALID_STATE_TRANSITION, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALID_STATE_TRANSITION, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockRestart(state_sink, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockRestart(state_sink, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockStop(state_sink, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFClockStateSink_Release(state_sink);
@@ -4246,63 +4246,63 @@ if (SUCCEEDED(hr))
/* Volume control */ hr = MFGetService((IUnknown *)sink, &MR_POLICY_VOLUME_SERVICE, &IID_IMFSimpleAudioVolume, (void **)&simple_volume); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
hr = IMFSimpleAudioVolume_GetMute(simple_volume, &mute); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFSimpleAudioVolume_Release(simple_volume);
hr = MFGetService((IUnknown *)sink, &MR_STREAM_VOLUME_SERVICE, &IID_IMFAudioStreamVolume, (void **)&stream_volume); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
hr = IMFAudioStreamVolume_GetChannelCount(stream_volume, &channel_count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAudioStreamVolume_GetChannelCount(stream_volume, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IMFAudioStreamVolume_Release(stream_volume);
hr = MFGetService((IUnknown *)sink, &MR_AUDIO_POLICY_SERVICE, &IID_IMFAudioPolicy, (void **)&unk); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr); IUnknown_Release(unk);
/* Shutdown */ EXPECT_REF(present_clock, 2); hr = IMFMediaSink_Shutdown(sink); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr); EXPECT_REF(present_clock, 1);
hr = IMFMediaSink_Shutdown(sink); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_AddStreamSink(sink, 123, NULL, &stream_sink); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_RemoveStreamSink(sink, 0); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkCount(sink, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkCount(sink, &count); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_SetPresentationClock(sink, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_SetPresentationClock(sink, present_clock); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetPresentationClock(sink, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetPresentationClock(sink, &present_clock2); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
check_sar_rate_support(sink);
@@ -4310,70 +4310,70 @@ if (SUCCEEDED(hr))
/* Activation */ hr = MFCreateAudioRendererActivate(&activate); - ok(hr == S_OK, "Failed to create activation object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create activation object, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink2); - ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate, hr %#lx.\n", hr); ok(sink == sink2, "Unexpected instance.\n"); IMFMediaSink_Release(sink2);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == S_OK, "Failed to get sink flags, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sink flags, hr %#lx.\n", hr);
hr = IMFActivate_ShutdownObject(activate); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
IMFMediaSink_Release(sink);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate, hr %#lx.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); todo_wine - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
IMFMediaSink_Release(sink);
hr = IMFActivate_DetachObject(activate); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
IMFActivate_Release(activate);
IMFPresentationClock_Release(present_clock);
hr = MFShutdown(); - ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr); + ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr);
/* SAR attributes */ hr = MFCreateAttributes(&attributes, 0); - ok(hr == S_OK, "Failed to create attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create attributes, hr %#lx.\n", hr);
/* Specify role. */ hr = IMFAttributes_SetUINT32(attributes, &MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE, eMultimedia); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = MFCreateAudioRenderer(attributes, &sink); - ok(hr == S_OK, "Failed to create a sink, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a sink, hr %#lx.\n", hr); IMFMediaSink_Release(sink);
/* Invalid endpoint. */ hr = IMFAttributes_SetString(attributes, &MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID, L"endpoint"); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = MFCreateAudioRenderer(attributes, &sink); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_DeleteItem(attributes, &MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE); - ok(hr == S_OK, "Failed to remove attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to remove attribute, hr %#lx.\n", hr);
hr = MFCreateAudioRenderer(attributes, &sink); - ok(hr == MF_E_NO_AUDIO_PLAYBACK_DEVICE, "Failed to create a sink, hr %#x.\n", hr); + ok(hr == MF_E_NO_AUDIO_PLAYBACK_DEVICE, "Failed to create a sink, hr %#lx.\n", hr);
IMFAttributes_Release(attributes);
@@ -4412,30 +4412,30 @@ static void test_evr(void) GUID guid;
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Startup failure, hr %#x.\n", hr); + ok(hr == S_OK, "Startup failure, hr %#lx.\n", hr);
hr = MFCreateVideoRenderer(&IID_IMFVideoRenderer, (void **)&video_renderer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoRenderer_InitializeRenderer(video_renderer, NULL, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFVideoRenderer_Release(video_renderer);
hr = MFCreateVideoRendererActivate(NULL, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Window */ window = create_window(); hr = MFCreateVideoRendererActivate(window, &activate); - ok(hr == S_OK, "Failed to create activate object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create activate object, hr %#lx.\n", hr);
hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &window3); - ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute, hr %#lx.\n", hr); ok(UlongToHandle(window3) == window, "Unexpected value.\n");
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(sink, &IID_IMFMediaSinkPreroll, TRUE); check_interface(sink, &IID_IMFVideoRenderer, TRUE); @@ -4457,11 +4457,11 @@ static void test_evr(void)
hr = MFGetService((IUnknown *)sink, &MR_VIDEO_RENDER_SERVICE, &IID_IMFVideoDisplayControl, (void **)&display_control); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
window2 = NULL; hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &window2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(window2 == window, "Unexpected window %p.\n", window2);
IMFVideoDisplayControl_Release(display_control); @@ -4470,128 +4470,128 @@ static void test_evr(void) DestroyWindow(window);
hr = MFCreateVideoRendererActivate(NULL, &activate); - ok(hr == S_OK, "Failed to create activate object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create activate object, hr %#lx.\n", hr);
hr = IMFActivate_GetCount(activate, &attr_count); - ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr); ok(attr_count == 1, "Unexpected count %u.\n", attr_count);
hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &window3); - ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute, hr %#lx.\n", hr); ok(!window3, "Unexpected value.\n");
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate, hr %#lx.\n", hr);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFAttributes, (void **)&attributes); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFAttributes_QueryInterface(attributes, &IID_IMFMediaSink, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unk); hr = IMFAttributes_GetCount(attributes, &attr_count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!attr_count, "Unexpected count %u.\n", attr_count); /* Rendering preferences are not immediately propagated to the presenter. */ hr = IMFAttributes_SetUINT32(attributes, &EVRConfig_ForceBob, 1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = MFGetService((IUnknown *)sink, &MR_VIDEO_RENDER_SERVICE, &IID_IMFVideoDisplayControl, (void **)&display_control); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, &flags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!flags, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!flags, "Unexpected flags %#lx.\n", flags); IMFVideoDisplayControl_Release(display_control); IMFAttributes_Release(attributes);
/* Primary stream type handler. */ hr = IMFMediaSink_GetStreamSinkById(sink, 0, &stream_sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamSink_QueryInterface(stream_sink, &IID_IMFAttributes, (void **)&attributes); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFAttributes_GetCount(attributes, &attr_count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(attr_count == 2, "Unexpected count %u.\n", attr_count); value = 0; hr = IMFAttributes_GetUINT32(attributes, &MF_SA_REQUIRED_SAMPLE_COUNT, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(value == 1, "Unexpected attribute value %u.\n", value); value = 0; hr = IMFAttributes_GetUINT32(attributes, &MF_SA_D3D_AWARE, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(value == 1, "Unexpected attribute value %u.\n", value);
hr = IMFAttributes_QueryInterface(attributes, &IID_IMFStreamSink, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unk); IMFAttributes_Release(attributes);
hr = IMFStreamSink_GetMediaTypeHandler(stream_sink, &type_handler); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMajorType(type_handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMajorType(type_handler, &guid); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MFMediaType_Video), "Unexpected type %s.\n", wine_dbgstr_guid(&guid));
/* Supported types are not advertised. */ hr = IMFMediaTypeHandler_GetMediaTypeCount(type_handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
count = 1; hr = IMFMediaTypeHandler_GetMediaTypeCount(type_handler, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!count, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!count, "Unexpected count %lu.\n", count);
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(type_handler, 0, NULL); - ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(type_handler, 0, &media_type); - ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetCurrentMediaType(type_handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetCurrentMediaType(type_handler, &media_type); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(type_handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_RGB32); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT64(media_type, &MF_MT_FRAME_SIZE, (UINT64)640 << 32 | 480); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_handler, NULL, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_handler, media_type, &media_type2); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(media_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
media_type2 = (void *)0x1; hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_handler, media_type, &media_type2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected media type %p.\n", media_type2);
hr = IMFMediaTypeHandler_SetCurrentMediaType(type_handler, media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetCurrentMediaType(type_handler, &media_type2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_QueryInterface(media_type2, &IID_IMFVideoMediaType, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unk); IMFMediaType_Release(media_type2);
@@ -4613,67 +4613,67 @@ todo_wine { } hr = MFGetService((IUnknown *)stream_sink, &MR_VIDEO_ACCELERATION_SERVICE, &IID_IMFVideoSampleAllocator, (void **)&allocator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_QueryInterface(allocator, &IID_IMFVideoSampleAllocatorCallback, (void **)&allocator_callback); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
sample_count = 0; hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_callback, &sample_count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!sample_count, "Unexpected sample count %d.\n", sample_count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!sample_count, "Unexpected sample count %ld.\n", sample_count);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
IMFVideoSampleAllocatorCallback_Release(allocator_callback); IMFVideoSampleAllocator_Release(allocator);
/* Same test for a substream. */ hr = IMFMediaSink_AddStreamSink(sink, 1, NULL, &stream_sink2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { hr = MFGetService((IUnknown *)stream_sink2, &MR_VIDEO_ACCELERATION_SERVICE, &IID_IMFVideoSampleAllocator, (void **)&allocator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFVideoSampleAllocator_Release(allocator);
hr = IMFMediaSink_RemoveStreamSink(sink, 1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFStreamSink_Release(stream_sink2); }
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(flags == (MEDIASINK_CAN_PREROLL | MEDIASINK_CLOCK_REQUIRED), "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(flags == (MEDIASINK_CAN_PREROLL | MEDIASINK_CLOCK_REQUIRED), "Unexpected flags %#lx.\n", flags);
hr = IMFActivate_ShutdownObject(activate); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
/* Activate again. */ hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink2); - ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate, hr %#lx.\n", hr); todo_wine ok(sink == sink2, "Unexpected instance.\n"); IMFMediaSink_Release(sink2);
hr = IMFActivate_DetachObject(activate); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetCharacteristics(sink, &flags); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink2); - ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to activate, hr %#lx.\n", hr);
hr = IMFActivate_ShutdownObject(activate); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
IMFMediaSink_Release(sink2); IMFMediaSink_Release(sink); @@ -4684,142 +4684,142 @@ todo_wine { window = create_window();
hr = MFCreateVideoRendererActivate(window, &activate); - ok(hr == S_OK, "Failed to create activate object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create activate object, hr %#lx.\n", hr);
hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateSystemTimeSource(&time_source); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreatePresentationClock(&clock); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationClock_SetTimeSource(clock, time_source); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFPresentationTimeSource_Release(time_source);
hr = IMFMediaSink_SetPresentationClock(sink, clock); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_QueryInterface(sink, &IID_IMFRateSupport, (void **)&rs); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
rate = 1.0f; hr = IMFRateSupport_GetSlowestRate(rs, MFRATE_FORWARD, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f; hr = IMFRateSupport_GetSlowestRate(rs, MFRATE_REVERSE, FALSE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f; hr = IMFRateSupport_GetSlowestRate(rs, MFRATE_FORWARD, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f; hr = IMFRateSupport_GetSlowestRate(rs, MFRATE_REVERSE, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_GetFastestRate(rs, MFRATE_FORWARD, FALSE, &rate); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rs, MFRATE_REVERSE, FALSE, &rate); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rs, MFRATE_FORWARD, TRUE, &rate); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rs, MFRATE_REVERSE, TRUE, &rate); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rs, MFRATE_REVERSE, TRUE, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(supported_rates); ++i) { rate = supported_rates[i] + 1.0f; hr = IMFRateSupport_IsRateSupported(rs, TRUE, supported_rates[i], &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == supported_rates[i], "Unexpected rate %f.\n", rate);
rate = supported_rates[i] + 1.0f; hr = IMFRateSupport_IsRateSupported(rs, FALSE, supported_rates[i], &rate); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr); ok(rate == supported_rates[i], "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_IsRateSupported(rs, TRUE, supported_rates[i], NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_IsRateSupported(rs, FALSE, supported_rates[i], NULL); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr); }
/* Configuring stream type make rate support work. */ hr = IMFMediaSink_GetStreamSinkById(sink, 0, &stream_sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFStreamSink_GetMediaTypeHandler(stream_sink, &type_handler); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_RGB32); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_SetUINT64(media_type, &MF_MT_FRAME_SIZE, (UINT64)64 << 32 | 64); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_SetUINT32(media_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaTypeHandler_SetCurrentMediaType(type_handler, media_type); - ok(hr == S_OK, "Failed to set current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current type, hr %#lx.\n", hr);
rate = 1.0f; hr = IMFRateSupport_GetSlowestRate(rs, MFRATE_FORWARD, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 1.0f; hr = IMFRateSupport_GetSlowestRate(rs, MFRATE_REVERSE, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected rate %f.\n", rate);
rate = 0.0f; hr = IMFRateSupport_GetFastestRate(rs, MFRATE_FORWARD, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == FLT_MAX, "Unexpected rate %f.\n", rate);
rate = 0.0f; hr = IMFRateSupport_GetFastestRate(rs, MFRATE_REVERSE, TRUE, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == -FLT_MAX, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_GetFastestRate(rs, MFRATE_REVERSE, TRUE, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rs, MFRATE_REVERSE, TRUE, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(supported_rates); ++i) { rate = supported_rates[i] + 1.0f; hr = IMFRateSupport_IsRateSupported(rs, TRUE, supported_rates[i], &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == supported_rates[i], "Unexpected rate %f.\n", rate);
rate = supported_rates[i] + 1.0f; hr = IMFRateSupport_IsRateSupported(rs, FALSE, supported_rates[i], &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == supported_rates[i], "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_IsRateSupported(rs, TRUE, supported_rates[i], NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_IsRateSupported(rs, FALSE, supported_rates[i], NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); }
IMFMediaTypeHandler_Release(type_handler); @@ -4827,28 +4827,28 @@ todo_wine { IMFStreamSink_Release(stream_sink);
hr = IMFMediaSink_Shutdown(sink); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkCount(sink, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSink_GetStreamSinkCount(sink, &count); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rs, MFRATE_FORWARD, FALSE, &rate); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rs, MFRATE_FORWARD, FALSE, &rate); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetSlowestRate(rs, MFRATE_FORWARD, FALSE, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_GetFastestRate(rs, MFRATE_FORWARD, FALSE, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFRateSupport_IsRateSupported(rs, TRUE, 1.0f, &rate); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
IMFPresentationClock_Release(clock);
@@ -4856,7 +4856,7 @@ todo_wine { DestroyWindow(window);
hr = MFShutdown(); - ok(hr == S_OK, "Shutdown failure, hr %#x.\n", hr); + ok(hr == S_OK, "Shutdown failure, hr %#lx.\n", hr); }
static void test_MFCreateSimpleTypeHandler(void) @@ -4868,140 +4868,140 @@ static void test_MFCreateSimpleTypeHandler(void) GUID guid;
hr = MFCreateSimpleTypeHandler(&handler); - ok(hr == S_OK, "Failed to create object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create object, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeCount(handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, NULL, NULL); - ok(hr == MF_E_UNEXPECTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
count = 0; hr = IMFMediaTypeHandler_GetMediaTypeCount(handler, &count); - ok(hr == S_OK, "Failed to get type count, hr %#x.\n", hr); - ok(count == 1, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get type count, hr %#lx.\n", hr); + ok(count == 1, "Unexpected count %lu.\n", count);
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
media_type = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!media_type, "Unexpected pointer.\n");
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type, NULL); - ok(hr == MF_E_UNEXPECTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, media_type); - ok(hr == S_OK, "Failed to set current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current type, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, 0, &media_type2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(media_type2 == media_type, "Unexpected type.\n"); IMFMediaType_Release(media_type2);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type, &media_type2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(handler, 1, &media_type2); - ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &media_type2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(media_type == media_type2, "Unexpected pointer.\n"); IMFMediaType_Release(media_type2);
hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); - ok(hr == S_OK, "Failed to get major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get major type, hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MFMediaType_Video), "Unexpected major type.\n");
hr = MFCreateMediaType(&media_type3); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type3, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type3, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
/* Different major types. */ media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type3, &media_type2); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
hr = IMFMediaType_SetGUID(media_type3, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type3, &media_type2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
/* Handler missing subtype. */ hr = IMFMediaType_SetGUID(media_type3, &MF_MT_SUBTYPE, &MFVideoFormat_RGB8); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type3, &media_type2); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
/* Different subtypes. */ hr = IMFMediaType_SetGUID(media_type, &MF_MT_SUBTYPE, &MFVideoFormat_RGB24); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type3, &media_type2); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
/* Same major/subtype. */ hr = IMFMediaType_SetGUID(media_type3, &MF_MT_SUBTYPE, &MFVideoFormat_RGB24); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type3, &media_type2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
/* Set one more attribute. */ hr = IMFMediaType_SetUINT64(media_type, &MF_MT_FRAME_SIZE, (UINT64)4 << 32 | 4); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(handler, media_type3, &media_type2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
IMFMediaType_Release(media_type3); IMFMediaType_Release(media_type);
hr = IMFMediaTypeHandler_SetCurrentMediaType(handler, NULL); - ok(hr == S_OK, "Failed to set current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current type, hr %#lx.\n", hr);
media_type = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!media_type, "Unexpected pointer.\n");
hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
IMFMediaTypeHandler_Release(handler); } @@ -5012,11 +5012,11 @@ static void test_MFGetSupportedMimeTypes(void) HRESULT hr;
hr = MFGetSupportedMimeTypes(NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
value.vt = VT_EMPTY; hr = MFGetSupportedMimeTypes(&value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(value.vt == (VT_VECTOR | VT_LPWSTR), "Unexpected value type %#x.\n", value.vt);
PropVariantClear(&value); @@ -5028,11 +5028,11 @@ static void test_MFGetSupportedSchemes(void) HRESULT hr;
hr = MFGetSupportedSchemes(NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
value.vt = VT_EMPTY; hr = MFGetSupportedSchemes(&value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(value.vt == (VT_VECTOR | VT_LPWSTR), "Unexpected value type %#x.\n", value.vt);
PropVariantClear(&value); @@ -5045,10 +5045,10 @@ static BOOL is_sample_copier_available_type(IMFMediaType *type) HRESULT hr;
hr = IMFMediaType_GetMajorType(type, &major); - ok(hr == S_OK, "Failed to get major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get major type, hr %#lx.\n", hr);
hr = IMFMediaType_GetCount(type, &count); - ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attribute count, hr %#lx.\n", hr); ok(count == 1, "Unexpected attribute count %u.\n", count);
return IsEqualGUID(&major, &MFMediaType_Video) || IsEqualGUID(&major, &MFMediaType_Audio); @@ -5077,245 +5077,245 @@ static void test_sample_copier(void) }
hr = pMFCreateSampleCopierMFT(&copier); - ok(hr == S_OK, "Failed to create sample copier, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create sample copier, hr %#lx.\n", hr);
hr = IMFTransform_GetAttributes(copier, &attributes); - ok(hr == S_OK, "Failed to get transform attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get transform attributes, hr %#lx.\n", hr); hr = IMFTransform_GetAttributes(copier, &attributes2); - ok(hr == S_OK, "Failed to get transform attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get transform attributes, hr %#lx.\n", hr); ok(attributes == attributes2, "Unexpected instance.\n"); IMFAttributes_Release(attributes2); hr = IMFAttributes_GetCount(attributes, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(count == 1, "Unexpected attribute count %u.\n", count); hr = IMFAttributes_GetUINT32(attributes, &MFT_SUPPORT_DYNAMIC_FORMAT_CHANGE, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!value, "Unexpected value %u.\n", value); IMFAttributes_Release(attributes);
hr = IMFTransform_GetInputStreamAttributes(copier, 0, &attributes); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStreamAttributes(copier, 1, &attributes); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamAttributes(copier, 0, &attributes); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamAttributes(copier, 1, &attributes); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputBounds(copier, 0, 0); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
/* No dynamic streams. */ input_count = output_count = 0; hr = IMFTransform_GetStreamCount(copier, &input_count, &output_count); - ok(hr == S_OK, "Failed to get stream count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream count, hr %#lx.\n", hr); ok(input_count == 1 && output_count == 1, "Unexpected streams count.\n");
hr = IMFTransform_GetStreamLimits(copier, &in_min, &in_max, &out_min, &out_max); - ok(hr == S_OK, "Failed to get stream limits, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream limits, hr %#lx.\n", hr); ok(in_min == in_max && in_min == 1 && out_min == out_max && out_min == 1, "Unexpected stream limits.\n");
hr = IMFTransform_GetStreamIDs(copier, 1, &input_count, 1, &output_count); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_DeleteInputStream(copier, 0); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
/* Available types. */ hr = IMFTransform_GetInputAvailableType(copier, 0, 0, &mediatype); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(is_sample_copier_available_type(mediatype), "Unexpected type.\n"); IMFMediaType_Release(mediatype);
hr = IMFTransform_GetInputAvailableType(copier, 0, 1, &mediatype); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(is_sample_copier_available_type(mediatype), "Unexpected type.\n"); IMFMediaType_Release(mediatype);
hr = IMFTransform_GetInputAvailableType(copier, 0, 2, &mediatype); - ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputAvailableType(copier, 1, 0, &mediatype); - ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(copier, 0, 0, &mediatype); - ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputAvailableType(copier, 1, 0, &mediatype); - ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(copier, 0, &mediatype); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(copier, 1, &mediatype); - ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputCurrentType(copier, 0, &mediatype); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputCurrentType(copier, 1, &mediatype); - ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = MFCreateSample(&sample); - ok(hr == S_OK, "Failed to create a sample, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a sample, hr %#lx.\n", hr);
hr = IMFTransform_ProcessInput(copier, 0, sample, 0); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(copier, 0, mediatype, 0); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_SUBTYPE, &MFVideoFormat_RGB8); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT64(mediatype, &MF_MT_FRAME_SIZE, ((UINT64)16) << 32 | 16); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamInfo(copier, 0, &output_info); - ok(hr == S_OK, "Failed to get stream info, hr %#x.\n", hr); - ok(!output_info.dwFlags, "Unexpected flags %#x.\n", output_info.dwFlags); - ok(!output_info.cbSize, "Unexpected size %u.\n", output_info.cbSize); - ok(!output_info.cbAlignment, "Unexpected alignment %u.\n", output_info.cbAlignment); + ok(hr == S_OK, "Failed to get stream info, hr %#lx.\n", hr); + ok(!output_info.dwFlags, "Unexpected flags %#lx.\n", output_info.dwFlags); + ok(!output_info.cbSize, "Unexpected size %lu.\n", output_info.cbSize); + ok(!output_info.cbAlignment, "Unexpected alignment %lu.\n", output_info.cbAlignment);
hr = IMFTransform_GetInputStreamInfo(copier, 0, &input_info); - ok(hr == S_OK, "Failed to get stream info, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream info, hr %#lx.\n", hr);
ok(!input_info.hnsMaxLatency, "Unexpected latency %s.\n", wine_dbgstr_longlong(input_info.hnsMaxLatency)); - ok(!input_info.dwFlags, "Unexpected flags %#x.\n", input_info.dwFlags); - ok(!input_info.cbSize, "Unexpected size %u.\n", input_info.cbSize); - ok(!input_info.cbMaxLookahead, "Unexpected lookahead size %u.\n", input_info.cbMaxLookahead); - ok(!input_info.cbAlignment, "Unexpected alignment %u.\n", input_info.cbAlignment); + ok(!input_info.dwFlags, "Unexpected flags %#lx.\n", input_info.dwFlags); + ok(!input_info.cbSize, "Unexpected size %lu.\n", input_info.cbSize); + ok(!input_info.cbMaxLookahead, "Unexpected lookahead size %lu.\n", input_info.cbMaxLookahead); + ok(!input_info.cbAlignment, "Unexpected alignment %lu.\n", input_info.cbAlignment);
hr = IMFTransform_SetOutputType(copier, 0, mediatype, 0); - ok(hr == S_OK, "Failed to set input type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set input type, hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamInfo(copier, 0, &output_info); - ok(hr == S_OK, "Failed to get stream info, hr %#x.\n", hr); - ok(!output_info.dwFlags, "Unexpected flags %#x.\n", output_info.dwFlags); - ok(output_info.cbSize == 16 * 16, "Unexpected size %u.\n", output_info.cbSize); - ok(!output_info.cbAlignment, "Unexpected alignment %u.\n", output_info.cbAlignment); + ok(hr == S_OK, "Failed to get stream info, hr %#lx.\n", hr); + ok(!output_info.dwFlags, "Unexpected flags %#lx.\n", output_info.dwFlags); + ok(output_info.cbSize == 16 * 16, "Unexpected size %lu.\n", output_info.cbSize); + ok(!output_info.cbAlignment, "Unexpected alignment %lu.\n", output_info.cbAlignment);
hr = IMFTransform_GetOutputCurrentType(copier, 0, &mediatype2); - ok(hr == S_OK, "Failed to get current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get current type, hr %#lx.\n", hr); IMFMediaType_Release(mediatype2);
hr = IMFTransform_GetInputCurrentType(copier, 0, &mediatype2); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputStatus(copier, 0, &flags); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
/* Setting input type resets output type. */ hr = IMFTransform_GetOutputCurrentType(copier, 0, &mediatype2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFMediaType_Release(mediatype2);
hr = IMFTransform_SetInputType(copier, 0, mediatype, 0); - ok(hr == S_OK, "Failed to set input type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set input type, hr %#lx.\n", hr);
hr = IMFTransform_GetOutputCurrentType(copier, 0, &mediatype2); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputAvailableType(copier, 0, 1, &mediatype2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(is_sample_copier_available_type(mediatype2), "Unexpected type.\n"); IMFMediaType_Release(mediatype2);
hr = IMFTransform_GetInputStreamInfo(copier, 0, &input_info); - ok(hr == S_OK, "Failed to get stream info, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream info, hr %#lx.\n", hr); ok(!input_info.hnsMaxLatency, "Unexpected latency %s.\n", wine_dbgstr_longlong(input_info.hnsMaxLatency)); - ok(!input_info.dwFlags, "Unexpected flags %#x.\n", input_info.dwFlags); - ok(input_info.cbSize == 16 * 16, "Unexpected size %u.\n", input_info.cbSize); - ok(!input_info.cbMaxLookahead, "Unexpected lookahead size %u.\n", input_info.cbMaxLookahead); - ok(!input_info.cbAlignment, "Unexpected alignment %u.\n", input_info.cbAlignment); + ok(!input_info.dwFlags, "Unexpected flags %#lx.\n", input_info.dwFlags); + ok(input_info.cbSize == 16 * 16, "Unexpected size %lu.\n", input_info.cbSize); + ok(!input_info.cbMaxLookahead, "Unexpected lookahead size %lu.\n", input_info.cbMaxLookahead); + ok(!input_info.cbAlignment, "Unexpected alignment %lu.\n", input_info.cbAlignment);
hr = IMFTransform_GetOutputAvailableType(copier, 0, 0, &mediatype2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaType_IsEqual(mediatype2, mediatype, &flags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFMediaType_Release(mediatype2);
hr = IMFTransform_GetInputStatus(copier, 0, &flags); - ok(hr == S_OK, "Failed to get input status, hr %#x.\n", hr); - ok(flags == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get input status, hr %#lx.\n", hr); + ok(flags == MFT_INPUT_STATUS_ACCEPT_DATA, "Unexpected flags %#lx.\n", flags);
hr = IMFTransform_GetInputCurrentType(copier, 0, &mediatype2); - ok(hr == S_OK, "Failed to get current type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get current type, hr %#lx.\n", hr); IMFMediaType_Release(mediatype2);
hr = IMFTransform_GetOutputStatus(copier, &flags); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(copier, 0, mediatype, 0); - ok(hr == S_OK, "Failed to set output type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set output type, hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStatus(copier, &flags); - ok(hr == S_OK, "Failed to get output status, hr %#x.\n", hr); - ok(!flags, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get output status, hr %#lx.\n", hr); + ok(!flags, "Unexpected flags %#lx.\n", flags);
/* Pushing samples. */ hr = MFCreateAlignedMemoryBuffer(output_info.cbSize, output_info.cbAlignment, &media_buffer); - ok(hr == S_OK, "Failed to create media buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media buffer, hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(sample, media_buffer); - ok(hr == S_OK, "Failed to add a buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a buffer, hr %#lx.\n", hr); IMFMediaBuffer_Release(media_buffer);
EXPECT_REF(sample, 1); hr = IMFTransform_ProcessInput(copier, 0, sample, 0); - ok(hr == S_OK, "Failed to process input, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to process input, hr %#lx.\n", hr); EXPECT_REF(sample, 2);
hr = IMFTransform_GetInputStatus(copier, 0, &flags); - ok(hr == S_OK, "Failed to get input status, hr %#x.\n", hr); - ok(!flags, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get input status, hr %#lx.\n", hr); + ok(!flags, "Unexpected flags %#lx.\n", flags);
hr = IMFTransform_GetOutputStatus(copier, &flags); - ok(hr == S_OK, "Failed to get output status, hr %#x.\n", hr); - ok(flags == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get output status, hr %#lx.\n", hr); + ok(flags == MFT_OUTPUT_STATUS_SAMPLE_READY, "Unexpected flags %#lx.\n", flags);
hr = IMFTransform_ProcessInput(copier, 0, sample, 0); - ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOTACCEPTING, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamInfo(copier, 0, &output_info); - ok(hr == S_OK, "Failed to get output info, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get output info, hr %#lx.\n", hr);
hr = MFCreateAlignedMemoryBuffer(output_info.cbSize, output_info.cbAlignment, &media_buffer); - ok(hr == S_OK, "Failed to create media buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media buffer, hr %#lx.\n", hr);
hr = MFCreateSample(&client_sample); - ok(hr == S_OK, "Failed to create a sample, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a sample, hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(client_sample, media_buffer); - ok(hr == S_OK, "Failed to add a buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add a buffer, hr %#lx.\n", hr); IMFMediaBuffer_Release(media_buffer);
status = 0; memset(&buffer, 0, sizeof(buffer)); buffer.pSample = client_sample; hr = IMFTransform_ProcessOutput(copier, 0, 1, &buffer, &status); - ok(hr == S_OK, "Failed to get output, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get output, hr %#lx.\n", hr); EXPECT_REF(sample, 1);
hr = IMFTransform_ProcessOutput(copier, 0, 1, &buffer, &status); - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Failed to get output, hr %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "Failed to get output, hr %#lx.\n", hr);
/* Flushing. */ hr = IMFTransform_ProcessInput(copier, 0, sample, 0); - ok(hr == S_OK, "Failed to process input, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to process input, hr %#lx.\n", hr); EXPECT_REF(sample, 2);
hr = IMFTransform_ProcessMessage(copier, MFT_MESSAGE_COMMAND_FLUSH, 0); - ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr); EXPECT_REF(sample, 1);
IMFSample_Release(sample); @@ -5343,57 +5343,57 @@ static void sample_copier_process(IMFTransform *copier, IMFMediaBuffer *input_bu HRESULT hr;
hr = MFCreateSample(&input_sample); - ok(hr == S_OK, "Failed to create a sample, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a sample, hr %#lx.\n", hr);
if (md) { hr = IMFSample_SetSampleFlags(input_sample, md->flags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleTime(input_sample, md->time); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleDuration(input_sample, md->duration); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); }
hr = MFCreateSample(&output_sample); - ok(hr == S_OK, "Failed to create a sample, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a sample, hr %#lx.\n", hr);
hr = IMFSample_SetSampleFlags(output_sample, ~0u); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleTime(output_sample, ~0u); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_SetSampleDuration(output_sample, ~0u); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(input_sample, input_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(output_sample, output_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_ProcessInput(copier, 0, input_sample, 0); - ok(hr == S_OK, "Failed to process input, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to process input, hr %#lx.\n", hr);
status = 0; memset(&buffer, 0, sizeof(buffer)); buffer.pSample = output_sample; hr = IMFTransform_ProcessOutput(copier, 0, 1, &buffer, &status); - ok(hr == S_OK, "Failed to get output, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get output, hr %#lx.\n", hr);
if (!md) md = &zero_md;
hr = IMFSample_GetSampleFlags(output_sample, &flags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(md->flags == flags, "Unexpected flags.\n"); hr = IMFSample_GetSampleTime(output_sample, &time); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(md->time == time, "Unexpected time.\n"); hr = IMFSample_GetSampleDuration(output_sample, &time); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(md->duration == time, "Unexpected duration.\n");
IMFSample_Release(input_sample); @@ -5415,59 +5415,59 @@ static void test_sample_copier_output_processing(void) return;
hr = pMFCreateSampleCopierMFT(&copier); - ok(hr == S_OK, "Failed to create sample copier, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create sample copier, hr %#lx.\n", hr);
/* Configure for 16 x 16 of D3DFMT_X8R8G8B8. */ hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_SUBTYPE, &MFVideoFormat_RGB32); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT64(mediatype, &MF_MT_FRAME_SIZE, ((UINT64)16) << 32 | 16); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = IMFTransform_SetInputType(copier, 0, mediatype, 0); - ok(hr == S_OK, "Failed to set input type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set input type, hr %#lx.\n", hr);
hr = IMFTransform_SetOutputType(copier, 0, mediatype, 0); - ok(hr == S_OK, "Failed to set input type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set input type, hr %#lx.\n", hr);
/* Source and destination are linear buffers, destination is twice as large. */ hr = IMFTransform_GetOutputStreamInfo(copier, 0, &output_info); - ok(hr == S_OK, "Failed to get output info, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get output info, hr %#lx.\n", hr);
hr = MFCreateAlignedMemoryBuffer(output_info.cbSize, output_info.cbAlignment, &output_buffer); - ok(hr == S_OK, "Failed to create media buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media buffer, hr %#lx.\n", hr);
hr = IMFMediaBuffer_Lock(output_buffer, &ptr, &max_length, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); memset(ptr, 0xcc, max_length); hr = IMFMediaBuffer_Unlock(output_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateAlignedMemoryBuffer(output_info.cbSize, output_info.cbAlignment, &input_buffer); - ok(hr == S_OK, "Failed to create media buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media buffer, hr %#lx.\n", hr);
hr = IMFMediaBuffer_Lock(input_buffer, &ptr, &max_length, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); memset(ptr, 0xaa, max_length); hr = IMFMediaBuffer_Unlock(input_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaBuffer_SetCurrentLength(input_buffer, 4); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
sample_copier_process(copier, input_buffer, output_buffer, NULL);
hr = IMFMediaBuffer_Lock(output_buffer, &ptr, &max_length, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(ptr[0] == 0xaa && ptr[4] == 0xcc, "Unexpected buffer contents.\n");
hr = IMFMediaBuffer_Unlock(output_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
md.flags = 123; md.time = 10; @@ -5495,71 +5495,71 @@ static void test_MFGetTopoNodeCurrentType(void)
/* Tee node. */ hr = MFCreateTopologyNode(MF_TOPOLOGY_TEE_NODE, &node); - ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a node, hr %#lx.\n", hr);
hr = pMFGetTopoNodeCurrentType(node, 0, TRUE, &media_type); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = pMFGetTopoNodeCurrentType(node, 0, FALSE, &media_type); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMediaType(&media_type2); - ok(hr == S_OK, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type2, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
/* Input type returned, if set. */ hr = IMFTopologyNode_SetInputPrefType(node, 0, media_type2); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr);
hr = pMFGetTopoNodeCurrentType(node, 0, FALSE, &media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(media_type == media_type2, "Unexpected pointer.\n"); IMFMediaType_Release(media_type);
hr = IMFTopologyNode_SetInputPrefType(node, 0, NULL); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr);
hr = pMFGetTopoNodeCurrentType(node, 0, FALSE, &media_type); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Set second output. */ hr = IMFTopologyNode_SetOutputPrefType(node, 1, media_type2); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr);
hr = pMFGetTopoNodeCurrentType(node, 0, FALSE, &media_type); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_SetOutputPrefType(node, 1, NULL); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr);
/* Set first output. */ hr = IMFTopologyNode_SetOutputPrefType(node, 0, media_type2); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr);
hr = pMFGetTopoNodeCurrentType(node, 0, FALSE, &media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(media_type == media_type2, "Unexpected pointer.\n"); IMFMediaType_Release(media_type);
hr = IMFTopologyNode_SetOutputPrefType(node, 0, NULL); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr);
/* Set primary output. */ hr = IMFTopologyNode_SetOutputPrefType(node, 1, media_type2); - ok(hr == S_OK, "Failed to set media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set media type, hr %#lx.\n", hr);
hr = IMFTopologyNode_SetUINT32(node, &MF_TOPONODE_PRIMARYOUTPUT, 1); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
hr = pMFGetTopoNodeCurrentType(node, 0, FALSE, &media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(media_type == media_type2, "Unexpected pointer.\n"); IMFMediaType_Release(media_type);
hr = pMFGetTopoNodeCurrentType(node, 0, TRUE, &media_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(media_type == media_type2, "Unexpected pointer.\n"); IMFMediaType_Release(media_type);
@@ -5585,31 +5585,31 @@ static void test_MFRequireProtectedEnvironment(void) HRESULT hr;
hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateStreamDescriptor(0, 1, &mediatype, &sd); - ok(hr == S_OK, "Failed to create stream descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create stream descriptor, hr %#lx.\n", hr);
hr = MFCreatePresentationDescriptor(1, &sd, &pd); - ok(hr == S_OK, "Failed to create presentation descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create presentation descriptor, hr %#lx.\n", hr);
hr = IMFPresentationDescriptor_SelectStream(pd, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFRequireProtectedEnvironment(pd); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamDescriptor_SetUINT32(sd, &MF_SD_PROTECTED, 1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFRequireProtectedEnvironment(pd); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationDescriptor_DeselectStream(pd, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFRequireProtectedEnvironment(pd); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(mediatype); IMFStreamDescriptor_Release(sd); @@ -5636,7 +5636,7 @@ static BOOL create_transform(GUID category, MFT_REGISTER_TYPE_INFO *input_type, return FALSE; }
- ok(hr == S_OK, "MFTEnum returned %x\n", hr); + ok(hr == S_OK, "MFTEnum returned %lx\n", hr); ok(count == 1, "got %u\n", count); *class_id = class_ids[0]; CoTaskMemFree(class_ids); @@ -5649,7 +5649,7 @@ static BOOL create_transform(GUID category, MFT_REGISTER_TYPE_INFO *input_type, } else { - ok(hr == S_OK, "MFTEnum returned %x\n", hr); + ok(hr == S_OK, "MFTEnum returned %lx\n", hr); ok(!wcscmp(name, expect_name), "got name %s\n", debugstr_w(name)); ok(input_count == expect_input_count, "got input_count %u\n", input_count); for (i = 0; i < input_count; ++i) @@ -5693,22 +5693,22 @@ static IMFSample *create_sample(const BYTE *data, ULONG size) ULONG ret;
hr = MFCreateSample(&sample); - ok(hr == S_OK, "MFCreateSample returned %#x\n", hr); + ok(hr == S_OK, "MFCreateSample returned %#lx\n", hr); hr = MFCreateMemoryBuffer(size, &media_buffer); - ok(hr == S_OK, "MFCreateMemoryBuffer returned %#x\n", hr); + ok(hr == S_OK, "MFCreateMemoryBuffer returned %#lx\n", hr); hr = IMFMediaBuffer_Lock(media_buffer, &buffer, NULL, &length); - ok(hr == S_OK, "Lock returned %#x\n", hr); - ok(length == 0, "got length %u\n", length); + ok(hr == S_OK, "Lock returned %#lx\n", hr); + ok(length == 0, "got length %lu\n", length); if (!data) memset(buffer, 0xcd, size); else memcpy(buffer, data, size); hr = IMFMediaBuffer_Unlock(media_buffer); - ok(hr == S_OK, "Unlock returned %#x\n", hr); + ok(hr == S_OK, "Unlock returned %#lx\n", hr); hr = IMFMediaBuffer_SetCurrentLength(media_buffer, data ? size : 0); - ok(hr == S_OK, "SetCurrentLength returned %#x\n", hr); + ok(hr == S_OK, "SetCurrentLength returned %#lx\n", hr); hr = IMFSample_AddBuffer(sample, media_buffer); - ok(hr == S_OK, "AddBuffer returned %#x\n", hr); + ok(hr == S_OK, "AddBuffer returned %#lx\n", hr); ret = IMFMediaBuffer_Release(media_buffer); - ok(ret == 1, "Release returned %u\n", ret); + ok(ret == 1, "Release returned %lu\n", ret);
return sample; } @@ -5723,10 +5723,10 @@ static void check_sample_(int line, IMFSample *sample, const void *expect_buf, U ULONG ret;
hr = IMFSample_ConvertToContiguousBuffer(sample, &media_buffer); - ok_(__FILE__, line)(hr == S_OK, "ConvertToContiguousBuffer returned %#x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "ConvertToContiguousBuffer returned %#lx\n", hr); hr = IMFMediaBuffer_Lock(media_buffer, &buffer, NULL, &length); - ok_(__FILE__, line)(hr == S_OK, "Lock returned %#x\n", hr); - ok_(__FILE__, line)(expect_len == length, "got length %u\n", length); + ok_(__FILE__, line)(hr == S_OK, "Lock returned %#lx\n", hr); + ok_(__FILE__, line)(expect_len == length, "got length %lu\n", length); if (length && length == expect_len) { ok_(__FILE__, line)(!memcmp(expect_buf, buffer, expect_len), @@ -5734,9 +5734,9 @@ static void check_sample_(int line, IMFSample *sample, const void *expect_buf, U } if (output_file) WriteFile(output_file, buffer, length, &length, NULL); hr = IMFMediaBuffer_Unlock(media_buffer); - ok_(__FILE__, line)(hr == S_OK, "Unlock returned %#x\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Unlock returned %#lx\n", hr); ret = IMFMediaBuffer_Release(media_buffer); - ok_(__FILE__, line)(ret == 1, "Release returned %u\n", ret); + ok_(__FILE__, line)(ret == 1, "Release returned %lu\n", ret); }
static const BYTE wma_codec_data[10] = {0, 0x44, 0, 0, 0x17, 0, 0, 0, 0, 0}; @@ -5814,7 +5814,7 @@ static void test_wma_encoder(void) HRESULT hr;
hr = CoInitialize(NULL); - ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
if (!create_transform(MFT_CATEGORY_AUDIO_ENCODER, &input_type, &output_type, L"WMAudio Encoder MFT", transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), @@ -5824,47 +5824,47 @@ static void test_wma_encoder(void) check_interface(transform, &IID_IMediaObject, TRUE);
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr); + ok(hr == S_OK, "MFCreateMediaType returned %#lx\n", hr); init_media_type(media_type, input_type_desc, -1); hr = IMFTransform_SetInputType(transform, 0, media_type, 0); - ok(hr == S_OK, "SetInputType returned %#x.\n", hr); + ok(hr == S_OK, "SetInputType returned %#lx.\n", hr); init_media_type(media_type, output_type_desc, -1); hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); - ok(hr == S_OK, "SetOutputType returned %#x.\n", hr); + ok(hr == S_OK, "SetOutputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
memset(&input_info, 0xcd, sizeof(input_info)); hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); - ok(hr == S_OK, "GetInputStreamInfo returned %#x\n", hr); + ok(hr == S_OK, "GetInputStreamInfo returned %#lx\n", hr); ok(input_info.hnsMaxLatency == 19969161, "got hnsMaxLatency %s\n", wine_dbgstr_longlong(input_info.hnsMaxLatency)); - ok(input_info.dwFlags == 0, "got dwFlags %#x\n", input_info.dwFlags); - ok(input_info.cbSize == 8, "got cbSize %u\n", input_info.cbSize); - ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#x\n", input_info.cbMaxLookahead); - ok(input_info.cbAlignment == 1, "got cbAlignment %#x\n", input_info.cbAlignment); + ok(input_info.dwFlags == 0, "got dwFlags %#lx\n", input_info.dwFlags); + ok(input_info.cbSize == 8, "got cbSize %lu\n", input_info.cbSize); + ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#lx\n", input_info.cbMaxLookahead); + ok(input_info.cbAlignment == 1, "got cbAlignment %#lx\n", input_info.cbAlignment);
memset(&output_info, 0xcd, sizeof(output_info)); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); - ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr); - ok(output_info.dwFlags == 0, "got dwFlags %#x\n", output_info.dwFlags); - ok(output_info.cbSize == wma_block_size, "got cbSize %#x\n", output_info.cbSize); - ok(output_info.cbAlignment == 1, "got cbAlignment %#x\n", output_info.cbAlignment); + ok(hr == S_OK, "GetOutputStreamInfo returned %#lx\n", hr); + ok(output_info.dwFlags == 0, "got dwFlags %#lx\n", output_info.dwFlags); + ok(output_info.cbSize == wma_block_size, "got cbSize %#lx\n", output_info.cbSize); + ok(output_info.cbAlignment == 1, "got cbAlignment %#lx\n", output_info.cbAlignment);
i = 0; sample = create_sample(wma_decoded_data, sizeof(wma_decoded_data)); while (SUCCEEDED(hr = IMFTransform_ProcessInput(transform, 0, sample, 0))) { - ok(hr == S_OK, "ProcessInput returned %#x\n", hr); + ok(hr == S_OK, "ProcessInput returned %#lx\n", hr); i += sizeof(wma_decoded_data); } - ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#x\n", hr); - ok(i == 0x204000, "ProcessInput consumed %#x bytes\n", i); + ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#lx\n", hr); + ok(i == 0x204000, "ProcessInput consumed %#lx bytes\n", i);
hr = IMFTransform_ProcessMessage(transform, MFT_MESSAGE_COMMAND_DRAIN, 0); - ok(hr == S_OK, "ProcessMessage returned %#x\n", hr); + ok(hr == S_OK, "ProcessMessage returned %#lx\n", hr); hr = IMFTransform_ProcessInput(transform, 0, sample, 0); - ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#x\n", hr); + ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#lx\n", hr);
status = 0xdeadbeef; sample = create_sample(NULL, output_info.cbSize); @@ -5873,28 +5873,28 @@ static void test_wma_encoder(void)
/* check wmadata.bin against current encoder output */ resource = FindResourceW(NULL, L"wmadata.bin", (const WCHAR *)RT_RCDATA); - ok(resource != 0, "FindResourceW failed, error %u\n", GetLastError()); + ok(resource != 0, "FindResourceW failed, error %lu\n", GetLastError()); wma_encoded_data = LockResource(LoadResource(GetModuleHandleW(NULL), resource)); wma_encoded_data_len = SizeofResource(GetModuleHandleW(NULL), resource); - ok(wma_encoded_data_len % wma_block_size == 0, "got wma encoded length %u\n", wma_encoded_data_len); + ok(wma_encoded_data_len % wma_block_size == 0, "got wma encoded length %lu\n", wma_encoded_data_len);
/* and generate a new one as well in a temporary directory */ GetTempPathW(ARRAY_SIZE(output_path), output_path); lstrcatW(output_path, L"wmadata.bin"); output_file = CreateFileW(output_path, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(output_file != INVALID_HANDLE_VALUE, "CreateFileW failed, error %u\n", GetLastError()); + ok(output_file != INVALID_HANDLE_VALUE, "CreateFileW failed, error %lu\n", GetLastError());
i = 0; while (SUCCEEDED(hr = IMFTransform_ProcessOutput(transform, 0, 1, &output, &status))) { - winetest_push_context("%u", i); - ok(hr == S_OK, "ProcessOutput returned %#x\n", hr); + winetest_push_context("%lu", i); + ok(hr == S_OK, "ProcessOutput returned %#lx\n", hr); ok(output.pSample == sample, "got pSample %p\n", output.pSample); ok(output.dwStatus == MFT_OUTPUT_DATA_BUFFER_INCOMPLETE || broken(output.dwStatus == (MFT_OUTPUT_DATA_BUFFER_INCOMPLETE|5)) /* win7 */, - "got dwStatus %#x\n", output.dwStatus); - ok(status == 0, "got status %#x\n", status); - ok(wma_encoded_data_len > i * wma_block_size, "got %u blocks\n", i); + "got dwStatus %#lx\n", output.dwStatus); + ok(status == 0, "got status %#lx\n", status); + ok(wma_encoded_data_len > i * wma_block_size, "got %lu blocks\n", i); check_sample(sample, wma_encoded_data + i * wma_block_size, wma_block_size, output_file); winetest_pop_context(); i++; @@ -5904,23 +5904,23 @@ static void test_wma_encoder(void) CloseHandle(output_file);
ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
status = 0xdeadbeef; sample = create_sample(NULL, output_info.cbSize); memset(&output, 0, sizeof(output)); output.pSample = sample; hr = IMFTransform_ProcessOutput(transform, 0, 1, &output, &status); - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#lx\n", hr); ok(output.pSample == sample, "got pSample %p\n", output.pSample); - ok(output.dwStatus == 0, "got dwStatus %#x\n", output.dwStatus); - ok(status == 0, "got status %#x\n", status); + ok(output.dwStatus == 0, "got dwStatus %#lx\n", output.dwStatus); + ok(status == 0, "got status %#lx\n", status); check_sample(sample, NULL, 0, NULL); ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
ret = IMFTransform_Release(transform); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
failed: CoUninitialize(); @@ -6049,7 +6049,7 @@ static void test_wma_decoder(void) HRESULT hr;
hr = CoInitialize(NULL); - ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
if (!create_transform(MFT_CATEGORY_AUDIO_DECODER, &input_type, &output_type, L"WMAudio Decoder MFT", transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), @@ -6061,173 +6061,173 @@ static void test_wma_decoder(void) /* check default media types */
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetInputStreamInfo returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetInputStreamInfo returned %#lx\n", hr); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputStreamInfo returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputStreamInfo returned %#lx\n", hr); hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputAvailableType returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputAvailableType returned %#lx\n", hr);
i = -1; while (SUCCEEDED(hr = IMFTransform_GetInputAvailableType(transform, 0, ++i, &media_type))) { - winetest_push_context("in %u", i); - ok(hr == S_OK, "GetInputAvailableType returned %#x\n", hr); + winetest_push_context("in %lu", i); + ok(hr == S_OK, "GetInputAvailableType returned %#lx\n", hr); check_media_type(media_type, expect_available_inputs[i], -1); hr = IMFTransform_SetInputType(transform, 0, media_type, 0); - ok(hr == MF_E_INVALIDMEDIATYPE, "SetInputType returned %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "SetInputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret); winetest_pop_context(); } todo_wine - ok(hr == MF_E_NO_MORE_TYPES, "GetInputAvailableType returned %#x\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "GetInputAvailableType returned %#lx\n", hr); todo_wine - ok(i == 4, "%u input media types\n", i); + ok(i == 4, "%lu input media types\n", i);
/* setting output media type first doesn't work */
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr); + ok(hr == S_OK, "MFCreateMediaType returned %#lx\n", hr); init_media_type(media_type, output_type_desc, -1); hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "SetOutputType returned %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "SetOutputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
/* check required input media type attributes */
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr); + ok(hr == S_OK, "MFCreateMediaType returned %#lx\n", hr); hr = IMFTransform_SetInputType(transform, 0, media_type, 0); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetInputType returned %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetInputType returned %#lx.\n", hr); init_media_type(media_type, input_type_desc, 1); hr = IMFTransform_SetInputType(transform, 0, media_type, 0); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetInputType returned %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetInputType returned %#lx.\n", hr); init_media_type(media_type, input_type_desc, 2); for (i = 2; i < ARRAY_SIZE(input_type_desc) - 1; ++i) { hr = IMFTransform_SetInputType(transform, 0, media_type, 0); - ok(hr == MF_E_INVALIDMEDIATYPE, "SetInputType returned %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "SetInputType returned %#lx.\n", hr); init_media_type(media_type, input_type_desc, i + 1); } hr = IMFTransform_SetInputType(transform, 0, media_type, 0); - ok(hr == S_OK, "SetInputType returned %#x.\n", hr); + ok(hr == S_OK, "SetInputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetInputStreamInfo returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetInputStreamInfo returned %#lx\n", hr); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputStreamInfo returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputStreamInfo returned %#lx\n", hr);
/* check new output media types */
i = -1; while (SUCCEEDED(hr = IMFTransform_GetOutputAvailableType(transform, 0, ++i, &media_type))) { - winetest_push_context("out %u", i); - ok(hr == S_OK, "GetOutputAvailableType returned %#x\n", hr); + winetest_push_context("out %lu", i); + ok(hr == S_OK, "GetOutputAvailableType returned %#lx\n", hr); check_media_type(media_type, expect_available_outputs[i], -1); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret); winetest_pop_context(); } - ok(hr == MF_E_NO_MORE_TYPES, "GetOutputAvailableType returned %#x\n", hr); - ok(i == 2, "%u output media types\n", i); + ok(hr == MF_E_NO_MORE_TYPES, "GetOutputAvailableType returned %#lx\n", hr); + ok(i == 2, "%lu output media types\n", i);
/* check required output media type attributes */
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr); + ok(hr == S_OK, "MFCreateMediaType returned %#lx\n", hr); hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetOutputType returned %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetOutputType returned %#lx.\n", hr); init_media_type(media_type, output_type_desc, 1); hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetOutputType returned %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetOutputType returned %#lx.\n", hr); init_media_type(media_type, output_type_desc, 2); for (i = 2; i < ARRAY_SIZE(output_type_desc) - 1; ++i) { hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); - ok(hr == MF_E_INVALIDMEDIATYPE, "SetOutputType returned %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "SetOutputType returned %#lx.\n", hr); init_media_type(media_type, output_type_desc, i + 1); } hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); - ok(hr == S_OK, "SetOutputType returned %#x.\n", hr); + ok(hr == S_OK, "SetOutputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
memset(&input_info, 0xcd, sizeof(input_info)); hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); - ok(hr == S_OK, "GetInputStreamInfo returned %#x\n", hr); + ok(hr == S_OK, "GetInputStreamInfo returned %#lx\n", hr); ok(input_info.hnsMaxLatency == 0, "got hnsMaxLatency %s\n", wine_dbgstr_longlong(input_info.hnsMaxLatency)); - ok(input_info.dwFlags == 0, "got dwFlags %#x\n", input_info.dwFlags); - ok(input_info.cbSize == wma_block_size, "got cbSize %u\n", input_info.cbSize); - ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#x\n", input_info.cbMaxLookahead); - ok(input_info.cbAlignment == 1, "got cbAlignment %#x\n", input_info.cbAlignment); + ok(input_info.dwFlags == 0, "got dwFlags %#lx\n", input_info.dwFlags); + ok(input_info.cbSize == wma_block_size, "got cbSize %lu\n", input_info.cbSize); + ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#lx\n", input_info.cbMaxLookahead); + ok(input_info.cbAlignment == 1, "got cbAlignment %#lx\n", input_info.cbAlignment);
memset(&output_info, 0xcd, sizeof(output_info)); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); - ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr); - ok(output_info.dwFlags == 0, "got dwFlags %#x\n", output_info.dwFlags); + ok(hr == S_OK, "GetOutputStreamInfo returned %#lx\n", hr); + ok(output_info.dwFlags == 0, "got dwFlags %#lx\n", output_info.dwFlags); todo_wine - ok(output_info.cbSize == 0, "got cbSize %#x\n", output_info.cbSize); - ok(output_info.cbAlignment == 1, "got cbAlignment %#x\n", output_info.cbAlignment); + ok(output_info.cbSize == 0, "got cbSize %#lx\n", output_info.cbSize); + ok(output_info.cbAlignment == 1, "got cbAlignment %#lx\n", output_info.cbAlignment);
/* MF_MT_AUDIO_AVG_BYTES_PER_SECOND isn't required by SetInputType, but is needed for the transform to work */
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr); + ok(hr == S_OK, "MFCreateMediaType returned %#lx\n", hr); init_media_type(media_type, input_type_desc, -1); hr = IMFMediaType_SetUINT32(media_type, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, 4003); - ok(hr == S_OK, "SetUINT32 returned %#x\n", hr); + ok(hr == S_OK, "SetUINT32 returned %#lx\n", hr); hr = IMFTransform_SetInputType(transform, 0, media_type, 0); - ok(hr == S_OK, "SetInputType returned %#x.\n", hr); + ok(hr == S_OK, "SetInputType returned %#lx.\n", hr);
hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputStreamInfo returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputStreamInfo returned %#lx\n", hr);
init_media_type(media_type, output_type_desc, -1); hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); - ok(hr == S_OK, "SetInputType returned %#x.\n", hr); + ok(hr == S_OK, "SetInputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
memset(&output_info, 0xcd, sizeof(output_info)); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); - ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr); - ok(output_info.dwFlags == 0, "got dwFlags %#x\n", output_info.dwFlags); - ok(output_info.cbSize == sizeof(wma_decoded_data), "got cbSize %#x\n", output_info.cbSize); - ok(output_info.cbAlignment == 1, "got cbAlignment %#x\n", output_info.cbAlignment); + ok(hr == S_OK, "GetOutputStreamInfo returned %#lx\n", hr); + ok(output_info.dwFlags == 0, "got dwFlags %#lx\n", output_info.dwFlags); + ok(output_info.cbSize == sizeof(wma_decoded_data), "got cbSize %#lx\n", output_info.cbSize); + ok(output_info.cbAlignment == 1, "got cbAlignment %#lx\n", output_info.cbAlignment);
/* resource is generated using test_wma_encoder output file */ resource = FindResourceW(NULL, L"wmadata.bin", (const WCHAR *)RT_RCDATA); - ok(resource != 0, "FindResourceW failed, error %u\n", GetLastError()); + ok(resource != 0, "FindResourceW failed, error %lu\n", GetLastError()); wma_encoded_data = LockResource(LoadResource(GetModuleHandleW(NULL), resource)); wma_encoded_data_len = SizeofResource(GetModuleHandleW(NULL), resource); - ok(wma_encoded_data_len % wma_block_size == 0, "got wma encoded length %u\n", wma_encoded_data_len); + ok(wma_encoded_data_len % wma_block_size == 0, "got wma encoded length %lu\n", wma_encoded_data_len);
sample = create_sample(wma_encoded_data, wma_block_size / 2); hr = IMFTransform_ProcessInput(transform, 0, sample, 0); todo_wine - ok(hr == S_OK, "ProcessInput returned %#x\n", hr); + ok(hr == S_OK, "ProcessInput returned %#lx\n", hr); ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret); sample = create_sample(wma_encoded_data + wma_block_size, wma_block_size - wma_block_size / 2); hr = IMFTransform_ProcessInput(transform, 0, sample, 0); todo_wine - ok(hr == S_OK, "ProcessInput returned %#x\n", hr); + ok(hr == S_OK, "ProcessInput returned %#lx\n", hr); ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret); sample = create_sample(wma_encoded_data, wma_block_size); hr = IMFTransform_ProcessInput(transform, 0, sample, 0); todo_wine - ok(hr == S_OK, "ProcessInput returned %#x\n", hr); + ok(hr == S_OK, "ProcessInput returned %#lx\n", hr); hr = IMFTransform_ProcessInput(transform, 0, sample, 0); todo_wine - ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#x\n", hr); + ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#lx\n", hr); ret = IMFSample_Release(sample); todo_wine - ok(ret == 1, "Release returned %u\n", ret); + ok(ret == 1, "Release returned %lu\n", ret);
/* As output_info.dwFlags doesn't have MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES * IMFTransform_ProcessOutput needs a sample or returns MF_E_TRANSFORM_NEED_MORE_INPUT */ @@ -6236,36 +6236,36 @@ static void test_wma_decoder(void) memset(&output, 0, sizeof(output)); hr = IMFTransform_ProcessOutput(transform, 0, 1, &output, &status); todo_wine - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#x\n", hr); - ok(output.dwStreamID == 0, "got dwStreamID %u\n", output.dwStreamID); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#lx\n", hr); + ok(output.dwStreamID == 0, "got dwStreamID %lu\n", output.dwStreamID); ok(!output.pSample, "got pSample %p\n", output.pSample); todo_wine ok(output.dwStatus == MFT_OUTPUT_DATA_BUFFER_NO_SAMPLE || broken(output.dwStatus == (MFT_OUTPUT_DATA_BUFFER_INCOMPLETE|MFT_OUTPUT_DATA_BUFFER_NO_SAMPLE)) /* Win7 */, - "got dwStatus %#x\n", output.dwStatus); + "got dwStatus %#lx\n", output.dwStatus); ok(!output.pEvents, "got pEvents %p\n", output.pEvents); todo_wine - ok(status == 0, "got status %#x\n", status); + ok(status == 0, "got status %#lx\n", status);
sample = create_sample(wma_encoded_data, wma_block_size); hr = IMFTransform_ProcessInput(transform, 0, sample, 0); todo_wine - ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#x\n", hr); + ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#lx\n", hr); ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
status = 0xdeadbeef; memset(&output, 0, sizeof(output)); hr = IMFTransform_ProcessOutput(transform, 0, 1, &output, &status); todo_wine - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#lx\n", hr); ok(!output.pSample, "got pSample %p\n", output.pSample); todo_wine ok(output.dwStatus == MFT_OUTPUT_DATA_BUFFER_NO_SAMPLE || broken(output.dwStatus == (MFT_OUTPUT_DATA_BUFFER_INCOMPLETE|MFT_OUTPUT_DATA_BUFFER_NO_SAMPLE)) /* Win7 */, - "got dwStatus %#x\n", output.dwStatus); + "got dwStatus %#lx\n", output.dwStatus); todo_wine - ok(status == 0, "got status %#x\n", status); + ok(status == 0, "got status %#lx\n", status);
i = 1; status = 0xdeadbeef; @@ -6276,19 +6276,19 @@ static void test_wma_decoder(void) hr = IMFTransform_ProcessOutput(transform, 0, 1, &output, &status); while (hr == MF_E_TRANSFORM_NEED_MORE_INPUT) { - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#lx\n", hr); ok(output.pSample == sample, "got pSample %p\n", output.pSample); - ok(output.dwStatus == 0, "got dwStatus %#x\n", output.dwStatus); - ok(status == 0, "got status %#x\n", status); + ok(output.dwStatus == 0, "got dwStatus %#lx\n", output.dwStatus); + ok(status == 0, "got status %#lx\n", status); check_sample(sample, NULL, 0, NULL); ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
sample = create_sample(wma_encoded_data + i * wma_block_size, wma_block_size); hr = IMFTransform_ProcessInput(transform, 0, sample, 0); - ok(hr == S_OK, "ProcessInput returned %#x\n", hr); + ok(hr == S_OK, "ProcessInput returned %#lx\n", hr); ret = IMFSample_Release(sample); - ok(ret == 1, "Release returned %u\n", ret); + ok(ret == 1, "Release returned %lu\n", ret); i++;
status = 0xdeadbeef; @@ -6299,7 +6299,7 @@ static void test_wma_decoder(void) }
todo_wine - ok(hr == S_OK, "ProcessOutput returned %#x\n", hr); + ok(hr == S_OK, "ProcessOutput returned %#lx\n", hr); ok(output.pSample == sample, "got pSample %p\n", output.pSample);
i = 0; @@ -6308,8 +6308,8 @@ static void test_wma_decoder(void) ok(output.pSample == sample, "got pSample %p\n", output.pSample); ok(output.dwStatus == MFT_OUTPUT_DATA_BUFFER_INCOMPLETE || output.dwStatus == 0 || broken(output.dwStatus == (MFT_OUTPUT_DATA_BUFFER_INCOMPLETE|7) || output.dwStatus == 7) /* Win7 */, - "got dwStatus %#x\n", output.dwStatus); - ok(status == 0, "got status %#x\n", status); + "got dwStatus %#lx\n", output.dwStatus); + ok(status == 0, "got status %#lx\n", status); if (output.dwStatus == MFT_OUTPUT_DATA_BUFFER_INCOMPLETE || broken(output.dwStatus == (MFT_OUTPUT_DATA_BUFFER_INCOMPLETE|7))) { @@ -6322,7 +6322,7 @@ static void test_wma_decoder(void) i += sizeof(wma_decoded_data) / 2; } ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
status = 0xdeadbeef; sample = create_sample(NULL, output_info.cbSize); @@ -6331,16 +6331,16 @@ static void test_wma_decoder(void) hr = IMFTransform_ProcessOutput(transform, 0, 1, &output, &status); } todo_wine - ok(i == 0xe000, "ProcessOutput produced %#x bytes\n", i); + ok(i == 0xe000, "ProcessOutput produced %#lx bytes\n", i);
todo_wine - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#lx\n", hr); ok(output.pSample == sample, "got pSample %p\n", output.pSample); - ok(output.dwStatus == 0, "got dwStatus %#x\n", output.dwStatus); + ok(output.dwStatus == 0, "got dwStatus %#lx\n", output.dwStatus); todo_wine - ok(status == 0, "got status %#x\n", status); + ok(status == 0, "got status %#lx\n", status); ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
status = 0xdeadbeef; sample = create_sample(NULL, output_info.cbSize); @@ -6348,26 +6348,26 @@ static void test_wma_decoder(void) output.pSample = sample; hr = IMFTransform_ProcessOutput(transform, 0, 1, &output, &status); todo_wine - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#lx\n", hr); ok(output.pSample == sample, "got pSample %p\n", output.pSample); ok(output.dwStatus == 0 || broken(output.dwStatus == (MFT_OUTPUT_DATA_BUFFER_INCOMPLETE|7)) /* Win7 */, - "got dwStatus %#x\n", output.dwStatus); + "got dwStatus %#lx\n", output.dwStatus); todo_wine - ok(status == 0, "got status %#x\n", status); + ok(status == 0, "got status %#lx\n", status); check_sample(sample, NULL, 0, NULL); ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
sample = create_sample(wma_encoded_data, wma_block_size); hr = IMFTransform_ProcessInput(transform, 0, sample, 0); todo_wine - ok(hr == S_OK, "ProcessInput returned %#x\n", hr); + ok(hr == S_OK, "ProcessInput returned %#lx\n", hr);
ret = IMFTransform_Release(transform); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret); ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
failed: CoUninitialize(); @@ -6646,7 +6646,7 @@ static void test_h264_decoder(void) HRESULT hr;
hr = CoInitialize(NULL); - ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
if (!create_transform(MFT_CATEGORY_VIDEO_DECODER, &input_type, &output_type, L"Microsoft H264 Video Decoder MFT", transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), @@ -6657,18 +6657,18 @@ static void test_h264_decoder(void)
hr = IMFTransform_GetOutputAvailableType(transform, 0, 0, &media_type); todo_wine - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputAvailableType returned %#x\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "GetOutputAvailableType returned %#lx\n", hr);
/* setting output media type first doesn't work */
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr); + ok(hr == S_OK, "MFCreateMediaType returned %#lx\n", hr); init_media_type(media_type, default_outputs[0], -1); hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); todo_wine - ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "SetOutputType returned %#x.\n", hr); + ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "SetOutputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
/* check available input types */
@@ -6676,115 +6676,115 @@ static void test_h264_decoder(void) memset(&input_info, 0xcd, sizeof(input_info)); hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); todo_wine - ok(hr == S_OK, "GetInputStreamInfo returned %#x\n", hr); + ok(hr == S_OK, "GetInputStreamInfo returned %#lx\n", hr); todo_wine ok(input_info.hnsMaxLatency == 0, "got hnsMaxLatency %s\n", wine_dbgstr_longlong(input_info.hnsMaxLatency)); todo_wine - ok(input_info.dwFlags == flags, "got dwFlags %#x\n", input_info.dwFlags); + ok(input_info.dwFlags == flags, "got dwFlags %#lx\n", input_info.dwFlags); todo_wine - ok(input_info.cbSize == 0x1000, "got cbSize %u\n", input_info.cbSize); + ok(input_info.cbSize == 0x1000, "got cbSize %lu\n", input_info.cbSize); todo_wine - ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#x\n", input_info.cbMaxLookahead); + ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#lx\n", input_info.cbMaxLookahead); todo_wine - ok(input_info.cbAlignment == 0, "got cbAlignment %#x\n", input_info.cbAlignment); + ok(input_info.cbAlignment == 0, "got cbAlignment %#lx\n", input_info.cbAlignment);
flags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE; memset(&output_info, 0xcd, sizeof(output_info)); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); todo_wine - ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr); + ok(hr == S_OK, "GetOutputStreamInfo returned %#lx\n", hr); todo_wine - ok(output_info.dwFlags == flags, "got dwFlags %#x\n", output_info.dwFlags); + ok(output_info.dwFlags == flags, "got dwFlags %#lx\n", output_info.dwFlags); todo_wine - ok(output_info.cbSize == 0x3fc000, "got cbSize %#x\n", output_info.cbSize); + ok(output_info.cbSize == 0x3fc000, "got cbSize %#lx\n", output_info.cbSize); todo_wine - ok(output_info.cbAlignment == 0, "got cbAlignment %#x\n", output_info.cbAlignment); + ok(output_info.cbAlignment == 0, "got cbAlignment %#lx\n", output_info.cbAlignment);
i = -1; while (SUCCEEDED(hr = IMFTransform_GetInputAvailableType(transform, 0, ++i, &media_type))) { - winetest_push_context("in %u", i); - ok(hr == S_OK, "GetInputAvailableType returned %#x\n", hr); + winetest_push_context("in %lu", i); + ok(hr == S_OK, "GetInputAvailableType returned %#lx\n", hr); check_media_type(media_type, transform_inputs[i], -1); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret); winetest_pop_context(); } todo_wine - ok(hr == MF_E_NO_MORE_TYPES, "GetInputAvailableType returned %#x\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "GetInputAvailableType returned %#lx\n", hr); todo_wine - ok(i == 2 || broken(i == 1) /* Win7 */, "%u input media types\n", i); + ok(i == 2 || broken(i == 1) /* Win7 */, "%lu input media types\n", i);
/* check required input media type attributes */
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr); + ok(hr == S_OK, "MFCreateMediaType returned %#lx\n", hr); hr = IMFTransform_SetInputType(transform, 0, media_type, 0); todo_wine - ok(hr == E_INVALIDARG, "SetInputType returned %#x.\n", hr); + ok(hr == E_INVALIDARG, "SetInputType returned %#lx.\n", hr); init_media_type(media_type, input_type_desc, 1); hr = IMFTransform_SetInputType(transform, 0, media_type, 0); todo_wine - ok(hr == MF_E_INVALIDMEDIATYPE, "SetInputType returned %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "SetInputType returned %#lx.\n", hr); init_media_type(media_type, input_type_desc, 2); hr = IMFTransform_SetInputType(transform, 0, media_type, 0); todo_wine - ok(hr == S_OK, "SetInputType returned %#x.\n", hr); + ok(hr == S_OK, "SetInputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); todo_wine - ok(ret == 1, "Release returned %u\n", ret); + ok(ret == 1, "Release returned %lu\n", ret);
flags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE; memset(&output_info, 0xcd, sizeof(output_info)); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); todo_wine - ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr); + ok(hr == S_OK, "GetOutputStreamInfo returned %#lx\n", hr); todo_wine - ok(output_info.dwFlags == flags, "got dwFlags %#x\n", output_info.dwFlags); + ok(output_info.dwFlags == flags, "got dwFlags %#lx\n", output_info.dwFlags); todo_wine ok(output_info.cbSize == 0x3f4800 || broken(output_info.cbSize == 0x3fc000) /* Win7 */, - "got cbSize %#x\n", output_info.cbSize); + "got cbSize %#lx\n", output_info.cbSize); todo_wine - ok(output_info.cbAlignment == 0, "got cbAlignment %#x\n", output_info.cbAlignment); + ok(output_info.cbAlignment == 0, "got cbAlignment %#lx\n", output_info.cbAlignment);
/* output types can now be enumerated (though they are actually the same for all input types) */
i = -1; while (SUCCEEDED(hr = IMFTransform_GetOutputAvailableType(transform, 0, ++i, &media_type))) { - winetest_push_context("out %u", i); - ok(hr == S_OK, "GetOutputAvailableType returned %#x\n", hr); + winetest_push_context("out %lu", i); + ok(hr == S_OK, "GetOutputAvailableType returned %#lx\n", hr); check_media_type(media_type, default_outputs[i], -1); if (FAILED(hr = IMFMediaType_GetItem(media_type, &MF_MT_VIDEO_ROTATION, NULL))) check_media_type(media_type, default_outputs_win7[i], -1); else check_media_type(media_type, default_outputs_extra[i], -1); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret); winetest_pop_context(); } todo_wine - ok(hr == MF_E_NO_MORE_TYPES, "GetOutputAvailableType returned %#x\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "GetOutputAvailableType returned %#lx\n", hr); todo_wine - ok(i == 5, "%u output media types\n", i); + ok(i == 5, "%lu output media types\n", i);
/* check required output media type attributes */
hr = MFCreateMediaType(&media_type); - ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr); + ok(hr == S_OK, "MFCreateMediaType returned %#lx\n", hr); hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); todo_wine - ok(hr == E_INVALIDARG, "SetOutputType returned %#x.\n", hr); + ok(hr == E_INVALIDARG, "SetOutputType returned %#lx.\n", hr); init_media_type(media_type, output_type_desc, 1); hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); todo_wine - ok(hr == MF_E_INVALIDMEDIATYPE, "SetOutputType returned %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "SetOutputType returned %#lx.\n", hr); init_media_type(media_type, output_type_desc, 2); for (i = 2; i < ARRAY_SIZE(output_type_desc) - 1; ++i) { hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); todo_wine - ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetOutputType returned %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetOutputType returned %#lx.\n", hr); init_media_type(media_type, output_type_desc, i + 1); } hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); @@ -6794,42 +6794,42 @@ static void test_h264_decoder(void) hr = IMFTransform_SetOutputType(transform, 0, media_type, 0); } todo_wine - ok(hr == S_OK, "SetOutputType returned %#x.\n", hr); + ok(hr == S_OK, "SetOutputType returned %#lx.\n", hr); ret = IMFMediaType_Release(media_type); todo_wine - ok(ret == 1, "Release returned %u\n", ret); + ok(ret == 1, "Release returned %lu\n", ret);
flags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE; memset(&input_info, 0xcd, sizeof(input_info)); hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info); todo_wine - ok(hr == S_OK, "GetInputStreamInfo returned %#x\n", hr); + ok(hr == S_OK, "GetInputStreamInfo returned %#lx\n", hr); todo_wine ok(input_info.hnsMaxLatency == 0, "got hnsMaxLatency %s\n", wine_dbgstr_longlong(input_info.hnsMaxLatency)); todo_wine - ok(input_info.dwFlags == flags, "got dwFlags %#x\n", input_info.dwFlags); + ok(input_info.dwFlags == flags, "got dwFlags %#lx\n", input_info.dwFlags); todo_wine - ok(input_info.cbSize == 0x1000, "got cbSize %u\n", input_info.cbSize); + ok(input_info.cbSize == 0x1000, "got cbSize %lu\n", input_info.cbSize); todo_wine - ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#x\n", input_info.cbMaxLookahead); + ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#lx\n", input_info.cbMaxLookahead); todo_wine - ok(input_info.cbAlignment == 0, "got cbAlignment %#x\n", input_info.cbAlignment); + ok(input_info.cbAlignment == 0, "got cbAlignment %#lx\n", input_info.cbAlignment);
flags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE; memset(&output_info, 0xcd, sizeof(output_info)); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); todo_wine - ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr); + ok(hr == S_OK, "GetOutputStreamInfo returned %#lx\n", hr); todo_wine - ok(output_info.dwFlags == flags, "got dwFlags %#x\n", output_info.dwFlags); + ok(output_info.dwFlags == flags, "got dwFlags %#lx\n", output_info.dwFlags); todo_wine ok(output_info.cbSize == 0x3f4800 || broken(output_info.cbSize == 0x3fc000) /* Win7 */, - "got cbSize %#x\n", output_info.cbSize); + "got cbSize %#lx\n", output_info.cbSize); todo_wine - ok(output_info.cbAlignment == 0, "got cbAlignment %#x\n", output_info.cbAlignment); + ok(output_info.cbAlignment == 0, "got cbAlignment %#lx\n", output_info.cbAlignment);
resource = FindResourceW(NULL, L"h264data.bin", (const WCHAR *)RT_RCDATA); - ok(resource != 0, "FindResourceW failed, error %u\n", GetLastError()); + ok(resource != 0, "FindResourceW failed, error %lu\n", GetLastError()); h264_encoded_data = LockResource(LoadResource(GetModuleHandleW(NULL), resource)); h264_encoded_data_len = SizeofResource(GetModuleHandleW(NULL), resource);
@@ -6840,12 +6840,12 @@ static void test_h264_decoder(void) memset(&output, 0, sizeof(output)); hr = IMFTransform_ProcessOutput(transform, 0, 1, &output, &status); todo_wine - ok(hr == E_INVALIDARG || hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#x\n", hr); - ok(output.dwStreamID == 0, "got dwStreamID %u\n", output.dwStreamID); + ok(hr == E_INVALIDARG || hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#lx\n", hr); + ok(output.dwStreamID == 0, "got dwStreamID %lu\n", output.dwStreamID); ok(!output.pSample, "got pSample %p\n", output.pSample); - ok(output.dwStatus == 0, "got dwStatus %#x\n", output.dwStatus); + ok(output.dwStatus == 0, "got dwStatus %#lx\n", output.dwStatus); ok(!output.pEvents, "got pEvents %p\n", output.pEvents); - ok(status == 0, "got status %#x\n", status); + ok(status == 0, "got status %#lx\n", status);
sample = next_h264_sample(&h264_encoded_data, &h264_encoded_data_len); while (1) @@ -6855,74 +6855,74 @@ static void test_h264_decoder(void) output.pSample = create_sample(NULL, output_info.cbSize); hr = IMFTransform_ProcessOutput(transform, 0, 1, &output, &status); if (hr != MF_E_TRANSFORM_NEED_MORE_INPUT) break; - ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#x\n", hr); - ok(output.dwStreamID == 0, "got dwStreamID %u\n", output.dwStreamID); + ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#lx\n", hr); + ok(output.dwStreamID == 0, "got dwStreamID %lu\n", output.dwStreamID); ok(!!output.pSample, "got pSample %p\n", output.pSample); - ok(output.dwStatus == 0, "got dwStatus %#x\n", output.dwStatus); + ok(output.dwStatus == 0, "got dwStatus %#lx\n", output.dwStatus); ok(!output.pEvents, "got pEvents %p\n", output.pEvents); - ok(status == 0, "got status %#x\n", status); + ok(status == 0, "got status %#lx\n", status); check_sample(output.pSample, NULL, 0, NULL); ret = IMFSample_Release(output.pSample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
while (h264_encoded_data_len > 4) { hr = IMFTransform_ProcessInput(transform, 0, sample, 0); if (FAILED(hr)) break; - ok(hr == S_OK, "ProcessInput returned %#x\n", hr); + ok(hr == S_OK, "ProcessInput returned %#lx\n", hr); ret = IMFSample_Release(sample); - ok(ret <= 1, "Release returned %u\n", ret); + ok(ret <= 1, "Release returned %lu\n", ret); sample = next_h264_sample(&h264_encoded_data, &h264_encoded_data_len); } - ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#x\n", hr); + ok(hr == MF_E_NOTACCEPTING, "ProcessInput returned %#lx\n", hr); EXPECT_REF(sample, 1); } todo_wine - ok(hr == MF_E_TRANSFORM_STREAM_CHANGE, "ProcessOutput returned %#x\n", hr); - ok(output.dwStreamID == 0, "got dwStreamID %u\n", output.dwStreamID); + ok(hr == MF_E_TRANSFORM_STREAM_CHANGE, "ProcessOutput returned %#lx\n", hr); + ok(output.dwStreamID == 0, "got dwStreamID %lu\n", output.dwStreamID); ok(!!output.pSample, "got pSample %p\n", output.pSample); todo_wine ok(output.dwStatus == MFT_OUTPUT_DATA_BUFFER_FORMAT_CHANGE, - "got dwStatus %#x\n", output.dwStatus); + "got dwStatus %#lx\n", output.dwStatus); ok(!output.pEvents, "got pEvents %p\n", output.pEvents); todo_wine ok(status == MFT_PROCESS_OUTPUT_STATUS_NEW_STREAMS, - "got status %#x\n", status); + "got status %#lx\n", status); check_sample(output.pSample, NULL, 0, NULL); ret = IMFSample_Release(output.pSample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
flags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE; memset(&output_info, 0xcd, sizeof(output_info)); hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info); todo_wine - ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr); + ok(hr == S_OK, "GetOutputStreamInfo returned %#lx\n", hr); todo_wine - ok(output_info.dwFlags == flags, "got dwFlags %#x\n", output_info.dwFlags); + ok(output_info.dwFlags == flags, "got dwFlags %#lx\n", output_info.dwFlags); todo_wine - ok(output_info.cbSize == 0x3200, "got cbSize %#x\n", output_info.cbSize); + ok(output_info.cbSize == 0x3200, "got cbSize %#lx\n", output_info.cbSize); todo_wine - ok(output_info.cbAlignment == 0, "got cbAlignment %#x\n", output_info.cbAlignment); + ok(output_info.cbAlignment == 0, "got cbAlignment %#lx\n", output_info.cbAlignment);
i = -1; while (SUCCEEDED(hr = IMFTransform_GetOutputAvailableType(transform, 0, ++i, &media_type))) { - winetest_push_context("out %u", i); - ok(hr == S_OK, "GetOutputAvailableType returned %#x\n", hr); + winetest_push_context("out %lu", i); + ok(hr == S_OK, "GetOutputAvailableType returned %#lx\n", hr); check_media_type(media_type, actual_outputs[i], -1); ret = IMFMediaType_Release(media_type); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret); winetest_pop_context(); } todo_wine - ok(hr == MF_E_NO_MORE_TYPES, "GetOutputAvailableType returned %#x\n", hr); + ok(hr == MF_E_NO_MORE_TYPES, "GetOutputAvailableType returned %#lx\n", hr); todo_wine - ok(i == 5, "%u output media types\n", i); + ok(i == 5, "%lu output media types\n", i);
ret = IMFTransform_Release(transform); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret); ret = IMFSample_Release(sample); - ok(ret == 0, "Release returned %u\n", ret); + ok(ret == 0, "Release returned %lu\n", ret);
failed: CoUninitialize();
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/rasapi32/tests/Makefile.in | 1 - dlls/rasapi32/tests/rasapi.c | 48 ++++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/dlls/rasapi32/tests/Makefile.in b/dlls/rasapi32/tests/Makefile.in index 8e49604cf41..64d91ee7359 100644 --- a/dlls/rasapi32/tests/Makefile.in +++ b/dlls/rasapi32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = rasapi32.dll
C_SRCS = \ diff --git a/dlls/rasapi32/tests/rasapi.c b/dlls/rasapi32/tests/rasapi.c index 5171bb2762c..167b5a3828d 100644 --- a/dlls/rasapi32/tests/rasapi.c +++ b/dlls/rasapi32/tests/rasapi.c @@ -64,9 +64,9 @@ static void test_rasenum(void) win_skip("RasEnumDevicesA found nothing to enumerate\n"); return; } - trace("RasEnumDevicesA: returned %d buffersize %d\n", result, bufsize); + trace("RasEnumDevicesA: returned %ld buffersize %ld\n", result, bufsize); ok(result == ERROR_BUFFER_TOO_SMALL, - "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); + "Expected ERROR_BUFFER_TOO_SMALL, got %08ld\n", result);
rasDevInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, max(bufsize,sizeof(RASDEVINFOA))); @@ -79,99 +79,99 @@ static void test_rasenum(void) cb = bufsize; cDevices = 0xdeadbeef; result = pRasEnumDevicesA(NULL, &cb, &cDevices); - ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %u\n", cDevices); + ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %lu\n", cDevices); ok(result == ERROR_BUFFER_TOO_SMALL || result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); + "Expected ERROR_BUFFER_TOO_SMALL, got %08ld\n", result);
rasDevInfo[0].dwSize = 0; cb = bufsize; cDevices = 0xdeadbeef; result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices); + ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices); ok(result == ERROR_INVALID_SIZE || result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_INVALID_SIZE, got %08d\n", result); + "Expected ERROR_INVALID_SIZE, got %08ld\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) -1; cb = bufsize; cDevices = 0xdeadbeef; result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices); + ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices); ok(result == ERROR_INVALID_SIZE || result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_INVALID_SIZE, got %08d\n", result); + "Expected ERROR_INVALID_SIZE, got %08ld\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA) +1; cb = bufsize; cDevices = 0xdeadbeef; result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices); + ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices); ok(result == ERROR_INVALID_SIZE || result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_INVALID_SIZE, got %08d\n", result); + "Expected ERROR_INVALID_SIZE, got %08ld\n", result);
/* test second parameter */ rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); cDevices = 0xdeadbeef; result = pRasEnumDevicesA(rasDevInfo, NULL, &cDevices); - ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices); + ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices); ok(result == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); + "Expected ERROR_INVALID_PARAMETER, got %08ld\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); cb = 0; cDevices = 0xdeadbeef; result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); todo_wine - ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices); + ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices); ok(result == ERROR_BUFFER_TOO_SMALL || result == ERROR_INVALID_SIZE, /* vista, 2k8 */ - "Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08d\n", result); + "Expected ERROR_BUFFER_TOO_SMALL/ERROR_INVALID_SIZE, got %08ld\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); cb = bufsize -1; cDevices = 0xdeadbeef; result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %u\n", cDevices); + ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %lu\n", cDevices); ok(result == ERROR_BUFFER_TOO_SMALL, - "Expected ERROR_BUFFER_TOO_SMALL, got %08d\n", result); + "Expected ERROR_BUFFER_TOO_SMALL, got %08ld\n", result);
rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); cb = bufsize +1; cDevices = 0xdeadbeef; result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %u\n", cDevices); + ok(0 < cDevices && cDevices < 32, "expected 0 < cDevices < 32, got %lu\n", cDevices); ok(result == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08d\n", result); + "Expected ERROR_SUCCESS, got %08ld\n", result);
/* test third parameter */ rasDevInfo[0].dwSize = sizeof(RASDEVINFOA); cb = bufsize; result = pRasEnumDevicesA(rasDevInfo, &cb, NULL); ok(result == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); + "Expected ERROR_INVALID_PARAMETER, got %08ld\n", result);
/* test combinations of invalid parameters */ cDevices = 0xdeadbeef; result = pRasEnumDevicesA(NULL, NULL, &cDevices); - ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices); + ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices); ok(result == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); + "Expected ERROR_INVALID_PARAMETER, got %08ld\n", result);
result = pRasEnumDevicesA(NULL, &cb, NULL); ok(result == ERROR_INVALID_PARAMETER || result == ERROR_INVALID_USER_BUFFER, /* win98 */ - "Expected ERROR_INVALID_PARAMETER, got %08d\n", result); + "Expected ERROR_INVALID_PARAMETER, got %08ld\n", result);
cb = 0; rasDevInfo[0].dwSize = 0; cDevices = 0xdeadbeef; result = pRasEnumDevicesA(rasDevInfo, &cb, &cDevices); - ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %u\n", cDevices); + ok(cDevices == 0xdeadbeef, "expected cDevices = 0xdeadbeef, got %lu\n", cDevices); ok(result == ERROR_INVALID_SIZE || broken(result == ERROR_BUFFER_TOO_SMALL), /* win98 */ - "Expected ERROR_INVALID_SIZE, got %08d\n", result); + "Expected ERROR_INVALID_SIZE, got %08ld\n", result);
HeapFree(GetProcessHeap(), 0, rasDevInfo); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/riched20/tests/richole.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index c06be02bd89..8d8ba5b1e9d 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -947,7 +947,8 @@ static void test_ITextRange_GetStart_GetEnd(void) ITextDocument *txtDoc = NULL; ITextRange *txtRge = NULL; HRESULT hres; - int first, lim, start, end; + int first, lim; + LONG start, end; static const CHAR test_text1[] = "TestSomeText";
create_interfaces(&w, &reOle, &txtDoc, NULL); @@ -1166,7 +1167,8 @@ static void test_ITextSelection_GetStart_GetEnd(void) ITextDocument *txtDoc = NULL; ITextSelection *txtSel = NULL; HRESULT hres; - int first, lim, start, end; + int first, lim; + LONG start, end; static const CHAR test_text1[] = "TestSomeText";
create_interfaces(&w, &reOle, &txtDoc, &txtSel);
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/riched20/tests/Makefile.in | 1 dlls/riched20/tests/editor.c | 466 ++++++----- dlls/riched20/tests/richole.c | 1622 ++++++++++++++++++++------------------- dlls/riched20/tests/txtsrv.c | 194 ++--- 4 files changed, 1141 insertions(+), 1142 deletions(-)
diff --git a/dlls/riched20/tests/Makefile.in b/dlls/riched20/tests/Makefile.in index 77416f1a9f2..34c00afa7cb 100644 --- a/dlls/riched20/tests/Makefile.in +++ b/dlls/riched20/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = riched20.dll IMPORTS = ole32 oleaut32 user32 gdi32
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 20bf0358712..03c07829ee4 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -318,12 +318,12 @@ static void check_EM_FINDTEXTEX(HWND hwnd, const char *name, struct find_s *f, "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n", name, id, f->needle, f->start, f->end, f->flags, findloc); ok(ftw.chrgText.cpMin == f->expected_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n", + "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %ld\n", name, id, f->needle, f->start, f->end, f->flags, ftw.chrgText.cpMin); expected_end_loc = ((f->expected_loc == -1) ? -1 : f->expected_loc + strlen(f->needle)); ok(ftw.chrgText.cpMax == expected_end_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %d, expected %d\n", + "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %ld, expected %d\n", name, id, f->needle, f->start, f->end, f->flags, ftw.chrgText.cpMax, expected_end_loc); HeapFree(GetProcessHeap(), 0, (void*)ftw.lpstrText); }else{ @@ -337,12 +337,12 @@ static void check_EM_FINDTEXTEX(HWND hwnd, const char *name, struct find_s *f, "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n", name, id, f->needle, f->start, f->end, f->flags, findloc); ok(fta.chrgText.cpMin == f->expected_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n", + "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %ld\n", name, id, f->needle, f->start, f->end, f->flags, fta.chrgText.cpMin); expected_end_loc = ((f->expected_loc == -1) ? -1 : f->expected_loc + strlen(f->needle)); ok(fta.chrgText.cpMax == expected_end_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %d, expected %d\n", + "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %ld, expected %d\n", name, id, f->needle, f->start, f->end, f->flags, fta.chrgText.cpMax, expected_end_loc); } } @@ -515,7 +515,7 @@ static void test_EM_LINELENGTH(void)
for (i = 0; i < 10; i++) { result = SendMessageA(hwndRichEdit, EM_LINELENGTH, offset_test[i][0], 0); - ok(result == offset_test[i][1], "Length of line at offset %d is %ld, expected %d\n", + ok(result == offset_test[i][1], "Length of line at offset %d is %Id, expected %d\n", offset_test[i][0], result, offset_test[i][1]); }
@@ -536,7 +536,7 @@ static void test_EM_LINELENGTH(void) SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text1); for (i = 0; i < ARRAY_SIZE(offset_test1); i++) { result = SendMessageA(hwndRichEdit, EM_LINELENGTH, offset_test1[i][0], 0); - ok(result == offset_test1[i][1], "Length of line at offset %d is %ld, expected %d\n", + ok(result == offset_test1[i][1], "Length of line at offset %d is %Id, expected %d\n", offset_test1[i][0], result, offset_test1[i][1]); } } @@ -548,7 +548,7 @@ static int get_scroll_pos_y(HWND hwnd) { POINT p = {-1, -1}; SendMessageA(hwnd, EM_GETSCROLLPOS, 0, (LPARAM)&p); - ok(p.x != -1 && p.y != -1, "p.x:%d p.y:%d\n", p.x, p.y); + ok(p.x != -1 && p.y != -1, "p.x:%ld p.y:%ld\n", p.x, p.y); return p.y; }
@@ -746,30 +746,30 @@ static void test_EM_POSFROMCHAR(void) SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"12345678901234"); SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, SendMessageA(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0)-1); - ok(pt.x > 1, "pt.x = %d\n", pt.x); + ok(pt.x > 1, "pt.x = %ld\n", pt.x); xpos = pt.x; SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, SendMessageA(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0)); - ok(pt.x > xpos, "pt.x = %d\n", pt.x); + ok(pt.x > xpos, "pt.x = %ld\n", pt.x); xpos = (rtl ? pt.x + 7 : pt.x); SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, SendMessageA(hwndRichEdit, WM_GETTEXTLENGTH, 0, 0)+1); - ok(pt.x == xpos, "pt.x = %d\n", pt.x); + ok(pt.x == xpos, "pt.x = %ld\n", pt.x);
/* Try a negative position. */ SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, -1); - ok(pt.x == 1, "pt.x = %d\n", pt.x); + ok(pt.x == 1, "pt.x = %ld\n", pt.x);
/* test negative indentation */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"{\rtf1\pard\fi-200\li-200\f1 TestSomeText\par}"); SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pt, 0); - ok(pt.x == 1, "pt.x = %d\n", pt.x); + ok(pt.x == 1, "pt.x = %ld\n", pt.x);
fmt.cbSize = sizeof(fmt); SendMessageA(hwndRichEdit, EM_GETPARAFORMAT, 0, (LPARAM)&fmt); - ok(fmt.dxStartIndent == -400, "got %d\n", fmt.dxStartIndent); - ok(fmt.dxOffset == 200, "got %d\n", fmt.dxOffset); + ok(fmt.dxStartIndent == -400, "got %ld\n", fmt.dxStartIndent); + ok(fmt.dxOffset == 200, "got %ld\n", fmt.dxOffset); ok(fmt.wAlignment == PFA_LEFT, "got %d\n", fmt.wAlignment);
DestroyWindow(hwndRichEdit); @@ -808,13 +808,13 @@ static void test_EM_SETCHARFORMAT(void) memset(&cf2, 0, sizeof(CHARFORMAT2A)); cf2.cbSize = sizeof(CHARFORMAT2A); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); - ok(cf2.dwMask == CFM_ALL2, "got %08x\n", cf2.dwMask); + ok(cf2.dwMask == CFM_ALL2, "got %08lx\n", cf2.dwMask); expect_effects = CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR; if (cf2.wWeight > 550) expect_effects |= CFE_BOLD; - ok(cf2.dwEffects == expect_effects, "got %08x\n", cf2.dwEffects); - ok(cf2.yOffset == 0, "got %d\n", cf2.yOffset); + ok(cf2.dwEffects == expect_effects, "got %08lx\n", cf2.dwEffects); + ok(cf2.yOffset == 0, "got %ld\n", cf2.yOffset); ok(cf2.sSpacing == 0, "got %d\n", cf2.sSpacing); - ok(cf2.lcid == GetSystemDefaultLCID(), "got %x\n", cf2.lcid); + ok(cf2.lcid == GetSystemDefaultLCID(), "got %lx\n", cf2.lcid); ok(cf2.sStyle == 0, "got %d\n", cf2.sStyle); ok(cf2.wKerning == 0, "got %d\n", cf2.wKerning); ok(cf2.bAnimation == 0, "got %d\n", cf2.bAnimation); @@ -969,9 +969,9 @@ static void test_EM_SETCHARFORMAT(void) (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) || (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); ok((cf2.dwEffects & tested_effects[i]) == 0, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n", i, cf2.dwEffects, tested_effects[i]); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x clear\n", i, cf2.dwEffects, tested_effects[i]);
memset(&cf2, 0, sizeof(CHARFORMAT2A)); cf2.cbSize = sizeof(CHARFORMAT2A); @@ -990,9 +990,9 @@ static void test_EM_SETCHARFORMAT(void) (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) || (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); ok((cf2.dwEffects & tested_effects[i]) == tested_effects[i], - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, tested_effects[i]); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x\n", i, cf2.dwEffects, tested_effects[i]);
memset(&cf2, 0, sizeof(CHARFORMAT2A)); cf2.cbSize = sizeof(CHARFORMAT2A); @@ -1002,9 +1002,9 @@ static void test_EM_SETCHARFORMAT(void) (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) || (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); ok((cf2.dwEffects & tested_effects[i]) == 0, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n", i, cf2.dwEffects, tested_effects[i]); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x clear\n", i, cf2.dwEffects, tested_effects[i]);
memset(&cf2, 0, sizeof(CHARFORMAT2A)); cf2.cbSize = sizeof(CHARFORMAT2A); @@ -1014,7 +1014,7 @@ static void test_EM_SETCHARFORMAT(void) (cf2.dwMask & CFM_SUPERSCRIPT) == 0) || (cf2.dwMask & tested_effects[i]) == 0), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x clear\n", i, cf2.dwMask, tested_effects[i]); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x clear\n", i, cf2.dwMask, tested_effects[i]);
DestroyWindow(hwndRichEdit); } @@ -1050,9 +1050,9 @@ static void test_EM_SETCHARFORMAT(void) (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) || (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); ok((cf2.dwEffects & tested_effects[i]) == 0, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x clear\n", i, cf2.dwEffects, tested_effects[i]); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x clear\n", i, cf2.dwEffects, tested_effects[i]);
memset(&cf2, 0, sizeof(CHARFORMAT2A)); cf2.cbSize = sizeof(CHARFORMAT2A); @@ -1062,9 +1062,9 @@ static void test_EM_SETCHARFORMAT(void) (cf2.dwMask & CFM_SUPERSCRIPT) == CFM_SUPERSCRIPT) || (cf2.dwMask & tested_effects[i]) == tested_effects[i]), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, tested_effects[i]); ok((cf2.dwEffects & tested_effects[i]) == tested_effects[i], - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, tested_effects[i]); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x\n", i, cf2.dwEffects, tested_effects[i]);
memset(&cf2, 0, sizeof(CHARFORMAT2A)); cf2.cbSize = sizeof(CHARFORMAT2A); @@ -1074,9 +1074,9 @@ static void test_EM_SETCHARFORMAT(void) (cf2.dwMask & CFM_SUPERSCRIPT) == 0) || (cf2.dwMask & tested_effects[i]) == 0), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x clear\n", i, cf2.dwMask, tested_effects[i]); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x clear\n", i, cf2.dwMask, tested_effects[i]); ok((cf2.dwEffects & tested_effects[i]) == tested_effects[i], - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x set\n", i, cf2.dwEffects, tested_effects[i]); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x set\n", i, cf2.dwEffects, tested_effects[i]);
DestroyWindow(hwndRichEdit); } @@ -1102,9 +1102,9 @@ static void test_EM_SETCHARFORMAT(void) SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2);
ok (((cf2.dwMask & CFM_BOLD) == CFM_BOLD), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); ok((cf2.dwEffects & CFE_BOLD) == CFE_BOLD, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD);
/* Set two effects on an empty selection */ @@ -1137,9 +1137,9 @@ static void test_EM_SETCHARFORMAT(void) SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2);
ok (((cf2.dwMask & (CFM_BOLD|CFM_ITALIC)) == (CFM_BOLD|CFM_ITALIC)), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, (CFM_BOLD|CFM_ITALIC)); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, (CFM_BOLD|CFM_ITALIC)); ok((cf2.dwEffects & (CFE_BOLD|CFE_ITALIC)) == (CFE_BOLD|CFE_ITALIC), - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, (CFE_BOLD|CFE_ITALIC)); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x\n", i, cf2.dwEffects, (CFE_BOLD|CFE_ITALIC));
/* Setting the (empty) selection to exactly the same place as before should NOT clear the insertion style! */ @@ -1172,9 +1172,9 @@ static void test_EM_SETCHARFORMAT(void) SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2);
ok (((cf2.dwMask & CFM_BOLD) == CFM_BOLD), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); ok((cf2.dwEffects & CFE_BOLD) == CFE_BOLD, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD);
/* Moving the selection will clear the insertion style */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); @@ -1207,9 +1207,9 @@ static void test_EM_SETCHARFORMAT(void) SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2);
ok(((cf2.dwMask & CFM_BOLD) == CFM_BOLD), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); ok((cf2.dwEffects & CFE_BOLD) == 0, - "%d, cf2.dwEffects == 0x%08x not expecting effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); + "%d, cf2.dwEffects == 0x%08lx not expecting effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD);
/* Ditto with EM_EXSETSEL */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"wine"); @@ -1244,9 +1244,9 @@ static void test_EM_SETCHARFORMAT(void) SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2);
ok (((cf2.dwMask & CFM_BOLD) == CFM_BOLD), - "%d, cf2.dwMask == 0x%08x expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); + "%d, cf2.dwMask == 0x%08lx expected mask 0x%08x\n", i, cf2.dwMask, CFM_BOLD); ok((cf2.dwEffects & CFE_BOLD) == CFE_BOLD, - "%d, cf2.dwEffects == 0x%08x expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD); + "%d, cf2.dwEffects == 0x%08lx expected effect 0x%08x\n", i, cf2.dwEffects, CFE_BOLD);
/* show that wWeight is at the correct offset in CHARFORMAT2A */ memset(&cf2, 0, sizeof(cf2)); @@ -1304,8 +1304,8 @@ static void test_EM_SETCHARFORMAT(void) cf2.cbSize = sizeof(CHARFORMAT2A); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), - "got %08x\n", cf2.dwMask); - ok(!(cf2.dwEffects & CFE_UNDERLINE), "got %08x\n", cf2.dwEffects); + "got %08lx\n", cf2.dwMask); + ok(!(cf2.dwEffects & CFE_UNDERLINE), "got %08lx\n", cf2.dwEffects); ok(cf2.bUnderlineType == CFU_UNDERLINE, "got %x\n", cf2.bUnderlineType);
/* simply touching bUnderlineType will toggle CFE_UNDERLINE */ @@ -1316,8 +1316,8 @@ static void test_EM_SETCHARFORMAT(void) cf2.cbSize = sizeof(CHARFORMAT2A); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), - "got %08x\n", cf2.dwMask); - ok(cf2.dwEffects & CFE_UNDERLINE, "got %08x\n", cf2.dwEffects); + "got %08lx\n", cf2.dwMask); + ok(cf2.dwEffects & CFE_UNDERLINE, "got %08lx\n", cf2.dwEffects); ok(cf2.bUnderlineType == CFU_UNDERLINE, "got %x\n", cf2.bUnderlineType);
/* setting bUnderline to CFU_UNDERLINENONE clears CFE_UNDERLINE */ @@ -1328,8 +1328,8 @@ static void test_EM_SETCHARFORMAT(void) cf2.cbSize = sizeof(CHARFORMAT2A); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), - "got %08x\n", cf2.dwMask); - ok(!(cf2.dwEffects & CFE_UNDERLINE), "got %08x\n", cf2.dwEffects); + "got %08lx\n", cf2.dwMask); + ok(!(cf2.dwEffects & CFE_UNDERLINE), "got %08lx\n", cf2.dwEffects); ok(cf2.bUnderlineType == CFU_UNDERLINENONE, "got %x\n", cf2.bUnderlineType);
/* another underline type also sets CFE_UNDERLINE */ @@ -1340,8 +1340,8 @@ static void test_EM_SETCHARFORMAT(void) cf2.cbSize = sizeof(CHARFORMAT2A); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), - "got %08x\n", cf2.dwMask); - ok(cf2.dwEffects & CFE_UNDERLINE, "got %08x\n", cf2.dwEffects); + "got %08lx\n", cf2.dwMask); + ok(cf2.dwEffects & CFE_UNDERLINE, "got %08lx\n", cf2.dwEffects); ok(cf2.bUnderlineType == CFU_UNDERLINEDOUBLE, "got %x\n", cf2.bUnderlineType);
/* However explicitly clearing CFE_UNDERLINE results in it remaining cleared */ @@ -1353,8 +1353,8 @@ static void test_EM_SETCHARFORMAT(void) cf2.cbSize = sizeof(CHARFORMAT2A); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), - "got %08x\n", cf2.dwMask); - ok(!(cf2.dwEffects & CFE_UNDERLINE), "got %08x\n", cf2.dwEffects); + "got %08lx\n", cf2.dwMask); + ok(!(cf2.dwEffects & CFE_UNDERLINE), "got %08lx\n", cf2.dwEffects); ok(cf2.bUnderlineType == CFU_UNDERLINEDOUBLE, "got %x\n", cf2.bUnderlineType);
/* And turing it back on again by just setting CFE_UNDERLINE */ @@ -1365,8 +1365,8 @@ static void test_EM_SETCHARFORMAT(void) cf2.cbSize = sizeof(CHARFORMAT2A); SendMessageA(hwndRichEdit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf2); ok((cf2.dwMask & (CFM_UNDERLINE | CFM_UNDERLINETYPE)) == (CFM_UNDERLINE | CFM_UNDERLINETYPE), - "got %08x\n", cf2.dwMask); - ok(cf2.dwEffects & CFE_UNDERLINE, "got %08x\n", cf2.dwEffects); + "got %08lx\n", cf2.dwMask); + ok(cf2.dwEffects & CFE_UNDERLINE, "got %08lx\n", cf2.dwEffects); ok(cf2.bUnderlineType == CFU_UNDERLINEDOUBLE, "got %x\n", cf2.bUnderlineType);
/* Check setting CFM_ALL2/CFM_EFFECTS2 in CHARFORMAT(A/W). */ @@ -1483,7 +1483,7 @@ static void test_EM_SETTEXTMODE(void)
/*Compare the two formattings*/ ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), - "two formats found in plain text mode - cf2.dwEffects: %x cf2test.dwEffects: %x\n", + "two formats found in plain text mode - cf2.dwEffects: %lx cf2test.dwEffects: %lx\n", cf2.dwEffects, cf2test.dwEffects); /*Test TM_RICHTEXT by: switching back to Rich Text mode printing "wine" in the current format(normal) @@ -1525,7 +1525,7 @@ static void test_EM_SETTEXTMODE(void)
/*Test that the two formattings are not the same*/ todo_wine ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects != cf2test.dwEffects), - "expected different formats - cf2.dwMask: %x, cf2test.dwMask: %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n", + "expected different formats - cf2.dwMask: %lx, cf2test.dwMask: %lx, cf2.dwEffects: %lx, cf2test.dwEffects: %lx\n", cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects);
DestroyWindow(hwndRichEdit); @@ -1542,7 +1542,7 @@ static void test_SETPARAFORMAT(void) fmt.wAlignment = PFA_LEFT;
ret = SendMessageA(hwndRichEdit, EM_SETPARAFORMAT, 0, (LPARAM)&fmt); - ok(ret != 0, "expected non-zero got %d\n", ret); + ok(ret != 0, "expected non-zero got %ld\n", ret);
fmt.cbSize = sizeof(PARAFORMAT2); fmt.dwMask = -1; @@ -1553,8 +1553,8 @@ static void test_SETPARAFORMAT(void) ret &= ~PFM_TABLEROWDELIMITER; fmt.dwMask &= ~PFM_TABLEROWDELIMITER;
- ok(ret == expectedMask, "expected %x got %x\n", expectedMask, ret); - ok(fmt.dwMask == expectedMask, "expected %x got %x\n", expectedMask, fmt.dwMask); + ok(ret == expectedMask, "expected %lx got %lx\n", expectedMask, ret); + ok(fmt.dwMask == expectedMask, "expected %lx got %lx\n", expectedMask, fmt.dwMask);
/* Test some other paraformat field defaults */ ok( fmt.wNumbering == 0, "got %d\n", fmt.wNumbering ); @@ -1617,7 +1617,7 @@ static void test_TM_PLAINTEXT(void) /*Test that they are the same as plain text allows only one formatting*/
ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), - "two selections' formats differ - cf2.dwMask: %x, cf2test.dwMask %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n", + "two selections' formats differ - cf2.dwMask: %lx, cf2test.dwMask %lx, cf2.dwEffects: %lx, cf2test.dwEffects: %lx\n", cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects);
/*Fill the control with a "wine" string, which when inserted will be bold*/ @@ -1670,7 +1670,7 @@ static void test_TM_PLAINTEXT(void) /*Compare the two formattings. They should be the same.*/
ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), - "Copied text retained formatting - cf2.dwMask: %x, cf2test.dwMask: %x, cf2.dwEffects: %x, cf2test.dwEffects: %x\n", + "Copied text retained formatting - cf2.dwMask: %lx, cf2test.dwMask: %lx, cf2.dwEffects: %lx, cf2test.dwEffects: %lx\n", cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects); DestroyWindow(hwndRichEdit); } @@ -1758,7 +1758,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 11; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 7, "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2); @@ -1767,7 +1767,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 11; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 7, "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp(expect, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
/* cpMax of text length is used instead of -1 in this case */ @@ -1775,7 +1775,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 0; textRange.chrg.cpMax = -1; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == strlen(text2), "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == strlen(text2), "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
/* cpMin < 0 causes no text to be copied, and 0 to be returned */ @@ -1783,7 +1783,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = -1; textRange.chrg.cpMax = 1; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 0, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 0, "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
/* cpMax of -1 is not replaced with text length if cpMin != 0 */ @@ -1791,7 +1791,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 1; textRange.chrg.cpMax = -1; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 0, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 0, "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
/* no end character is copied if cpMax - cpMin < 0 */ @@ -1799,7 +1799,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 5; textRange.chrg.cpMax = 5; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 0, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 0, "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
/* cpMax of text length is used if cpMax > text length*/ @@ -1807,7 +1807,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 0; textRange.chrg.cpMax = 1000; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == strlen(text2), "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == strlen(text2), "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp(text2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
/* Test with multibyte character */ @@ -1819,7 +1819,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 8; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 5, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 5, "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp("ef\x8e\xf0g", buffer), "EM_GETTEXTRANGE filled %s\n", buffer); }
@@ -1839,14 +1839,14 @@ static void test_EM_GETSELTEXT(void)
SendMessageA(hwndRichEdit, EM_SETSEL, 4, 11); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 7, "EM_GETSELTEXT returned %ld\n", result); + ok(result == 7, "EM_GETSELTEXT returned %Id\n", result); ok(!strcmp(expect, buffer), "EM_GETSELTEXT filled %s\n", buffer);
SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2);
SendMessageA(hwndRichEdit, EM_SETSEL, 4, 11); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 7, "EM_GETSELTEXT returned %ld\n", result); + ok(result == 7, "EM_GETSELTEXT returned %Id\n", result); ok(!strcmp(expect, buffer), "EM_GETSELTEXT filled %s\n", buffer);
/* Test with multibyte character */ @@ -1857,7 +1857,7 @@ static void test_EM_GETSELTEXT(void) SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"abcdef\x8e\xf0ghijk"); SendMessageA(hwndRichEdit, EM_SETSEL, 4, 8); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 5, "EM_GETSELTEXT returned %ld\n", result); + ok(result == 5, "EM_GETSELTEXT returned %Id\n", result); ok(!strcmp("ef\x8e\xf0g", buffer), "EM_GETSELTEXT filled %s\n", buffer); }
@@ -1882,7 +1882,7 @@ static void test_EM_SETOPTIONS(void) ok(hwndRichEdit != NULL, "class: %s, error: %d\n", RICHEDIT_CLASS20A, (int) GetLastError()); options = SendMessageA(hwndRichEdit, EM_GETOPTIONS, 0, 0); - ok(options == 0, "Incorrect initial options %x\n", options); + ok(options == 0, "Incorrect initial options %lx\n", options); DestroyWindow(hwndRichEdit);
hwndRichEdit = CreateWindowA(RICHEDIT_CLASS20A, NULL, @@ -1895,7 +1895,7 @@ static void test_EM_SETOPTIONS(void) options = SendMessageA(hwndRichEdit, EM_GETOPTIONS, 0, 0); /* WS_[VH]SCROLL cause the ECO_AUTO[VH]SCROLL options to be set */ ok(options == (ECO_AUTOVSCROLL|ECO_AUTOHSCROLL), - "Incorrect initial options %x\n", options); + "Incorrect initial options %lx\n", options);
/* NEGATIVE TESTING - NO OPTIONS SET */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); @@ -1933,7 +1933,7 @@ static void test_EM_SETOPTIONS(void) SetWindowLongA(hwndRichEdit, GWL_STYLE, dwStyle|optionStyles); options = SendMessageA(hwndRichEdit, EM_GETOPTIONS, 0, 0); ok(options == oldOptions, - "Options set by SetWindowLong (%x -> %x)\n", oldOptions, options); + "Options set by SetWindowLong (%lx -> %lx)\n", oldOptions, options);
DestroyWindow(hwndRichEdit); } @@ -3744,14 +3744,14 @@ static void test_WM_SETTEXT(void)
#define TEST_SETTEXT(a, b) \ result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)a); \ - ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \ + ok (result == 1, "WM_SETTEXT returned %Id instead of 1\n", result); \ result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buf); \ ok (result == lstrlenA(buf), \ - "WM_GETTEXT returned %ld instead of expected %u\n", \ + "WM_GETTEXT returned %Id instead of expected %u\n", \ result, lstrlenA(buf)); \ result = strcmp(b, buf); \ ok(result == 0, \ - "WM_SETTEXT round trip: strcmp = %ld, text="%s"\n", result, buf); + "WM_SETTEXT round trip: strcmp = %Id, text="%s"\n", result, buf);
TEST_SETTEXT(TestItem1, TestItem1) TEST_SETTEXT(TestItem2, TestItem2_after) @@ -3772,13 +3772,13 @@ static void test_WM_SETTEXT(void)
#define TEST_SETTEXTW(a, b) \ result = SendMessageW(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)a); \ - ok (result == 1, "WM_SETTEXT returned %ld instead of 1\n", result); \ + ok (result == 1, "WM_SETTEXT returned %Id instead of 1\n", result); \ result = SendMessageW(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)bufW); \ ok (result == lstrlenW(bufW), \ - "WM_GETTEXT returned %ld instead of expected %u\n", \ + "WM_GETTEXT returned %Id instead of expected %u\n", \ result, lstrlenW(bufW)); \ result = lstrcmpW(b, bufW); \ - ok(result == 0, "WM_SETTEXT round trip: strcmp = %ld\n", result); + ok(result == 0, "WM_SETTEXT round trip: strcmp = %Id\n", result);
hwndRichEdit = CreateWindowW(RICHEDIT_CLASS20W, NULL, ES_MULTILINE|WS_POPUP|WS_HSCROLL|WS_VSCROLL|WS_VISIBLE, @@ -3794,14 +3794,14 @@ static void test_WM_SETTEXT(void) /* Single-line richedit */ hwndRichEdit = new_richedit_with_style(NULL, 0); result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"line1\r\nline2"); - ok(result == 1, "WM_SETTEXT returned %ld, expected 12\n", result); + ok(result == 1, "WM_SETTEXT returned %Id, expected 12\n", result); result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buf); - ok(result == 5, "WM_GETTEXT returned %ld, expected 5\n", result); + ok(result == 5, "WM_GETTEXT returned %Id, expected 5\n", result); ok(!strcmp(buf, "line1"), "WM_GETTEXT returned incorrect string '%s'\n", buf); result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"{\rtf1 ABC\rtlpar\par DEF\par HIJ\pard\par}"); - ok(result == 1, "WM_SETTEXT returned %ld, expected 1\n", result); + ok(result == 1, "WM_SETTEXT returned %Id, expected 1\n", result); result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buf); - ok(result == 3, "WM_GETTEXT returned %ld, expected 3\n", result); + ok(result == 3, "WM_GETTEXT returned %Id, expected 3\n", result); ok(!strcmp(buf, "ABC"), "WM_GETTEXT returned incorrect string '%s'\n", buf); DestroyWindow(hwndRichEdit); } @@ -3814,7 +3814,7 @@ static DWORD CALLBACK test_esCallback_written_1(DWORD_PTR dwCookie, LONG *pcb) { char** str = (char**)dwCookie; - ok(*pcb == cb || *pcb == 0, "cb %d, *pcb %d\n", cb, *pcb); + ok(*pcb == cb || *pcb == 0, "cb %ld, *pcb %ld\n", cb, *pcb); *pcb = 0; if (cb > 0) { memcpy(*str, pbBuff, cb); @@ -3861,23 +3861,23 @@ static void test_EM_STREAMOUT(void) ok(r == 12, "streamed text length is %d, expecting 12\n", r); ok(strcmp(buf, TestItem1) == 0, "streamed text different, got %s\n", buf); - ok(result == streamout_written, "got %ld expected %d\n", result, streamout_written); + ok(result == streamout_written, "got %Id expected %ld\n", result, streamout_written);
/* RTF mode writes the final end of para \r if it's part of the selection */ p = buf; result = SendMessageA(hwndRichEdit, EM_STREAMOUT, SF_RTF, (LPARAM)&es); ok (count_pars(buf) == 1, "got %s\n", buf); - ok(result == streamout_written, "got %ld expected %d\n", result, streamout_written); + ok(result == streamout_written, "got %Id expected %ld\n", result, streamout_written); p = buf; SendMessageA(hwndRichEdit, EM_SETSEL, 0, 12); result = SendMessageA(hwndRichEdit, EM_STREAMOUT, SF_RTF|SFF_SELECTION, (LPARAM)&es); ok (count_pars(buf) == 0, "got %s\n", buf); - ok(result == streamout_written, "got %ld expected %d\n", result, streamout_written); + ok(result == streamout_written, "got %Id expected %ld\n", result, streamout_written); p = buf; SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); result = SendMessageA(hwndRichEdit, EM_STREAMOUT, SF_RTF|SFF_SELECTION, (LPARAM)&es); ok (count_pars(buf) == 1, "got %s\n", buf); - ok(result == streamout_written, "got %ld expected %d\n", result, streamout_written); + ok(result == streamout_written, "got %Id expected %ld\n", result, streamout_written);
SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)TestItem2); p = buf; @@ -3886,7 +3886,7 @@ static void test_EM_STREAMOUT(void) es.pfnCallback = test_WM_SETTEXT_esCallback; memset(buf, 0, sizeof(buf)); result = SendMessageA(hwndRichEdit, EM_STREAMOUT, SF_TEXT, (LPARAM)&es); - ok(result == streamout_written, "got %ld expected %d\n", result, streamout_written); + ok(result == streamout_written, "got %Id expected %ld\n", result, streamout_written); r = strlen(buf); /* Here again, \r gets converted to \r\n, like WM_GETTEXT */ ok(r == 14, "streamed text length is %d, expecting 14\n", r); @@ -3897,17 +3897,17 @@ static void test_EM_STREAMOUT(void) p = buf; result = SendMessageA(hwndRichEdit, EM_STREAMOUT, SF_RTF, (LPARAM)&es); ok (count_pars(buf) == 2, "got %s\n", buf); - ok(result == streamout_written, "got %ld expected %d\n", result, streamout_written); + ok(result == streamout_written, "got %Id expected %ld\n", result, streamout_written); p = buf; SendMessageA(hwndRichEdit, EM_SETSEL, 0, 13); result = SendMessageA(hwndRichEdit, EM_STREAMOUT, SF_RTF|SFF_SELECTION, (LPARAM)&es); ok (count_pars(buf) == 1, "got %s\n", buf); - ok(result == streamout_written, "got %ld expected %d\n", result, streamout_written); + ok(result == streamout_written, "got %Id expected %ld\n", result, streamout_written); p = buf; SendMessageA(hwndRichEdit, EM_SETSEL, 0, -1); result = SendMessageA(hwndRichEdit, EM_STREAMOUT, SF_RTF|SFF_SELECTION, (LPARAM)&es); ok (count_pars(buf) == 2, "got %s\n", buf); - ok(result == streamout_written, "got %ld expected %d\n", result, streamout_written); + ok(result == streamout_written, "got %Id expected %ld\n", result, streamout_written);
SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)TestItem3); p = buf; @@ -3916,7 +3916,7 @@ static void test_EM_STREAMOUT(void) es.pfnCallback = test_WM_SETTEXT_esCallback; memset(buf, 0, sizeof(buf)); result = SendMessageA(hwndRichEdit, EM_STREAMOUT, SF_TEXT, (LPARAM)&es); - ok(result == streamout_written, "got %ld expected %d\n", result, streamout_written); + ok(result == streamout_written, "got %Id expected %ld\n", result, streamout_written); r = strlen(buf); ok(r == 14, "streamed text length is %d, expecting 14\n", r); ok(strcmp(buf, TestItem3) == 0, @@ -3933,7 +3933,7 @@ static void test_EM_STREAMOUT(void) ok(r == 14, "streamed text length is %d, expecting 14\n", r); ok(strcmp(buf, TestItem3) == 0, "streamed text different, got %s\n", buf); - ok(result == 0, "got %ld expected 0\n", result); + ok(result == 0, "got %Id expected 0\n", result);
DestroyWindow(hwndRichEdit); @@ -4879,7 +4879,7 @@ static void test_EM_GETMODIFY(void) cf2.dwEffects = CFE_ITALIC ^ cf2.dwEffects; SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); result = SendMessageA(hwndRichEdit, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf2); - ok(result == 1, "EM_SETCHARFORMAT returned %ld instead of 1\n", result); + ok(result == 1, "EM_SETCHARFORMAT returned %Id instead of 1\n", result); result = SendMessageA(hwndRichEdit, EM_GETMODIFY, 0, 0); ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero for EM_SETCHARFORMAT\n"); @@ -4955,7 +4955,7 @@ static void check_EM_EXSETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id cr.cpMax = setsel->max; result = SendMessageA(hwnd, EM_EXSETSEL, 0, (LPARAM)&cr);
- ok(result == setsel->expected_retval, "EM_EXSETSEL(%d): expected: %ld actual: %ld\n", id, setsel->expected_retval, result); + ok(result == setsel->expected_retval, "EM_EXSETSEL(%d): expected: %Id actual: %Id\n", id, setsel->expected_retval, result);
SendMessageA(hwnd, EM_GETSEL, (WPARAM)&start, (LPARAM)&end);
@@ -4992,12 +4992,12 @@ static void test_EM_EXSETSEL(void) /* 012345 6 78901 */ cr.cpMin = 4; cr.cpMax = 8; result = SendMessageA(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr); - ok(result == 8, "EM_EXSETSEL return %ld expected 8\n", result); + ok(result == 8, "EM_EXSETSEL return %Id expected 8\n", result); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, sizeof(bufA), (LPARAM)bufA); ok(!strcmp(bufA, "ef\x8e\xf0g"), "EM_GETSELTEXT return incorrect string\n"); SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(cr.cpMin == 4, "Selection start incorrectly: %d expected 4\n", cr.cpMin); - ok(cr.cpMax == 8, "Selection end incorrectly: %d expected 8\n", cr.cpMax); + ok(cr.cpMin == 4, "Selection start incorrectly: %ld expected 4\n", cr.cpMin); + ok(cr.cpMax == 8, "Selection end incorrectly: %ld expected 8\n", cr.cpMax); }
DestroyWindow(hwndRichEdit); @@ -5009,7 +5009,7 @@ static void check_EM_SETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id)
result = SendMessageA(hwnd, EM_SETSEL, setsel->min, setsel->max);
- ok(result == setsel->expected_retval, "EM_SETSEL(%d): expected: %ld actual: %ld\n", id, setsel->expected_retval, result); + ok(result == setsel->expected_retval, "EM_SETSEL(%d): expected: %Id actual: %Id\n", id, setsel->expected_retval, result);
SendMessageA(hwnd, EM_GETSEL, (WPARAM)&start, (LPARAM)&end);
@@ -5050,7 +5050,7 @@ static void test_EM_SETSEL(void) SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"abcdef\x8e\xf0ghijk"); /* 012345 6 78901 */ result = SendMessageA(hwndRichEdit, EM_SETSEL, 4, 8); - ok(result == 8, "EM_SETSEL return %ld expected 8\n", result); + ok(result == 8, "EM_SETSEL return %Id expected 8\n", result); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, sizeof(buffA), (LPARAM)buffA); ok(!strcmp(buffA, "ef\x8e\xf0g"), "EM_GETSELTEXT return incorrect string\n"); result = SendMessageA(hwndRichEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); @@ -5140,8 +5140,8 @@ static void test_EM_REPLACESEL(int redraw)
r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 10, "EM_EXGETSEL returned cpMin=%d, expected 10\n", cr.cpMin); - ok(cr.cpMax == 10, "EM_EXGETSEL returned cpMax=%d, expected 10\n", cr.cpMax); + ok(cr.cpMin == 10, "EM_EXGETSEL returned cpMin=%ld, expected 10\n", cr.cpMin); + ok(cr.cpMax == 10, "EM_EXGETSEL returned cpMax=%ld, expected 10\n", cr.cpMax);
SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); r = strcmp(buffer, "RichEdit1\r\n"); @@ -5157,8 +5157,8 @@ static void test_EM_REPLACESEL(int redraw)
r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 10, "EM_EXGETSEL returned cpMin=%d, expected 10\n", cr.cpMin); - ok(cr.cpMax == 10, "EM_EXGETSEL returned cpMax=%d, expected 10\n", cr.cpMax); + ok(cr.cpMin == 10, "EM_EXGETSEL returned cpMin=%ld, expected 10\n", cr.cpMin); + ok(cr.cpMax == 10, "EM_EXGETSEL returned cpMax=%ld, expected 10\n", cr.cpMax);
/* The following tests show that richedit should handle the special \r\r\n sequence by turning it into a single space on insertion. However, @@ -5171,8 +5171,8 @@ static void test_EM_REPLACESEL(int redraw) ok(2 == r, "EM_REPLACESEL returned %d, expected 4\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 2, "EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.cpMin); - ok(cr.cpMax == 2, "EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.cpMax); + ok(cr.cpMin == 2, "EM_EXGETSEL returned cpMin=%ld, expected 2\n", cr.cpMin); + ok(cr.cpMax == 2, "EM_EXGETSEL returned cpMax=%ld, expected 2\n", cr.cpMax);
/* Test the actual string */ getText.cb = 1024; @@ -5193,8 +5193,8 @@ static void test_EM_REPLACESEL(int redraw) ok(r == 3, "EM_REPLACESEL returned %d, expected 3\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 1, "EM_EXGETSEL returned cpMin=%d, expected 1\n", cr.cpMin); - ok(cr.cpMax == 1, "EM_EXGETSEL returned cpMax=%d, expected 1\n", cr.cpMax); + ok(cr.cpMin == 1, "EM_EXGETSEL returned cpMin=%ld, expected 1\n", cr.cpMin); + ok(cr.cpMax == 1, "EM_EXGETSEL returned cpMax=%ld, expected 1\n", cr.cpMax);
/* Test the actual string */ getText.cb = 1024; @@ -5215,8 +5215,8 @@ static void test_EM_REPLACESEL(int redraw) ok(r == 9, "EM_REPLACESEL returned %d, expected 9\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 7, "EM_EXGETSEL returned cpMin=%d, expected 7\n", cr.cpMin); - ok(cr.cpMax == 7, "EM_EXGETSEL returned cpMax=%d, expected 7\n", cr.cpMax); + ok(cr.cpMin == 7, "EM_EXGETSEL returned cpMin=%ld, expected 7\n", cr.cpMin); + ok(cr.cpMax == 7, "EM_EXGETSEL returned cpMax=%ld, expected 7\n", cr.cpMax);
/* Test the actual string */ getText.cb = 1024; @@ -5237,8 +5237,8 @@ static void test_EM_REPLACESEL(int redraw) ok(r == 5, "EM_REPLACESEL returned %d, expected 5\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 2, "EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.cpMin); - ok(cr.cpMax == 2, "EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.cpMax); + ok(cr.cpMin == 2, "EM_EXGETSEL returned cpMin=%ld, expected 2\n", cr.cpMin); + ok(cr.cpMax == 2, "EM_EXGETSEL returned cpMax=%ld, expected 2\n", cr.cpMax);
/* Test the actual string */ getText.cb = 1024; @@ -5259,8 +5259,8 @@ static void test_EM_REPLACESEL(int redraw) ok(r == 5, "EM_REPLACESEL returned %d, expected 5\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 3, "EM_EXGETSEL returned cpMin=%d, expected 3\n", cr.cpMin); - ok(cr.cpMax == 3, "EM_EXGETSEL returned cpMax=%d, expected 3\n", cr.cpMax); + ok(cr.cpMin == 3, "EM_EXGETSEL returned cpMin=%ld, expected 3\n", cr.cpMin); + ok(cr.cpMax == 3, "EM_EXGETSEL returned cpMax=%ld, expected 3\n", cr.cpMax);
/* Test the actual string */ getText.cb = 1024; @@ -5281,8 +5281,8 @@ static void test_EM_REPLACESEL(int redraw) ok(r == 6, "EM_REPLACESEL returned %d, expected 6\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 5, "EM_EXGETSEL returned cpMin=%d, expected 5\n", cr.cpMin); - ok(cr.cpMax == 5, "EM_EXGETSEL returned cpMax=%d, expected 5\n", cr.cpMax); + ok(cr.cpMin == 5, "EM_EXGETSEL returned cpMin=%ld, expected 5\n", cr.cpMin); + ok(cr.cpMax == 5, "EM_EXGETSEL returned cpMax=%ld, expected 5\n", cr.cpMax);
/* Test the actual string */ getText.cb = 1024; @@ -5303,8 +5303,8 @@ static void test_EM_REPLACESEL(int redraw) ok(2 == r, "EM_REPLACESEL returned %d, expected 2\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 2, "EM_EXGETSEL returned cpMin=%d, expected 2\n", cr.cpMin); - ok(cr.cpMax == 2, "EM_EXGETSEL returned cpMax=%d, expected 2\n", cr.cpMax); + ok(cr.cpMin == 2, "EM_EXGETSEL returned cpMin=%ld, expected 2\n", cr.cpMin); + ok(cr.cpMax == 2, "EM_EXGETSEL returned cpMax=%ld, expected 2\n", cr.cpMax);
/* Test the actual string */ getText.cb = 1024; @@ -5325,8 +5325,8 @@ static void test_EM_REPLACESEL(int redraw) ok(r == 9, "EM_REPLACESEL returned %d, expected 9\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 7, "EM_EXGETSEL returned cpMin=%d, expected 7\n", cr.cpMin); - ok(cr.cpMax == 7, "EM_EXGETSEL returned cpMax=%d, expected 7\n", cr.cpMax); + ok(cr.cpMin == 7, "EM_EXGETSEL returned cpMin=%ld, expected 7\n", cr.cpMin); + ok(cr.cpMax == 7, "EM_EXGETSEL returned cpMax=%ld, expected 7\n", cr.cpMax);
/* Test the actual string */ getText.cb = 1024; @@ -5352,8 +5352,8 @@ static void test_EM_REPLACESEL(int redraw) todo_wine ok(r == 5, "EM_REPLACESEL returned %d, expected 5\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(r == 0, "EM_EXGETSEL returned %d, expected 0\n", r); - ok(cr.cpMin == 4, "EM_EXGETSEL returned cpMin=%d, expected 4\n", cr.cpMin); - ok(cr.cpMax == 4, "EM_EXGETSEL returned cpMax=%d, expected 4\n", cr.cpMax); + ok(cr.cpMin == 4, "EM_EXGETSEL returned cpMin=%ld, expected 4\n", cr.cpMin); + ok(cr.cpMax == 4, "EM_EXGETSEL returned cpMax=%ld, expected 4\n", cr.cpMax); r = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok(!strcmp(buffer, "abc\x8e\xf0"), "WM_GETTEXT returned incorrect string\n"); ok(r == 5, "WM_GETTEXT returned %d, expected 5\n", r); @@ -5363,8 +5363,8 @@ static void test_EM_REPLACESEL(int redraw) todo_wine ok(r == 4, "EM_REPLACESEL returned %d, expected 4\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(r == 0, "EM_EXGETSEL returned %d, expected 0\n", r); - todo_wine ok(cr.cpMin == 4, "EM_EXGETSEL returned cpMin=%d, expected 4\n", cr.cpMin); - todo_wine ok(cr.cpMax == 4, "EM_EXGETSEL returned cpMax=%d, expected 4\n", cr.cpMax); + todo_wine ok(cr.cpMin == 4, "EM_EXGETSEL returned cpMin=%ld, expected 4\n", cr.cpMin); + todo_wine ok(cr.cpMax == 4, "EM_EXGETSEL returned cpMax=%ld, expected 4\n", cr.cpMax); r = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); todo_wine ok(!strcmp(buffer, "abc\x8e\xf0"), "WM_GETTEXT returned incorrect string\n"); todo_wine ok(r == 5, "WM_GETTEXT returned %d, expected 5\n", r); @@ -5375,8 +5375,8 @@ static void test_EM_REPLACESEL(int redraw) todo_wine ok(r == 12, "EM_REPLACESEL returned %d, expected 12\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - todo_wine ok(cr.cpMin == 12, "EM_EXGETSEL returned cpMin=%d, expected 12\n", cr.cpMin); - todo_wine ok(cr.cpMax == 12, "EM_EXGETSEL returned cpMax=%d, expected 12\n", cr.cpMax); + todo_wine ok(cr.cpMin == 12, "EM_EXGETSEL returned cpMin=%ld, expected 12\n", cr.cpMin); + todo_wine ok(cr.cpMax == 12, "EM_EXGETSEL returned cpMax=%ld, expected 12\n", cr.cpMax); SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); todo_wine ok(!strcmp(buffer, "TestSomeText"), "WM_GETTEXT returned incorrect string\n");
@@ -5385,8 +5385,8 @@ static void test_EM_REPLACESEL(int redraw) todo_wine ok(r == 12, "EM_REPLACESEL returned %d, expected 12\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - todo_wine ok(cr.cpMin == 12, "EM_EXGETSEL returned cpMin=%d, expected 12\n", cr.cpMin); - todo_wine ok(cr.cpMax == 12, "EM_EXGETSEL returned cpMax=%d, expected 12\n", cr.cpMax); + todo_wine ok(cr.cpMin == 12, "EM_EXGETSEL returned cpMin=%ld, expected 12\n", cr.cpMin); + todo_wine ok(cr.cpMax == 12, "EM_EXGETSEL returned cpMax=%ld, expected 12\n", cr.cpMax); SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); todo_wine ok(!strcmp(buffer, "TestSomeText"), "WM_GETTEXT returned incorrect string\n");
@@ -5396,8 +5396,8 @@ static void test_EM_REPLACESEL(int redraw) todo_wine ok(r == 12, "EM_REPLACESEL returned %d, expected 12\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - todo_wine ok(cr.cpMin == 13, "EM_EXGETSEL returned cpMin=%d, expected 13\n", cr.cpMin); - todo_wine ok(cr.cpMax == 13, "EM_EXGETSEL returned cpMax=%d, expected 13\n", cr.cpMax); + todo_wine ok(cr.cpMin == 13, "EM_EXGETSEL returned cpMin=%ld, expected 13\n", cr.cpMin); + todo_wine ok(cr.cpMax == 13, "EM_EXGETSEL returned cpMax=%ld, expected 13\n", cr.cpMax); SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); todo_wine ok(!strcmp(buffer, "WTestSomeTextne"), "WM_GETTEXT returned incorrect string\n");
@@ -5407,8 +5407,8 @@ static void test_EM_REPLACESEL(int redraw) todo_wine ok(r == 12, "EM_REPLACESEL returned %d, expected 12\n", r); r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); - todo_wine ok(cr.cpMin == 13, "EM_EXGETSEL returned cpMin=%d, expected 13\n", cr.cpMin); - todo_wine ok(cr.cpMax == 13, "EM_EXGETSEL returned cpMax=%d, expected 13\n", cr.cpMax); + todo_wine ok(cr.cpMin == 13, "EM_EXGETSEL returned cpMin=%ld, expected 13\n", cr.cpMin); + todo_wine ok(cr.cpMax == 13, "EM_EXGETSEL returned cpMax=%ld, expected 13\n", cr.cpMax); SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); todo_wine ok(!strcmp(buffer, "WTestSomeTextne"), "WM_GETTEXT returned incorrect string\n");
@@ -5695,7 +5695,7 @@ static void test_EM_FORMATRANGE(void) r = SendMessageA(hwndRichEdit, EM_FORMATRANGE, TRUE, (LPARAM)&fr); todo_wine { if (! skip_non_english) - ok(fr.rc.bottom == (stringsize.cy * tpp_y), "Expected bottom to be %d, got %d\n", (stringsize.cy * tpp_y), fr.rc.bottom); + ok(fr.rc.bottom == (stringsize.cy * tpp_y), "Expected bottom to be %ld, got %ld\n", (stringsize.cy * tpp_y), fr.rc.bottom); } if (fmtstrings[i].first) todo_wine { @@ -5901,15 +5901,15 @@ static void test_EM_STREAMIN(void) es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 12, "got %ld, expected %d\n", result, 12); + ok(result == 12, "got %Id, expected %d\n", result, 12);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 12, - "EM_STREAMIN: Test 0 returned %ld, expected 12\n", result); + "EM_STREAMIN: Test 0 returned %Id, expected 12\n", result); result = strcmp (buffer,"TestSomeText"); ok (result == 0, "EM_STREAMIN: Test 0 set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %ld, expected %d\n", es.dwError, 0); /* Show that para fmts are ignored */ range.cpMin = 2; range.cpMax = 2; @@ -5917,8 +5917,8 @@ static void test_EM_STREAMIN(void) memset(&fmt, 0xcc, sizeof(fmt)); fmt.cbSize = sizeof(fmt); result = SendMessageA(hwndRichEdit, EM_GETPARAFORMAT, 0, (LPARAM)&fmt); - ok(fmt.dxStartIndent == 0, "got %d\n", fmt.dxStartIndent); - ok(fmt.dxOffset == 0, "got %d\n", fmt.dxOffset); + ok(fmt.dxStartIndent == 0, "got %ld\n", fmt.dxStartIndent); + ok(fmt.dxOffset == 0, "got %ld\n", fmt.dxOffset); ok(fmt.wAlignment == PFA_LEFT, "got %d\n", fmt.wAlignment); ok((fmt.wEffects & PFE_RTLPARA) == 0, "got %x\n", fmt.wEffects);
@@ -5928,15 +5928,15 @@ static void test_EM_STREAMIN(void) es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 12, "got %ld, expected %d\n", result, 12); + ok(result == 12, "got %Id, expected %d\n", result, 12);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 12, - "EM_STREAMIN: Test 0-a returned %ld, expected 12\n", result); + "EM_STREAMIN: Test 0-a returned %Id, expected 12\n", result); result = strcmp (buffer,"TestSomeText"); ok (result == 0, "EM_STREAMIN: Test 0-a set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0-a set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 0-a set error %ld, expected %d\n", es.dwError, 0); /* This time para fmts are processed */ range.cpMin = 2; range.cpMax = 2; @@ -5944,8 +5944,8 @@ static void test_EM_STREAMIN(void) memset(&fmt, 0xcc, sizeof(fmt)); fmt.cbSize = sizeof(fmt); result = SendMessageA(hwndRichEdit, EM_GETPARAFORMAT, 0, (LPARAM)&fmt); - ok(fmt.dxStartIndent == 300, "got %d\n", fmt.dxStartIndent); - ok(fmt.dxOffset == -100, "got %d\n", fmt.dxOffset); + ok(fmt.dxStartIndent == 300, "got %ld\n", fmt.dxStartIndent); + ok(fmt.dxOffset == -100, "got %ld\n", fmt.dxOffset); ok(fmt.wAlignment == PFA_RIGHT, "got %d\n", fmt.wAlignment); ok((fmt.wEffects & PFE_RTLPARA) == PFE_RTLPARA, "got %x\n", fmt.wEffects);
@@ -5954,15 +5954,15 @@ static void test_EM_STREAMIN(void) es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 13, "got %ld, expected %d\n", result, 13); + ok(result == 13, "got %Id, expected %d\n", result, 13);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 14, - "EM_STREAMIN: Test 0-b returned %ld, expected 14\n", result); + "EM_STREAMIN: Test 0-b returned %Id, expected 14\n", result); result = strcmp (buffer,"TestSomeText\r\n"); ok (result == 0, "EM_STREAMIN: Test 0-b set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0-b set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 0-b set error %ld, expected %d\n", es.dwError, 0);
/* Show that when using SFF_SELECTION the last \par is not ignored. */ ptr = streamText0a; @@ -5970,20 +5970,20 @@ static void test_EM_STREAMIN(void) es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 12, "got %ld, expected %d\n", result, 12); + ok(result == 12, "got %Id, expected %d\n", result, 12);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 12, - "EM_STREAMIN: Test 0-a returned %ld, expected 12\n", result); + "EM_STREAMIN: Test 0-a returned %Id, expected 12\n", result); result = strcmp (buffer,"TestSomeText"); ok (result == 0, "EM_STREAMIN: Test 0-a set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0-a set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 0-a set error %ld, expected %d\n", es.dwError, 0);
range.cpMin = 0; range.cpMax = -1; result = SendMessageA(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&range); - ok (result == 13, "got %ld\n", result); + ok (result == 13, "got %Id\n", result);
ptr = streamText0a; es.dwCookie = (DWORD_PTR)&ptr; @@ -5991,104 +5991,104 @@ static void test_EM_STREAMIN(void) es.pfnCallback = test_EM_STREAMIN_esCallback;
result = SendMessageA(hwndRichEdit, EM_STREAMIN, SFF_SELECTION | SF_RTF, (LPARAM)&es); - ok(result == 13, "got %ld, expected 13\n", result); + ok(result == 13, "got %Id, expected 13\n", result);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 14, - "EM_STREAMIN: Test SFF_SELECTION 0-a returned %ld, expected 14\n", result); + "EM_STREAMIN: Test SFF_SELECTION 0-a returned %Id, expected 14\n", result); result = strcmp (buffer,"TestSomeText\r\n"); ok (result == 0, "EM_STREAMIN: Test SFF_SELECTION 0-a set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test SFF_SELECTION 0-a set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test SFF_SELECTION 0-a set error %ld, expected %d\n", es.dwError, 0);
es.dwCookie = (DWORD_PTR)&streamText1; es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 12, "got %ld, expected %d\n", result, 12); + ok(result == 12, "got %Id, expected %d\n", result, 12);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 12, - "EM_STREAMIN: Test 1 returned %ld, expected 12\n", result); + "EM_STREAMIN: Test 1 returned %Id, expected 12\n", result); result = strcmp (buffer,"TestSomeText"); ok (result == 0, "EM_STREAMIN: Test 1 set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 1 set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 1 set error %ld, expected %d\n", es.dwError, 0);
es.dwCookie = (DWORD_PTR)&streamText2; es.dwError = 0; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 0, "got %ld, expected %d\n", result, 0); + ok(result == 0, "got %Id, expected %d\n", result, 0);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 0, - "EM_STREAMIN: Test 2 returned %ld, expected 0\n", result); + "EM_STREAMIN: Test 2 returned %Id, expected 0\n", result); ok(!buffer[0], "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",buffer); - ok(es.dwError == -16, "EM_STREAMIN: Test 2 set error %d, expected %d\n", es.dwError, -16); + ok(es.dwError == -16, "EM_STREAMIN: Test 2 set error %ld, expected %d\n", es.dwError, -16);
es.dwCookie = (DWORD_PTR)&streamText3; es.dwError = 0; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 0, "got %ld, expected %d\n", result, 0); + ok(result == 0, "got %Id, expected %d\n", result, 0);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 0, - "EM_STREAMIN: Test 3 returned %ld, expected 0\n", result); + "EM_STREAMIN: Test 3 returned %Id, expected 0\n", result); ok(!buffer[0], "EM_STREAMIN: Test 3 set wrong text: Result: %s\n",buffer); - ok(es.dwError == -16, "EM_STREAMIN: Test 3 set error %d, expected %d\n", es.dwError, -16); + ok(es.dwError == -16, "EM_STREAMIN: Test 3 set error %ld, expected %d\n", es.dwError, -16);
es.dwCookie = (DWORD_PTR)&streamTextUTF8BOM; es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_TEXT, (LPARAM)&es); - ok(result == 18, "got %ld, expected %d\n", result, 18); + ok(result == 18, "got %Id, expected %d\n", result, 18);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok(result == 15, - "EM_STREAMIN: Test UTF8WithBOM returned %ld, expected 15\n", result); + "EM_STREAMIN: Test UTF8WithBOM returned %Id, expected 15\n", result); result = strcmp (buffer,"TestUTF8WithBOM"); ok(result == 0, "EM_STREAMIN: Test UTF8WithBOM set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test UTF8WithBOM set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test UTF8WithBOM set error %ld, expected %d\n", es.dwError, 0);
phase = 0; es.dwCookie = (DWORD_PTR)&phase; es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback_UTF8Split; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_TEXT, (LPARAM)&es); - ok(result == 8, "got %ld\n", result); + ok(result == 8, "got %Id\n", result);
WideCharToMultiByte(CP_ACP, 0, UTF8Split_exp, -1, tmp, sizeof(tmp), NULL, NULL);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok(result == 3, - "EM_STREAMIN: Test UTF8Split returned %ld\n", result); + "EM_STREAMIN: Test UTF8Split returned %Id\n", result); result = memcmp (buffer, tmp, 3); ok(result == 0, "EM_STREAMIN: Test UTF8Split set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test UTF8Split set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test UTF8Split set error %ld, expected %d\n", es.dwError, 0);
es.dwCookie = (DWORD_PTR)&cookieForStream4; es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback2; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_TEXT, (LPARAM)&es); - ok(result == length4, "got %ld, expected %d\n", result, length4); + ok(result == length4, "got %Id, expected %d\n", result, length4);
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == length4, - "EM_STREAMIN: Test 4 returned %ld, expected %d\n", result, length4); - ok(es.dwError == 0, "EM_STREAMIN: Test 4 set error %d, expected %d\n", es.dwError, 0); + "EM_STREAMIN: Test 4 returned %Id, expected %d\n", result, length4); + ok(es.dwError == 0, "EM_STREAMIN: Test 4 set error %ld, expected %d\n", es.dwError, 0);
es.dwCookie = (DWORD_PTR)&cookieForStream5; es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback2; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_TEXT | SF_UNICODE, (LPARAM)&es); - ok(result == sizeof(streamText5), "got %ld, expected %u\n", result, (UINT)sizeof(streamText5)); + ok(result == sizeof(streamText5), "got %Id, expected %u\n", result, (UINT)sizeof(streamText5));
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == length5, - "EM_STREAMIN: Test 5 returned %ld, expected %d\n", result, length5); - ok(es.dwError == 0, "EM_STREAMIN: Test 5 set error %d, expected %d\n", es.dwError, 0); + "EM_STREAMIN: Test 5 returned %Id, expected %d\n", result, length5); + ok(es.dwError == 0, "EM_STREAMIN: Test 5 set error %ld, expected %d\n", es.dwError, 0);
DestroyWindow(hwndRichEdit);
@@ -6099,7 +6099,7 @@ static void test_EM_STREAMIN(void) es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_TEXT, (LPARAM)&es); - ok(result == 12, "got %ld, expected %d\n", result, 12); + ok(result == 12, "got %Id, expected %d\n", result, 12); result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (!strcmp(buffer, "line1"), "EM_STREAMIN: Unexpected text '%s'\n", buffer); @@ -6111,7 +6111,7 @@ static void test_EM_STREAMIN(void) es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_null_bytes; result = SendMessageA(hwndRichEdit, EM_STREAMIN, SF_RTF, (LPARAM)&es); - ok(result == 16, "got %ld, expected %d\n", result, 16); + ok(result == 16, "got %Id, expected %d\n", result, 16); result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (!strcmp(buffer, "Th is is a test"), "EM_STREAMIN: Unexpected text '%s'\n", buffer); } @@ -6212,7 +6212,7 @@ static void test_unicode_conversions(void) WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \ ret = SendMessageA(hwnd, wm_set_text, wparam, (LPARAM)txt); \ - ok(ret, "SendMessageA(%02x) error %u\n", wm_set_text, GetLastError()); \ + ok(ret, "SendMessageA(%02x) error %lu\n", wm_set_text, GetLastError()); \ } while(0) #define expect_textA(hwnd, wm_get_text, txt) \ do { \ @@ -6221,7 +6221,7 @@ static void test_unicode_conversions(void) assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ memset(bufA, 0xAA, sizeof(bufA)); \ ret = SendMessageA(hwnd, wm_get_text, wparam, (LPARAM)bufA); \ - ok(ret, "SendMessageA(%02x) error %u\n", wm_get_text, GetLastError()); \ + ok(ret, "SendMessageA(%02x) error %lu\n", wm_get_text, GetLastError()); \ ret = lstrcmpA(bufA, txt); \ ok(!ret, "%02x: strings do not match: expected %s got %s\n", wm_get_text, txt, bufA); \ } while(0) @@ -6232,7 +6232,7 @@ static void test_unicode_conversions(void) WPARAM wparam = (wm_set_text == WM_SETTEXT) ? 0 : (WPARAM)&stex; \ assert(wm_set_text == WM_SETTEXT || wm_set_text == EM_SETTEXTEX); \ ret = SendMessageW(hwnd, wm_set_text, wparam, (LPARAM)txt); \ - ok(ret, "SendMessageW(%02x) error %u\n", wm_set_text, GetLastError()); \ + ok(ret, "SendMessageW(%02x) error %lu\n", wm_set_text, GetLastError()); \ } while(0) #define expect_textW(hwnd, wm_get_text, txt) \ do { \ @@ -6241,7 +6241,7 @@ static void test_unicode_conversions(void) assert(wm_get_text == WM_GETTEXT || wm_get_text == EM_GETTEXTEX); \ memset(bufW, 0xAA, sizeof(bufW)); \ ret = SendMessageW(hwnd, wm_get_text, wparam, (LPARAM)bufW); \ - ok(ret, "SendMessageW(%02x) error %u\n", wm_get_text, GetLastError()); \ + ok(ret, "SendMessageW(%02x) error %lu\n", wm_get_text, GetLastError()); \ ret = lstrcmpW(bufW, txt); \ ok(!ret, "%02x: strings do not match: expected[0] %x got[0] %x\n", wm_get_text, txt[0], bufW[0]); \ } while(0) @@ -6258,7 +6258,7 @@ static void test_unicode_conversions(void)
hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP, 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError());
ret = IsWindowUnicode(hwnd); ok(ret, "RichEdit20W should be unicode under NT\n"); @@ -6318,7 +6318,7 @@ static void test_unicode_conversions(void)
hwnd = CreateWindowExA(0, "RichEdit20A", NULL, WS_POPUP, 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError());
ret = IsWindowUnicode(hwnd); ok(!ret, "RichEdit20A should NOT be unicode\n"); @@ -6366,7 +6366,7 @@ static void test_WM_CHAR(void) /* single-line control must IGNORE carriage returns */ hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP, 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError()); disable_beep( hwnd );
p = char_list; @@ -6387,7 +6387,7 @@ static void test_WM_CHAR(void) /* multi-line control inserts CR normally */ hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP|ES_MULTILINE, 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError());
p = char_list; while (*p != '\0') { @@ -6419,7 +6419,7 @@ static void test_EM_GETTEXTLENGTHEX(void) /* single line */ hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP, 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError());
gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF; gtl.codepage = CP_ACP; @@ -6464,7 +6464,7 @@ static void test_EM_GETTEXTLENGTHEX(void) /* multi line */ hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP | ES_MULTILINE, 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError());
gtl.flags = GTL_NUMCHARS | GTL_PRECISE | GTL_USECRLF; gtl.codepage = CP_ACP; @@ -6549,7 +6549,7 @@ static void test_EM_GETTEXTLENGTHEX(void) gtl.codepage = 1200; ret = SendMessageA(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 0); ok(ret == E_INVALIDARG, - "GTL_NUMCHARS | GTL_NUMBYTES gave %i, expected %i\n", ret, E_INVALIDARG); + "GTL_NUMCHARS | GTL_NUMBYTES gave %i, expected %li\n", ret, E_INVALIDARG);
DestroyWindow(hwnd); } @@ -6810,24 +6810,24 @@ static void link_notify_test(const char *desc, int i, HWND hwnd, HWND parent, ok(enlink.nmhdr.hwndFrom == hwnd, "%s test %i: Expected hwnd %p got %p\n", desc, i, hwnd, enlink.nmhdr.hwndFrom); ok(enlink.nmhdr.idFrom == 0, - "%s test %i: Expected idFrom 0 got 0x%lx\n", desc, i, enlink.nmhdr.idFrom); + "%s test %i: Expected idFrom 0 got 0x%Ix\n", desc, i, enlink.nmhdr.idFrom); ok(enlink.msg == msg, "%s test %i: Expected msg 0x%x got 0x%x\n", desc, i, msg, enlink.msg); if (msg == WM_SETCURSOR) { ok(enlink.wParam == 0, - "%s test %i: Expected wParam 0 got 0x%lx\n", desc, i, enlink.wParam); + "%s test %i: Expected wParam 0 got 0x%Ix\n", desc, i, enlink.wParam); } else { ok(enlink.wParam == wParam, - "%s test %i: Expected wParam 0x%lx got 0x%lx\n", desc, i, wParam, enlink.wParam); + "%s test %i: Expected wParam 0x%Ix got 0x%Ix\n", desc, i, wParam, enlink.wParam); } ok(enlink.lParam == MAKELPARAM(CURSOR_CLIENT_X, CURSOR_CLIENT_Y), - "%s test %i: Expected lParam 0x%lx got 0x%lx\n", + "%s test %i: Expected lParam 0x%Ix got 0x%Ix\n", desc, i, MAKELPARAM(CURSOR_CLIENT_X, CURSOR_CLIENT_Y), enlink.lParam); ok(enlink.chrg.cpMin == 0 && enlink.chrg.cpMax == 31, - "%s test %i: Expected link range [0,31) got [%i,%i)\n", desc, i, enlink.chrg.cpMin, enlink.chrg.cpMax); + "%s test %i: Expected link range [0,31) got [%li,%li)\n", desc, i, enlink.chrg.cpMin, enlink.chrg.cpMax); } else { @@ -6970,7 +6970,7 @@ static void test_undo_coalescing(void) /* multi-line control inserts CR normally */ hwnd = CreateWindowExA(0, "RichEdit20W", NULL, WS_POPUP|ES_MULTILINE, 0, 0, 200, 60, 0, 0, 0, 0); - ok(hwnd != 0, "CreateWindowExA error %u\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %lu\n", GetLastError()); disable_beep( hwnd );
result = SendMessageA(hwnd, EM_CANUNDO, 0, 0); @@ -7379,7 +7379,7 @@ static void test_autoscroll(void) ok(lines == 1, "%d lines instead of 1\n", lines); ret = SendMessageA(hwnd, EM_GETSCROLLPOS, 0, (LPARAM)&pt); ok(ret == 1, "EM_GETSCROLLPOS returned %d instead of 1\n", ret); - ok(pt.y == 0, "y scroll position is %d after clearing text.\n", pt.y); + ok(pt.y == 0, "y scroll position is %ld after clearing text.\n", pt.y); ret = GetWindowLongA(hwnd, GWL_STYLE); ok(!(ret & WS_VSCROLL), "Scrollbar is still shown (style=%x).\n", (UINT)ret); } @@ -8083,7 +8083,7 @@ static void test_dialogmode(void)
hwButton = CreateWindowA("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, 100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); + ok(hwButton!=NULL, "CreateWindow failed with error code %ld\n", GetLastError());
memset(&dm_messages, 0, sizeof(dm_messages)); r = SendMessageA(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); @@ -8143,7 +8143,7 @@ static void test_dialogmode(void)
hwButton = CreateWindowA("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, 100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); + ok(hwButton!=NULL, "CreateWindow failed with error code %ld\n", GetLastError());
memset(&dm_messages, 0, sizeof(dm_messages)); r = SendMessageA(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); @@ -8197,7 +8197,7 @@ static void test_dialogmode(void)
hwButton = CreateWindowA("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, 100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); + ok(hwButton!=NULL, "CreateWindow failed with error code %ld\n", GetLastError());
memset(&dm_messages, 0, sizeof(dm_messages)); r = SendMessageA(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); @@ -8227,7 +8227,7 @@ static void test_dialogmode(void)
hwButton = CreateWindowA("BUTTON", "OK", WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON, 100, 100, 50, 20, hwParent, (HMENU)ID_RICHEDITTESTDBUTTON, GetModuleHandleA(0), NULL); - ok(hwButton!=NULL, "CreateWindow failed with error code %d\n", GetLastError()); + ok(hwButton!=NULL, "CreateWindow failed with error code %ld\n", GetLastError());
memset(&dm_messages, 0, sizeof(dm_messages)); r = SendMessageA(hwRichEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); @@ -8360,7 +8360,7 @@ static void test_enter(void) { /* Set the text to the initial text */ result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)testenteritems[i].initialtext); - ok (result == 1, "[%d] WM_SETTEXT returned %ld instead of 1\n", i, result); + ok (result == 1, "[%d] WM_SETTEXT returned %Id instead of 1\n", i, result);
/* Send Enter */ SendMessageA(hwndRichEdit, EM_SETSEL, testenteritems[i].cursor, testenteritems[i].cursor); @@ -8415,7 +8415,7 @@ static void test_enter(void) getText.codepage = CP_ACP;
result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)""); - ok (result == 1, "[%d] WM_SETTEXT returned %ld instead of 1\n", i, result); + ok (result == 1, "[%d] WM_SETTEXT returned %Id instead of 1\n", i, result); SendMessageW(hwndRichEdit, WM_CHAR, 'T', 0); SendMessageW(hwndRichEdit, WM_KEYDOWN, VK_RETURN, 0);
@@ -8427,7 +8427,7 @@ static void test_enter(void) ok (result == 0, "[%d] EM_GETTEXTEX, GT_DEFAULT unexpected '%s', expected '%s'\n", i, resultbuf, expectedbuf);
result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)""); - ok (result == 1, "[%d] WM_SETTEXT returned %ld instead of 1\n", i, result); + ok (result == 1, "[%d] WM_SETTEXT returned %Id instead of 1\n", i, result); SendMessageW(hwndRichEdit, WM_CHAR, 'T', 0); SendMessageW(hwndRichEdit, WM_CHAR, '\r', 0);
@@ -8460,7 +8460,7 @@ static void test_WM_CREATE(void) ok(!strcmp(buf, "line1"), "buf = %s\n", buf);
res = SendMessageA(rich_edit, EM_GETSEL, 0, 0); - ok(res == 0, "SendMessage(EM_GETSEL) returned %lx\n", res); + ok(res == 0, "SendMessage(EM_GETSEL) returned %Ix\n", res);
DestroyWindow(rich_edit);
@@ -8473,7 +8473,7 @@ static void test_WM_CREATE(void) ok(!strcmp(buf, "line1\r\nline2"), "buf = %s\n", buf);
res = SendMessageA(rich_edit, EM_GETSEL, 0, 0); - ok(res == 0, "SendMessage(EM_GETSEL) returned %lx\n", res); + ok(res == 0, "SendMessage(EM_GETSEL) returned %Ix\n", res);
DestroyWindow(rich_edit); } @@ -8523,12 +8523,12 @@ static void test_EM_SETREADONLY(void) res = SendMessageA(richedit, EM_SETREADONLY, TRUE, 0); ok(res == 1, "EM_SETREADONLY\n"); dwStyle = GetWindowLongA(richedit, GWL_STYLE); - ok(dwStyle & ES_READONLY, "got wrong value: 0x%x\n", dwStyle); + ok(dwStyle & ES_READONLY, "got wrong value: 0x%lx\n", dwStyle);
res = SendMessageA(richedit, EM_SETREADONLY, FALSE, 0); ok(res == 1, "EM_SETREADONLY\n"); dwStyle = GetWindowLongA(richedit, GWL_STYLE); - ok(!(dwStyle & ES_READONLY), "got wrong value: 0x%x\n", dwStyle); + ok(!(dwStyle & ES_READONLY), "got wrong value: 0x%lx\n", dwStyle);
DestroyWindow(richedit); } @@ -8553,8 +8553,8 @@ static void _test_font_size(unsigned line, HWND hwnd, LONG size, LONG expected_s res = SendMessageA(hwnd, EM_SETFONTSIZE, size, 0); SendMessageA(hwnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); isundo = SendMessageA(hwnd, EM_CANUNDO, 0, 0); - ok_(__FILE__,line)(res == expected_res, "EM_SETFONTSIZE unexpected return value: %lx.\n", res); - ok_(__FILE__,line)(twips2points(cf.yHeight) == expected_size, "got wrong font size: %d, expected: %d\n", + ok_(__FILE__,line)(res == expected_res, "EM_SETFONTSIZE unexpected return value: %Ix.\n", res); + ok_(__FILE__,line)(twips2points(cf.yHeight) == expected_size, "got wrong font size: %ld, expected: %ld\n", twips2points(cf.yHeight), expected_size); ok_(__FILE__,line)(isundo == expected_undo, "get wrong undo mark: %d, expected: %d.\n", isundo, expected_undo); @@ -8653,11 +8653,11 @@ static void test_alignment_style(void) pf.dwMask = -1;
SendMessageW(richedit, EM_GETPARAFORMAT, 0, (LPARAM)&pf); - ok(pf.wAlignment == align_mask[i], "(i = %d) got %d expected %d\n", + ok(pf.wAlignment == align_mask[i], "(i = %d) got %d expected %ld\n", i, pf.wAlignment, align_mask[i]); dwStyle = GetWindowLongW(richedit, GWL_STYLE); ok((i ? (dwStyle & align_style[i]) : (!(dwStyle & 0x0000000f))) , - "(i = %d) didn't set right align style: 0x%x\n", i, dwStyle); + "(i = %d) didn't set right align style: 0x%lx\n", i, dwStyle);
/* Based on test_reset_default_para_fmt() */ @@ -8670,13 +8670,13 @@ static void test_alignment_style(void) SendMessageW(richedit, EM_SETPARAFORMAT, 0, (LPARAM)&pf);
SendMessageW(richedit, EM_GETPARAFORMAT, 0, (LPARAM)&pf); - ok(pf.wAlignment == new_align, "got %d expect %d\n", pf.wAlignment, new_align); + ok(pf.wAlignment == new_align, "got %d expect %ld\n", pf.wAlignment, new_align);
SendMessageW(richedit, EM_SETSEL, 0, -1); SendMessageW(richedit, WM_CUT, 0, 0);
SendMessageW(richedit, EM_GETPARAFORMAT, 0, (LPARAM)&pf); - ok(pf.wAlignment == align_mask[i], "got %d expect %d\n", pf.wAlignment, align_mask[i]); + ok(pf.wAlignment == align_mask[i], "got %d expect %ld\n", pf.wAlignment, align_mask[i]);
DestroyWindow(richedit); } @@ -8749,17 +8749,17 @@ static void test_rtf(void) es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback; result = SendMessageA( edit, EM_STREAMIN, SF_RTF, (LPARAM)&es ); - ok( result == 11, "got %ld\n", result ); + ok( result == 11, "got %Id\n", result );
result = SendMessageW( edit, WM_GETTEXT, ARRAY_SIZE(buf), (LPARAM)buf ); - ok( result == ARRAY_SIZE(expect_specials), "got %ld\n", result ); + ok( result == ARRAY_SIZE(expect_specials), "got %Id\n", result ); ok( !memcmp( buf, expect_specials, sizeof(expect_specials) ), "got %s\n", wine_dbgstr_w(buf) );
/* Show that \rtlpar propagates to the second paragraph and is reset by \pard in the third. */ es.dwCookie = (DWORD_PTR)&pard; result = SendMessageA( edit, EM_STREAMIN, SF_RTF, (LPARAM)&es ); - ok( result == 11, "got %ld\n", result ); + ok( result == 11, "got %Id\n", result );
fmt.cbSize = sizeof(fmt); SendMessageW( edit, EM_SETSEL, 1, 1 ); @@ -8778,14 +8778,14 @@ static void test_rtf(void) /* Test \highlight */ es.dwCookie = (DWORD_PTR)&highlight; result = SendMessageA( edit, EM_STREAMIN, SF_RTF, (LPARAM)&es ); - ok( result == 3, "got %ld\n", result ); + ok( result == 3, "got %Id\n", result ); SendMessageW( edit, EM_SETSEL, 1, 1 ); memset( &cf, 0, sizeof(cf) ); cf.cbSize = sizeof(cf); SendMessageW( edit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf ); - ok( (cf.dwEffects & (CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR)) == 0, "got %08x\n", cf.dwEffects ); - ok( cf.crTextColor == RGB(128,128,128), "got %08x\n", cf.crTextColor ); - ok( cf.crBackColor == RGB(192,192,192), "got %08x\n", cf.crBackColor ); + ok( (cf.dwEffects & (CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR)) == 0, "got %08lx\n", cf.dwEffects ); + ok( cf.crTextColor == RGB(128,128,128), "got %08lx\n", cf.crTextColor ); + ok( cf.crBackColor == RGB(192,192,192), "got %08lx\n", cf.crBackColor );
DestroyWindow( edit ); } @@ -8826,13 +8826,13 @@ static void test_eop_char_fmt(void) cf.cbSize = sizeof(cf); cf.dwMask = CFM_SIZE; SendMessageW( edit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf ); - ok( cf.dwMask & CFM_SIZE, "%d: got %08x\n", i, cf.dwMask ); + ok( cf.dwMask & CFM_SIZE, "%d: got %08lx\n", i, cf.dwMask ); if (i < 6) expect_height = 160; else if (i < 13) expect_height = 250; else if (i < 18) expect_height = 260; else if (i == 18 || i == 25) expect_height = 250; else expect_height = 220; - ok( cf.yHeight == expect_height, "%d: got %d\n", i, cf.yHeight ); + ok( cf.yHeight == expect_height, "%d: got %ld\n", i, cf.yHeight ); }
DestroyWindow( edit ); @@ -8864,10 +8864,10 @@ static void test_para_numbering(void) es.dwError = 0; es.pfnCallback = test_EM_STREAMIN_esCallback; result = SendMessageA( edit, EM_STREAMIN, SF_RTF, (LPARAM)&es ); - ok( result == lstrlenW( expect_numbers_txt ), "got %ld\n", result ); + ok( result == lstrlenW( expect_numbers_txt ), "got %Id\n", result );
result = SendMessageW( edit, EM_GETTEXTEX, (WPARAM)&get_text, (LPARAM)buf ); - ok( result == lstrlenW( expect_numbers_txt ), "got %ld\n", result ); + ok( result == lstrlenW( expect_numbers_txt ), "got %Id\n", result ); ok( !lstrcmpW( buf, expect_numbers_txt ), "got %s\n", wine_dbgstr_w(buf) );
SendMessageW( edit, EM_SETSEL, 1, 1 ); @@ -8879,8 +8879,8 @@ static void test_para_numbering(void) ok( fmt.wNumberingStart == 2, "got %d\n", fmt.wNumberingStart ); ok( fmt.wNumberingStyle == PFNS_PERIOD, "got %04x\n", fmt.wNumberingStyle ); ok( fmt.wNumberingTab == 1000, "got %d\n", fmt.wNumberingTab ); - ok( fmt.dxStartIndent == 560, "got %d\n", fmt.dxStartIndent ); - ok( fmt.dxOffset == -200, "got %d\n", fmt.dxOffset ); + ok( fmt.dxStartIndent == 560, "got %ld\n", fmt.dxStartIndent ); + ok( fmt.dxOffset == -200, "got %ld\n", fmt.dxOffset );
/* Second para should have identical fmt */ SendMessageW( edit, EM_SETSEL, 10, 10 ); @@ -8895,13 +8895,13 @@ static void test_para_numbering(void) cf.cbSize = sizeof(cf); cf.dwMask = CFM_SIZE; SendMessageW( edit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf ); - ok( cf.yHeight == 200, "got %d\n", cf.yHeight ); + ok( cf.yHeight == 200, "got %ld\n", cf.yHeight );
SendMessageW( edit, EM_SETSEL, 18, 19 ); cf.cbSize = sizeof(cf); cf.dwMask = CFM_SIZE; SendMessageW( edit, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf ); - ok( cf.yHeight == 200, "got %d\n", cf.yHeight ); + ok( cf.yHeight == 200, "got %ld\n", cf.yHeight );
DestroyWindow( edit ); } @@ -8950,11 +8950,11 @@ static void test_EM_SELECTIONTYPE(void)
SendMessageA(hwnd, EM_SETSEL, 0, 1); hr = IRichEditOle_GetClientSite(reole, &clientsite); - ok(hr == S_OK, "IRichEditOle_GetClientSite failed: 0x%08x\n", hr); + ok(hr == S_OK, "IRichEditOle_GetClientSite failed: 0x%08lx\n", hr); fill_reobject_struct(&reo1, REO_CP_SELECTION, NULL, NULL, clientsite, 10, 10, DVASPECT_CONTENT, 0, 1); hr = IRichEditOle_InsertObject(reole, &reo1); - ok(hr == S_OK, "IRichEditOle_InsertObject failed: 0x%08x\n", hr); + ok(hr == S_OK, "IRichEditOle_InsertObject failed: 0x%08lx\n", hr); IOleClientSite_Release(clientsite);
SendMessageA(hwnd, EM_SETSEL, 0, 1); @@ -8971,11 +8971,11 @@ static void test_EM_SELECTIONTYPE(void)
SendMessageA(hwnd, EM_SETSEL, 2, 3); hr = IRichEditOle_GetClientSite(reole, &clientsite); - ok(hr == S_OK, "IRichEditOle_GetClientSite failed: 0x%08x\n", hr); + ok(hr == S_OK, "IRichEditOle_GetClientSite failed: 0x%08lx\n", hr); fill_reobject_struct(&reo2, REO_CP_SELECTION, NULL, NULL, clientsite, 10, 10, DVASPECT_CONTENT, 0, 2); hr = IRichEditOle_InsertObject(reole, &reo2); - ok(hr == S_OK, "IRichEditOle_InsertObject failed: 0x%08x\n", hr); + ok(hr == S_OK, "IRichEditOle_InsertObject failed: 0x%08lx\n", hr); IOleClientSite_Release(clientsite);
SendMessageA(hwnd, EM_SETSEL, 0, 2); @@ -9020,7 +9020,7 @@ static void test_window_classes(void) test[i].class, test[i].success ? "succeed" : "fail"); if (!hwnd) todo_wine - ok(GetLastError() == ERROR_CANNOT_FIND_WND_CLASS, "got %u\n", GetLastError()); + ok(GetLastError() == ERROR_CANNOT_FIND_WND_CLASS, "got %lu\n", GetLastError()); else DestroyWindow(hwnd); } diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index 8d8ba5b1e9d..08c1ce8ced4 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -45,7 +45,7 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); + ok_(__FILE__,line)(rc == ref, "expected refcount %ld, got %ld\n", ref, rc); }
static HWND new_window(LPCSTR lpClassName, DWORD dwStyle, HWND parent) @@ -123,14 +123,14 @@ static void _check_typeinfo(IDispatch* disp, REFIID expected_riid, int line)
count = 10; hr = IDispatch_GetTypeInfoCount(disp, &count); - ok_(__FILE__,line)(hr == S_OK, "IDispatch_GetTypeInfoCount failed: 0x%08x.\n", hr); + ok_(__FILE__,line)(hr == S_OK, "IDispatch_GetTypeInfoCount failed: 0x%08lx.\n", hr); ok_(__FILE__,line)(count == 1, "got wrong count: %u.\n", count);
hr = IDispatch_GetTypeInfo(disp, 0, LOCALE_SYSTEM_DEFAULT, &typeinfo); - ok_(__FILE__,line)(hr == S_OK, "IDispatch_GetTypeInfo failed: 0x%08x.\n", hr); + ok_(__FILE__,line)(hr == S_OK, "IDispatch_GetTypeInfo failed: 0x%08lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); - ok_(__FILE__,line)(hr == S_OK, "ITypeInfo_GetTypeAttr failed: 0x%08x.\n", hr); + ok_(__FILE__,line)(hr == S_OK, "ITypeInfo_GetTypeAttr failed: 0x%08lx.\n", hr); ok_(__FILE__,line)(IsEqualGUID(&typeattr->guid, expected_riid), "Unexpected type guid: %s.\n", wine_dbgstr_guid(&typeattr->guid));
@@ -174,17 +174,17 @@ static void test_Interfaces(void) CHECK_TYPEINFO(txtDoc, &IID_ITextDocument);
hres = ITextDocument_GetSelection(txtDoc, NULL); - ok(hres == E_INVALIDARG, "ITextDocument_GetSelection: 0x%x\n", hres); + ok(hres == E_INVALIDARG, "ITextDocument_GetSelection: 0x%lx\n", hres);
EXPECT_REF(txtDoc, 4);
hres = ITextDocument_GetSelection(txtDoc, &txtSel); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextDocument_QueryInterface(txtDoc, &IID_IUnknown, (void **)&unk); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextSelection_QueryInterface(txtSel, &IID_IUnknown, (void **)&unk2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(unk != unk2, "unknowns are the same\n"); IUnknown_Release(unk2); IUnknown_Release(unk); @@ -193,7 +193,7 @@ static void test_Interfaces(void) EXPECT_REF(txtSel, 2);
hres = ITextDocument_GetSelection(txtDoc, &txtSel2); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(txtSel2 == txtSel, "got %p, %p\n", txtSel, txtSel2);
EXPECT_REF(txtDoc, 4); @@ -244,7 +244,7 @@ static void test_Interfaces(void) ITextDocument_Release(txtDoc); IRichEditOle_Release(reOle); refcount = IRichEditOle_Release(reOle); - ok(refcount == 1, "got wrong ref count: %d\n", refcount); + ok(refcount == 1, "got wrong ref count: %ld\n", refcount); DestroyWindow(w);
/* Methods should return CO_E_RELEASED if the backing document has @@ -260,7 +260,7 @@ static void test_Interfaces(void) ok(reOle != NULL, "EM_GETOLEINTERFACE\n");
hres = IRichEditOle_QueryInterface(reOle, &IID_ITextDocument2Old, (void **)&txtDoc2Old); - ok(hres == S_OK, "IRichEditOle_QueryInterface failed: 0x%08x.\n", hres); + ok(hres == S_OK, "IRichEditOle_QueryInterface failed: 0x%08lx.\n", hres); ok(txtDoc2Old != NULL, "IRichEditOle_QueryInterface\n"); CHECK_TYPEINFO(txtDoc2Old, &IID_ITextDocument); ITextDocument2Old_Release(txtDoc2Old); @@ -318,7 +318,7 @@ static void test_ITextDocument_Open(void) touch_file(filename); create_interfaces(&w, &reOle, &txtDoc, &txtSel); hres = ITextDocument_Open(txtDoc, &testfile, tomConstantsSingle[i], CP_ACP); - todo_wine ok(hres == S_OK, "ITextDocument_Open: Filename:test.txt Flags:0x%x Codepage:CP_ACP hres:0x%x\n", + todo_wine ok(hres == S_OK, "ITextDocument_Open: Filename:test.txt Flags:0x%x Codepage:CP_ACP hres:0x%lx\n", tomConstantsSingle[i], hres); release_interfaces(&w, &reOle, &txtDoc, &txtSel); DeleteFileW(filename); @@ -326,7 +326,7 @@ static void test_ITextDocument_Open(void) touch_file(filename); create_interfaces(&w, &reOle, &txtDoc, &txtSel); hres = ITextDocument_Open(txtDoc, &testfile, tomConstantsSingle[i], CP_UTF8); - todo_wine ok(hres == S_OK, "ITextDocument_Open: Filename:test.txt Flags:0x%x Codepage:CP_UTF8 hres:0x%x\n", + todo_wine ok(hres == S_OK, "ITextDocument_Open: Filename:test.txt Flags:0x%x Codepage:CP_UTF8 hres:0x%lx\n", tomConstantsSingle[i], hres); release_interfaces(&w, &reOle, &txtDoc, &txtSel); DeleteFileW(filename); @@ -337,7 +337,7 @@ static void test_ITextDocument_Open(void) touch_file(filename); create_interfaces(&w, &reOle, &txtDoc, &txtSel); hres = ITextDocument_Open(txtDoc, &testfile, tomConstantsMulti[i], CP_ACP); - todo_wine ok(hres == S_OK, "ITextDocument_Open: Filename:test.txt Flags:0x%x Codepage:CP_ACP hres:0x%x\n", + todo_wine ok(hres == S_OK, "ITextDocument_Open: Filename:test.txt Flags:0x%x Codepage:CP_ACP hres:0x%lx\n", tomConstantsMulti[i], hres); release_interfaces(&w, &reOle, &txtDoc, &txtSel); DeleteFileW(filename); @@ -345,7 +345,7 @@ static void test_ITextDocument_Open(void) touch_file(filename); create_interfaces(&w, &reOle, &txtDoc, &txtSel); hres = ITextDocument_Open(txtDoc, &testfile, tomConstantsMulti[i], CP_UTF8); - todo_wine ok(hres == S_OK, "ITextDocument_Open: Filename:test.txt Flags:0x%x Codepage:CP_UTF8 hres:0x%x\n", + todo_wine ok(hres == S_OK, "ITextDocument_Open: Filename:test.txt Flags:0x%x Codepage:CP_UTF8 hres:0x%lx\n", tomConstantsMulti[i], hres); release_interfaces(&w, &reOle, &txtDoc, &txtSel); DeleteFileW(filename); @@ -421,7 +421,7 @@ static void test_ITextDocument_Open(void) DeleteFileW(filename); hres = ITextDocument_Open(txtDoc, &testfile, tomText, CP_ACP); todo_wine { - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(is_existing_file(filename) == TRUE, "a file should be created default\n"); } release_interfaces(&w, &reOle, &txtDoc, &txtSel); @@ -432,7 +432,7 @@ todo_wine { create_interfaces(&w, &reOle, &txtDoc, &txtSel); hres = ITextDocument_Open(txtDoc, &testfile, tomShareDenyRead, CP_ACP); todo_wine - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); SetLastError(0xdeadbeef); hFile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); @@ -445,7 +445,7 @@ todo_wine { create_interfaces(&w, &reOle, &txtDoc, &txtSel); hres = ITextDocument_Open(txtDoc, &testfile, tomShareDenyWrite, CP_ACP); todo_wine - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); SetLastError(0xdeadbeef); hFile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); @@ -459,7 +459,7 @@ todo_wine { SetLastError(0xdeadbeef); hres = ITextDocument_Open(txtDoc, &testfile, tomShareDenyWrite|tomShareDenyRead, CP_ACP); todo_wine - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hFile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); todo_wine ok(GetLastError() == ERROR_SHARING_VIOLATION, "ITextDocument_Open should fail\n"); @@ -475,7 +475,7 @@ todo_wine { create_interfaces(&w, &reOle, &txtDoc, &txtSel); hres = ITextDocument_Open(txtDoc, &testfile, tomReadOnly, CP_ACP); todo_wine - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); result = SendMessageA(w, WM_GETTEXT, 1024, (LPARAM)bufACP); todo_wine ok(result == 12, "ITextDocument_Open: Test ASCII returned %d, expected 12\n", result); result = strcmp(bufACP, chACP); @@ -490,7 +490,7 @@ todo_wine { create_interfaces(&w, &reOle, &txtDoc, &txtSel); hres = ITextDocument_Open(txtDoc, &testfile, tomReadOnly, CP_UTF8); todo_wine - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); result = SendMessageA(w, WM_GETTEXT, 1024, (LPARAM)bufACP); todo_wine ok(result == 15, "ITextDocument_Open: Test UTF-8 returned %d, expected 15\n", result); result = strcmp(bufACP, &chUTF8[3]); @@ -505,7 +505,7 @@ todo_wine { create_interfaces(&w, &reOle, &txtDoc, &txtSel); hres = ITextDocument_Open(txtDoc, &testfile, tomReadOnly, 1200); todo_wine - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); result = SendMessageW(w, WM_GETTEXT, 1024, (LPARAM)bufUnicode); todo_wine ok(result == 12, "ITextDocument_Open: Test UTF-16 returned %d, expected 12\n", result); result = lstrcmpW(bufUnicode, &chUTF16[1]); @@ -602,73 +602,73 @@ static void test_GetText(void)
/* ITextRange */ hres = ITextDocument_Range(txtDoc, 0, 4, &range); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_GetText(range, &bstr); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(!lstrcmpW(bstr, bufW1), "got wrong text: %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr); ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 4, 0, &range); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_GetText(range, &bstr); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(!lstrcmpW(bstr, bufW1), "got wrong text: %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr); ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 1, 1, &range); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_GetText(range, &bstr); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(!bstr, "got wrong text: %s\n", wine_dbgstr_w(bstr)); if (!is64bit) { hres = ITextRange_GetText(range, NULL); - ok(hres == E_INVALIDARG, "got 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "got 0x%08lx\n", hres); } ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 8, 12, &range); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_GetText(range, &bstr); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(!lstrcmpW(bstr, bufW3), "got wrong text: %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr); ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 8, 13, &range); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_GetText(range, &bstr); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(!lstrcmpW(bstr, bufW2), "got wrong text: %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr); ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 12, 13, &range); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_GetText(range, &bstr); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(!lstrcmpW(bstr, bufW5), "got wrong text: %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr); ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, 0, -1, &range); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_GetText(range, &bstr); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(!bstr, "got wrong text: %s\n", wine_dbgstr_w(bstr)); ITextRange_Release(range);
hres = ITextDocument_Range(txtDoc, -1, 9, &range); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_GetText(range, &bstr); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(!lstrcmpW(bstr, bufW6), "got wrong text: %s\n", wine_dbgstr_w(bstr));
SysFreeString(bstr); @@ -679,22 +679,22 @@ static void test_GetText(void) if (is64bit) { bstr = (void*)0xdeadbeef; hres = ITextSelection_GetText(txtSel, &bstr); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres); todo_wine ok(bstr == NULL, "got %p\n", bstr);
bstr = (void*)0xdeadbeef; hres = ITextRange_GetText(range, &bstr); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres); todo_wine ok(bstr == NULL, "got %p\n", bstr); } else { hres = ITextSelection_GetText(txtSel, NULL); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextRange_GetText(range, NULL); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres); }
ITextRange_Release(range); @@ -713,28 +713,28 @@ static void test_ITextDocument_Range(void)
create_interfaces(&w, &reOle, &txtDoc, NULL); hres = ITextDocument_Range(txtDoc, 0, 0, &txtRge); - ok(hres == S_OK, "ITextDocument_Range fails 0x%x.\n", hres); + ok(hres == S_OK, "ITextDocument_Range fails 0x%lx.\n", hres); EXPECT_REF(txtRge, 1);
hres = ITextDocument_Range(txtDoc, 0, 0, &range2); - ok(hres == S_OK, "ITextDocument_Range fails 0x%x.\n", hres); + ok(hres == S_OK, "ITextDocument_Range fails 0x%lx.\n", hres); ok(range2 != txtRge, "A new pointer should be returned\n"); ITextRange_Release(range2);
hres = ITextDocument_Range(txtDoc, 0, 0, NULL); - ok(hres == E_INVALIDARG, "ITextDocument_Range should fail 0x%x.\n", hres); + ok(hres == E_INVALIDARG, "ITextDocument_Range should fail 0x%lx.\n", hres);
SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1);
hres = ITextDocument_Range(txtDoc, 8, 30, &range2); - ok(hres == S_OK, "ITextDocument_Range fails 0x%x.\n", hres); + ok(hres == S_OK, "ITextDocument_Range fails 0x%lx.\n", hres); hres = ITextRange_GetStart(range2, &value); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(value == 8, "got %d\n", value); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(value == 8, "got %ld\n", value);
hres = ITextRange_GetEnd(range2, &value); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(value == 13, "got %d\n", value); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(value == 13, "got %ld\n", value); ITextRange_Release(range2);
release_interfaces(&w, &reOle, &txtDoc, NULL); @@ -758,11 +758,11 @@ static void test_ITextRange_GetChar(void) create_interfaces(&w, &reOle, &txtDoc, NULL); SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); pch = 0xdeadbeef; hres = ITextRange_GetChar(txtRge, &pch); ok(hres == S_OK, "ITextRange_GetChar\n"); - ok(pch == 'T', "got wrong char: %c\n", pch); + ok(pch == 'T', "got wrong char: %c\n", (char)pch); ITextRange_Release(txtRge); release_interfaces(&w, &reOle, &txtDoc, NULL);
@@ -770,11 +770,11 @@ static void test_ITextRange_GetChar(void) create_interfaces(&w, &reOle, &txtDoc, NULL); SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); pch = 0xdeadbeef; hres = ITextRange_GetChar(txtRge, &pch); ok(hres == S_OK, "ITextRange_GetChar\n"); - ok(pch == 'T', "got wrong char: %c\n", pch); + ok(pch == 'T', "got wrong char: %c\n", (char)pch); ITextRange_Release(txtRge); release_interfaces(&w, &reOle, &txtDoc, NULL);
@@ -782,11 +782,11 @@ static void test_ITextRange_GetChar(void) create_interfaces(&w, &reOle, &txtDoc, NULL); SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); pch = 0xdeadbeef; hres = ITextRange_GetChar(txtRge, &pch); ok(hres == S_OK, "ITextRange_GetChar\n"); - ok(pch == '\r', "got wrong char: %c\n", pch); + ok(pch == '\r', "got wrong char: %c\n", (char)pch); ITextRange_Release(txtRge); release_interfaces(&w, &reOle, &txtDoc, NULL);
@@ -794,11 +794,11 @@ static void test_ITextRange_GetChar(void) create_interfaces(&w, &reOle, &txtDoc, NULL); SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); pch = 0xdeadbeef; hres = ITextRange_GetChar(txtRge, &pch); ok(hres == S_OK, "ITextRange_GetChar\n"); - ok(pch == '\r', "got wrong char: %c\n", pch); + ok(pch == '\r', "got wrong char: %c\n", (char)pch); ITextRange_Release(txtRge); release_interfaces(&w, &reOle, &txtDoc, NULL);
@@ -806,17 +806,17 @@ static void test_ITextRange_GetChar(void) SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); first = 12; lim = 12; hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_GetChar(txtRge, NULL); ok(hres == E_INVALIDARG, "ITextRange_GetChar\n");
release_interfaces(&w, &reOle, &txtDoc, NULL);
hres = ITextRange_GetChar(txtRge, NULL); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextRange_GetChar(txtRge, &pch); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
ITextRange_Release(txtRge); } @@ -833,9 +833,9 @@ static void check_range(HWND w, ITextDocument* doc, int first, int lim, si.fMask = SIF_POS | SIF_RANGE;
hres = ITextDocument_Range(doc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_ScrollIntoView(txtRge, bStart); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); GetScrollInfo(w, SB_VERT, &si); if (expected_nonzero) { ok(si.nPos != 0, @@ -877,10 +877,10 @@ static void test_ITextRange_ScrollIntoView(void) check_range(w, txtDoc, 0, 20, tomEnd, 1);
hres = ITextDocument_Range(txtDoc, 0, 0, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); release_interfaces(&w, &reOle, &txtDoc, NULL); hres = ITextRange_ScrollIntoView(txtRge, tomStart); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres); ITextRange_Release(txtRge); }
@@ -903,28 +903,28 @@ static void test_ITextSelection_GetChar(void) pch = 0xdeadbeef; hres = ITextSelection_GetChar(txtSel, &pch); ok(hres == S_OK, "ITextSelection_GetChar\n"); - ok(pch == 'T', "got wrong char: %c\n", pch); + ok(pch == 'T', "got wrong char: %c\n", (char)pch);
first = 0; lim = 0; SendMessageA(w, EM_SETSEL, first, lim); pch = 0xdeadbeef; hres = ITextSelection_GetChar(txtSel, &pch); ok(hres == S_OK, "ITextSelection_GetChar\n"); - ok(pch == 'T', "got wrong char: %c\n", pch); + ok(pch == 'T', "got wrong char: %c\n", (char)pch);
first = 12; lim = 12; SendMessageA(w, EM_SETSEL, first, lim); pch = 0xdeadbeef; hres = ITextSelection_GetChar(txtSel, &pch); ok(hres == S_OK, "ITextSelection_GetChar\n"); - ok(pch == '\r', "got wrong char: %c\n", pch); + ok(pch == '\r', "got wrong char: %c\n", (char)pch);
first = 13; lim = 13; SendMessageA(w, EM_SETSEL, first, lim); pch = 0xdeadbeef; hres = ITextSelection_GetChar(txtSel, &pch); ok(hres == S_OK, "ITextSelection_GetChar\n"); - ok(pch == '\r', "got wrong char: %c\n", pch); + ok(pch == '\r', "got wrong char: %c\n", (char)pch);
hres = ITextSelection_GetChar(txtSel, NULL); ok(hres == E_INVALIDARG, "ITextSelection_GetChar\n"); @@ -932,10 +932,10 @@ static void test_ITextSelection_GetChar(void) release_interfaces(&w, &reOle, &txtDoc, NULL);
hres = ITextSelection_GetChar(txtSel, NULL); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextSelection_GetChar(txtSel, &pch); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
ITextSelection_Release(txtSel); } @@ -956,206 +956,206 @@ static void test_ITextRange_GetStart_GetEnd(void)
first = 1; lim = 6; hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); start = 0xdeadbeef; hres = ITextRange_GetStart(txtRge, &start); ok(hres == S_OK, "ITextRange_GetStart\n"); - ok(start == 1, "got wrong start value: %d\n", start); + ok(start == 1, "got wrong start value: %ld\n", start); end = 0xdeadbeef; hres = ITextRange_GetEnd(txtRge, &end); ok(hres == S_OK, "ITextRange_GetEnd\n"); - ok(end == 6, "got wrong end value: %d\n", end); + ok(end == 6, "got wrong end value: %ld\n", end); ITextRange_Release(txtRge);
first = 6; lim = 1; hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); start = 0xdeadbeef; hres = ITextRange_GetStart(txtRge, &start); ok(hres == S_OK, "ITextRange_GetStart\n"); - ok(start == 1, "got wrong start value: %d\n", start); + ok(start == 1, "got wrong start value: %ld\n", start); end = 0xdeadbeef; hres = ITextRange_GetEnd(txtRge, &end); ok(hres == S_OK, "ITextRange_GetEnd\n"); - ok(end == 6, "got wrong end value: %d\n", end); + ok(end == 6, "got wrong end value: %ld\n", end); ITextRange_Release(txtRge);
first = -1; lim = 13; hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); start = 0xdeadbeef; hres = ITextRange_GetStart(txtRge, &start); ok(hres == S_OK, "ITextRange_GetStart\n"); - ok(start == 0, "got wrong start value: %d\n", start); + ok(start == 0, "got wrong start value: %ld\n", start); end = 0xdeadbeef; hres = ITextRange_GetEnd(txtRge, &end); ok(hres == S_OK, "ITextRange_GetEnd\n"); - ok(end == 13, "got wrong end value: %d\n", end); + ok(end == 13, "got wrong end value: %ld\n", end); ITextRange_Release(txtRge);
first = 13; lim = 13; hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); start = 0xdeadbeef; hres = ITextRange_GetStart(txtRge, &start); ok(hres == S_OK, "ITextRange_GetStart\n"); - ok(start == 12, "got wrong start value: %d\n", start); + ok(start == 12, "got wrong start value: %ld\n", start); end = 0xdeadbeef; hres = ITextRange_GetEnd(txtRge, &end); ok(hres == S_OK, "ITextRange_GetEnd\n"); - ok(end == 12, "got wrong end value: %d\n", end); + ok(end == 12, "got wrong end value: %ld\n", end);
/* SetStart */ hres = ITextRange_SetStart(txtRge, 0); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* same value */ hres = ITextRange_SetStart(txtRge, 0); - ok(hres == S_FALSE, "got 0x%08x\n", hres); + ok(hres == S_FALSE, "got 0x%08lx\n", hres);
hres = ITextRange_SetStart(txtRge, 1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* negative resets to 0, return value is S_FALSE when position wasn't changed */ hres = ITextRange_SetStart(txtRge, -1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextRange_SetStart(txtRge, -1); - ok(hres == S_FALSE, "got 0x%08x\n", hres); + ok(hres == S_FALSE, "got 0x%08lx\n", hres);
hres = ITextRange_SetStart(txtRge, 0); - ok(hres == S_FALSE, "got 0x%08x\n", hres); + ok(hres == S_FALSE, "got 0x%08lx\n", hres);
start = -1; hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 0, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 0, "got %ld\n", start);
/* greater than initial end, but less than total char count */ hres = ITextRange_SetStart(txtRge, 1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextRange_SetEnd(txtRge, 3); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextRange_SetStart(txtRge, 10); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 10, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 10, "got %ld\n", start);
end = 0; hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 10, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 10, "got %ld\n", end);
/* more that total text length */ hres = ITextRange_SetStart(txtRge, 50); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 12, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 12, "got %ld\n", start);
end = 0; hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 12, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 12, "got %ld\n", end);
/* SetEnd */ hres = ITextRange_SetStart(txtRge, 0); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* same value */ hres = ITextRange_SetEnd(txtRge, 5); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextRange_SetEnd(txtRge, 5); - ok(hres == S_FALSE, "got 0x%08x\n", hres); + ok(hres == S_FALSE, "got 0x%08lx\n", hres);
/* negative resets to 0 */ hres = ITextRange_SetEnd(txtRge, -1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
end = -1; hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 0, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 0, "got %ld\n", end);
start = -1; hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 0, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 0, "got %ld\n", start);
/* greater than initial end, but less than total char count */ hres = ITextRange_SetStart(txtRge, 3); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextRange_SetEnd(txtRge, 1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 1, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 1, "got %ld\n", start);
end = 0; hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 1, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 1, "got %ld\n", end);
/* more than total count */ hres = ITextRange_SetEnd(txtRge, 50); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 1, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 1, "got %ld\n", start);
end = 0; hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 13, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 13, "got %ld\n", end);
/* zero */ hres = ITextRange_SetEnd(txtRge, 0); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 0, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 0, "got %ld\n", start);
end = 0; hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 0, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 0, "got %ld\n", end);
release_interfaces(&w, &reOle, &txtDoc, NULL);
/* detached range */ hres = ITextRange_SetStart(txtRge, 0); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextRange_SetEnd(txtRge, 3); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextRange_GetStart(txtRge, &start); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextRange_GetStart(txtRge, NULL); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextRange_GetEnd(txtRge, NULL); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
ITextRange_Release(txtRge); } @@ -1179,190 +1179,190 @@ static void test_ITextSelection_GetStart_GetEnd(void) start = 0xdeadbeef; hres = ITextSelection_GetStart(txtSel, &start); ok(hres == S_OK, "ITextSelection_GetStart\n"); - ok(start == 2, "got wrong start value: %d\n", start); + ok(start == 2, "got wrong start value: %ld\n", start); end = 0xdeadbeef; hres = ITextSelection_GetEnd(txtSel, &end); ok(hres == S_OK, "ITextSelection_GetEnd\n"); - ok(end == 5, "got wrong end value: %d\n", end); + ok(end == 5, "got wrong end value: %ld\n", end);
first = 5; lim = 2; SendMessageA(w, EM_SETSEL, first, lim); start = 0xdeadbeef; hres = ITextSelection_GetStart(txtSel, &start); ok(hres == S_OK, "ITextSelection_GetStart\n"); - ok(start == 2, "got wrong start value: %d\n", start); + ok(start == 2, "got wrong start value: %ld\n", start); end = 0xdeadbeef; hres = ITextSelection_GetEnd(txtSel, &end); ok(hres == S_OK, "ITextSelection_GetEnd\n"); - ok(end == 5, "got wrong end value: %d\n", end); + ok(end == 5, "got wrong end value: %ld\n", end);
first = 0; lim = -1; SendMessageA(w, EM_SETSEL, first, lim); start = 0xdeadbeef; hres = ITextSelection_GetStart(txtSel, &start); ok(hres == S_OK, "ITextSelection_GetStart\n"); - ok(start == 0, "got wrong start value: %d\n", start); + ok(start == 0, "got wrong start value: %ld\n", start); end = 0xdeadbeef; hres = ITextSelection_GetEnd(txtSel, &end); ok(hres == S_OK, "ITextSelection_GetEnd\n"); - ok(end == 13, "got wrong end value: %d\n", end); + ok(end == 13, "got wrong end value: %ld\n", end);
first = 13; lim = 13; SendMessageA(w, EM_SETSEL, first, lim); start = 0xdeadbeef; hres = ITextSelection_GetStart(txtSel, &start); ok(hres == S_OK, "ITextSelection_GetStart\n"); - ok(start == 12, "got wrong start value: %d\n", start); + ok(start == 12, "got wrong start value: %ld\n", start); end = 0xdeadbeef; hres = ITextSelection_GetEnd(txtSel, &end); ok(hres == S_OK, "ITextSelection_GetEnd\n"); - ok(end == 12, "got wrong end value: %d\n", end); + ok(end == 12, "got wrong end value: %ld\n", end);
/* SetStart/SetEnd */ hres = ITextSelection_SetStart(txtSel, 0); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* same value */ hres = ITextSelection_SetStart(txtSel, 0); - ok(hres == S_FALSE, "got 0x%08x\n", hres); + ok(hres == S_FALSE, "got 0x%08lx\n", hres);
hres = ITextSelection_SetStart(txtSel, 1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* negative resets to 0, return value is S_FALSE when position wasn't changed */ hres = ITextSelection_SetStart(txtSel, -1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextSelection_SetStart(txtSel, -1); - ok(hres == S_FALSE, "got 0x%08x\n", hres); + ok(hres == S_FALSE, "got 0x%08lx\n", hres);
hres = ITextSelection_SetStart(txtSel, 0); - ok(hres == S_FALSE, "got 0x%08x\n", hres); + ok(hres == S_FALSE, "got 0x%08lx\n", hres);
start = -1; hres = ITextSelection_GetStart(txtSel, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 0, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 0, "got %ld\n", start);
/* greater than initial end, but less than total char count */ hres = ITextSelection_SetStart(txtSel, 1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextSelection_SetEnd(txtSel, 3); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextSelection_SetStart(txtSel, 10); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextSelection_GetStart(txtSel, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 10, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 10, "got %ld\n", start);
end = 0; hres = ITextSelection_GetEnd(txtSel, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 10, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 10, "got %ld\n", end);
/* more that total text length */ hres = ITextSelection_SetStart(txtSel, 50); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextSelection_GetStart(txtSel, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 12, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 12, "got %ld\n", start);
end = 0; hres = ITextSelection_GetEnd(txtSel, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 12, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 12, "got %ld\n", end);
/* SetEnd */ hres = ITextSelection_SetStart(txtSel, 0); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* same value */ hres = ITextSelection_SetEnd(txtSel, 5); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextSelection_SetEnd(txtSel, 5); - ok(hres == S_FALSE, "got 0x%08x\n", hres); + ok(hres == S_FALSE, "got 0x%08lx\n", hres);
/* negative resets to 0 */ hres = ITextSelection_SetEnd(txtSel, -1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
end = -1; hres = ITextSelection_GetEnd(txtSel, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 0, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 0, "got %ld\n", end);
start = -1; hres = ITextSelection_GetStart(txtSel, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 0, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 0, "got %ld\n", start);
/* greater than initial end, but less than total char count */ hres = ITextSelection_SetStart(txtSel, 3); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = ITextSelection_SetEnd(txtSel, 1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextSelection_GetStart(txtSel, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 1, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 1, "got %ld\n", start);
end = 0; hres = ITextSelection_GetEnd(txtSel, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 1, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 1, "got %ld\n", end);
/* more than total count */ hres = ITextSelection_SetEnd(txtSel, 50); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextSelection_GetStart(txtSel, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 1, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 1, "got %ld\n", start);
end = 0; hres = ITextSelection_GetEnd(txtSel, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 13, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 13, "got %ld\n", end);
/* zero */ hres = ITextSelection_SetEnd(txtSel, 0); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
start = 0; hres = ITextSelection_GetStart(txtSel, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 0, "got %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 0, "got %ld\n", start);
end = 0; hres = ITextSelection_GetEnd(txtSel, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 0, "got %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 0, "got %ld\n", end);
release_interfaces(&w, &reOle, &txtDoc, NULL);
/* detached selection */ hres = ITextSelection_GetStart(txtSel, NULL); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextSelection_GetStart(txtSel, &start); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextSelection_GetEnd(txtSel, NULL); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextSelection_GetEnd(txtSel, &end); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
ITextSelection_Release(txtSel); } @@ -1382,17 +1382,17 @@ static void test_ITextRange_GetDuplicate(void) SendMessageA(w, WM_SETTEXT, 0, (LPARAM)test_text1); first = 0; lim = 4; hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "ITextDocument_Range fails 0x%x.\n", hres); + ok(hres == S_OK, "ITextDocument_Range fails 0x%lx.\n", hres);
hres = ITextRange_GetDuplicate(txtRge, &txtRgeDup); ok(hres == S_OK, "ITextRange_GetDuplicate\n"); ok(txtRgeDup != txtRge, "A new pointer should be returned\n"); hres = ITextRange_GetStart(txtRgeDup, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == first, "got wrong value: %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == first, "got wrong value: %ld\n", start); hres = ITextRange_GetEnd(txtRgeDup, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == lim, "got wrong value: %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == lim, "got wrong value: %ld\n", end);
ITextRange_Release(txtRgeDup);
@@ -1402,10 +1402,10 @@ static void test_ITextRange_GetDuplicate(void) release_interfaces(&w, &reOle, &txtDoc, NULL);
hres = ITextRange_GetDuplicate(txtRge, NULL); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextRange_GetDuplicate(txtRge, &txtRgeDup); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
ITextRange_Release(txtRge); } @@ -1425,98 +1425,98 @@ static void test_ITextRange_Collapse(void)
first = 4; lim = 8; hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_Collapse(txtRge, tomTrue); ok(hres == S_OK, "ITextRange_Collapse\n"); hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 4, "got wrong start value: %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 4, "got wrong start value: %ld\n", start); hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 4, "got wrong end value: %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 4, "got wrong end value: %ld\n", end); ITextRange_Release(txtRge);
hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_Collapse(txtRge, tomStart); ok(hres == S_OK, "ITextRange_Collapse\n"); hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 4, "got wrong start value: %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 4, "got wrong start value: %ld\n", start); hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 4, "got wrong end value: %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 4, "got wrong end value: %ld\n", end); ITextRange_Release(txtRge);
hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_Collapse(txtRge, tomFalse); ok(hres == S_OK, "ITextRange_Collapse\n"); hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 8, "got wrong start value: %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 8, "got wrong start value: %ld\n", start); hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 8, "got wrong end value: %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 8, "got wrong end value: %ld\n", end); ITextRange_Release(txtRge);
hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_Collapse(txtRge, tomEnd); ok(hres == S_OK, "ITextRange_Collapse\n"); hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 8, "got wrong start value: %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 8, "got wrong start value: %ld\n", start); hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 8, "got wrong end value: %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 8, "got wrong end value: %ld\n", end); ITextRange_Release(txtRge);
/* tomStart is the default */ hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_Collapse(txtRge, 256); ok(hres == S_OK, "ITextRange_Collapse\n"); hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 4, "got wrong start value: %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 4, "got wrong start value: %ld\n", start); hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 4, "got wrong end value: %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 4, "got wrong end value: %ld\n", end); ITextRange_Release(txtRge);
first = 6; lim = 6; hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_Collapse(txtRge, tomEnd); ok(hres == S_FALSE, "ITextRange_Collapse\n"); hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 6, "got wrong start value: %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 6, "got wrong start value: %ld\n", start); hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 6, "got wrong end value: %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 6, "got wrong end value: %ld\n", end); ITextRange_Release(txtRge);
first = 8; lim = 8; hres = ITextDocument_Range(txtDoc, first, lim, &txtRge); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); hres = ITextRange_Collapse(txtRge, tomStart); ok(hres == S_FALSE, "ITextRange_Collapse\n"); hres = ITextRange_GetStart(txtRge, &start); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(start == 8, "got wrong start value: %d\n", start); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(start == 8, "got wrong start value: %ld\n", start); hres = ITextRange_GetEnd(txtRge, &end); - ok(hres == S_OK, "got 0x%08x\n", hres); - ok(end == 8, "got wrong end value: %d\n", end); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(end == 8, "got wrong end value: %ld\n", end);
release_interfaces(&w, &reOle, &txtDoc, NULL);
hres = ITextRange_Collapse(txtRge, tomStart); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextRange_Collapse(txtRge, tomUndefined); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
ITextRange_Release(txtRge); } @@ -1539,61 +1539,61 @@ static void test_ITextSelection_Collapse(void) hres = ITextSelection_Collapse(txtSel, tomTrue); ok(hres == S_OK, "ITextSelection_Collapse\n"); SendMessageA(w, EM_GETSEL, (LPARAM)&start, (WPARAM)&end); - ok(start == 4, "got wrong start value: %d\n", start); - ok(end == 4, "got wrong end value: %d\n", end); + ok(start == 4, "got wrong start value: %ld\n", start); + ok(end == 4, "got wrong end value: %ld\n", end);
SendMessageA(w, EM_SETSEL, first, lim); hres = ITextSelection_Collapse(txtSel, tomStart); ok(hres == S_OK, "ITextSelection_Collapse\n"); SendMessageA(w, EM_GETSEL, (LPARAM)&start, (WPARAM)&end); - ok(start == 4, "got wrong start value: %d\n", start); - ok(end == 4, "got wrong end value: %d\n", end); + ok(start == 4, "got wrong start value: %ld\n", start); + ok(end == 4, "got wrong end value: %ld\n", end);
SendMessageA(w, EM_SETSEL, first, lim); hres = ITextSelection_Collapse(txtSel, tomFalse); ok(hres == S_OK, "ITextSelection_Collapse\n"); SendMessageA(w, EM_GETSEL, (LPARAM)&start, (WPARAM)&end); - ok(start == 8, "got wrong start value: %d\n", start); - ok(end == 8, "got wrong end value: %d\n", end); + ok(start == 8, "got wrong start value: %ld\n", start); + ok(end == 8, "got wrong end value: %ld\n", end);
SendMessageA(w, EM_SETSEL, first, lim); hres = ITextSelection_Collapse(txtSel, tomEnd); ok(hres == S_OK, "ITextSelection_Collapse\n"); SendMessageA(w, EM_GETSEL, (LPARAM)&start, (WPARAM)&end); - ok(start == 8, "got wrong start value: %d\n", start); - ok(end == 8, "got wrong end value: %d\n", end); + ok(start == 8, "got wrong start value: %ld\n", start); + ok(end == 8, "got wrong end value: %ld\n", end);
/* tomStart is the default */ SendMessageA(w, EM_SETSEL, first, lim); hres = ITextSelection_Collapse(txtSel, 256); ok(hres == S_OK, "ITextSelection_Collapse\n"); SendMessageA(w, EM_GETSEL, (LPARAM)&start, (WPARAM)&end); - ok(start == 4, "got wrong start value: %d\n", start); - ok(end == 4, "got wrong end value: %d\n", end); + ok(start == 4, "got wrong start value: %ld\n", start); + ok(end == 4, "got wrong end value: %ld\n", end);
first = 6; lim = 6; SendMessageA(w, EM_SETSEL, first, lim); hres = ITextSelection_Collapse(txtSel, tomEnd); ok(hres == S_FALSE, "ITextSelection_Collapse\n"); SendMessageA(w, EM_GETSEL, (LPARAM)&start, (WPARAM)&end); - ok(start == 6, "got wrong start value: %d\n", start); - ok(end == 6, "got wrong end value: %d\n", end); + ok(start == 6, "got wrong start value: %ld\n", start); + ok(end == 6, "got wrong end value: %ld\n", end);
first = 8; lim = 8; SendMessageA(w, EM_SETSEL, first, lim); hres = ITextSelection_Collapse(txtSel, tomStart); ok(hres == S_FALSE, "ITextSelection_Collapse\n"); SendMessageA(w, EM_GETSEL, (LPARAM)&start, (WPARAM)&end); - ok(start == 8, "got wrong start value: %d\n", start); - ok(end == 8, "got wrong end value: %d\n", end); + ok(start == 8, "got wrong start value: %ld\n", start); + ok(end == 8, "got wrong end value: %ld\n", end);
release_interfaces(&w, &reOle, &txtDoc, NULL);
hres = ITextSelection_Collapse(txtSel, tomStart); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
hres = ITextSelection_Collapse(txtSel, tomUndefined); - ok(hres == CO_E_RELEASED, "got 0x%08x\n", hres); + ok(hres == CO_E_RELEASED, "got 0x%08lx\n", hres);
ITextSelection_Release(txtSel); } @@ -1611,54 +1611,54 @@ static void test_GetClientSite(void)
create_interfaces(&w, &reOle, &txtDoc, NULL); hres = IRichEditOle_GetClientSite(reOle, &clientSite); - ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08lx\n", hres); EXPECT_REF(clientSite, 1);
hres = IOleClientSite_QueryInterface(clientSite, &IID_IRichEditOle, (void **)&reOle1); - ok(hres == E_NOINTERFACE, "IOleClientSite_QueryInterface: %x\n", hres); + ok(hres == E_NOINTERFACE, "IOleClientSite_QueryInterface: %lx\n", hres);
hres = IRichEditOle_GetClientSite(reOle, &clientSite1); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(clientSite != clientSite1, "got %p, %p\n", clientSite, clientSite1); IOleClientSite_Release(clientSite1);
hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleClientSite, (void **)&clientSite1); - ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08lx\n", hres); ok(clientSite == clientSite1, "Should not return a new pointer.\n"); EXPECT_REF(clientSite, 2);
/* IOleWindow interface */ hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleWindow, (void **)&oleWin); - ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08lx\n", hres); refcount1 = get_refcount((IUnknown *)clientSite); refcount2 = get_refcount((IUnknown *)oleWin); ok(refcount1 == refcount2, "got wrong ref count.\n");
hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleWindow, (void **)&oleWin1); - ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08lx\n", hres); ok(oleWin == oleWin1, "Should not return a new pointer.\n"); refcount1 = get_refcount((IUnknown *)clientSite); refcount2 = get_refcount((IUnknown *)oleWin); ok(refcount1 == refcount2, "got wrong ref count.\n");
hres = IOleWindow_QueryInterface(oleWin, &IID_IOleClientSite, (void **)&clientSite2); - ok(hres == S_OK, "IOleWindow_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IOleWindow_QueryInterface: 0x%08lx\n", hres); ok(clientSite2 == clientSite1, "got wrong pointer\n");
/* IOleInPlaceSite interface */ hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleInPlaceSite, (void **)&olePlace); - ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08lx\n", hres); refcount1 = get_refcount((IUnknown *)olePlace); refcount2 = get_refcount((IUnknown *)clientSite); ok(refcount1 == refcount2, "got wrong ref count.\n");
hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleInPlaceSite, (void **)&olePlace1); - ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08lx\n", hres); ok(olePlace == olePlace1, "Should not return a new pointer.\n"); IOleInPlaceSite_Release(olePlace1);
hres = IOleWindow_QueryInterface(oleWin, &IID_IOleInPlaceSite, (void **)&olePlace1); - ok(hres == S_OK, "IOleWindow_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IOleWindow_QueryInterface: 0x%08lx\n", hres); refcount1 = get_refcount((IUnknown *)olePlace1); refcount2 = get_refcount((IUnknown *)oleWin); ok(refcount1 == refcount2, "got wrong ref count.\n"); @@ -1685,16 +1685,16 @@ static void test_IOleWindow_GetWindow(void)
create_interfaces(&w, &reOle, &txtDoc, NULL); hres = IRichEditOle_GetClientSite(reOle, &clientSite); - ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08lx\n", hres);
hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleWindow, (void **)&oleWin); - ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08lx\n", hres); hres = IOleWindow_GetWindow(oleWin, &hwnd); - ok(hres == S_OK, "IOleClientSite_GetWindow: 0x%08x\n", hres); + ok(hres == S_OK, "IOleClientSite_GetWindow: 0x%08lx\n", hres); ok(w == hwnd, "got wrong pointer\n");
hres = IOleWindow_GetWindow(oleWin, NULL); - ok(hres == E_INVALIDARG, "IOleClientSite_GetWindow: 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "IOleClientSite_GetWindow: 0x%08lx\n", hres);
IOleWindow_Release(oleWin); IOleClientSite_Release(clientSite); @@ -1713,16 +1713,16 @@ static void test_IOleInPlaceSite_GetWindow(void)
create_interfaces(&w, &reOle, &txtDoc, NULL); hres = IRichEditOle_GetClientSite(reOle, &clientSite); - ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08lx\n", hres);
hres = IOleClientSite_QueryInterface(clientSite, &IID_IOleInPlaceSite, (void **)&olePlace); - ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IOleClientSite_QueryInterface: 0x%08lx\n", hres); hres = IOleInPlaceSite_GetWindow(olePlace, &hwnd); - ok(hres == S_OK, "IOleInPlaceSite_GetWindow: 0x%08x\n", hres); + ok(hres == S_OK, "IOleInPlaceSite_GetWindow: 0x%08lx\n", hres); ok(w == hwnd, "got wrong pointer.\n");
hres = IOleInPlaceSite_GetWindow(olePlace, NULL); - ok(hres == E_INVALIDARG, "IOleInPlaceSite_GetWindow: 0x%08x\n", hres); + ok(hres == E_INVALIDARG, "IOleInPlaceSite_GetWindow: 0x%08lx\n", hres);
IOleInPlaceSite_Release(olePlace); IOleClientSite_Release(clientSite); @@ -1748,11 +1748,11 @@ static void test_GetFont(void) SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1);
hr = ITextDocument_GetSelection(doc, &selection); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = ITextSelection_GetFont(selection, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = ITextSelection_GetFont(selection, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(font != font2, "got %p, %p\n", font, font2); ITextFont_Release(font2); ITextFont_Release(font); @@ -1762,17 +1762,17 @@ static void test_GetFont(void) EXPECT_REF(doc, 3);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(reOle, 3); EXPECT_REF(doc, 3); EXPECT_REF(range, 1);
hr = ITextRange_GetFont(range, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextRange_GetFont(range, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(reOle, 3); EXPECT_REF(doc, 3); @@ -1780,7 +1780,7 @@ static void test_GetFont(void) EXPECT_REF(font, 1);
hr = ITextRange_GetFont(range, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(font != font2, "got %p, %p\n", font, font2);
EXPECT_REF(reOle, 3); @@ -1793,27 +1793,27 @@ static void test_GetFont(void)
/* set different font style within a range */ hr = ITextFont_GetItalic(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetSize(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
size = 0.0; hr = ITextFont_GetSize(font, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(size > 0.0, "size %.2f\n", size);
value = 0; hr = ITextFont_GetLanguageID(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == GetSystemDefaultLCID(), "got lcid %x, user lcid %x\n", value, + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == GetSystemDefaultLCID(), "got lcid %lx, user lcid %lx\n", value, GetSystemDefaultLCID());
/* range is non-italic */ value = tomTrue; hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
cf.cbSize = sizeof(CHARFORMAT2A); cf.dwMask = CFM_ITALIC|CFM_SIZE; @@ -1827,22 +1827,22 @@ static void test_GetFont(void) /* now range is partially italicized */ value = tomFalse; hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
size = 0.0; hr = ITextFont_GetSize(font, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(size == tomUndefined, "size %.2f\n", size);
ITextFont_Release(font); release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextRange_GetFont(range, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextRange_GetFont(range, &font2); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
ITextRange_Release(range); } @@ -1865,17 +1865,17 @@ static void test_GetPara(void) EXPECT_REF(doc, 3);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(reOle, 3); EXPECT_REF(doc, 3); EXPECT_REF(range, 1);
hr = ITextRange_GetPara(range, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextRange_GetPara(range, ¶); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(reOle, 3); EXPECT_REF(doc, 3); @@ -1883,7 +1883,7 @@ static void test_GetPara(void) EXPECT_REF(para, 1);
hr = ITextRange_GetPara(range, ¶2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(para != para2, "got %p, %p\n", para, para2);
EXPECT_REF(reOle, 3); @@ -1900,7 +1900,7 @@ static void test_GetPara(void) EXPECT_REF(selection, 2);
hr = ITextSelection_GetPara(selection, ¶); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(reOle, 3); EXPECT_REF(doc, 3); @@ -1908,7 +1908,7 @@ static void test_GetPara(void) EXPECT_REF(para, 1);
hr = ITextSelection_GetPara(selection, ¶2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(para != para2, "got %p, %p\n", para, para2);
ITextPara_Release(para); @@ -1916,16 +1916,16 @@ static void test_GetPara(void) release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextRange_GetPara(range, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextRange_GetPara(range, ¶); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextSelection_GetPara(selection, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextSelection_GetPara(selection, ¶); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
ITextSelection_Release(selection); ITextRange_Release(range); @@ -1948,32 +1948,32 @@ static void test_dispatch(void)
range = NULL; hr = ITextDocument_Range(doc, 0, 0, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(range != NULL, "got %p\n", range);
dispid = 123; nameW = (WCHAR*)testnameW; hr = ITextRange_GetIDsOfNames(range, &IID_NULL, &nameW, 1, LOCALE_USER_DEFAULT, &dispid); - ok(hr == DISP_E_UNKNOWNNAME, "got 0x%08x\n", hr); - ok(dispid == DISPID_UNKNOWN, "got %d\n", dispid); + ok(hr == DISP_E_UNKNOWNNAME, "got 0x%08lx\n", hr); + ok(dispid == DISPID_UNKNOWN, "got %ld\n", dispid);
dispid = 123; nameW = (WCHAR*)testname2W; hr = ITextRange_GetIDsOfNames(range, &IID_NULL, &nameW, 1, LOCALE_USER_DEFAULT, &dispid); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dispid == DISPID_VALUE, "got %d\n", dispid); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dispid == DISPID_VALUE, "got %ld\n", dispid);
release_interfaces(&hwnd, &reOle, &doc, NULL);
/* try dispatch methods on detached range */ hr = ITextRange_GetTypeInfoCount(range, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
dispid = 123; nameW = (WCHAR*)testname2W; hr = ITextRange_GetIDsOfNames(range, &IID_NULL, &nameW, 1, LOCALE_USER_DEFAULT, &dispid); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(dispid == DISPID_VALUE, "got %d\n", dispid); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(dispid == DISPID_VALUE, "got %ld\n", dispid);
ITextRange_Release(range); } @@ -1986,64 +1986,64 @@ static void test_detached_font_getters(ITextFont *font, BOOL duplicate) BSTR str;
hr = ITextFont_GetBold(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetBold(font, &value); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr);
hr = ITextFont_GetForeColor(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetForeColor(font, &value); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr);
hr = ITextFont_GetItalic(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetItalic(font, &value); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr);
hr = ITextFont_GetLanguageID(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetLanguageID(font, &value); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr);
hr = ITextFont_GetName(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetName(font, &str); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr);
hr = ITextFont_GetSize(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetSize(font, &size); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr);
hr = ITextFont_GetStrikeThrough(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetStrikeThrough(font, &value); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr);
hr = ITextFont_GetSubscript(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetSubscript(font, &value); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr);
hr = ITextFont_GetSuperscript(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetSuperscript(font, &value); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr);
hr = ITextFont_GetUnderline(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetUnderline(font, &value); - ok(hr == hrexp, "got 0x%08x\n", hr); + ok(hr == hrexp, "got 0x%08lx\n", hr); }
static void test_textfont_global_defaults(ITextFont *font) @@ -2055,124 +2055,124 @@ static void test_textfont_global_defaults(ITextFont *font)
value = tomUndefined; hr = ITextFont_GetAllCaps(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetAnimation(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetBackColor(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomAutoColor, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomAutoColor, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetBold(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse || value == tomTrue, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse || value == tomTrue, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetEmboss(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetForeColor(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomAutoColor, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomAutoColor, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetHidden(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetEngrave(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
valuef = 1.0; hr = ITextFont_GetKerning(font, &valuef); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(valuef == 0.0, "got %.2f\n", valuef);
value = tomUndefined; hr = ITextFont_GetLanguageID(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == GetSystemDefaultLCID(), "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == GetSystemDefaultLCID(), "got %ld\n", value);
str = NULL; hr = ITextFont_GetName(font, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(sysW, str), "%s\n", wine_dbgstr_w(str)); SysFreeString(str);
value = tomUndefined; hr = ITextFont_GetOutline(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
valuef = 1.0; hr = ITextFont_GetPosition(font, &valuef); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(valuef == 0.0, "got %.2f\n", valuef);
value = tomUndefined; hr = ITextFont_GetProtected(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetShadow(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
valuef = 0.0; hr = ITextFont_GetSize(font, &valuef); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(valuef >= 0.0, "got %.2f\n", valuef);
value = tomUndefined; hr = ITextFont_GetSmallCaps(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
valuef = 1.0; hr = ITextFont_GetSpacing(font, &valuef); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(valuef == 0.0, "got %.2f\n", valuef);
value = tomUndefined; hr = ITextFont_GetStrikeThrough(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetSubscript(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetSuperscript(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetUnderline(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomUndefined; hr = ITextFont_GetWeight(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == FW_NORMAL || value == FW_BOLD, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == FW_NORMAL || value == FW_BOLD, "got %ld\n", value); }
static void test_textfont_undefined(ITextFont *font) @@ -2183,118 +2183,118 @@ static void test_textfont_undefined(ITextFont *font)
value = tomFalse; hr = ITextFont_GetAllCaps(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetAnimation(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetBackColor(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetBold(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetEmboss(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetForeColor(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetHidden(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetEngrave(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
valuef = 0.0; hr = ITextFont_GetKerning(font, &valuef); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(valuef == tomUndefined, "got %.2f\n", valuef);
value = tomFalse; hr = ITextFont_GetLanguageID(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetOutline(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
valuef = 0.0; hr = ITextFont_GetPosition(font, &valuef); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(valuef == tomUndefined, "got %.2f\n", valuef);
value = tomFalse; hr = ITextFont_GetProtected(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetShadow(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
valuef = 0.0; hr = ITextFont_GetSize(font, &valuef); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(valuef == tomUndefined, "got %.2f\n", valuef);
value = tomFalse; hr = ITextFont_GetSmallCaps(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
valuef = 0.0; hr = ITextFont_GetSpacing(font, &valuef); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(valuef == tomUndefined, "got %.2f\n", valuef);
value = tomFalse; hr = ITextFont_GetStrikeThrough(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetSubscript(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetSuperscript(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetUnderline(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value);
value = tomFalse; hr = ITextFont_GetWeight(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUndefined, "got %ld\n", value); }
static inline FLOAT twips_to_points(LONG value) @@ -2322,39 +2322,39 @@ static void test_ITextFont(void) SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1);
hr = ITextDocument_Range(doc, 0, 10, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_GetFont(range, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_Reset(font, tomUseTwips); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_Reset(font, tomUsePoints); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetName(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* default font size unit is point */ size = 0.0; hr = ITextFont_GetSize(font, &size); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* set to some non-zero values */ hr = ITextFont_SetPosition(font, 20.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_SetKerning(font, 10.0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
position = 0.0; hr = ITextFont_GetPosition(font, &position); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
kerning = 0.0; hr = ITextFont_GetKerning(font, &kerning); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
memset(&cf, 0, sizeof(cf)); cf.cbSize = sizeof(cf); @@ -2364,31 +2364,31 @@ static void test_ITextFont(void) SendMessageA(hwnd, EM_SETSEL, 0, 10); ret = SendMessageA(hwnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); ok(ret, "got %d\n", ret); - ok(size == twips_to_points(cf.yHeight), "got yHeight %d, size %.2f\n", cf.yHeight, size); - ok(position == twips_to_points(cf.yOffset), "got yOffset %d, position %.2f\n", cf.yOffset, position); + ok(size == twips_to_points(cf.yHeight), "got yHeight %ld, size %.2f\n", cf.yHeight, size); + ok(position == twips_to_points(cf.yOffset), "got yOffset %ld, position %.2f\n", cf.yOffset, position); ok(kerning == twips_to_points(cf.wKerning), "got wKerning %d, kerning %.2f\n", cf.wKerning, kerning);
hr = ITextFont_Reset(font, tomUseTwips); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_Reset(font, tomUsePoints); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_GetDuplicate(font, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_Reset(font2, tomUseTwips); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextFont_Reset(font2, tomUsePoints); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
ITextFont_Release(font2);
/* default font name */ str = NULL; hr = ITextFont_GetName(font, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, sysW), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str);
@@ -2405,7 +2405,7 @@ static void test_ITextFont(void) /* still original name */ str = NULL; hr = ITextFont_GetName(font, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, sysW), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str);
@@ -2415,7 +2415,7 @@ static void test_ITextFont(void)
str = NULL; hr = ITextFont_GetName(font, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, sysW), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str);
@@ -2426,18 +2426,18 @@ static void test_ITextFont(void)
str = NULL; hr = ITextFont_GetName(font, &str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(!lstrcmpW(str, arialW), "got %s\n", wine_dbgstr_w(str)); SysFreeString(str);
/* GetDuplicate() */ hr = ITextFont_GetDuplicate(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
EXPECT_REF(range, 2); font2 = NULL; hr = ITextFont_GetDuplicate(font, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(range, 2);
/* set whole range to italic */ @@ -2451,75 +2451,75 @@ static void test_ITextFont(void)
value = tomFalse; hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomTrue, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomTrue, "got %ld\n", value);
/* duplicate retains original value */ value = tomTrue; hr = ITextFont_GetItalic(font2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
/* get a duplicate from a cloned font */ hr = ITextFont_GetDuplicate(font2, &font3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ITextFont_Release(font3);
ITextRange_Release(range); release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextFont_GetDuplicate(font, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
test_detached_font_getters(font, FALSE); test_detached_font_getters(font2, TRUE);
/* get a duplicate of detached font */ hr = ITextFont_GetDuplicate(font2, &font3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ITextFont_Release(font3);
/* reset detached font to undefined */ value = tomUndefined; hr = ITextFont_GetBold(font2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value != tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value != tomUndefined, "got %ld\n", value);
/* reset to undefined for detached font */ hr = ITextFont_Reset(font2, tomUndefined); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); test_textfont_undefined(font2);
/* font is detached, default means global TOM defaults */ hr = ITextFont_Reset(font2, tomDefault); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); test_textfont_global_defaults(font2);
hr = ITextFont_GetDuplicate(font2, &font3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); test_textfont_global_defaults(font2);
hr = ITextFont_Reset(font2, tomApplyNow); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); test_textfont_global_defaults(font2);
hr = ITextFont_Reset(font2, tomApplyLater); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); test_textfont_global_defaults(font2);
hr = ITextFont_Reset(font2, tomTrackParms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); test_textfont_global_defaults(font2);
hr = ITextFont_SetItalic(font2, tomUndefined); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_GetItalic(font2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextFont_Reset(font2, tomCacheParms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); test_textfont_global_defaults(font2);
ITextFont_Release(font3); @@ -2527,11 +2527,11 @@ static void test_ITextFont(void)
font2 = (void*)0xdeadbeef; hr = ITextFont_GetDuplicate(font, &font2); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); ok(font2 == NULL, "got %p\n", font2);
hr = ITextFont_Reset(font, tomDefault); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
ITextFont_Release(font);
@@ -2540,32 +2540,32 @@ static void test_ITextFont(void) SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1);
hr = ITextDocument_Range(doc, 0, 10, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_GetFont(range, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = tomUndefined; hr = ITextFont_GetBold(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value != tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value != tomUndefined, "got %ld\n", value);
/* reset to undefined for attached font */ hr = ITextFont_Reset(font, tomUndefined); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
value = tomUndefined; hr = ITextFont_GetBold(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value != tomUndefined, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value != tomUndefined, "got %ld\n", value);
/* tomCacheParms/tomTrackParms */ hr = ITextFont_Reset(font, tomCacheParms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
memset(&cf, 0, sizeof(cf)); cf.cbSize = sizeof(CHARFORMAT2A); @@ -2578,65 +2578,65 @@ static void test_ITextFont(void)
/* still cached value */ hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextFont_Reset(font, tomTrackParms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomTrue, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomTrue, "got %ld\n", value);
/* switch back to cache - value retained */ hr = ITextFont_Reset(font, tomCacheParms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomTrue, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomTrue, "got %ld\n", value);
/* tomApplyLater */ hr = ITextFont_Reset(font, tomApplyLater); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_SetItalic(font, tomFalse); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
cf.dwEffects = 0; SendMessageA(hwnd, EM_SETSEL, 0, 10); ret = SendMessageA(hwnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); ok(ret, "got %d\n", ret); - ok((cf.dwEffects & CFE_ITALIC) == CFE_ITALIC, "got 0x%08x\n", cf.dwEffects); + ok((cf.dwEffects & CFE_ITALIC) == CFE_ITALIC, "got 0x%08lx\n", cf.dwEffects);
hr = ITextFont_Reset(font, tomApplyNow); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
cf.dwEffects = 0; SendMessageA(hwnd, EM_SETSEL, 0, 10); ret = SendMessageA(hwnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); ok(ret, "got %d\n", ret); - ok((cf.dwEffects & CFE_ITALIC) == 0, "got 0x%08x\n", cf.dwEffects); + ok((cf.dwEffects & CFE_ITALIC) == 0, "got 0x%08lx\n", cf.dwEffects);
hr = ITextFont_SetItalic(font, tomUndefined); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextFont_SetItalic(font, tomAutoColor); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
cf.dwEffects = 0; SendMessageA(hwnd, EM_SETSEL, 0, 10); ret = SendMessageA(hwnd, EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); ok(ret, "got %d\n", ret); - ok((cf.dwEffects & CFE_ITALIC) == 0, "got 0x%08x\n", cf.dwEffects); + ok((cf.dwEffects & CFE_ITALIC) == 0, "got 0x%08lx\n", cf.dwEffects);
ITextRange_Release(range); ITextFont_Release(font); @@ -2657,41 +2657,41 @@ static void test_Delete(void) SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextDocument_Range(doc, 1, 2, &range2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_GetEnd(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 4, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 4, "got %ld\n", value);
/* unit type doesn't matter is count is 0 */ value = 0; hr = ITextRange_Delete(range2, tomSentence, 0, &value); todo_wine { - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 1, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 1, "got %ld\n", value); } value = 1; hr = ITextRange_Delete(range2, tomCharacter, 0, &value); todo_wine { - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == 0, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == 0, "got %ld\n", value); } hr = ITextRange_GetEnd(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine - ok(value == 3, "got %d\n", value); + ok(value == 3, "got %ld\n", value);
hr = ITextRange_GetStart(range2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 1, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 1, "got %ld\n", value);
hr = ITextRange_GetEnd(range2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); todo_wine - ok(value == 1, "got %d\n", value); + ok(value == 1, "got %ld\n", value);
ITextRange_Release(range); ITextRange_Release(range2); @@ -2714,72 +2714,72 @@ static void test_SetText(void) SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextDocument_Range(doc, 0, 4, &range2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = 1; hr = ITextRange_GetStart(range2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 0, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 0, "got %ld\n", value);
value = 0; hr = ITextRange_GetEnd(range2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 4, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 4, "got %ld\n", value);
hr = ITextRange_SetText(range, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = 1; hr = ITextRange_GetEnd(range2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 0, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 0, "got %ld\n", value);
str = SysAllocString(textW); hr = ITextRange_SetText(range, str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SysFreeString(str);
value = 1; hr = ITextRange_GetStart(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 0, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 0, "got %ld\n", value);
value = 0; hr = ITextRange_GetEnd(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 9, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 9, "got %ld\n", value);
value = 1; hr = ITextRange_GetStart(range2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 0, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 0, "got %ld\n", value);
value = 0; hr = ITextRange_GetEnd(range2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 0, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 0, "got %ld\n", value);
str = SysAllocStringLen(NULL, 0); hr = ITextRange_SetText(range, str); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); value = 1; hr = ITextRange_GetEnd(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 0, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 0, "got %ld\n", value); SysFreeString(str);
ITextRange_Release(range2); release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextRange_SetText(range, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
str = SysAllocStringLen(NULL, 0); hr = ITextRange_SetText(range, str); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); SysFreeString(str);
ITextRange_Release(range); @@ -2801,93 +2801,93 @@ static void test_InRange(void) SendMessageA(hwnd, EM_SETSEL, 1, 2);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextDocument_Range(doc, 0, 4, &range2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* matches selection */ hr = ITextDocument_Range(doc, 1, 2, &range3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_InRange(range, NULL, NULL); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextRange_InRange(range, NULL, &value); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextRange_InRange(range, range2, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = tomFalse; hr = ITextRange_InRange(range, range2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomTrue, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomTrue, "got %ld\n", value);
/* selection */ hr = ITextSelection_InRange(selection, NULL, NULL); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextSelection_InRange(selection, NULL, &value); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextSelection_InRange(selection, range2, NULL); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextSelection_InRange(selection, range2, &value); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomTrue; hr = ITextSelection_InRange(selection, range3, &value); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
/* seems to work on ITextSelection ranges only */ value = tomFalse; hr = ITextSelection_InRange(selection, (ITextRange*)selection, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomTrue, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomTrue, "got %ld\n", value);
release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextRange_InRange(range, NULL, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextRange_InRange(range, NULL, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextRange_InRange(range, range2, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextRange_InRange(range, range2, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
/* selection */ hr = ITextSelection_InRange(selection, NULL, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextSelection_InRange(selection, NULL, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextSelection_InRange(selection, range2, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextSelection_InRange(selection, range2, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
ITextRange_Release(range); ITextRange_Release(range2); @@ -2911,98 +2911,98 @@ static void test_ITextRange_IsEqual(void) SendMessageA(hwnd, EM_SETSEL, 1, 2);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextDocument_Range(doc, 0, 4, &range2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* matches selection */ hr = ITextDocument_Range(doc, 1, 2, &range3); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_IsEqual(range, NULL, NULL); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextRange_IsEqual(range, NULL, &value); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextRange_IsEqual(range, range2, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = tomFalse; hr = ITextRange_IsEqual(range, range2, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomTrue, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomTrue, "got %ld\n", value);
value = tomTrue; hr = ITextRange_IsEqual(range, range3, &value); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
/* selection */ hr = ITextSelection_IsEqual(selection, NULL, NULL); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextSelection_IsEqual(selection, NULL, &value); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextSelection_IsEqual(selection, range2, NULL); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextSelection_IsEqual(selection, range2, &value); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
value = tomTrue; hr = ITextSelection_IsEqual(selection, range3, &value); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
/* seems to work on ITextSelection ranges only */ value = tomFalse; hr = ITextSelection_IsEqual(selection, (ITextRange*)selection, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomTrue, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomTrue, "got %ld\n", value);
release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextRange_IsEqual(range, NULL, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextRange_IsEqual(range, NULL, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextRange_IsEqual(range, range2, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextRange_IsEqual(range, range2, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
/* selection */ hr = ITextSelection_IsEqual(selection, NULL, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextSelection_IsEqual(selection, NULL, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
hr = ITextSelection_IsEqual(selection, range2, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = tomTrue; hr = ITextSelection_IsEqual(selection, range2, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
ITextRange_Release(range); ITextRange_Release(range2); @@ -3026,29 +3026,29 @@ static void test_Select(void) SendMessageA(hwnd, EM_SETSEL, 1, 2);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_Select(range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = 1; hr = ITextSelection_GetStart(selection, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 0, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 0, "got %ld\n", value);
hr = ITextRange_Select(range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextSelection_Select(selection); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextRange_Select(range); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextSelection_Select(selection); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
ITextRange_Release(range); ITextSelection_Release(selection); @@ -3070,41 +3070,41 @@ static void test_GetStoryType(void) SendMessageA(hwnd, EM_SETSEL, 1, 2);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_GetStoryType(range, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
value = tomTextFrameStory; hr = ITextRange_GetStoryType(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUnknownStory, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUnknownStory, "got %ld\n", value);
hr = ITextSelection_GetStoryType(selection, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
value = tomTextFrameStory; hr = ITextSelection_GetStoryType(selection, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomUnknownStory, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomUnknownStory, "got %ld\n", value);
release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextRange_GetStoryType(range, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = 123; hr = ITextRange_GetStoryType(range, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == 123, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == 123, "got %ld\n", value);
hr = ITextSelection_GetStoryType(selection, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = 123; hr = ITextSelection_GetStoryType(selection, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == 123, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == 123, "got %ld\n", value);
ITextRange_Release(range); ITextSelection_Release(selection); @@ -3127,68 +3127,68 @@ static void test_SetFont(void) SendMessageA(hwnd, EM_SETSEL, 1, 2);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextDocument_Range(doc, 5, 2, &range2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
EXPECT_REF(range, 1); hr = ITextRange_GetFont(range, &font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(range, 2);
EXPECT_REF(range2, 1); hr = ITextRange_GetFont(range2, &font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(range2, 2);
hr = ITextRange_SetFont(range, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* setting same font, no-op */ EXPECT_REF(range, 2); hr = ITextRange_SetFont(range, font); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(range, 2);
EXPECT_REF(range2, 2); EXPECT_REF(range, 2); hr = ITextRange_SetFont(range, font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); EXPECT_REF(range2, 2); EXPECT_REF(range, 2);
/* originally range 0-4 is non-italic */ value = tomTrue; hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomFalse, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomFalse, "got %ld\n", value);
/* set range 5-2 to italic, then set this font to range 0-4 */ hr = ITextFont_SetItalic(font2, tomTrue); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_SetFont(range, font2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
value = tomFalse; hr = ITextFont_GetItalic(font, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == tomTrue, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == tomTrue, "got %ld\n", value);
release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextRange_SetFont(range, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextRange_SetFont(range, font); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextSelection_SetFont(selection, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = ITextSelection_SetFont(selection, font); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
ITextFont_Release(font); ITextFont_Release(font2); @@ -3225,7 +3225,7 @@ static void _check_reobject_struct(IRichEditOle *reole, LONG index, DWORD flags, reobj.cbStruct = sizeof(reobj); reobj.cp = cp; hr = IRichEditOle_GetObject(reole, index, &reobj, flags); - ok(hr == S_OK, "IRichEditOle_GetObject failed: %#x.\n", hr); + ok(hr == S_OK, "IRichEditOle_GetObject failed: %#lx.\n", hr); ok_(__FILE__,line)(reobj.poleobj == poleobj, "got wrong object interface.\n"); ok_(__FILE__,line)(reobj.pstg == pstg, "got wrong storage interface.\n"); ok_(__FILE__,line)(reobj.polesite == polesite, "got wrong site interface.\n"); @@ -3239,10 +3239,10 @@ static void _insert_reobject(IRichEditOle *reole, REOBJECT *reobj, LONG cp, DWOR IOleClientSite *clientsite; HRESULT hr; hr = IRichEditOle_GetClientSite(reole, &clientsite); - ok_(__FILE__,line)(hr == S_OK, "IRichEditOle_GetClientSite got hr %#x.\n", hr); + ok_(__FILE__,line)(hr == S_OK, "IRichEditOle_GetClientSite got hr %#lx.\n", hr); fill_reobject_struct(reobj, cp, NULL, NULL, clientsite, 10, 10, DVASPECT_CONTENT, 0, user); hr = IRichEditOle_InsertObject(reole, reobj); - ok_(__FILE__,line)(hr == S_OK, "IRichEditOle_InsertObject got hr %#x.\n", hr); + ok_(__FILE__,line)(hr == S_OK, "IRichEditOle_InsertObject got hr %#lx.\n", hr); IOleClientSite_Release(clientsite); }
@@ -3273,25 +3273,25 @@ static void test_InsertObject(void) SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1);
hr = IRichEditOle_InsertObject(reole, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
/* insert object1 in (0, 1)*/ SendMessageA(hwnd, EM_SETSEL, 0, 1); INSERT_REOBJECT(reole, &reo1, REO_CP_SELECTION, 1); count = IRichEditOle_GetObjectCount(reole); - ok(count == 1, "got wrong object count: %d\n", count); + ok(count == 1, "got wrong object count: %ld\n", count);
/* insert object2 in (2, 3)*/ SendMessageA(hwnd, EM_SETSEL, 2, 3); INSERT_REOBJECT(reole, &reo2, REO_CP_SELECTION, 2); count = IRichEditOle_GetObjectCount(reole); - ok(count == 2, "got wrong object count: %d\n", count); + ok(count == 2, "got wrong object count: %ld\n", count);
/* insert object3 in (1, 2)*/ SendMessageA(hwnd, EM_SETSEL, 1, 2); INSERT_REOBJECT(reole, &reo3, REO_CP_SELECTION, 3); count = IRichEditOle_GetObjectCount(reole); - ok(count == 3, "got wrong object count: %d\n", count); + ok(count == 3, "got wrong object count: %ld\n", count);
/* tests below show that order of rebject (from 0 to 2) is: reo1,reo3,reo2 */ CHECK_REOBJECT_STRUCT(reole, 0, REO_GETOBJ_ALL_INTERFACES, 0, NULL, NULL, reo1.polesite, 1); @@ -3299,32 +3299,32 @@ static void test_InsertObject(void) CHECK_REOBJECT_STRUCT(reole, 2, REO_GETOBJ_ALL_INTERFACES, 0, NULL, NULL, reo2.polesite, 2);
hr = IRichEditOle_GetObject(reole, 2, NULL, REO_GETOBJ_ALL_INTERFACES); - ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08lx\n", hr);
received_reo.cbStruct = 0; hr = IRichEditOle_GetObject(reole, 2, &received_reo, REO_GETOBJ_ALL_INTERFACES); - ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08lx\n", hr);
CHECK_REOBJECT_STRUCT(reole, 2, REO_GETOBJ_PSTG, 0, NULL, NULL, NULL, 2); CHECK_REOBJECT_STRUCT(reole, 2, REO_GETOBJ_POLESITE, 0, NULL, NULL, reo2.polesite, 2);
hr = IRichEditOle_GetObject(reole, 3, &received_reo, REO_GETOBJ_POLESITE); - ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08lx\n", hr);
hr = IRichEditOle_GetObject(reole, 4, &received_reo, REO_GETOBJ_POLESITE); - ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08lx\n", hr);
hr = IRichEditOle_GetObject(reole, 1024, &received_reo, REO_GETOBJ_POLESITE); - ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08lx\n", hr);
hr = IRichEditOle_GetObject(reole, -10, &received_reo, REO_GETOBJ_POLESITE); - ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08lx\n", hr);
/* received_reo will be zeroed before be used */ received_reo.cbStruct = sizeof(received_reo); received_reo.polesite = (IOleClientSite *)0xdeadbeef; hr = IRichEditOle_GetObject(reole, 2, &received_reo, REO_GETOBJ_NO_INTERFACES); - ok(hr == S_OK, "IRichEditOle_GetObject failed: 0x%08x\n", hr); + ok(hr == S_OK, "IRichEditOle_GetObject failed: 0x%08lx\n", hr); ok(received_reo.polesite == NULL, "Got wrong site interface.\n");
CHECK_REOBJECT_STRUCT(reole, REO_IOB_USE_CP, REO_GETOBJ_ALL_INTERFACES, 0, NULL, NULL, reo1.polesite, 1); @@ -3336,9 +3336,9 @@ static void test_InsertObject(void) received_reo.dwUser = 4; received_reo.cp = 4; hr = IRichEditOle_GetObject(reole, REO_IOB_USE_CP, &received_reo, REO_GETOBJ_ALL_INTERFACES); - ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08lx\n", hr); ok(received_reo.polesite == (IOleClientSite *)0xdeadbeef, "Got wrong site interface.\n"); - ok(received_reo.dwUser == 4, "Got wrong user-defined value: %d.\n", received_reo.dwUser); + ok(received_reo.dwUser == 4, "Got wrong user-defined value: %ld.\n", received_reo.dwUser);
SendMessageA(hwnd, EM_SETSEL, 0, 1); CHECK_REOBJECT_STRUCT(reole, REO_IOB_SELECTION, REO_GETOBJ_ALL_INTERFACES, 0, NULL, NULL, reo1.polesite, 1); @@ -3365,7 +3365,7 @@ static void test_InsertObject(void) received_reo.cbStruct = sizeof(received_reo); received_reo.cp = 0; hr = IRichEditOle_GetObject(reole, REO_IOB_SELECTION, &received_reo, REO_GETOBJ_ALL_INTERFACES); - ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "IRichEditOle_GetObject should fail: 0x%08lx\n", hr);
SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1);
@@ -3375,16 +3375,16 @@ static void test_InsertObject(void)
SendMessageW(hwnd, EM_SETSEL, 2, 3); result = SendMessageW(hwnd, EM_SELECTIONTYPE, 0, 0); - ok(result == SEL_TEXT, "Got selection type: %x.\n", result); + ok(result == SEL_TEXT, "Got selection type: %lx.\n", result);
SendMessageW(hwnd, EM_SETSEL, 3, 4); result = SendMessageW(hwnd, EM_SELECTIONTYPE, 0, 0); - ok(result == SEL_OBJECT, "Got selection type: %x.\n", result); + ok(result == SEL_OBJECT, "Got selection type: %lx.\n", result); CHECK_REOBJECT_STRUCT(reole, REO_IOB_SELECTION, REO_GETOBJ_ALL_INTERFACES, 1, NULL, NULL, reo1.polesite, 1);
SendMessageW(hwnd, EM_SETSEL, 2, 4); result = SendMessageW(hwnd, EM_SELECTIONTYPE, 0, 0); - ok(result == (SEL_TEXT | SEL_OBJECT), "Got selection type: %x.\n", result); + ok(result == (SEL_TEXT | SEL_OBJECT), "Got selection type: %lx.\n", result);
SendMessageW(hwnd, EM_SETSEL, 5, 6); CHECK_REOBJECT_STRUCT(reole, REO_IOB_SELECTION, REO_GETOBJ_ALL_INTERFACES, 1, NULL, NULL, reo2.polesite, 2); @@ -3396,40 +3396,40 @@ static void test_InsertObject(void) gettextex.lpDefaultChar = NULL; gettextex.lpUsedDefChar = NULL; result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); - ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + ok(result == lstrlenW(expected_string), "Got wrong length: %ld.\n", result); todo_wine ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer));
gettextex.flags = GT_RAWTEXT; memset(buffer, 0, sizeof(buffer)); result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); - ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + ok(result == lstrlenW(expected_string), "Got wrong length: %ld.\n", result); todo_wine ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer));
gettextex.flags = GT_NOHIDDENTEXT; memset(buffer, 0, sizeof(buffer)); result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); - ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + ok(result == lstrlenW(expected_string), "Got wrong length: %ld.\n", result); todo_wine ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer));
gettextex.flags = GT_SELECTION; memset(buffer, 0, sizeof(buffer)); SendMessageW(hwnd, EM_SETSEL, 0, -1); result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); - ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + ok(result == lstrlenW(expected_string), "Got wrong length: %ld.\n", result); todo_wine ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer));
expected_string = L"abc d efg"; gettextex.flags = GT_USECRLF; memset(buffer, 0, sizeof(buffer)); result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); - ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + ok(result == lstrlenW(expected_string), "Got wrong length: %ld.\n", result); ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer));
expected_stringA = "abc d efg"; memset(bufferA, 0, sizeof(bufferA)); SendMessageA(hwnd, EM_SETSEL, 0, -1); result = SendMessageA(hwnd, EM_GETSELTEXT, (WPARAM)sizeof(bufferA), (LPARAM)bufferA); - ok(result == strlen(expected_stringA), "Got wrong length: %d.\n", result); + ok(result == strlen(expected_stringA), "Got wrong length: %ld.\n", result); ok(!strcmp(bufferA, expected_stringA), "Got wrong content: %s.\n", bufferA);
memset(bufferA, 0, sizeof(bufferA)); @@ -3437,39 +3437,39 @@ static void test_InsertObject(void) textrange.chrg.cpMin = 0; textrange.chrg.cpMax = 11; result = SendMessageA(hwnd, EM_GETTEXTRANGE, 0, (LPARAM)&textrange); - ok(result == strlen(expected_stringA), "Got wrong length: %d.\n", result); + ok(result == strlen(expected_stringA), "Got wrong length: %ld.\n", result); ok(!strcmp(bufferA, expected_stringA), "Got wrong content: %s.\n", bufferA);
expected_string = L"abc\xfffc""d\xfffc""efg\r"; hr = ITextDocument_Range(doc, 0, 11, &range); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITextRange_GetText(range, &bstr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(lstrlenW(bstr) == lstrlenW(expected_string), "Got wrong length: %d.\n", lstrlenW(bstr)); todo_wine ok(!lstrcmpW(bstr, expected_string), "Got text: %s.\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITextRange_SetRange(range, 3, 4); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITextRange_GetChar(range, &result); - ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(result == 0xfffc, "Got char: %c\n", result); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(result == 0xfffc, "Got char: %lc\n", (WCHAR)result); ITextRange_Release(range);
SendMessageW(hwnd, EM_SETSEL, 0, -1); hr = ITextSelection_GetText(selection, &bstr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(lstrlenW(bstr) == lstrlenW(expected_string), "Got wrong length: %d.\n", lstrlenW(bstr)); todo_wine ok(!lstrcmpW(bstr, expected_string), "Got text: %s.\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); SendMessageW(hwnd, EM_SETSEL, 3, 4); result = 0; hr = ITextSelection_GetChar(selection, &result); - ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(result == 0xfffc, "Got char: %c\n", result); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(result == 0xfffc, "Got char: %lc\n", (WCHAR)result);
SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)""); result = SendMessageW(hwnd, EM_SETTEXTMODE, (WPARAM)TM_PLAINTEXT, 0); - ok(!result, "Got result %x.\n", result); + ok(!result, "Got result %lx.\n", result); /* "abc|d|efg" */ SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1); INSERT_REOBJECT(reole, &reo1, 3, 1); @@ -3479,14 +3479,14 @@ static void test_InsertObject(void) charrange.cpMin = 0; charrange.cpMax = 11; hr = IRichEditOle_GetClipboardData(reole, &charrange, 1, &dataobject); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); formatetc.cfFormat = CF_UNICODETEXT; formatetc.dwAspect = DVASPECT_CONTENT; formatetc.ptd = NULL; formatetc.tymed = TYMED_HGLOBAL; formatetc.lindex = -1; hr = IDataObject_GetData(dataobject, &formatetc, &stgmedium); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); string = GlobalLock(stgmedium.hGlobal); ok(lstrlenW(string) == lstrlenW(expected_string), "Got wrong length: %d.\n", lstrlenW(string)); ok(!lstrcmpW(string, expected_string), "Got wrong content: %s.\n", debugstr_w(string)); @@ -3499,20 +3499,20 @@ static void test_InsertObject(void) gettextex.lpDefaultChar = NULL; gettextex.lpUsedDefChar = NULL; result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); - ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + ok(result == lstrlenW(expected_string), "Got wrong length: %ld.\n", result); todo_wine ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer));
gettextex.flags = GT_RAWTEXT; memset(buffer, 0, sizeof(buffer)); result = SendMessageW(hwnd, EM_GETTEXTEX, (WPARAM)&gettextex, (LPARAM)buffer); - ok(result == lstrlenW(expected_string), "Got wrong length: %d.\n", result); + ok(result == lstrlenW(expected_string), "Got wrong length: %ld.\n", result); todo_wine ok(!lstrcmpW(buffer, expected_string), "Got wrong content: %s.\n", debugstr_w(buffer));
expected_stringA = "abc d efg"; memset(bufferA, 0, sizeof(bufferA)); SendMessageA(hwnd, EM_SETSEL, 0, -1); result = SendMessageA(hwnd, EM_GETSELTEXT, (WPARAM)sizeof(bufferA), (LPARAM)bufferA); - ok(result == strlen(expected_stringA), "Got wrong length: %d.\n", result); + ok(result == strlen(expected_stringA), "Got wrong length: %ld.\n", result); ok(!strcmp(bufferA, expected_stringA), "Got wrong content: %s.\n", bufferA);
memset(bufferA, 0, sizeof(bufferA)); @@ -3520,35 +3520,35 @@ static void test_InsertObject(void) textrange.chrg.cpMin = 0; textrange.chrg.cpMax = 11; result = SendMessageA(hwnd, EM_GETTEXTRANGE, 0, (LPARAM)&textrange); - ok(result == strlen(expected_stringA), "Got wrong length: %d.\n", result); + ok(result == strlen(expected_stringA), "Got wrong length: %ld.\n", result); ok(!strcmp(bufferA, expected_stringA), "Got wrong content: %s.\n", bufferA);
expected_string = L"abc\xfffc""d\xfffc""efg"; hr = ITextDocument_Range(doc, 0, 11, &range); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITextRange_GetText(range, &bstr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(lstrlenW(bstr) == lstrlenW(expected_string), "Got wrong length: %d.\n", lstrlenW(bstr)); todo_wine ok(!lstrcmpW(bstr, expected_string), "Got text: %s.\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); hr = ITextRange_SetRange(range, 3, 4); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITextRange_GetChar(range, &result); - ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(result == 0xfffc, "Got char: %c\n", result); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(result == 0xfffc, "Got char: %lc\n", (WCHAR)result); ITextRange_Release(range);
SendMessageW(hwnd, EM_SETSEL, 0, -1); hr = ITextSelection_GetText(selection, &bstr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(lstrlenW(bstr) == lstrlenW(expected_string), "Got wrong length: %d.\n", lstrlenW(bstr)); todo_wine ok(!lstrcmpW(bstr, expected_string), "Got text: %s.\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); SendMessageW(hwnd, EM_SETSEL, 3, 4); result = 0; hr = ITextSelection_GetChar(selection, &result); - ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(result == 0xfffc, "Got char: %c\n", result); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(result == 0xfffc, "Got char: %lc\n", (WCHAR)result);
release_interfaces(&hwnd, &reole, &doc, &selection); } @@ -3569,53 +3569,53 @@ static void test_GetStoryLength(void) SendMessageA(hwnd, EM_SETSEL, 1, 2);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_GetStoryLength(range, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
value = 0; hr = ITextRange_GetStoryLength(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 13, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 13, "got %ld\n", value);
hr = ITextSelection_GetStoryLength(selection, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
value = 0; hr = ITextSelection_GetStoryLength(selection, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 13, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 13, "got %ld\n", value);
SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)"");
value = 0; hr = ITextRange_GetStoryLength(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 1, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 1, "got %ld\n", value);
value = 0; hr = ITextSelection_GetStoryLength(selection, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 1, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 1, "got %ld\n", value);
release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextRange_GetStoryLength(range, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = 100; hr = ITextRange_GetStoryLength(range, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == 100, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == 100, "got %ld\n", value);
hr = ITextSelection_GetStoryLength(selection, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
value = 100; hr = ITextSelection_GetStoryLength(selection, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); - ok(value == 100, "got %d\n", value); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr); + ok(value == 100, "got %ld\n", value);
ITextSelection_Release(selection); ITextRange_Release(range); @@ -3638,15 +3638,15 @@ static void test_ITextSelection_GetDuplicate(void) SendMessageA(hwnd, EM_SETSEL, 1, 2);
hr = ITextSelection_GetDuplicate(selection, NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
EXPECT_REF(selection, 2);
hr = ITextSelection_GetDuplicate(selection, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextSelection_GetDuplicate(selection, &range2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(range != range2, "got %p, %p\n", range, range2);
EXPECT_REF(selection, 2); @@ -3657,39 +3657,39 @@ static void test_ITextSelection_GetDuplicate(void)
value = 0; hr = ITextRange_GetStart(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 1, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 1, "got %ld\n", value);
value = 0; hr = ITextRange_GetEnd(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 2, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 2, "got %ld\n", value);
SendMessageA(hwnd, EM_SETSEL, 2, 3);
value = 0; hr = ITextRange_GetStart(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 1, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 1, "got %ld\n", value);
value = 0; hr = ITextRange_GetEnd(range, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 2, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 2, "got %ld\n", value);
hr = ITextRange_QueryInterface(range, &IID_ITextSelection, (void**)&sel2); - ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); + ok(hr == E_NOINTERFACE, "got 0x%08lx\n", hr);
release_interfaces(&hwnd, &reOle, &doc, NULL);
hr = ITextSelection_GetDuplicate(selection, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextSelection_GetDuplicate(selection, &range); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextRange_GetFont(range, &font); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
ITextSelection_Release(selection); ITextRange_Release(range); @@ -3702,9 +3702,9 @@ static void _reset_range(ITextRange *range, LONG start, LONG end, int line) HRESULT hr;
hr = ITextRange_SetStart(range, start); - ok_(__FILE__,line)(hr == S_OK, "SetStart failed: 0x%08x\n", hr); + ok_(__FILE__,line)(hr == S_OK, "SetStart failed: 0x%08lx\n", hr); hr = ITextRange_SetEnd(range, end); - ok_(__FILE__,line)(hr == S_OK, "SetEnd failed: 0x%08x\n", hr); + ok_(__FILE__,line)(hr == S_OK, "SetEnd failed: 0x%08lx\n", hr); }
#define CHECK_RANGE(range,expected_start,expected_end) \ @@ -3715,12 +3715,12 @@ static void _check_range(ITextRange* range, LONG expected_start, LONG expected_e LONG value;
hr = ITextRange_GetStart(range, &value); - ok_(__FILE__,line)(hr == S_OK, "GetStart failed: 0x%08x\n", hr); - ok_(__FILE__,line)(value == expected_start, "Expected start %d got %d\n", + ok_(__FILE__,line)(hr == S_OK, "GetStart failed: 0x%08lx\n", hr); + ok_(__FILE__,line)(value == expected_start, "Expected start %ld got %ld\n", expected_start, value); hr = ITextRange_GetEnd(range, &value); - ok_(__FILE__,line)(hr == S_OK, "GetEnd failed: 0x%08x\n", hr); - ok_(__FILE__,line)(value == expected_end, "Expected end %d got %d\n", + ok_(__FILE__,line)(hr == S_OK, "GetEnd failed: 0x%08lx\n", hr); + ok_(__FILE__,line)(value == expected_end, "Expected end %ld got %ld\n", expected_end, value); }
@@ -3731,9 +3731,9 @@ static void _reset_selection(ITextSelection *selection, LONG start, LONG end, in HRESULT hr;
hr = ITextSelection_SetStart(selection, start); - ok_(__FILE__,line)(hr == S_OK, "SetStart failed: 0x%08x\n", hr); + ok_(__FILE__,line)(hr == S_OK, "SetStart failed: 0x%08lx\n", hr); hr = ITextSelection_SetEnd(selection, end); - ok_(__FILE__,line)(hr == S_OK, "SetEnd failed: 0x%08x\n", hr); + ok_(__FILE__,line)(hr == S_OK, "SetEnd failed: 0x%08lx\n", hr); }
#define CHECK_SELECTION(selection,expected_start,expected_end) \ @@ -3744,12 +3744,12 @@ static void _check_selection(ITextSelection *selection, LONG expected_start, LON LONG value;
hr = ITextSelection_GetStart(selection, &value); - ok_(__FILE__,line)(hr == S_OK, "GetStart failed: 0x%08x\n", hr); - ok_(__FILE__,line)(value == expected_start, "Expected start %d got %d\n", + ok_(__FILE__,line)(hr == S_OK, "GetStart failed: 0x%08lx\n", hr); + ok_(__FILE__,line)(value == expected_start, "Expected start %ld got %ld\n", expected_start, value); hr = ITextSelection_GetEnd(selection, &value); - ok_(__FILE__,line)(hr == S_OK, "GetEnd failed: 0x%08x\n", hr); - ok_(__FILE__,line)(value == expected_end, "Expected end %d got %d\n", + ok_(__FILE__,line)(hr == S_OK, "GetEnd failed: 0x%08lx\n", hr); + ok_(__FILE__,line)(value == expected_end, "Expected end %ld got %ld\n", expected_end, value); }
@@ -3767,31 +3767,31 @@ static void test_ITextRange_SetRange(void) ITextDocument_Range(txtDoc, 0, 0, &txtRge);
hr = ITextRange_SetRange(txtRge, 2, 4); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); CHECK_RANGE(txtRge, 2, 4);
hr = ITextRange_SetRange(txtRge, 2, 4); - ok(hr == S_FALSE, "got 0x%08x.\n", hr); + ok(hr == S_FALSE, "got 0x%08lx.\n", hr); CHECK_RANGE(txtRge, 2, 4);
hr = ITextRange_SetRange(txtRge, 4, 2); - ok(hr == S_FALSE, "got 0x%08x.\n", hr); + ok(hr == S_FALSE, "got 0x%08lx.\n", hr); CHECK_RANGE(txtRge, 2, 4);
hr = ITextRange_SetRange(txtRge, 14, 14); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); CHECK_RANGE(txtRge, 12, 12);
hr = ITextRange_SetRange(txtRge, 15, 15); - ok(hr == S_FALSE, "got 0x%08x.\n", hr); + ok(hr == S_FALSE, "got 0x%08lx.\n", hr); CHECK_RANGE(txtRge, 12, 12);
hr = ITextRange_SetRange(txtRge, 14, 1); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); CHECK_RANGE(txtRge, 1, 13);
hr = ITextRange_SetRange(txtRge, -1, 4); - ok(hr == S_OK, "got 0x%08x.\n", hr); + ok(hr == S_OK, "got 0x%08lx.\n", hr); CHECK_RANGE(txtRge, 0, 4);
ITextRange_Release(txtRge); @@ -3814,14 +3814,14 @@ static void test_Expand(void) SendMessageA(hwnd, EM_SETSEL, 1, 2);
hr = ITextDocument_Range(doc, 0, 4, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_Expand(range, tomStory, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CHECK_RANGE(range, 0, 13);
hr = ITextSelection_Expand(selection, tomStory, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CHECK_SELECTION(selection, 0, 13);
RESET_RANGE(range, 1, 2); @@ -3829,29 +3829,29 @@ static void test_Expand(void)
value = 0; hr = ITextRange_Expand(range, tomStory, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 12, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 12, "got %ld\n", value); CHECK_RANGE(range, 0, 13);
value = 0; hr = ITextSelection_Expand(selection, tomStory, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(value == 12, "got %d\n", value); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(value == 12, "got %ld\n", value); CHECK_SELECTION(selection, 0, 13);
release_interfaces(&hwnd, &reole, &doc, NULL);
hr = ITextRange_Expand(range, tomStory, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextRange_Expand(range, tomStory, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextSelection_Expand(selection, tomStory, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextSelection_Expand(selection, tomStory, &value); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
ITextSelection_Release(selection); ITextRange_Release(range); @@ -3873,99 +3873,99 @@ static void test_MoveEnd_story(void) SendMessageA(hwnd, EM_SETSEL, 1, 2);
hr = ITextDocument_Range(doc, 1, 2, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = ITextRange_MoveEnd(range, tomStory, 0, &delta); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(delta == 0, "got %d\n", delta); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(delta == 0, "got %ld\n", delta); CHECK_RANGE(range, 1, 2);
hr = ITextRange_MoveEnd(range, tomStory, -1, &delta); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(delta == -1, "got %d\n", delta); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(delta == -1, "got %ld\n", delta); CHECK_RANGE(range, 0, 0);
hr = ITextRange_MoveEnd(range, tomStory, 1, &delta); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(delta == 1, "got %d\n", delta); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(delta == 1, "got %ld\n", delta); CHECK_RANGE(range, 0, 12);
hr = ITextRange_MoveEnd(range, tomStory, 1, &delta); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(delta == 0, "got %d\n", delta); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(delta == 0, "got %ld\n", delta); CHECK_RANGE(range, 0, 12);
RESET_RANGE(range, 1, 2);
hr = ITextRange_MoveEnd(range, tomStory, 3, &delta); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(delta == 1, "got %d\n", delta); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(delta == 1, "got %ld\n", delta); CHECK_RANGE(range, 1, 12);
RESET_RANGE(range, 2, 3);
hr = ITextRange_MoveEnd(range, tomStory, -3, &delta); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(delta == -1, "got %d\n", delta); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(delta == -1, "got %ld\n", delta); CHECK_RANGE(range, 0, 0);
hr = ITextRange_MoveEnd(range, tomStory, -1, &delta); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(delta == 0, "got %d\n", delta); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(delta == 0, "got %ld\n", delta); CHECK_RANGE(range, 0, 0);
hr = ITextSelection_MoveEnd(selection, tomStory, 0, &delta); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(delta == 0, "got %d\n", delta); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(delta == 0, "got %ld\n", delta); CHECK_SELECTION(selection, 1, 2);
hr = ITextSelection_MoveEnd(selection, tomStory, -1, &delta); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(delta == -1, "got %d\n", delta); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(delta == -1, "got %ld\n", delta); CHECK_SELECTION(selection, 0, 0);
hr = ITextSelection_MoveEnd(selection, tomStory, 1, &delta); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(delta == 1, "got %d\n", delta); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(delta == 1, "got %ld\n", delta); CHECK_SELECTION(selection, 0, 12);
hr = ITextSelection_MoveEnd(selection, tomStory, 1, &delta); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(delta == 0, "got %d\n", delta); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(delta == 0, "got %ld\n", delta); CHECK_SELECTION(selection, 0, 12);
RESET_SELECTION(selection, 1, 2);
hr = ITextSelection_MoveEnd(selection, tomStory, 3, &delta); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(delta == 1, "got %d\n", delta); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(delta == 1, "got %ld\n", delta); CHECK_SELECTION(selection, 1, 12);
RESET_SELECTION(selection, 2, 3);
hr = ITextSelection_MoveEnd(selection, tomStory, -3, &delta); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(delta == -1, "got %d\n", delta); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(delta == -1, "got %ld\n", delta); CHECK_SELECTION(selection, 0, 0);
hr = ITextSelection_MoveEnd(selection, tomStory, -1, &delta); - ok(hr == S_FALSE, "got 0x%08x\n", hr); - ok(delta == 0, "got %d\n", delta); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); + ok(delta == 0, "got %ld\n", delta); CHECK_SELECTION(selection, 0, 0);
release_interfaces(&hwnd, &reole, &doc, NULL);
hr = ITextRange_MoveEnd(range, tomStory, 1, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextRange_MoveEnd(range, tomStory, 1, &delta); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextSelection_MoveEnd(selection, tomStory, 1, NULL); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
hr = ITextSelection_MoveEnd(selection, tomStory, 1, &delta); - ok(hr == CO_E_RELEASED, "got 0x%08x\n", hr); + ok(hr == CO_E_RELEASED, "got 0x%08lx\n", hr);
ITextSelection_Release(selection); ITextRange_Release(range); @@ -3984,15 +3984,15 @@ static void test_character_movestart(ITextRange *range, int textlen, int i, int expected_start = textlen; expected_delta = expected_start - i; hr = ITextRange_SetRange(range, i, j); - ok(SUCCEEDED(hr), "got 0x%08x\n", hr); + ok(SUCCEEDED(hr), "got 0x%08lx\n", hr); hr = ITextRange_MoveStart(range, tomCharacter, target - i, &delta); if (expected_start == i) { - ok(hr == S_FALSE, "(%d,%d) move by %d got hr=0x%08x\n", i, j, target - i, hr); - ok(delta == 0, "(%d,%d) move by %d got delta %d\n", i, j, target - i, delta); + ok(hr == S_FALSE, "(%d,%d) move by %ld got hr=0x%08lx\n", i, j, target - i, hr); + ok(delta == 0, "(%d,%d) move by %ld got delta %ld\n", i, j, target - i, delta); CHECK_RANGE(range, i, j); } else { - ok(hr == S_OK, "(%d,%d) move by %d got hr=0x%08x\n", i, j, target - i, hr); - ok(delta == expected_delta, "(%d,%d) move by %d got delta %d\n", i, j, target - i, delta); + ok(hr == S_OK, "(%d,%d) move by %ld got hr=0x%08lx\n", i, j, target - i, hr); + ok(delta == expected_delta, "(%d,%d) move by %ld got delta %ld\n", i, j, target - i, delta); if (expected_start <= j) CHECK_RANGE(range, expected_start, j); else @@ -4013,15 +4013,15 @@ static void test_character_moveend(ITextRange *range, int textlen, int i, int j, expected_end = textlen + 1; expected_delta = expected_end - j; hr = ITextRange_SetRange(range, i, j); - ok(SUCCEEDED(hr), "got 0x%08x\n", hr); + ok(SUCCEEDED(hr), "got 0x%08lx\n", hr); hr = ITextRange_MoveEnd(range, tomCharacter, target - j, &delta); if (expected_end == j) { - ok(hr == S_FALSE, "(%d,%d) move by %d got hr=0x%08x\n", i, j, target - j, hr); - ok(delta == 0, "(%d,%d) move by %d got delta %d\n", i, j, target - j, delta); + ok(hr == S_FALSE, "(%d,%d) move by %ld got hr=0x%08lx\n", i, j, target - j, hr); + ok(delta == 0, "(%d,%d) move by %ld got delta %ld\n", i, j, target - j, delta); CHECK_RANGE(range, i, j); } else { - ok(hr == S_OK, "(%d,%d) move by %d got hr=0x%08x\n", i, j, target - j, hr); - ok(delta == expected_delta, "(%d,%d) move by %d got delta %d\n", i, j, target - j, delta); + ok(hr == S_OK, "(%d,%d) move by %ld got hr=0x%08lx\n", i, j, target - j, hr); + ok(delta == expected_delta, "(%d,%d) move by %ld got delta %ld\n", i, j, target - j, delta); if (i <= expected_end) CHECK_RANGE(range, i, expected_end); else @@ -4062,15 +4062,15 @@ static void test_character_move(ITextRange *range, int textlen, int i, int j, LO }
hr = ITextRange_SetRange(range, i, j); - ok(SUCCEEDED(hr), "got 0x%08x\n", hr); + ok(SUCCEEDED(hr), "got 0x%08lx\n", hr); hr = ITextRange_Move(range, tomCharacter, move_by, &delta); if (expected_delta == 0) { - ok(hr == S_FALSE, "(%d,%d) move by %d got hr=0x%08x\n", i, j, move_by, hr); - ok(delta == 0, "(%d,%d) move by %d got delta %d\n", i, j, move_by, delta); + ok(hr == S_FALSE, "(%d,%d) move by %ld got hr=0x%08lx\n", i, j, move_by, hr); + ok(delta == 0, "(%d,%d) move by %ld got delta %ld\n", i, j, move_by, delta); CHECK_RANGE(range, expected_location, expected_location); } else { - ok(hr == S_OK, "(%d,%d) move by %d got hr=0x%08x\n", i, j, move_by, hr); - ok(delta == expected_delta, "(%d,%d) move by %d got delta %d\n", i, j, move_by, delta); + ok(hr == S_OK, "(%d,%d) move by %ld got hr=0x%08lx\n", i, j, move_by, hr); + ok(delta == expected_delta, "(%d,%d) move by %ld got delta %ld\n", i, j, move_by, delta); CHECK_RANGE(range, expected_location, expected_location); } } @@ -4081,22 +4081,22 @@ static void test_character_startof(ITextRange *range, int textlen, int i, int j) LONG delta;
hr = ITextRange_SetRange(range, i, j); - ok(SUCCEEDED(hr), "got 0x%08x\n", hr); + ok(SUCCEEDED(hr), "got 0x%08lx\n", hr); hr = ITextRange_StartOf(range, tomCharacter, tomMove, &delta); if (i == j) { - ok(hr == S_FALSE, "(%d,%d) tomMove got hr=0x%08x\n", i, j, hr); - ok(delta == 0, "(%d,%d) tomMove got delta %d\n", i, j, delta); + ok(hr == S_FALSE, "(%d,%d) tomMove got hr=0x%08lx\n", i, j, hr); + ok(delta == 0, "(%d,%d) tomMove got delta %ld\n", i, j, delta); } else { - ok(hr == S_OK, "(%d,%d) tomMove got hr=0x%08x\n", i, j, hr); - ok(delta == -1, "(%d,%d) tomMove got delta %d\n", i, j, delta); + ok(hr == S_OK, "(%d,%d) tomMove got hr=0x%08lx\n", i, j, hr); + ok(delta == -1, "(%d,%d) tomMove got delta %ld\n", i, j, delta); } CHECK_RANGE(range, i, i);
hr = ITextRange_SetRange(range, i, j); - ok(SUCCEEDED(hr), "got 0x%08x\n", hr); + ok(SUCCEEDED(hr), "got 0x%08lx\n", hr); hr = ITextRange_StartOf(range, tomCharacter, tomExtend, &delta); - ok(hr == S_FALSE, "(%d,%d) tomExtend got hr=0x%08x\n", i, j, hr); - ok(delta == 0, "(%d,%d) tomExtend got delta %d\n", i, j, delta); + ok(hr == S_FALSE, "(%d,%d) tomExtend got hr=0x%08lx\n", i, j, hr); + ok(delta == 0, "(%d,%d) tomExtend got delta %ld\n", i, j, delta); CHECK_RANGE(range, i, j); }
@@ -4107,7 +4107,7 @@ static void test_character_endof(ITextRange *range, int textlen, int i, int j) LONG delta;
hr = ITextRange_SetRange(range, i, j); - ok(SUCCEEDED(hr), "got 0x%08x\n", hr); + ok(SUCCEEDED(hr), "got 0x%08lx\n", hr); hr = ITextRange_EndOf(range, tomCharacter, tomMove, &delta);
/* A character "end", apparently cannot be before the very first character */ @@ -4116,23 +4116,23 @@ static void test_character_endof(ITextRange *range, int textlen, int i, int j) ++end;
if (i == end) { - ok(hr == S_FALSE, "(%d,%d) tomMove got hr=0x%08x\n", i, j, hr); - ok(delta == 0, "(%d,%d) tomMove got delta %d\n", i, j, delta); + ok(hr == S_FALSE, "(%d,%d) tomMove got hr=0x%08lx\n", i, j, hr); + ok(delta == 0, "(%d,%d) tomMove got delta %ld\n", i, j, delta); } else { - ok(hr == S_OK, "(%d,%d) tomMove got hr=0x%08x\n", i, j, hr); - ok(delta == 1, "(%d,%d) tomMove got delta %d\n", i, j, delta); + ok(hr == S_OK, "(%d,%d) tomMove got hr=0x%08lx\n", i, j, hr); + ok(delta == 1, "(%d,%d) tomMove got delta %ld\n", i, j, delta); } CHECK_RANGE(range, end, end);
hr = ITextRange_SetRange(range, i, j); - ok(SUCCEEDED(hr), "got 0x%08x\n", hr); + ok(SUCCEEDED(hr), "got 0x%08lx\n", hr); hr = ITextRange_EndOf(range, tomCharacter, tomExtend, &delta); if (0 < j) { - ok(hr == S_FALSE, "(%d,%d) tomExtend got hr=0x%08x\n", i, j, hr); - ok(delta == 0, "(%d,%d) tomExtend got delta %d\n", i, j, delta); + ok(hr == S_FALSE, "(%d,%d) tomExtend got hr=0x%08lx\n", i, j, hr); + ok(delta == 0, "(%d,%d) tomExtend got delta %ld\n", i, j, delta); } else { - ok(hr == S_OK, "(%d,%d) tomExtend got hr=0x%08x\n", i, j, hr); - ok(delta == 1, "(%d,%d) tomExtend got delta %d\n", i, j, delta); + ok(hr == S_OK, "(%d,%d) tomExtend got hr=0x%08lx\n", i, j, hr); + ok(delta == 1, "(%d,%d) tomExtend got delta %ld\n", i, j, delta); } CHECK_RANGE(range, i, end); } @@ -4153,7 +4153,7 @@ static void test_character_movement(void) SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1);
hr = ITextDocument_Range(doc, 0, 0, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Exhaustive test of every possible combination of (start,end) locations, * against every possible target location to move to. */ @@ -4185,12 +4185,12 @@ static void _clipboard_range_contains(ITextRange *range, LONG start, LONG end, c const char *clipboard_text;
hr = ITextRange_SetRange(range, start, end); - ok_(__FILE__,line)(SUCCEEDED(hr), "SetRange failed: 0x%08x\n", hr); + ok_(__FILE__,line)(SUCCEEDED(hr), "SetRange failed: 0x%08lx\n", hr); hr = ITextRange_Copy(range, NULL); - ok_(__FILE__,line)(hr == S_OK, "Copy failed: 0x%08x\n", hr); + ok_(__FILE__,line)(hr == S_OK, "Copy failed: 0x%08lx\n", hr);
clipboard_open = OpenClipboard(NULL); - ok_(__FILE__,line)(clipboard_open, "OpenClipboard failed: %d\n", GetLastError()); + ok_(__FILE__,line)(clipboard_open, "OpenClipboard failed: %ld\n", GetLastError()); global = GetClipboardData(CF_TEXT); ok_(__FILE__,line)(global != NULL, "GetClipboardData failed: %p\n", global); clipboard_text = GlobalLock(global); @@ -4214,7 +4214,7 @@ static void test_clipboard(void) SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)text_in);
hr = ITextDocument_Range(doc, 0, 0, &range); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
CLIPBOARD_RANGE_CONTAINS(range, 0, 5, "ab\r\n c") CLIPBOARD_RANGE_CONTAINS(range, 0, 0, "ab\r\n c") @@ -4228,20 +4228,20 @@ static void test_clipboard(void)
/* Cut can be undone */ hr = ITextRange_SetRange(range, 0, 1); - ok(SUCCEEDED(hr), "SetRange failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "SetRange failed: 0x%08lx\n", hr); hr = ITextRange_Cut(range, NULL); - ok(hr == S_OK, "Cut failed: 0x%08x\n", hr); + ok(hr == S_OK, "Cut failed: 0x%08lx\n", hr); CLIPBOARD_RANGE_CONTAINS(range, 0, 4, "b\r\n c"); hr = ITextDocument_Undo(doc, 1, NULL); - todo_wine ok(hr == S_OK, "Undo failed: 0x%08x\n", hr); + todo_wine ok(hr == S_OK, "Undo failed: 0x%08lx\n", hr); TODO_CLIPBOARD_RANGE_CONTAINS(range, 0, 5, "ab\r\n c");
/* Cannot cut when read-only */ SendMessageA(hwnd, EM_SETREADONLY, TRUE, 0); hr = ITextRange_SetRange(range, 0, 1); - ok(SUCCEEDED(hr), "SetRange failed: 0x%08x\n", hr); + ok(SUCCEEDED(hr), "SetRange failed: 0x%08lx\n", hr); hr = ITextRange_Cut(range, NULL); - ok(hr == E_ACCESSDENIED, "got 0x%08x\n", hr); + ok(hr == E_ACCESSDENIED, "got 0x%08lx\n", hr);
release_interfaces(&hwnd, &reole, &doc, NULL); ITextSelection_Release(selection); diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c index 22082201fbc..16904347919 100644 --- a/dlls/riched20/tests/txtsrv.c +++ b/dlls/riched20/tests/txtsrv.c @@ -173,7 +173,7 @@ static BOOL __thiscall ITextHostImpl_TxSetScrollRange(ITextHost *iface, INT fnBa INT nMaxPos, BOOL fRedraw) { ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxSetScrollRange(%p, fnBar=%d, nMinPos=%d, nMaxPos=%d, fRedraw=%d)\n", + TRACECALL("Call to TxSetScrollRange(%p, fnBar=%d, nMinPos=%ld, nMaxPos=%d, fRedraw=%d)\n", This, fnBar, nMinPos, nMaxPos, fRedraw); return FALSE; } @@ -289,7 +289,7 @@ static HRESULT __thiscall ITextHostImpl_TxActivate(ITextHost *iface, LONG *plOld static HRESULT __thiscall ITextHostImpl_TxDeactivate(ITextHost *iface, LONG lNewState) { ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxDeactivate(%p, lNewState=%d)\n", This, lNewState); + TRACECALL("Call to TxDeactivate(%p, lNewState=%ld)\n", This, lNewState); return E_NOTIMPL; }
@@ -392,7 +392,7 @@ static HRESULT __thiscall ITextHostImpl_OnTxParaFormatChange(ITextHost *iface, c static HRESULT __thiscall ITextHostImpl_TxGetPropertyBits(ITextHost *iface, DWORD dwMask, DWORD *pdwBits) { ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL("Call to TxGetPropertyBits(%p, dwMask=0x%08x, pdwBits=%p)\n", + TRACECALL("Call to TxGetPropertyBits(%p, dwMask=0x%08lx, pdwBits=%p)\n", This, dwMask, pdwBits); *pdwBits = This->props & dwMask; return S_OK; @@ -403,7 +403,7 @@ static int en_update_sent; static HRESULT __thiscall ITextHostImpl_TxNotify( ITextHost *iface, DWORD code, void *data ) { ITextHostTestImpl *This = impl_from_ITextHost(iface); - TRACECALL( "Call to TxNotify(%p, code = %#x, data = %p)\n", This, code, data ); + TRACECALL( "Call to TxNotify(%p, code = %#lx, data = %p)\n", This, code, data ); switch (code) { case EN_VSCROLL: @@ -629,8 +629,8 @@ static BOOL init_texthost(ITextServices **txtserv, ITextHost **ret) CreateTextServices which is then queried to obtain a ITextServices object. */ result = pCreateTextServices(NULL, &dummyTextHost->ITextHost_iface, &init); - ok(result == S_OK, "Did not return S_OK when created (result = %x)\n", result); - ok(dummyTextHost->refCount == 1, "host ref %d\n", dummyTextHost->refCount); + ok(result == S_OK, "Did not return S_OK when created (result = %lx)\n", result); + ok(dummyTextHost->refCount == 1, "host ref %ld\n", dummyTextHost->refCount); if (result != S_OK) { CoTaskMemFree(dummyTextHost); win_skip("CreateTextServices failed.\n"); @@ -638,7 +638,7 @@ static BOOL init_texthost(ITextServices **txtserv, ITextHost **ret) }
result = IUnknown_QueryInterface(init, pIID_ITextServices, (void**)txtserv); - ok((result == S_OK) && (*txtserv != NULL), "Querying interface failed (result = %x, txtserv = %p)\n", result, *txtserv); + ok((result == S_OK) && (*txtserv != NULL), "Querying interface failed (result = %lx, txtserv = %p)\n", result, *txtserv); IUnknown_Release(init); if (!((result == S_OK) && (*txtserv != NULL))) { CoTaskMemFree(dummyTextHost); @@ -682,21 +682,21 @@ static void test_TxGetText(void) return;
hres = ITextServices_TxGetText(txtserv, &rettext); - ok(hres == S_OK, "ITextServices_TxGetText failed (result = %x)\n", hres); + ok(hres == S_OK, "ITextServices_TxGetText failed (result = %lx)\n", hres); SysFreeString(rettext);
hres = ITextServices_TxSetText(txtserv, L"abcdefg"); - ok(hres == S_OK, "Got hres: %#x.\n", hres); + ok(hres == S_OK, "Got hres: %#lx.\n", hres); hres = ITextServices_QueryInterface(txtserv, &IID_IRichEditOle, (void **)&reole); - ok(hres == S_OK, "Got hres: %#x.\n", hres); + ok(hres == S_OK, "Got hres: %#lx.\n", hres); hres = IRichEditOle_GetClientSite(reole, &clientsite); - ok(hres == S_OK, "Got hres: %#x.\n", hres); + ok(hres == S_OK, "Got hres: %#lx.\n", hres); expected_string = L"abc\xfffc""defg"; fill_reobject_struct(&reobject, 3, NULL, NULL, clientsite, 10, 10, DVASPECT_CONTENT, 0, 1); hres = IRichEditOle_InsertObject(reole, &reobject); - ok(hres == S_OK, "Got hres: %#x.\n", hres); + ok(hres == S_OK, "Got hres: %#lx.\n", hres); hres = ITextServices_TxGetText(txtserv, &rettext); - ok(hres == S_OK, "Got hres: %#x.\n", hres); + ok(hres == S_OK, "Got hres: %#lx.\n", hres); ok(lstrlenW(rettext) == lstrlenW(expected_string), "Got wrong length: %d.\n", lstrlenW(rettext)); todo_wine ok(!lstrcmpW(rettext, expected_string), "Got wrong content: %s.\n", debugstr_w(rettext)); SysFreeString(rettext); @@ -719,10 +719,10 @@ static void test_TxSetText(void) return;
hres = ITextServices_TxSetText(txtserv, settext); - ok(hres == S_OK, "ITextServices_TxSetText failed (result = %x)\n", hres); + ok(hres == S_OK, "ITextServices_TxSetText failed (result = %lx)\n", hres);
hres = ITextServices_TxGetText(txtserv, &rettext); - ok(hres == S_OK, "ITextServices_TxGetText failed (result = %x)\n", hres); + ok(hres == S_OK, "ITextServices_TxGetText failed (result = %lx)\n", hres);
ok(SysStringLen(rettext) == 4, "String returned of wrong length (expected 4, got %d)\n", SysStringLen(rettext)); @@ -734,10 +734,10 @@ static void test_TxSetText(void) /* Null-pointer should behave the same as empty-string */
hres = ITextServices_TxSetText(txtserv, 0); - ok(hres == S_OK, "ITextServices_TxSetText failed (result = %x)\n", hres); + ok(hres == S_OK, "ITextServices_TxSetText failed (result = %lx)\n", hres);
hres = ITextServices_TxGetText(txtserv, &rettext); - ok(hres == S_OK, "ITextServices_TxGetText failed (result = %x)\n", hres); + ok(hres == S_OK, "ITextServices_TxGetText failed (result = %lx)\n", hres); ok(SysStringLen(rettext) == 0, "String returned of wrong length (expected 0, got %d)\n", SysStringLen(rettext));
@@ -756,10 +756,10 @@ static void _check_txgetnaturalsize(HRESULT res, LONG width, LONG height, HDC hd DrawTextW(hdc, string, -1, &expected_rect, DT_LEFT | DT_CALCRECT | DT_NOCLIP | DT_EDITCONTROL | DT_WORDBREAK); expected_width = expected_rect.right - expected_rect.left; expected_height = expected_rect.bottom - expected_rect.top; - ok_(__FILE__,line)(res == S_OK, "ITextServices_TxGetNaturalSize failed: 0x%08x.\n", res); + ok_(__FILE__,line)(res == S_OK, "ITextServices_TxGetNaturalSize failed: 0x%08lx.\n", res); todo_wine ok_(__FILE__,line)(width >= expected_width && width <= expected_width + 1, - "got wrong width: %d, expected: %d {+1}.\n", width, expected_width); - ok_(__FILE__,line)(height == expected_height, "got wrong height: %d, expected: %d.\n", + "got wrong width: %ld, expected: %ld {+1}.\n", width, expected_width); + ok_(__FILE__,line)(height == expected_height, "got wrong height: %ld, expected: %ld.\n", height, expected_height); }
@@ -793,11 +793,11 @@ static void test_TxGetNaturalSize(void) hf = GetStockObject(DEFAULT_GUI_FONT); hf_to_cf(hf, &cf); result = ITextServices_TxSendMessage(txtserv, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf, &lresult); - ok(result == S_OK, "ITextServices_TxSendMessage failed: 0x%08x.\n", result); + ok(result == S_OK, "ITextServices_TxSendMessage failed: 0x%08lx.\n", result); SelectObject(hdcDraw, hf);
result = ITextServices_TxSetText(txtserv, test_text); - ok(result == S_OK, "ITextServices_TxSetText failed: 0x%08x.\n", result); + ok(result == S_OK, "ITextServices_TxSetText failed: 0x%08lx.\n", result);
extent.cx = -1; extent.cy = -1; width = rect.right - rect.left; @@ -835,26 +835,26 @@ static void test_TxDraw(void)
hr = ITextServices_TxDraw( txtserv, DVASPECT_CONTENT, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, TXTVIEW_INACTIVE ); - ok( hr == E_INVALIDARG, "got %08x\n", hr ); + ok( hr == E_INVALIDARG, "got %08lx\n", hr ); hr = ITextServices_TxDraw( txtserv, DVASPECT_CONTENT, 0, NULL, NULL, hdc, NULL, NULL, NULL, NULL, NULL, 0, TXTVIEW_INACTIVE ); - ok( hr == E_INVALIDARG, "got %08x\n", hr ); + ok( hr == E_INVALIDARG, "got %08lx\n", hr ); hr = ITextServices_TxDraw( txtserv, DVASPECT_CONTENT, 0, NULL, NULL, NULL, NULL, (RECTL *)&client, NULL, NULL, NULL, 0, TXTVIEW_INACTIVE ); - ok( hr == E_FAIL, "got %08x\n", hr ); + ok( hr == E_FAIL, "got %08lx\n", hr ); hr = ITextServices_TxDraw( txtserv, DVASPECT_CONTENT, 0, NULL, NULL, hdc, NULL, (RECTL *)&client, NULL, NULL, NULL, 0, TXTVIEW_INACTIVE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = ITextServices_TxDraw( txtserv, DVASPECT_CONTENT, 0, NULL, NULL, hdc, NULL, (RECTL *)&client, NULL, NULL, NULL, 0, TXTVIEW_ACTIVE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = ITextServices_OnTxInPlaceActivate( txtserv, &client ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = ITextServices_TxDraw( txtserv, DVASPECT_CONTENT, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, TXTVIEW_INACTIVE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = ITextServices_OnTxInPlaceDeactivate( txtserv );
@@ -929,15 +929,15 @@ static void test_COM(void) /* COM aggregation */ hr = pCreateTextServices(&unk_obj.IUnknown_iface, &texthost.ITextHost_iface, &unk_obj.inner_unk); - ok(hr == S_OK, "CreateTextServices failed: %08x\n", hr); + ok(hr == S_OK, "CreateTextServices failed: %08lx\n", hr); hr = IUnknown_QueryInterface(unk_obj.inner_unk, pIID_ITextServices, (void**)&textsrv); - ok(hr == S_OK, "QueryInterface for IID_ITextServices failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_ITextServices failed: %08lx\n", hr); refcount = ITextServices_AddRef(textsrv); ok(refcount == unk_obj.ref, "CreateTextServices just pretends to support COM aggregation\n"); refcount = ITextServices_Release(textsrv); ok(refcount == unk_obj.ref, "CreateTextServices just pretends to support COM aggregation\n"); refcount = ITextServices_Release(textsrv); - ok(refcount == 19, "Refcount should be back at 19 but is %u\n", refcount); + ok(refcount == 19, "Refcount should be back at 19 but is %lu\n", refcount);
IUnknown_Release(unk_obj.inner_unk); } @@ -963,92 +963,92 @@ static void test_QueryInterface(void) return;
refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 1, "got wrong ref count: %d\n", refcount); + ok(refcount == 1, "got wrong ref count: %ld\n", refcount);
/* IID_IRichEditOle */ hres = ITextServices_QueryInterface(txtserv, &IID_IRichEditOle, (void **)&txtsrv_reole); - ok(hres == S_OK, "ITextServices_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "ITextServices_QueryInterface: 0x%08lx\n", hres); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount); refcount = get_refcount((IUnknown *)txtsrv_reole); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount);
hres = ITextServices_QueryInterface( txtserv, &IID_IUnknown, (void **)&unk ); - ok( hres == S_OK, "got 0x%08x\n", hres ); + ok( hres == S_OK, "got 0x%08lx\n", hres ); hres = IRichEditOle_QueryInterface( txtsrv_reole, &IID_IUnknown, (void **)&unk2 ); - ok( hres == S_OK, "got 0x%08x\n", hres ); + ok( hres == S_OK, "got 0x%08lx\n", hres ); ok( unk == unk2, "unknowns differ\n" ); IUnknown_Release( unk2 ); IUnknown_Release( unk );
hres = IRichEditOle_QueryInterface(txtsrv_reole, &IID_ITextDocument, (void **)&txtdoc); - ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08lx\n", hres); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 3, "got wrong ref count: %d\n", refcount); + ok(refcount == 3, "got wrong ref count: %ld\n", refcount); refcount = get_refcount((IUnknown *)txtsrv_reole); - ok(refcount == 3, "got wrong ref count: %d\n", refcount); + ok(refcount == 3, "got wrong ref count: %ld\n", refcount);
ITextDocument_Release(txtdoc); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount);
hres = IRichEditOle_QueryInterface(txtsrv_reole, &IID_ITextDocument2Old, (void **)&txtdoc2old); - ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "IRichEditOle_QueryInterface: 0x%08lx\n", hres); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 3, "got wrong ref count: %d\n", refcount); + ok(refcount == 3, "got wrong ref count: %ld\n", refcount); refcount = get_refcount((IUnknown *)txtsrv_reole); - ok(refcount == 3, "got wrong ref count: %d\n", refcount); + ok(refcount == 3, "got wrong ref count: %ld\n", refcount);
ITextDocument2Old_Release(txtdoc2old); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount); IRichEditOle_Release(txtsrv_reole); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 1, "got wrong ref count: %d\n", refcount); + ok(refcount == 1, "got wrong ref count: %ld\n", refcount);
/* IID_ITextDocument */ hres = ITextServices_QueryInterface(txtserv, &IID_ITextDocument, (void **)&txtsrv_txtdoc); - ok(hres == S_OK, "ITextServices_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "ITextServices_QueryInterface: 0x%08lx\n", hres); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount); refcount = get_refcount((IUnknown *)txtsrv_txtdoc); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount);
hres = ITextDocument_QueryInterface(txtsrv_txtdoc, &IID_IRichEditOle, (void **)&reole); - ok(hres == S_OK, "ITextDocument_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "ITextDocument_QueryInterface: 0x%08lx\n", hres); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 3, "got wrong ref count: %d\n", refcount); + ok(refcount == 3, "got wrong ref count: %ld\n", refcount); refcount = get_refcount((IUnknown *)txtsrv_txtdoc); - ok(refcount == 3, "got wrong ref count: %d\n", refcount); + ok(refcount == 3, "got wrong ref count: %ld\n", refcount);
IRichEditOle_Release(reole); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount); ITextDocument_Release(txtsrv_txtdoc); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 1, "got wrong ref count: %d\n", refcount); + ok(refcount == 1, "got wrong ref count: %ld\n", refcount);
/* ITextDocument2Old */ hres = ITextServices_QueryInterface(txtserv, &IID_ITextDocument2Old, (void **)&txtsrv_txtdoc2old); - ok(hres == S_OK, "ITextServices_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "ITextServices_QueryInterface: 0x%08lx\n", hres); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount); refcount = get_refcount((IUnknown *)txtsrv_txtdoc2old); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount);
hres = ITextDocument2Old_QueryInterface(txtsrv_txtdoc2old, &IID_IRichEditOle, (void **)&reole); - ok(hres == S_OK, "ITextDocument2Old_QueryInterface: 0x%08x\n", hres); + ok(hres == S_OK, "ITextDocument2Old_QueryInterface: 0x%08lx\n", hres); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 3, "got wrong ref count: %d\n", refcount); + ok(refcount == 3, "got wrong ref count: %ld\n", refcount); refcount = get_refcount((IUnknown *)txtsrv_txtdoc2old); - ok(refcount == 3, "got wrong ref count: %d\n", refcount); + ok(refcount == 3, "got wrong ref count: %ld\n", refcount);
IRichEditOle_Release(reole); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 2, "got wrong ref count: %d\n", refcount); + ok(refcount == 2, "got wrong ref count: %ld\n", refcount); ITextDocument2Old_Release(txtsrv_txtdoc2old); refcount = get_refcount((IUnknown *)txtserv); - ok(refcount == 1, "got wrong ref count: %d\n", refcount); + ok(refcount == 1, "got wrong ref count: %ld\n", refcount);
ITextServices_Release(txtserv); ITextHost_Release(host); @@ -1069,13 +1069,13 @@ static void test_default_format(void)
cf2.cbSize = sizeof(CHARFORMAT2W); result = ITextServices_TxSendMessage(txtserv, EM_GETCHARFORMAT, SCF_DEFAULT, (LPARAM)&cf2, &lresult); - ok(result == S_OK, "ITextServices_TxSendMessage failed: 0x%08x.\n", result); + ok(result == S_OK, "ITextServices_TxSendMessage failed: 0x%08lx.\n", result);
ITextHostImpl_TxGetCharFormat(host, &host_cf); ok(!lstrcmpW(host_cf->szFaceName, cf2.szFaceName), "got wrong font name: %s.\n", wine_dbgstr_w(cf2.szFaceName)); - ok(cf2.yHeight == host_cf->yHeight, "got wrong yHeight: %d, expected %d.\n", cf2.yHeight, host_cf->yHeight); + ok(cf2.yHeight == host_cf->yHeight, "got wrong yHeight: %ld, expected %ld.\n", cf2.yHeight, host_cf->yHeight); expected_effects = (cf2.dwEffects & ~(CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR)); - ok(host_cf->dwEffects == expected_effects, "got wrong dwEffects: %x, expected %x.\n", cf2.dwEffects, expected_effects); + ok(host_cf->dwEffects == expected_effects, "got wrong dwEffects: %lx, expected %lx.\n", cf2.dwEffects, expected_effects); ok(cf2.bPitchAndFamily == host_cf->bPitchAndFamily, "got wrong bPitchAndFamily: %x, expected %x.\n", cf2.bPitchAndFamily, host_cf->bPitchAndFamily); ok(cf2.bCharSet == host_cf->bCharSet, "got wrong bCharSet: %x, expected %x.\n", cf2.bCharSet, host_cf->bCharSet); @@ -1100,17 +1100,17 @@ static void test_TxGetScroll(void) host_impl = impl_from_ITextHost( host );
ret = ITextServices_TxGetHScroll(txtserv, NULL, NULL, NULL, NULL, NULL); - ok(ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08x.\n", ret); + ok(ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08lx.\n", ret);
ret = ITextServices_TxGetVScroll(txtserv, NULL, NULL, NULL, NULL, NULL); - ok(ret == S_OK, "ITextServices_TxGetVScroll failed: 0x%08x.\n", ret); + ok(ret == S_OK, "ITextServices_TxGetVScroll failed: 0x%08lx.\n", ret);
ret = ITextServices_TxGetVScroll( txtserv, &min_pos, &max_pos, &pos, &page, &enabled ); - ok( ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08x.\n", ret ); - ok( min_pos == 0, "got %d\n", min_pos ); - ok( max_pos == 0, "got %d\n", max_pos ); - ok( pos == 0, "got %d\n", pos ); - ok( page == 0, "got %d\n", page ); + ok( ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08lx.\n", ret ); + ok( min_pos == 0, "got %ld\n", min_pos ); + ok( max_pos == 0, "got %ld\n", max_pos ); + ok( pos == 0, "got %ld\n", pos ); + ok( page == 0, "got %ld\n", page ); ok( !enabled, "got %d\n", enabled );
host_impl->scrollbars = WS_VSCROLL; @@ -1121,26 +1121,26 @@ static void test_TxGetScroll(void) 0, 0, 400, 400, 0, 0, 0, NULL ); host_impl->client_rect = client; ret = ITextServices_OnTxInPlaceActivate( txtserv, &client ); - ok( ret == S_OK, "got 0x%08x.\n", ret ); + ok( ret == S_OK, "got 0x%08lx.\n", ret );
ret = ITextServices_TxGetVScroll( txtserv, &min_pos, &max_pos, &pos, &page, &enabled ); - ok( ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08x.\n", ret ); - ok( min_pos == 0, "got %d\n", min_pos ); + ok( ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08lx.\n", ret ); + ok( min_pos == 0, "got %ld\n", min_pos ); todo_wine - ok( max_pos == 0, "got %d\n", max_pos ); - ok( pos == 0, "got %d\n", pos ); - ok( page == client.bottom, "got %d\n", page ); + ok( max_pos == 0, "got %ld\n", max_pos ); + ok( pos == 0, "got %ld\n", pos ); + ok( page == client.bottom, "got %ld\n", page ); ok( !enabled, "got %d\n", enabled );
ret = ITextServices_TxSetText( txtserv, lorem ); - ok( ret == S_OK, "got 0x%08x.\n", ret ); + ok( ret == S_OK, "got 0x%08lx.\n", ret );
ret = ITextServices_TxGetVScroll( txtserv, &min_pos, &max_pos, &pos, &page, &enabled ); - ok( ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08x.\n", ret ); - ok( min_pos == 0, "got %d\n", min_pos ); - ok( max_pos > client.bottom, "got %d\n", max_pos ); - ok( pos == 0, "got %d\n", pos ); - ok( page == client.bottom, "got %d\n", page ); + ok( ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08lx.\n", ret ); + ok( min_pos == 0, "got %ld\n", min_pos ); + ok( max_pos > client.bottom, "got %ld\n", max_pos ); + ok( pos == 0, "got %ld\n", pos ); + ok( page == client.bottom, "got %ld\n", page ); ok( enabled, "got %d\n", enabled );
host_impl->scrollbars = WS_VSCROLL | ES_DISABLENOSCROLL; @@ -1148,12 +1148,12 @@ static void test_TxGetScroll(void) ITextServices_TxSetText( txtserv, L"short" );
ret = ITextServices_TxGetVScroll( txtserv, &min_pos, &max_pos, &pos, &page, &enabled ); - ok( ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08x.\n", ret ); - ok( min_pos == 0, "got %d\n", min_pos ); + ok( ret == S_OK, "ITextServices_TxGetHScroll failed: 0x%08lx.\n", ret ); + ok( min_pos == 0, "got %ld\n", min_pos ); todo_wine - ok( max_pos == 0, "got %d\n", max_pos ); - ok( pos == 0, "got %d\n", pos ); - ok( page == client.bottom, "got %d\n", page ); + ok( max_pos == 0, "got %ld\n", max_pos ); + ok( pos == 0, "got %ld\n", pos ); + ok( page == client.bottom, "got %ld\n", page ); ok( !enabled, "got %d\n", enabled );
DestroyWindow( host_impl->window ); @@ -1183,33 +1183,33 @@ static void test_notifications( void ) 0, 0, 400, 400, 0, 0, 0, NULL ); host_impl->client_rect = client; hr = ITextServices_OnTxInPlaceActivate( txtserv, &client ); - ok( hr == S_OK, "got 0x%08x.\n", hr ); + ok( hr == S_OK, "got 0x%08lx.\n", hr );
hr = ITextServices_TxSendMessage( txtserv, EM_SETEVENTMASK, 0, ENM_SCROLL, &res ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
/* check EN_VSCROLL notification is sent */ en_vscroll_sent = 0; hr = ITextServices_TxSendMessage( txtserv, WM_VSCROLL, SB_LINEDOWN, 0, &res ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( en_vscroll_sent == 1, "got %d\n", en_vscroll_sent );
hr = ITextServices_TxSendMessage( txtserv, WM_VSCROLL, SB_BOTTOM, 0, &res ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( en_vscroll_sent == 2, "got %d\n", en_vscroll_sent );
/* but not when the thumb is moved */ hr = ITextServices_TxSendMessage( txtserv, WM_VSCROLL, MAKEWPARAM( SB_THUMBTRACK, 0 ), 0, &res ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = ITextServices_TxSendMessage( txtserv, WM_VSCROLL, MAKEWPARAM( SB_THUMBPOSITION, 0 ), 0, &res ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( en_vscroll_sent == 2, "got %d\n", en_vscroll_sent );
/* EN_UPDATE is sent by TxDraw() */ en_update_sent = 0; hr = ITextServices_TxDraw( txtserv, DVASPECT_CONTENT, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, TXTVIEW_ACTIVE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( en_update_sent == 1, "got %d\n", en_update_sent );
DestroyWindow( host_impl->window );
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109761
Your paranoid android.
=== w1064 (testbot log) ===
WineRunTask.pl:error: The previous 1 run(s) terminated abnormally
Signed-off-by: Huw Davies huw@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/riched32/tests/Makefile.in | 1 dlls/riched32/tests/editor.c | 138 ++++++++++++++++++++------------------- 2 files changed, 69 insertions(+), 70 deletions(-)
diff --git a/dlls/riched32/tests/Makefile.in b/dlls/riched32/tests/Makefile.in index d74a1b1682f..c73defc11d0 100644 --- a/dlls/riched32/tests/Makefile.in +++ b/dlls/riched32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = riched32.dll IMPORTS = ole32 user32
diff --git a/dlls/riched32/tests/editor.c b/dlls/riched32/tests/editor.c index 5e3a70c5c7d..b8b00352f26 100644 --- a/dlls/riched32/tests/editor.c +++ b/dlls/riched32/tests/editor.c @@ -110,18 +110,18 @@ static void test_WM_SETTEXT(void) LRESULT result;
result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)testitems[i].itemtext); - ok (result == 1, "[%d] WM_SETTEXT returned %ld instead of 1\n", i, result); + ok (result == 1, "[%d] WM_SETTEXT returned %Id instead of 1\n", i, result); result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buf); ok (result == lstrlenA(buf), - "[%d] WM_GETTEXT returned %ld instead of expected %u\n", + "[%d] WM_GETTEXT returned %Id instead of expected %u\n", i, result, lstrlenA(buf)); result = strcmp(testitems[i].itemtext, buf); ok (result == 0, - "[%d] WM_SETTEXT round trip: strcmp = %ld\n", i, result); + "[%d] WM_SETTEXT round trip: strcmp = %Id\n", i, result); result = SendMessageA(hwndRichEdit, EM_GETLINECOUNT, 0, 0); ok (result == (rtl ? testitems[i].lines_rtl : testitems[i].lines) || broken(testitems[i].lines_broken && result == testitems[i].lines_broken), - "[%d] EM_GETLINECOUNT returned %ld, expected %d\n", i, result, testitems[i].lines); + "[%d] EM_GETLINECOUNT returned %Id, expected %ld\n", i, result, testitems[i].lines); }
DestroyWindow(hwndRichEdit); @@ -217,11 +217,11 @@ static void test_EM_STREAMIN(void)
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 12, - "EM_STREAMIN: Test 0 returned %ld, expected 12\n", result); + "EM_STREAMIN: Test 0 returned %Id, expected 12\n", result); result = strcmp (buffer,"TestSomeText"); ok (result == 0, "EM_STREAMIN: Test 0 set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %ld, expected %d\n", es.dwError, 0);
/* Native richedit 2.0 ignores last \par */ es.dwCookie = (DWORD_PTR)&streamText0a; @@ -232,11 +232,11 @@ static void test_EM_STREAMIN(void)
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 12, - "EM_STREAMIN: Test 0-a returned %ld, expected 12\n", result); + "EM_STREAMIN: Test 0-a returned %Id, expected 12\n", result); result = strcmp (buffer,"TestSomeText"); ok (result == 0, "EM_STREAMIN: Test 0-a set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %ld, expected %d\n", es.dwError, 0);
/* Native richedit 2.0 ignores last \par, next-to-last \par appears */ es.dwCookie = (DWORD_PTR)&streamText0b; @@ -247,11 +247,11 @@ static void test_EM_STREAMIN(void)
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 14, - "EM_STREAMIN: Test 0-b returned %ld, expected 14\n", result); + "EM_STREAMIN: Test 0-b returned %Id, expected 14\n", result); result = strcmp (buffer,"TestSomeText\r\n"); ok (result == 0, "EM_STREAMIN: Test 0-b set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %ld, expected %d\n", es.dwError, 0);
es.dwCookie = (DWORD_PTR)&streamText1; es.dwError = 0; @@ -261,11 +261,11 @@ static void test_EM_STREAMIN(void)
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 12, - "EM_STREAMIN: Test 1 returned %ld, expected 12\n", result); + "EM_STREAMIN: Test 1 returned %Id, expected 12\n", result); result = strcmp (buffer,"TestSomeText"); ok (result == 0, "EM_STREAMIN: Test 1 set wrong text: Result: %s\n",buffer); - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %ld, expected %d\n", es.dwError, 0);
es.dwCookie = (DWORD_PTR)&streamText2; @@ -276,14 +276,14 @@ static void test_EM_STREAMIN(void) result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); todo_wine { ok (result == 9, - "EM_STREAMIN: Test 2 returned %ld, expected 9\n", result); + "EM_STREAMIN: Test 2 returned %Id, expected 9\n", result); } result = strcmp (buffer,"RichEdit1"); todo_wine { ok (result == 0, "EM_STREAMIN: Test 2 set wrong text: Result: %s\n",buffer); } - ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, 0); + ok(es.dwError == 0, "EM_STREAMIN: Test 0 set error %ld, expected %d\n", es.dwError, 0);
es.dwCookie = (DWORD_PTR)&streamText3; es.dwError = 0; @@ -292,10 +292,10 @@ static void test_EM_STREAMIN(void)
result = SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); ok (result == 0, - "EM_STREAMIN: Test 3 returned %ld, expected 0\n", result); + "EM_STREAMIN: Test 3 returned %Id, expected 0\n", result); ok (!*buffer, "EM_STREAMIN: Test 3 set wrong text: Result: %s\n",buffer); - ok(es.dwError == -16, "EM_STREAMIN: Test 0 set error %d, expected %d\n", es.dwError, -16); + ok(es.dwError == -16, "EM_STREAMIN: Test 0 set error %ld, expected %d\n", es.dwError, -16);
DestroyWindow(hwndRichEdit); } @@ -502,11 +502,11 @@ static void test_EM_LINELENGTH(void) win_skip("Win9x, WinME and NT4 don't handle '\r only' correctly\n"); return; } - ok(result == 9, "Incorrect line count of %ld\n", result); + ok(result == 9, "Incorrect line count of %Id\n", result);
for (i = 0; i < ARRAY_SIZE(offset_test); i++) { result = SendMessageA(hwndRichEdit, EM_LINELENGTH, offset_test[i][0], 0); - ok(result == offset_test[i][1], "Length of line at offset %d is %ld, expected %d\n", + ok(result == offset_test[i][1], "Length of line at offset %d is %Id, expected %d\n", offset_test[i][0], result, offset_test[i][1]); }
@@ -528,7 +528,7 @@ static void test_EM_LINELENGTH(void) for (i = 0; i < ARRAY_SIZE(offset_test1); i++) { result = SendMessageA(hwndRichEdit, EM_LINELENGTH, offset_test1[i][0], 0); todo_wine_if (offset_test1[i][2]) - ok(result == offset_test1[i][1], "Length of line at offset %d is %ld, expected %d\n", + ok(result == offset_test1[i][1], "Length of line at offset %d is %Id, expected %d\n", offset_test1[i][0], result, offset_test1[i][1]); } } @@ -554,14 +554,14 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 12; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 8, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 8, "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp(expect1, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
textRange.lpstrText = buffer; textRange.chrg.cpMin = 8; textRange.chrg.cpMax = 12; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 4, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 4, "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp(expect2, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text3); @@ -570,7 +570,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 11; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 7, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 7, "EM_GETTEXTRANGE returned %Id\n", result);
ok(!strcmp(expect3, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
@@ -583,7 +583,7 @@ static void test_EM_GETTEXTRANGE(void) textRange.chrg.cpMin = 4; textRange.chrg.cpMax = 8; result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange); - ok(result == 4, "EM_GETTEXTRANGE returned %ld\n", result); + ok(result == 4, "EM_GETTEXTRANGE returned %Id\n", result); ok(!strcmp("ef\x8e\xf0", buffer), "EM_GETTEXTRANGE filled %s\n", buffer); }
@@ -604,14 +604,14 @@ static void test_EM_GETSELTEXT(void)
SendMessageA(hwndRichEdit, EM_SETSEL, 4, 12); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 8, "EM_GETSELTEXT returned %ld\n", result); + ok(result == 8, "EM_GETSELTEXT returned %Id\n", result); ok(!strcmp(expect1, buffer), "EM_GETSELTEXT filled %s\n", buffer);
SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text2);
SendMessageA(hwndRichEdit, EM_SETSEL, 4, 11); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 7, "EM_GETSELTEXT returned %ld\n", result); + ok(result == 7, "EM_GETSELTEXT returned %Id\n", result); ok(!strcmp(expect2, buffer), "EM_GETSELTEXT filled %s\n", buffer);
/* Test with multibyte character */ @@ -622,7 +622,7 @@ static void test_EM_GETSELTEXT(void) SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"abcdef\x8e\xf0ghijk"); SendMessageA(hwndRichEdit, EM_SETSEL, 4, 8); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, 0, (LPARAM)buffer); - ok(result == 4, "EM_GETSELTEXT returned %ld\n", result); + ok(result == 4, "EM_GETSELTEXT returned %Id\n", result); ok(!strcmp("ef\x8e\xf0", buffer), "EM_GETSELTEXT filled %s\n", buffer); }
@@ -755,13 +755,13 @@ static void check_EM_FINDTEXTEX(HWND hwnd, const char *name, struct find_s *f, "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d\n", name, id, f->needle, f->start, f->end, f->flags, findloc); ok(ft.chrgText.cpMin == f->expected_loc, - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %d, expected %d\n", + "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, start at %ld, expected %d\n", name, id, f->needle, f->start, f->end, f->flags, ft.chrgText.cpMin, f->expected_loc); expected_end_loc = ((f->expected_loc == -1) ? -1 : f->expected_loc + strlen(f->needle)); ok(ft.chrgText.cpMax == expected_end_loc || broken(ft.chrgText.cpMin == -1 && ft.chrgText.cpMax == 0xdeadbeef), /* Win9x, WinME and NT4 */ - "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %d, expected %d\n", + "EM_FINDTEXTEX(%s,%d) '%s' in range(%d,%d), flags %08x, end at %ld, expected %d\n", name, id, f->needle, f->start, f->end, f->flags, ft.chrgText.cpMax, expected_end_loc); }
@@ -839,41 +839,41 @@ static void test_EM_POSFROMCHAR(void) { /* All the lines are 16 characters long */ result = SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, i * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + ok(result == 0, "EM_POSFROMCHAR returned %Id, expected 0\n", result); if (i == 0) { - ok(pl.y == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", pl.y); + ok(pl.y == 0, "EM_POSFROMCHAR reports y=%ld, expected 0\n", pl.y); ok(pl.x == 1 || broken(pl.x == 0), /* Win9x, WinME and NT4 */ - "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + "EM_POSFROMCHAR reports x=%ld, expected 1\n", pl.x); xpos = pl.x; xpos_rtl_adjusted = xpos + (is_rtl() ? 7 : 0); } else if (i == 1) { - ok(pl.y > 0, "EM_POSFROMCHAR reports y=%d, expected > 0\n", pl.y); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos); + ok(pl.y > 0, "EM_POSFROMCHAR reports y=%ld, expected > 0\n", pl.y); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%ld, expected %d\n", pl.x, xpos); height = pl.y; } else { - ok(pl.y == i * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, i * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos); + ok(pl.y == i * height, "EM_POSFROMCHAR reports y=%ld, expected %d\n", pl.y, i * height); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%ld, expected %d\n", pl.x, xpos); } }
/* Testing position at end of text */ result = SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos); + ok(result == 0, "EM_POSFROMCHAR returned %Id, expected 0\n", result); + ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%ld, expected %d\n", pl.y, 50 * height); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%ld, expected %d\n", pl.x, xpos);
/* Testing position way past end of text */ result = SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, 50 * height); + ok(result == 0, "EM_POSFROMCHAR returned %Id, expected 0\n", result); + ok(pl.y == 50 * height, "EM_POSFROMCHAR reports y=%ld, expected %d\n", pl.y, 50 * height);
- ok(pl.x == xpos_rtl_adjusted, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos_rtl_adjusted); + ok(pl.x == xpos_rtl_adjusted, "EM_POSFROMCHAR reports x=%ld, expected %d\n", pl.x, xpos_rtl_adjusted);
/* Testing that vertical scrolling does, in fact, have an effect on EM_POSFROMCHAR */ @@ -882,46 +882,46 @@ static void test_EM_POSFROMCHAR(void) { /* All the lines are 16 characters long */ result = SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, i * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); + ok(result == 0, "EM_POSFROMCHAR returned %Id, expected 0\n", result); ok(pl.y == (i - 1) * height, - "EM_POSFROMCHAR reports y=%d, expected %d\n", + "EM_POSFROMCHAR reports y=%ld, expected %d\n", pl.y, (i - 1) * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%ld, expected %d\n", pl.x, xpos); }
/* Testing position at end of text */ result = SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 50 * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height); - ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos); + ok(result == 0, "EM_POSFROMCHAR returned %Id, expected 0\n", result); + ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%ld, expected %d\n", pl.y, (50 - 1) * height); + ok(pl.x == xpos, "EM_POSFROMCHAR reports x=%ld, expected %d\n", pl.x, xpos);
/* Testing position way past end of text */ result = SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 55 * 16); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%d, expected %d\n", pl.y, (50 - 1) * height); - ok(pl.x == xpos_rtl_adjusted, "EM_POSFROMCHAR reports x=%d, expected %d\n", pl.x, xpos_rtl_adjusted); + ok(result == 0, "EM_POSFROMCHAR returned %Id, expected 0\n", result); + ok(pl.y == (50 - 1) * height, "EM_POSFROMCHAR reports y=%ld, expected %d\n", pl.y, (50 - 1) * height); + ok(pl.x == xpos_rtl_adjusted, "EM_POSFROMCHAR reports x=%ld, expected %d\n", pl.x, xpos_rtl_adjusted);
/* Testing that horizontal scrolling does, in fact, have an effect on EM_POSFROMCHAR */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)text); SendMessageA(hwndRichEdit, EM_SCROLL, SB_LINEUP, 0); /* line up */
result = SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 0); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", pl.y); + ok(result == 0, "EM_POSFROMCHAR returned %Id, expected 0\n", result); + ok(pl.y == 0, "EM_POSFROMCHAR reports y=%ld, expected 0\n", pl.y); ok(pl.x == 1 || broken(pl.x == 0), /* Win9x, WinME and NT4 */ - "EM_POSFROMCHAR reports x=%d, expected 1\n", pl.x); + "EM_POSFROMCHAR reports x=%ld, expected 1\n", pl.x); xpos = pl.x;
SendMessageA(hwndRichEdit, WM_HSCROLL, SB_LINERIGHT, 0); result = SendMessageA(hwndRichEdit, EM_POSFROMCHAR, (WPARAM)&pl, 0); - ok(result == 0, "EM_POSFROMCHAR returned %ld, expected 0\n", result); - ok(pl.y == 0, "EM_POSFROMCHAR reports y=%d, expected 0\n", pl.y); + ok(result == 0, "EM_POSFROMCHAR returned %Id, expected 0\n", result); + ok(pl.y == 0, "EM_POSFROMCHAR reports y=%ld, expected 0\n", pl.y); todo_wine { /* Fails on builtin because horizontal scrollbar is not being shown */ ok(pl.x < xpos || broken(pl.x == xpos), /* Win9x, WinME and NT4 */ - "EM_POSFROMCHAR reports x=%d, expected value less than %d\n", pl.x, xpos); + "EM_POSFROMCHAR reports x=%ld, expected value less than %d\n", pl.x, xpos); } DestroyWindow(hwndRichEdit); } @@ -1086,7 +1086,7 @@ static void test_EM_GETOPTIONS(void) WS_POPUP, 0, 0, 200, 60, NULL, NULL, hmoduleRichEdit, NULL); options = SendMessageA(hwnd, EM_GETOPTIONS, 0, 0); - ok(options == 0, "Incorrect options %x\n", options); + ok(options == 0, "Incorrect options %lx\n", options); DestroyWindow(hwnd);
hwnd = CreateWindowA(RICHEDIT_CLASS10A, NULL, @@ -1095,7 +1095,7 @@ static void test_EM_GETOPTIONS(void) options = SendMessageA(hwnd, EM_GETOPTIONS, 0, 0); ok(options == ECO_AUTOVSCROLL || broken(options == 0), /* Win9x, WinME and NT4 */ - "Incorrect initial options %x\n", options); + "Incorrect initial options %lx\n", options); DestroyWindow(hwnd); }
@@ -1192,7 +1192,7 @@ static void test_enter(void) { /* Set the text to the initial text */ result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)testenteritems[i].initialtext); - ok (result == 1, "[%d] WM_SETTEXT returned %ld instead of 1\n", i, result); + ok (result == 1, "[%d] WM_SETTEXT returned %Id instead of 1\n", i, result);
/* Send Enter */ SendMessageA(hwndRichEdit, EM_SETSEL, testenteritems[i].cursor, testenteritems[i].cursor); @@ -1247,7 +1247,7 @@ static void test_enter(void) getText.codepage = CP_ACP;
result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)""); - ok (result == 1, "[%d] WM_SETTEXT returned %ld instead of 1\n", i, result); + ok (result == 1, "[%d] WM_SETTEXT returned %Id instead of 1\n", i, result); SendMessageW(hwndRichEdit, WM_CHAR, 'T', 0); SendMessageW(hwndRichEdit, WM_KEYDOWN, VK_RETURN, 0);
@@ -1259,12 +1259,12 @@ static void test_enter(void) ok (result == 0, "[%d] EM_GETTEXTEX, GT_DEFAULT unexpected '%s', expected '%s'\n", i, resultbuf, expectedbuf);
result = SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)""); - ok (result == 1, "[%d] WM_SETTEXT returned %ld instead of 1\n", i, result); + ok (result == 1, "[%d] WM_SETTEXT returned %Id instead of 1\n", i, result); SendMessageW(hwndRichEdit, WM_CHAR, 'T', 0); SendMessageW(hwndRichEdit, WM_CHAR, '\r', 0);
result = SendMessageA(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM)buf); - ok(result == 3, "Got %ld\n", result); + ok(result == 3, "Got %Id\n", result); format_test_result(resultbuf, buf); format_test_result(expectedbuf, "T\r\n"); result = strcmp(resultbuf, expectedbuf); @@ -1322,7 +1322,7 @@ static void check_EM_EXSETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id result = SendMessageA(hwnd, EM_EXSETSEL, 0, (LPARAM)&cr);
todo_wine_if (setsel->result_todo) - ok(result == setsel->expected_retval, "EM_EXSETSEL(%d): expected: %ld actual: %ld\n", id, setsel->expected_retval, result); + ok(result == setsel->expected_retval, "EM_EXSETSEL(%d): expected: %Id actual: %Id\n", id, setsel->expected_retval, result);
SendMessageA(hwnd, EM_GETSEL, (WPARAM)&start, (LPARAM)&end);
@@ -1360,12 +1360,12 @@ static void test_EM_EXSETSEL(void) /* 012345 6 7 8901 */ cr.cpMin = 4; cr.cpMax = 8; result = SendMessageA(hwndRichEdit, EM_EXSETSEL, 0, (LPARAM)&cr); - todo_wine ok(result == 7, "EM_EXSETSEL return %ld expected 7\n", result); + todo_wine ok(result == 7, "EM_EXSETSEL return %Id expected 7\n", result); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, sizeof(bufA), (LPARAM)bufA); ok(!strcmp(bufA, "ef\x8e\xf0"), "EM_GETSELTEXT return incorrect string\n"); SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); - ok(cr.cpMin == 4, "Selection start incorrectly: %d expected 4\n", cr.cpMin); - ok(cr.cpMax == 8, "Selection end incorrectly: %d expected 8\n", cr.cpMax); + ok(cr.cpMin == 4, "Selection start incorrectly: %ld expected 4\n", cr.cpMin); + ok(cr.cpMax == 8, "Selection end incorrectly: %ld expected 8\n", cr.cpMax); }
DestroyWindow(hwndRichEdit); @@ -1378,7 +1378,7 @@ static void check_EM_SETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id) result = SendMessageA(hwnd, EM_SETSEL, setsel->min, setsel->max);
todo_wine_if (setsel->result_todo) - ok(result == setsel->expected_retval, "EM_SETSEL(%d): expected: %ld actual: %ld\n", id, setsel->expected_retval, result); + ok(result == setsel->expected_retval, "EM_SETSEL(%d): expected: %Id actual: %Id\n", id, setsel->expected_retval, result);
SendMessageA(hwnd, EM_GETSEL, (WPARAM)&start, (LPARAM)&end);
@@ -1419,7 +1419,7 @@ static void test_EM_SETSEL(void) SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"abcdef\x8e\xf0ghijk"); /* 012345 6 7 8901 */ result = SendMessageA(hwndRichEdit, EM_SETSEL, 4, 8); - todo_wine ok(result == 7, "EM_SETSEL return %ld expected 7\n", result); + todo_wine ok(result == 7, "EM_SETSEL return %Id expected 7\n", result); result = SendMessageA(hwndRichEdit, EM_GETSELTEXT, sizeof(buffA), (LPARAM)buffA); ok(!strcmp(buffA, "ef\x8e\xf0"), "EM_GETSELTEXT return incorrect string\n"); result = SendMessageA(hwndRichEdit, EM_GETSEL, (WPARAM)&sel_start, (LPARAM)&sel_end); @@ -1478,5 +1478,5 @@ START_TEST( editor )
OleFlushClipboard(); ret = FreeLibrary(hmoduleRichEdit); - ok(ret, "error: %u\n", GetLastError()); + ok(ret, "error: %lu\n", GetLastError()); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/rpcrt4/tests/Makefile.in | 2 dlls/rpcrt4/tests/cstub.c | 106 ++++++------- dlls/rpcrt4/tests/ndr_marshall.c | 322 +++++++++++++++++++------------------- dlls/rpcrt4/tests/rpc.c | 188 +++++++++++----------- dlls/rpcrt4/tests/rpc_async.c | 20 +- dlls/rpcrt4/tests/server.c | 126 +++++++-------- 6 files changed, 382 insertions(+), 382 deletions(-)
diff --git a/dlls/rpcrt4/tests/Makefile.in b/dlls/rpcrt4/tests/Makefile.in index 195c6cd2909..1e7276c893a 100644 --- a/dlls/rpcrt4/tests/Makefile.in +++ b/dlls/rpcrt4/tests/Makefile.in @@ -1,7 +1,7 @@ TESTDLL = rpcrt4.dll IMPORTS = oleaut32 ole32 rpcrt4 secur32 advapi32 EXTRAIDLFLAGS = --prefix-server=s_ -EXTRADEFS = -DWINE_NO_LONG_TYPES -DPROXY_DELEGATION +EXTRADEFS = -DPROXY_DELEGATION
server_EXTRAIDLFLAGS = -Os --prefix-client=mixed_ server_interp_EXTRAIDLFLAGS = -Oicf --prefix-client=interp_ diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c index e0f519fa1d6..d8b61d10a1a 100644 --- a/dlls/rpcrt4/tests/cstub.c +++ b/dlls/rpcrt4/tests/cstub.c @@ -499,13 +499,13 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
r = NdrDllGetClassObject(&CLSID_Unknown, &IID_IPSFactoryBuffer, (void**)&ppsf, proxy_file_list, &CLSID_psfact, &PSFactoryBuffer); - ok(r == CLASS_E_CLASSNOTAVAILABLE, "NdrDllGetClassObject with unknown clsid should have returned CLASS_E_CLASSNOTAVAILABLE instead of 0x%x\n", r); + ok(r == CLASS_E_CLASSNOTAVAILABLE, "NdrDllGetClassObject with unknown clsid should have returned CLASS_E_CLASSNOTAVAILABLE instead of 0x%lx\n", r); ok(ppsf == NULL, "NdrDllGetClassObject should have set ppsf to NULL on failure\n");
r = NdrDllGetClassObject(&CLSID_psfact, &IID_IPSFactoryBuffer, (void**)&ppsf, proxy_file_list, &CLSID_psfact, &PSFactoryBuffer);
- ok(r == S_OK, "ret %08x\n", r); + ok(r == S_OK, "ret %08lx\n", r); ok(ppsf != NULL, "ppsf == NULL\n");
proxy_vtbl = PSFactoryBuffer.pProxyFileList[0]->pProxyVtblList; @@ -622,31 +622,31 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void) ok( proxy_vtbl[i]->header.piid == interfaces[i], "wrong proxy %u iid %p/%p\n", i, proxy_vtbl[i]->header.piid, interfaces[i] );
- ok(PSFactoryBuffer.RefCount == 1, "ref count %d\n", PSFactoryBuffer.RefCount); + ok(PSFactoryBuffer.RefCount == 1, "ref count %ld\n", PSFactoryBuffer.RefCount); IPSFactoryBuffer_Release(ppsf);
/* One can also search by IID */ r = NdrDllGetClassObject(&IID_if3, &IID_IPSFactoryBuffer, (void**)&ppsf, proxy_file_list, &CLSID_psfact, &PSFactoryBuffer); - ok(r == S_OK, "ret %08x\n", r); + ok(r == S_OK, "ret %08lx\n", r); ok(ppsf != NULL, "ppsf == NULL\n"); IPSFactoryBuffer_Release(ppsf);
r = NdrDllGetClassObject(&IID_if3, &IID_IPSFactoryBuffer, (void**)&ppsf, proxy_file_list, NULL, &PSFactoryBuffer); - ok(r == S_OK, "ret %08x\n", r); + ok(r == S_OK, "ret %08lx\n", r); ok(ppsf != NULL, "ppsf == NULL\n"); IPSFactoryBuffer_Release(ppsf);
/* but only if the PS factory implements it */ r = NdrDllGetClassObject(&IID_IDispatch, &IID_IPSFactoryBuffer, (void**)&ppsf, proxy_file_list, &CLSID_psfact, &PSFactoryBuffer); - ok(r == CLASS_E_CLASSNOTAVAILABLE, "ret %08x\n", r); + ok(r == CLASS_E_CLASSNOTAVAILABLE, "ret %08lx\n", r);
/* Create it again to return */ r = NdrDllGetClassObject(&CLSID_psfact, &IID_IPSFactoryBuffer, (void**)&ppsf, proxy_file_list, &CLSID_psfact, &PSFactoryBuffer); - ok(r == S_OK, "ret %08x\n", r); + ok(r == S_OK, "ret %08lx\n", r); ok(ppsf != NULL, "ppsf == NULL\n");
/* Because this PS factory is not loaded as a dll in the normal way, Windows 8 / 10 @@ -654,13 +654,13 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void) Registering the ifaces fixes this (in fact calling CoRegisterPSClsid() with any IID / CLSID is enough). */
r = CoRegisterPSClsid(&IID_if1, &CLSID_psfact); - ok(r == S_OK, "ret %08x\n", r); + ok(r == S_OK, "ret %08lx\n", r); r = CoRegisterPSClsid(&IID_if2, &CLSID_psfact); - ok(r == S_OK, "ret %08x\n", r); + ok(r == S_OK, "ret %08lx\n", r); r = CoRegisterPSClsid(&IID_if3, &CLSID_psfact); - ok(r == S_OK, "ret %08x\n", r); + ok(r == S_OK, "ret %08lx\n", r); r = CoRegisterPSClsid(&IID_if4, &CLSID_psfact); - ok(r == S_OK, "ret %08x\n", r); + ok(r == S_OK, "ret %08lx\n", r);
return ppsf; } @@ -712,7 +712,7 @@ static IRpcStubBuffer *create_stub(IPSFactoryBuffer *ppsf, REFIID iid, IUnknown HRESULT r;
r = IPSFactoryBuffer_CreateStub(ppsf, iid, obj, &pstub); - ok(r == expected_result, "CreateStub returned %08x expected %08x\n", r, expected_result); + ok(r == expected_result, "CreateStub returned %08lx expected %08lx\n", r, expected_result); return pstub; }
@@ -789,25 +789,25 @@ static void create_proxy_test( IPSFactoryBuffer *ppsf, REFIID iid, const void *e ULONG count;
r = IPSFactoryBuffer_CreateProxy(ppsf, NULL, iid, &proxy, (void **)&iface); - ok( r == S_OK, "IPSFactoryBuffer_CreateProxy failed %x\n", r ); + ok( r == S_OK, "IPSFactoryBuffer_CreateProxy failed %lx\n", r ); ok( *(void **)iface == expected_vtbl, "wrong iface pointer %p/%p\n", *(void **)iface, expected_vtbl ); count = IUnknown_Release( iface ); - ok( count == 1, "wrong refcount %u\n", count ); + ok( count == 1, "wrong refcount %lu\n", count ); count = IRpcProxyBuffer_Release( proxy ); - ok( count == 0, "wrong refcount %u\n", count ); + ok( count == 0, "wrong refcount %lu\n", count );
dummy_unknown.ref = 4; r = IPSFactoryBuffer_CreateProxy(ppsf, &dummy_unknown.IUnknown_iface, iid, &proxy, (void **)&iface); - ok( r == S_OK, "IPSFactoryBuffer_CreateProxy failed %x\n", r ); - ok( dummy_unknown.ref == 5, "wrong refcount %u\n", dummy_unknown.ref ); + ok( r == S_OK, "IPSFactoryBuffer_CreateProxy failed %lx\n", r ); + ok( dummy_unknown.ref == 5, "wrong refcount %lu\n", dummy_unknown.ref ); ok( *(void **)iface == expected_vtbl, "wrong iface pointer %p/%p\n", *(void **)iface, expected_vtbl ); count = IUnknown_Release( iface ); - ok( count == 4, "wrong refcount %u\n", count ); - ok( dummy_unknown.ref == 4, "wrong refcount %u\n", dummy_unknown.ref ); + ok( count == 4, "wrong refcount %lu\n", count ); + ok( dummy_unknown.ref == 4, "wrong refcount %lu\n", dummy_unknown.ref ); count = IRpcProxyBuffer_Release( proxy ); - ok( count == 0, "wrong refcount %u\n", count ); - ok( dummy_unknown.ref == 4, "wrong refcount %u\n", dummy_unknown.ref ); + ok( count == 0, "wrong refcount %lu\n", count ); + ok( dummy_unknown.ref == 4, "wrong refcount %lu\n", dummy_unknown.ref ); }
static void test_CreateProxy( IPSFactoryBuffer *ppsf ) @@ -827,7 +827,7 @@ static void test_CreateStub(IPSFactoryBuffer *ppsf) const CInterfaceStubHeader *header = &CONTAINING_RECORD(cstd_stub->lpVtbl, const CInterfaceStubVtbl, Vtbl)->header;
ok(IsEqualIID(header->piid, &IID_if1), "header iid differs\n"); - ok(cstd_stub->RefCount == 1, "ref count %d\n", cstd_stub->RefCount); + ok(cstd_stub->RefCount == 1, "ref count %ld\n", cstd_stub->RefCount); /* 0xdeadbeef returned from create_stub_test_QI */ ok(cstd_stub->pvServerObject == (void*)0xdeadbeef, "pvServerObject %p\n", cstd_stub->pvServerObject); ok(cstd_stub->pPSFactory != NULL, "pPSFactory was NULL\n"); @@ -836,7 +836,7 @@ static void test_CreateStub(IPSFactoryBuffer *ppsf)
vtbl = &create_stub_test_fail_vtbl; pstub = create_stub(ppsf, &IID_if1, obj, E_NOINTERFACE); - ok(pstub == S_OK, "create_stub failed: %u\n", GetLastError()); + ok(pstub == S_OK, "create_stub failed: %lu\n", GetLastError());
}
@@ -926,14 +926,14 @@ static void test_Connect(IPSFactoryBuffer *ppsf)
obj = (IUnknown*)&new_vtbl; r = IRpcStubBuffer_Connect(pstub, obj); - ok(r == S_OK, "r %08x\n", r); + ok(r == S_OK, "r %08lx\n", r); ok(connect_test_orig_release_called == 1, "release called %d\n", connect_test_orig_release_called); ok(cstd_stub->pvServerObject == (void*)0xcafebabe, "pvServerObject %p\n", cstd_stub->pvServerObject);
cstd_stub->pvServerObject = (IUnknown*)&orig_vtbl; obj = (IUnknown*)&new_fail_vtbl; r = IRpcStubBuffer_Connect(pstub, obj); - ok(r == E_NOINTERFACE, "r %08x\n", r); + ok(r == E_NOINTERFACE, "r %08lx\n", r); ok(cstd_stub->pvServerObject == (void*)0xdeadbeef, "pvServerObject %p\n", cstd_stub->pvServerObject); ok(connect_test_orig_release_called == 2, "release called %d\n", connect_test_orig_release_called);
@@ -954,7 +954,7 @@ static void test_Connect(IPSFactoryBuffer *ppsf)
obj = (IUnknown*)&new_vtbl; r = IRpcStubBuffer_Connect(pstub, obj); - ok(r == S_OK, "r %08x\n", r); + ok(r == S_OK, "r %08lx\n", r); ok(connect_test_base_Connect_called == 1, "connect_test_bsae_Connect called %d times\n", connect_test_base_Connect_called); ok(connect_test_orig_release_called == 3, "release called %d\n", connect_test_orig_release_called); @@ -1004,21 +1004,21 @@ static void test_Release(IPSFactoryBuffer *ppsf) facbuf_refs = PSFactoryBuffer.RefCount;
/* This shows that NdrCStdStubBuffer_Release doesn't call Disconnect */ - ok(cstd_stub->RefCount == 1, "ref count %d\n", cstd_stub->RefCount); + ok(cstd_stub->RefCount == 1, "ref count %ld\n", cstd_stub->RefCount); connect_test_orig_release_called = 0; IRpcStubBuffer_Release(pstub); todo_wine { ok(connect_test_orig_release_called == 0, "release called %d\n", connect_test_orig_release_called); } - ok(PSFactoryBuffer.RefCount == facbuf_refs - 1, "factory buffer refs %d orig %d\n", PSFactoryBuffer.RefCount, facbuf_refs); + ok(PSFactoryBuffer.RefCount == facbuf_refs - 1, "factory buffer refs %ld orig %ld\n", PSFactoryBuffer.RefCount, facbuf_refs);
/* This shows that NdrCStdStubBuffer_Release calls Release on its 2nd arg, rather than on This->pPSFactory (which are usually the same and indeed it's odd that _Release requires this 2nd arg). */ pstub = create_stub(ppsf, &IID_if1, obj, S_OK); - ok(PSFactoryBuffer.RefCount == facbuf_refs, "factory buffer refs %d orig %d\n", PSFactoryBuffer.RefCount, facbuf_refs); + ok(PSFactoryBuffer.RefCount == facbuf_refs, "factory buffer refs %ld orig %ld\n", PSFactoryBuffer.RefCount, facbuf_refs); NdrCStdStubBuffer_Release(pstub, (IPSFactoryBuffer*)pretend_psfacbuf); ok(release_test_psfacbuf_release_called == 1, "pretend_psfacbuf_release called %d\n", release_test_psfacbuf_release_called); - ok(PSFactoryBuffer.RefCount == facbuf_refs, "factory buffer refs %d orig %d\n", PSFactoryBuffer.RefCount, facbuf_refs); + ok(PSFactoryBuffer.RefCount == facbuf_refs, "factory buffer refs %ld orig %ld\n", PSFactoryBuffer.RefCount, facbuf_refs); }
static HRESULT WINAPI delegating_invoke_test_QI(ITypeLib *pUnk, REFIID iid, void** ppv) @@ -1142,11 +1142,11 @@ static void test_delegating_Invoke(IPSFactoryBuffer *ppsf) msg.dataRepresentation = NDR_LOCAL_DATA_REPRESENTATION; msg.iMethod = 3; r = IRpcStubBuffer_Invoke(pstub, &msg, pchan); - ok(r == S_OK, "ret %08x\n", r); + ok(r == S_OK, "ret %08lx\n", r); if(r == S_OK) { - ok(*(DWORD*)msg.Buffer == 0xabcdef, "buf[0] %08x\n", *(DWORD*)msg.Buffer); - ok(*((DWORD*)msg.Buffer + 1) == S_OK, "buf[1] %08x\n", *((DWORD*)msg.Buffer + 1)); + ok(*(DWORD*)msg.Buffer == 0xabcdef, "buf[0] %08lx\n", *(DWORD*)msg.Buffer); + ok(*((DWORD*)msg.Buffer + 1) == S_OK, "buf[1] %08lx\n", *((DWORD*)msg.Buffer + 1)); } /* free the buffer allocated by delegating_invoke_chan_get_buffer */ HeapFree(GetProcessHeap(), 0, msg.Buffer); @@ -1200,19 +1200,19 @@ static void test_NdrDllRegisterProxy( void )
res = NdrDllRegisterProxy(NULL, NULL, NULL); - ok(res == E_HANDLE, "Incorrect return code %x\n",res); + ok(res == E_HANDLE, "Incorrect return code %lx\n",res); pf = NULL; res = NdrDllRegisterProxy(hmod, &pf, NULL); - ok(res == E_NOINTERFACE, "Incorrect return code %x\n",res); + ok(res == E_NOINTERFACE, "Incorrect return code %lx\n",res); res = NdrDllRegisterProxy(hmod, proxy_file_list2, NULL); - ok(res == E_NOINTERFACE, "Incorrect return code %x\n",res); + ok(res == E_NOINTERFACE, "Incorrect return code %lx\n",res); /* This fails on Vista and Windows 7 due to permissions */ res = NdrDllRegisterProxy(hmod, proxy_file_list, NULL); - ok(res == S_OK || res == E_ACCESSDENIED, "NdrDllRegisterProxy failed %x\n",res); + ok(res == S_OK || res == E_ACCESSDENIED, "NdrDllRegisterProxy failed %lx\n",res); if (res == S_OK) { res = NdrDllUnregisterProxy(hmod,proxy_file_list, NULL); - ok(res == S_OK, "NdrDllUnregisterProxy failed %x\n",res); + ok(res == S_OK, "NdrDllUnregisterProxy failed %lx\n",res); } }
@@ -1228,7 +1228,7 @@ static HANDLE create_process(const char *arg) winetest_get_mainargs(&argv); sprintf(cmdline, ""%s" %s %s", argv[0], argv[1], arg); ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed: %u\n", GetLastError()); + ok(ret, "CreateProcess failed: %lu\n", GetLastError()); CloseHandle(pi.hThread); return pi.hProcess; } @@ -1340,30 +1340,30 @@ static void local_server_proc(void)
hr = CoRegisterClassObject(&CLSID_test1, (IUnknown *)&test_cf, CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE, &obj_cookie); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = NdrDllGetClassObject(&CLSID_test_ps, &IID_IPSFactoryBuffer, (void **)&ps, &aProxyFileList, &CLSID_test_ps, &gPFactory); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = CoRegisterClassObject(&CLSID_test_ps, (IUnknown *)ps, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &ps_cookie); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = CoRegisterPSClsid(&IID_ITest1, &CLSID_test_ps); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
SetEvent(ready_event);
hr = CoWaitForMultipleHandles(0, 1000, 1, &stop_event, &index); - ok(hr == S_OK, "got %#x\n", hr); - ok(!index, "got %u\n", index); + ok(hr == S_OK, "got %#lx\n", hr); + ok(!index, "got %lu\n", index);
hr = CoRevokeClassObject(ps_cookie); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = CoRevokeClassObject(obj_cookie); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
CoUninitialize(); ExitProcess(0); @@ -1387,23 +1387,23 @@ static void test_delegated_methods(void)
hr = NdrDllGetClassObject(&CLSID_test_ps, &IID_IPSFactoryBuffer, (void **)&ps, &aProxyFileList, &CLSID_test_ps, &gPFactory); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = CoRegisterClassObject(&CLSID_test_ps, (IUnknown *)ps, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &ps_cookie); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = CoRegisterPSClsid(&IID_ITest1, &CLSID_test_ps); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = CoCreateInstance(&CLSID_test1, NULL, CLSCTX_LOCAL_SERVER, &IID_ITest1, (void **)&test_obj); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
ret = ITest1_square(test_obj, 3); ok(ret == 9, "got %d\n", ret);
hr = ITest1_GetClassID(test_obj, &clsid); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(IsEqualGUID(&clsid, &CLSID_test1), "got %s\n", wine_dbgstr_guid(&clsid));
ITest1_Release(test_obj); @@ -1412,7 +1412,7 @@ static void test_delegated_methods(void) ok(!WaitForSingleObject(process, 1000), "wait failed\n");
hr = CoRevokeClassObject(ps_cookie); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); }
START_TEST( cstub ) diff --git a/dlls/rpcrt4/tests/ndr_marshall.c b/dlls/rpcrt4/tests/ndr_marshall.c index 12240e30928..5d72f5efc61 100644 --- a/dlls/rpcrt4/tests/ndr_marshall.c +++ b/dlls/rpcrt4/tests/ndr_marshall.c @@ -157,17 +157,17 @@ static void test_ndr_simple_type(void) l = 0xcafebabe; NdrSimpleTypeMarshall(&StubMsg, (unsigned char*)&l, FC_LONG); ok(StubMsg.Buffer == StubMsg.BufferStart + 4, "%p %p\n", StubMsg.Buffer, StubMsg.BufferStart); - ok(*(LONG*)StubMsg.BufferStart == l, "%d\n", *(LONG*)StubMsg.BufferStart); + ok(*(LONG*)StubMsg.BufferStart == l, "%ld\n", *(LONG*)StubMsg.BufferStart);
StubMsg.Buffer = StubMsg.BufferStart + 1; NdrSimpleTypeMarshall(&StubMsg, (unsigned char*)&l, FC_LONG); ok(StubMsg.Buffer == StubMsg.BufferStart + 8, "%p %p\n", StubMsg.Buffer, StubMsg.BufferStart); - ok(*(LONG*)(StubMsg.BufferStart + 4) == l, "%d\n", *(LONG*)StubMsg.BufferStart); + ok(*(LONG*)(StubMsg.BufferStart + 4) == l, "%ld\n", *(LONG*)StubMsg.BufferStart);
StubMsg.Buffer = StubMsg.BufferStart + 1; NdrSimpleTypeUnmarshall(&StubMsg, (unsigned char*)&l2, FC_LONG); ok(StubMsg.Buffer == StubMsg.BufferStart + 8, "%p %p\n", StubMsg.Buffer, StubMsg.BufferStart); - ok(l2 == l, "%d\n", l2); + ok(l2 == l, "%ld\n", l2);
HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart); } @@ -203,7 +203,7 @@ static void test_pointer_marshal(const unsigned char *formattypes, NdrPointerBufferSize( &StubMsg, memsrc, formattypes ); - ok(StubMsg.BufferLength >= wiredatalen, "%s: length %d\n", msgpfx, StubMsg.BufferLength); + ok(StubMsg.BufferLength >= wiredatalen, "%s: length %ld\n", msgpfx, StubMsg.BufferLength);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); @@ -220,7 +220,7 @@ static void test_pointer_marshal(const unsigned char *formattypes, } else { - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); ok(!memcmp(StubMsg.BufferStart, wiredata, wiredatalen), "%s: incorrectly marshaled\n", msgpfx); }
@@ -228,32 +228,32 @@ static void test_pointer_marshal(const unsigned char *formattypes, StubMsg.MemorySize = 0;
size = NdrPointerMemorySize( &StubMsg, formattypes ); - ok(size == StubMsg.MemorySize, "%s: mem size %u size %u\n", msgpfx, StubMsg.MemorySize, size); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(size == StubMsg.MemorySize, "%s: mem size %lu size %lu\n", msgpfx, StubMsg.MemorySize, size); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); if (formattypes[1] & FC_POINTER_DEREF) - ok(size == srcsize + sizeof(void *), "%s: mem size %u\n", msgpfx, size); + ok(size == srcsize + sizeof(void *), "%s: mem size %lu\n", msgpfx, size); else - ok(size == srcsize, "%s: mem size %u\n", msgpfx, size); + ok(size == srcsize, "%s: mem size %lu\n", msgpfx, size);
StubMsg.Buffer = StubMsg.BufferStart; StubMsg.MemorySize = 16; size = NdrPointerMemorySize( &StubMsg, formattypes ); - ok(size == StubMsg.MemorySize, "%s: mem size %u size %u\n", msgpfx, StubMsg.MemorySize, size); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(size == StubMsg.MemorySize, "%s: mem size %lu size %lu\n", msgpfx, StubMsg.MemorySize, size); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); if (formattypes[1] & FC_POINTER_DEREF) - ok(size == srcsize + sizeof(void *) + 16, "%s: mem size %u\n", msgpfx, size); + ok(size == srcsize + sizeof(void *) + 16, "%s: mem size %lu\n", msgpfx, size); else - ok(size == srcsize + 16, "%s: mem size %u\n", msgpfx, size); + ok(size == srcsize + 16, "%s: mem size %lu\n", msgpfx, size);
StubMsg.Buffer = StubMsg.BufferStart; StubMsg.MemorySize = 1; size = NdrPointerMemorySize( &StubMsg, formattypes ); - ok(size == StubMsg.MemorySize, "%s: mem size %u size %u\n", msgpfx, StubMsg.MemorySize, size); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(size == StubMsg.MemorySize, "%s: mem size %lu size %lu\n", msgpfx, StubMsg.MemorySize, size); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); if (formattypes[1] & FC_POINTER_DEREF) - ok(size == srcsize + sizeof(void *) + (srcsize == 8 ? 8 : sizeof(void *)), "%s: mem size %u\n", msgpfx, size); + ok(size == srcsize + sizeof(void *) + (srcsize == 8 ? 8 : sizeof(void *)), "%s: mem size %lu\n", msgpfx, size); else - ok(size == srcsize + (srcsize == 8 ? 8 : sizeof(void *)), "%s: mem size %u\n", msgpfx, size); + ok(size == srcsize + (srcsize == 8 ? 8 : sizeof(void *)), "%s: mem size %lu\n", msgpfx, size);
size = srcsize; if (formattypes[1] & FC_POINTER_DEREF) size += 4; @@ -270,8 +270,8 @@ static void test_pointer_marshal(const unsigned char *formattypes, ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); ok(mem == mem_orig, "%s: mem has changed %p %p\n", msgpfx, mem, mem_orig); ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(StubMsg.MemorySize == 0, "%s: memorysize %ld\n", msgpfx, StubMsg.MemorySize); ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); /* On Windows 7+ unmarshalling may involve calls to NdrFree, for unclear reasons. */ my_free_called = 0; @@ -297,8 +297,8 @@ static void test_pointer_marshal(const unsigned char *formattypes, /* doesn't allocate mem in this case */ ok(mem == mem_orig, "%s: mem has changed %p %p\n", msgpfx, mem, mem_orig); ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(StubMsg.MemorySize == 0, "%s: memorysize %ld\n", msgpfx, StubMsg.MemorySize); ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); ok(!my_free_called, "%s: my_free got called %d times\n", msgpfx, my_free_called);
@@ -322,8 +322,8 @@ static void test_pointer_marshal(const unsigned char *formattypes, ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); ok(mem != StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem points to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart); ok(!cmp(mem, memsrc, size), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(StubMsg.MemorySize == 0, "%s: memorysize %ld\n", msgpfx, StubMsg.MemorySize); ok(my_alloc_called == num_additional_allocs + 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); my_alloc_called = 0; NdrPointerFree(&StubMsg, mem, formattypes); @@ -341,8 +341,8 @@ static void test_pointer_marshal(const unsigned char *formattypes, else ok(mem == StubMsg.BufferStart + wiredatalen - srcsize, "%s: mem doesn't point to buffer %p %p\n", msgpfx, mem, StubMsg.BufferStart); ok(!cmp(mem, memsrc, size), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(StubMsg.MemorySize == 0, "%s: memorysize %ld\n", msgpfx, StubMsg.MemorySize); if (formattypes[2] != FC_ENUM16) { ok(my_alloc_called == num_additional_allocs, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); @@ -363,8 +363,8 @@ static void test_pointer_marshal(const unsigned char *formattypes, ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); ok(!!mem, "%s: mem was not allocated\n", msgpfx); ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(StubMsg.MemorySize == 0, "%s: memorysize %ld\n", msgpfx, StubMsg.MemorySize); if (formattypes[2] == FC_ENUM16) ok(my_alloc_called == 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); else @@ -395,8 +395,8 @@ static void test_pointer_marshal(const unsigned char *formattypes, ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); ok(!!mem, "%s: mem was not allocated\n", msgpfx); ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(StubMsg.MemorySize == 0, "%s: memorysize %ld\n", msgpfx, StubMsg.MemorySize); if (formattypes[2] == FC_ENUM16) ok(my_alloc_called == 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); else @@ -433,8 +433,8 @@ static void test_pointer_marshal(const unsigned char *formattypes, HeapFree(GetProcessHeap(), 0, mem_orig); } ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(StubMsg.MemorySize == 0, "%s: memorysize %ld\n", msgpfx, StubMsg.MemorySize); if (formattypes[2] == FC_ENUM16) ok(my_alloc_called == 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); else if ((formattypes[1] & FC_ALLOCED_ON_STACK) && (formattypes[1] & FC_POINTER_DEREF)) @@ -470,8 +470,8 @@ static void test_pointer_marshal(const unsigned char *formattypes, HeapFree(GetProcessHeap(), 0, mem_orig); } ok(!cmp(mem, memsrc, srcsize), "%s: incorrectly unmarshaled\n", msgpfx); - ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %d\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); - ok(StubMsg.MemorySize == 0, "%s: memorysize %d\n", msgpfx, StubMsg.MemorySize); + ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p len %ld\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart, wiredatalen); + ok(StubMsg.MemorySize == 0, "%s: memorysize %ld\n", msgpfx, StubMsg.MemorySize); if (formattypes[2] == FC_ENUM16) ok(my_alloc_called == 1, "%s: my_alloc got called %d times\n", msgpfx, my_alloc_called); else if ((formattypes[1] & FC_ALLOCED_ON_STACK) && (formattypes[1] & FC_POINTER_DEREF)) @@ -753,7 +753,7 @@ static void test_nontrivial_pointer_types(void) &fmtstr_ref_unique_out[4] );
/* Windows overestimates the buffer size */ - ok(StubMsg.BufferLength >= 5, "length %d\n", StubMsg.BufferLength); + ok(StubMsg.BufferLength >= 5, "length %ld\n", StubMsg.BufferLength);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); @@ -762,7 +762,7 @@ static void test_nontrivial_pointer_types(void) ptr = NdrPointerMarshall( &StubMsg, (unsigned char *)p1, &fmtstr_ref_unique_out[4] ); ok(ptr == NULL, "ret %p\n", ptr); size = StubMsg.Buffer - StubMsg.BufferStart; - ok(size == 5, "Buffer %p Start %p len %d\n", StubMsg.Buffer, StubMsg.BufferStart, size); + ok(size == 5, "Buffer %p Start %p len %ld\n", StubMsg.Buffer, StubMsg.BufferStart, size); ok(*(unsigned int *)StubMsg.BufferStart != 0, "pointer ID marshalled incorrectly\n"); ok(*(unsigned char *)(StubMsg.BufferStart + 4) == 0x22, "char data marshalled incorrectly: 0x%x\n", *(unsigned char *)(StubMsg.BufferStart + 4)); @@ -893,25 +893,25 @@ static void test_simple_struct_marshal(const unsigned char *formattypes,
StubMsg.BufferLength = 0; NdrSimpleStructBufferSize( &StubMsg, memsrc, formattypes ); - ok(StubMsg.BufferLength >= wiredatalen, "%s: length %d\n", msgpfx, StubMsg.BufferLength); + ok(StubMsg.BufferLength >= wiredatalen, "%s: length %ld\n", msgpfx, StubMsg.BufferLength); StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); StubMsg.BufferEnd = StubMsg.BufferStart + StubMsg.BufferLength; ptr = NdrSimpleStructMarshall( &StubMsg, memsrc, formattypes ); ok(ptr == NULL, "%s: ret %p\n", msgpfx, ptr); ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart); - ok(!memcmp(StubMsg.BufferStart, wiredata, wiredatalen), "%s: incorrectly marshaled %08x %08x %08x\n", msgpfx, *(DWORD*)StubMsg.BufferStart,*((DWORD*)StubMsg.BufferStart+1),*((DWORD*)StubMsg.BufferStart+2)); + ok(!memcmp(StubMsg.BufferStart, wiredata, wiredatalen), "%s: incorrectly marshaled %08lx %08lx %08lx\n", msgpfx, *(DWORD*)StubMsg.BufferStart,*((DWORD*)StubMsg.BufferStart+1),*((DWORD*)StubMsg.BufferStart+2));
StubMsg.Buffer = StubMsg.BufferStart; StubMsg.MemorySize = 0; size = NdrSimpleStructMemorySize( &StubMsg, formattypes ); ok(size == StubMsg.MemorySize, "%s: size != MemorySize\n", msgpfx); - ok(size == srcsize, "%s: mem size %u\n", msgpfx, size); + ok(size == srcsize, "%s: mem size %lu\n", msgpfx, size); ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart);
StubMsg.Buffer = StubMsg.BufferStart; size = NdrSimpleStructMemorySize( &StubMsg, formattypes ); ok(size == StubMsg.MemorySize, "%s: size != MemorySize\n", msgpfx); - ok(StubMsg.MemorySize == ((srcsize + 3) & ~3) + srcsize, "%s: mem size %u\n", msgpfx, size); + ok(StubMsg.MemorySize == ((srcsize + 3) & ~3) + srcsize, "%s: mem size %lu\n", msgpfx, size); ok(StubMsg.Buffer - StubMsg.BufferStart == wiredatalen, "%s: Buffer %p Start %p\n", msgpfx, StubMsg.Buffer, StubMsg.BufferStart); size = srcsize; /*** Unmarshalling first with must_alloc false ***/ @@ -1370,12 +1370,12 @@ static void test_iface_ptr(void) IPersist_AddRef(&server_obj.IPersist_iface); ptr = NdrInterfacePointerMarshall(&StubMsg, (unsigned char *)&server_obj.IPersist_iface, fmtstr_ip); ok(!ptr, "ret %p\n", ptr); - ok(server_obj.ref > 2, "got %d references\n", server_obj.ref); + ok(server_obj.ref > 2, "got %ld references\n", server_obj.ref); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called);
NdrInterfacePointerFree(&StubMsg, (unsigned char *)&server_obj.IPersist_iface, fmtstr_ip); - ok(server_obj.ref > 1, "got %d references\n", server_obj.ref); + ok(server_obj.ref > 1, "got %ld references\n", server_obj.ref);
StubMsg.IsClient = 1; my_alloc_called = my_free_called = 0; @@ -1386,15 +1386,15 @@ static void test_iface_ptr(void) ok(!!proxy, "mem not alloced\n"); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called); - ok(server_obj.ref > 1, "got %d references\n", server_obj.ref); + ok(server_obj.ref > 1, "got %ld references\n", server_obj.ref);
hr = IPersist_GetClassID(proxy, &clsid); - ok(hr == S_OK, "got hr %#x\n", hr); + ok(hr == S_OK, "got hr %#lx\n", hr); ok(IsEqualGUID(&clsid, &IID_IPersist), "wrong clsid %s\n", wine_dbgstr_guid(&clsid));
ref = IPersist_Release(proxy); - ok(ref == 1, "got %d references\n", ref); - ok(server_obj.ref == 1, "got %d references\n", server_obj.ref); + ok(ref == 1, "got %ld references\n", ref); + ok(server_obj.ref == 1, "got %ld references\n", server_obj.ref);
/* An existing interface pointer is released; this is necessary so that an * [in, out] pointer which changes does not leak references. */ @@ -1405,12 +1405,12 @@ static void test_iface_ptr(void) IPersist_AddRef(&server_obj.IPersist_iface); ptr = NdrInterfacePointerMarshall(&StubMsg, (unsigned char *)&server_obj.IPersist_iface, fmtstr_ip); ok(!ptr, "ret %p\n", ptr); - ok(server_obj.ref > 2, "got %d references\n", server_obj.ref); + ok(server_obj.ref > 2, "got %ld references\n", server_obj.ref); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called);
NdrInterfacePointerFree(&StubMsg, (unsigned char *)&server_obj.IPersist_iface, fmtstr_ip); - ok(server_obj.ref > 1, "got %d references\n", server_obj.ref); + ok(server_obj.ref > 1, "got %ld references\n", server_obj.ref);
StubMsg.IsClient = 1; my_alloc_called = my_free_called = 0; @@ -1422,16 +1422,16 @@ static void test_iface_ptr(void) ok(!!proxy && proxy != &client_obj.IPersist_iface, "mem not alloced\n"); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called); - ok(server_obj.ref > 1, "got %d references\n", server_obj.ref); - ok(client_obj.ref == 1, "got %d references\n", client_obj.ref); + ok(server_obj.ref > 1, "got %ld references\n", server_obj.ref); + ok(client_obj.ref == 1, "got %ld references\n", client_obj.ref);
hr = IPersist_GetClassID(proxy, &clsid); - ok(hr == S_OK, "got hr %#x\n", hr); + ok(hr == S_OK, "got hr %#lx\n", hr); ok(IsEqualGUID(&clsid, &IID_IPersist), "wrong clsid %s\n", wine_dbgstr_guid(&clsid));
ref = IPersist_Release(proxy); - ok(ref == 1, "got %d references\n", ref); - ok(server_obj.ref == 1, "got %d references\n", server_obj.ref); + ok(ref == 1, "got %ld references\n", ref); + ok(server_obj.ref == 1, "got %ld references\n", server_obj.ref);
/* client -> server */
@@ -1441,7 +1441,7 @@ static void test_iface_ptr(void) IPersist_AddRef(&client_obj.IPersist_iface); ptr = NdrInterfacePointerMarshall(&StubMsg, (unsigned char *)&client_obj.IPersist_iface, fmtstr_ip); ok(!ptr, "ret %p\n", ptr); - ok(client_obj.ref > 2, "got %d references\n", client_obj.ref); + ok(client_obj.ref > 2, "got %ld references\n", client_obj.ref); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called);
@@ -1454,18 +1454,18 @@ static void test_iface_ptr(void) ok(!!proxy, "mem not alloced\n"); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called); - ok(client_obj.ref > 2, "got %d references\n", client_obj.ref); + ok(client_obj.ref > 2, "got %ld references\n", client_obj.ref);
hr = IPersist_GetClassID(proxy, &clsid); - ok(hr == S_OK, "got hr %#x\n", hr); + ok(hr == S_OK, "got hr %#lx\n", hr); ok(IsEqualGUID(&clsid, &IID_IPersist), "wrong clsid %s\n", wine_dbgstr_guid(&clsid));
ref = IPersist_Release(proxy); - ok(client_obj.ref > 1, "got %d references\n", client_obj.ref); - ok(ref == client_obj.ref, "expected %d references, got %d\n", client_obj.ref, ref); + ok(client_obj.ref > 1, "got %ld references\n", client_obj.ref); + ok(ref == client_obj.ref, "expected %ld references, got %ld\n", client_obj.ref, ref);
NdrInterfacePointerFree(&StubMsg, (unsigned char *)proxy, fmtstr_ip); - ok(client_obj.ref == 1, "got %d references\n", client_obj.ref); + ok(client_obj.ref == 1, "got %ld references\n", client_obj.ref);
/* same, but free the interface after calling NdrInterfacePointerFree */
@@ -1475,7 +1475,7 @@ static void test_iface_ptr(void) IPersist_AddRef(&client_obj.IPersist_iface); ptr = NdrInterfacePointerMarshall(&StubMsg, (unsigned char *)&client_obj.IPersist_iface, fmtstr_ip); ok(!ptr, "ret %p\n", ptr); - ok(client_obj.ref > 2, "got %d references\n", client_obj.ref); + ok(client_obj.ref > 2, "got %ld references\n", client_obj.ref); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called);
@@ -1488,18 +1488,18 @@ static void test_iface_ptr(void) ok(!!proxy, "mem not alloced\n"); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called); - ok(client_obj.ref > 2, "got %d references\n", client_obj.ref); + ok(client_obj.ref > 2, "got %ld references\n", client_obj.ref);
NdrInterfacePointerFree(&StubMsg, (unsigned char *)proxy, fmtstr_ip); - ok(client_obj.ref > 1, "got %d references\n", client_obj.ref); + ok(client_obj.ref > 1, "got %ld references\n", client_obj.ref);
hr = IPersist_GetClassID(proxy, &clsid); - ok(hr == S_OK, "got hr %#x\n", hr); + ok(hr == S_OK, "got hr %#lx\n", hr); ok(IsEqualGUID(&clsid, &IID_IPersist), "wrong clsid %s\n", wine_dbgstr_guid(&clsid));
ref = IPersist_Release(proxy); - ok(ref == 1, "got %d references\n", ref); - ok(client_obj.ref == 1, "got %d references\n", client_obj.ref); + ok(ref == 1, "got %ld references\n", ref); + ok(client_obj.ref == 1, "got %ld references\n", client_obj.ref);
/* An existing interface pointer is *not* released (in fact, it is ignored * and may be invalid). In practice it will always be NULL anyway. */ @@ -1510,7 +1510,7 @@ static void test_iface_ptr(void) IPersist_AddRef(&client_obj.IPersist_iface); ptr = NdrInterfacePointerMarshall(&StubMsg, (unsigned char *)&client_obj.IPersist_iface, fmtstr_ip); ok(!ptr, "ret %p\n", ptr); - ok(client_obj.ref > 2, "got %d references\n", client_obj.ref); + ok(client_obj.ref > 2, "got %ld references\n", client_obj.ref); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called);
@@ -1524,20 +1524,20 @@ static void test_iface_ptr(void) ok(!!proxy && proxy != &server_obj.IPersist_iface, "mem not alloced\n"); ok(!my_alloc_called, "alloc called %d\n", my_alloc_called); ok(!my_free_called, "free called %d\n", my_free_called); - ok(client_obj.ref > 2, "got %d references\n", client_obj.ref); - ok(server_obj.ref == 2, "got %d references\n", server_obj.ref); + ok(client_obj.ref > 2, "got %ld references\n", client_obj.ref); + ok(server_obj.ref == 2, "got %ld references\n", server_obj.ref); IPersist_Release(&server_obj.IPersist_iface);
hr = IPersist_GetClassID(proxy, &clsid); - ok(hr == S_OK, "got hr %#x\n", hr); + ok(hr == S_OK, "got hr %#lx\n", hr); ok(IsEqualGUID(&clsid, &IID_IPersist), "wrong clsid %s\n", wine_dbgstr_guid(&clsid));
ref = IPersist_Release(proxy); - ok(client_obj.ref > 1, "got %d references\n", client_obj.ref); - ok(ref == client_obj.ref, "expected %d references, got %d\n", client_obj.ref, ref); + ok(client_obj.ref > 1, "got %ld references\n", client_obj.ref); + ok(ref == client_obj.ref, "expected %ld references, got %ld\n", client_obj.ref, ref);
NdrInterfacePointerFree(&StubMsg, (unsigned char *)proxy, fmtstr_ip); - ok(client_obj.ref == 1, "got %d references\n", client_obj.ref); + ok(client_obj.ref == 1, "got %ld references\n", client_obj.ref);
HeapFree(GetProcessHeap(), 0, StubMsg.BufferStart);
@@ -1557,23 +1557,23 @@ static void test_fullpointer_xlat(void)
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x1, "RefId should be 0x1 instead of 0x%x\n", RefId); + ok(RefId == 0x1, "RefId should be 0x1 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 0, &RefId); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x1, "RefId should be 0x1 instead of 0x%x\n", RefId); + ok(RefId == 0x1, "RefId should be 0x1 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebabe, 0, &RefId); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x2, "RefId should be 0x2 instead of 0x%x\n", RefId); + ok(RefId == 0x2, "RefId should be 0x2 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 0, &RefId); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); + ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, NULL, 0, &RefId); ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0, "RefId should be 0 instead of 0x%x\n", RefId); + ok(RefId == 0, "RefId should be 0 instead of 0x%lx\n", RefId);
/* "unmarshaling" phase */
@@ -1618,23 +1618,23 @@ static void test_fullpointer_xlat(void)
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); + ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId); ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); + ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 0, &RefId); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); + ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebabe, 0, &RefId); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x2, "RefId should be 0x2 instead of 0x%x\n", RefId); + ok(RefId == 0x2, "RefId should be 0x2 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 0, &RefId); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%x\n", RefId); + ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%lx\n", RefId);
/* "freeing" phase */
@@ -1643,11 +1643,11 @@ static void test_fullpointer_xlat(void)
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 0x20, &RefId); ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); + ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xcafebeef, 1, &RefId); ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%x\n", RefId); + ok(RefId == 0x3, "RefId should be 0x3 instead of 0x%lx\n", RefId);
ret = NdrFullPointerFree(pXlatTables, (void *)0xcafebabe); ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); @@ -1657,15 +1657,15 @@ static void test_fullpointer_xlat(void)
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 0x20, &RefId); ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%x\n", RefId); + ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 1, &RefId); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); - ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%x\n", RefId); + ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%lx\n", RefId);
ret = NdrFullPointerQueryPointer(pXlatTables, (void *)0xdeadbeef, 1, &RefId); ok(ret == 1, "ret should be 1 instead of 0x%x\n", ret); - ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%x\n", RefId); + ok(RefId == 0x4, "RefId should be 0x4 instead of 0x%lx\n", RefId);
ret = NdrFullPointerFree(pXlatTables, (void *)0xdeadbeef); ok(ret == 0, "ret should be 0 instead of 0x%x\n", ret); @@ -1682,8 +1682,8 @@ static void test_common_stub_data( const char *prefix, const MIDL_STUB_MESSAGE *
#define TEST_ZERO(field, fmt) ok(stubMsg->field == 0, "%s: " #field " should have been set to zero instead of " fmt "\n", prefix, stubMsg->field) #define TEST_POINTER_UNSET(field) ok(stubMsg->field == unset_ptr, "%s: " #field " should have been unset instead of %p\n", prefix, stubMsg->field) -#define TEST_ULONG_UNSET(field) ok(stubMsg->field == 0xcccccccc, "%s: " #field " should have been unset instead of 0x%x\n", prefix, stubMsg->field) -#define TEST_ULONG_PTR_UNSET(field) ok(stubMsg->field == (ULONG_PTR)unset_ptr, "%s: " #field " should have been unset instead of 0x%lx\n", prefix, stubMsg->field) +#define TEST_ULONG_UNSET(field) ok(stubMsg->field == 0xcccccccc, "%s: " #field " should have been unset instead of 0x%lx\n", prefix, stubMsg->field) +#define TEST_ULONG_PTR_UNSET(field) ok(stubMsg->field == (ULONG_PTR)unset_ptr, "%s: " #field " should have been unset instead of 0x%Ix\n", prefix, stubMsg->field)
TEST_POINTER_UNSET(BufferMark); TEST_ULONG_UNSET(MemorySize); @@ -1712,10 +1712,10 @@ static void test_common_stub_data( const char *prefix, const MIDL_STUB_MESSAGE * TEST_POINTER_UNSET(SavedHandle); ok(stubMsg->StubDesc == &Object_StubDesc, "%s: StubDesc should have been %p instead of %p\n", prefix, &Object_StubDesc, stubMsg->StubDesc); - TEST_ZERO(FullPtrRefId, "%d"); + TEST_ZERO(FullPtrRefId, "%ld"); ok( stubMsg->PointerLength == 0 || broken(stubMsg->PointerLength == 1), /* win9x, nt4 */ - "%s: pAsyncMsg should have been set to zero instead of %d\n", prefix, stubMsg->PointerLength ); + "%s: pAsyncMsg should have been set to zero instead of %ld\n", prefix, stubMsg->PointerLength ); TEST_ZERO(fInDontFree, "%d"); TEST_ZERO(fDontCallFreeInst, "%d"); ok( stubMsg->fHasReturn == 0 || broken(stubMsg->fHasReturn), /* win9x, nt4 */ @@ -1734,7 +1734,7 @@ static void test_common_stub_data( const char *prefix, const MIDL_STUB_MESSAGE * ok(stubMsg->fUnused2 == 0xffffcccc, "%s: fUnused2 should have been 0xffffcccc instead of 0x%x\n", prefix, stubMsg->fUnused2); ok(stubMsg->dwDestContext == MSHCTX_DIFFERENTMACHINE, - "%s: dwDestContext should have been MSHCTX_DIFFERENTMACHINE instead of %d\n", + "%s: dwDestContext should have been MSHCTX_DIFFERENTMACHINE instead of %ld\n", prefix, stubMsg->dwDestContext); TEST_ZERO(pvDestContext, "%p"); TEST_POINTER_UNSET(SavedContextHandles); @@ -1745,7 +1745,7 @@ static void test_common_stub_data( const char *prefix, const MIDL_STUB_MESSAGE * TEST_POINTER_UNSET(SizePtrOffsetArray); TEST_POINTER_UNSET(SizePtrLengthArray); TEST_POINTER_UNSET(pArgQueue); - TEST_ZERO(dwStubPhase, "%d"); + TEST_ZERO(dwStubPhase, "%ld"); /* FIXME: where does this value come from? */ trace("%s: LowStackMark is %p\n", prefix, stubMsg->LowStackMark); ok( stubMsg->pAsyncMsg == 0 || broken(stubMsg->pAsyncMsg == unset_ptr), /* win9x, nt4 */ @@ -1759,7 +1759,7 @@ static void test_common_stub_data( const char *prefix, const MIDL_STUB_MESSAGE * TEST_POINTER_UNSET(pCSInfo); TEST_POINTER_UNSET(ConformanceMark); TEST_POINTER_UNSET(VarianceMark); - ok(stubMsg->Unused == (ULONG_PTR)unset_ptr, "%s: Unused should have be unset instead of 0x%lx\n", + ok(stubMsg->Unused == (ULONG_PTR)unset_ptr, "%s: Unused should have be unset instead of 0x%Ix\n", prefix, stubMsg->Unused); TEST_POINTER_UNSET(pContext); TEST_POINTER_UNSET(ContextHandleHash); @@ -1801,7 +1801,7 @@ static void test_client_init(void) /* Note: ReservedForRuntime not tested */ ok(rpcMsg.ManagerEpv == unset_ptr, "rpcMsg.ManagerEpv should have been unset instead of %p\n", rpcMsg.ManagerEpv); ok(rpcMsg.ImportContext == unset_ptr, "rpcMsg.ImportContext should have been unset instead of %p\n", rpcMsg.ImportContext); - ok(rpcMsg.RpcFlags == 0, "rpcMsg.RpcFlags should have been 0 instead of 0x%x\n", rpcMsg.RpcFlags); + ok(rpcMsg.RpcFlags == 0, "rpcMsg.RpcFlags should have been 0 instead of 0x%lx\n", rpcMsg.RpcFlags);
ok(stubMsg.Buffer == unset_ptr, "stubMsg.Buffer should have been unset instead of %p\n", stubMsg.Buffer); @@ -1809,7 +1809,7 @@ static void test_client_init(void) stubMsg.BufferStart); ok(stubMsg.BufferEnd == NULL, "stubMsg.BufferEnd should have been NULL instead of %p\n", stubMsg.BufferEnd); - ok(stubMsg.BufferLength == 0, "stubMsg.BufferLength should have been 0 instead of %u\n", + ok(stubMsg.BufferLength == 0, "stubMsg.BufferLength should have been 0 instead of %lu\n", stubMsg.BufferLength); ok(stubMsg.IsClient == 1, "stubMsg.IsClient should have been 1 instead of %u\n", stubMsg.IsClient); ok(stubMsg.ReuseBuffer == 0, "stubMsg.ReuseBuffer should have been 0 instead of %d\n", @@ -1844,7 +1844,7 @@ static void test_server_init(void) ok(stubMsg.BufferStart == buffer, "stubMsg.BufferStart should have been %p instead of %p\n", buffer, stubMsg.BufferStart); ok(stubMsg.BufferEnd == buffer + sizeof(buffer), "stubMsg.BufferEnd should have been %p instead of %p\n", buffer + sizeof(buffer), stubMsg.BufferEnd); todo_wine - ok(stubMsg.BufferLength == 0, "stubMsg.BufferLength should have been 0 instead of %u\n", stubMsg.BufferLength); + ok(stubMsg.BufferLength == 0, "stubMsg.BufferLength should have been 0 instead of %lu\n", stubMsg.BufferLength); ok(stubMsg.IsClient == 0, "stubMsg.IsClient should have been 0 instead of %u\n", stubMsg.IsClient); ok(stubMsg.ReuseBuffer == 0 || broken(stubMsg.ReuseBuffer == 1), /* win2k */ @@ -1885,17 +1885,17 @@ static void test_ndr_allocate(void) { trace("v2 mem list format\n"); ok((char *)mem_list_v2 == (char *)p2 + 24, "expected mem_list_v2 pointer %p, but got %p\n", (char *)p2 + 24, mem_list_v2); - ok(mem_list_v2->magic == magic_MEML, "magic %08x\n", mem_list_v2->magic); - ok(mem_list_v2->size == 24, "wrong size for p2 %d\n", mem_list_v2->size); - ok(mem_list_v2->unknown == 0, "wrong unknown for p2 0x%x\n", mem_list_v2->unknown); + ok(mem_list_v2->magic == magic_MEML, "magic %08lx\n", mem_list_v2->magic); + ok(mem_list_v2->size == 24, "wrong size for p2 %ld\n", mem_list_v2->size); + ok(mem_list_v2->unknown == 0, "wrong unknown for p2 0x%lx\n", mem_list_v2->unknown); ok(mem_list_v2->next != NULL, "next NULL\n"); mem_list_v2 = mem_list_v2->next; if(mem_list_v2) { ok((char *)mem_list_v2 == (char *)p1 + 16, "expected mem_list_v2 pointer %p, but got %p\n", (char *)p1 + 16, mem_list_v2); - ok(mem_list_v2->magic == magic_MEML, "magic %08x\n", mem_list_v2->magic); - ok(mem_list_v2->size == 16, "wrong size for p1 %d\n", mem_list_v2->size); - ok(mem_list_v2->unknown == 0, "wrong unknown for p1 0x%x\n", mem_list_v2->unknown); + ok(mem_list_v2->magic == magic_MEML, "magic %08lx\n", mem_list_v2->magic); + ok(mem_list_v2->size == 16, "wrong size for p1 %ld\n", mem_list_v2->size); + ok(mem_list_v2->unknown == 0, "wrong unknown for p1 0x%lx\n", mem_list_v2->unknown); ok(mem_list_v2->next == NULL, "next %p\n", mem_list_v2->next); } } @@ -1944,7 +1944,7 @@ static void test_conformant_array(void) NdrConformantArrayBufferSize( &StubMsg, memsrc, fmtstr_conf_array ); - ok(StubMsg.BufferLength >= 20, "length %d\n", StubMsg.BufferLength); + ok(StubMsg.BufferLength >= 20, "length %ld\n", StubMsg.BufferLength);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); @@ -2055,7 +2055,7 @@ static void test_conformant_string(void) NdrPointerBufferSize( &StubMsg, (unsigned char *)memsrc, fmtstr_conf_str ); - ok(StubMsg.BufferLength >= sizeof(memsrc) + 12, "length %d\n", StubMsg.BufferLength); + ok(StubMsg.BufferLength >= sizeof(memsrc) + 12, "length %ld\n", StubMsg.BufferLength);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); @@ -2064,7 +2064,7 @@ static void test_conformant_string(void) ptr = NdrPointerMarshall( &StubMsg, (unsigned char *)memsrc, fmtstr_conf_str ); ok(ptr == NULL, "ret %p\n", ptr); size = StubMsg.Buffer - StubMsg.BufferStart; - ok(size == sizeof(memsrc) + 12, "Buffer %p Start %p len %d\n", + ok(size == sizeof(memsrc) + 12, "Buffer %p Start %p len %ld\n", StubMsg.Buffer, StubMsg.BufferStart, size); ok(!memcmp(StubMsg.BufferStart + 12, memsrc, sizeof(memsrc)), "incorrectly marshaled\n");
@@ -2180,7 +2180,7 @@ static void test_nonconformant_string(void) StubMsg.BufferLength = 0;
NdrNonConformantStringBufferSize( &StubMsg, memsrc, fmtstr_nonconf_str ); - ok(StubMsg.BufferLength >= strlen((char *)memsrc) + 1 + 8, "length %d\n", StubMsg.BufferLength); + ok(StubMsg.BufferLength >= strlen((char *)memsrc) + 1 + 8, "length %ld\n", StubMsg.BufferLength);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); @@ -2189,7 +2189,7 @@ static void test_nonconformant_string(void) ptr = NdrNonConformantStringMarshall( &StubMsg, memsrc, fmtstr_nonconf_str ); ok(ptr == NULL, "ret %p\n", ptr); size = StubMsg.Buffer - StubMsg.BufferStart; - ok(size == strlen((char *)memsrc) + 1 + 8, "Buffer %p Start %p len %d\n", + ok(size == strlen((char *)memsrc) + 1 + 8, "Buffer %p Start %p len %ld\n", StubMsg.Buffer, StubMsg.BufferStart, size); ok(!memcmp(StubMsg.BufferStart + 8, memsrc, strlen((char *)memsrc) + 1), "incorrectly marshaled\n");
@@ -2253,7 +2253,7 @@ static void test_nonconformant_string(void) StubMsg.BufferLength = 0;
NdrNonConformantStringBufferSize( &StubMsg, memsrc2, fmtstr_nonconf_str ); - ok(StubMsg.BufferLength >= strlen((char *)memsrc2) + 1 + 8, "length %d\n", StubMsg.BufferLength); + ok(StubMsg.BufferLength >= strlen((char *)memsrc2) + 1 + 8, "length %ld\n", StubMsg.BufferLength);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); @@ -2262,7 +2262,7 @@ static void test_nonconformant_string(void) ptr = NdrNonConformantStringMarshall( &StubMsg, memsrc2, fmtstr_nonconf_str ); ok(ptr == NULL, "ret %p\n", ptr); size = StubMsg.Buffer - StubMsg.BufferStart; - ok(size == strlen((char *)memsrc2) + 1 + 8, "Buffer %p Start %p len %d\n", + ok(size == strlen((char *)memsrc2) + 1 + 8, "Buffer %p Start %p len %ld\n", StubMsg.Buffer, StubMsg.BufferStart, size); ok(!memcmp(StubMsg.BufferStart + 8, memsrc2, strlen((char *)memsrc2) + 1), "incorrectly marshaled\n");
@@ -2388,7 +2388,7 @@ static void test_conf_complex_struct(void) NdrComplexStructBufferSize( &StubMsg, (unsigned char *)memsrc, &fmtstr_complex_struct[30] ); - ok(StubMsg.BufferLength >= 28, "length %d\n", StubMsg.BufferLength); + ok(StubMsg.BufferLength >= 28, "length %ld\n", StubMsg.BufferLength);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); @@ -2527,7 +2527,7 @@ static void test_conf_complex_array(void) #endif
expected_length = (4 + memsrc.dim1 * (2 + memsrc.dim2)) * 4; - ok(StubMsg.BufferLength >= expected_length, "length %d\n", StubMsg.BufferLength); + ok(StubMsg.BufferLength >= expected_length, "length %ld\n", StubMsg.BufferLength);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/ StubMsg.RpcMsg->Buffer = StubMsg.BufferStart = StubMsg.Buffer = HeapAlloc(GetProcessHeap(), 0, StubMsg.BufferLength); @@ -2546,13 +2546,13 @@ static void test_conf_complex_array(void)
buf = (DWORD *)StubMsg.BufferStart;
- ok(*buf == memsrc.dim1, "dim1 should have been %d instead of %08x\n", memsrc.dim1, *buf); + ok(*buf == memsrc.dim1, "dim1 should have been %d instead of %08lx\n", memsrc.dim1, *buf); buf++; - ok(*buf == memsrc.dim2, "dim2 should have been %d instead of %08x\n", memsrc.dim2, *buf); + ok(*buf == memsrc.dim2, "dim2 should have been %d instead of %08lx\n", memsrc.dim2, *buf); buf++; ok(*buf != 0, "pointer id should be non-zero\n"); buf++; - ok(*buf == memsrc.dim1, "Conformance should have been %d instead of %08x\n", memsrc.dim1, *buf); + ok(*buf == memsrc.dim1, "Conformance should have been %d instead of %08lx\n", memsrc.dim1, *buf); buf++; for(i = 0; i < memsrc.dim1; i++) { @@ -2561,11 +2561,11 @@ static void test_conf_complex_array(void) } for(i = 0; i < memsrc.dim1; i++) { - ok(*buf == memsrc.dim2, "Conformance should have been %d instead of %08x\n", memsrc.dim2, *buf); + ok(*buf == memsrc.dim2, "Conformance should have been %d instead of %08lx\n", memsrc.dim2, *buf); buf++; for(j = 0; j < memsrc.dim2; j++) { - ok(*buf == i * memsrc.dim2 + j, "got %08x\n", *buf); + ok(*buf == i * memsrc.dim2 + j, "got %08lx\n", *buf); buf++; } } @@ -2585,7 +2585,7 @@ static void test_conf_complex_array(void) ok(ptr == NULL, "ret %p\n", ptr); ok(mem->dim1 == memsrc.dim1, "mem->dim1 wasn't unmarshalled correctly (%d)\n", mem->dim1); ok(mem->dim2 == memsrc.dim2, "mem->dim2 wasn't unmarshalled correctly (%d)\n", mem->dim2); - ok(mem->array[1][0] == memsrc.dim2, "mem->array[1][0] wasn't unmarshalled correctly (%d)\n", mem->array[1][0]); + ok(mem->array[1][0] == memsrc.dim2, "mem->array[1][0] wasn't unmarshalled correctly (%ld)\n", mem->array[1][0]);
StubMsg.Buffer = StubMsg.BufferStart; #ifdef _WIN64 @@ -2618,11 +2618,11 @@ static void test_ndr_buffer(void) StubDesc.RpcInterfaceInformation = (void *)&IFoo___RpcServerInterface;
status = RpcServerUseProtseqEpA(ncalrpc, 20, endpoint, NULL); - ok(RPC_S_OK == status, "RpcServerUseProtseqEp failed with status %u\n", status); + ok(RPC_S_OK == status, "RpcServerUseProtseqEp failed with status %lu\n", status); status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %u\n", status); + ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %lu\n", status); status = RpcServerListen(1, 20, TRUE); - ok(RPC_S_OK == status, "RpcServerListen failed with status %u\n", status); + ok(RPC_S_OK == status, "RpcServerListen failed with status %lu\n", status); if (status != RPC_S_OK) { /* Failed to create a server, running client tests is useless */ @@ -2630,10 +2630,10 @@ static void test_ndr_buffer(void) }
status = RpcStringBindingComposeA(NULL, ncalrpc, NULL, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status);
status = RpcBindingFromStringBindingA(binding, &Handle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); RpcStringFreeA(&binding);
NdrClientInitializeNew(&RpcMessage, &StubMsg, &StubDesc, 5); @@ -2645,12 +2645,12 @@ static void test_ndr_buffer(void) ok(RpcMessage.BufferLength == 10 || broken(RpcMessage.BufferLength == 12), /* win2k */ "RpcMessage.BufferLength should have been 10 instead of %d\n", RpcMessage.BufferLength); - ok(RpcMessage.RpcFlags == 0, "RpcMessage.RpcFlags should have been 0x0 instead of 0x%x\n", RpcMessage.RpcFlags); + ok(RpcMessage.RpcFlags == 0, "RpcMessage.RpcFlags should have been 0x0 instead of 0x%lx\n", RpcMessage.RpcFlags); ok(StubMsg.Buffer != NULL, "Buffer should not have been NULL\n"); ok(!StubMsg.BufferStart, "BufferStart should have been NULL instead of %p\n", StubMsg.BufferStart); ok(!StubMsg.BufferEnd, "BufferEnd should have been NULL instead of %p\n", StubMsg.BufferEnd); todo_wine - ok(StubMsg.BufferLength == 0, "BufferLength should have left as 0 instead of being set to %d\n", StubMsg.BufferLength); + ok(StubMsg.BufferLength == 0, "BufferLength should have left as 0 instead of being set to %ld\n", StubMsg.BufferLength); old_buffer_valid_location = !StubMsg.fBufferValid; if (old_buffer_valid_location) ok(broken(StubMsg.CorrDespIncrement == TRUE), "fBufferValid should have been TRUE instead of 0x%x\n", StubMsg.CorrDespIncrement); @@ -2662,9 +2662,9 @@ static void test_ndr_buffer(void) NdrFreeBuffer(&StubMsg); ok(RpcMessage.Handle != NULL, "RpcMessage.Handle should not have been NULL\n"); ok(RpcMessage.Buffer != NULL, "RpcMessage.Buffer should not have been NULL\n"); - ok(RpcMessage.BufferLength == prev_buffer_length, "RpcMessage.BufferLength should have been left as %d instead of %d\n", prev_buffer_length, RpcMessage.BufferLength); + ok(RpcMessage.BufferLength == prev_buffer_length, "RpcMessage.BufferLength should have been left as %ld instead of %d\n", prev_buffer_length, RpcMessage.BufferLength); ok(StubMsg.Buffer != NULL, "Buffer should not have been NULL\n"); - ok(StubMsg.BufferLength == 1, "BufferLength should have left as 1 instead of being set to %d\n", StubMsg.BufferLength); + ok(StubMsg.BufferLength == 1, "BufferLength should have left as 1 instead of being set to %ld\n", StubMsg.BufferLength); if (old_buffer_valid_location) ok(broken(StubMsg.CorrDespIncrement == FALSE), "fBufferValid should have been FALSE instead of 0x%x\n", StubMsg.CorrDespIncrement); else @@ -2676,7 +2676,7 @@ static void test_ndr_buffer(void) RpcBindingFree(&Handle);
status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%lu)\n", status); }
static void test_NdrMapCommAndFaultStatus(void) @@ -2695,7 +2695,7 @@ static void test_NdrMapCommAndFaultStatus(void) ULONG expected_comm_status = 0; ULONG expected_fault_status = 0; status = NdrMapCommAndFaultStatus(&StubMsg, &comm_status, &fault_status, rpc_status); - ok(status == RPC_S_OK, "NdrMapCommAndFaultStatus failed with error %d\n", status); + ok(status == RPC_S_OK, "NdrMapCommAndFaultStatus failed with error %ld\n", status); switch (rpc_status) { case ERROR_INVALID_HANDLE: @@ -2715,9 +2715,9 @@ static void test_NdrMapCommAndFaultStatus(void) default: expected_fault_status = rpc_status; } - ok(comm_status == expected_comm_status, "NdrMapCommAndFaultStatus should have mapped %d to comm status %d instead of %d\n", + ok(comm_status == expected_comm_status, "NdrMapCommAndFaultStatus should have mapped %ld to comm status %ld instead of %ld\n", rpc_status, expected_comm_status, comm_status); - ok(fault_status == expected_fault_status, "NdrMapCommAndFaultStatus should have mapped %d to fault status %d instead of %d\n", + ok(fault_status == expected_fault_status, "NdrMapCommAndFaultStatus should have mapped %ld to fault status %ld instead of %ld\n", rpc_status, expected_fault_status, fault_status); } } @@ -2759,15 +2759,15 @@ static void test_NdrGetUserMarshalInfo(void) memset(&umi, 0xaa, sizeof(umi));
status = NdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); + ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %ld\n", status); ok( umi.InformationLevel == 1, - "umi.InformationLevel was %u instead of 1\n", + "umi.InformationLevel was %lu instead of 1\n", umi.InformationLevel); ok( U1(umi).Level1.Buffer == buffer + 15, "umi.Level1.Buffer was %p instead of %p\n", U1(umi).Level1.Buffer, buffer); ok( U1(umi).Level1.BufferSize == 1, - "umi.Level1.BufferSize was %u instead of 1\n", + "umi.Level1.BufferSize was %lu instead of 1\n", U1(umi).Level1.BufferSize); ok( U1(umi).Level1.pfnAllocate == my_alloc, "umi.Level1.pfnAllocate was %p instead of %p\n", @@ -2793,15 +2793,15 @@ static void test_NdrGetUserMarshalInfo(void) memset(&umi, 0xaa, sizeof(umi));
status = NdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); + ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %ld\n", status); ok( umi.InformationLevel == 1, - "umi.InformationLevel was %u instead of 1\n", + "umi.InformationLevel was %lu instead of 1\n", umi.InformationLevel); ok( U1(umi).Level1.Buffer == NULL, "umi.Level1.Buffer was %p instead of NULL\n", U1(umi).Level1.Buffer); ok( U1(umi).Level1.BufferSize == 0, - "umi.Level1.BufferSize was %u instead of 0\n", + "umi.Level1.BufferSize was %lu instead of 0\n", U1(umi).Level1.BufferSize); ok( U1(umi).Level1.pfnAllocate == my_alloc, "umi.Level1.pfnAllocate was %p instead of %p\n", @@ -2827,15 +2827,15 @@ static void test_NdrGetUserMarshalInfo(void) memset(&umi, 0xaa, sizeof(umi));
status = NdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); + ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %ld\n", status); ok( umi.InformationLevel == 1, - "umi.InformationLevel was %u instead of 1\n", + "umi.InformationLevel was %lu instead of 1\n", umi.InformationLevel); ok( U1(umi).Level1.Buffer == buffer + 15, "umi.Level1.Buffer was %p instead of %p\n", U1(umi).Level1.Buffer, buffer); ok( U1(umi).Level1.BufferSize == 1, - "umi.Level1.BufferSize was %u instead of 1\n", + "umi.Level1.BufferSize was %lu instead of 1\n", U1(umi).Level1.BufferSize); ok( U1(umi).Level1.pfnAllocate == my_alloc, "umi.Level1.pfnAllocate was %p instead of %p\n", @@ -2861,15 +2861,15 @@ static void test_NdrGetUserMarshalInfo(void) memset(&umi, 0xaa, sizeof(umi));
status = NdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); + ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %ld\n", status); ok( umi.InformationLevel == 1, - "umi.InformationLevel was %u instead of 1\n", + "umi.InformationLevel was %lu instead of 1\n", umi.InformationLevel); ok( U1(umi).Level1.Buffer == NULL, "umi.Level1.Buffer was %p instead of NULL\n", U1(umi).Level1.Buffer); ok( U1(umi).Level1.BufferSize == 0, - "umi.Level1.BufferSize was %u instead of 0\n", + "umi.Level1.BufferSize was %lu instead of 0\n", U1(umi).Level1.BufferSize); ok( U1(umi).Level1.pfnAllocate == my_alloc, "umi.Level1.pfnAllocate was %p instead of %p\n", @@ -2893,9 +2893,9 @@ static void test_NdrGetUserMarshalInfo(void) umcb.CBType = USER_MARSHAL_CB_MARSHALL;
status = NdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); + ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %ld\n", status); ok( U1(umi).Level1.BufferSize == 0, - "umi.Level1.BufferSize was %u instead of 0\n", + "umi.Level1.BufferSize was %lu instead of 0\n", U1(umi).Level1.BufferSize);
/* error conditions */ @@ -2903,22 +2903,22 @@ static void test_NdrGetUserMarshalInfo(void) rpc_msg.BufferLength = 14; status = NdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); ok(status == ERROR_INVALID_USER_BUFFER, - "NdrGetUserMarshalInfo should have failed with ERROR_INVALID_USER_BUFFER instead of %d\n", status); + "NdrGetUserMarshalInfo should have failed with ERROR_INVALID_USER_BUFFER instead of %ld\n", status);
rpc_msg.BufferLength = 15; status = NdrGetUserMarshalInfo(&umcb.Flags, 9999, &umi); ok(status == RPC_S_INVALID_ARG, - "NdrGetUserMarshalInfo should have failed with RPC_S_INVALID_ARG instead of %d\n", status); + "NdrGetUserMarshalInfo should have failed with RPC_S_INVALID_ARG instead of %ld\n", status);
umcb.CBType = 9999; status = NdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); - ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %d\n", status); + ok(status == RPC_S_OK, "NdrGetUserMarshalInfo failed with error %ld\n", status);
umcb.CBType = USER_MARSHAL_CB_MARSHALL; umcb.Signature = 0; status = NdrGetUserMarshalInfo(&umcb.Flags, 1, &umi); ok(status == RPC_S_INVALID_ARG, - "NdrGetUserMarshalInfo should have failed with RPC_S_INVALID_ARG instead of %d\n", status); + "NdrGetUserMarshalInfo should have failed with RPC_S_INVALID_ARG instead of %ld\n", status); }
static void test_MesEncodeFixedBufferHandleCreate(void) @@ -2929,54 +2929,54 @@ static void test_MesEncodeFixedBufferHandleCreate(void) char *buffer;
status = MesEncodeFixedBufferHandleCreate(NULL, 0, NULL, NULL); - ok(status == RPC_S_INVALID_ARG, "got %d\n", status); + ok(status == RPC_S_INVALID_ARG, "got %ld\n", status);
status = MesEncodeFixedBufferHandleCreate(NULL, 0, NULL, &handle); - ok(status == RPC_S_INVALID_ARG, "got %d\n", status); + ok(status == RPC_S_INVALID_ARG, "got %ld\n", status);
status = MesEncodeFixedBufferHandleCreate((char*)0xdeadbeef, 0, NULL, &handle); - ok(status == RPC_X_INVALID_BUFFER, "got %d\n", status); + ok(status == RPC_X_INVALID_BUFFER, "got %ld\n", status);
buffer = (void*)((0xdeadbeef + 7) & ~7); status = MesEncodeFixedBufferHandleCreate(buffer, 0, NULL, &handle); - ok(status == RPC_S_INVALID_ARG, "got %d\n", status); + ok(status == RPC_S_INVALID_ARG, "got %ld\n", status);
status = MesEncodeFixedBufferHandleCreate(buffer, 0, &encoded_size, &handle); todo_wine - ok(status == RPC_S_INVALID_ARG, "got %d\n", status); + ok(status == RPC_S_INVALID_ARG, "got %ld\n", status); if (status == RPC_S_OK) { MesHandleFree(handle); } status = MesEncodeFixedBufferHandleCreate(buffer, 32, NULL, &handle); - ok(status == RPC_S_INVALID_ARG, "got %d\n", status); + ok(status == RPC_S_INVALID_ARG, "got %ld\n", status);
status = MesEncodeFixedBufferHandleCreate(buffer, 32, &encoded_size, &handle); - ok(status == RPC_S_OK, "got %d\n", status); + ok(status == RPC_S_OK, "got %ld\n", status);
status = MesBufferHandleReset(NULL, MES_DYNAMIC_BUFFER_HANDLE, MES_ENCODE, &buffer, 32, &encoded_size); - ok(status == RPC_S_INVALID_ARG, "got %d\n", status); + ok(status == RPC_S_INVALID_ARG, "got %ld\n", status);
/* convert to dynamic buffer handle */ status = MesBufferHandleReset(handle, MES_DYNAMIC_BUFFER_HANDLE, MES_ENCODE, &buffer, 32, &encoded_size); - ok(status == RPC_S_OK, "got %d\n", status); + ok(status == RPC_S_OK, "got %ld\n", status);
status = MesBufferHandleReset(handle, MES_DYNAMIC_BUFFER_HANDLE, MES_ENCODE, NULL, 32, &encoded_size); - ok(status == RPC_S_INVALID_ARG, "got %d\n", status); + ok(status == RPC_S_INVALID_ARG, "got %ld\n", status);
status = MesBufferHandleReset(handle, MES_DYNAMIC_BUFFER_HANDLE, MES_ENCODE, &buffer, 32, NULL); - ok(status == RPC_S_INVALID_ARG, "got %d\n", status); + ok(status == RPC_S_INVALID_ARG, "got %ld\n", status);
/* invalid handle type */ status = MesBufferHandleReset(handle, MES_DYNAMIC_BUFFER_HANDLE+1, MES_ENCODE, &buffer, 32, &encoded_size); - ok(status == RPC_S_INVALID_ARG, "got %d\n", status); + ok(status == RPC_S_INVALID_ARG, "got %ld\n", status);
status = MesHandleFree(handle); - ok(status == RPC_S_OK, "got %d\n", status); + ok(status == RPC_S_OK, "got %ld\n", status); }
static void test_NdrCorrelationInitialize(void) diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index 413a715e16d..a4653fd603f 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -242,48 +242,48 @@ static void test_rpc_ncacn_ip_tcp(void)
status = RpcMgmtStopServerListening(NULL); ok(status == RPC_S_NOT_LISTENING, - "wrong RpcMgmtStopServerListening error (%u)\n", status); + "wrong RpcMgmtStopServerListening error (%lu)\n", status);
status = RpcMgmtWaitServerListen(); ok(status == RPC_S_NOT_LISTENING, - "wrong RpcMgmtWaitServerListen error status (%u)\n", status); + "wrong RpcMgmtWaitServerListen error status (%lu)\n", status);
status = RpcServerListen(1, 20, FALSE); ok(status == RPC_S_NO_PROTSEQS_REGISTERED, - "wrong RpcServerListen error (%u)\n", status); + "wrong RpcServerListen error (%lu)\n", status);
status = RpcServerUseProtseqEpA(ncacn_ip_tcp, 20, endpoint, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%lu)\n", status);
status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%lu)\n", status);
status = RpcServerListen(1, 20, TRUE); - ok(status == RPC_S_OK, "RpcServerListen failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcServerListen failed (%lu)\n", status);
status = RpcServerListen(1, 20, TRUE); ok(status == RPC_S_ALREADY_LISTENING, - "wrong RpcServerListen error (%u)\n", status); + "wrong RpcServerListen error (%lu)\n", status);
status = RpcStringBindingComposeA(NULL, ncacn_ip_tcp, address, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status);
status = RpcBindingFromStringBindingA(binding, &IFoo_IfHandle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status);
status = RpcBindingSetAuthInfoA(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE, RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); - ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%lu)\n", status);
status = RpcBindingInqAuthInfoA(IFoo_IfHandle, NULL, NULL, NULL, NULL, NULL); - ok(status == RPC_S_BINDING_HAS_NO_AUTH, "RpcBindingInqAuthInfo failed (%u)\n", + ok(status == RPC_S_BINDING_HAS_NO_AUTH, "RpcBindingInqAuthInfo failed (%lu)\n", status);
status = RpcBindingSetAuthInfoA(IFoo_IfHandle, spn, RPC_C_AUTHN_LEVEL_PKT_PRIVACY, RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); - ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%lu)\n", status);
level = authnsvc = authzsvc = 0; principal = (unsigned char *)0xdeadbeef; @@ -291,33 +291,33 @@ static void test_rpc_ncacn_ip_tcp(void) status = RpcBindingInqAuthInfoA(IFoo_IfHandle, &principal, &level, &authnsvc, &identity, &authzsvc);
- ok(status == RPC_S_OK, "RpcBindingInqAuthInfo failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcBindingInqAuthInfo failed (%lu)\n", status); ok(identity == NULL, "expected NULL identity, got %p\n", identity); ok(principal != (unsigned char *)0xdeadbeef, "expected valid principal, got %p\n", principal); - ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "expected RPC_C_AUTHN_LEVEL_PKT_PRIVACY, got %d\n", level); - ok(authnsvc == RPC_C_AUTHN_WINNT, "expected RPC_C_AUTHN_WINNT, got %d\n", authnsvc); - todo_wine ok(authzsvc == RPC_C_AUTHZ_NAME, "expected RPC_C_AUTHZ_NAME, got %d\n", authzsvc); + ok(level == RPC_C_AUTHN_LEVEL_PKT_PRIVACY, "expected RPC_C_AUTHN_LEVEL_PKT_PRIVACY, got %ld\n", level); + ok(authnsvc == RPC_C_AUTHN_WINNT, "expected RPC_C_AUTHN_WINNT, got %ld\n", authnsvc); + todo_wine ok(authzsvc == RPC_C_AUTHZ_NAME, "expected RPC_C_AUTHZ_NAME, got %ld\n", authzsvc); if (status == RPC_S_OK) RpcStringFreeA(&principal);
status = RpcMgmtStopServerListening(NULL); - ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", + ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n", status);
status = RpcMgmtStopServerListening(NULL); - ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", + ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%lu)\n", status);
status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcServerUnregisterIf failed (%lu)\n", status);
status = RpcMgmtWaitServerListen(); - ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%lu)\n", status);
status = RpcStringFreeA(&binding); - ok(status == RPC_S_OK, "RpcStringFree failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcStringFree failed (%lu)\n", status);
status = RpcBindingFree(&IFoo_IfHandle); - ok(status == RPC_S_OK, "RpcBindingFree failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcBindingFree failed (%lu)\n", status); }
/* this is what's generated with MS/RPC - it includes an extra 2 @@ -363,7 +363,7 @@ static void test_towers(void) ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "10.0.0.1", &tower); ok(ret == RPC_S_OK || broken(ret == RPC_S_INVALID_RPC_PROTSEQ), /* Vista */ - "TowerConstruct failed with error %d\n", ret); + "TowerConstruct failed with error %ld\n", ret); if (ret == RPC_S_INVALID_RPC_PROTSEQ) { /* Windows Vista fails with this error and crashes if we continue */ @@ -396,7 +396,7 @@ static void test_towers(void) }
ret = TowerExplode(tower, &object, &syntax, &protseq, &endpoint, &address); - ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); + ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret); ok(!memcmp(&object, &mapi_if_id, sizeof(mapi_if_id)), "object id didn't match\n"); ok(!memcmp(&syntax, &ndr_syntax, sizeof(syntax)), "syntax id didn't match\n"); ok(!strcmp(protseq, "ncacn_ip_tcp"), "protseq was "%s" instead of "ncacn_ip_tcp"\n", protseq); @@ -408,15 +408,15 @@ static void test_towers(void) I_RpcFree(address);
ret = TowerExplode(tower, NULL, NULL, NULL, NULL, NULL); - ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); + ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret);
I_RpcFree(tower);
/* test the behaviour for ip_tcp with name instead of dotted IP notation */ ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_ip_tcp", "135", "localhost", &tower); - ok(ret == RPC_S_OK, "TowerConstruct failed with error %d\n", ret); + ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret); ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address); - ok(ret == RPC_S_OK, "TowerExplode failed with error %d\n", ret); + ok(ret == RPC_S_OK, "TowerExplode failed with error %ld\n", ret); ok(!strcmp(address, "0.0.0.0") || broken(!strcmp(address, "255.255.255.255")), "address was "%s" instead of "0.0.0.0"\n", address); @@ -426,11 +426,11 @@ static void test_towers(void)
/* test the behaviour for np with no address */ ret = TowerConstruct(&mapi_if_id, &ndr_syntax, "ncacn_np", "\pipe\test", NULL, &tower); - ok(ret == RPC_S_OK, "TowerConstruct failed with error %d\n", ret); + ok(ret == RPC_S_OK, "TowerConstruct failed with error %ld\n", ret); ret = TowerExplode(tower, NULL, NULL, NULL, NULL, &address); ok(ret == RPC_S_OK || broken(ret != RPC_S_OK), /* win2k, indeterminate */ - "TowerExplode failed with error %d\n", ret); + "TowerExplode failed with error %ld\n", ret); /* Windows XP SP3 sets address to NULL */ ok(!address || !strcmp(address, ""), "address was "%s" instead of "" or NULL (XP SP3)\n", address);
@@ -576,7 +576,7 @@ static void test_I_RpcMapWin32Status(void)
ok(win32status == expected_win32status || broken(missing && win32status == rpc_status), - "I_RpcMapWin32Status(%d) should have returned 0x%x instead of 0x%x%s\n", + "I_RpcMapWin32Status(%ld) should have returned 0x%lx instead of 0x%lx%s\n", rpc_status, expected_win32status, win32status, broken(missing) ? " (or have returned with the given status)" : ""); } @@ -598,7 +598,7 @@ static void test_RpcStringBindingParseA(void)
/* test all parameters */ status = RpcStringBindingParseA(valid_binding, &uuid, &protseq, &network_addr, &endpoint, &options); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); @@ -615,7 +615,7 @@ static void test_RpcStringBindingParseA(void)
/* test all parameters with different type of string binding */ status = RpcStringBindingParseA(valid_binding2, &uuid, &protseq, &network_addr, &endpoint, &options); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); ok(!strcmp((char *)uuid, "00000000-0000-0000-c000-000000000046"), "uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s\n", uuid); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); ok(!strcmp((char *)network_addr, "."), "network_addr should have been . instead of %s\n", network_addr); @@ -632,24 +632,24 @@ static void test_RpcStringBindingParseA(void)
/* test with as many parameters NULL as possible */ status = RpcStringBindingParseA(valid_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); ok(!strcmp((char *)protseq, "ncacn_np"), "protseq should have been ncacn_np instead of %s\n", protseq); RpcStringFreeA(&protseq);
/* test with invalid uuid */ status = RpcStringBindingParseA(invalid_uuid_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_INVALID_STRING_UUID, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %d\n", status); + ok(status == RPC_S_INVALID_STRING_UUID, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %ld\n", status); ok(protseq == NULL, "protseq was %p instead of NULL\n", protseq);
/* test with invalid endpoint */ status = RpcStringBindingParseA(invalid_ep_binding, NULL, &protseq, NULL, NULL, NULL); - ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %d\n", status); + ok(status == RPC_S_OK, "RpcStringBindingParseA failed with error %ld\n", status); RpcStringFreeA(&protseq);
/* test with invalid binding */ status = RpcStringBindingParseA(invalid_binding, &uuid, &protseq, &network_addr, &endpoint, &options); todo_wine - ok(status == RPC_S_INVALID_STRING_BINDING, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %d\n", status); + ok(status == RPC_S_INVALID_STRING_BINDING, "RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %ld\n", status); todo_wine ok(uuid == NULL, "uuid was %p instead of NULL\n", uuid); if (uuid) @@ -687,9 +687,9 @@ static void test_RpcExceptionFilter(void) case STATUS_INSTRUCTION_MISALIGNMENT: case STATUS_STACK_OVERFLOW: case STATUS_POSSIBLE_DEADLOCK: - ok(retval == EXCEPTION_CONTINUE_SEARCH, "RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", + ok(retval == EXCEPTION_CONTINUE_SEARCH, "RpcExceptionFilter(0x%lx) should have returned %d instead of %d\n", exception, EXCEPTION_CONTINUE_SEARCH, retval); - ok(retval2 == EXCEPTION_CONTINUE_SEARCH, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", + ok(retval2 == EXCEPTION_CONTINUE_SEARCH, "I_RpcExceptionFilter(0x%lx) should have returned %d instead of %d\n", exception, EXCEPTION_CONTINUE_SEARCH, retval); break; case STATUS_GUARD_PAGE_VIOLATION: @@ -702,9 +702,9 @@ static void test_RpcExceptionFilter(void) } break; default: - ok(retval == EXCEPTION_EXECUTE_HANDLER, "RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", + ok(retval == EXCEPTION_EXECUTE_HANDLER, "RpcExceptionFilter(0x%lx) should have returned %d instead of %d\n", exception, EXCEPTION_EXECUTE_HANDLER, retval); - ok(retval2 == EXCEPTION_EXECUTE_HANDLER, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n", + ok(retval2 == EXCEPTION_EXECUTE_HANDLER, "I_RpcExceptionFilter(0x%lx) should have returned %d instead of %d\n", exception, EXCEPTION_EXECUTE_HANDLER, retval); } } @@ -721,21 +721,21 @@ static void test_RpcStringBindingFromBinding(void)
status = RpcStringBindingComposeA(NULL, ncacn_np, address, endpoint, NULL, &binding); - ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status);
status = RpcBindingFromStringBindingA(binding, &handle); - ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); RpcStringFreeA(&binding);
status = RpcBindingToStringBindingA(handle, &binding); - ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %u\n", status); + ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %lu\n", status);
ok(!strcmp((const char *)binding, "ncacn_np:.[\\pipe\\wine_rpc_test]"), "binding string didn't match what was expected: "%s"\n", binding); RpcStringFreeA(&binding);
status = RpcBindingFree(&handle); - ok(status == RPC_S_OK, "RpcBindingFree failed with error %u\n", status); + ok(status == RPC_S_OK, "RpcBindingFree failed with error %lu\n", status); }
static void test_UuidCreate(void) @@ -812,7 +812,7 @@ static void test_UuidCreateSequential(void)
ret = pUuidCreateSequential(&guid1); ok(!ret || ret == RPC_S_UUID_LOCAL_ONLY, - "expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08x\n", ret); + "expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08lx\n", ret); version = (guid1.Data3 & 0xf000) >> 12; ok(version == 1, "unexpected version %d\n", version); if (version == 1) @@ -842,7 +842,7 @@ static void test_UuidCreateSequential(void) */ ret = pUuidCreateSequential(&guid2); ok(!ret || ret == RPC_S_UUID_LOCAL_ONLY, - "expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08x\n", ret); + "expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08lx\n", ret); version = (guid2.Data3 & 0xf000) >> 12; ok(version == 1, "unexpected version %d\n", version); ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)), @@ -866,7 +866,7 @@ static void test_RpcBindingFree(void)
status = RpcBindingFree(&binding); ok(status == RPC_S_INVALID_BINDING, - "RpcBindingFree should have returned RPC_S_INVALID_BINDING instead of %d\n", + "RpcBindingFree should have returned RPC_S_INVALID_BINDING instead of %ld\n", status); }
@@ -896,10 +896,10 @@ static void test_RpcIfInqId(void) if (0) { status = pRpcIfInqId(NULL, &if_id); - ok(status == RPC_S_INVALID_ARG, "Expected %#x, got %#x.\n", RPC_S_INVALID_ARG, status); + ok(status == RPC_S_INVALID_ARG, "Expected %#x, got %#lx.\n", RPC_S_INVALID_ARG, status);
status = pRpcIfInqId((RPC_IF_HANDLE)&server_interface, NULL); - ok(status == RPC_S_INVALID_ARG, "Expected %#x, got %#x.\n", RPC_S_INVALID_ARG, status); + ok(status == RPC_S_INVALID_ARG, "Expected %#x, got %#lx.\n", RPC_S_INVALID_ARG, status); }
test_handles[0] = (RPC_IF_HANDLE)&server_interface; @@ -909,7 +909,7 @@ static void test_RpcIfInqId(void) { memset(&if_id, 0, sizeof(if_id)); status = pRpcIfInqId(test_handles[test_idx], &if_id); - ok(status == RPC_S_OK, "Test %u: Expected %#x, got %#x.\n", test_idx, RPC_S_OK, status); + ok(status == RPC_S_OK, "Test %u: Expected %#x, got %#lx.\n", test_idx, RPC_S_OK, status); ok(!memcmp(&if_id.Uuid, &guid, sizeof(guid)), "Test %u: Expected UUID %s, got %s.\n", test_idx, wine_dbgstr_guid(&guid), wine_dbgstr_guid(&if_id.Uuid)); ok(if_id.VersMajor == 1, "Test %u: Expected major version 1, got %hu.\n", test_idx, @@ -931,35 +931,35 @@ static void test_RpcServerInqDefaultPrincName(void) GetUserNameExA( NameSamCompatible, username, &len );
ret = RpcServerInqDefaultPrincNameA( 0, NULL ); - ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %u\n", ret ); + ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %lu\n", ret );
ret = RpcServerInqDefaultPrincNameA( RPC_C_AUTHN_DEFAULT, NULL ); - ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %u\n", ret ); + ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %lu\n", ret );
principal = (RPC_CSTR)0xdeadbeef; ret = RpcServerInqDefaultPrincNameA( RPC_C_AUTHN_DEFAULT, &principal ); - ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %u\n", ret ); + ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %lu\n", ret ); ok( principal == (RPC_CSTR)0xdeadbeef, "got unexpected principal\n" );
saved_principal = (RPC_CSTR)0xdeadbeef; ret = RpcServerInqDefaultPrincNameA( RPC_C_AUTHN_WINNT, &saved_principal ); - ok( ret == RPC_S_OK, "got %u\n", ret ); + ok( ret == RPC_S_OK, "got %lu\n", ret ); ok( saved_principal != (RPC_CSTR)0xdeadbeef, "expected valid principal\n" ); ok( !strcmp( (const char *)saved_principal, username ), "got '%s'\n", saved_principal ); trace("%s\n", saved_principal);
ret = RpcServerRegisterAuthInfoA( (RPC_CSTR)"wine\test", RPC_C_AUTHN_WINNT, NULL, NULL ); - ok( ret == RPC_S_OK, "got %u\n", ret ); + ok( ret == RPC_S_OK, "got %lu\n", ret );
principal = (RPC_CSTR)0xdeadbeef; ret = RpcServerInqDefaultPrincNameA( RPC_C_AUTHN_WINNT, &principal ); - ok( ret == RPC_S_OK, "got %u\n", ret ); + ok( ret == RPC_S_OK, "got %lu\n", ret ); ok( principal != (RPC_CSTR)0xdeadbeef, "expected valid principal\n" ); ok( !strcmp( (const char *)principal, username ), "got '%s'\n", principal ); RpcStringFreeA( &principal );
ret = RpcServerRegisterAuthInfoA( saved_principal, RPC_C_AUTHN_WINNT, NULL, NULL ); - ok( ret == RPC_S_OK, "got %u\n", ret ); + ok( ret == RPC_S_OK, "got %lu\n", ret );
RpcStringFreeA( &saved_principal ); HeapFree( GetProcessHeap(), 0, username ); @@ -970,7 +970,7 @@ static void test_RpcServerRegisterAuthInfo(void) RPC_STATUS status;
status = RpcServerRegisterAuthInfoW(NULL, 600, NULL, NULL); - ok(status == RPC_S_UNKNOWN_AUTHN_SERVICE, "status = %x\n", status); + ok(status == RPC_S_UNKNOWN_AUTHN_SERVICE, "status = %lx\n", status); }
static void test_RpcServerUseProtseq(void) @@ -993,12 +993,12 @@ static void test_RpcServerUseProtseq(void) else { binding_count_before = bindings->Count; - ok(status == RPC_S_OK, "RpcServerInqBindings failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerInqBindings failed with status %ld\n", status); for (i = 0; i < bindings->Count; i++) { RPC_CSTR str_bind; status = RpcBindingToStringBindingA(bindings->BindingH[i], &str_bind); - ok(status == RPC_S_OK, "RpcBindingToStringBinding failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcBindingToStringBinding failed with status %ld\n", status); if (lstrlenA((const char *)str_bind) > 12 && !memcmp(str_bind, "ncacn_ip_tcp", 12)) iptcp_registered = TRUE; if (lstrlenA((const char *)str_bind) > 8 && !memcmp(str_bind, "ncacn_np", 8)) @@ -1014,7 +1014,7 @@ static void test_RpcServerUseProtseq(void) * RpcServerUseProtseq(...) */ status = RpcServerUseProtseqEpA(ncalrpc, 0, NULL, NULL); ok(status == RPC_S_OK || broken(status == RPC_S_INVALID_ENDPOINT_FORMAT), - "RpcServerUseProtseqEp with NULL endpoint failed with status %d\n", + "RpcServerUseProtseqEp with NULL endpoint failed with status %ld\n", status);
/* register protocol sequences without explicit endpoints */ @@ -1022,28 +1022,28 @@ static void test_RpcServerUseProtseq(void) if (status == RPC_S_PROTSEQ_NOT_SUPPORTED) win_skip("ncacn_np not supported\n"); else - ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %ld\n", status); if (status == RPC_S_OK && !np_registered) endpoints_registered++;
status = RpcServerUseProtseqA(iptcp, 0, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %ld\n", status); if (status == RPC_S_OK && !iptcp_registered) endpoints_registered++;
status = RpcServerUseProtseqA(ncalrpc, 0, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %ld\n", status); if (status == RPC_S_OK && !ncalrpc_registered) endpoints_registered++;
status = RpcServerInqBindings(&bindings); - ok(status == RPC_S_OK, "RpcServerInqBindings failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerInqBindings failed with status %ld\n", status); binding_count_after1 = bindings->Count; ok(binding_count_after1 == binding_count_before + endpoints_registered, - "wrong binding count - before: %u, after %u, endpoints registered %u\n", + "wrong binding count - before: %lu, after %lu, endpoints registered %lu\n", binding_count_before, binding_count_after1, endpoints_registered); for (i = 0; i < bindings->Count; i++) { RPC_CSTR str_bind; status = RpcBindingToStringBindingA(bindings->BindingH[i], &str_bind); - ok(status == RPC_S_OK, "RpcBindingToStringBinding failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcBindingToStringBinding failed with status %ld\n", status); trace("string binding: %s\n", str_bind); RpcStringFreeA(&str_bind); } @@ -1054,19 +1054,19 @@ static void test_RpcServerUseProtseq(void) if (status == RPC_S_PROTSEQ_NOT_SUPPORTED) win_skip("ncacn_np not supported\n"); else - ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %ld\n", status);
status = RpcServerUseProtseqA(iptcp, 0, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %ld\n", status);
status = RpcServerUseProtseqA(ncalrpc, 0, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %ld\n", status);
status = RpcServerInqBindings(&bindings); - ok(status == RPC_S_OK, "RpcServerInqBindings failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerInqBindings failed with status %ld\n", status); binding_count_after2 = bindings->Count; ok(binding_count_after2 == binding_count_after1, - "bindings should have been re-used - after1: %u after2: %u\n", + "bindings should have been re-used - after1: %lu after2: %lu\n", binding_count_after1, binding_count_after2); RpcBindingVectorFree(&bindings); } @@ -1080,48 +1080,48 @@ static void test_endpoint_mapper(RPC_CSTR protseq, RPC_CSTR address) unsigned char *binding;
status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "%s: RpcServerRegisterIf failed (%u)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcServerRegisterIf failed (%lu)\n", protseq, status);
status = RpcServerInqBindings(&binding_vector); - ok(status == RPC_S_OK, "%s: RpcServerInqBindings failed with error %u\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcServerInqBindings failed with error %lu\n", protseq, status);
/* register endpoints created in test_RpcServerUseProtseq */ status = RpcEpRegisterA(IFoo_v0_0_s_ifspec, binding_vector, NULL, annotation); - ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %u\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %lu\n", protseq, status); /* reregister the same endpoint with no annotation */ status = RpcEpRegisterA(IFoo_v0_0_s_ifspec, binding_vector, NULL, NULL); - ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %u\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %lu\n", protseq, status);
status = RpcStringBindingComposeA(NULL, protseq, address, NULL, NULL, &binding); - ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%u)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%lu)\n", protseq, status);
status = RpcBindingFromStringBindingA(binding, &handle); - ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%u)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%lu)\n", protseq, status);
RpcStringFreeA(&binding);
status = RpcBindingReset(handle); - ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status);
status = RpcEpResolveBinding(handle, IFoo_v0_0_s_ifspec); ok(status == RPC_S_OK || broken(status == RPC_S_SERVER_UNAVAILABLE), /* win9x */ - "%s: RpcEpResolveBinding failed with error %u\n", protseq, status); + "%s: RpcEpResolveBinding failed with error %lu\n", protseq, status);
status = RpcBindingReset(handle); - ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %lu\n", protseq, status);
status = RpcBindingFree(&handle); - ok(status == RPC_S_OK, "%s: RpcBindingFree failed with error %u\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingFree failed with error %lu\n", protseq, status);
status = RpcServerUnregisterIf(NULL, NULL, FALSE); - ok(status == RPC_S_OK, "%s: RpcServerUnregisterIf failed (%u)\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcServerUnregisterIf failed (%lu)\n", protseq, status);
status = RpcEpUnregister(IFoo_v0_0_s_ifspec, binding_vector, NULL); - ok(status == RPC_S_OK, "%s: RpcEpUnregisterA failed with error %u\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcEpUnregisterA failed with error %lu\n", protseq, status);
status = RpcBindingVectorFree(&binding_vector); - ok(status == RPC_S_OK, "%s: RpcBindingVectorFree failed with error %u\n", protseq, status); + ok(status == RPC_S_OK, "%s: RpcBindingVectorFree failed with error %lu\n", protseq, status); }
static BOOL is_process_elevated(void) @@ -1152,18 +1152,18 @@ static BOOL is_firewall_enabled(void)
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr, (void **)&mgr ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile ); if (hr != S_OK) goto done;
hr = INetFwProfile_get_FirewallEnabled( profile, &enabled ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
done: if (policy) INetFwPolicy_Release( policy ); @@ -1198,23 +1198,23 @@ static HRESULT set_firewall( enum firewall_op op )
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr, (void **)&mgr ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile ); if (hr != S_OK) goto done;
hr = INetFwProfile_get_AuthorizedApplications( profile, &apps ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwAuthorizedApplication, (void **)&app ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image ); @@ -1223,7 +1223,7 @@ static HRESULT set_firewall( enum firewall_op op ) name = SysAllocString( L"rpcrt4_test" ); hr = INetFwAuthorizedApplication_put_Name( app, name ); SysFreeString( name ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
if (op == APP_ADD) @@ -1278,7 +1278,7 @@ START_TEST( rpc ) HRESULT hr = set_firewall(APP_ADD); if (hr != S_OK) { - skip("can't authorize app in firewall %08x\n", hr); + skip("can't authorize app in firewall %08lx\n", hr); return; } } diff --git a/dlls/rpcrt4/tests/rpc_async.c b/dlls/rpcrt4/tests/rpc_async.c index 15c57fefb57..0552560bf06 100644 --- a/dlls/rpcrt4/tests/rpc_async.c +++ b/dlls/rpcrt4/tests/rpc_async.c @@ -34,27 +34,27 @@ static void test_RpcAsyncInitializeHandle(void) void *unset_ptr;
status = RpcAsyncInitializeHandle((PRPC_ASYNC_STATE)buffer, sizeof(buffer)); - ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status); + ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %ld\n", status);
status = RpcAsyncInitializeHandle(&async, sizeof(async) - 1); - ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %d\n", status); + ok(status == ERROR_INVALID_PARAMETER, "RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %ld\n", status);
memset(&async, 0xcc, sizeof(async)); memset(&unset_ptr, 0xcc, sizeof(unset_ptr)); status = RpcAsyncInitializeHandle(&async, sizeof(async)); - ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status); + ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %ld\n", status);
ok(async.Size == sizeof(async), "async.Size wrong: %d\n", async.Size); - ok(async.Signature == 0x43595341, "async.Signature should be 0x43595341, but is 0x%x instead\n", async.Signature); - ok(async.Lock == 0, "async.Lock should be 0, but is %d instead\n", async.Lock); - ok(async.Flags == 0, "async.Flags should be 0, but is %d instead\n", async.Flags); + ok(async.Signature == 0x43595341, "async.Signature should be 0x43595341, but is 0x%lx instead\n", async.Signature); + ok(async.Lock == 0, "async.Lock should be 0, but is %ld instead\n", async.Lock); + ok(async.Flags == 0, "async.Flags should be 0, but is %ld instead\n", async.Flags); ok(async.StubInfo == NULL, "async.StubInfo should be NULL, not %p\n", async.StubInfo); ok(async.UserInfo == unset_ptr, "async.UserInfo should be unset, not %p\n", async.UserInfo); ok(async.RuntimeInfo == NULL, "async.RuntimeInfo should be NULL, not %p\n", async.RuntimeInfo); ok(async.Event == 0xcccccccc, "async.Event should be unset, not %d\n", async.Event); ok(async.NotificationType == 0xcccccccc, "async.NotificationType should be unset, not %d\n", async.NotificationType); for (i = 0; i < 4; i++) - ok(async.Reserved[i] == 0x0, "async.Reserved[%d] should be 0x0, not 0x%lx\n", i, async.Reserved[i]); + ok(async.Reserved[i] == 0x0, "async.Reserved[%d] should be 0x0, not 0x%Ix\n", i, async.Reserved[i]); }
static void test_RpcAsyncGetCallStatus(void) @@ -63,16 +63,16 @@ static void test_RpcAsyncGetCallStatus(void) RPC_STATUS status;
status = RpcAsyncInitializeHandle(&async, sizeof(async)); - ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %d\n", status); + ok(status == RPC_S_OK, "RpcAsyncInitializeHandle failed with error %ld\n", status);
status = RpcAsyncGetCallStatus(&async); todo_wine - ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status); + ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %ld\n", status);
memset(&async, 0, sizeof(async)); status = RpcAsyncGetCallStatus(&async); todo_wine - ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d\n", status); + ok(status == RPC_S_INVALID_BINDING, "RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %ld\n", status); }
START_TEST( rpc_async ) diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index d11145b24d3..253fd817a48 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -916,7 +916,7 @@ void __cdecl s_context_handle_test(void) /* marshal a context handle with NULL userContext */ memset(buf, 0xcc, sizeof(buf)); pNDRSContextMarshall2(binding, h, buf, NULL, NULL, 0); - ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf); + ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%lx\n", *(ULONG *)buf); ok(UuidIsNil((UUID *)&buf[4], &status), "uuid should have been nil\n");
h = pNDRSContextUnmarshall2(binding, NULL, NDR_LOCAL_DATA_REPRESENTATION, NULL, 0); @@ -926,7 +926,7 @@ void __cdecl s_context_handle_test(void) memset(buf, 0xcc, sizeof(buf)); h->userContext = (void *)0xdeadbeef; pNDRSContextMarshall2(binding, h, buf, NULL, NULL, 0); - ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf); + ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%lx\n", *(ULONG *)buf); ok(!UuidIsNil((UUID *)&buf[4], &status), "uuid should not have been nil\n");
/* raises ERROR_INVALID_HANDLE exception on Vista upwards */ @@ -943,7 +943,7 @@ void __cdecl s_context_handle_test(void) memset(buf, 0xcc, sizeof(buf)); h->userContext = (void *)0xcafebabe; pNDRSContextMarshall2(binding, h, buf, NULL, &server_if.InterfaceId, 0); - ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%x\n", *(ULONG *)buf); + ok(*(ULONG *)buf == 0, "attributes should have been set to 0 instead of 0x%lx\n", *(ULONG *)buf); ok(!UuidIsNil((UUID *)&buf[4], &status), "uuid should not have been nil\n");
h = pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if.InterfaceId, 0); @@ -984,7 +984,7 @@ void __cdecl s_context_handle_test(void) binding = NULL; status = RpcBindingServerFromClient(NULL, &binding);
- ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + ok(status == RPC_S_OK, "expected RPC_S_OK got %lu\n", status); ok(binding != NULL, "binding is NULL\n");
if (status == RPC_S_OK && binding != NULL) @@ -997,11 +997,11 @@ void __cdecl s_context_handle_test(void) unsigned char* network_options = NULL;
status = RpcBindingToStringBindingA(binding, &string_binding); - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + ok(status == RPC_S_OK, "expected RPC_S_OK got %lu\n", status); ok(string_binding != NULL, "string_binding is NULL\n");
status = RpcStringBindingParseA(string_binding, &object_uuid, &protseq, &network_address, &endpoint, &network_options); - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + ok(status == RPC_S_OK, "expected RPC_S_OK got %lu\n", status); ok(protseq != NULL && *protseq != '\0', "protseq is %s\n", protseq); ok(network_address != NULL && *network_address != '\0', "network_address is %s\n", network_address);
@@ -1085,7 +1085,7 @@ void __cdecl s_stop_autolisten(void) RPC_STATUS status; status = RpcServerUnregisterIf(NULL, NULL, FALSE); todo_wine - ok(status == RPC_S_UNKNOWN_MGR_TYPE, "got %u\n", status); + ok(status == RPC_S_UNKNOWN_MGR_TYPE, "got %lu\n", status); }
void __cdecl s_ip_test(ipu_t *a) @@ -1094,7 +1094,7 @@ void __cdecl s_ip_test(ipu_t *a) HRESULT hr;
hr = IStream_Stat(a->tagged_union.stream, &st, STATFLAG_NONAME); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); }
int __cdecl s_sum_ptr_array(int *a[2]) @@ -1377,7 +1377,7 @@ union_tests(void) CreateStreamOnHGlobal(NULL, TRUE, &ipu.tagged_union.stream); ip_test(&ipu); ref = IStream_Release(ipu.tagged_union.stream); - ok(!ref, "got %u refs\n", ref); + ok(!ref, "got %lu refs\n", ref);
CoUninitialize(); } @@ -1837,7 +1837,7 @@ void __cdecl s_authinfo_test(unsigned int protseq, int secure) win_skip("RpcBindingInqAuthClientA not supported\n"); return; } - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + ok(status == RPC_S_OK, "expected RPC_S_OK got %lu\n", status); ok(privs != (RPC_AUTHZ_HANDLE)0xdeadbeef, "privs unchanged\n"); ok(principal != (unsigned char *)0xdeadbeef, "principal unchanged\n"); if (protseq != RPC_PROTSEQ_LRPC) @@ -1862,27 +1862,27 @@ void __cdecl s_authinfo_test(unsigned int protseq, int secure) RpcStringFreeA(&principal);
status = RpcBindingInqAuthClientA(NULL, &privs, &principal, &level, &authnsvc, NULL); - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + ok(status == RPC_S_OK, "expected RPC_S_OK got %lu\n", status); RpcStringFreeA(&principal);
status = RpcBindingInqAuthClientExA(NULL, &privs, &principal, &level, &authnsvc, NULL, 0); - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + ok(status == RPC_S_OK, "expected RPC_S_OK got %lu\n", status); RpcStringFreeA(&principal);
status = RpcImpersonateClient(NULL); - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + ok(status == RPC_S_OK, "expected RPC_S_OK got %lu\n", status); status = RpcRevertToSelf(); - ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status); + ok(status == RPC_S_OK, "expected RPC_S_OK got %lu\n", status);
} else { status = RpcBindingInqAuthClientA(binding, &privs, &principal, &level, &authnsvc, NULL); - ok(status == RPC_S_BINDING_HAS_NO_AUTH, "expected RPC_S_BINDING_HAS_NO_AUTH got %u\n", status); + ok(status == RPC_S_BINDING_HAS_NO_AUTH, "expected RPC_S_BINDING_HAS_NO_AUTH got %lu\n", status); ok(privs == (RPC_AUTHZ_HANDLE)0xdeadbeef, "got %p\n", privs); ok(principal == (unsigned char *)0xdeadbeef, "got %s\n", principal); - ok(level == 0xdeadbeef, "got %u\n", level); - ok(authnsvc == 0xdeadbeef, "got %u\n", authnsvc); + ok(level == 0xdeadbeef, "got %lu\n", level); + ok(authnsvc == 0xdeadbeef, "got %lu\n", authnsvc); } }
@@ -1920,7 +1920,7 @@ set_auth_info(RPC_BINDING_HANDLE handle)
status = pRpcBindingSetAuthInfoExA(handle, (RPC_CSTR)domain_and_user, RPC_C_AUTHN_LEVEL_PKT_PRIVACY, RPC_C_AUTHN_WINNT, NULL, 0, &qos); - ok(status == RPC_S_OK, "RpcBindingSetAuthInfoExA failed %d\n", status); + ok(status == RPC_S_OK, "RpcBindingSetAuthInfoExA failed %ld\n", status); }
#define test_is_server_listening(a,b) _test_is_server_listening(__LINE__,a,b) @@ -1928,7 +1928,7 @@ static void _test_is_server_listening(unsigned line, RPC_BINDING_HANDLE binding, { RPC_STATUS status; status = RpcMgmtIsServerListening(binding); - ok_(__FILE__,line)(status == expected_status, "RpcMgmtIsServerListening returned %u, expected %u\n", + ok_(__FILE__,line)(status == expected_status, "RpcMgmtIsServerListening returned %lu, expected %lu\n", status, expected_status); }
@@ -1939,7 +1939,7 @@ static void _test_is_server_listening2(unsigned line, RPC_BINDING_HANDLE binding RPC_STATUS status; status = RpcMgmtIsServerListening(binding); ok_(__FILE__,line)(status == expected_status || status == expected_status2, - "RpcMgmtIsServerListening returned %u, expected %u or %u\n", + "RpcMgmtIsServerListening returned %lu, expected %lu or %lu\n", status, expected_status, expected_status2); }
@@ -2069,16 +2069,16 @@ server(void) CoInitializeEx(NULL, COINIT_MULTITHREADED);
iptcp_status = RpcServerUseProtseqEpA(iptcp, 20, port, NULL); - ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %d\n", iptcp_status); + ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %ld\n", iptcp_status);
ncalrpc_status = RpcServerUseProtseqEpA(ncalrpc, 0, guid, NULL); - ok(ncalrpc_status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", ncalrpc_status); + ok(ncalrpc_status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %ld\n", ncalrpc_status);
np_status = RpcServerUseProtseqEpA(np, 0, pipe, NULL); if (np_status == RPC_S_PROTSEQ_NOT_SUPPORTED) skip("Protocol sequence ncacn_np is not supported\n"); else - ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %d\n", np_status); + ok(np_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", np_status);
if (pRpcServerRegisterIfEx) { @@ -2086,25 +2086,25 @@ server(void) status = pRpcServerRegisterIfEx(s_IMixedServer_v0_0_s_ifspec, NULL, NULL, RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH, RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIfEx failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIfEx failed with status %ld\n", status); status = pRpcServerRegisterIfEx(s_IInterpServer_v0_0_s_ifspec, NULL, NULL, RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH, RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIfEx failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIfEx failed with status %ld\n", status); } else { status = RpcServerRegisterIf(s_IMixedServer_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status); status = RpcServerRegisterIf(s_IInterpServer_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status); } test_is_server_listening(NULL, RPC_S_NOT_LISTENING); status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, TRUE); - ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status); test_is_server_listening(NULL, RPC_S_OK); stop_event = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError()); + ok(stop_event != NULL, "CreateEvent failed with error %ld\n", GetLastError());
if (iptcp_status == RPC_S_OK) run_client("tcp_basic"); @@ -2141,7 +2141,7 @@ server(void) if (ret == WAIT_OBJECT_0) { status = RpcMgmtWaitServerListen(); - ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status); }
CloseHandle(stop_event); @@ -2152,12 +2152,12 @@ server(void) status = pRpcServerRegisterIfEx(s_IMixedServer_v0_0_s_ifspec, NULL, NULL, RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH | RPC_IF_AUTOLISTEN, RPC_C_LISTEN_MAX_CALLS_DEFAULT, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf() failed: %u\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf() failed: %lu\n", status);
run_client("ncalrpc_autolisten");
status = RpcServerUnregisterIf(s_IMixedServer_v0_0_s_ifspec, NULL, TRUE); - ok(status == RPC_S_OK, "RpcServerUnregisterIf() failed: %u\n", status); + ok(status == RPC_S_OK, "RpcServerUnregisterIf() failed: %lu\n", status); }
CoUninitialize(); @@ -2185,7 +2185,7 @@ static DWORD WINAPI wait_listen_proc(void *arg)
trace("waiting\n"); status = RpcMgmtWaitServerListen(); - ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status); trace("done\n");
return 0; @@ -2198,13 +2198,13 @@ static void test_stop_wait_for_call(unsigned char *binding) DWORD ret;
status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, TRUE); - ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status); test_is_server_listening(NULL, RPC_S_OK);
stop_wait_event = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(stop_wait_event != NULL, "CreateEvent failed with error %d\n", GetLastError()); + ok(stop_wait_event != NULL, "CreateEvent failed with error %ld\n", GetLastError()); stop_event = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError()); + ok(stop_event != NULL, "CreateEvent failed with error %ld\n", GetLastError());
wait_listen_thread = CreateThread(NULL, 0, wait_listen_proc, 0, 0, NULL); ok(wait_listen_thread != NULL, "CreateThread failed\n"); @@ -2226,7 +2226,7 @@ static void test_stop_wait_for_call(unsigned char *binding) SetEvent(stop_wait_event);
ret = WaitForSingleObject(wait_listen_thread, 10000); - ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject returned %u\n", ret); + ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject returned %lu\n", ret);
CloseHandle(wait_listen_thread);
@@ -2247,28 +2247,28 @@ static void test_server_listening(void) RPC_STATUS status;
status = RpcServerUseProtseqEpA(np, 0, pipe, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", status);
status = RpcServerRegisterIf(s_IMixedServer_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status);
test_is_server_listening(NULL, RPC_S_NOT_LISTENING); status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, TRUE); - ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status); test_is_server_listening(NULL, RPC_S_OK);
status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, TRUE); - ok(status == RPC_S_ALREADY_LISTENING, "RpcServerListen failed with status %d\n", status); + ok(status == RPC_S_ALREADY_LISTENING, "RpcServerListen failed with status %ld\n", status);
status = RpcMgmtStopServerListening(NULL); ok(status == RPC_S_OK, "RpcMgmtStopServerListening\n"); test_is_server_listening(NULL, RPC_S_NOT_LISTENING);
status = RpcMgmtWaitServerListen(); - ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status);
status = RpcMgmtWaitServerListen(); - ok(status == RPC_S_NOT_LISTENING, "RpcMgmtWaitServerListening failed with status %d\n", status); + ok(status == RPC_S_NOT_LISTENING, "RpcMgmtWaitServerListening failed with status %ld\n", status);
/* test that server stop waits for a call in progress */ status = RpcStringBindingComposeA(NULL, np, address_np, pipe, NULL, &binding); @@ -2281,7 +2281,7 @@ static void test_server_listening(void)
/* repeat the test using ncalrpc */ status = RpcServerUseProtseqEpA(ncalrpc, 0, guid, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %ld\n", status);
status = RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding); ok(status == RPC_S_OK, "RpcStringBindingCompose\n"); @@ -2305,9 +2305,9 @@ static HANDLE create_server_process(void) startup.cb = sizeof startup;
ready_event = CreateEventW(&sec_attr, TRUE, FALSE, NULL); - ok(ready_event != NULL, "CreateEvent failed: %u\n", GetLastError()); + ok(ready_event != NULL, "CreateEvent failed: %lu\n", GetLastError());
- sprintf(cmdline, "%s server run %lx", progname, (UINT_PTR)ready_event); + sprintf(cmdline, "%s server run %Ix", progname, (UINT_PTR)ready_event); trace("running server process...\n"); ok(CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, 0L, NULL, NULL, &startup, &info), "CreateProcess\n"); ret = WaitForSingleObject(ready_event, 10000); @@ -2326,26 +2326,26 @@ static void run_server(HANDLE ready_event) BOOL ret;
status = RpcServerUseProtseqEpA(np, 0, pipe, NULL); - ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_np) failed with status %ld\n", status);
status = RpcServerRegisterIf(s_IMixedServer_v0_0_s_ifspec, NULL, NULL); - ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %ld\n", status);
test_is_server_listening(NULL, RPC_S_NOT_LISTENING); status = RpcServerListen(1, RPC_C_LISTEN_MAX_CALLS_DEFAULT, TRUE); - ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcServerListen failed with status %ld\n", status);
stop_event = CreateEventW(NULL, FALSE, FALSE, NULL); - ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError()); + ok(stop_event != NULL, "CreateEvent failed with error %ld\n", GetLastError());
ret = SetEvent(ready_event); - ok(ret, "SetEvent failed: %u\n", GetLastError()); + ok(ret, "SetEvent failed: %lu\n", GetLastError());
ret = WaitForSingleObject(stop_event, 5000); ok(WAIT_OBJECT_0 == ret, "WaitForSingleObject\n");
status = RpcMgmtWaitServerListen(); - ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %d\n", status); + ok(status == RPC_S_OK, "RpcMgmtWaitServerListening failed with status %ld\n", status);
CloseHandle(stop_event); stop_event = NULL; @@ -2376,7 +2376,7 @@ static void test_reconnect(void) for (i = 0; i < ARRAY_SIZE(threads); i++) { threads[i] = CreateThread(NULL, 0, basic_tests_thread, 0, 0, NULL); - ok(threads[i] != NULL, "CreateThread failed: %u\n", GetLastError()); + ok(threads[i] != NULL, "CreateThread failed: %lu\n", GetLastError()); }
for (i = 0; i < ARRAY_SIZE(threads); i++) @@ -2432,18 +2432,18 @@ static BOOL is_firewall_enabled(void)
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr, (void **)&mgr ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile ); if (hr != S_OK) goto done;
hr = INetFwProfile_get_FirewallEnabled( profile, &enabled ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
done: if (policy) INetFwPolicy_Release( policy ); @@ -2478,23 +2478,23 @@ static HRESULT set_firewall( enum firewall_op op )
hr = CoCreateInstance( &CLSID_NetFwMgr, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwMgr, (void **)&mgr ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwMgr_get_LocalPolicy( mgr, &policy ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwPolicy_get_CurrentProfile( policy, &profile ); if (hr != S_OK) goto done;
hr = INetFwProfile_get_AuthorizedApplications( profile, &apps ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = CoCreateInstance( &CLSID_NetFwAuthorizedApplication, NULL, CLSCTX_INPROC_SERVER, &IID_INetFwAuthorizedApplication, (void **)&app ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
hr = INetFwAuthorizedApplication_put_ProcessImageFileName( app, image ); @@ -2503,7 +2503,7 @@ static HRESULT set_firewall( enum firewall_op op ) name = SysAllocString( L"rpcrt4_test" ); hr = INetFwAuthorizedApplication_put_Name( app, name ); SysFreeString( name ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); if (hr != S_OK) goto done;
if (op == APP_ADD) @@ -2562,7 +2562,7 @@ START_TEST(server) else if(!strcmp(argv[2], "run")) { ULONG event; - sscanf(argv[3], "%x", &event); + sscanf(argv[3], "%lx", &event); run_server(ULongToHandle(event)); } } @@ -2580,7 +2580,7 @@ START_TEST(server) } else { - skip("can't authorize app in firewall %08x\n", hr); + skip("can't authorize app in firewall %08lx\n", hr); } } else
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109763
Your paranoid android.
=== w10pro64 (32 bit report) ===
rpcrt4: server.c:2178: Test failed: RpcBindingFree
=== w1064 (64 bit report) ===
rpcrt4: server.c:2178: Test failed: RpcBindingFree
=== w1064_2qxl (64 bit report) ===
rpcrt4: server.c:2178: Test failed: RpcBindingFree
=== w10pro64 (64 bit report) ===
rpcrt4: server.c:2178: Test failed: RpcBindingFree
=== w10pro64_he (64 bit report) ===
rpcrt4: server.c:2178: Test failed: RpcBindingFree
=== w10pro64_ja (64 bit report) ===
rpcrt4: server.c:2178: Test failed: RpcBindingFree
=== w10pro64_zh_CN (64 bit report) ===
rpcrt4: server.c:2178: Test failed: RpcBindingFree
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/rsaenh/tests/Makefile.in | 1 dlls/rsaenh/tests/rsaenh.c | 1014 +++++++++++++++++++++-------------------- 2 files changed, 507 insertions(+), 508 deletions(-)
diff --git a/dlls/rsaenh/tests/Makefile.in b/dlls/rsaenh/tests/Makefile.in index 641a3fff080..91f2d28ef6d 100644 --- a/dlls/rsaenh/tests/Makefile.in +++ b/dlls/rsaenh/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = rsaenh.dll IMPORTS = advapi32
diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 30399714741..f822c29bbc0 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -140,14 +140,14 @@ static BOOL init_base_environment(const char *provider, DWORD dwKeyFlags) result = CryptAcquireContextA(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); ok(!result && (GetLastError()==NTE_BAD_FLAGS || broken(GetLastError() == NTE_KEYSET_NOT_DEF /* Win9x/NT4 */)), - "%d, %08x\n", result, GetLastError()); + "%d, %08lx\n", result, GetLastError());
if (!CryptAcquireContextA(&hProv, szContainer, szProvider, PROV_RSA_FULL, 0)) { ok(GetLastError()==NTE_BAD_KEYSET || broken(GetLastError() == NTE_TEMPORARY_PROFILE /* some Win7 setups */) || broken(GetLastError() == NTE_KEYSET_NOT_DEF /* Win9x/NT4 */), - "%08x\n", GetLastError()); + "%08lx\n", GetLastError()); if (GetLastError()!=NTE_BAD_KEYSET) { win_skip("RSA full provider not available\n"); @@ -155,17 +155,17 @@ static BOOL init_base_environment(const char *provider, DWORD dwKeyFlags) } result = CryptAcquireContextA(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) { win_skip("Couldn't create crypto provider\n"); return FALSE; } result = CryptGenKey(hProv, AT_KEYEXCHANGE, dwKeyFlags, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (result) CryptDestroyKey(hKey); result = CryptGenKey(hProv, AT_SIGNATURE, dwKeyFlags, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (result) CryptDestroyKey(hKey); } return TRUE; @@ -178,12 +178,12 @@ static void clean_up_base_environment(void) SetLastError(0xdeadbeef); result = CryptReleaseContext(hProv, 1); ok(!result || broken(result) /* Win98 */, "Expected failure\n"); - ok(GetLastError()==NTE_BAD_FLAGS, "Expected NTE_BAD_FLAGS, got %08x\n", GetLastError()); + ok(GetLastError()==NTE_BAD_FLAGS, "Expected NTE_BAD_FLAGS, got %08lx\n", GetLastError());
/* Just to prove that Win98 also released the CSP */ SetLastError(0xdeadbeef); result = CryptReleaseContext(hProv, 0); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%08x\n", GetLastError()); + ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%08lx\n", GetLastError());
CryptAcquireContextA(&hProv, szContainer, szProvider, PROV_RSA_FULL, CRYPT_DELETEKEYSET); } @@ -208,30 +208,30 @@ static BOOL init_aes_environment(void) win_skip("RSA_AES provider not supported\n"); return FALSE; } - ok(!result && GetLastError()==NTE_BAD_FLAGS, "%d, %08x\n", result, GetLastError()); + ok(!result && GetLastError()==NTE_BAD_FLAGS, "%d, %08lx\n", result, GetLastError());
if (!CryptAcquireContextA(&hProv, szContainer, NULL, PROV_RSA_AES, 0)) { - ok(GetLastError()==NTE_BAD_KEYSET, "%08x\n", GetLastError()); + ok(GetLastError()==NTE_BAD_KEYSET, "%08lx\n", GetLastError()); if (GetLastError()!=NTE_BAD_KEYSET) return FALSE; result = CryptAcquireContextA(&hProv, szContainer, NULL, PROV_RSA_AES, CRYPT_NEWKEYSET); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return FALSE; result = CryptGenKey(hProv, AT_KEYEXCHANGE, 0, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (result) CryptDestroyKey(hKey); result = CryptGenKey(hProv, AT_SIGNATURE, 0, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (result) CryptDestroyKey(hKey);
/* CALG_AES is not supported, but CALG_AES_128 is */ result = CryptGenKey(hProv, CALG_AES, 0, &hKey); - ok(!result && GetLastError() == NTE_BAD_ALGID, "%d %08x\n", result, GetLastError()); + ok(!result && GetLastError() == NTE_BAD_ALGID, "%d %08lx\n", result, GetLastError()); result = CryptGenKey(hProv, CALG_AES, 128 << 16, &hKey); - ok(!result && GetLastError() == NTE_BAD_ALGID, "%d %08x\n", result, GetLastError()); + ok(!result && GetLastError() == NTE_BAD_ALGID, "%d %08lx\n", result, GetLastError()); result = CryptGenKey(hProv, CALG_AES_128, 0, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (result) CryptDestroyKey(hKey); } return TRUE; @@ -242,7 +242,7 @@ static void clean_up_aes_environment(void) BOOL result;
result = CryptReleaseContext(hProv, 1); - ok(!result && GetLastError()==NTE_BAD_FLAGS, "%08x\n", GetLastError()); + ok(!result && GetLastError()==NTE_BAD_FLAGS, "%08lx\n", GetLastError());
CryptAcquireContextA(&hProv, szContainer, NULL, PROV_RSA_AES, CRYPT_DELETEKEYSET); } @@ -261,7 +261,7 @@ static void test_prov(void) nt4++; } else - ok(result && dwInc==8, "%08x, %d\n", GetLastError(), dwInc); + ok(result && dwInc==8, "%08lx, %ld\n", GetLastError(), dwInc);
dwLen = (DWORD)sizeof(DWORD); SetLastError(0xdeadbeef); @@ -269,7 +269,7 @@ static void test_prov(void) if (!result && GetLastError() == NTE_BAD_TYPE) skip("PP_KEYX_KEYSIZE_INC is not supported (win9x or NT)\n"); else - ok(result && dwInc==8, "%08x, %d\n", GetLastError(), dwInc); + ok(result && dwInc==8, "%08lx, %ld\n", GetLastError(), dwInc); }
static void test_gen_random(void) @@ -286,10 +286,10 @@ static void test_gen_random(void) return; }
- ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptGenRandom(hProv, sizeof(rnd2), rnd2); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(memcmp(rnd1, rnd2, sizeof(rnd1)), "CryptGenRandom generates non random data\n"); } @@ -306,19 +306,19 @@ static BOOL derive_key(ALG_ID aiAlgid, HCRYPTKEY *phKey, DWORD len) result = CryptCreateHash(hProv, CALG_MD2, 0, 0, &hHash); if (!result) { /* rsaenh compiled without OpenSSL */ - ok(GetLastError()==NTE_BAD_ALGID, "%08x\n", GetLastError()); + ok(GetLastError()==NTE_BAD_ALGID, "%08lx\n", GetLastError()); return FALSE; } - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return FALSE; result = CryptDeriveKey(hProv, aiAlgid, hHash, (len << 16) | CRYPT_EXPORTABLE, phKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return FALSE; len = 2000; result = CryptGetHashParam(hHash, HP_HASHVAL, pbData, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); CryptDestroyHash(hHash); return TRUE; } @@ -445,31 +445,31 @@ static void test_hashes(void) result = CryptCreateHash(hProv, CALG_MD2, 0, 0, &hHash); if (!result) { /* rsaenh compiled without OpenSSL */ - ok(GetLastError() == NTE_BAD_ALGID, "%08x\n", GetLastError()); + ok(GetLastError() == NTE_BAD_ALGID, "%08lx\n", GetLastError()); } else { result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
len = sizeof(DWORD); result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); - ok(result && (hashlen == 16), "%08x, hashlen: %d\n", GetLastError(), hashlen); + ok(result && (hashlen == 16), "%08lx, hashlen: %ld\n", GetLastError(), hashlen);
len = 16; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, md2hash, 16), "Wrong MD2 hash!\n");
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
/* MD4 Hashing */ result = CryptCreateHash(hProv, CALG_MD4, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptHashData(hHash, pbData, sizeof(pbData), ~0); - ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08x\n", GetLastError()); + ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08lx\n", GetLastError());
cryptflags = CRYPT_USERDATA; result = CryptHashData(hHash, pbData, sizeof(pbData), cryptflags); @@ -479,57 +479,57 @@ static void test_hashes(void) ok(broken(1), "Failed to support CRYPT_USERDATA flag\n"); result = CryptHashData(hHash, pbData, sizeof(pbData), 0); } - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
len = sizeof(DWORD); result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); - ok(result && (hashlen == 16), "%08x, hashlen: %d\n", GetLastError(), hashlen); + ok(result && (hashlen == 16), "%08lx, hashlen: %ld\n", GetLastError(), hashlen);
len = 16; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, md4hash, 16), "Wrong MD4 hash!\n");
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* MD5 Hashing */ result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
len = sizeof(DWORD); result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); - ok(result && (hashlen == 16), "%08x, hashlen: %d\n", GetLastError(), hashlen); + ok(result && (hashlen == 16), "%08lx, hashlen: %ld\n", GetLastError(), hashlen);
result = CryptHashData(hHash, pbData, sizeof(pbData), ~0); - ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08x\n", GetLastError()); + ok(!result && GetLastError() == NTE_BAD_FLAGS, "%08lx\n", GetLastError());
result = CryptHashData(hHash, pbData, sizeof(pbData), cryptflags); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
len = 16; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, md5hash, 16), "Wrong MD5 hash!\n");
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* The hash is available even if CryptHashData hasn't been called */ len = 16; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, empty_md5hash, 16), "Wrong MD5 hash!\n");
/* It's also stable: getting it twice results in the same value */ result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, empty_md5hash, 16), "Wrong MD5 hash!\n");
@@ -539,80 +539,80 @@ static void test_hashes(void) ok(!result, "Expected failure\n"); ok(GetLastError() == NTE_BAD_HASH_STATE || GetLastError() == NTE_BAD_ALGID, /* Win9x, WinMe, NT4 */ - "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID, got %08x\n", GetLastError()); + "Expected NTE_BAD_HASH_STATE or NTE_BAD_ALGID, got %08lx\n", GetLastError());
/* You can still retrieve the hash, its value just hasn't changed */ result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, empty_md5hash, 16), "Wrong MD5 hash!\n");
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* SHA1 Hashing */ result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptHashData(hHash, pbData, 5, cryptflags); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
if(pCryptDuplicateHash) { result = pCryptDuplicateHash(hHash, 0, 0, &hHashClone); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptHashData(hHashClone, (BYTE*)pbData+5, sizeof(pbData)-5, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
len = sizeof(DWORD); result = CryptGetHashParam(hHashClone, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); - ok(result && (hashlen == 20), "%08x, hashlen: %d\n", GetLastError(), hashlen); + ok(result && (hashlen == 20), "%08lx, hashlen: %ld\n", GetLastError(), hashlen);
len = 20; result = CryptGetHashParam(hHashClone, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, sha1hash, 20), "Wrong SHA1 hash!\n");
result = CryptDestroyHash(hHashClone); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* The SHA-2 variants aren't supported in the RSA full provider */ result = CryptCreateHash(hProv, CALG_SHA_256, 0, 0, &hHash); ok(!result && GetLastError() == NTE_BAD_ALGID, - "expected NTE_BAD_ALGID, got %08x\n", GetLastError()); + "expected NTE_BAD_ALGID, got %08lx\n", GetLastError()); result = CryptCreateHash(hProv, CALG_SHA_384, 0, 0, &hHash); ok(!result && GetLastError() == NTE_BAD_ALGID, - "expected NTE_BAD_ALGID, got %08x\n", GetLastError()); + "expected NTE_BAD_ALGID, got %08lx\n", GetLastError()); result = CryptCreateHash(hProv, CALG_SHA_512, 0, 0, &hHash); ok(!result && GetLastError() == NTE_BAD_ALGID, - "expected NTE_BAD_ALGID, got %08x\n", GetLastError()); + "expected NTE_BAD_ALGID, got %08lx\n", GetLastError());
result = CryptAcquireContextA(&prov, NULL, szProvider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(result, "CryptAcquireContextA failed 0x%08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed 0x%08lx\n", GetLastError());
result = CryptCreateHash(prov, CALG_SHA1, 0, 0, &hHash); - ok(result, "CryptCreateHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptCreateHash failed 0x%08lx\n", GetLastError());
/* release provider before using the hash */ result = CryptReleaseContext(prov, 0); - ok(result, "CryptReleaseContext failed 0x%08x\n", GetLastError()); + ok(result, "CryptReleaseContext failed 0x%08lx\n", GetLastError());
SetLastError(0xdeadbeef); result = CryptHashData(hHash, (const BYTE *)"data", sizeof("data"), 0); error = GetLastError(); ok(!result, "CryptHashData succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", error);
SetLastError(0xdeadbeef); result = CryptDestroyHash(hHash); error = GetLastError(); ok(!result, "CryptDestroyHash succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", error);
if (!pCryptDuplicateHash) { @@ -621,76 +621,76 @@ static void test_hashes(void) }
result = CryptAcquireContextA(&prov, NULL, szProvider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(result, "CryptAcquireContextA failed 0x%08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed 0x%08lx\n", GetLastError());
result = CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash); - ok(result, "CryptCreateHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptCreateHash failed 0x%08lx\n", GetLastError());
result = CryptHashData(hHash, (const BYTE *)"data", sizeof("data"), 0); - ok(result, "CryptHashData failed 0x%08x\n", GetLastError()); + ok(result, "CryptHashData failed 0x%08lx\n", GetLastError());
result = pCryptDuplicateHash(hHash, NULL, 0, &hHashClone); - ok(result, "CryptDuplicateHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptDuplicateHash failed 0x%08lx\n", GetLastError());
len = 20; result = CryptGetHashParam(hHashClone, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "CryptGetHashParam failed 0x%08x\n", GetLastError()); + ok(result, "CryptGetHashParam failed 0x%08lx\n", GetLastError());
/* add data after duplicating the hash */ result = CryptHashData(hHash, (const BYTE *)"more data", sizeof("more data"), 0); - ok(result, "CryptHashData failed 0x%08x\n", GetLastError()); + ok(result, "CryptHashData failed 0x%08lx\n", GetLastError());
result = CryptDestroyHash(hHash); - ok(result, "CryptDestroyHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptDestroyHash failed 0x%08lx\n", GetLastError());
result = CryptDestroyHash(hHashClone); - ok(result, "CryptDestroyHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptDestroyHash failed 0x%08lx\n", GetLastError());
result = CryptReleaseContext(prov, 0); - ok(result, "CryptReleaseContext failed 0x%08x\n", GetLastError()); + ok(result, "CryptReleaseContext failed 0x%08lx\n", GetLastError());
/* Test CALG_SSL3_SHAMD5 */ result = CryptAcquireContextA(&prov, NULL, szProvider, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(result, "CryptAcquireContextA failed 0x%08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed 0x%08lx\n", GetLastError());
/* Step 1: create an MD5 hash of the data */ result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); - ok(result, "CryptCreateHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptCreateHash failed 0x%08lx\n", GetLastError()); result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); len = 16; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "CryptGetHashParam failed 0x%08x\n", GetLastError()); + ok(result, "CryptGetHashParam failed 0x%08lx\n", GetLastError()); result = CryptDestroyHash(hHash); - ok(result, "CryptDestroyHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptDestroyHash failed 0x%08lx\n", GetLastError()); /* Step 2: create a SHA1 hash of the data */ result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash); - ok(result, "CryptCreateHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptCreateHash failed 0x%08lx\n", GetLastError()); result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); len = 20; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue + 16, &len, 0); - ok(result, "CryptGetHashParam failed 0x%08x\n", GetLastError()); + ok(result, "CryptGetHashParam failed 0x%08lx\n", GetLastError()); result = CryptDestroyHash(hHash); - ok(result, "CryptDestroyHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptDestroyHash failed 0x%08lx\n", GetLastError()); /* Step 3: create a CALG_SSL3_SHAMD5 hash handle */ result = CryptCreateHash(hProv, CALG_SSL3_SHAMD5, 0, 0, &hHash); - ok(result, "CryptCreateHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptCreateHash failed 0x%08lx\n", GetLastError()); /* Test that CryptHashData fails on this hash */ result = CryptHashData(hHash, pbData, sizeof(pbData), 0); ok(!result && (GetLastError() == NTE_BAD_ALGID || broken(GetLastError() == ERROR_INVALID_HANDLE)) /* Win 8 */, - "%08x\n", GetLastError()); + "%08lx\n", GetLastError()); result = CryptSetHashParam(hHash, HP_HASHVAL, pbHashValue, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); len = (DWORD)sizeof(abPlainPrivateKey); result = CryptImportKey(hProv, abPlainPrivateKey, len, 0, 0, &hKeyExchangeKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); len = 0; result = CryptSignHashA(hHash, AT_KEYEXCHANGE, NULL, 0, NULL, &len); - ok(result, "%08x\n", GetLastError()); - ok(len == 128, "expected len 128, got %d\n", len); + ok(result, "%08lx\n", GetLastError()); + ok(len == 128, "expected len 128, got %ld\n", len); result = CryptSignHashA(hHash, AT_KEYEXCHANGE, NULL, 0, pbSigValue, &len); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(!memcmp(pbSigValue, signed_ssl3_shamd5_hash, len), "unexpected value\n"); if (len != 128 || memcmp(pbSigValue, signed_ssl3_shamd5_hash, len)) { @@ -699,11 +699,11 @@ static void test_hashes(void) printBytes("got", pbSigValue, len); } result = CryptDestroyKey(hKeyExchangeKey); - ok(result, "CryptDestroyKey failed 0x%08x\n", GetLastError()); + ok(result, "CryptDestroyKey failed 0x%08lx\n", GetLastError()); result = CryptDestroyHash(hHash); - ok(result, "CryptDestroyHash failed 0x%08x\n", GetLastError()); + ok(result, "CryptDestroyHash failed 0x%08lx\n", GetLastError()); result = CryptReleaseContext(prov, 0); - ok(result, "CryptReleaseContext failed 0x%08x\n", GetLastError()); + ok(result, "CryptReleaseContext failed 0x%08lx\n", GetLastError()); }
static void test_block_cipher_modes(void) @@ -734,71 +734,71 @@ static void test_block_cipher_modes(void) dwMode = 0xdeadbeef; dwLen = sizeof(dwMode); result = CryptGetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwMode == CRYPT_MODE_CBC, "Wrong default chaining mode\n");
dwMode = CRYPT_MODE_ECB; result = CryptSetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptGetKeyParam(hKey, KP_SALT, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwLen == 11 || broken(dwLen == 0 /* Win9x/NT4 */), "unexpected salt length %d\n", dwLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen == 11 || broken(dwLen == 0 /* Win9x/NT4 */), "unexpected salt length %ld\n", dwLen);
dwLen = 23; result = CryptEncrypt(hKey, 0, TRUE, 0, NULL, &dwLen, 24); - ok(result, "CryptEncrypt failed: %08x\n", GetLastError()); - ok(dwLen == 24, "Unexpected length %d\n", dwLen); + ok(result, "CryptEncrypt failed: %08lx\n", GetLastError()); + ok(dwLen == 24, "Unexpected length %ld\n", dwLen);
SetLastError(ERROR_SUCCESS); dwLen = 23; result = CryptEncrypt(hKey, 0, TRUE, 0, abData, &dwLen, 24); ok(result && dwLen == 24 && !memcmp(ecb, abData, sizeof(ecb)), - "%08x, dwLen: %d\n", GetLastError(), dwLen); + "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
result = CryptDecrypt(hKey, 0, TRUE, 0, abData, &dwLen); ok(result && dwLen == 23 && !memcmp(plain, abData, sizeof(plain)), - "%08x, dwLen: %d\n", GetLastError(), dwLen); + "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
dwMode = CRYPT_MODE_CBC; result = CryptSetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = 23; result = CryptEncrypt(hKey, 0, TRUE, 0, NULL, &dwLen, 24); - ok(result, "CryptEncrypt failed: %08x\n", GetLastError()); - ok(dwLen == 24, "Unexpected length %d\n", dwLen); + ok(result, "CryptEncrypt failed: %08lx\n", GetLastError()); + ok(dwLen == 24, "Unexpected length %ld\n", dwLen);
dwLen = 23; result = CryptEncrypt(hKey, 0, TRUE, 0, abData, &dwLen, 24); ok(result && dwLen == 24 && !memcmp(cbc, abData, sizeof(cbc)), - "%08x, dwLen: %d\n", GetLastError(), dwLen); + "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
result = CryptDecrypt(hKey, 0, TRUE, 0, abData, &dwLen); ok(result && dwLen == 23 && !memcmp(plain, abData, sizeof(plain)), - "%08x, dwLen: %d\n", GetLastError(), dwLen); + "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
dwMode = CRYPT_MODE_CFB; result = CryptSetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = 16; result = CryptEncrypt(hKey, 0, FALSE, 0, abData, &dwLen, 24); - ok(result && dwLen == 16, "%08x, dwLen: %d\n", GetLastError(), dwLen); + ok(result && dwLen == 16, "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
dwLen = 7; result = CryptEncrypt(hKey, 0, TRUE, 0, abData+16, &dwLen, 8); ok(result && dwLen == 8 && !memcmp(cfb, abData, sizeof(cfb)), - "%08x, dwLen: %d\n", GetLastError(), dwLen); + "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
dwLen = 8; result = CryptDecrypt(hKey, 0, FALSE, 0, abData, &dwLen); - ok(result && dwLen == 8, "%08x, dwLen: %d\n", GetLastError(), dwLen); + ok(result && dwLen == 8, "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
dwLen = 16; result = CryptDecrypt(hKey, 0, TRUE, 0, abData+8, &dwLen); ok(result && dwLen == 15 && !memcmp(plain, abData, sizeof(plain)), - "%08x, dwLen: %d\n", GetLastError(), dwLen); + "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
dwMode = CRYPT_MODE_OFB; result = CryptSetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, 0); @@ -808,11 +808,11 @@ static void test_block_cipher_modes(void) } else { - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = 23; result = CryptEncrypt(hKey, 0, TRUE, 0, abData, &dwLen, 24); - ok(!result && GetLastError() == NTE_BAD_ALGID, "%08x\n", GetLastError()); + ok(!result && GetLastError() == NTE_BAD_ALGID, "%08lx\n", GetLastError()); }
CryptDestroyKey(hKey); @@ -832,7 +832,7 @@ static void test_3des112(void) result = derive_key(CALG_3DES_112, &hKey, 0); if (!result) { /* rsaenh compiled without OpenSSL */ - ok(GetLastError() == NTE_BAD_ALGID, "%08x\n", GetLastError()); + ok(GetLastError() == NTE_BAD_ALGID, "%08lx\n", GetLastError()); return; }
@@ -840,12 +840,12 @@ static void test_3des112(void)
dwLen = 13; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, 16); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbData, des112, sizeof(des112)), "3DES_112 encryption failed!\n");
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
for (i=0; i<4; i++) { @@ -853,13 +853,13 @@ static void test_3des112(void)
dwLen = cTestData[i].enclen; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, cTestData[i].buflen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].buflen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].buflen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].buflen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].buflen); memcpy(enc_data, pbData, cTestData[i].buflen);
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].enclen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].enclen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i); if((dwLen != cTestData[i].enclen) || memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)) @@ -877,7 +877,7 @@ static void test_3des112(void) dwLen = cTestData[i].buflen; memcpy(pbData, enc_data, cTestData[i].buflen); result = CryptDecrypt(hKey, 0, FALSE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Restoring key state by decrypting bad_data with Final = TRUE */ memcpy(bad_data, enc_data, cTestData[i].buflen); @@ -885,16 +885,16 @@ static void test_3des112(void) SetLastError(0xdeadbeef); result = CryptDecrypt(hKey, 0, TRUE, 0, bad_data, &dwLen); ok(!result, "CryptDecrypt should failed!\n"); - ok(GetLastError() == NTE_BAD_DATA, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].buflen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].buflen); + ok(GetLastError() == NTE_BAD_DATA, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].buflen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].buflen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i);
/* Checking key state */ dwLen = cTestData[i].buflen; memcpy(pbData, enc_data, cTestData[i].buflen); result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].enclen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].enclen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i); if((dwLen != cTestData[i].enclen) || memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)) @@ -904,7 +904,7 @@ static void test_3des112(void) } } result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
static void test_des(void) @@ -927,29 +927,29 @@ static void test_des(void) result = derive_key(CALG_DES, &hKey, 0); if (!result) { /* rsaenh compiled without OpenSSL */ - ok(GetLastError()==NTE_BAD_ALGID, "%08x\n", GetLastError()); + ok(GetLastError()==NTE_BAD_ALGID, "%08lx\n", GetLastError()); return; }
dwMode = CRYPT_MODE_ECB; result = CryptSetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwMode == CRYPT_MODE_ECB, "Expected CRYPT_MODE_ECB, got %d\n", dwMode); + ok(result, "%08lx\n", GetLastError()); + ok(dwMode == CRYPT_MODE_ECB, "Expected CRYPT_MODE_ECB, got %ld\n", dwMode);
for (i=0; i<sizeof(pbData); i++) pbData[i] = (unsigned char)i;
dwLen = 13; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, 16); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbData, des, sizeof(des)), "DES encryption failed!\n");
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
for (i=0; i<4; i++) { @@ -957,13 +957,13 @@ static void test_des(void)
dwLen = cTestData[i].enclen; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, cTestData[i].buflen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].buflen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].buflen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].buflen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].buflen); memcpy(enc_data, pbData, cTestData[i].buflen);
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].enclen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].enclen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)==0,"decryption incorrect %d\n",i); if((dwLen != cTestData[i].enclen) || memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)) @@ -981,7 +981,7 @@ static void test_des(void) dwLen = cTestData[i].buflen; memcpy(pbData, enc_data, cTestData[i].buflen); result = CryptDecrypt(hKey, 0, FALSE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Restoring key state by decrypting bad_data with Final = TRUE */ memcpy(bad_data, enc_data, cTestData[i].buflen); @@ -989,16 +989,16 @@ static void test_des(void) SetLastError(0xdeadbeef); result = CryptDecrypt(hKey, 0, TRUE, 0, bad_data, &dwLen); ok(!result, "CryptDecrypt should failed!\n"); - ok(GetLastError() == NTE_BAD_DATA, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].buflen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].buflen); + ok(GetLastError() == NTE_BAD_DATA, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].buflen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].buflen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i);
/* Checking key state */ dwLen = cTestData[i].buflen; memcpy(pbData, enc_data, cTestData[i].buflen); result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].enclen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].enclen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i); if((dwLen != cTestData[i].enclen) || memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)) @@ -1009,27 +1009,27 @@ static void test_des(void) }
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Windows >= XP changed the way DES keys are derived, this test ensures we don't break that */ derive_key(CALG_DES, &hKey, 56);
dwMode = CRYPT_MODE_ECB; result = CryptSetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
for (i=0; i<sizeof(pbData); i++) pbData[i] = (unsigned char)i;
dwLen = 13; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, 16); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(!memcmp(pbData, des, sizeof(des)) || broken( !memcmp(pbData, des_old_behavior, sizeof(des)) || (STRONG_PROV && !memcmp(pbData, des_old_strong, sizeof(des)))) /* <= 2000 */, "DES encryption failed!\n");
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
static void test_3des(void) @@ -1050,12 +1050,12 @@ static void test_3des(void)
dwLen = 13; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, 16); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbData, des3, sizeof(des3)), "3DES encryption failed!\n");
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
for (i=0; i<4; i++) { @@ -1063,13 +1063,13 @@ static void test_3des(void)
dwLen = cTestData[i].enclen; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, cTestData[i].buflen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].buflen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].buflen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].buflen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].buflen); memcpy(enc_data, pbData, cTestData[i].buflen);
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].enclen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].enclen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)==0,"decryption incorrect %d\n",i); if((dwLen != cTestData[i].enclen) || memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)) @@ -1087,7 +1087,7 @@ static void test_3des(void) dwLen = cTestData[i].buflen; memcpy(pbData, enc_data, cTestData[i].buflen); result = CryptDecrypt(hKey, 0, FALSE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Restoring key state by decrypting bad_data with Final = TRUE */ memcpy(bad_data, enc_data, cTestData[i].buflen); @@ -1095,16 +1095,16 @@ static void test_3des(void) SetLastError(0xdeadbeef); result = CryptDecrypt(hKey, 0, TRUE, 0, bad_data, &dwLen); ok(!result, "CryptDecrypt should failed!\n"); - ok(GetLastError() == NTE_BAD_DATA, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].buflen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].buflen); + ok(GetLastError() == NTE_BAD_DATA, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].buflen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].buflen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i);
/* Checking key state */ dwLen = cTestData[i].buflen; memcpy(pbData, enc_data, cTestData[i].buflen); result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].enclen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].enclen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i); if((dwLen != cTestData[i].enclen) || memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)) @@ -1114,7 +1114,7 @@ static void test_3des(void) } } result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
static void test_aes(int keylen) @@ -1161,36 +1161,36 @@ static void test_aes(int keylen) dwLen = sizeof(aes_plain); memcpy(pbData, aes_plain, dwLen); result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, sizeof(pbData)); - ok(result, "Expected OK, got last error %d\n", GetLastError()); - ok(dwLen == 48, "Expected dwLen 48, got %d\n", dwLen); + ok(result, "Expected OK, got last error %ld\n", GetLastError()); + ok(dwLen == 48, "Expected dwLen 48, got %ld\n", dwLen); ok(!memcmp(aes_cbc_enc[i], pbData, dwLen), "Expected equal data sequences\n");
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); ok(result && dwLen == 32 && !memcmp(aes_plain, pbData, dwLen), - "%08x, dwLen: %d\n", GetLastError(), dwLen); + "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
for (i=0; i<sizeof(pbData); i++) pbData[i] = (unsigned char)i;
/* Does AES provider support salt? */ result = CryptGetKeyParam(hKey, KP_SALT, NULL, &dwLen, 0); todo_wine ok(result || broken(GetLastError() == NTE_BAD_KEY), /* Vista or older */ - "Expected OK, got last error %d\n", GetLastError()); + "Expected OK, got last error %ld\n", GetLastError()); if (result) - ok(!dwLen, "unexpected salt length %d\n", dwLen); + ok(!dwLen, "unexpected salt length %ld\n", dwLen);
/* test default chaining mode */ dwMode = 0xdeadbeef; dwLen = sizeof(dwMode); result = CryptGetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwMode == CRYPT_MODE_CBC, "Wrong default chaining\n");
dwLen = 13; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, 16); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
for (i=0; i<4; i++) { @@ -1198,13 +1198,13 @@ static void test_aes(int keylen)
dwLen = cTestData[i].enclen; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwLen, cTestData[i].buflen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].buflen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].buflen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].buflen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].buflen); memcpy(enc_data, pbData, cTestData[i].buflen);
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].enclen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].enclen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i); if((dwLen != cTestData[i].enclen) || memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)) @@ -1222,7 +1222,7 @@ static void test_aes(int keylen) dwLen = cTestData[i].buflen; memcpy(pbData, enc_data, cTestData[i].buflen); result = CryptDecrypt(hKey, 0, FALSE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Restoring key state by decrypting bad_data with Final = TRUE */ memcpy(bad_data, enc_data, cTestData[i].buflen); @@ -1230,16 +1230,16 @@ static void test_aes(int keylen) SetLastError(0xdeadbeef); result = CryptDecrypt(hKey, 0, TRUE, 0, bad_data, &dwLen); ok(!result, "CryptDecrypt should failed!\n"); - ok(GetLastError() == NTE_BAD_DATA, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].buflen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].buflen); + ok(GetLastError() == NTE_BAD_DATA, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].buflen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].buflen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i);
/* Checking key state */ dwLen = cTestData[i].buflen; memcpy(pbData, enc_data, cTestData[i].buflen); result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwLen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen==cTestData[i].enclen,"length incorrect, got %d, expected %d\n",dwLen,cTestData[i].enclen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen==cTestData[i].enclen,"length incorrect, got %ld, expected %d\n",dwLen,cTestData[i].enclen); ok(memcmp(pbData,cTestData[i].decstr,cTestData[1].enclen)==0,"decryption incorrect %d\n",i); if((dwLen != cTestData[i].enclen) || memcmp(pbData,cTestData[i].decstr,cTestData[i].enclen)) @@ -1249,7 +1249,7 @@ static void test_aes(int keylen) } } result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
static void test_sha2(void) @@ -1292,65 +1292,65 @@ static void test_sha2(void) win_skip("SHA-256/384/512 hashes are not supported before Windows XP SP3\n"); return; } - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (result) { len = sizeof(DWORD); result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); - ok(result && (hashlen == 32), "%08x, hashlen: %d\n", GetLastError(), hashlen); + ok(result && (hashlen == 32), "%08lx, hashlen: %ld\n", GetLastError(), hashlen);
result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
len = 32; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, sha256hash, 32), "Wrong SHA-256 hash!\n");
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
/* SHA-384 hash */ result = CryptCreateHash(hProv, CALG_SHA_384, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (result) { len = sizeof(DWORD); result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); - ok(result && (hashlen == 48), "%08x, hashlen: %d\n", GetLastError(), hashlen); + ok(result && (hashlen == 48), "%08lx, hashlen: %ld\n", GetLastError(), hashlen);
result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
len = 48; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, sha384hash, 48), "Wrong SHA-384 hash!\n");
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
/* SHA-512 hash */ result = CryptCreateHash(hProv, CALG_SHA_512, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (result) { len = sizeof(DWORD); result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE*)&hashlen, &len, 0); - ok(result && (hashlen == 64), "%08x, hashlen: %d\n", GetLastError(), hashlen); + ok(result && (hashlen == 64), "%08lx, hashlen: %ld\n", GetLastError(), hashlen);
result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
len = 64; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &len, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbHashValue, sha512hash, 64), "Wrong SHA-512 hash!\n");
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); } }
@@ -1389,130 +1389,130 @@ static void test_rc2(void) /* MD2 Hashing */ result = CryptCreateHash(hProv, CALG_MD2, 0, 0, &hHash); if (!result) { - ok(GetLastError()==NTE_BAD_ALGID, "%08x\n", GetLastError()); + ok(GetLastError()==NTE_BAD_ALGID, "%08lx\n", GetLastError()); } else { CRYPT_INTEGER_BLOB salt;
result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = 16; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDeriveKey(hProv, CALG_RC2, hHash, 40 << 16, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_KEYLEN, (BYTE*)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* test default chaining mode */ dwMode = 0xdeadbeef; dwLen = sizeof(dwMode); result = CryptGetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwMode == CRYPT_MODE_CBC, "Wrong default chaining mode\n");
dwMode = CRYPT_MODE_CBC; result = CryptSetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_MODE_BITS, (BYTE*)&dwModeBits, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwModeBits = 0xdeadbeef; dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_PERMISSIONS, (BYTE*)&dwModeBits, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwModeBits == (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || broken(dwModeBits == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," - " got %08x\n", dwModeBits); + " got %08lx\n", dwModeBits);
dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_PERMISSIONS, (BYTE*)&dwModeBits, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_BLOCKLEN, (BYTE*)&dwModeBits, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwLen == 4, "Expected 4, got %d\n", dwLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen == 4, "Expected 4, got %ld\n", dwLen);
dwLen = 0; result = CryptGetKeyParam(hKey, KP_IV, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); result = CryptGetKeyParam(hKey, KP_IV, pszBuffer, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwLen == 8, "Expected 8, got %d\n", dwLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen == 8, "Expected 8, got %ld\n", dwLen);
dwLen = 0; result = CryptGetKeyParam(hKey, KP_SALT, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); /* The default salt length is always 11... */ - ok(dwLen == 11, "unexpected salt length %d\n", dwLen); + ok(dwLen == 11, "unexpected salt length %ld\n", dwLen); /* and the default salt is always empty. */ result = CryptGetKeyParam(hKey, KP_SALT, pszBuffer, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); for (i=0; i<dwLen; i++) ok(!pszBuffer[i], "unexpected salt value %02x @ %d\n", pszBuffer[i], i);
dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwMode == CRYPT_MODE_CBC, "Expected CRYPT_MODE_CBC, got %d\n", dwMode); + ok(result, "%08lx\n", GetLastError()); + ok(dwMode == CRYPT_MODE_CBC, "Expected CRYPT_MODE_CBC, got %ld\n", dwMode);
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwDataLen = 13; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwDataLen, 24); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbData, rc2_40_encrypted, 16), "RC2 encryption failed!\n");
dwLen = 0; result = CryptGetKeyParam(hKey, KP_IV, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); result = CryptGetKeyParam(hKey, KP_IV, pszBuffer, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwDataLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Setting the salt value will not reset the salt length in base or strong providers */ result = CryptSetKeyParam(hKey, KP_SALT, pbData, 0); - ok(result, "setting salt failed: %08x\n", GetLastError()); + ok(result, "setting salt failed: %08lx\n", GetLastError()); dwLen = 0; result = CryptGetKeyParam(hKey, KP_SALT, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (BASE_PROV || STRONG_PROV) - ok(dwLen == 11, "expected salt length 11, got %d\n", dwLen); + ok(dwLen == 11, "expected salt length 11, got %ld\n", dwLen); else - ok(dwLen == 0 || broken(nt4 && dwLen == 11), "expected salt length 0, got %d\n", dwLen); + ok(dwLen == 0 || broken(nt4 && dwLen == 11), "expected salt length 0, got %ld\n", dwLen); /* What sizes salt can I set? */ salt.pbData = pbData; for (i=0; i<24; i++) { salt.cbData = i; result = CryptSetKeyParam(hKey, KP_SALT_EX, (BYTE *)&salt, 0); - ok(result, "setting salt failed for size %d: %08x\n", i, GetLastError()); + ok(result, "setting salt failed for size %d: %08lx\n", i, GetLastError()); /* The returned salt length is the same as the set salt length */ result = CryptGetKeyParam(hKey, KP_SALT, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwLen == i, "size %d: unexpected salt length %d\n", i, dwLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen == i, "size %d: unexpected salt length %ld\n", i, dwLen); } salt.cbData = 25; SetLastError(0xdeadbeef); result = CryptSetKeyParam(hKey, KP_SALT_EX, (BYTE *)&salt, 0); ok(!result || broken(result), /* Win9x, WinMe, NT4, W2K */ - "%08x\n", GetLastError()); + "%08lx\n", GetLastError());
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
/* Again, but test setting the effective key len */ @@ -1520,37 +1520,37 @@ static void test_rc2(void)
result = CryptCreateHash(hProv, CALG_MD2, 0, 0, &hHash); if (!result) { - ok(GetLastError()==NTE_BAD_ALGID, "%08x\n", GetLastError()); + ok(GetLastError()==NTE_BAD_ALGID, "%08lx\n", GetLastError()); } else { result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = 16; result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDeriveKey(hProv, CALG_RC2, hHash, 56 << 16, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
SetLastError(0xdeadbeef); result = CryptSetKeyParam(hKey, KP_EFFECTIVE_KEYLEN, NULL, 0); - ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%08x\n", GetLastError()); + ok(!result && GetLastError()==ERROR_INVALID_PARAMETER, "%08lx\n", GetLastError()); dwKeyLen = 0; SetLastError(0xdeadbeef); result = CryptSetKeyParam(hKey, KP_EFFECTIVE_KEYLEN, (LPBYTE)&dwKeyLen, 0); - ok(!result && GetLastError()==NTE_BAD_DATA, "%08x\n", GetLastError()); + ok(!result && GetLastError()==NTE_BAD_DATA, "%08lx\n", GetLastError()); dwKeyLen = 1025; SetLastError(0xdeadbeef); result = CryptSetKeyParam(hKey, KP_EFFECTIVE_KEYLEN, (LPBYTE)&dwKeyLen, 0); - ok(!result, "CryptSetKeyParam failed: %08x\n", GetLastError()); + ok(!result, "CryptSetKeyParam failed: %08lx\n", GetLastError());
dwLen = sizeof(dwKeyLen); result = CryptGetKeyParam(hKey, KP_KEYLEN, (BYTE *)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwKeyLen == 56, "%d (%08x)\n", dwKeyLen, GetLastError()); + ok(result, "%08lx\n", GetLastError()); + ok(dwKeyLen == 56, "%ld (%08lx)\n", dwKeyLen, GetLastError()); result = CryptGetKeyParam(hKey, KP_EFFECTIVE_KEYLEN, (BYTE *)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwKeyLen == 56 || broken(dwKeyLen == 40), "%d (%08x)\n", dwKeyLen, GetLastError()); + ok(result, "%08lx\n", GetLastError()); + ok(dwKeyLen == 56 || broken(dwKeyLen == 40), "%ld (%08lx)\n", dwKeyLen, GetLastError());
dwKeyLen = 128; SetLastError(0xdeadbeef); @@ -1558,55 +1558,55 @@ static void test_rc2(void) if (!BASE_PROV) { dwKeyLen = 12345; - ok(result, "expected success, got error 0x%08X\n", GetLastError()); + ok(result, "expected success, got error 0x%08lX\n", GetLastError()); result = CryptGetKeyParam(hKey, KP_EFFECTIVE_KEYLEN, (BYTE *)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwKeyLen == 128, "Expected 128, got %d\n", dwKeyLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwKeyLen == 128, "Expected 128, got %ld\n", dwKeyLen); } else { ok(!result, "expected error\n"); - ok(GetLastError() == NTE_BAD_DATA, "Expected 0x80009005, got 0x%08X\n", GetLastError()); + ok(GetLastError() == NTE_BAD_DATA, "Expected 0x80009005, got 0x%08lX\n", GetLastError()); result = CryptGetKeyParam(hKey, KP_EFFECTIVE_KEYLEN, (BYTE *)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwKeyLen == 40, "Expected 40, got %d\n", dwKeyLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwKeyLen == 40, "Expected 40, got %ld\n", dwKeyLen); }
dwLen = sizeof(dwKeyLen); result = CryptGetKeyParam(hKey, KP_KEYLEN, (BYTE *)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwKeyLen == 56, "%d (%08x)\n", dwKeyLen, GetLastError()); + ok(result, "%08lx\n", GetLastError()); + ok(dwKeyLen == 56, "%ld (%08lx)\n", dwKeyLen, GetLastError()); result = CryptGetKeyParam(hKey, KP_EFFECTIVE_KEYLEN, (BYTE *)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok((!BASE_PROV && dwKeyLen == 128) || (BASE_PROV && dwKeyLen == 40), - "%d (%08x)\n", dwKeyLen, GetLastError()); + "%ld (%08lx)\n", dwKeyLen, GetLastError());
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwDataLen = 13; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwDataLen, 24); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(!memcmp(pbData, !BASE_PROV ? rc2_128_encrypted : rc2_40def_encrypted, sizeof(rc2_128_encrypted)), "RC2 encryption failed!\n");
/* Oddly enough this succeeds, though it should have no effect */ dwKeyLen = 40; result = CryptSetKeyParam(hKey, KP_EFFECTIVE_KEYLEN, (LPBYTE)&dwKeyLen, 0); - ok(result, "%d\n", GetLastError()); + ok(result, "%ld\n", GetLastError());
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Test a 40 bit key with salt */ result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDeriveKey(hProv, CALG_RC2, hHash, (40<<16)|CRYPT_CREATE_SALT, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwDataLen = 16; memset(pbData, 0xAF, dwDataLen); @@ -1623,28 +1623,28 @@ static void test_rc2(void) { error = GetLastError(); ok(error == NTE_BAD_DATA || broken(error == NTE_DOUBLE_ENCRYPT), - "Expected 0x80009005, got 0x%08X\n", error); + "Expected 0x80009005, got 0x%08lX\n", error); } dwLen = sizeof(DWORD); dwKeyLen = 12345; result = CryptGetKeyParam(hKey, KP_KEYLEN, (BYTE*)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwKeyLen == 40, "Expected 40, got %d\n", dwKeyLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwKeyLen == 40, "Expected 40, got %ld\n", dwKeyLen);
dwLen = sizeof(pszBuffer); memset(pszBuffer, 0xAF, dwLen); result = CryptGetKeyParam(hKey, KP_SALT, pszBuffer, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!ENHANCED_PROV) - ok(dwLen == 11, "Expected 11, got %d\n", dwLen); + ok(dwLen == 11, "Expected 11, got %ld\n", dwLen); else - ok(dwLen == 0, "Expected 0, got %d\n", dwLen); + ok(dwLen == 0, "Expected 0, got %ld\n", dwLen);
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); } }
@@ -1673,108 +1673,108 @@ static void test_rc4(void) result = CryptCreateHash(hProv, CALG_MD2, 0, 0, &hHash); if (!result) { /* rsaenh compiled without OpenSSL */ - ok(GetLastError() == NTE_BAD_ALGID, "%08x\n", GetLastError()); + ok(GetLastError() == NTE_BAD_ALGID, "%08lx\n", GetLastError()); } else { CRYPT_INTEGER_BLOB salt;
result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = 16; result = CryptGetHashParam(hHash, HP_HASHVAL, pszBuffer, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDeriveKey(hProv, CALG_RC4, hHash, 56 << 16, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_KEYLEN, (BYTE*)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwKeyLen == 56, "Expected 56, got %d\n", dwKeyLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwKeyLen == 56, "Expected 56, got %ld\n", dwKeyLen);
dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_BLOCKLEN, (BYTE*)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwKeyLen == 0, "Expected 0, got %d\n", dwKeyLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwKeyLen == 0, "Expected 0, got %ld\n", dwKeyLen);
dwLen = 0; result = CryptGetKeyParam(hKey, KP_IV, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); result = CryptGetKeyParam(hKey, KP_IV, pszBuffer, &dwLen, 0);
dwLen = 0; result = CryptGetKeyParam(hKey, KP_SALT, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); result = CryptGetKeyParam(hKey, KP_SALT, pszBuffer, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey, KP_MODE, (BYTE*)&dwMode, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwMode == 0 || broken(dwMode == CRYPT_MODE_CBC) /* <= 2000 */, - "Expected 0, got %d\n", dwMode); + "Expected 0, got %ld\n", dwMode);
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwDataLen = 16; result = CryptEncrypt(hKey, 0, TRUE, 0, NULL, &dwDataLen, 24); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); dwDataLen = 16; result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwDataLen, 24); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(pbData, rc4, dwDataLen), "RC4 encryption failed!\n");
result = CryptDecrypt(hKey, 0, TRUE, 0, pbData, &dwDataLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Setting the salt value will not reset the salt length in base or strong providers */ result = CryptSetKeyParam(hKey, KP_SALT, pbData, 0); - ok(result, "setting salt failed: %08x\n", GetLastError()); + ok(result, "setting salt failed: %08lx\n", GetLastError()); dwLen = 0; result = CryptGetKeyParam(hKey, KP_SALT, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (BASE_PROV || STRONG_PROV) - ok(dwLen == 11, "expected salt length 11, got %d\n", dwLen); + ok(dwLen == 11, "expected salt length 11, got %ld\n", dwLen); else - ok(dwLen == 0 || broken(nt4 && dwLen == 11), "expected salt length 0, got %d\n", dwLen); + ok(dwLen == 0 || broken(nt4 && dwLen == 11), "expected salt length 0, got %ld\n", dwLen); /* What sizes salt can I set? */ salt.pbData = pbData; for (i=0; i<24; i++) { salt.cbData = i; result = CryptSetKeyParam(hKey, KP_SALT_EX, (BYTE *)&salt, 0); - ok(result, "setting salt failed for size %d: %08x\n", i, GetLastError()); + ok(result, "setting salt failed for size %d: %08lx\n", i, GetLastError()); /* The returned salt length is the same as the set salt length */ result = CryptGetKeyParam(hKey, KP_SALT, NULL, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwLen == i, "size %d: unexpected salt length %d\n", i, dwLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen == i, "size %d: unexpected salt length %ld\n", i, dwLen); } salt.cbData = 25; SetLastError(0xdeadbeef); result = CryptSetKeyParam(hKey, KP_SALT_EX, (BYTE *)&salt, 0); ok(!result || broken(result), /* Win9x, WinMe, NT4, W2K */ - "%08x\n", GetLastError()); + "%08lx\n", GetLastError());
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Test a 40 bit key with salt */ result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptHashData(hHash, pbData, sizeof(pbData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDeriveKey(hProv, CALG_RC4, hHash, (40<<16)|CRYPT_CREATE_SALT, &hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); dwDataLen = 16; memset(pbData, 0xAF, dwDataLen); SetLastError(0xdeadbeef); result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwDataLen, 24); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok((ENHANCED_PROV && !memcmp(pbData, rc4_40_salt, dwDataLen)) || (!ENHANCED_PROV && !memcmp(pbData, rc4_40_salt_base, dwDataLen)), "RC4 encryption failed!\n"); @@ -1782,23 +1782,23 @@ static void test_rc4(void) dwLen = sizeof(DWORD); dwKeyLen = 12345; result = CryptGetKeyParam(hKey, KP_KEYLEN, (BYTE*)&dwKeyLen, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); - ok(dwKeyLen == 40, "Expected 40, got %d\n", dwKeyLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwKeyLen == 40, "Expected 40, got %ld\n", dwKeyLen);
dwLen = sizeof(pszBuffer); memset(pszBuffer, 0xAF, dwLen); result = CryptGetKeyParam(hKey, KP_SALT, pszBuffer, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!ENHANCED_PROV) - ok(dwLen == 11, "Expected 11, got %d\n", dwLen); + ok(dwLen == 11, "Expected 11, got %ld\n", dwLen); else - ok(dwLen == 0, "Expected 0, got %d\n", dwLen); + ok(dwLen == 0, "Expected 0, got %ld\n", dwLen);
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); } }
@@ -1820,30 +1820,30 @@ static void test_hmac(void) { if (!derive_key(CALG_RC2, &hKey, 56)) return;
result = CryptCreateHash(hProv, CALG_HMAC, hKey, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptSetHashParam(hHash, HP_HMAC_INFO, (BYTE*)&hmacInfo, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptHashData(hHash, abData, sizeof(abData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = ARRAY_SIZE(abData); result = CryptGetHashParam(hHash, HP_HASHVAL, abData, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
ok(!memcmp(abData, hmac, sizeof(hmac)), "HMAC failed!\n");
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Provoke errors */ result = CryptCreateHash(hProv, CALG_HMAC, 0, 0, &hHash); - ok(!result && GetLastError() == NTE_BAD_KEY, "%08x\n", GetLastError()); + ok(!result && GetLastError() == NTE_BAD_KEY, "%08lx\n", GetLastError()); }
static void test_mac(void) { @@ -1862,26 +1862,26 @@ static void test_mac(void) {
dwLen = 256; result = CryptEncrypt(hKey, 0, TRUE, 0, abEnc, &dwLen, 264); - ok (result && dwLen == 264, "%08x, dwLen: %d\n", GetLastError(), dwLen); + ok (result && dwLen == 264, "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
result = CryptCreateHash(hProv, CALG_MAC, hKey, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptHashData(hHash, abData, sizeof(abData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
dwLen = ARRAY_SIZE(abData); result = CryptGetHashParam(hHash, HP_HASHVAL, abData, &dwLen, 0); - ok(result && dwLen == 8, "%08x, dwLen: %d\n", GetLastError(), dwLen); + ok(result && dwLen == 8, "%08lx, dwLen: %ld\n", GetLastError(), dwLen);
ok(!memcmp(abData, mac_40, sizeof(mac_40)), "MAC failed!\n");
result = CryptDestroyHash(hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
/* Provoke errors */ if (!derive_key(CALG_RC4, &hKey, 56)) return; @@ -1890,10 +1890,10 @@ static void test_mac(void) { result = CryptCreateHash(hProv, CALG_MAC, hKey, 0, &hHash); ok((!result && GetLastError() == NTE_BAD_KEY) || broken(result), /* Win9x, WinMe, NT4, W2K */ - "%08x\n", GetLastError()); + "%08lx\n", GetLastError());
result = CryptDestroyKey(hKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); }
static void test_import_private(void) @@ -1932,29 +1932,29 @@ static void test_import_private(void) result = CryptImportKey(hProv, abPlainPrivateKey, dwLen, 0, 0, &hKeyExchangeKey); if (!result) { /* rsaenh compiled without OpenSSL */ - ok(GetLastError() == NTE_FAIL, "%08x\n", GetLastError()); + ok(GetLastError() == NTE_FAIL, "%08lx\n", GetLastError()); return; }
dwLen = (DWORD)sizeof(abSessionKey); result = CryptImportKey(hProv, abSessionKey, dwLen, hKeyExchangeKey, 0, &hSessionKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
dwVal = 0xdeadbeef; dwLen = sizeof(DWORD); result = CryptGetKeyParam(hSessionKey, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwVal == (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," - " got %08x\n", dwVal); + " got %08lx\n", dwVal);
dwLen = (DWORD)sizeof(abEncryptedMessage); result = CryptDecrypt(hSessionKey, 0, TRUE, 0, abEncryptedMessage, &dwLen); - ok(result, "%08x\n", GetLastError()); - ok(dwLen == 12, "expected 12, got %d\n", dwLen); + ok(result, "%08lx\n", GetLastError()); + ok(dwLen == 12, "expected 12, got %ld\n", dwLen); ok(!memcmp(abEncryptedMessage, "Wine rocks!", 12), "decrypt failed\n"); CryptDestroyKey(hSessionKey);
@@ -1962,13 +1962,13 @@ static void test_import_private(void)
dwLen = (DWORD)sizeof(abSessionKey); result = CryptExportKey(hSessionKey, hKeyExchangeKey, SIMPLEBLOB, 0, abSessionKey, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); CryptDestroyKey(hSessionKey); if (!result) return;
dwLen = (DWORD)sizeof(abSessionKey); result = CryptImportKey(hProv, abSessionKey, dwLen, hKeyExchangeKey, 0, &hSessionKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
CryptDestroyKey(hSessionKey); @@ -1982,7 +1982,7 @@ static void test_import_private(void) for (; dwLen < sizeof(abPlainPrivateKey); dwLen++) { result = CryptImportKey(hProv, abPlainPrivateKey, dwLen, 0, 0, &hKeyExchangeKey); - ok(result, "CryptImportKey failed at size %d: %d (%08x)\n", dwLen, + ok(result, "CryptImportKey failed at size %ld: %ld (%08lx)\n", dwLen, GetLastError(), GetLastError()); if (result) CryptDestroyKey(hKeyExchangeKey); @@ -2169,21 +2169,21 @@ static void test_verify_signature(void) { };
result = CryptImportKey(hProv, abPubKey, 148, 0, 0, &hPubSignKey); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptCreateHash(hProv, CALG_MD2, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptHashData(hHash, abData, (DWORD)sizeof(abData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
/*check that a NULL pointer signature is correctly handled*/ result = CryptVerifySignatureA(hHash, NULL, 128, hPubSignKey, NULL, 0); ok(!result && ERROR_INVALID_PARAMETER == GetLastError(), - "Expected ERROR_INVALID_PARAMETER error, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER error, got %08lx\n", GetLastError()); if (result) return;
/* check that we get a bad signature error when the signature is too short*/ @@ -2191,85 +2191,85 @@ static void test_verify_signature(void) { result = CryptVerifySignatureA(hHash, abSignatureMD2, 64, hPubSignKey, NULL, 0); ok((!result && NTE_BAD_SIGNATURE == GetLastError()) || broken(result), /* Win9x, WinMe, NT4 */ - "Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError()); + "Expected NTE_BAD_SIGNATURE, got %08lx\n", GetLastError());
result = CryptVerifySignatureA(hHash, abSignatureMD2, 128, hPubSignKey, NULL, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
/* It seems that CPVerifySignature doesn't care about the OID at all. */ result = CryptVerifySignatureA(hHash, abSignatureMD2NoOID, 128, hPubSignKey, NULL, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureMD2NoOID, 128, hPubSignKey, NULL, CRYPT_NOHASHOID); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
CryptDestroyHash(hHash);
result = CryptCreateHash(hProv, CALG_MD4, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptHashData(hHash, abData, (DWORD)sizeof(abData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureMD4, 128, hPubSignKey, NULL, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureMD4NoOID, 128, hPubSignKey, NULL, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureMD4NoOID, 128, hPubSignKey, NULL, CRYPT_NOHASHOID); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
CryptDestroyHash(hHash);
result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptHashData(hHash, abData, (DWORD)sizeof(abData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureMD5, 128, hPubSignKey, NULL, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureMD5NoOID, 128, hPubSignKey, NULL, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureMD5NoOID, 128, hPubSignKey, NULL, CRYPT_NOHASHOID); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
CryptDestroyHash(hHash);
result = CryptCreateHash(hProv, CALG_SHA, 0, 0, &hHash); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptHashData(hHash, abData, (DWORD)sizeof(abData), 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureSHA, 128, hPubSignKey, NULL, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureSHANoOID, 128, hPubSignKey, NULL, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptVerifySignatureA(hHash, abSignatureSHANoOID, 128, hPubSignKey, NULL, CRYPT_NOHASHOID); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); if (!result) return;
CryptDestroyHash(hHash); @@ -2286,7 +2286,7 @@ static void test_rsa_encrypt(void)
/* It is allowed to use the key exchange key for encryption/decryption */ result = CryptGetUserKey(hProv, AT_KEYEXCHANGE, &hRSAKey); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
dwLen = 12; @@ -2296,16 +2296,16 @@ static void test_rsa_encrypt(void) CryptDestroyKey(hRSAKey); return; } - ok(result, "CryptEncrypt failed: %08x\n", GetLastError()); - ok(dwLen == 128, "Unexpected length %d\n", dwLen); + ok(result, "CryptEncrypt failed: %08lx\n", GetLastError()); + ok(dwLen == 128, "Unexpected length %ld\n", dwLen); /* PKCS1 V1.5 */ dwLen = 12; result = CryptEncrypt(hRSAKey, 0, TRUE, 0, abData, &dwLen, (DWORD)sizeof(abData)); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptDecrypt(hRSAKey, 0, TRUE, 0, abData, &dwLen); - ok (result && dwLen == 12 && !memcmp(abData, "Wine rocks!", 12), "%08x\n", GetLastError()); + ok (result && dwLen == 12 && !memcmp(abData, "Wine rocks!", 12), "%08lx\n", GetLastError());
/* OAEP, RFC 8017 PKCS #1 V2.2 */ /* Test minimal buffer length requirement */ @@ -2313,13 +2313,13 @@ static void test_rsa_encrypt(void) SetLastError(0xdeadbeef); result = CryptEncrypt(hRSAKey, 0, TRUE, CRYPT_OAEP, abData, &dwLen, 20 * 2 + 2); err = GetLastError(); - ok(!result && err == ERROR_MORE_DATA, "%08x\n", err); + ok(!result && err == ERROR_MORE_DATA, "%08lx\n", err);
/* Test data length limit */ dwLen = sizeof(abData) - (20 * 2 + 2) + 1; result = CryptEncrypt(hRSAKey, 0, TRUE, CRYPT_OAEP, abData, &dwLen, (DWORD)sizeof(abData)); err = GetLastError(); - ok(!result && err == NTE_BAD_LEN, "%08x\n", err); + ok(!result && err == NTE_BAD_LEN, "%08lx\n", err);
/* Test malformed data */ dwLen = 12; @@ -2328,61 +2328,61 @@ static void test_rsa_encrypt(void) result = CryptDecrypt(hRSAKey, 0, TRUE, CRYPT_OAEP, abData, &dwLen); err = GetLastError(); /* NTE_DOUBLE_ENCRYPT on xp or 2003 */ - ok(!result && (err == NTE_BAD_DATA || broken(err == NTE_DOUBLE_ENCRYPT)), "%08x\n", err); + ok(!result && (err == NTE_BAD_DATA || broken(err == NTE_DOUBLE_ENCRYPT)), "%08lx\n", err);
/* Test decrypt with insufficient buffer */ dwLen = 12; SetLastError(0xdeadbeef); memcpy(abData, "Wine rocks!", 12); result = CryptEncrypt(hRSAKey, 0, TRUE, CRYPT_OAEP, abData, &dwLen, (DWORD)sizeof(abData)); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); dwLen = 11; SetLastError(0xdeadbeef); result = CryptDecrypt(hRSAKey, 0, TRUE, CRYPT_OAEP, abData, &dwLen); err = GetLastError(); /* broken on xp or 2003 */ ok((!result && dwLen == 11 && err == NTE_BAD_DATA) || broken(result == TRUE && dwLen == 12 && err == ERROR_NO_TOKEN), - "%08x %d %08x\n", result, dwLen, err); + "%08x %ld %08lx\n", result, dwLen, err);
/* Test normal encryption and decryption */ dwLen = 12; memcpy(abData, "Wine rocks!", dwLen); result = CryptEncrypt(hRSAKey, 0, TRUE, CRYPT_OAEP, abData, &dwLen, (DWORD)sizeof(abData)); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); result = CryptDecrypt(hRSAKey, 0, TRUE, CRYPT_OAEP, abData, &dwLen); - ok(result && dwLen == 12 && !memcmp(abData, "Wine rocks!", 12), "%08x\n", GetLastError()); + ok(result && dwLen == 12 && !memcmp(abData, "Wine rocks!", 12), "%08lx\n", GetLastError());
dwVal = 0xdeadbeef; dwLen = sizeof(DWORD); result = CryptGetKeyParam(hRSAKey, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwVal == (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," - " got %08x\n", dwVal); + " got %08lx\n", dwVal);
/* An RSA key doesn't support salt */ result = CryptGetKeyParam(hRSAKey, KP_SALT, NULL, &dwLen, 0); ok(!result && (GetLastError() == NTE_BAD_KEY || GetLastError() == NTE_NOT_FOUND /* Win7 */), - "expected NTE_BAD_KEY or NTE_NOT_FOUND, got %08x\n", GetLastError()); + "expected NTE_BAD_KEY or NTE_NOT_FOUND, got %08lx\n", GetLastError());
/* The key exchange key's public key may be exported.. */ result = CryptExportKey(hRSAKey, 0, PUBLICKEYBLOB, 0, NULL, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); /* but its private key may not be. */ SetLastError(0xdeadbeef); result = CryptExportKey(hRSAKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen); ok((!result && GetLastError() == NTE_BAD_KEY_STATE) || broken(result), /* Win9x/NT4 */ - "expected NTE_BAD_KEY_STATE, got %08x\n", GetLastError()); + "expected NTE_BAD_KEY_STATE, got %08lx\n", GetLastError()); /* Setting the permissions of the key exchange key isn't allowed, either. */ dwVal |= CRYPT_EXPORT; SetLastError(0xdeadbeef); result = CryptSetKeyParam(hRSAKey, KP_PERMISSIONS, (BYTE *)&dwVal, 0); ok(!result && (GetLastError() == NTE_BAD_DATA || GetLastError() == NTE_BAD_FLAGS), - "expected NTE_BAD_DATA or NTE_BAD_FLAGS, got %08x\n", GetLastError()); + "expected NTE_BAD_DATA or NTE_BAD_FLAGS, got %08lx\n", GetLastError());
CryptDestroyKey(hRSAKey);
@@ -2390,40 +2390,40 @@ static void test_rsa_encrypt(void) result = CryptGetUserKey(hProv, AT_SIGNATURE, &hRSAKey); if (!result) { - skip("No signature key in provider %s found, error %#x.\n", szProviders[iProv], GetLastError()); + skip("No signature key in provider %s found, error %#lx.\n", szProviders[iProv], GetLastError()); return; }
dwVal = 0xdeadbeef; dwLen = sizeof(DWORD); result = CryptGetKeyParam(hRSAKey, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwVal == (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," - " got %08x\n", dwVal); + " got %08lx\n", dwVal);
/* The signature key's public key may also be exported.. */ result = CryptExportKey(hRSAKey, 0, PUBLICKEYBLOB, 0, NULL, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); /* but its private key may not be. */ SetLastError(0xdeadbeef); result = CryptExportKey(hRSAKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen); ok((!result && GetLastError() == NTE_BAD_KEY_STATE) || broken(result), /* Win9x/NT4 */ - "expected NTE_BAD_KEY_STATE, got %08x\n", GetLastError()); + "expected NTE_BAD_KEY_STATE, got %08lx\n", GetLastError()); /* Setting the permissions of the signature key isn't allowed, either. */ dwVal |= CRYPT_EXPORT; SetLastError(0xdeadbeef); result = CryptSetKeyParam(hRSAKey, KP_PERMISSIONS, (BYTE *)&dwVal, 0); ok(!result && (GetLastError() == NTE_BAD_DATA || GetLastError() == NTE_BAD_FLAGS), - "expected NTE_BAD_DATA or NTE_BAD_FLAGS, got %08x\n", GetLastError()); + "expected NTE_BAD_DATA or NTE_BAD_FLAGS, got %08lx\n", GetLastError());
dwLen = 12; result = CryptEncrypt(hRSAKey, 0, TRUE, 0, abData, &dwLen, (DWORD)sizeof(abData)); - ok (!result && GetLastError() == NTE_BAD_KEY, "%08x\n", GetLastError()); + ok (!result && GetLastError() == NTE_BAD_KEY, "%08lx\n", GetLastError());
CryptDestroyKey(hRSAKey); } @@ -2615,15 +2615,15 @@ static void test_import_export(void) dwVal = 0xdeadbeef; dwDataLen = sizeof(DWORD); result = CryptGetKeyParam(hPublicKey, KP_PERMISSIONS, (BYTE*)&dwVal, &dwDataLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwVal == (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT) || broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_DECRYPT|CRYPT_ENCRYPT," - " got %08x\n", dwVal); + " got %08lx\n", dwVal); result = CryptExportKey(hPublicKey, 0, PUBLICKEYBLOB, 0, emptyKey, &dwLen); ok(result, "failed to export the fresh imported public key\n"); - ok(dwLen == 84, "Expected exported key to be 84 bytes long but got %d bytes.\n",dwLen); + ok(dwLen == 84, "Expected exported key to be 84 bytes long but got %ld bytes.\n",dwLen); ok(!memcmp(emptyKey, abPlainPublicKey, dwLen), "exported key is different from the imported key\n");
CryptDestroyKey(hPublicKey); @@ -2631,16 +2631,16 @@ static void test_import_export(void) /* imports into AT_SIGNATURE key container */ result = CryptImportKey(hProv, priv_key_with_high_bit, sizeof(priv_key_with_high_bit), 0, CRYPT_EXPORTABLE, &hPrivKey); - ok(result, "CryptImportKey failed: %08x\n", GetLastError()); + ok(result, "CryptImportKey failed: %08lx\n", GetLastError());
result = CryptExportKey(hPrivKey, 0, PRIVATEKEYBLOB, 0, NULL, &dwDataLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError()); exported_key = HeapAlloc(GetProcessHeap(), 0, dwDataLen); result = CryptExportKey(hPrivKey, 0, PRIVATEKEYBLOB, 0, exported_key, &dwDataLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError());
- ok(dwDataLen == sizeof(expected_exported_priv_key), "unexpected size %d\n", + ok(dwDataLen == sizeof(expected_exported_priv_key), "unexpected size %ld\n", dwDataLen); ok(!memcmp(exported_key, expected_exported_priv_key, dwDataLen), "unexpected value\n"); @@ -2652,33 +2652,33 @@ static void test_import_export(void) /* imports into AT_KEYEXCHANGE key container */ result = CryptImportKey(hProv, abPlainPrivateKey, sizeof(abPlainPrivateKey), 0, 0, &hPrivKey); - ok(result, "CryptImportKey failed: %08x\n", GetLastError()); + ok(result, "CryptImportKey failed: %08lx\n", GetLastError());
result = CryptExportKey(hPrivKey, 0, PUBLICKEYBLOB, 0, NULL, &dwDataLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError()); exported_key = HeapAlloc(GetProcessHeap(), 0, dwDataLen); result = CryptExportKey(hPrivKey, 0, PUBLICKEYBLOB, 0, exported_key, &dwDataLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError()); CryptDestroyKey(hPrivKey);
/* getting the public key from AT_KEYEXCHANGE, and compare it */ result = CryptGetUserKey(hProv, AT_KEYEXCHANGE, &hPrivKey); - ok(result, "CryptGetUserKey failed: %08x\n", GetLastError()); + ok(result, "CryptGetUserKey failed: %08lx\n", GetLastError()); result = CryptExportKey(hPrivKey, 0, PUBLICKEYBLOB, 0, NULL, &dwDataLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError()); exported_key2 = HeapAlloc(GetProcessHeap(), 0, dwDataLen); result = CryptExportKey(hPrivKey, 0, PUBLICKEYBLOB, 0, exported_key2, &dwDataLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError()); CryptDestroyKey(hPrivKey);
result = !memcmp(exported_key, exported_key2, dwDataLen); ok(result, "unexpected value\n"); if (!result && winetest_debug > 1) { - trace("Expected public key (%u):\n", dwDataLen); + trace("Expected public key (%lu):\n", dwDataLen); trace_hex(exported_key, dwDataLen); - trace("AT_KEYEXCHANGE public key (%u):\n", dwDataLen); + trace("AT_KEYEXCHANGE public key (%lu):\n", dwDataLen); trace_hex(exported_key2, dwDataLen); } HeapFree(GetProcessHeap(), 0, exported_key2); @@ -2691,21 +2691,21 @@ static void test_import_export(void)
/* getting the public key again, and compare it */ result = CryptGetUserKey(hProv, AT_KEYEXCHANGE, &hPrivKey); - ok(result, "CryptGetUserKey failed: %08x\n", GetLastError()); + ok(result, "CryptGetUserKey failed: %08lx\n", GetLastError()); result = CryptExportKey(hPrivKey, 0, PUBLICKEYBLOB, 0, NULL, &dwDataLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError()); exported_key2 = HeapAlloc(GetProcessHeap(), 0, dwDataLen); result = CryptExportKey(hPrivKey, 0, PUBLICKEYBLOB, 0, exported_key2, &dwDataLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError()); CryptDestroyKey(hPrivKey);
result = !memcmp(exported_key, exported_key2, dwDataLen); ok(result, "unexpected value\n"); if (!result && winetest_debug > 1) { - trace("Expected public key (%u):\n", dwDataLen); + trace("Expected public key (%lu):\n", dwDataLen); trace_hex(exported_key, dwDataLen); - trace("AT_KEYEXCHANGE public key (%u):\n", dwDataLen); + trace("AT_KEYEXCHANGE public key (%lu):\n", dwDataLen); trace_hex(exported_key2, dwDataLen); }
@@ -2796,7 +2796,7 @@ static void test_import_hmac(void) *key_len = test_case->key_len; memcpy(key_bytes, test_case->key, *key_len); result = CryptImportKey(hProv, blob, size, 0, CRYPT_IPSEC_HMAC_KEY, &key); - ok(result || broken(GetLastError() == NTE_BAD_FLAGS /* Win2k */), "CryptImportKey failed on test case %d: %08x\n", i, GetLastError()); + ok(result || broken(GetLastError() == NTE_BAD_FLAGS /* Win2k */), "CryptImportKey failed on test case %ld: %08lx\n", i, GetLastError()); if (result) { HCRYPTHASH hash; @@ -2805,15 +2805,15 @@ static void test_import_hmac(void) DWORD digest_size;
result = CryptCreateHash(hProv, CALG_HMAC, key, 0, &hash); - ok(result, "CryptCreateHash failed on test case %d: %08x\n", i, GetLastError()); + ok(result, "CryptCreateHash failed on test case %ld: %08lx\n", i, GetLastError()); result = CryptSetHashParam(hash, HP_HMAC_INFO, (BYTE *)&hmac_info, 0); - ok(result, "CryptSetHashParam failed on test case %d: %08x\n", i, GetLastError()); + ok(result, "CryptSetHashParam failed on test case %ld: %08lx\n", i, GetLastError()); result = CryptHashData(hash, (const BYTE *)test_case->data, test_case->data_len, 0); - ok(result, "CryptHashData failed on test case %d: %08x\n", i, GetLastError()); + ok(result, "CryptHashData failed on test case %ld: %08lx\n", i, GetLastError()); digest_size = sizeof(digest); result = CryptGetHashParam(hash, HP_HASHVAL, digest, &digest_size, 0); - ok(result, "CryptGetHashParam failed on test case %d: %08x\n", i, GetLastError()); - ok(!memcmp(digest, test_case->digest, sizeof(digest)), "Unexpected value on test case %d\n", i); + ok(result, "CryptGetHashParam failed on test case %ld: %08lx\n", i, GetLastError()); + ok(!memcmp(digest, test_case->digest, sizeof(digest)), "Unexpected value on test case %ld\n", i); CryptDestroyHash(hash); CryptDestroyKey(key); } @@ -2877,12 +2877,12 @@ static void test_schannel_provider(void) win_skip("no PROV_RSA_SCHANNEL support\n"); return; } - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (result) CryptReleaseContext(hProv, 0);
result = CryptAcquireContextA(&hProv, NULL, NULL, PROV_RSA_SCHANNEL, CRYPT_VERIFYCONTEXT); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
/* To get deterministic results, we import the TLS1 master secret (which @@ -2890,12 +2890,12 @@ static void test_schannel_provider(void) * an RSA key. */ dwLen = (DWORD)sizeof(abPlainPrivateKey); result = CryptImportKey(hProv, abPlainPrivateKey, dwLen, 0, 0, &hRSAKey); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
dwLen = (DWORD)sizeof(abTLS1Master); result = CryptImportKey(hProv, abTLS1Master, dwLen, hRSAKey, 0, &hMasterSecret); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
/* Deriving a hash from the master secret. This is due to the CryptoAPI architecture. @@ -2905,26 +2905,26 @@ static void test_schannel_provider(void) */ result = CryptCreateHash(hProv, CALG_SCHANNEL_MASTER_HASH, hMasterSecret, 0, &hMasterHash); ok (!result && GetLastError() == ERROR_INVALID_PARAMETER, - "expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + "expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError());
/* Setting the TLS1 client and server random parameters, as well as the * MAC and encryption algorithm parameters. */ data_blob.cbData = 33; data_blob.pbData = abClientSecret; result = CryptSetKeyParam(hMasterSecret, KP_CLIENT_RANDOM, (BYTE*)&data_blob, 0); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
data_blob.cbData = 33; data_blob.pbData = abServerSecret; result = CryptSetKeyParam(hMasterSecret, KP_SERVER_RANDOM, (BYTE*)&data_blob, 0); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptCreateHash(hProv, CALG_SCHANNEL_MASTER_HASH, hMasterSecret, 0, &hMasterHash); ok (result || broken(!result), /* Windows 8 and greater */ - "%08x\n", GetLastError()); + "%08lx\n", GetLastError()); if (!result) { win_skip("Broken TLS1 hash creation\n"); @@ -2940,7 +2940,7 @@ static void test_schannel_provider(void) */ result = CryptDeriveKey(hProv, CALG_SCHANNEL_ENC_KEY, hMasterHash, CRYPT_SERVER, &hServerWriteKey); ok (!result && GetLastError() == NTE_BAD_FLAGS, - "expected NTE_BAD_FLAGS, got %08x\n", GetLastError()); + "expected NTE_BAD_FLAGS, got %08lx\n", GetLastError());
CryptDestroyHash(hMasterHash);
@@ -2950,7 +2950,7 @@ static void test_schannel_provider(void) saSChannelAlg.dwFlags = 0; saSChannelAlg.dwReserved = 0; result = CryptSetKeyParam(hMasterSecret, KP_SCHANNEL_ALG, (PBYTE)&saSChannelAlg, 0); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
saSChannelAlg.dwUse = SCHANNEL_MAC_KEY; @@ -2959,68 +2959,68 @@ static void test_schannel_provider(void) saSChannelAlg.dwFlags = 0; saSChannelAlg.dwReserved = 0; result = CryptSetKeyParam(hMasterSecret, KP_SCHANNEL_ALG, (PBYTE)&saSChannelAlg, 0); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptCreateHash(hProv, CALG_SCHANNEL_MASTER_HASH, hMasterSecret, 0, &hMasterHash); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
/* Deriving the server write encryption key from the master hash */ result = CryptDeriveKey(hProv, CALG_SCHANNEL_ENC_KEY, hMasterHash, CRYPT_SERVER, &hServerWriteKey); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
/* Encrypting some data with the server write encryption key and checking the result. */ dwLen = 12; result = CryptEncrypt(hServerWriteKey, 0, TRUE, 0, abData, &dwLen, 16); - ok (result && (dwLen == 16) && !memcmp(abData, abEncryptedData, 16), "%08x\n", GetLastError()); + ok (result && (dwLen == 16) && !memcmp(abData, abEncryptedData, 16), "%08lx\n", GetLastError());
/* Second test case: Test the TLS1 pseudo random number function. */ result = CryptCreateHash(hProv, CALG_TLS1PRF, hMasterSecret, 0, &hTLS1PRF); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
/* Set the label and seed parameters for the random number function */ data_blob.cbData = 36; data_blob.pbData = abHashedHandshakes; result = CryptSetHashParam(hTLS1PRF, HP_TLS1PRF_SEED, (BYTE*)&data_blob, 0); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
data_blob.cbData = 15; data_blob.pbData = abClientFinished; result = CryptSetHashParam(hTLS1PRF, HP_TLS1PRF_LABEL, (BYTE*)&data_blob, 0); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
/* Generate some pseudo random bytes and check if they are correct. */ dwLen = (DWORD)sizeof(abData); result = CryptGetHashParam(hTLS1PRF, HP_HASHVAL, abData, &dwLen, 0); ok (result && (dwLen==(DWORD)sizeof(abData)) && !memcmp(abData, abPRF, sizeof(abData)), - "%08x\n", GetLastError()); + "%08lx\n", GetLastError());
/* Third test case. Derive the server write mac key. Derive an HMAC object from this one. * Hash some data with the HMAC. Compare results. */ result = CryptDeriveKey(hProv, CALG_SCHANNEL_MAC_KEY, hMasterHash, CRYPT_SERVER, &hServerWriteMACKey); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptCreateHash(hProv, CALG_HMAC, hServerWriteMACKey, 0, &hHMAC); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptSetHashParam(hHMAC, HP_HMAC_INFO, (PBYTE)&hmacInfo, 0); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
result = CryptHashData(hHMAC, abData, (DWORD)sizeof(abData), 0); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
dwLen = (DWORD)sizeof(abMD5Hash); result = CryptGetHashParam(hHMAC, HP_HASHVAL, abMD5Hash, &dwLen, 0); - ok (result && (dwLen == 16) && !memcmp(abMD5Hash, abMD5, 16), "%08x\n", GetLastError()); + ok (result && (dwLen == 16) && !memcmp(abMD5Hash, abMD5, 16), "%08lx\n", GetLastError());
CryptDestroyHash(hHMAC); CryptDestroyHash(hTLS1PRF); @@ -3052,11 +3052,11 @@ static void test_rsa_round_trip(void) /* Generate a new key... */ result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); result = CryptGenKey(prov, CALG_RSA_KEYX, CRYPT_EXPORTABLE, &signKey); - ok(result, "CryptGenKey with CALG_RSA_KEYX failed with error %08x\n", GetLastError()); + ok(result, "CryptGenKey with CALG_RSA_KEYX failed with error %08lx\n", GetLastError()); result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &keyExchangeKey); - ok(result, "CryptGetUserKey failed: %08x\n", GetLastError()); + ok(result, "CryptGetUserKey failed: %08lx\n", GetLastError()); /* encrypt some data with it... */ memcpy(data, test_string, strlen(test_string) + 1); dataLen = strlen(test_string) + 1; @@ -3064,21 +3064,21 @@ static void test_rsa_round_trip(void) sizeof(data)); ok(result || broken(GetLastError() == NTE_BAD_KEY /* Win9x/2000 */) || broken(GetLastError() == NTE_PERM /* NT4 */), - "CryptEncrypt failed: %08x\n", GetLastError()); + "CryptEncrypt failed: %08lx\n", GetLastError()); /* export the key... */ result = CryptExportKey(keyExchangeKey, 0, PRIVATEKEYBLOB, 0, NULL, &keyLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError()); exportedKey = HeapAlloc(GetProcessHeap(), 0, keyLen); result = CryptExportKey(keyExchangeKey, 0, PRIVATEKEYBLOB, 0, exportedKey, &keyLen); - ok(result, "CryptExportKey failed: %08x\n", GetLastError()); + ok(result, "CryptExportKey failed: %08lx\n", GetLastError()); /* destroy the key... */ CryptDestroyKey(keyExchangeKey); CryptDestroyKey(signKey); /* import the key again... */ result = CryptImportKey(prov, exportedKey, keyLen, 0, 0, &keyExchangeKey); - ok(result, "CryptImportKey failed: %08x\n", GetLastError()); + ok(result, "CryptImportKey failed: %08lx\n", GetLastError()); HeapFree(GetProcessHeap(), 0, exportedKey); /* and decrypt the data encrypted with the original key with the imported * key. @@ -3086,10 +3086,10 @@ static void test_rsa_round_trip(void) result = CryptDecrypt(keyExchangeKey, 0, TRUE, 0, data, &dataLen); ok(result || broken(GetLastError() == NTE_BAD_KEY /* Win9x/2000 */) || broken(GetLastError() == NTE_PERM /* NT4 */), - "CryptDecrypt failed: %08x\n", GetLastError()); + "CryptDecrypt failed: %08lx\n", GetLastError()); if (result) { - ok(dataLen == sizeof(test_string), "unexpected size %d\n", dataLen); + ok(dataLen == sizeof(test_string), "unexpected size %ld\n", dataLen); ok(!memcmp(data, test_string, sizeof(test_string)), "unexpected value\n"); } CryptDestroyKey(keyExchangeKey); @@ -3109,15 +3109,15 @@ static void test_enum_container(void) * the maximum legal length of container names (which is MAX_PATH + 1 == 261) */ SetLastError(0xdeadbeef); result = CryptGetProvParam(hProv, PP_ENUMCONTAINERS, NULL, &dwBufferLen, CRYPT_FIRST); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); ok (dwBufferLen == MAX_PATH + 1 || broken(dwBufferLen != MAX_PATH + 1), /* Win9x, WinMe, NT4 */ - "Expected dwBufferLen to be (MAX_PATH + 1), it was : %d\n", dwBufferLen); + "Expected dwBufferLen to be (MAX_PATH + 1), it was : %ld\n", dwBufferLen);
/* If the result fits into abContainerName dwBufferLen is left untouched */ dwBufferLen = (DWORD)sizeof(abContainerName); result = CryptGetProvParam(hProv, PP_ENUMCONTAINERS, abContainerName, &dwBufferLen, CRYPT_FIRST); - ok (result && dwBufferLen == (DWORD)sizeof(abContainerName), "%08x\n", GetLastError()); + ok (result && dwBufferLen == (DWORD)sizeof(abContainerName), "%08lx\n", GetLastError());
/* We only check, if the currently open 'winetest' container is among the enumerated. */ do { @@ -3125,7 +3125,7 @@ static void test_enum_container(void) dwBufferLen = (DWORD)sizeof(abContainerName); } while (CryptGetProvParam(hProv, PP_ENUMCONTAINERS, abContainerName, &dwBufferLen, 0));
- ok (fFound && GetLastError() == ERROR_NO_MORE_ITEMS, "%d, %08x\n", fFound, GetLastError()); + ok (fFound && GetLastError() == ERROR_NO_MORE_ITEMS, "%d, %08lx\n", fFound, GetLastError()); }
static BYTE signBlob[] = { @@ -3160,21 +3160,21 @@ static void test_null_provider(void)
result = CryptAcquireContextA(NULL, szContainer, NULL, 0, 0); ok(!result && GetLastError() == NTE_BAD_PROV_TYPE, - "Expected NTE_BAD_PROV_TYPE, got %08x\n", GetLastError()); + "Expected NTE_BAD_PROV_TYPE, got %08lx\n", GetLastError()); result = CryptAcquireContextA(NULL, szContainer, NULL, PROV_RSA_FULL, 0); ok(!result && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == NTE_BAD_KEYSET), - "Expected ERROR_INVALID_PARAMETER or NTE_BAD_KEYSET, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER or NTE_BAD_KEYSET, got %08lx\n", GetLastError()); result = CryptAcquireContextA(NULL, szContainer, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET); ok(!result && ( GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == NTE_BAD_KEYSET), - "Expected ERROR_INVALID_PARAMETER or NTE_BAD_KEYSET, got %08x\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER or NTE_BAD_KEYSET, got %08lx\n", GetLastError()); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET); ok(!result && GetLastError() == NTE_BAD_KEYSET, - "Expected NTE_BAD_KEYSET, got %08x\n", GetLastError()); + "Expected NTE_BAD_KEYSET, got %08lx\n", GetLastError()); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, 0); ok(!result && GetLastError() == NTE_BAD_KEYSET, - "Expected NTE_BAD_KEYSET, got %08x\n", GetLastError()); + "Expected NTE_BAD_KEYSET, got %08lx\n", GetLastError());
/* Delete the default container. */ CryptAcquireContextA(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET); @@ -3183,39 +3183,39 @@ static void test_null_provider(void) */ result = CryptAcquireContextA(&prov, NULL, NULL, PROV_RSA_FULL, 0); ok(!result && GetLastError() == NTE_BAD_KEYSET, - "Expected NTE_BAD_KEYSET, got %08x\n", GetLastError()); + "Expected NTE_BAD_KEYSET, got %08lx\n", GetLastError()); /* But you can always open the default container for CRYPT_VERIFYCONTEXT. */ result = CryptAcquireContextA(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); if (!result) return; dataLen = sizeof(keySpec); result = CryptGetProvParam(prov, PP_KEYSPEC, (LPBYTE)&keySpec, &dataLen, 0); if (result) ok(keySpec == (AT_KEYEXCHANGE | AT_SIGNATURE), - "Expected AT_KEYEXCHANGE | AT_SIGNATURE, got %08x\n", keySpec); + "Expected AT_KEYEXCHANGE | AT_SIGNATURE, got %08lx\n", keySpec); /* Even though PP_KEYSPEC says both AT_KEYEXCHANGE and AT_SIGNATURE are * supported, you can't get the keys from this container. */ result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); ok(!result && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); result = CryptGetUserKey(prov, AT_SIGNATURE, &key); ok(!result && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); result = CryptReleaseContext(prov, 0); - ok(result, "CryptReleaseContext failed: %08x\n", GetLastError()); + ok(result, "CryptReleaseContext failed: %08lx\n", GetLastError()); /* You can create a new default container. */ result = CryptAcquireContextA(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); /* But you still can't get the keys (until one's been generated.) */ result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); ok(!result && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); result = CryptGetUserKey(prov, AT_SIGNATURE, &key); ok(!result && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); CryptReleaseContext(prov, 0); CryptAcquireContextA(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET);
@@ -3223,28 +3223,28 @@ static void test_null_provider(void) CRYPT_DELETEKEYSET); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, 0); ok(!result && GetLastError() == NTE_BAD_KEYSET, - "Expected NTE_BAD_KEYSET, got %08x\n", GetLastError()); + "Expected NTE_BAD_KEYSET, got %08lx\n", GetLastError()); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); ok(!result && GetLastError() == NTE_BAD_FLAGS, - "Expected NTE_BAD_FLAGS, got %08x\n", GetLastError()); + "Expected NTE_BAD_FLAGS, got %08lx\n", GetLastError()); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); if (!result) return; /* Test provider parameters getter */ dataLen = sizeof(dwParam); result = CryptGetProvParam(prov, PP_PROVTYPE, (LPBYTE)&dwParam, &dataLen, 0); ok(result && dataLen == sizeof(dwParam) && dwParam == PROV_RSA_FULL, - "Expected PROV_RSA_FULL, got 0x%08X\n",dwParam); + "Expected PROV_RSA_FULL, got 0x%08lX\n",dwParam); dataLen = sizeof(dwParam); result = CryptGetProvParam(prov, PP_KEYSET_TYPE, (LPBYTE)&dwParam, &dataLen, 0); ok(result && dataLen == sizeof(dwParam) && dwParam == 0, - "Expected 0, got 0x%08X\n",dwParam); + "Expected 0, got 0x%08lX\n",dwParam); dataLen = sizeof(dwParam); result = CryptGetProvParam(prov, PP_KEYSTORAGE, (LPBYTE)&dwParam, &dataLen, 0); ok(result && dataLen == sizeof(dwParam) && (dwParam & CRYPT_SEC_DESCR), - "Expected CRYPT_SEC_DESCR to be set, got 0x%08X\n",dwParam); + "Expected CRYPT_SEC_DESCR to be set, got 0x%08lX\n",dwParam); dataLen = sizeof(keySpec); SetLastError(0xdeadbeef); result = CryptGetProvParam(prov, PP_KEYSPEC, (LPBYTE)&keySpec, &dataLen, 0); @@ -3252,12 +3252,12 @@ static void test_null_provider(void) skip("PP_KEYSPEC is not supported (win9x or NT)\n"); else ok(result && keySpec == (AT_KEYEXCHANGE | AT_SIGNATURE), - "Expected AT_KEYEXCHANGE | AT_SIGNATURE, got %08x\n", keySpec); + "Expected AT_KEYEXCHANGE | AT_SIGNATURE, got %08lx\n", keySpec); /* PP_CONTAINER parameter */ dataLen = sizeof(szName); result = CryptGetProvParam(prov, PP_CONTAINER, (LPBYTE)szName, &dataLen, 0); ok(result && dataLen == strlen(szContainer)+1 && strcmp(szContainer,szName) == 0, - "failed getting PP_CONTAINER. result = %s. Error 0x%08X. returned length = %d\n", + "failed getting PP_CONTAINER. result = %s. Error 0x%08lX. returned length = %ld\n", (result)? "TRUE":"FALSE",GetLastError(),dataLen); /* PP_UNIQUE_CONTAINER parameter */ dataLen = sizeof(szName); @@ -3271,13 +3271,13 @@ static void test_null_provider(void) { char container[MAX_PATH];
- ok(result, "failed getting PP_UNIQUE_CONTAINER : 0x%08X\n", GetLastError()); + ok(result, "failed getting PP_UNIQUE_CONTAINER : 0x%08lX\n", GetLastError()); uniquecontainer(container); todo_wine { ok(dataLen == strlen(container)+1 || broken(dataLen == strlen(szContainer)+1) /* WinME */, - "Expected a param length of 70, got %d\n", dataLen); + "Expected a param length of 70, got %ld\n", dataLen); ok(!strcmp(container, szName) || broken(!strcmp(szName, szContainer)) /* WinME */, "Wrong container name : %s\n", szName); @@ -3285,24 +3285,24 @@ static void test_null_provider(void) } result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); ok(!result && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); result = CryptGetUserKey(prov, AT_SIGNATURE, &key); ok(!result && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError());
/* Importing a key exchange blob.. */ result = CryptImportKey(prov, abPlainPrivateKey, sizeof(abPlainPrivateKey), 0, 0, &key); - ok(result, "CryptImportKey failed: %08x\n", GetLastError()); + ok(result, "CryptImportKey failed: %08lx\n", GetLastError()); CryptDestroyKey(key); /* allows access to the key exchange key.. */ result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); - ok(result, "CryptGetUserKey failed: %08x\n", GetLastError()); + ok(result, "CryptGetUserKey failed: %08lx\n", GetLastError()); CryptDestroyKey(key); /* but not to the private key. */ result = CryptGetUserKey(prov, AT_SIGNATURE, &key); ok(!result && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); CryptReleaseContext(prov, 0); CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET); @@ -3310,18 +3310,18 @@ static void test_null_provider(void) /* Whereas importing a sign blob.. */ result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); if (!result) return; result = CryptImportKey(prov, signBlob, sizeof(signBlob), 0, 0, &key); - ok(result, "CryptImportKey failed: %08x\n", GetLastError()); + ok(result, "CryptImportKey failed: %08lx\n", GetLastError()); CryptDestroyKey(key); /* doesn't allow access to the key exchange key.. */ result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); ok(!result && GetLastError() == NTE_NO_KEY, - "Expected NTE_NO_KEY, got %08x\n", GetLastError()); + "Expected NTE_NO_KEY, got %08lx\n", GetLastError()); /* but does to the private key. */ result = CryptGetUserKey(prov, AT_SIGNATURE, &key); - ok(result, "CryptGetUserKey failed: %08x\n", GetLastError()); + ok(result, "CryptGetUserKey failed: %08lx\n", GetLastError()); CryptDestroyKey(key); CryptReleaseContext(prov, 0);
@@ -3331,14 +3331,14 @@ static void test_null_provider(void) /* Test for being able to get a key generated with CALG_RSA_SIGN. */ result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); result = CryptGenKey(prov, CALG_RSA_SIGN, 0, &key); - ok(result, "CryptGenKey with CALG_RSA_SIGN failed with error %08x\n", GetLastError()); + ok(result, "CryptGenKey with CALG_RSA_SIGN failed with error %08lx\n", GetLastError()); CryptDestroyKey(key); result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); ok(!result, "expected CryptGetUserKey to fail\n"); result = CryptGetUserKey(prov, AT_SIGNATURE, &key); - ok(result, "CryptGetUserKey with AT_SIGNATURE failed: %08x\n", GetLastError()); + ok(result, "CryptGetUserKey with AT_SIGNATURE failed: %08lx\n", GetLastError()); CryptDestroyKey(key); CryptReleaseContext(prov, 0);
@@ -3348,12 +3348,12 @@ static void test_null_provider(void) /* Test for being able to get a key generated with CALG_RSA_KEYX. */ result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); result = CryptGenKey(prov, CALG_RSA_KEYX, 0, &key); - ok(result, "CryptGenKey with CALG_RSA_KEYX failed with error %08x\n", GetLastError()); + ok(result, "CryptGenKey with CALG_RSA_KEYX failed with error %08lx\n", GetLastError()); CryptDestroyKey(key); result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); - ok(result, "CryptGetUserKey with AT_KEYEXCHANGE failed: %08x\n", GetLastError()); + ok(result, "CryptGetUserKey with AT_KEYEXCHANGE failed: %08lx\n", GetLastError()); CryptDestroyKey(key); result = CryptGetUserKey(prov, AT_SIGNATURE, &key); ok(!result, "expected CryptGetUserKey to fail\n"); @@ -3366,15 +3366,15 @@ static void test_null_provider(void) */ result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); result = CryptGenKey(prov, AT_KEYEXCHANGE, 0, &key); - ok(result, "CryptGenKey with AT_KEYEXCHANGE failed with error %08x\n", GetLastError()); + ok(result, "CryptGenKey with AT_KEYEXCHANGE failed with error %08lx\n", GetLastError()); CryptDestroyKey(key); CryptReleaseContext(prov,0); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL,0); - ok(result, "CryptAcquireContextA failed: 0x%08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: 0x%08lx\n", GetLastError()); result = CryptGetUserKey(prov, AT_KEYEXCHANGE, &key); - ok (result, "CryptGetUserKey failed with error %08x\n", GetLastError()); + ok (result, "CryptGetUserKey failed with error %08lx\n", GetLastError()); CryptDestroyKey(key); CryptReleaseContext(prov, 0);
@@ -3386,20 +3386,20 @@ static void test_null_provider(void) CRYPT_DELETEKEYSET|CRYPT_MACHINE_KEYSET); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET|CRYPT_MACHINE_KEYSET); - ok(result, "CryptAcquireContextA with CRYPT_MACHINE_KEYSET failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA with CRYPT_MACHINE_KEYSET failed: %08lx\n", GetLastError()); CryptReleaseContext(prov, 0); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET); - ok(result, "CryptAcquireContextA with CRYPT_MACHINE_KEYSET failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA with CRYPT_MACHINE_KEYSET failed: %08lx\n", GetLastError()); CryptReleaseContext(prov,0); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_DELETEKEYSET|CRYPT_MACHINE_KEYSET); - ok(result, "CryptAcquireContextA with CRYPT_DELETEKEYSET|CRYPT_MACHINE_KEYSET failed: %08x\n", + ok(result, "CryptAcquireContextA with CRYPT_DELETEKEYSET|CRYPT_MACHINE_KEYSET failed: %08lx\n", GetLastError()); result = CryptAcquireContextA(&prov, szContainer, NULL, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET); ok(!result && GetLastError() == NTE_BAD_KEYSET , - "Expected NTE_BAD_KEYSET, got %08x\n", GetLastError()); + "Expected NTE_BAD_KEYSET, got %08lx\n", GetLastError());
}
@@ -3414,50 +3414,50 @@ static void test_key_permissions(void) return;
result = CryptGetUserKey(hProv, AT_KEYEXCHANGE, &hKey1); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError()); if (!result) return;
dwVal = 0xdeadbeef; dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey1, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwVal == (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT) || broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT," - " got %08x\n", dwVal); + " got %08lx\n", dwVal);
/* The key exchange key's public key may be exported.. */ result = CryptExportKey(hKey1, 0, PUBLICKEYBLOB, 0, NULL, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); /* and its private key may be too. */ result = CryptExportKey(hKey1, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); /* Turning off the key's export permissions is "allowed".. */ dwVal &= ~CRYPT_EXPORT; result = CryptSetKeyParam(hKey1, KP_PERMISSIONS, (BYTE *)&dwVal, 0); ok(result || broken(!result && GetLastError() == NTE_BAD_DATA) || /* W2K */ broken(!result && GetLastError() == NTE_BAD_FLAGS), /* Win9x/WinME/NT4 */ - "%08x\n", GetLastError()); + "%08lx\n", GetLastError()); /* but it has no effect. */ dwVal = 0xdeadbeef; dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey1, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwVal == (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT) || broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT," - " got %08x\n", dwVal); + " got %08lx\n", dwVal); /* Thus, changing the export flag of the key doesn't affect whether the key * may be exported. */ result = CryptExportKey(hKey1, 0, PRIVATEKEYBLOB, 0, NULL, &dwLen); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError());
result = CryptGetUserKey(hProv, AT_KEYEXCHANGE, &hKey2); - ok (result, "%08x\n", GetLastError()); + ok (result, "%08lx\n", GetLastError());
/* A subsequent get of the same key, into a different handle, also doesn't * show that the permissions have been changed. @@ -3465,12 +3465,12 @@ static void test_key_permissions(void) dwVal = 0xdeadbeef; dwLen = sizeof(DWORD); result = CryptGetKeyParam(hKey2, KP_PERMISSIONS, (BYTE*)&dwVal, &dwLen, 0); - ok(result, "%08x\n", GetLastError()); + ok(result, "%08lx\n", GetLastError()); ok(dwVal == (CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT) || broken(dwVal == 0xffffffff), /* Win9x/NT4 */ "expected CRYPT_MAC|CRYPT_WRITE|CRYPT_READ|CRYPT_EXPORT|CRYPT_DECRYPT|CRYPT_ENCRYPT," - " got %08x\n", dwVal); + " got %08lx\n", dwVal);
CryptDestroyKey(hKey2); CryptDestroyKey(hKey1); @@ -3512,23 +3512,23 @@ static void test_key_initialization(void) { result = CryptAcquireContextA(&prov1, szContainer, szProvider, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); } dwLen = (DWORD)sizeof(abPlainPrivateKey); result = CryptImportKey(prov1, abPlainPrivateKey, dwLen, 0, 0, &hKeyExchangeKey); - ok(result, "CryptImportKey failed: %08x\n", GetLastError()); + ok(result, "CryptImportKey failed: %08lx\n", GetLastError());
dwLen = (DWORD)sizeof(abSessionKey); result = CryptImportKey(prov1, abSessionKey, dwLen, hKeyExchangeKey, 0, &hSessionKey); - ok(result, "CryptImportKey failed: %08x\n", GetLastError()); + ok(result, "CryptImportKey failed: %08lx\n", GetLastError());
/* Once the key has been imported, subsequently acquiring a context with * the same name will allow retrieving the key. */ result = CryptAcquireContextA(&prov2, szContainer, szProvider, PROV_RSA_FULL, 0); - ok(result, "CryptAcquireContextA failed: %08x\n", GetLastError()); + ok(result, "CryptAcquireContextA failed: %08lx\n", GetLastError()); result = CryptGetUserKey(prov2, AT_KEYEXCHANGE, &hKey); - ok(result, "CryptGetUserKey failed: %08x\n", GetLastError()); + ok(result, "CryptGetUserKey failed: %08lx\n", GetLastError()); if (result) CryptDestroyKey(hKey); CryptReleaseContext(prov2, 0);
@@ -3888,21 +3888,21 @@ static void test_key_derivation(const char *prov) if (!result) { /* rsaenh compiled without OpenSSL or not supported by provider */ - ok(GetLastError() == NTE_BAD_ALGID, "Test [%s %d]: Expected NTE_BAD_ALGID, got 0x%08x\n", + ok(GetLastError() == NTE_BAD_ALGID, "Test [%s %ld]: Expected NTE_BAD_ALGID, got 0x%08lx\n", prov, i, GetLastError()); continue; } - ok(result, "Test [%s %d]: CryptCreateHash failed with error 0x%08x\n", prov, i, GetLastError()); + ok(result, "Test [%s %ld]: CryptCreateHash failed with error 0x%08lx\n", prov, i, GetLastError()); result = CryptHashData(hHash, dvData, sizeof(dvData), 0); - ok(result, "Test [%s %d]: CryptHashData failed with error 0x%08x\n", prov, i, GetLastError()); + ok(result, "Test [%s %ld]: CryptHashData failed with error 0x%08lx\n", prov, i, GetLastError());
len = sizeof(pbData); result = CryptGetHashParam(hHash, HP_HASHVAL, pbData, &len, 0); - ok(result, "Test [%s %d]: CryptGetHashParam failed with error 0x%08x\n", prov, i, GetLastError()); - ok(len == tests[i].hashlen, "Test [%s %d]: Expected hash len %d, got %d\n", + ok(result, "Test [%s %ld]: CryptGetHashParam failed with error 0x%08lx\n", prov, i, GetLastError()); + ok(len == tests[i].hashlen, "Test [%s %ld]: Expected hash len %d, got %ld\n", prov, i, tests[i].hashlen, len); ok(!tests[i].hashlen || !memcmp(pbData, tests[i].expected_hash, tests[i].hashlen), - "Test [%s %d]: Hash comparison failed\n", prov, i); + "Test [%s %ld]: Hash comparison failed\n", prov, i);
SetLastError(0xdeadbeef); result = CryptDeriveKey(hProv, tests[i].crypt_algo, hHash, 0, &hKey); @@ -3910,23 +3910,23 @@ static void test_key_derivation(const char *prov) if(!result && (GetLastError() == tests[i].errorkey || GetLastError() == ERROR_INVALID_PARAMETER /* <= NT4*/)) goto err; - ok(result, "Test [%s %d]: CryptDeriveKey failed with error 0x%08x\n", prov, i, GetLastError()); + ok(result, "Test [%s %ld]: CryptDeriveKey failed with error 0x%08lx\n", prov, i, GetLastError());
len = sizeof(mode); mode = 0xdeadbeef; result = CryptGetKeyParam(hKey, KP_MODE, (BYTE*)&mode, &len, 0); - ok(result, "Test [%s %d]: CryptGetKeyParam failed with error %08x\n", prov, i, GetLastError()); - ok(mode == tests[i].chain_mode, "Test [%s %d]: Expected chaining mode %d, got %d\n", + ok(result, "Test [%s %ld]: CryptGetKeyParam failed with error %08lx\n", prov, i, GetLastError()); + ok(mode == tests[i].chain_mode, "Test [%s %ld]: Expected chaining mode %d, got %ld\n", prov, i, tests[i].chain_mode, mode);
SetLastError(0xdeadbeef); len = 4; result = CryptEncrypt(hKey, 0, TRUE, 0, dvData, &len, sizeof(dvData)); - ok(result, "Test [%s %d]: CryptEncrypt failed with error 0x%08x\n", prov, i, GetLastError()); - ok(len == tests[i].blocklen, "Test [%s %d]: Expected block len %d, got %d\n", + ok(result, "Test [%s %ld]: CryptEncrypt failed with error 0x%08lx\n", prov, i, GetLastError()); + ok(len == tests[i].blocklen, "Test [%s %ld]: Expected block len %d, got %ld\n", prov, i, tests[i].blocklen, len); ok(!memcmp(dvData, tests[i].expected_enc, tests[i].blocklen), - "Test [%s %d]: Encrypted data comparison failed\n", prov, i); + "Test [%s %ld]: Encrypted data comparison failed\n", prov, i);
CryptDestroyKey(hKey); err:
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/sapi/tests/Makefile.in | 1 dlls/sapi/tests/automation.c | 10 ++-- dlls/sapi/tests/resource.c | 8 ++- dlls/sapi/tests/stream.c | 8 ++- dlls/sapi/tests/token.c | 100 +++++++++++++++++++++--------------------- dlls/sapi/tests/tts.c | 16 +++---- 6 files changed, 71 insertions(+), 72 deletions(-)
diff --git a/dlls/sapi/tests/Makefile.in b/dlls/sapi/tests/Makefile.in index 4e59710b172..75c70d072d8 100644 --- a/dlls/sapi/tests/Makefile.in +++ b/dlls/sapi/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = sapi.dll IMPORTS = ole32 user32 advapi32
diff --git a/dlls/sapi/tests/automation.c b/dlls/sapi/tests/automation.c index c584b4ac2c1..fa85858935a 100644 --- a/dlls/sapi/tests/automation.c +++ b/dlls/sapi/tests/automation.c @@ -36,26 +36,26 @@ static void test_interfaces(void)
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER, &IID_ISpeechFileStream, (void **)&filestream); - ok(hr == S_OK, "Failed to create ISpeechFileStream interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create ISpeechFileStream interface: %#lx.\n", hr);
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Failed to create IUnknown interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create IUnknown interface: %#lx.\n", hr); IUnknown_Release(unk);
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER, &IID_IDispatch, (void **)&dispatch); - ok(hr == S_OK, "Failed to create IDispatch interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create IDispatch interface: %#lx.\n", hr); IDispatch_Release(dispatch);
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER, &IID_ISpeechBaseStream, (void **)&basestream); - ok(hr == S_OK, "Failed to create ISpeechBaseStream interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create ISpeechBaseStream interface: %#lx.\n", hr); ISpeechBaseStream_Release(basestream);
hr = CoCreateInstance(&CLSID_SpFileStream, NULL, CLSCTX_INPROC_SERVER, &IID_ISpStream, (void **)&spstrem); - ok(hr == S_OK, "Failed to create ISpStream interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create ISpStream interface: %#lx.\n", hr);
ISpStream_Release(spstrem); ISpeechFileStream_Release(filestream); diff --git a/dlls/sapi/tests/resource.c b/dlls/sapi/tests/resource.c index 0c4bd5bc783..0cedaa8b928 100644 --- a/dlls/sapi/tests/resource.c +++ b/dlls/sapi/tests/resource.c @@ -34,26 +34,26 @@ static void test_interfaces(void)
hr = CoCreateInstance(&CLSID_SpResourceManager, NULL, CLSCTX_INPROC_SERVER, &IID_ISpResourceManager, (void **)&resource_manager); - ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#lx.\n", hr); ok(!!resource_manager, "Expected non-NULL resource manager.\n");
hr = CoCreateInstance(&CLSID_SpResourceManager, NULL, CLSCTX_INPROC_SERVER, &IID_ISpResourceManager, (void **)&resource_manager2); - ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#lx.\n", hr); ok(!!resource_manager2, "Expected non-NULL resource manager.\n"); todo_wine ok(resource_manager2 == resource_manager, "Expected managers to match.\n"); ISpResourceManager_Release(resource_manager2);
hr = CoCreateInstance(&CLSID_SpResourceManager, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Failed to create IUnknown interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create IUnknown interface: %#lx.\n", hr); ok(!!unk, "Expected non-NULL unk.\n"); todo_wine ok(unk == (IUnknown *)resource_manager, "Expected unk to match existing manager.\n"); IUnknown_Release(unk);
hr = CoCreateInstance(&CLSID_SpResourceManager, NULL, CLSCTX_INPROC_SERVER, &IID_IDispatch, (void **)&dispatch); - ok(hr == E_NOINTERFACE, "Succeeded to create IDispatch interface: %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Succeeded to create IDispatch interface: %#lx.\n", hr); ok(!dispatch, "Expected NULL dispatch, got %p.", dispatch);
ISpResourceManager_Release(resource_manager); diff --git a/dlls/sapi/tests/stream.c b/dlls/sapi/tests/stream.c index aa91b782647..ea2608eed36 100644 --- a/dlls/sapi/tests/stream.c +++ b/dlls/sapi/tests/stream.c @@ -31,7 +31,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "Unexpected refcount %d, expected %d.\n", rc, ref); + ok_(__FILE__,line)(rc == ref, "Unexpected refcount %ld, expected %ld.\n", rc, ref); }
static void test_interfaces(void) @@ -43,19 +43,19 @@ static void test_interfaces(void)
hr = CoCreateInstance(&CLSID_SpStream, NULL, CLSCTX_INPROC_SERVER, &IID_ISpStream, (void **)&speech_stream); - ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#lx.\n", hr); EXPECT_REF(speech_stream, 1);
hr = CoCreateInstance(&CLSID_SpStream, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Failed to create IUnknown interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create IUnknown interface: %#lx.\n", hr); EXPECT_REF(unk, 1); EXPECT_REF(speech_stream, 1); IUnknown_Release(unk);
hr = CoCreateInstance(&CLSID_SpStream, NULL, CLSCTX_INPROC_SERVER, &IID_IDispatch, (void **)&dispatch); - ok(hr == E_NOINTERFACE, "Succeeded to create IDispatch interface: %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Succeeded to create IDispatch interface: %#lx.\n", hr); ok(!dispatch, "Expected NULL dispatch, got %p.", dispatch);
ISpStream_Release(speech_stream); diff --git a/dlls/sapi/tests/token.c b/dlls/sapi/tests/token.c index 47196d42dc7..9473d56b4d1 100644 --- a/dlls/sapi/tests/token.c +++ b/dlls/sapi/tests/token.c @@ -35,16 +35,16 @@ static void test_data_key(void)
hr = CoCreateInstance( &CLSID_SpDataKey, NULL, CLSCTX_INPROC_SERVER, &IID_ISpRegDataKey, (void **)&data_key ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
res = RegCreateKeyExA( HKEY_CURRENT_USER, "Software\Winetest\sapi", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL ); - ok( res == ERROR_SUCCESS, "got %d\n", res ); + ok( res == ERROR_SUCCESS, "got %ld\n", res );
hr = ISpRegDataKey_SetKey( data_key, key, FALSE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = ISpRegDataKey_SetKey( data_key, key, FALSE ); - ok( hr == SPERR_ALREADY_INITIALIZED, "got %08x\n", hr ); + ok( hr == SPERR_ALREADY_INITIALIZED, "got %08lx\n", hr );
ISpRegDataKey_Release( data_key ); } @@ -58,25 +58,25 @@ static void test_token_category(void)
hr = CoCreateInstance( &CLSID_SpObjectTokenCategory, NULL, CLSCTX_INPROC_SERVER, &IID_ISpObjectTokenCategory, (void **)&cat ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = ISpObjectTokenCategory_EnumTokens( cat, NULL, NULL, &enum_tokens ); - ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr ); + ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
hr = ISpObjectTokenCategory_SetId( cat, L"bogus", FALSE ); - ok( hr == SPERR_INVALID_REGISTRY_KEY, "got %08x\n", hr ); + ok( hr == SPERR_INVALID_REGISTRY_KEY, "got %08lx\n", hr );
hr = ISpObjectTokenCategory_SetId( cat, SPCAT_VOICES, FALSE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = ISpObjectTokenCategory_SetId( cat, SPCAT_VOICES, FALSE ); - ok( hr == SPERR_ALREADY_INITIALIZED, "got %08x\n", hr ); + ok( hr == SPERR_ALREADY_INITIALIZED, "got %08lx\n", hr );
hr = ISpObjectTokenCategory_EnumTokens( cat, NULL, NULL, &enum_tokens ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = IEnumSpObjectTokens_GetCount( enum_tokens, &count ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
IEnumSpObjectTokens_Release( enum_tokens ); ISpObjectTokenCategory_Release( cat ); @@ -91,26 +91,26 @@ static void test_token_enum(void)
hr = CoCreateInstance( &CLSID_SpObjectTokenEnum, NULL, CLSCTX_INPROC_SERVER, &IID_ISpObjectTokenEnumBuilder, (void **)&token_enum ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = ISpObjectTokenEnumBuilder_GetCount( token_enum, &count ); - ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr ); + ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
hr = ISpObjectTokenEnumBuilder_Next( token_enum, 1, &token, &count ); - ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr ); + ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
hr = ISpObjectTokenEnumBuilder_SetAttribs( token_enum, NULL, NULL ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
count = 0xdeadbeef; hr = ISpObjectTokenEnumBuilder_GetCount( token_enum, &count ); - ok( hr == S_OK, "got %08x\n", hr ); - ok( count == 0, "got %u\n", count ); + ok( hr == S_OK, "got %08lx\n", hr ); + ok( count == 0, "got %lu\n", count );
count = 0xdeadbeef; hr = ISpObjectTokenEnumBuilder_Next( token_enum, 1, &token, &count ); - ok( hr == S_FALSE, "got %08x\n", hr ); - ok( count == 0, "got %u\n", count ); + ok( hr == S_FALSE, "got %08lx\n", hr ); + ok( count == 0, "got %lu\n", count );
ISpObjectTokenEnumBuilder_Release( token_enum ); } @@ -126,21 +126,21 @@ static void test_default_token_id(void)
hr = CoCreateInstance( &CLSID_SpObjectTokenCategory, NULL, CLSCTX_INPROC_SERVER, &IID_ISpObjectTokenCategory, (void **)&cat ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
token_id = (LPWSTR)0xdeadbeef; hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, &token_id ); - ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr ); + ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr ); ok( token_id == (LPWSTR)0xdeadbeef, "got %p\n", token_id );
hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, NULL ); - ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr ); + ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
hr = ISpObjectTokenCategory_SetId( cat, SPCAT_AUDIOOUT, FALSE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, NULL ); - ok( hr == E_POINTER, "got %08x\n", hr ); + ok( hr == E_POINTER, "got %08lx\n", hr );
token_id = (LPWSTR)0xdeadbeef; hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, &token_id ); @@ -152,7 +152,7 @@ static void test_default_token_id(void) return; }
- ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( token_id != (LPWSTR)0xdeadbeef && token_id != NULL, "got %p\n", token_id );
regvalue_size = sizeof( regvalue ); @@ -163,7 +163,7 @@ static void test_default_token_id(void) skip( "DefaultDefaultTokenId not found for AudioOutput category (%s)\n", wine_dbgstr_w(token_id) ); } else { - ok( res == ERROR_SUCCESS, "got %08x\n", res ); + ok( res == ERROR_SUCCESS, "got %08lx\n", res ); ok( !wcscmp(regvalue, token_id), "GetDefaultTokenId (%s) should be equal to the DefaultDefaultTokenId key (%s)\n", wine_dbgstr_w(token_id), wine_dbgstr_w(regvalue) ); @@ -182,52 +182,52 @@ static void test_object_token(void)
hr = CoCreateInstance( &CLSID_SpObjectToken, NULL, CLSCTX_INPROC_SERVER, &IID_ISpObjectToken, (void **)&token ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = ISpObjectToken_GetId( token, NULL ); - todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr ); + todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
tempW = (LPWSTR)0xdeadbeef; hr = ISpObjectToken_GetId( token, &tempW ); - todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr ); + todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr ); ok( tempW == (LPWSTR)0xdeadbeef, "got %s\n", wine_dbgstr_w(tempW) );
hr = ISpObjectToken_GetCategory( token, NULL ); - todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr ); + todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
cat = (LPVOID)0xdeadbeef; hr = ISpObjectToken_GetCategory( token, &cat ); - todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr ); + todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr ); ok( cat == (LPVOID)0xdeadbeef, "got %p\n", cat );
hr = ISpObjectToken_SetId( token, NULL, NULL, FALSE ); - ok( hr == E_POINTER, "got %08x\n", hr ); + ok( hr == E_POINTER, "got %08lx\n", hr ); hr = ISpObjectToken_SetId( token, L"bogus", NULL, FALSE ); - ok( hr == E_POINTER, "got %08x\n", hr ); + ok( hr == E_POINTER, "got %08lx\n", hr );
hr = ISpObjectToken_SetId( token, NULL, L"bogus", FALSE ); - ok( hr == SPERR_NOT_FOUND, "got %08x\n", hr ); + ok( hr == SPERR_NOT_FOUND, "got %08lx\n", hr ); hr = ISpObjectToken_SetId( token, NULL, L"HKEY_LOCAL_MACHINE\SOFTWARE\winetest bogus", FALSE ); - ok( hr == SPERR_NOT_FOUND, "got %08x\n", hr ); + ok( hr == SPERR_NOT_FOUND, "got %08lx\n", hr );
/* SetId succeeds even if the key is invalid, but exists */ hr = ISpObjectToken_SetId( token, NULL, L"HKEY_LOCAL_MACHINE\SOFTWARE", FALSE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
hr = ISpObjectToken_SetId( token, NULL, NULL, FALSE ); - ok( hr == SPERR_ALREADY_INITIALIZED, "got %08x\n", hr ); + ok( hr == SPERR_ALREADY_INITIALIZED, "got %08lx\n", hr ); hr = ISpObjectToken_SetId( token, NULL, L"bogus", FALSE ); - ok( hr == SPERR_ALREADY_INITIALIZED, "got %08x\n", hr ); + ok( hr == SPERR_ALREADY_INITIALIZED, "got %08lx\n", hr );
hr = ISpObjectToken_GetId( token, NULL ); - todo_wine ok( hr == E_POINTER, "got %08x\n", hr ); + todo_wine ok( hr == E_POINTER, "got %08lx\n", hr );
hr = ISpObjectToken_GetCategory( token, NULL ); - todo_wine ok( hr == E_POINTER, "got %08x\n", hr ); + todo_wine ok( hr == E_POINTER, "got %08lx\n", hr );
tempW = NULL; hr = ISpObjectToken_GetId( token, &tempW ); - todo_wine ok( hr == S_OK, "got %08x\n", hr ); + todo_wine ok( hr == S_OK, "got %08lx\n", hr ); todo_wine ok( tempW != NULL, "got %p\n", tempW ); if (tempW) { ok( !wcscmp(tempW, L"HKEY_LOCAL_MACHINE\SOFTWARE"), "got %s\n", @@ -237,22 +237,22 @@ static void test_object_token(void)
cat = (LPVOID)0xdeadbeef; hr = ISpObjectToken_GetCategory( token, &cat ); - todo_wine ok( hr == SPERR_INVALID_REGISTRY_KEY, "got %08x\n", hr ); + todo_wine ok( hr == SPERR_INVALID_REGISTRY_KEY, "got %08lx\n", hr ); ok( cat == (LPVOID)0xdeadbeef, "got %p\n", cat );
/* get the default token id for SPCAT_AUDIOOUT */ hr = CoCreateInstance( &CLSID_SpObjectTokenCategory, NULL, CLSCTX_INPROC_SERVER, &IID_ISpObjectTokenCategory, (void **)&cat ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); hr = ISpObjectTokenCategory_SetId( cat, SPCAT_AUDIOOUT, FALSE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); token_id = (LPWSTR)0xdeadbeef; hr = ISpObjectTokenCategory_GetDefaultTokenId( cat, &token_id ); if (hr == SPERR_NOT_FOUND) { skip( "AudioOutput category not found for GetDefaultTokenId\n" ); return; } - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr ); ok( token_id != (LPWSTR)0xdeadbeef && token_id != NULL, "got %p\n", token_id ); ISpObjectTokenCategory_Release( cat );
@@ -260,15 +260,15 @@ static void test_object_token(void) ISpObjectToken_Release( token ); hr = CoCreateInstance( &CLSID_SpObjectToken, NULL, CLSCTX_INPROC_SERVER, &IID_ISpObjectToken, (void **)&token ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
/* NULL appears to auto-detect the category */ hr = ISpObjectToken_SetId( token, NULL, token_id, FALSE ); - ok( hr == S_OK, "got %08x\n", hr ); + ok( hr == S_OK, "got %08lx\n", hr );
tempW = NULL; hr = ISpObjectToken_GetId( token, &tempW ); - todo_wine ok( hr == S_OK, "got %08x\n", hr ); + todo_wine ok( hr == S_OK, "got %08lx\n", hr ); todo_wine ok( tempW != NULL, "got %p\n", tempW ); if (tempW) { ok( !wcsncmp(tempW, token_id, wcslen(token_id)), @@ -278,12 +278,12 @@ static void test_object_token(void)
cat = (LPVOID)0xdeadbeef; hr = ISpObjectToken_GetCategory( token, &cat ); - todo_wine ok( hr == S_OK, "got %08x\n", hr ); + todo_wine ok( hr == S_OK, "got %08lx\n", hr ); todo_wine ok( cat != (LPVOID)0xdeadbeef, "got %p\n", cat ); if (cat != (LPVOID)0xdeadbeef) { tempW = NULL; hr = ISpObjectTokenCategory_GetId( cat, &tempW ); - todo_wine ok( hr == S_OK, "got %08x\n", hr ); + todo_wine ok( hr == S_OK, "got %08lx\n", hr ); todo_wine ok( tempW != NULL, "got %p\n", tempW ); if (tempW) { ok( !wcscmp(tempW, SPCAT_AUDIOOUT), "got %s\n", wine_dbgstr_w(tempW) ); diff --git a/dlls/sapi/tests/tts.c b/dlls/sapi/tests/tts.c index 26d13ec96a0..8303dfc6ebc 100644 --- a/dlls/sapi/tests/tts.c +++ b/dlls/sapi/tests/tts.c @@ -31,7 +31,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line) ULONG rc; IUnknown_AddRef(obj); rc = IUnknown_Release(obj); - ok_(__FILE__,line)(rc == ref, "Unexpected refcount %d, expected %d.\n", rc, ref); + ok_(__FILE__,line)(rc == ref, "Unexpected refcount %ld, expected %ld.\n", rc, ref); }
static void test_interfaces(void) @@ -45,38 +45,38 @@ static void test_interfaces(void)
hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_INPROC_SERVER, &IID_ISpeechVoice, (void **)&speech_voice); - ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create ISpeechVoice interface: %#lx.\n", hr); EXPECT_REF(speech_voice, 1);
hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_INPROC_SERVER, &IID_IDispatch, (void **)&dispatch); - ok(hr == S_OK, "Failed to create IDispatch interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create IDispatch interface: %#lx.\n", hr); EXPECT_REF(dispatch, 1); EXPECT_REF(speech_voice, 1); IDispatch_Release(dispatch);
hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Failed to create IUnknown interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create IUnknown interface: %#lx.\n", hr); EXPECT_REF(unk, 1); EXPECT_REF(speech_voice, 1); IUnknown_Release(unk);
hr = CoCreateInstance(&CLSID_SpVoice, NULL, CLSCTX_INPROC_SERVER, &IID_ISpVoice, (void **)&spvoice); - ok(hr == S_OK, "Failed to create ISpVoice interface: %#x.\n", hr); + ok(hr == S_OK, "Failed to create ISpVoice interface: %#lx.\n", hr); EXPECT_REF(spvoice, 1); EXPECT_REF(speech_voice, 1);
hr = ISpVoice_QueryInterface(spvoice, &IID_ISpeechVoice, (void **)&speech_voice2); - ok(hr == S_OK, "ISpVoice_QueryInterface failed: %#x.\n", hr); + ok(hr == S_OK, "ISpVoice_QueryInterface failed: %#lx.\n", hr); EXPECT_REF(speech_voice2, 2); EXPECT_REF(spvoice, 2); EXPECT_REF(speech_voice, 1); ISpeechVoice_Release(speech_voice2);
hr = ISpeechVoice_QueryInterface(speech_voice, &IID_ISpVoice, (void **)&spvoice2); - ok(hr == S_OK, "ISpeechVoice_QueryInterface failed: %#x.\n", hr); + ok(hr == S_OK, "ISpeechVoice_QueryInterface failed: %#lx.\n", hr); EXPECT_REF(speech_voice, 2); EXPECT_REF(spvoice2, 2); EXPECT_REF(spvoice, 1); @@ -85,7 +85,7 @@ static void test_interfaces(void)
hr = ISpeechVoice_QueryInterface(speech_voice, &IID_IConnectionPointContainer, (void **)&container); - ok(hr == S_OK, "ISpeechVoice_QueryInterface failed: %#x.\n", hr); + ok(hr == S_OK, "ISpeechVoice_QueryInterface failed: %#lx.\n", hr); EXPECT_REF(speech_voice, 2); EXPECT_REF(container, 2); IConnectionPointContainer_Release(container);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/schannel/tests/Makefile.in | 1 - dlls/schannel/tests/main.c | 48 ++++++++++++++++++++------------------- 2 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/dlls/schannel/tests/Makefile.in b/dlls/schannel/tests/Makefile.in index ee755457e98..ca82dccfd9b 100644 --- a/dlls/schannel/tests/Makefile.in +++ b/dlls/schannel/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = schannel.dll
C_SRCS = \ diff --git a/dlls/schannel/tests/main.c b/dlls/schannel/tests/main.c index 4b4b7b4f388..f876d934f3d 100644 --- a/dlls/schannel/tests/main.c +++ b/dlls/schannel/tests/main.c @@ -77,27 +77,27 @@ static void testInitialize(void)
/* SpLsaModeInitialize does not care about the LSA version. */ status = pSpLsaModeInitialize(0, &Version, &pTables2, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); + ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status); ok(cTables == 2 || broken(cTables == 1), /* Win2k */ - "cTables: %d\n", cTables); + "cTables: %ld\n", cTables); ok(pTables2 != NULL,"pTables: %p\n", pTables2);
/* We can call it as many times we want. */ status = pSpLsaModeInitialize(0x10000, &Version, &pTables, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); + ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status); ok(cTables == 2 || broken(cTables == 1), /* Win2k */ - "cTables: %d\n", cTables); + "cTables: %ld\n", cTables); ok(pTables != NULL, "pTables: %p\n", pTables); /* It will always return the same pointer. */ ok(pTables == pTables2, "pTables: %p, pTables2: %p\n", pTables, pTables2);
status = pSpLsaModeInitialize(0x23456, &Version, &pTables, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); + ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status); ok(cTables == 2 || broken(cTables == 1), /* Win2k */ - "cTables: %d\n", cTables); + "cTables: %ld\n", cTables); ok(pTables != NULL, "pTables: %p\n", pTables); ok(pTables == pTables2, "pTables: %p, pTables2: %p\n", pTables, pTables2);
@@ -106,32 +106,32 @@ static void testInitialize(void) cUserTables = 0xdead; pUserTables = NULL; status = pSpUserModeInitialize(0, &Version, &pUserTables, &cUserTables); - ok(status == STATUS_INVALID_PARAMETER, "status: 0x%x\n", status); - ok(Version == 0xdead, "Version: 0x%x\n", Version); - ok(cUserTables == 0xdead, "cTables: %d\n", cUserTables); + ok(status == STATUS_INVALID_PARAMETER, "status: 0x%lx\n", status); + ok(Version == 0xdead, "Version: 0x%lx\n", Version); + ok(cUserTables == 0xdead, "cTables: %ld\n", cUserTables); ok(pUserTables == NULL, "pUserTables: %p\n", pUserTables);
status = pSpUserModeInitialize(0x20000, &Version, &pUserTables, &cUserTables); - ok(status == STATUS_INVALID_PARAMETER, "status: 0x%x\n", status); - ok(Version == 0xdead, "Version: 0x%x\n", Version); - ok(cUserTables == 0xdead, "cTables: %d\n", cUserTables); + ok(status == STATUS_INVALID_PARAMETER, "status: 0x%lx\n", status); + ok(Version == 0xdead, "Version: 0x%lx\n", Version); + ok(cUserTables == 0xdead, "cTables: %ld\n", cUserTables); ok(pUserTables == NULL, "pUserTables: %p\n", pUserTables);
/* Good version to SpUserModeInitialize */ status = pSpUserModeInitialize(SECPKG_INTERFACE_VERSION, &Version, &pUserTables, &cUserTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); - ok(Version == SECPKG_INTERFACE_VERSION, "Version: 0x%x\n", Version); + ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status); + ok(Version == SECPKG_INTERFACE_VERSION, "Version: 0x%lx\n", Version); ok(cUserTables == 2 || broken(cUserTables == 4), /* Win2k */ - "cUserTables: %d\n", cUserTables); + "cUserTables: %ld\n", cUserTables); ok(pUserTables != NULL, "pUserTables: %p\n", pUserTables);
/* Initializing user again */ status = pSpUserModeInitialize(SECPKG_INTERFACE_VERSION, &Version, &pUserTables2, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); + ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status); ok(pUserTables == pUserTables2, "pUserTables: %p, pUserTables2: %p\n", pUserTables, pUserTables2); } @@ -161,7 +161,7 @@ static PSECPKG_FUNCTION_TABLE getNextSecPkgTable(PSECPKG_FUNCTION_TABLE pTable, else if (Version == SECPKG_INTERFACE_VERSION_8) size = SECPKG_FUNCTION_TABLE_SIZE_8; else { - ok(FALSE, "Unknown package version 0x%x\n", Version); + ok(FALSE, "Unknown package version 0x%lx\n", Version); return NULL; }
@@ -217,21 +217,21 @@ static void testGetInfo(void)
/* Get the dispatch table */ status = pSpLsaModeInitialize(0, &Version, &pTables, &cTables); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); + ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status);
/* Passing NULL into ->GetInfo causes a crash. */
/* First package: Unified */ status = pTables->GetInfo(&PackageInfo); - ok(status == STATUS_SUCCESS, "status: 0x%x\n", status); + ok(status == STATUS_SUCCESS, "status: 0x%lx\n", status); ok(PackageInfo.fCapabilities == LSA_BASE_CAPS || PackageInfo.fCapabilities == (LSA_BASE_CAPS|SECPKG_FLAG_APPCONTAINER_PASSTHROUGH), - "fCapabilities: 0x%x\n", PackageInfo.fCapabilities); + "fCapabilities: 0x%lx\n", PackageInfo.fCapabilities); ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion); ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID); ok(PackageInfo.cbMaxToken == 0x4000 || PackageInfo.cbMaxToken == 0x6000, /* Vista */ - "cbMaxToken: 0x%x\n", + "cbMaxToken: 0x%lx\n", PackageInfo.cbMaxToken);
/* Second package */ @@ -251,18 +251,18 @@ static void testGetInfo(void) status = pTables->GetInfo(&PackageInfo); ok(SUCCEEDED(status) || status == SEC_E_UNSUPPORTED_FUNCTION, /* win2k3 */ - "status: 0x%x\n", status); + "status: 0x%lx\n", status);
if (SUCCEEDED(status)) { ok(PackageInfo.fCapabilities == LSA_BASE_CAPS || PackageInfo.fCapabilities == (LSA_BASE_CAPS|SECPKG_FLAG_APPCONTAINER_PASSTHROUGH), - "fCapabilities: 0x%x\n", PackageInfo.fCapabilities); + "fCapabilities: 0x%lx\n", PackageInfo.fCapabilities); ok(PackageInfo.wVersion == 1, "wVersion: %d\n", PackageInfo.wVersion); ok(PackageInfo.wRPCID == 14, "wRPCID: %d\n", PackageInfo.wRPCID); ok(PackageInfo.cbMaxToken == 0x4000 || PackageInfo.cbMaxToken == 0x6000, /* Win7 */ - "cbMaxToken: 0x%x\n", + "cbMaxToken: 0x%lx\n", PackageInfo.cbMaxToken); } }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/schedsvc/tests/Makefile.in | 1 dlls/schedsvc/tests/atsvcapi.c | 44 ++++---- dlls/schedsvc/tests/rpcapi.c | 210 ++++++++++++++++++++------------------- 3 files changed, 127 insertions(+), 128 deletions(-)
diff --git a/dlls/schedsvc/tests/Makefile.in b/dlls/schedsvc/tests/Makefile.in index 8f328a94a82..b8e7448bb76 100644 --- a/dlls/schedsvc/tests/Makefile.in +++ b/dlls/schedsvc/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = schedsvc.dll IMPORTS = rpcrt4 ole32
diff --git a/dlls/schedsvc/tests/atsvcapi.c b/dlls/schedsvc/tests/atsvcapi.c index 5f5ca06627a..3aaad8b5cfe 100644 --- a/dlls/schedsvc/tests/atsvcapi.c +++ b/dlls/schedsvc/tests/atsvcapi.c @@ -38,11 +38,11 @@ static int test_failures, test_skipped; static LONG CALLBACK rpc_exception_filter(EXCEPTION_POINTERS *ptrs) { if (test_skipped) - skip("Can't connect to ATSvc service: %#x\n", ptrs->ExceptionRecord->ExceptionCode); + skip("Can't connect to ATSvc service: %#lx\n", ptrs->ExceptionRecord->ExceptionCode);
if (winetest_debug) { - fprintf(stdout, "%04x:atsvcapi: 1 tests executed (0 marked as todo, %d %s), %d skipped.\n", + fprintf(stdout, "%04lx:atsvcapi: 1 tests executed (0 marked as todo, %d %s), %d skipped.\n", GetCurrentProcessId(), test_failures, test_failures != 1 ? "failures" : "failure", test_skipped); fflush(stdout); } @@ -65,14 +65,14 @@ START_TEST(atsvcapi) total = MAX_COMPUTERNAME_LENGTH + 1; SetLastError(0xdeadbeef); ret = GetComputerNameW(server_name, &total); - ok(ret, "GetComputerName error %u\n", GetLastError()); + ok(ret, "GetComputerName error %lu\n", GetLastError());
hr = RpcStringBindingComposeA(NULL, ncalrpc, NULL, NULL, NULL, &binding_str); - ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#lx\n", hr); hr = RpcBindingFromStringBindingA(binding_str, &atsvc_handle); - ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#lx\n", hr); hr = RpcStringFreeA(&binding_str); - ok(hr == RPC_S_OK, "RpcStringFree error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringFree error %#lx\n", hr);
/* widl generated RpcTryExcept/RpcExcept can't catch raised exceptions */ old_exception_filter = SetUnhandledExceptionFilter(rpc_exception_filter); @@ -91,7 +91,7 @@ START_TEST(atsvcapi) win_skip("NetrJobAdd: Access denied, skipping the tests\n"); goto skip_tests; } - ok(ret == ERROR_SUCCESS || broken(ret == ERROR_NOT_SUPPORTED) /* Win8+ */, "NetrJobAdd error %u\n", ret); + ok(ret == ERROR_SUCCESS || broken(ret == ERROR_NOT_SUPPORTED) /* Win8+ */, "NetrJobAdd error %lu\n", ret); if (ret == ERROR_NOT_SUPPORTED) { /* FIXME: use win_skip() when todo_wine above is removed */ @@ -106,10 +106,10 @@ START_TEST(atsvcapi)
info2 = NULL; ret = NetrJobGetInfo(server_name, 0xdeadbeef, &info2); - ok(ret == APE_AT_ID_NOT_FOUND || broken(1) /* vista and w2008 return rubbish here */, "wrong error %u\n", ret); + ok(ret == APE_AT_ID_NOT_FOUND || broken(1) /* vista and w2008 return rubbish here */, "wrong error %lu\n", ret);
ret = NetrJobDel(server_name, 0xdeadbeef, 0xdeadbeef); - ok(ret == APE_AT_ID_NOT_FOUND, "wrong error %u\n", ret); + ok(ret == APE_AT_ID_NOT_FOUND, "wrong error %lu\n", ret);
try_count = 5;
@@ -124,31 +124,31 @@ START_TEST(atsvcapi) win_skip("NetrJobEnum: Access denied, skipping the tests\n"); goto skip_tests_delete; } - ok(ret == ERROR_SUCCESS, "NetrJobEnum error %u (%#x)\n", ret, ret); - ok(total != 0, "total %u\n", total); - ok(start_index == 0, "start_index %u\n", start_index); + ok(ret == ERROR_SUCCESS, "NetrJobEnum error %lu (%#lx)\n", ret, ret); + ok(total != 0, "total %lu\n", total); + ok(start_index == 0, "start_index %lu\n", start_index); ok(container.Buffer != NULL, "Buffer %p\n", container.Buffer); - ok(container.EntriesRead != 0, "EntriesRead %u\n", container.EntriesRead); + ok(container.EntriesRead != 0, "EntriesRead %lu\n", container.EntriesRead);
found = FALSE;
for (i = 0; i < container.EntriesRead; i++) { - trace("%u: jobid %u, command %s\n", i, container.Buffer[i].JobId, wine_dbgstr_w(container.Buffer[i].Command)); + trace("%lu: jobid %lu, command %s\n", i, container.Buffer[i].JobId, wine_dbgstr_w(container.Buffer[i].Command));
if (container.Buffer[i].JobId == jobid || !lstrcmpW(container.Buffer[i].Command, task1W)) { found = TRUE; - trace("found %u: jobid %u, command %s\n", i, container.Buffer[i].JobId, wine_dbgstr_w(container.Buffer[i].Command)); + trace("found %lu: jobid %lu, command %s\n", i, container.Buffer[i].JobId, wine_dbgstr_w(container.Buffer[i].Command)); }
info2 = NULL; ret = NetrJobGetInfo(server_name, container.Buffer[i].JobId, &info2); - ok(ret == ERROR_SUCCESS, "NetrJobGetInfo error %u\n", ret); + ok(ret == ERROR_SUCCESS, "NetrJobGetInfo error %lu\n", ret);
ok(container.Buffer[i].JobTime == info2->JobTime, "%u != %u\n", (UINT)container.Buffer[i].JobTime, (UINT)info2->JobTime); - ok(container.Buffer[i].DaysOfMonth == info2->DaysOfMonth, "%u != %u\n", container.Buffer[i].DaysOfMonth, info2->DaysOfMonth); + ok(container.Buffer[i].DaysOfMonth == info2->DaysOfMonth, "%lu != %lu\n", container.Buffer[i].DaysOfMonth, info2->DaysOfMonth); ok(container.Buffer[i].DaysOfWeek == info2->DaysOfWeek, "%u != %u\n", container.Buffer[i].DaysOfWeek, info2->DaysOfWeek); ok(container.Buffer[i].Flags == info2->Flags, "%#x != %#x\n", container.Buffer[i].Flags, info2->Flags); ok(!lstrcmpW(container.Buffer[i].Command, info2->Command), "%s != %s\n", wine_dbgstr_w(container.Buffer[i].Command), wine_dbgstr_w(info2->Command)); @@ -164,17 +164,17 @@ START_TEST(atsvcapi)
MIDL_user_free(container.Buffer);
- ok(found, "just added jobid %u should be found\n", jobid); + ok(found, "just added jobid %lu should be found\n", jobid);
skip_tests_delete: ret = NetrJobDel(server_name, jobid, jobid); - ok(ret == ERROR_SUCCESS, "NetrJobDel error %u\n", ret); + ok(ret == ERROR_SUCCESS, "NetrJobDel error %lu\n", ret);
skip_tests: SetUnhandledExceptionFilter(old_exception_filter);
hr = RpcBindingFree(&atsvc_handle); - ok(hr == RPC_S_OK, "RpcBindingFree error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFree error %#lx\n", hr); }
DECLSPEC_HIDDEN handle_t __RPC_USER ATSVC_HANDLE_bind(ATSVC_HANDLE str) @@ -185,10 +185,10 @@ DECLSPEC_HIDDEN handle_t __RPC_USER ATSVC_HANDLE_bind(ATSVC_HANDLE str) HRESULT hr;
hr = RpcStringBindingComposeA(NULL, ncalrpc, NULL, NULL, NULL, &binding_str); - ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#lx\n", hr);
hr = RpcBindingFromStringBindingA(binding_str, &rpc_handle); - ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#lx\n", hr);
RpcStringFreeA(&binding_str); return rpc_handle; diff --git a/dlls/schedsvc/tests/rpcapi.c b/dlls/schedsvc/tests/rpcapi.c index 09523df4fd6..56e3f836a17 100644 --- a/dlls/schedsvc/tests/rpcapi.c +++ b/dlls/schedsvc/tests/rpcapi.c @@ -29,11 +29,11 @@ extern handle_t schrpc_handle;
static LONG CALLBACK rpc_exception_filter(EXCEPTION_POINTERS *ptrs) { - skip("Can't connect to Scheduler service: %#x\n", ptrs->ExceptionRecord->ExceptionCode); + skip("Can't connect to Scheduler service: %#lx\n", ptrs->ExceptionRecord->ExceptionCode);
if (winetest_debug) { - fprintf(stdout, "%04x:rpcapi: 0 tests executed (0 marked as todo, 0 failures), 1 skipped.\n", GetCurrentProcessId()); + fprintf(stdout, "%04lx:rpcapi: 0 tests executed (0 marked as todo, 0 failures), 1 skipped.\n", GetCurrentProcessId()); fflush(stdout); } ExitProcess(0); @@ -89,69 +89,69 @@ START_TEST(rpcapi) IID iid;
hr = RpcStringBindingComposeA(NULL, ncalrpc, NULL, NULL, NULL, &binding_str); - ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringBindingCompose error %#lx\n", hr); hr = RpcBindingFromStringBindingA(binding_str, &schrpc_handle); - ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFromStringBinding error %#lx\n", hr); hr = RpcStringFreeA(&binding_str); - ok(hr == RPC_S_OK, "RpcStringFree error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcStringFree error %#lx\n", hr);
/* widl generated RpcTryExcept/RpcExcept can't catch raised exceptions */ old_exception_filter = SetUnhandledExceptionFilter(rpc_exception_filter);
version = 0; hr = SchRpcHighestVersion(&version); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(version == 0x10002 /* vista */ || version == 0x10003 /* win7 */ || version == 0x10004 /* win8 */ || version == 0x10005 /* win10 */ || version == 0x10006 /* win10 1709 */, - "wrong version %#x\n", version); + "wrong version %#lx\n", version);
SetUnhandledExceptionFilter(old_exception_filter);
hr = SchRpcCreateFolder(L"\Wine\Folder1", NULL, 1); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
hr = SchRpcCreateFolder(L"\Wine\Folder1", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcCreateFolder(L"\Wine\Folder1", NULL, 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr);
hr = SchRpcCreateFolder(L"Wine\Folder2", L"", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcDelete(L"Wine", 0); - ok(hr == HRESULT_FROM_WIN32(ERROR_DIR_NOT_EMPTY), "expected ERROR_DIR_NOT_EMPTY, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_DIR_NOT_EMPTY), "expected ERROR_DIR_NOT_EMPTY, got %#lx\n", hr);
hr = SchRpcDelete(L"Wine\Folder1", 1); - ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#lx\n", hr);
hr = SchRpcDelete(L"Wine\Folder1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcDelete(L"\Wine\Folder2", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcDelete(L"\Wine", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
hr = SchRpcDelete(L"\Wine", 0); ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || broken(hr == S_OK), /* Early versions of Win 10 */ - "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); + "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr);
hr = SchRpcDelete(L"", 0); - ok(hr == E_ACCESSDENIED /* win7 */ || hr == E_INVALIDARG /* vista */, "expected E_ACCESSDENIED, got %#x\n", hr); + ok(hr == E_ACCESSDENIED /* win7 */ || hr == E_INVALIDARG /* vista */, "expected E_ACCESSDENIED, got %#lx\n", hr);
hr = SchRpcCreateFolder(L"\Wine", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
MultiByteToWideChar(CP_ACP, 0, xml1, -1, xmlW, ARRAY_SIZE(xmlW));
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine", xmlW, TASK_VALIDATE_ONLY, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!path, "expected NULL, path %p\n", path); ok(!info, "expected NULL, info %p\n", info);
@@ -161,12 +161,12 @@ START_TEST(rpcapi) info = NULL; hr = SchRpcRegisterTask(L"\Wine\Task1", xmlW, create_new_task[i].flags, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == create_new_task[i].hr, "%u: expected %#x, got %#x\n", i, create_new_task[i].hr, hr); + ok(hr == create_new_task[i].hr, "%lu: expected %#lx, got %#lx\n", i, create_new_task[i].hr, hr);
if (hr == S_OK) { hr = SchRpcDelete(L"\Wine\Task1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!info, "expected NULL, info %p\n", info); MIDL_user_free(path); } @@ -175,21 +175,21 @@ START_TEST(rpcapi) path = NULL; info = NULL; hr = SchRpcRegisterTask(L"\Wine\Task1", xmlW, TASK_VALIDATE_ONLY, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!path, "expected NULL, path %p\n", path); ok(!info, "expected NULL, info %p\n", info);
path = NULL; info = NULL; hr = SchRpcRegisterTask(NULL, xmlW, TASK_VALIDATE_ONLY, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!path, "expected NULL, path %p\n", path); ok(!info, "expected NULL, info %p\n", info);
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine\Folder1\Task1", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!lstrcmpW(path, L"\Wine\Folder1\Task1") /* win7 */ || !lstrcmpW(path, L"Wine\Folder1\Task1") /* vista */, "expected \Wine\Folder1\Task1, task actual path %s\n", wine_dbgstr_w(path)); ok(!info, "expected NULL, info %p\n", info); @@ -201,7 +201,7 @@ START_TEST(rpcapi) info = NULL; hr = SchRpcRegisterTask(L"Wine\Folder1\Task1", xmlW, open_existing_task[i].flags, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == open_existing_task[i].hr, "%u: expected %#x, got %#x\n", i, open_existing_task[i].hr, hr); + ok(hr == open_existing_task[i].hr, "%lu: expected %#lx, got %#lx\n", i, open_existing_task[i].hr, hr); if (hr == S_OK) { ok(!lstrcmpW(path, L"\Wine\Folder1\Task1") /* win7 */ || @@ -210,64 +210,64 @@ START_TEST(rpcapi) MIDL_user_free(path); } else - ok(!path, "%u: expected NULL, path %p\n", i, path); - ok(!info, "%u: expected NULL, info %p\n", i, info); + ok(!path, "%lu: expected NULL, path %p\n", i, path); + ok(!info, "%lu: expected NULL, info %p\n", i, info); }
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine\Folder1\Task1", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ALREADY_EXISTS), "expected ERROR_ALREADY_EXISTS, got %#lx\n", hr); ok(!path, "expected NULL, path %p\n", path); ok(!info, "expected NULL, info %p\n", info);
count = 0; xml = NULL; hr = SchRpcRetrieveTask(L"\Wine\Folder1\Task1", L"", &count, &xml); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); if (hr == S_OK) trace("%s\n", wine_dbgstr_w(xml)); MIDL_user_free(xml);
hr = SchRpcDelete(L"Wine\Folder1\Task1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"Wine\Folder1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"Wine", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", TASK_ENUM_HIDDEN, &start_index, 0, &count, &names); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); - ok(!count, "expected 0, got %u\n", count); - ok(!start_index, "expected 0, got %u\n", start_index); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr); + ok(!count, "expected 0, got %lu\n", count); + ok(!start_index, "expected 0, got %lu\n", start_index); ok(!names, "expected NULL, got %p\n", names);
hr = SchRpcCreateFolder(L"\Wine", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 0, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(!count, "expected 0, got %u\n", count); - ok(!start_index, "expected 0, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(!count, "expected 0, got %lu\n", count); + ok(!start_index, "expected 0, got %lu\n", start_index); ok(!names, "expected NULL, got %p\n", names);
hr = SchRpcCreateFolder(L"\Wine\Folder1", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcCreateFolder(L"\Wine\Folder2", NULL, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 0, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -279,15 +279,15 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 1, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 1, "expected 1, got %u\n", count); - ok(start_index == 1, "expected 1, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 1, "expected 1, got %lu\n", count); + ok(start_index == 1, "expected 1, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); ok(!lstrcmpW(names[0], L"Folder1") || !lstrcmpW(names[0], L"Folder2"), "got %s\n", wine_dbgstr_w(names[0])); MIDL_user_free(names[0]); @@ -297,9 +297,9 @@ START_TEST(rpcapi) count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 2, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -311,15 +311,15 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 10, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -331,35 +331,35 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 10; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumFolders(L"\Wine", 0, &start_index, 0, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(!count, "expected 0, got %u\n", count); - ok(start_index == 10, "expected 10, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(!count, "expected 0, got %lu\n", count); + ok(start_index == 10, "expected 10, got %lu\n", start_index); ok(!names, "expected NULL, got %p\n", names);
hr = SchRpcDelete(L"Wine\Folder1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"\Wine\Folder2", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine\Folder1", TASK_ENUM_HIDDEN, &start_index, 0, &count, &names); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); - ok(!count, "expected 0, got %u\n", count); - ok(!start_index, "expected 0, got %u\n", start_index); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr); + ok(!count, "expected 0, got %lu\n", count); + ok(!start_index, "expected 0, got %lu\n", start_index); ok(!names, "expected NULL, got %p\n", names);
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine\Task1", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!lstrcmpW(path, L"\Wine\Task1") /* win7 */ || !lstrcmpW(path, L"Wine\Task1") /* vista */, "expected \Wine\Task1, task actual path %s\n", wine_dbgstr_w(path)); ok(!info, "expected NULL, info %p\n", info); @@ -368,7 +368,7 @@ START_TEST(rpcapi) path = NULL; info = NULL; hr = SchRpcRegisterTask(L"\Wine\Task2", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!lstrcmpW(path, L"\Wine\Task2"), "expected \Wine\Task2, task actual path %s\n", wine_dbgstr_w(path)); ok(!info, "expected NULL, info %p\n", info); MIDL_user_free(path); @@ -377,9 +377,9 @@ START_TEST(rpcapi) count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine", 0, &start_index, 0, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -391,15 +391,15 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine", 0, &start_index, 1, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 1, "expected 1, got %u\n", count); - ok(start_index == 1, "expected 1, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 1, "expected 1, got %lu\n", count); + ok(start_index == 1, "expected 1, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); /* returned name depends whether directory randomization is on */ ok(!lstrcmpW(names[0], L"Task1") || !lstrcmpW(names[0], L"Task2"), @@ -411,9 +411,9 @@ START_TEST(rpcapi) count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine", 0, &start_index, 2, &count, &names); - ok(hr == S_FALSE, "expected S_FALSE, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_FALSE, "expected S_FALSE, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -425,15 +425,15 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
start_index = 0; count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"\Wine", 0, &start_index, 10, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 2, "expected 2, got %u\n", count); - ok(start_index == 2, "expected 2, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 2, "expected 2, got %lu\n", count); + ok(start_index == 2, "expected 2, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); enumed = 0; for (i = 0; i < count; i++) @@ -445,12 +445,12 @@ START_TEST(rpcapi) MIDL_user_free(names[i]); } MIDL_user_free(names); - ok(enumed == 3, "expected 3, got %u\n", enumed); + ok(enumed == 3, "expected 3, got %lu\n", enumed);
path = NULL; info = NULL; hr = SchRpcRegisterTask(L"Wine\Task3", xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); ok(!lstrcmpW(path, L"\Wine\Task3") /* win7 */ || !lstrcmpW(path, L"Wine\Task3") /* vista */, "expected \Wine\Task3, task actual path %s\n", wine_dbgstr_w(path)); ok(!info, "expected NULL, info %p\n", info); @@ -459,9 +459,9 @@ START_TEST(rpcapi) count = 0xdeadbeef; names = NULL; hr = SchRpcEnumTasks(L"Wine", 0, &start_index, 10, &count, &names); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(count == 1, "expected 1, got %u\n", count); - ok(start_index == 3, "expected 3, got %u\n", start_index); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(count == 1, "expected 1, got %lu\n", count); + ok(start_index == 3, "expected 3, got %lu\n", start_index); ok(names != NULL, "names should not be NULL\n"); /* returned name depends whether directory randomization is on */ ok(!lstrcmpW(names[0], L"Task1") || !lstrcmpW(names[0], L"Task2") || !lstrcmpW(names[0], L"Task3"), @@ -478,45 +478,45 @@ START_TEST(rpcapi) }
hr = SchRpcGetTaskInfo(L"Task1", 0, &enabled, &state); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "expected ERROR_FILE_NOT_FOUND, got %#lx\n", hr);
enabled = state = 0xdeadbeef; hr = SchRpcGetTaskInfo(L"\Wine\Task1", 0, &enabled, &state); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(enabled == 0, "expected 0, got %u\n", enabled); - ok(state == TASK_STATE_UNKNOWN, "expected TASK_STATE_UNKNOWN, got %u\n", state); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(enabled == 0, "expected 0, got %lu\n", enabled); + ok(state == TASK_STATE_UNKNOWN, "expected TASK_STATE_UNKNOWN, got %lu\n", state);
enabled = state = 0xdeadbeef; hr = SchRpcGetTaskInfo(L"\Wine\Task1", SCH_FLAG_STATE, &enabled, &state); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); - ok(enabled == 0, "expected 0, got %u\n", enabled); - ok(state == TASK_STATE_DISABLED, "expected TASK_STATE_DISABLED, got %u\n", state); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); + ok(enabled == 0, "expected 0, got %lu\n", enabled); + ok(state == TASK_STATE_DISABLED, "expected TASK_STATE_DISABLED, got %lu\n", state);
hr = SchRpcEnableTask(L"\Wine\Task1", 0xdeadbeef); todo_wine - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
enabled = state = 0xdeadbeef; hr = SchRpcGetTaskInfo(L"\Wine\Task1", SCH_FLAG_STATE, &enabled, &state); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); todo_wine - ok(enabled == 1, "expected 1, got %u\n", enabled); + ok(enabled == 1, "expected 1, got %lu\n", enabled); todo_wine - ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %u\n", state); + ok(state == TASK_STATE_READY, "expected TASK_STATE_READY, got %lu\n", state);
hr = SchRpcDelete(L"Wine\Task1", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"Wine\Task2", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"Wine\Task3", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); hr = SchRpcDelete(L"\Wine", 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr);
path = NULL; info = NULL; hr = SchRpcRegisterTask(NULL, xmlW, TASK_CREATE, NULL, TASK_LOGON_NONE, 0, NULL, &path, &info); - ok(hr == S_OK || hr == E_ACCESSDENIED, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK || hr == E_ACCESSDENIED, "expected S_OK, got %#lx\n", hr); if (hr != E_ACCESSDENIED) { ok(!info, "expected NULL, info %p\n", info); @@ -524,14 +524,14 @@ START_TEST(rpcapi) hr = IIDFromString(path + 1, &iid); else hr = IIDFromString(path, &iid); - ok(hr == S_OK, "IIDFromString(%s) error %#x\n", wine_dbgstr_w(path), hr); + ok(hr == S_OK, "IIDFromString(%s) error %#lx\n", wine_dbgstr_w(path), hr); hr = SchRpcDelete(path, 0); - ok(hr == S_OK, "expected S_OK, got %#x\n", hr); + ok(hr == S_OK, "expected S_OK, got %#lx\n", hr); MIDL_user_free(path); }
hr = RpcBindingFree(&schrpc_handle); - ok(hr == RPC_S_OK, "RpcBindingFree error %#x\n", hr); + ok(hr == RPC_S_OK, "RpcBindingFree error %#lx\n", hr); }
void __RPC_FAR *__RPC_USER MIDL_user_allocate(SIZE_T n)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109767
Your paranoid android.
=== w7u_adm (32 bit report) ===
schedsvc: rpcapi.c:245: Test failed: expected NULL, got 0066AC78 rpcapi.c:257: Test failed: expected NULL, got 0066AC98 rpcapi.c:357: Test failed: expected NULL, got 0066ACB8
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/scrobj/tests/Makefile.in | 1 dlls/scrobj/tests/scrobj.c | 106 +++++++++++++++++++++-------------------- 2 files changed, 53 insertions(+), 54 deletions(-)
diff --git a/dlls/scrobj/tests/Makefile.in b/dlls/scrobj/tests/Makefile.in index 52bd20da04f..4e517caefe6 100644 --- a/dlls/scrobj/tests/Makefile.in +++ b/dlls/scrobj/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = scrobj.dll IMPORTS = oleaut32 ole32 advapi32 uuid
diff --git a/dlls/scrobj/tests/scrobj.c b/dlls/scrobj/tests/scrobj.c index 4154af43de9..108b30e7bea 100644 --- a/dlls/scrobj/tests/scrobj.c +++ b/dlls/scrobj/tests/scrobj.c @@ -178,27 +178,27 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR name, DWORD if (!wcscmp(name, L"vbAddOne")) { CHECK_EXPECT(GetDispID_vbAddOne); - ok(grfdex == fdexNameCaseInsensitive, "grfdex = %x\n", grfdex); + ok(grfdex == fdexNameCaseInsensitive, "grfdex = %lx\n", grfdex); return DISP_E_UNKNOWNNAME; } if (!wcscmp(name, L"wtTest")) { CHECK_EXPECT(GetDispID_wtTest); - ok(!grfdex, "grfdex = %x\n", grfdex); + ok(!grfdex, "grfdex = %lx\n", grfdex); *pid = DISPID_WTTEST; return S_OK; } if (!wcscmp(name, L"get_gsProp")) { CHECK_EXPECT(GetDispID_get_gsProp); - ok(!grfdex, "grfdex = %x\n", grfdex); + ok(!grfdex, "grfdex = %lx\n", grfdex); *pid = DISPID_GET_GSPROP; return S_OK; } if (!wcscmp(name, L"put_gsProp")) { CHECK_EXPECT(GetDispID_put_gsProp); - ok(!grfdex, "grfdex = %x\n", grfdex); + ok(!grfdex, "grfdex = %lx\n", grfdex); *pid = DISPID_PUT_GSPROP; return S_OK; } @@ -213,7 +213,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc { case DISPID_WTTEST: CHECK_EXPECT(InvokeEx); - ok(lcid == 0x100, "lcid = %x\n", lcid); + ok(lcid == 0x100, "lcid = %lx\n", lcid); ok(flags == DISPATCH_METHOD, "flags = %x\n", flags); ok(caller == (void*)0xdeadbeef, "called = %p\n", caller); V_VT(res) = VT_BOOL; @@ -236,13 +236,13 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc return S_OK; }
- ok(0, "unexpected id %u\n", id); + ok(0, "unexpected id %lu\n", id); return E_FAIL; }
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR name, DWORD grfdex) { - ok(0, "unexpected call %s %x\n", wine_dbgstr_w(name), grfdex); + ok(0, "unexpected call %s %lx\n", wine_dbgstr_w(name), grfdex); return E_NOTIMPL; }
@@ -339,7 +339,7 @@ static HRESULT WINAPI ActiveScriptParse_ParseScriptText(IActiveScriptParse *ifac ok(!item_name, "pstrItemName = %s\n", wine_dbgstr_w(item_name)); ok(!context, "punkContext = %p\n", context); ok(!delimiter, "pstrDelimiter = %s\n", wine_dbgstr_w(delimiter)); - ok(flags == parse_flags, "dwFlags = %x\n", flags); + ok(flags == parse_flags, "dwFlags = %lx\n", flags); ok(!result, "pvarResult = NULL\n"); ok(!excepinfo, "pexcepinfo = %p\n", excepinfo); return S_OK; @@ -401,30 +401,30 @@ static HRESULT WINAPI ActiveScript_SetScriptSite(IActiveScript *iface, IActiveSc ok(pass != NULL, "pass == NULL\n");
hres = IActiveScriptSite_QueryInterface(pass, &IID_IActiveScriptSiteInterruptPoll, (void**)&poll); - ok(hres == E_NOINTERFACE, "Got IActiveScriptSiteInterruptPoll interface: %08x\n", hres); + ok(hres == E_NOINTERFACE, "Got IActiveScriptSiteInterruptPoll interface: %08lx\n", hres);
hres = IActiveScriptSite_GetLCID(pass, &lcid); - ok(hres == S_OK, "GetLCID failed: %08x\n", hres); + ok(hres == S_OK, "GetLCID failed: %08lx\n", hres);
hres = IActiveScriptSite_OnStateChange(pass, (state = SCRIPTSTATE_INITIALIZED)); - ok(hres == E_NOTIMPL, "OnStateChange failed: %08x\n", hres); + ok(hres == E_NOTIMPL, "OnStateChange failed: %08lx\n", hres);
hres = IActiveScriptSite_QueryInterface(pass, &IID_IActiveScriptSiteDebug, (void**)&debug); todo_wine - ok(hres == S_OK, "IActiveScriptSiteDebug not supported: %08x\n", hres); + ok(hres == S_OK, "IActiveScriptSiteDebug not supported: %08lx\n", hres); if (SUCCEEDED(hres)) IActiveScriptSiteDebug_Release(debug);
hres = IActiveScriptSite_QueryInterface(pass, &IID_ICanHandleException, (void**)&canexception); - ok(hres == E_NOINTERFACE, "Got IID_ICanHandleException interface: %08x\n", hres); + ok(hres == E_NOINTERFACE, "Got IID_ICanHandleException interface: %08lx\n", hres);
hres = IActiveScriptSite_QueryInterface(pass, &IID_IServiceProvider, (void**)&service); - ok(hres == S_OK, "Could not get IServiceProvider interface: %08x\n", hres); + ok(hres == S_OK, "Could not get IServiceProvider interface: %08lx\n", hres); if (SUCCEEDED(hres)) IServiceProvider_Release(service);
hres = IActiveScriptSite_QueryInterface(pass, &IID_IActiveScriptSiteWindow, (void**)&window); - ok(hres == S_OK, "Could not get IActiveScriptSiteWindow interface: %08x\n", hres); + ok(hres == S_OK, "Could not get IActiveScriptSiteWindow interface: %08lx\n", hres); if (window) IActiveScriptSiteWindow_Release(window);
@@ -484,12 +484,12 @@ static HRESULT WINAPI ActiveScript_AddNamedItem(IActiveScript *iface, LPCOLESTR if (!wcscmp(name, L"scriptlet")) { CHECK_EXPECT(AddNamedItem_scriptlet); - ok(flags == (SCRIPTITEM_ISVISIBLE|SCRIPTITEM_GLOBALMEMBERS), "got flags %#x\n", flags); + ok(flags == (SCRIPTITEM_ISVISIBLE|SCRIPTITEM_GLOBALMEMBERS), "got flags %#lx\n", flags); } else if (!wcscmp(name, L"globals")) { CHECK_EXPECT(AddNamedItem_globals); - ok(flags == SCRIPTITEM_ISVISIBLE, "got flags %#x\n", flags); + ok(flags == SCRIPTITEM_ISVISIBLE, "got flags %#lx\n", flags); } else { @@ -685,7 +685,7 @@ static BOOL register_script_engine(BOOL init)
hres = CoRegisterClassObject(&CLSID_TestScript, (IUnknown *)&script_cf, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, ®id); - ok(hres == S_OK, "Could not register script engine: %08x\n", hres); + ok(hres == S_OK, "Could not register script engine: %08lx\n", hres); return TRUE; }
@@ -709,10 +709,10 @@ static WCHAR *get_test_file(const char *res_name) ok(handle != INVALID_HANDLE_VALUE, "failed to create temp file\n");
res = WriteFile(handle, data, size, &size, NULL); - ok(res, "WriteFile failed: %u\n", GetLastError()); + ok(res, "WriteFile failed: %lu\n", GetLastError());
res = CloseHandle(handle); - ok(res, "CloseHandle failed: %u\n", GetLastError()); + ok(res, "CloseHandle failed: %lu\n", GetLastError());
size = (wcslen(buffer) + 1) * sizeof(WCHAR); ret = heap_alloc(size); @@ -727,7 +727,7 @@ static void test_key_value_(const char *key_name, const char *expect, unsigned l LONG size = sizeof(buf); LSTATUS status; status = RegQueryValueA(HKEY_CLASSES_ROOT, key_name, buf, &size); - ok_(__FILE__,line)(!status, "RegQueryValueA failed: %u\n", status); + ok_(__FILE__,line)(!status, "RegQueryValueA failed: %lu\n", status); if (*expect == '*') ok_(__FILE__,line)(size >= strlen(expect) + 1 && !strcmp(buf + size - strlen(expect), expect + 1), "Unexpected value "%s", expected "%s"\n", buf, expect); @@ -741,7 +741,7 @@ static void test_key_deleted(const char *key_name) HKEY key; LSTATUS status; status = RegOpenKeyA(HKEY_CLASSES_ROOT, key_name, &key); - ok(status == ERROR_FILE_NOT_FOUND, "RegOpenKey("%s") returned %u\n", key_name, status); + ok(status == ERROR_FILE_NOT_FOUND, "RegOpenKey("%s") returned %lu\n", key_name, status); }
static void register_script_object(BOOL do_register, const WCHAR *file_name) @@ -765,7 +765,7 @@ static void register_script_object(BOOL do_register, const WCHAR *file_name) CHECK_CALLED(ParseScriptText); CHECK_CALLED(SetScriptState_UNINITIALIZED); CHECK_CALLED(Close); - ok(hres == S_OK, "DllInstall failed: %08x\n", hres); + ok(hres == S_OK, "DllInstall failed: %08lx\n", hres);
if (do_register) { @@ -802,7 +802,7 @@ static void test_create_object(void)
hres = CoGetClassObject(&CLSID_WineTest, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER, NULL, &IID_IClassFactory, (void**)&cf); - ok(hres == S_OK, "Could not get class factory: %08x\n", hres); + ok(hres == S_OK, "Could not get class factory: %08lx\n", hres);
parse_flags = SCRIPTTEXT_ISPERSISTENT | SCRIPTTEXT_ISVISIBLE;
@@ -820,7 +820,7 @@ static void test_create_object(void) SET_EXPECT(SetScriptState_UNINITIALIZED); SET_EXPECT(Clone); hres = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "Could not create scriptlet instance: %08x\n", hres); + ok(hres == S_OK, "Could not create scriptlet instance: %08lx\n", hres); CHECK_CALLED(Clone); CHECK_CALLED(CreateInstance); CHECK_CALLED(QI_IActiveScriptParse); @@ -838,47 +838,47 @@ static void test_create_object(void) CHECK_CALLED(ParseScriptText);
hres = IUnknown_QueryInterface(unk, &IID_IDispatch, (void**)&disp); - ok(hres == S_OK, "Could not get IDispatch iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IDispatch iface: %08lx\n", hres);
IDispatch_Release(disp);
hres = IUnknown_QueryInterface(unk, &IID_IDispatchEx, (void**)&dispex); - ok(hres == S_OK, "Could not get IDispatch iface: %08x\n", hres); + ok(hres == S_OK, "Could not get IDispatch iface: %08lx\n", hres);
str = SysAllocString(L"vbAddOne"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &vb_add_one_id); - ok(hres == S_OK, "Could not get vkAddOne id: %08x\n", hres); + ok(hres == S_OK, "Could not get vkAddOne id: %08lx\n", hres); SysFreeString(str);
str = SysAllocString(L"jsAddTwo"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &js_add_two_id); - ok(hres == S_OK, "Could not get jsAddTwo id: %08x\n", hres); + ok(hres == S_OK, "Could not get jsAddTwo id: %08lx\n", hres); SysFreeString(str);
str = SysAllocString(L"wtTest"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &wt_test_id); - ok(hres == S_OK, "Could not get wtTest id: %08x\n", hres); + ok(hres == S_OK, "Could not get wtTest id: %08lx\n", hres); SysFreeString(str);
str = SysAllocString(L"gsProp"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &wt_gsprop_id); - ok(hres == S_OK, "Could not get wtTest id: %08x\n", hres); + ok(hres == S_OK, "Could not get wtTest id: %08lx\n", hres); SysFreeString(str);
str = SysAllocString(L"vbaddone"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseSensitive, &id); - ok(hres == DISP_E_UNKNOWNNAME, "invalid case returned: %08x\n", hres); + ok(hres == DISP_E_UNKNOWNNAME, "invalid case returned: %08lx\n", hres); SysFreeString(str);
str = SysAllocString(L"vbaddone"); hres = IDispatchEx_GetDispID(dispex, str, 0, &id); - ok(hres == DISP_E_UNKNOWNNAME, "invalid case returned: %08x\n", hres); + ok(hres == DISP_E_UNKNOWNNAME, "invalid case returned: %08lx\n", hres); SysFreeString(str);
str = SysAllocString(L"vbaddone"); hres = IDispatchEx_GetDispID(dispex, str, fdexNameCaseInsensitive, &id); - ok(hres == S_OK, "case insensitive returned: %08x\n", hres); - ok(id == vb_add_one_id, "id = %u, expected %u\n", id, vb_add_one_id); + ok(hres == S_OK, "case insensitive returned: %08lx\n", hres); + ok(id == vb_add_one_id, "id = %lu, expected %lu\n", id, vb_add_one_id); SysFreeString(str);
memset(&ei, 0, sizeof(ei)); @@ -889,9 +889,9 @@ static void test_create_object(void) dp.cArgs = 1; dp.rgvarg = &v; hres = IDispatchEx_InvokeEx(dispex, vb_add_one_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &r, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&r) == VT_I4, "V_VT(r) = %d\n", V_VT(&r)); - ok(V_I4(&r) == 3, "V_I4(r) = %d\n", V_I4(&r)); + ok(V_I4(&r) == 3, "V_I4(r) = %ld\n", V_I4(&r));
memset(&ei, 0, sizeof(ei)); memset(&dp, 0, sizeof(dp)); @@ -901,9 +901,9 @@ static void test_create_object(void) dp.cArgs = 1; dp.rgvarg = &v; hres = IDispatchEx_InvokeEx(dispex, js_add_two_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &r, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); ok(V_VT(&r) == VT_I4, "V_VT(r) = %d\n", V_VT(&r)); - ok(V_I4(&r) == 6, "V_I4(r) = %d\n", V_I4(&r)); + ok(V_I4(&r) == 6, "V_I4(r) = %ld\n", V_I4(&r));
memset(&ei, 0, sizeof(ei)); memset(&dp, 0, sizeof(dp)); @@ -914,20 +914,20 @@ static void test_create_object(void) dp.rgvarg = &v; SET_EXPECT(InvokeEx); hres = IDispatchEx_InvokeEx(dispex, wt_test_id, 0x100, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &r, &ei, (void*)0xdeadbeef); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); CHECK_CALLED(InvokeEx); ok(V_VT(&r) == VT_BOOL, "V_VT(r) = %d\n", V_VT(&r)); - ok(V_BOOL(&r) == VARIANT_TRUE, "V_I4(r) = %d\n", V_I4(&r)); + ok(V_BOOL(&r) == VARIANT_TRUE, "V_I4(r) = %ld\n", V_I4(&r));
memset(&ei, 0, sizeof(ei)); memset(&dp, 0, sizeof(dp)); V_VT(&r) = VT_ERROR; SET_EXPECT(InvokeEx); hres = IDispatchEx_InvokeEx(dispex, wt_test_id, 0x100, DISPATCH_METHOD, &dp, &r, &ei, (void*)0xdeadbeef); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); CHECK_CALLED(InvokeEx); ok(V_VT(&r) == VT_BOOL, "V_VT(r) = %d\n", V_VT(&r)); - ok(V_BOOL(&r) == VARIANT_TRUE, "V_I4(r) = %d\n", V_I4(&r)); + ok(V_BOOL(&r) == VARIANT_TRUE, "V_I4(r) = %ld\n", V_I4(&r));
memset(&ei, 0, sizeof(ei)); memset(&dp, 0, sizeof(dp)); @@ -938,10 +938,10 @@ static void test_create_object(void) dp.rgvarg = &v; SET_EXPECT(InvokeEx_get_gsProp); hres = IDispatchEx_InvokeEx(dispex, wt_gsprop_id, 0, DISPATCH_PROPERTYGET|DISPATCH_METHOD, &dp, &r, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); CHECK_CALLED(InvokeEx_get_gsProp); ok(V_VT(&r) == VT_BOOL, "V_VT(r) = %d\n", V_VT(&r)); - ok(V_BOOL(&r) == VARIANT_TRUE, "V_I4(r) = %d\n", V_I4(&r)); + ok(V_BOOL(&r) == VARIANT_TRUE, "V_I4(r) = %ld\n", V_I4(&r));
memset(&ei, 0, sizeof(ei)); memset(&dp, 0, sizeof(dp)); @@ -954,19 +954,19 @@ static void test_create_object(void) dp.cNamedArgs = 1; SET_EXPECT(InvokeEx_put_gsProp); hres = IDispatchEx_InvokeEx(dispex, wt_gsprop_id, 0, DISPATCH_PROPERTYPUT, &dp, &r, &ei, NULL); - ok(hres == S_OK, "InvokeEx failed: %08x\n", hres); + ok(hres == S_OK, "InvokeEx failed: %08lx\n", hres); CHECK_CALLED(InvokeEx_put_gsProp); ok(V_VT(&r) == VT_BOOL, "V_VT(r) = %d\n", V_VT(&r)); - ok(V_BOOL(&r) == VARIANT_FALSE, "V_I4(r) = %d\n", V_I4(&r)); + ok(V_BOOL(&r) == VARIANT_FALSE, "V_I4(r) = %ld\n", V_I4(&r));
hres = IDispatchEx_InvokeEx(dispex, wt_test_id, 0x100, DISPATCH_PROPERTYGET, &dp, &r, &ei, (void*)0xdeadbeef); - ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx returned: %08x\n", hres); + ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx returned: %08lx\n", hres);
hres = IDispatchEx_InvokeEx(dispex, 0xdeadbeef, 0, DISPATCH_METHOD, &dp, &r, &ei, (void*)0xdeadbeef); - ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx returned: %08x\n", hres); + ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx returned: %08lx\n", hres);
hres = IDispatchEx_InvokeEx(dispex, DISPID_VALUE, 0, DISPATCH_METHOD, &dp, &r, &ei, (void*)0xdeadbeef); - ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx returned: %08x\n", hres); + ok(hres == DISP_E_MEMBERNOTFOUND, "InvokeEx returned: %08lx\n", hres);
IDispatchEx_Release(dispex);
@@ -993,7 +993,7 @@ static void test_create_object(void) SET_EXPECT(SetScriptState_STARTED); SET_EXPECT(ParseScriptText); hres = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "Could not create scriptlet instance: %08x\n", hres); + ok(hres == S_OK, "Could not create scriptlet instance: %08lx\n", hres); CHECK_CALLED(Clone); CHECK_CALLED(CreateInstance); CHECK_CALLED(QI_IActiveScriptParse); @@ -1029,7 +1029,7 @@ static void test_create_object(void) SET_EXPECT(GetDispID_put_gsProp); SET_EXPECT(SetScriptState_STARTED); hres = IClassFactory_CreateInstance(cf, NULL, &IID_IUnknown, (void**)&unk); - ok(hres == S_OK, "Could not create scriptlet instance: %08x\n", hres); + ok(hres == S_OK, "Could not create scriptlet instance: %08lx\n", hres); CHECK_CALLED(Clone); CHECK_CALLED(QI_IActiveScriptParse); CHECK_CALLED(SetScriptSite); @@ -1061,7 +1061,7 @@ START_TEST(scrobj) HRESULT hres;
hres = CoInitialize(NULL); - ok(hres == S_OK, "CoInitialize failed: %08x\n", hres); + ok(hres == S_OK, "CoInitialize failed: %08lx\n", hres);
scrobj_module = LoadLibraryA("scrobj.dll"); ok(scrobj_module != NULL, "Could not load scrobj.dll\n");
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/secur32/tests/Makefile.in | 1 dlls/secur32/tests/main.c | 12 +- dlls/secur32/tests/negotiate.c | 46 +++--- dlls/secur32/tests/ntlm.c | 46 +++--- dlls/secur32/tests/schannel.c | 286 ++++++++++++++++++++-------------------- dlls/secur32/tests/secur32.c | 86 ++++++------ 6 files changed, 238 insertions(+), 239 deletions(-)
diff --git a/dlls/secur32/tests/Makefile.in b/dlls/secur32/tests/Makefile.in index c659759c8cb..089d1c3117b 100644 --- a/dlls/secur32/tests/Makefile.in +++ b/dlls/secur32/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = secur32.dll IMPORTS = secur32 crypt32 advapi32 ws2_32
diff --git a/dlls/secur32/tests/main.c b/dlls/secur32/tests/main.c index 122cc245405..36ed02ab467 100644 --- a/dlls/secur32/tests/main.c +++ b/dlls/secur32/tests/main.c @@ -98,7 +98,7 @@ static const char* getSecError(SECURITY_STATUS status) _SEC_ERR(SEC_E_NO_CREDENTIALS); _SEC_ERR(SEC_E_OUT_OF_SEQUENCE); default: - sprintf(buf, "%08x\n", status); + sprintf(buf, "%08lx\n", status); return buf; } #undef _SEC_ERR @@ -140,27 +140,27 @@ static void testEnumerateSecurityPackages(void) sec_status = pEnumerateSecurityPackagesA(&num_packages, &pkg_info);
ok(sec_status == SEC_E_OK, - "EnumerateSecurityPackages() should return %d, not %08x\n", + "EnumerateSecurityPackages() should return %ld, not %08lx\n", SEC_E_OK, sec_status);
if (num_packages == 0) { todo_wine - ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n", + ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %ld\n", num_packages); skip("no sec packages to check\n"); return; } else - ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %d\n", + ok(num_packages > 0, "Number of sec packages should be > 0 ,but is %ld\n", num_packages);
ok(pkg_info != NULL, "pkg_info should not be NULL after EnumerateSecurityPackages\n");
- trace("Number of packages: %d\n", num_packages); + trace("Number of packages: %ld\n", num_packages); for(i = 0; i < num_packages; ++i){ - trace("%d: Package "%s"\n", i, pkg_info[i].Name); + trace("%ld: Package "%s"\n", i, pkg_info[i].Name); trace("Supported flags:\n"); #define X(flag) \ if(pkg_info[i].fCapabilities & flag) \ diff --git a/dlls/secur32/tests/negotiate.c b/dlls/secur32/tests/negotiate.c index 5e5beed7f77..22a0e7793df 100644 --- a/dlls/secur32/tests/negotiate.c +++ b/dlls/secur32/tests/negotiate.c @@ -120,14 +120,14 @@ static SECURITY_STATUS setup_client( struct sspi_data *data, SEC_CHAR *provider trace( "setting up client\n" );
ret = QuerySecurityPackageInfoA( provider, &info ); - ok( ret == SEC_E_OK, "QuerySecurityPackageInfo returned %08x\n", ret ); + ok( ret == SEC_E_OK, "QuerySecurityPackageInfo returned %08lx\n", ret );
setup_buffers( data, info ); FreeContextBuffer( info );
ret = AcquireCredentialsHandleA( NULL, provider, SECPKG_CRED_OUTBOUND, NULL, data->id, NULL, NULL, &data->cred, &ttl ); - ok( ret == SEC_E_OK, "AcquireCredentialsHandleA returned %08x\n", ret ); + ok( ret == SEC_E_OK, "AcquireCredentialsHandleA returned %08lx\n", ret ); return ret; }
@@ -140,14 +140,14 @@ static SECURITY_STATUS setup_server( struct sspi_data *data, SEC_CHAR *provider trace( "setting up server\n" );
ret = QuerySecurityPackageInfoA( provider, &info ); - ok( ret == SEC_E_OK, "QuerySecurityPackageInfo returned %08x\n", ret ); + ok( ret == SEC_E_OK, "QuerySecurityPackageInfo returned %08lx\n", ret );
setup_buffers( data, info ); FreeContextBuffer( info );
ret = AcquireCredentialsHandleA( NULL, provider, SECPKG_CRED_INBOUND, NULL, NULL, NULL, NULL, &data->cred, &ttl ); - ok( ret == SEC_E_OK, "AcquireCredentialsHandleA returned %08x\n", ret ); + ok( ret == SEC_E_OK, "AcquireCredentialsHandleA returned %08lx\n", ret ); return ret; }
@@ -174,7 +174,7 @@ static SECURITY_STATUS run_client( struct sspi_data *data, BOOL first ) ret = SEC_E_OK; } ok( data->out_buf->pBuffers[0].BufferType == SECBUFFER_TOKEN, - "buffer type changed from SECBUFFER_TOKEN to %u\n", data->out_buf->pBuffers[0].BufferType ); + "buffer type changed from SECBUFFER_TOKEN to %lu\n", data->out_buf->pBuffers[0].BufferType ); ok( data->out_buf->pBuffers[0].cbBuffer < data->max_token, "InitializeSecurityContext didn't change buffer size\n" ); return ret; @@ -237,12 +237,12 @@ static void test_authentication(void) client.id = &id; if ((status = setup_client( &client, (SEC_CHAR *)"Negotiate" ))) { - skip( "setup_client returned %08x, skipping test\n", status ); + skip( "setup_client returned %08lx, skipping test\n", status ); return; } if ((status = setup_server( &server, (SEC_CHAR *)"Negotiate" ))) { - skip( "setup_server returned %08x, skipping test\n", status ); + skip( "setup_server returned %08lx, skipping test\n", status ); FreeCredentialsHandle( &client.cred ); return; } @@ -251,14 +251,14 @@ static void test_authentication(void) { status_c = run_client( &client, first ); ok( status_c == SEC_E_OK || status_c == SEC_I_CONTINUE_NEEDED, - "client returned %08x, more tests will fail\n", status_c ); + "client returned %08lx, more tests will fail\n", status_c );
communicate( &client, &server );
status_s = run_server( &server, first ); ok( status_s == SEC_E_OK || status_s == SEC_I_CONTINUE_NEEDED || status_s == SEC_E_LOGON_DENIED, - "server returned %08x, more tests will fail\n", status_s ); + "server returned %08lx, more tests will fail\n", status_s );
communicate( &server, &client ); trace( "looping\n"); @@ -275,19 +275,19 @@ static void test_authentication(void) sizes.cbSecurityTrailer = 0xdeadbeef; sizes.cbBlockSize = 0xdeadbeef; status_c = QueryContextAttributesA( &client.ctxt, SECPKG_ATTR_SIZES, &sizes ); - ok( status_c == SEC_E_OK, "pQueryContextAttributesA returned %08x\n", status_c ); + ok( status_c == SEC_E_OK, "pQueryContextAttributesA returned %08lx\n", status_c ); ok( sizes.cbMaxToken == 2888 || sizes.cbMaxToken == 1904, - "expected 2888 or 1904, got %u\n", sizes.cbMaxToken ); - ok( sizes.cbMaxSignature == 16, "expected 16, got %u\n", sizes.cbMaxSignature ); - ok( sizes.cbSecurityTrailer == 16, "expected 16, got %u\n", sizes.cbSecurityTrailer ); - ok( !sizes.cbBlockSize, "expected 0, got %u\n", sizes.cbBlockSize ); + "expected 2888 or 1904, got %lu\n", sizes.cbMaxToken ); + ok( sizes.cbMaxSignature == 16, "expected 16, got %lu\n", sizes.cbMaxSignature ); + ok( sizes.cbSecurityTrailer == 16, "expected 16, got %lu\n", sizes.cbSecurityTrailer ); + ok( !sizes.cbBlockSize, "expected 0, got %lu\n", sizes.cbBlockSize );
memset( &info, 0, sizeof(info) ); status_c = QueryContextAttributesA( &client.ctxt, SECPKG_ATTR_NEGOTIATION_INFO, &info ); - ok( status_c == SEC_E_OK, "QueryContextAttributesA returned %08x\n", status_c ); + ok( status_c == SEC_E_OK, "QueryContextAttributesA returned %08lx\n", status_c );
pi = info.PackageInfo; - ok( info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %u\n", info.NegotiationState ); + ok( info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %lu\n", info.NegotiationState ); ok( pi != NULL, "expected non-NULL PackageInfo\n" ); if (pi) { @@ -301,7 +301,7 @@ static void test_authentication(void) pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPLY_LOOPBACK) || pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPLY_LOOPBACK| SECPKG_FLAG_APPCONTAINER_CHECKS), - "got %08x\n", pi->fCapabilities ); + "got %08lx\n", pi->fCapabilities ); ok( pi->wVersion == 1, "got %u\n", pi->wVersion ); ok( pi->wRPCID == RPC_C_AUTHN_WINNT, "got %u\n", pi->wRPCID ); ok( !lstrcmpA( pi->Name, "NTLM" ), "got %s\n", pi->Name ); @@ -314,7 +314,7 @@ static void test_authentication(void) ok( pi->Comment + lstrlenA(pi->Comment) < eob, "Comment doesn't fit into allocated block\n" );
status = FreeContextBuffer( pi ); - ok( status == SEC_E_OK, "FreeContextBuffer error %#x\n", status ); + ok( status == SEC_E_OK, "FreeContextBuffer error %#lx\n", status ); }
done: @@ -324,25 +324,25 @@ done: if (client.ctxt.dwLower || client.ctxt.dwUpper) { status_c = DeleteSecurityContext( &client.ctxt ); - ok( status_c == SEC_E_OK, "DeleteSecurityContext returned %08x\n", status_c ); + ok( status_c == SEC_E_OK, "DeleteSecurityContext returned %08lx\n", status_c ); }
if (server.ctxt.dwLower || server.ctxt.dwUpper) { status_s = DeleteSecurityContext( &server.ctxt ); - ok( status_s == SEC_E_OK, "DeleteSecurityContext returned %08x\n", status_s ); + ok( status_s == SEC_E_OK, "DeleteSecurityContext returned %08lx\n", status_s ); }
if (client.cred.dwLower || client.cred.dwUpper) { status_c = FreeCredentialsHandle( &client.cred ); - ok( status_c == SEC_E_OK, "FreeCredentialsHandle returned %08x\n", status_c ); + ok( status_c == SEC_E_OK, "FreeCredentialsHandle returned %08lx\n", status_c ); }
if (server.cred.dwLower || server.cred.dwUpper) { status_s = FreeCredentialsHandle(&server.cred); - ok( status_s == SEC_E_OK, "FreeCredentialsHandle returned %08x\n", status_s ); + ok( status_s == SEC_E_OK, "FreeCredentialsHandle returned %08lx\n", status_s ); } }
@@ -360,7 +360,7 @@ START_TEST(negotiate) info->fCapabilities == (NEGOTIATE_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS) || info->fCapabilities == (NEGOTIATE_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS| SECPKG_FLAG_APPCONTAINER_CHECKS), - "got %08x\n", info->fCapabilities ); + "got %08lx\n", info->fCapabilities ); ok( info->wVersion == 1, "got %u\n", info->wVersion ); ok( info->wRPCID == RPC_C_AUTHN_GSS_NEGOTIATE, "got %u\n", info->wRPCID ); ok( !lstrcmpA( info->Name, "Negotiate" ), "got %s\n", info->Name ); diff --git a/dlls/secur32/tests/ntlm.c b/dlls/secur32/tests/ntlm.c index 5ed650ffc2d..6665af6bb76 100644 --- a/dlls/secur32/tests/ntlm.c +++ b/dlls/secur32/tests/ntlm.c @@ -233,7 +233,7 @@ static const char* getSecError(SECURITY_STATUS status) _SEC_ERR(SEC_E_OUT_OF_SEQUENCE); _SEC_ERR(SEC_E_MESSAGE_ALTERED); default: - sprintf(buf, "%08x\n", status); + sprintf(buf, "%08lx\n", status); return buf; } #undef _SEC_ERR @@ -476,7 +476,7 @@ static SECURITY_STATUS runClient(SspiData *sspi_data, BOOL first, ULONG data_rep ok(ret == SEC_E_BUFFER_TOO_SMALL, "expected SEC_E_BUFFER_TOO_SMALL, got %s\n", getSecError(ret));
ok(out_buf->pBuffers[0].cbBuffer == 0, - "InitializeSecurityContext set buffer size to %u\n", out_buf->pBuffers[0].cbBuffer); + "InitializeSecurityContext set buffer size to %lu\n", out_buf->pBuffers[0].cbBuffer);
out_buf->pBuffers[0].cbBuffer = sspi_data->max_token; out_buf->pBuffers[0].BufferType = SECBUFFER_DATA; @@ -505,9 +505,9 @@ static SECURITY_STATUS runClient(SspiData *sspi_data, BOOL first, ULONG data_rep }
ok(out_buf->pBuffers[0].BufferType == SECBUFFER_TOKEN, - "buffer type was changed from SECBUFFER_TOKEN to %d\n", out_buf->pBuffers[0].BufferType); + "buffer type was changed from SECBUFFER_TOKEN to %ld\n", out_buf->pBuffers[0].BufferType); ok(out_buf->pBuffers[0].cbBuffer < sspi_data->max_token, - "InitializeSecurityContext set buffer size to %u\n", out_buf->pBuffers[0].cbBuffer); + "InitializeSecurityContext set buffer size to %lu\n", out_buf->pBuffers[0].cbBuffer);
return ret; } @@ -902,24 +902,24 @@ static void testAuth(ULONG data_rep, BOOL fake) "pQueryContextAttributesA(SECPKG_ATTR_SIZES) returned %s\n", getSecError(sec_status)); ok((ctxt_sizes.cbMaxToken == 1904) || (ctxt_sizes.cbMaxToken == 2888), - "cbMaxToken should be 1904 or 2888 but is %u\n", + "cbMaxToken should be 1904 or 2888 but is %lu\n", ctxt_sizes.cbMaxToken); ok(ctxt_sizes.cbMaxSignature == 16, - "cbMaxSignature should be 16 but is %u\n", + "cbMaxSignature should be 16 but is %lu\n", ctxt_sizes.cbMaxSignature); ok(ctxt_sizes.cbSecurityTrailer == 16, - "cbSecurityTrailer should be 16 but is %u\n", + "cbSecurityTrailer should be 16 but is %lu\n", ctxt_sizes.cbSecurityTrailer); ok(ctxt_sizes.cbBlockSize == 0, - "cbBlockSize should be 0 but is %u\n", + "cbBlockSize should be 0 but is %lu\n", ctxt_sizes.cbBlockSize);
memset(&info, 0, sizeof(info)); sec_status = QueryContextAttributesA(&client.ctxt, SECPKG_ATTR_NEGOTIATION_INFO, &info); - ok(sec_status == SEC_E_OK, "QueryContextAttributesA returned %08x\n", sec_status); + ok(sec_status == SEC_E_OK, "QueryContextAttributesA returned %08lx\n", sec_status);
pi = info.PackageInfo; - ok(info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %u\n", info.NegotiationState); + ok(info.NegotiationState == SECPKG_NEGOTIATION_COMPLETE, "got %lu\n", info.NegotiationState); ok(pi != NULL, "expected non-NULL PackageInfo\n"); if (pi) { @@ -933,7 +933,7 @@ static void testAuth(ULONG data_rep, BOOL fake) pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPLY_LOOPBACK) || pi->fCapabilities == (NTLM_BASE_CAPS|SECPKG_FLAG_RESTRICTED_TOKENS|SECPKG_FLAG_APPLY_LOOPBACK| SECPKG_FLAG_APPCONTAINER_CHECKS), - "got %08x\n", pi->fCapabilities); + "got %08lx\n", pi->fCapabilities); ok(pi->wVersion == 1, "got %u\n", pi->wVersion); ok(pi->wRPCID == RPC_C_AUTHN_WINNT, "got %u\n", pi->wRPCID); ok(!lstrcmpA( pi->Name, "NTLM" ), "got %s\n", pi->Name); @@ -946,7 +946,7 @@ static void testAuth(ULONG data_rep, BOOL fake) ok(pi->Comment + lstrlenA(pi->Comment) < eob, "Comment doesn't fit into allocated block\n");
sec_status = FreeContextBuffer(pi); - ok(sec_status == SEC_E_OK, "FreeContextBuffer error %#x\n", sec_status); + ok(sec_status == SEC_E_OK, "FreeContextBuffer error %#lx\n", sec_status); }
tAuthend: @@ -1108,13 +1108,13 @@ static void testSignSeal(void) ok(sec_status == SEC_E_MESSAGE_ALTERED, "VerifySignature returned %s, not SEC_E_MESSAGE_ALTERED.\n", getSecError(sec_status)); - ok(qop == 0xdeadbeef, "qop changed to %u\n", qop); + ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop);
memcpy(data[0].pvBuffer, message_signature, data[0].cbBuffer); sec_status = pVerifySignature(&client.ctxt, &crypt, 0, &qop); ok(sec_status == SEC_E_OK, "VerifySignature returned %s, not SEC_E_OK.\n", getSecError(sec_status)); - ok(qop == 0xdeadbeef, "qop changed to %u\n", qop); + ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop);
sec_status = pEncryptMessage(&client.ctxt, 0, &crypt, 0); if (sec_status == SEC_E_UNSUPPORTED_FUNCTION) @@ -1161,7 +1161,7 @@ static void testSignSeal(void) ok(!memcmp(crypt.pBuffers[1].pvBuffer, message_binary, crypt.pBuffers[1].cbBuffer), "Failed to decrypt message correctly.\n"); - ok(qop == 0xdeadbeef, "qop changed to %u\n", qop); + ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop); } else trace( "A different session key is being used\n" );
@@ -1199,7 +1199,7 @@ static void testSignSeal(void) sec_status = pVerifySignature(&client.ctxt, &crypt, 0, &qop); ok(sec_status == SEC_E_OK, "VerifySignature returned %s, not SEC_E_OK\n", getSecError(sec_status)); - ok(qop == 0xdeadbeef, "qop changed to %u\n", qop); + ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop);
sec_status = pEncryptMessage(&client.ctxt, 0, &crypt, 0); ok(sec_status == SEC_E_OK, "EncryptMessage returned %s, not SEC_E_OK.\n", @@ -1231,7 +1231,7 @@ static void testSignSeal(void) sec_status = pDecryptMessage(&client.ctxt, &crypt, 0, &qop); ok(sec_status == SEC_E_OK, "DecryptMessage returned %s, not SEC_E_OK.\n", getSecError(sec_status)); - ok(qop == 0xdeadbeef, "qop changed to %u\n", qop); + ok(qop == 0xdeadbeef, "qop changed to %lu\n", qop);
end: @@ -1444,19 +1444,19 @@ static void test_cred_multiple_use(void) ret = pInitializeSecurityContextA(&cred, NULL, NULL, ISC_REQ_CONNECTION, 0, SECURITY_NETWORK_DREP, NULL, 0, &ctxt1, &buffer_desc, &ctxt_attr, &ttl); - ok(ret == SEC_I_CONTINUE_NEEDED, "InitializeSecurityContextA failed with error 0x%x\n", ret); + ok(ret == SEC_I_CONTINUE_NEEDED, "InitializeSecurityContextA failed with error 0x%lx\n", ret);
ret = pInitializeSecurityContextA(&cred, NULL, NULL, ISC_REQ_CONNECTION, 0, SECURITY_NETWORK_DREP, NULL, 0, &ctxt2, &buffer_desc, &ctxt_attr, &ttl); - ok(ret == SEC_I_CONTINUE_NEEDED, "Second InitializeSecurityContextA on cred handle failed with error 0x%x\n", ret); + ok(ret == SEC_I_CONTINUE_NEEDED, "Second InitializeSecurityContextA on cred handle failed with error 0x%lx\n", ret);
ret = pDeleteSecurityContext(&ctxt1); - ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%x\n", ret); + ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%lx\n", ret); ret = pDeleteSecurityContext(&ctxt2); - ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%x\n", ret); + ok(ret == SEC_E_OK, "DeleteSecurityContext failed with error 0x%lx\n", ret); ret = pFreeCredentialsHandle(&cred); - ok(ret == SEC_E_OK, "FreeCredentialsHandle failed with error 0x%x\n", ret); + ok(ret == SEC_E_OK, "FreeCredentialsHandle failed with error 0x%lx\n", ret);
HeapFree(GetProcessHeap(), 0, buffers[0].pvBuffer); } @@ -1494,7 +1494,7 @@ static void test_null_auth_data(void)
size = sizeof(user); ret = pGetUserNameExA(NameSamCompatible, user, &size); - ok(ret, "GetUserNameExA failed %u\n", GetLastError()); + ok(ret, "GetUserNameExA failed %lu\n", GetLastError());
status = pInitializeSecurityContextA(&cred, NULL, (SEC_CHAR *)user, ISC_REQ_CONNECTION, 0, SECURITY_NETWORK_DREP, diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c index 028e1e933dc..1cf751a3198 100644 --- a/dlls/secur32/tests/schannel.c +++ b/dlls/secur32/tests/schannel.c @@ -177,10 +177,10 @@ static void test_strength(PCredHandle handle) SECURITY_STATUS st;
st = QueryCredentialsAttributesA(handle, SECPKG_ATTR_CIPHER_STRENGTHS, &strength); - ok(st == SEC_E_OK, "QueryCredentialsAttributesA failed: %u\n", GetLastError()); + ok(st == SEC_E_OK, "QueryCredentialsAttributesA failed: %lu\n", GetLastError()); ok(strength.dwMinimumCipherStrength, "dwMinimumCipherStrength not changed\n"); ok(strength.dwMaximumCipherStrength, "dwMaximumCipherStrength not changed\n"); - trace("strength %d - %d\n", strength.dwMinimumCipherStrength, strength.dwMaximumCipherStrength); + trace("strength %ld - %ld\n", strength.dwMinimumCipherStrength, strength.dwMaximumCipherStrength); }
static void test_supported_protocols(CredHandle *handle, unsigned exprots) @@ -189,10 +189,10 @@ static void test_supported_protocols(CredHandle *handle, unsigned exprots) SECURITY_STATUS status;
status = QueryCredentialsAttributesA(handle, SECPKG_ATTR_SUPPORTED_PROTOCOLS, &protocols); - ok(status == SEC_E_OK, "QueryCredentialsAttributes failed: %08x\n", status); + ok(status == SEC_E_OK, "QueryCredentialsAttributes failed: %08lx\n", status);
if(exprots) - ok(protocols.grbitProtocol == exprots, "protocols.grbitProtocol = %x, expected %x\n", protocols.grbitProtocol, exprots); + ok(protocols.grbitProtocol == exprots, "protocols.grbitProtocol = %lx, expected %x\n", protocols.grbitProtocol, exprots);
trace("Supported protocols:\n");
@@ -208,7 +208,7 @@ static void test_supported_protocols(CredHandle *handle, unsigned exprots) #undef X
if(protocols.grbitProtocol) - trace("Unknown flags: %x\n", protocols.grbitProtocol); + trace("Unknown flags: %lx\n", protocols.grbitProtocol); }
static void test_supported_algs(CredHandle *handle) @@ -218,11 +218,11 @@ static void test_supported_algs(CredHandle *handle) unsigned i;
status = QueryCredentialsAttributesA(handle, SECPKG_ATTR_SUPPORTED_ALGS, &algs); - todo_wine ok(status == SEC_E_OK, "QueryCredentialsAttributes failed: %08x\n", status); + todo_wine ok(status == SEC_E_OK, "QueryCredentialsAttributes failed: %08lx\n", status); if(status != SEC_E_OK) return;
- trace("Supported algorithms (%d):\n", algs.cSupportedAlgs); + trace("Supported algorithms (%ld):\n", algs.cSupportedAlgs); for(i=0; i < algs.cSupportedAlgs; i++) trace(" %s\n", algid_to_str(algs.palgSupportedAlgs[i]));
@@ -237,16 +237,16 @@ static void test_cread_attrs(void)
status = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, NULL, NULL, NULL, &cred, NULL); - ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %x\n", status); + ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %lx\n", status);
test_supported_protocols(&cred, 0); test_supported_algs(&cred);
status = QueryCredentialsAttributesA(&cred, SECPKG_ATTR_SUPPORTED_PROTOCOLS, NULL); - ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08x, expected SEC_E_INTERNAL_ERROR\n", status); + ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08lx, expected SEC_E_INTERNAL_ERROR\n", status);
status = QueryCredentialsAttributesA(&cred, SECPKG_ATTR_SUPPORTED_ALGS, NULL); - ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08x, expected SEC_E_INTERNAL_ERROR\n", status); + ok(status == SEC_E_INTERNAL_ERROR, "QueryCredentialsAttributes failed: %08lx, expected SEC_E_INTERNAL_ERROR\n", status);
FreeCredentialsHandle(&cred);
@@ -254,7 +254,7 @@ static void test_cread_attrs(void) schannel_cred.grbitEnabledProtocols = SP_PROT_TLS1_CLIENT; status = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schannel_cred, NULL, NULL, &cred, NULL); - ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %x\n", status); + ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %lx\n", status);
test_supported_protocols(&cred, SP_PROT_TLS1_CLIENT); test_supported_algs(&cred); @@ -324,22 +324,22 @@ static void testAcquireSecurityContext(void) st = AcquireCredentialsHandleA(NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); ok(st == SEC_E_SECPKG_NOT_FOUND, - "Expected SEC_E_SECPKG_NOT_FOUND, got %08x\n", st); + "Expected SEC_E_SECPKG_NOT_FOUND, got %08lx\n", st); if (0) { /* Crashes on Win2K */ st = AcquireCredentialsHandleA(NULL, unisp_name_a, 0, NULL, NULL, NULL, NULL, NULL, NULL); - ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", st); + ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n", st);
/* Crashes on WinNT */ st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_BOTH, NULL, NULL, NULL, NULL, NULL, NULL); - ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", st); + ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n", st);
st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, NULL, NULL, NULL, NULL, NULL); - ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08x\n", st); + ok(st == SEC_E_NO_CREDENTIALS, "Expected SEC_E_NO_CREDENTIALS, got %08lx\n", st);
/* Crashes */ AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, @@ -347,18 +347,18 @@ static void testAcquireSecurityContext(void) } st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, NULL, NULL, NULL, &cred, NULL); - ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); + ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st); if(st == SEC_E_OK) FreeCredentialsHandle(&cred); memset(&cred, 0, sizeof(cred)); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, NULL, NULL, NULL, &cred, &exp); - ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); + ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st); /* expriy is indeterminate in win2k3 */ - trace("expiry: %08x%08x\n", exp.HighPart, exp.LowPart); + trace("expiry: %08lx%08lx\n", exp.HighPart, exp.LowPart);
st = QueryCredentialsAttributesA(&cred, SECPKG_CRED_ATTR_NAMES, &names); - ok(st == SEC_E_NO_CREDENTIALS || st == SEC_E_UNSUPPORTED_FUNCTION /* before Vista */, "expected SEC_E_NO_CREDENTIALS, got %08x\n", st); + ok(st == SEC_E_NO_CREDENTIALS || st == SEC_E_UNSUPPORTED_FUNCTION /* before Vista */, "expected SEC_E_NO_CREDENTIALS, got %08lx\n", st);
FreeCredentialsHandle(&cred);
@@ -368,25 +368,25 @@ static void testAcquireSecurityContext(void) NULL, &schanCred, NULL, NULL, NULL, NULL); ok(st == SEC_E_INTERNAL_ERROR || st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */ || - st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st); + st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, NULL, NULL); ok(st == SEC_E_INTERNAL_ERROR || st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */ || - st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st); + st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st);
/* No cert in SCHANNEL_CRED succeeds for outbound.. */ schanCred.dwVersion = SCHANNEL_CRED_VERSION; st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); + ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st); FreeCredentialsHandle(&cred); /* but fails for inbound. */ st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_NO_CREDENTIALS || st == SEC_E_OK /* Vista/win2k8 */, - "Expected SEC_E_NO_CREDENTIALS or SEC_E_OK, got %08x\n", st); + "Expected SEC_E_NO_CREDENTIALS or SEC_E_OK, got %08lx\n", st);
if (0) { @@ -405,12 +405,12 @@ static void testAcquireSecurityContext(void) NULL, &schanCred, NULL, NULL, NULL, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS || - st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st); + st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, NULL, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS || - st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st); + st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st);
/* Good cert, but missing private key. Windows fails with * SEC_E_NO_CREDENTIALS, but I'll accept SEC_E_UNKNOWN_CREDENTIALS too. @@ -422,37 +422,37 @@ static void testAcquireSecurityContext(void) ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS || st == SEC_E_INTERNAL_ERROR, /* win2k */ "Expected SEC_E_UNKNOWN_CREDENTIALS, SEC_E_NO_CREDENTIALS " - "or SEC_E_INTERNAL_ERROR, got %08x\n", st); + "or SEC_E_INTERNAL_ERROR, got %08lx\n", st); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, NULL, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS || st == SEC_E_INTERNAL_ERROR, /* win2k */ "Expected SEC_E_UNKNOWN_CREDENTIALS, SEC_E_NO_CREDENTIALS " - "or SEC_E_INTERNAL_ERROR, got %08x\n", st); + "or SEC_E_INTERNAL_ERROR, got %08lx\n", st);
/* Good cert, with CRYPT_KEY_PROV_INFO set before it's had a key loaded. */ ret = CertSetCertificateContextProperty(certs[1], CERT_KEY_PROV_INFO_PROP_ID, 0, &keyProvInfo); schanCred.dwVersion = SCH_CRED_V3; - ok(ret, "CertSetCertificateContextProperty failed: %08x\n", GetLastError()); + ok(ret, "CertSetCertificateContextProperty failed: %08lx\n", GetLastError()); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_INTERNAL_ERROR /* WinNT */ || st == SEC_E_INSUFFICIENT_MEMORY /* win10 */, - "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_INTERNAL_ERROR, got %08x\n", st); + "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_INTERNAL_ERROR, got %08lx\n", st); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_INTERNAL_ERROR /* WinNT */ || st == SEC_E_INSUFFICIENT_MEMORY /* win10 */, - "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_INTERNAL_ERROR, got %08x\n", st); + "Expected SEC_E_UNKNOWN_CREDENTIALS or SEC_E_INTERNAL_ERROR, got %08lx\n", st);
ret = CryptAcquireContextW(&csp, cspNameW, MS_DEF_PROV_W, PROV_RSA_FULL, CRYPT_NEWKEYSET); - ok(ret, "CryptAcquireContextW failed: %08x\n", GetLastError()); + ok(ret, "CryptAcquireContextW failed: %08lx\n", GetLastError()); ret = 0;
ret = CryptImportKey(csp, privKey, sizeof(privKey), 0, 0, &key); - ok(ret, "CryptImportKey failed: %08x\n", GetLastError()); + ok(ret, "CryptImportKey failed: %08lx\n", GetLastError()); if (ret) { PCCERT_CONTEXT tmp; @@ -470,23 +470,23 @@ static void testAcquireSecurityContext(void) NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_INTERNAL_ERROR || st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_INTERNAL_ERROR || st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st); schanCred.dwVersion = SCH_CRED_V2; st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_INTERNAL_ERROR || st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_INTERNAL_ERROR || st == SEC_E_UNKNOWN_CREDENTIALS /* Vista/win2k8 */, - "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); + "Expected SEC_E_INTERNAL_ERROR or SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st); }
/* Succeeds on V3 or higher */ @@ -494,24 +494,24 @@ static void testAcquireSecurityContext(void) st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_OK || st == SEC_E_INSUFFICIENT_MEMORY /* win10 */, - "AcquireCredentialsHandleA failed: %08x\n", st); + "AcquireCredentialsHandleA failed: %08lx\n", st); FreeCredentialsHandle(&cred); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_OK || st == SEC_E_UNKNOWN_CREDENTIALS /* win2k3 */ || st == SEC_E_INSUFFICIENT_MEMORY /* win10 */, - "AcquireCredentialsHandleA failed: %08x\n", st); + "AcquireCredentialsHandleA failed: %08lx\n", st); FreeCredentialsHandle(&cred); schanCred.dwVersion = SCHANNEL_CRED_VERSION; st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_OUTBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); - ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", st); + ok(st == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", st); FreeCredentialsHandle(&cred); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_OK || st == SEC_E_UNKNOWN_CREDENTIALS, /* win2k3 */ - "AcquireCredentialsHandleA failed: %08x\n", st); + "AcquireCredentialsHandleA failed: %08lx\n", st); if (st == SEC_E_OK) test_strength(&cred); FreeCredentialsHandle(&cred);
@@ -522,12 +522,12 @@ static void testAcquireSecurityContext(void) NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS /* Vista/win2k8 */ || - st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st); + st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS || - st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st); + st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st); tmp = certs[0]; certs[0] = certs[1]; certs[1] = tmp; @@ -535,11 +535,11 @@ static void testAcquireSecurityContext(void) NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS || - st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08x\n", st); + st == SEC_E_INVALID_TOKEN /* WinNT */, "st = %08lx\n", st); st = AcquireCredentialsHandleA(NULL, unisp_name_a, SECPKG_CRED_INBOUND, NULL, &schanCred, NULL, NULL, &cred, NULL); ok(st == SEC_E_UNKNOWN_CREDENTIALS || st == SEC_E_NO_CREDENTIALS, - "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08x\n", st); + "Expected SEC_E_UNKNOWN_CREDENTIALS, got %08lx\n", st); /* FIXME: what about two valid certs? */
CryptDestroyKey(key); @@ -667,7 +667,7 @@ static void test_context_output_buffer_size(DWORD protocol, DWORD flags, ULONG c cred.dwFlags = flags; status = AcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME_A, SECPKG_CRED_OUTBOUND, NULL, &cred, NULL, NULL, &cred_handle, NULL); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status ); if (status != SEC_E_OK) return;
init_buffers(&out_buffers, 4, buf_size); @@ -684,13 +684,13 @@ static void test_context_output_buffer_size(DWORD protocol, DWORD flags, ULONG c buffer->cbBuffer = 0; status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ctxt_flags_req, 0, 0, &in_buffers, 0, &context, &out_buffers, &attrs, NULL); - ok(status == SEC_E_INSUFFICIENT_MEMORY, "%d: Expected SEC_E_INSUFFICIENT_MEMORY, got %08x\n", i, status); + ok(status == SEC_E_INSUFFICIENT_MEMORY, "%d: Expected SEC_E_INSUFFICIENT_MEMORY, got %08lx\n", i, status);
if (i) init_sec_buffer(&out_buffers.pBuffers[0], buf_size, NULL); init_sec_buffer(buffer, 0, NULL); status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ctxt_flags_req | ISC_REQ_ALLOCATE_MEMORY, 0, 0, &in_buffers, 0, &context, &out_buffers, &attrs, NULL); - ok(status == SEC_I_CONTINUE_NEEDED, "%d: Expected SEC_I_CONTINUE_NEEDED, got %08x\n", i, status); + ok(status == SEC_I_CONTINUE_NEEDED, "%d: Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", i, status); if (i) FreeContextBuffer(out_buffers.pBuffers[0].pvBuffer); FreeContextBuffer(buffer->pvBuffer); DeleteSecurityContext(&context); @@ -699,7 +699,7 @@ static void test_context_output_buffer_size(DWORD protocol, DWORD flags, ULONG c init_sec_buffer(buffer, buf_size, !i ? buf : buf2); status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ctxt_flags_req, 0, 0, &in_buffers, 0, &context, &out_buffers, &attrs, NULL); - ok(status == SEC_I_CONTINUE_NEEDED, "%d: Expected SEC_I_CONTINUE_NEEDED, got %08x\n", i, status); + ok(status == SEC_I_CONTINUE_NEEDED, "%d: Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", i, status); if (i) ok(!buffer->cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty\n"); DeleteSecurityContext(&context); } @@ -726,13 +726,13 @@ static void test_InitializeSecurityContext(void) cred.dwFlags = SCH_CRED_NO_DEFAULT_CREDS|SCH_CRED_MANUAL_CRED_VALIDATION; status = AcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME_A, SECPKG_CRED_OUTBOUND, NULL, &cred, NULL, NULL, &cred_handle, NULL); - ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", status); + ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", status); if (status != SEC_E_OK) return;
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM|ISC_REQ_ALLOCATE_MEMORY, 0, 0, &in_buffers, 0, &context, &out_buffers, &attrs, NULL); - ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status); + ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status);
FreeContextBuffer(out_buffer.pvBuffer); DeleteSecurityContext(&context); @@ -1054,7 +1054,7 @@ static void test_communication(void)
status = AcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME_A, SECPKG_CRED_OUTBOUND, NULL, &cred, NULL, NULL, &cred_handle, NULL); - ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", status); + ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", status); if (status != SEC_E_OK) return;
/* Initialize the connection */ @@ -1065,7 +1065,7 @@ static void test_communication(void) status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, NULL, 0, &context, &buffers[0], &attrs, NULL); - ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status); + ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status);
buffers[1].cBuffers = 1; buffers[1].pBuffers[0].BufferType = SECBUFFER_TOKEN; @@ -1075,7 +1075,7 @@ static void test_communication(void) ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL); todo_wine - ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status); + ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status); todo_wine ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
@@ -1086,7 +1086,7 @@ static void test_communication(void) status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL); - ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status); + ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status); ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
buffers[0].pBuffers[0].cbBuffer = 0; @@ -1094,19 +1094,19 @@ static void test_communication(void) ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL); ok(status == SEC_E_INSUFFICIENT_MEMORY || status == SEC_E_INVALID_TOKEN, - "Expected SEC_E_INSUFFICIENT_MEMORY or SEC_E_INVALID_TOKEN, got %08x\n", status); + "Expected SEC_E_INSUFFICIENT_MEMORY or SEC_E_INVALID_TOKEN, got %08lx\n", status); ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, NULL, 0, &context, NULL, &attrs, NULL); - ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status); + ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
buffers[0].pBuffers[0].cbBuffer = buf_size; status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, NULL, 0, &context, &buffers[0], &attrs, NULL); - ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status); + ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status);
buf = &buffers[0].pBuffers[0]; send(sock, buf->pvBuffer, buf->cbBuffer, 0); @@ -1116,7 +1116,7 @@ static void test_communication(void) status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, NULL, 0, &context2, &buffers[0], &attrs, NULL); - ok(status == SEC_E_INCOMPLETE_MESSAGE, "Got unexpected status %#x.\n", status); + ok(status == SEC_E_INCOMPLETE_MESSAGE, "Got unexpected status %#lx.\n", status); ok(buffers[0].pBuffers[0].cbBuffer == buf_size, "Output buffer size changed.\n"); ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_TOKEN, "Output buffer type changed.\n"); ok( context2.dwLower == 0xdeadbeef, "Did not expect dwLower to be set on new context\n"); @@ -1128,7 +1128,7 @@ static void test_communication(void) status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL); - ok(status == SEC_E_INCOMPLETE_MESSAGE, "Got unexpected status %#x.\n", status); + ok(status == SEC_E_INCOMPLETE_MESSAGE, "Got unexpected status %#lx.\n", status); ok(buffers[0].pBuffers[0].cbBuffer == buf_size, "Output buffer size changed.\n"); ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_TOKEN, "Output buffer type changed.\n");
@@ -1143,7 +1143,7 @@ static void test_communication(void) ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL); ok(status == SEC_E_INCOMPLETE_MESSAGE || status == SEC_E_INVALID_TOKEN, - "Got unexpected status %#x.\n", status); + "Got unexpected status %#lx.\n", status); ok(buffers[0].pBuffers[0].cbBuffer == buf_size, "Output buffer size changed.\n"); ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_TOKEN, "Output buffer type changed.\n");
@@ -1153,7 +1153,7 @@ static void test_communication(void) ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, &buffers[1], 0, &context2, &buffers[0], &attrs, NULL); ok(status == SEC_E_INCOMPLETE_MESSAGE || status == SEC_E_INVALID_TOKEN, - "Got unexpected status %#x.\n", status); + "Got unexpected status %#lx.\n", status); ok(buffers[0].pBuffers[0].cbBuffer == buf_size, "Output buffer size changed.\n"); ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_TOKEN, "Output buffer type changed.\n"); ok( context2.dwLower == 0xdeadbeef, "Did not expect dwLower to be set on new context\n"); @@ -1170,8 +1170,8 @@ static void test_communication(void) send(sock, buf->pvBuffer, buf->cbBuffer, 0); buf->cbBuffer = buf_size;
- ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#lx, got %#lx\n", context.dwLower, context2.dwLower); - ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#lx, got %#lx\n", context.dwUpper, context2.dwUpper); + ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#Ix, got %#Ix\n", context.dwLower, context2.dwLower); + ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#Ix, got %#Ix\n", context.dwUpper, context2.dwUpper);
buf = &buffers[1].pBuffers[0]; ret = receive_data(sock, buf); @@ -1189,19 +1189,19 @@ static void test_communication(void)
ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n"); ok(status == SEC_E_OK || broken(status == SEC_E_ILLEGAL_MESSAGE) /* winxp */, - "InitializeSecurityContext failed: %08x\n", status); + "InitializeSecurityContext failed: %08lx\n", status); if(status != SEC_E_OK) { skip("Handshake failed\n"); return; } ok(attrs == (ISC_RET_REPLAY_DETECT|ISC_RET_SEQUENCE_DETECT|ISC_RET_CONFIDENTIALITY|ISC_RET_STREAM|ISC_RET_USED_SUPPLIED_CREDS), - "got %08x\n", attrs); + "got %08lx\n", attrs);
status = QueryCredentialsAttributesA(&cred_handle, SECPKG_CRED_ATTR_NAMES, &names); - ok(status == SEC_E_NO_CREDENTIALS || status == SEC_E_UNSUPPORTED_FUNCTION /* before Vista */, "expected SEC_E_NO_CREDENTIALS, got %08x\n", status); + ok(status == SEC_E_NO_CREDENTIALS || status == SEC_E_UNSUPPORTED_FUNCTION /* before Vista */, "expected SEC_E_NO_CREDENTIALS, got %08lx\n", status);
status = pQueryContextAttributesA(&context, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (void*)&cert); - ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_REMOTE_CERT_CONTEXT) failed: %08x\n", status); + ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_REMOTE_CERT_CONTEXT) failed: %08lx\n", status); if(status == SEC_E_OK) { SecPkgContext_Bindings bindings = {0xdeadbeef, (void*)0xdeadbeef};
@@ -1209,7 +1209,7 @@ static void test_communication(void)
status = pQueryContextAttributesA(&context, SECPKG_ATTR_ENDPOINT_BINDINGS, &bindings); ok(status == SEC_E_OK || broken(status == SEC_E_UNSUPPORTED_FUNCTION), - "QueryContextAttributesW(SECPKG_ATTR_ENDPOINT_BINDINGS) failed: %08x\n", status); + "QueryContextAttributesW(SECPKG_ATTR_ENDPOINT_BINDINGS) failed: %08lx\n", status); if(status == SEC_E_OK) { static const char prefix[] = "tls-server-end-point:"; const char *p; @@ -1217,17 +1217,17 @@ static void test_communication(void) DWORD hash_size;
ok(bindings.BindingsLength == sizeof(*bindings.Bindings) + sizeof(prefix)-1 + 32 /* hash size */, - "bindings.BindingsLength = %u\n", bindings.BindingsLength); - ok(!bindings.Bindings->dwInitiatorAddrType, "dwInitiatorAddrType = %x\n", bindings.Bindings->dwInitiatorAddrType); - ok(!bindings.Bindings->cbInitiatorLength, "cbInitiatorLength = %x\n", bindings.Bindings->cbInitiatorLength); - ok(!bindings.Bindings->dwInitiatorOffset, "dwInitiatorOffset = %x\n", bindings.Bindings->dwInitiatorOffset); - ok(!bindings.Bindings->dwAcceptorAddrType, "dwAcceptorAddrType = %x\n", bindings.Bindings->dwAcceptorAddrType); - ok(!bindings.Bindings->cbAcceptorLength, "cbAcceptorLength = %x\n", bindings.Bindings->cbAcceptorLength); - ok(!bindings.Bindings->dwAcceptorOffset, "dwAcceptorOffset = %x\n", bindings.Bindings->dwAcceptorOffset); + "bindings.BindingsLength = %lu\n", bindings.BindingsLength); + ok(!bindings.Bindings->dwInitiatorAddrType, "dwInitiatorAddrType = %lx\n", bindings.Bindings->dwInitiatorAddrType); + ok(!bindings.Bindings->cbInitiatorLength, "cbInitiatorLength = %lx\n", bindings.Bindings->cbInitiatorLength); + ok(!bindings.Bindings->dwInitiatorOffset, "dwInitiatorOffset = %lx\n", bindings.Bindings->dwInitiatorOffset); + ok(!bindings.Bindings->dwAcceptorAddrType, "dwAcceptorAddrType = %lx\n", bindings.Bindings->dwAcceptorAddrType); + ok(!bindings.Bindings->cbAcceptorLength, "cbAcceptorLength = %lx\n", bindings.Bindings->cbAcceptorLength); + ok(!bindings.Bindings->dwAcceptorOffset, "dwAcceptorOffset = %lx\n", bindings.Bindings->dwAcceptorOffset); ok(sizeof(*bindings.Bindings) + bindings.Bindings->cbApplicationDataLength == bindings.BindingsLength, - "cbApplicationDataLength = %x\n", bindings.Bindings->cbApplicationDataLength); + "cbApplicationDataLength = %lx\n", bindings.Bindings->cbApplicationDataLength); ok(bindings.Bindings->dwApplicationDataOffset == sizeof(*bindings.Bindings), - "dwApplicationDataOffset = %x\n", bindings.Bindings->dwApplicationDataOffset); + "dwApplicationDataOffset = %lx\n", bindings.Bindings->dwApplicationDataOffset); p = (const char*)(bindings.Bindings+1); ok(!memcmp(p, prefix, sizeof(prefix)-1), "missing prefix\n"); p += sizeof(prefix)-1; @@ -1235,7 +1235,7 @@ static void test_communication(void) hash_size = sizeof(hash); ret = CryptHashCertificate(0, CALG_SHA_256, 0, cert->pbCertEncoded, cert->cbCertEncoded, hash, &hash_size); if(ret) { - ok(hash_size == 32, "hash_size = %u\n", hash_size); + ok(hash_size == 32, "hash_size = %lu\n", hash_size); ok(!memcmp(hash, p, hash_size), "unexpected hash part\n"); }else { win_skip("SHA 256 hash not supported.\n"); @@ -1248,23 +1248,23 @@ static void test_communication(void)
status = pQueryContextAttributesA(&context, SECPKG_ATTR_UNIQUE_BINDINGS, &bindings); ok(status == SEC_E_OK || broken(status == SEC_E_UNSUPPORTED_FUNCTION), - "QueryContextAttributesW(SECPKG_ATTR_UNIQUE_BINDINGS) failed: %08x\n", status); + "QueryContextAttributesW(SECPKG_ATTR_UNIQUE_BINDINGS) failed: %08lx\n", status); if(status == SEC_E_OK) { const char *p; static const char prefix[] = "tls-unique:";
ok(bindings.BindingsLength > sizeof(*bindings.Bindings) + sizeof(prefix)-1, - "bindings.BindingsLength = %u\n", bindings.BindingsLength); - ok(!bindings.Bindings->dwInitiatorAddrType, "dwInitiatorAddrType = %x\n", bindings.Bindings->dwInitiatorAddrType); - ok(!bindings.Bindings->cbInitiatorLength, "cbInitiatorLength = %x\n", bindings.Bindings->cbInitiatorLength); - ok(!bindings.Bindings->dwInitiatorOffset, "dwInitiatorOffset = %x\n", bindings.Bindings->dwInitiatorOffset); - ok(!bindings.Bindings->dwAcceptorAddrType, "dwAcceptorAddrType = %x\n", bindings.Bindings->dwAcceptorAddrType); - ok(!bindings.Bindings->cbAcceptorLength, "cbAcceptorLength = %x\n", bindings.Bindings->cbAcceptorLength); - ok(!bindings.Bindings->dwAcceptorOffset, "dwAcceptorOffset = %x\n", bindings.Bindings->dwAcceptorOffset); + "bindings.BindingsLength = %lu\n", bindings.BindingsLength); + ok(!bindings.Bindings->dwInitiatorAddrType, "dwInitiatorAddrType = %lx\n", bindings.Bindings->dwInitiatorAddrType); + ok(!bindings.Bindings->cbInitiatorLength, "cbInitiatorLength = %lx\n", bindings.Bindings->cbInitiatorLength); + ok(!bindings.Bindings->dwInitiatorOffset, "dwInitiatorOffset = %lx\n", bindings.Bindings->dwInitiatorOffset); + ok(!bindings.Bindings->dwAcceptorAddrType, "dwAcceptorAddrType = %lx\n", bindings.Bindings->dwAcceptorAddrType); + ok(!bindings.Bindings->cbAcceptorLength, "cbAcceptorLength = %lx\n", bindings.Bindings->cbAcceptorLength); + ok(!bindings.Bindings->dwAcceptorOffset, "dwAcceptorOffset = %lx\n", bindings.Bindings->dwAcceptorOffset); ok(sizeof(*bindings.Bindings) + bindings.Bindings->cbApplicationDataLength == bindings.BindingsLength, - "cbApplicationDataLength = %x\n", bindings.Bindings->cbApplicationDataLength); + "cbApplicationDataLength = %lx\n", bindings.Bindings->cbApplicationDataLength); ok(bindings.Bindings->dwApplicationDataOffset == sizeof(*bindings.Bindings), - "dwApplicationDataOffset = %x\n", bindings.Bindings->dwApplicationDataOffset); + "dwApplicationDataOffset = %lx\n", bindings.Bindings->dwApplicationDataOffset); p = (const char*)(bindings.Bindings+1); ok(!memcmp(p, prefix, sizeof(prefix)-1), "wrong prefix\n"); FreeContextBuffer(bindings.Bindings); @@ -1276,29 +1276,29 @@ static void test_communication(void) }
status = pQueryContextAttributesA(&context, SECPKG_ATTR_CONNECTION_INFO, (void*)&conn_info); - ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_CONNECTION_INFO) failed: %08x\n", status); + ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_CONNECTION_INFO) failed: %08lx\n", status); if(status == SEC_E_OK) { - ok(conn_info.dwCipherStrength >= 128, "conn_info.dwCipherStrength = %d\n", conn_info.dwCipherStrength); - ok(conn_info.dwHashStrength >= 128, "conn_info.dwHashStrength = %d\n", conn_info.dwHashStrength); + ok(conn_info.dwCipherStrength >= 128, "conn_info.dwCipherStrength = %ld\n", conn_info.dwCipherStrength); + ok(conn_info.dwHashStrength >= 128, "conn_info.dwHashStrength = %ld\n", conn_info.dwHashStrength); }
status = pQueryContextAttributesA(&context, SECPKG_ATTR_KEY_INFO, &key_info); - ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_KEY_INFO) failed: %08x\n", status); + ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_KEY_INFO) failed: %08lx\n", status); if(status == SEC_E_OK) { ok(broken(key_info.SignatureAlgorithm == 0 /* WinXP,2003 */) || key_info.SignatureAlgorithm == CALG_RSA_SIGN, - "key_info.SignatureAlgorithm = %04x\n", key_info.SignatureAlgorithm); + "key_info.SignatureAlgorithm = %04lx\n", key_info.SignatureAlgorithm); ok(broken(key_info.SignatureAlgorithm == 0 /* WinXP,2003 */) || !strcmp(key_info.sSignatureAlgorithmName, "RSA"), "key_info.sSignatureAlgorithmName = %s\n", key_info.sSignatureAlgorithmName); - ok(key_info.KeySize >= 128, "key_info.KeySize = %d\n", key_info.KeySize); + ok(key_info.KeySize >= 128, "key_info.KeySize = %ld\n", key_info.KeySize); }
status = pQueryContextAttributesA(&context, SECPKG_ATTR_STREAM_SIZES, &sizes); - ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_STREAM_SIZES) failed: %08x\n", status); + ok(status == SEC_E_OK, "QueryContextAttributesW(SECPKG_ATTR_STREAM_SIZES) failed: %08lx\n", status);
status = pQueryContextAttributesA(&context, SECPKG_ATTR_NEGOTIATION_INFO, &info); - ok(status == SEC_E_UNSUPPORTED_FUNCTION, "QueryContextAttributesA returned %08x\n", status); + ok(status == SEC_E_UNSUPPORTED_FUNCTION, "QueryContextAttributesA returned %08lx\n", status);
reset_buffers(&buffers[0]);
@@ -1318,7 +1318,7 @@ static void test_communication(void) buf->cbBuffer = sizes.cbTrailer;
status = EncryptMessage(&context, 0, &buffers[0], 0); - ok(status == SEC_E_OK, "EncryptMessage failed: %08x\n", status); + ok(status == SEC_E_OK, "EncryptMessage failed: %08lx\n", status); if (status != SEC_E_OK) return;
@@ -1332,29 +1332,29 @@ static void test_communication(void) /* Too few buffers */ --buffers[0].cBuffers; status = DecryptMessage(&context, &buffers[0], 0, NULL); - ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status); + ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
/* No data buffer */ ++buffers[0].cBuffers; status = DecryptMessage(&context, &buffers[0], 0, NULL); - ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status); + ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
/* Two data buffers */ buffers[0].pBuffers[0].BufferType = SECBUFFER_DATA; buffers[0].pBuffers[1].BufferType = SECBUFFER_DATA; status = DecryptMessage(&context, &buffers[0], 0, NULL); - ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status); + ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
/* Too few empty buffers */ buffers[0].pBuffers[1].BufferType = SECBUFFER_EXTRA; status = DecryptMessage(&context, &buffers[0], 0, NULL); - ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status); + ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08lx\n", status);
/* Incomplete data */ buffers[0].pBuffers[1].BufferType = SECBUFFER_EMPTY; buffers[0].pBuffers[0].cbBuffer = (data[3]<<8) | data[4]; status = DecryptMessage(&context, &buffers[0], 0, NULL); - ok(status == SEC_E_INCOMPLETE_MESSAGE, "Expected SEC_E_INCOMPLETE_MESSAGE, got %08x\n", status); + ok(status == SEC_E_INCOMPLETE_MESSAGE, "Expected SEC_E_INCOMPLETE_MESSAGE, got %08lx\n", status); ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_MISSING, "Expected first buffer to be SECBUFFER_MISSING\n"); ok(buffers[0].pBuffers[0].cbBuffer == 5, "Expected first buffer to be a five bytes\n");
@@ -1366,21 +1366,21 @@ static void test_communication(void) buffers[0].pBuffers[2].BufferType = SECBUFFER_EMPTY; buffers[0].pBuffers[2].cbBuffer = 0; status = DecryptMessage(&context, &buffers[0], 0, NULL); - ok(status == SEC_I_RENEGOTIATE, "Expected SEC_I_RENEGOTIATE, got %08x\n", status); - ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_STREAM_HEADER, "got %u\n", buffers[0].pBuffers[0].BufferType); - ok(buffers[0].pBuffers[0].cbBuffer == 5, "got %u\n", buffers[0].pBuffers[0].cbBuffer); - ok(buffers[0].pBuffers[1].BufferType == SECBUFFER_DATA, "got %u\n", buffers[0].pBuffers[1].BufferType); - ok(buffers[0].pBuffers[1].cbBuffer == 0, "got %u\n", buffers[0].pBuffers[1].cbBuffer); - ok(buffers[0].pBuffers[2].BufferType == SECBUFFER_STREAM_TRAILER, "got %u\n", buffers[0].pBuffers[2].BufferType); - todo_wine ok(buffers[0].pBuffers[2].cbBuffer == 32, "got %u\n", buffers[0].pBuffers[2].cbBuffer); + ok(status == SEC_I_RENEGOTIATE, "Expected SEC_I_RENEGOTIATE, got %08lx\n", status); + ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_STREAM_HEADER, "got %lu\n", buffers[0].pBuffers[0].BufferType); + ok(buffers[0].pBuffers[0].cbBuffer == 5, "got %lu\n", buffers[0].pBuffers[0].cbBuffer); + ok(buffers[0].pBuffers[1].BufferType == SECBUFFER_DATA, "got %lu\n", buffers[0].pBuffers[1].BufferType); + ok(buffers[0].pBuffers[1].cbBuffer == 0, "got %lu\n", buffers[0].pBuffers[1].cbBuffer); + ok(buffers[0].pBuffers[2].BufferType == SECBUFFER_STREAM_TRAILER, "got %lu\n", buffers[0].pBuffers[2].BufferType); + todo_wine ok(buffers[0].pBuffers[2].cbBuffer == 32, "got %lu\n", buffers[0].pBuffers[2].cbBuffer);
pfx.pbData = (BYTE *)pfxdata; pfx.cbData = sizeof(pfxdata); store = PFXImportCertStore(&pfx, NULL, CRYPT_EXPORTABLE|CRYPT_USER_KEYSET|PKCS12_NO_PERSIST_KEY); - ok(store != NULL, "got %u\n", GetLastError()); + ok(store != NULL, "got %lu\n", GetLastError());
cert = CertFindCertificateInStore(store, X509_ASN_ENCODING, 0, CERT_FIND_ANY, NULL, NULL); - ok(cert != NULL, "got %u\n", GetLastError()); + ok(cert != NULL, "got %lu\n", GetLastError());
cred.paCred = &cert; cred.cCreds = 1; @@ -1388,7 +1388,7 @@ static void test_communication(void) FreeCredentialsHandle(&cred_handle); status = AcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME_A, SECPKG_CRED_OUTBOUND, NULL, &cred, NULL, NULL, &cred_handle, NULL); - ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08x\n", status); + ok(status == SEC_E_OK, "AcquireCredentialsHandleA failed: %08lx\n", status);
init_buffers(&buffers[0], 4, buf_size); init_buffers(&buffers[1], 4, buf_size); @@ -1397,7 +1397,7 @@ static void test_communication(void) status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, NULL, 0, &context, &buffers[0], &attrs, NULL); - todo_wine ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status); + todo_wine ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status); if (status != SEC_I_CONTINUE_NEEDED) { skip("skipping remaining renegotiate test\n"); @@ -1425,8 +1425,8 @@ static void test_communication(void) send(sock, buf->pvBuffer, buf->cbBuffer, 0); buf->cbBuffer = buf_size;
- todo_wine ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#lx, got %#lx\n", context.dwLower, context2.dwLower); - todo_wine ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#lx, got %#lx\n", context.dwUpper, context2.dwUpper); + todo_wine ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#Ix, got %#Ix\n", context.dwLower, context2.dwLower); + todo_wine ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#Ix, got %#Ix\n", context.dwUpper, context2.dwUpper);
buf = &buffers[1].pBuffers[0]; ret = receive_data(sock, buf); @@ -1439,7 +1439,7 @@ static void test_communication(void) ISC_REQ_USE_SUPPLIED_CREDS, 0, 0, &buffers[1], 0, &context2, &buffers[0], &attrs, NULL); buffers[1].pBuffers[0].cbBuffer = buf_size; } - ok (status == SEC_E_OK, "got %08x\n", status); + ok (status == SEC_E_OK, "got %08lx\n", status);
buf = &buffers[0].pBuffers[0]; buf->cbBuffer = buf_size; @@ -1449,7 +1449,7 @@ static void test_communication(void) buffers[0].pBuffers[0].BufferType = SECBUFFER_DATA; buffers[0].pBuffers[1].BufferType = SECBUFFER_EMPTY; status = DecryptMessage(&context, &buffers[0], 0, NULL); - ok(status == SEC_E_OK, "DecryptMessage failed: %08x\n", status); + ok(status == SEC_E_OK, "DecryptMessage failed: %08lx\n", status); if (status == SEC_E_OK) { ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_STREAM_HEADER, "Expected first buffer to be SECBUFFER_STREAM_HEADER\n"); @@ -1505,7 +1505,7 @@ static void test_application_protocol_negotiation(void)
status = AcquireCredentialsHandleA(NULL, (SEC_CHAR *)UNISP_NAME_A, SECPKG_CRED_OUTBOUND, NULL, &cred, NULL, NULL, &cred_handle, NULL); - ok(status == SEC_E_OK, "got %08x\n", status); + ok(status == SEC_E_OK, "got %08lx\n", status); if (status != SEC_E_OK) return;
init_buffers(&buffers[0], 4, buf_size); @@ -1537,7 +1537,7 @@ static void test_application_protocol_negotiation(void) buffers[0].pBuffers[0].BufferType = SECBUFFER_TOKEN; status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost", ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM, 0, 0, &buffers[2], 0, &context, &buffers[0], &attrs, NULL); - ok(status == SEC_I_CONTINUE_NEEDED, "got %08x\n", status); + ok(status == SEC_I_CONTINUE_NEEDED, "got %08lx\n", status);
buf = &buffers[0].pBuffers[0]; send(sock, buf->pvBuffer, buf->cbBuffer, 0); @@ -1561,8 +1561,8 @@ static void test_application_protocol_negotiation(void) send(sock, buf->pvBuffer, buf->cbBuffer, 0); buf->cbBuffer = buf_size;
- ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#lx, got %#lx\n", context.dwLower, context2.dwLower); - ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#lx, got %#lx\n", context.dwUpper, context2.dwUpper); + ok( context.dwLower == context2.dwLower, "dwLower mismatch, expected %#Ix, got %#Ix\n", context.dwLower, context2.dwLower); + ok( context.dwUpper == context2.dwUpper, "dwUpper mismatch, expected %#Ix, got %#Ix\n", context.dwUpper, context2.dwUpper);
buf = &buffers[1].pBuffers[0]; ret = receive_data(sock, buf); @@ -1576,7 +1576,7 @@ static void test_application_protocol_negotiation(void) buffers[1].pBuffers[0].cbBuffer = buf_size; }
- ok (status == SEC_E_OK || broken(status == SEC_E_ILLEGAL_MESSAGE) /* winxp */, "got %08x\n", status); + ok (status == SEC_E_OK || broken(status == SEC_E_ILLEGAL_MESSAGE) /* winxp */, "got %08lx\n", status); if (status != SEC_E_OK) { skip("Handshake failed\n"); @@ -1585,7 +1585,7 @@ static void test_application_protocol_negotiation(void)
memset(&protocol, 0, sizeof(protocol)); status = pQueryContextAttributesA(&context, SECPKG_ATTR_APPLICATION_PROTOCOL, &protocol); - ok(status == SEC_E_OK || broken(status == SEC_E_UNSUPPORTED_FUNCTION) /* win2k8 */, "got %08x\n", status); + ok(status == SEC_E_OK || broken(status == SEC_E_UNSUPPORTED_FUNCTION) /* win2k8 */, "got %08lx\n", status); if (status == SEC_E_OK) { ok(protocol.ProtoNegoStatus == SecApplicationProtocolNegotiationStatus_Success, "got %u\n", protocol.ProtoNegoStatus); @@ -1636,7 +1636,7 @@ static void test_dtls(void) win_skip( "no DTLS support\n" ); return; } - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status );
flags_req = ISC_REQ_MANUAL_CRED_VALIDATION | ISC_REQ_EXTENDED_ERROR | ISC_REQ_DATAGRAM | ISC_REQ_USE_SUPPLIED_CREDS | ISC_REQ_CONFIDENTIALITY | ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT; @@ -1654,15 +1654,15 @@ static void test_dtls(void) exp.LowPart = exp.HighPart = 0xdeadbeef; status = InitializeSecurityContextA( &cred_handle, NULL, (SEC_CHAR *)"winetest", flags_req, 0, 16, &buffers[0], 0, &ctx_handle, &buffers[1], &attr, &exp ); - ok( status == SEC_I_CONTINUE_NEEDED, "got %08x\n", status ); + ok( status == SEC_I_CONTINUE_NEEDED, "got %08lx\n", status );
flags_ret = ISC_RET_MANUAL_CRED_VALIDATION | ISC_RET_STREAM | ISC_RET_EXTENDED_ERROR | ISC_RET_DATAGRAM | ISC_RET_USED_SUPPLIED_CREDS | ISC_RET_CONFIDENTIALITY | ISC_RET_SEQUENCE_DETECT | ISC_RET_REPLAY_DETECT; - ok( attr == flags_ret, "got %08x\n", attr ); - ok( !exp.LowPart, "got %08x\n", exp.LowPart ); - ok( !exp.HighPart, "got %08x\n", exp.HighPart ); - ok( buffers[1].pBuffers[1].BufferType == SECBUFFER_ALERT, "Expected buffertype SECBUFFER_ALERT, got %#x\n", buffers[1].pBuffers[1].BufferType); - ok( !buffers[1].pBuffers[1].cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty, got %#x\n", buffers[1].pBuffers[1].cbBuffer); + ok( attr == flags_ret, "got %08lx\n", attr ); + ok( !exp.LowPart, "got %08lx\n", exp.LowPart ); + ok( !exp.HighPart, "got %08lx\n", exp.HighPart ); + ok( buffers[1].pBuffers[1].BufferType == SECBUFFER_ALERT, "Expected buffertype SECBUFFER_ALERT, got %#lx\n", buffers[1].pBuffers[1].BufferType); + ok( !buffers[1].pBuffers[1].cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty, got %#lx\n", buffers[1].pBuffers[1].cbBuffer); prev_buf_len = buffers[1].pBuffers[0].cbBuffer; buf = HeapAlloc( GetProcessHeap(), 0, prev_buf_len ); memcpy( buf, buffers[1].pBuffers[0].pvBuffer, prev_buf_len ); @@ -1680,12 +1680,12 @@ static void test_dtls(void) ctx_handle2.dwLower = ctx_handle2.dwUpper = 0xdeadbeef; status = InitializeSecurityContextA( &cred_handle, &ctx_handle, (SEC_CHAR *)"winetest", flags_req, 0, 16, NULL, 0, &ctx_handle2, &buffers[1], &attr, &exp ); - ok( status == SEC_E_INSUFFICIENT_MEMORY, "got %08x\n", status ); + ok( status == SEC_E_INSUFFICIENT_MEMORY, "got %08lx\n", status );
flags_ret = ISC_RET_CONFIDENTIALITY | ISC_RET_SEQUENCE_DETECT | ISC_RET_REPLAY_DETECT; - todo_wine ok( attr == flags_ret, "got %08x\n", attr ); - ok( !exp.LowPart, "got %08x\n", exp.LowPart ); - ok( !exp.HighPart, "got %08x\n", exp.HighPart ); + todo_wine ok( attr == flags_ret, "got %08lx\n", attr ); + ok( !exp.LowPart, "got %08lx\n", exp.LowPart ); + ok( !exp.HighPart, "got %08lx\n", exp.HighPart ); ok( ctx_handle2.dwLower == 0xdeadbeef, "Did not expect dwLower to be set on new context\n"); ok( ctx_handle2.dwUpper == 0xdeadbeef, "Did not expect dwUpper to be set on new context\n");
@@ -1697,20 +1697,20 @@ static void test_dtls(void) ctx_handle2.dwLower = ctx_handle2.dwUpper = 0xdeadbeef; status = InitializeSecurityContextA( &cred_handle, &ctx_handle, (SEC_CHAR *)"winetest", flags_req, 0, 16, NULL, 0, &ctx_handle2, &buffers[1], &attr, &exp ); - ok( status == SEC_I_CONTINUE_NEEDED, "got %08x\n", status ); + ok( status == SEC_I_CONTINUE_NEEDED, "got %08lx\n", status );
flags_ret = ISC_RET_MANUAL_CRED_VALIDATION | ISC_RET_STREAM | ISC_RET_EXTENDED_ERROR | ISC_RET_DATAGRAM | ISC_RET_USED_SUPPLIED_CREDS | ISC_RET_CONFIDENTIALITY | ISC_RET_SEQUENCE_DETECT | ISC_RET_REPLAY_DETECT; - ok( attr == flags_ret, "got %08x\n", attr ); - todo_wine ok( exp.LowPart, "got %08x\n", exp.LowPart ); - todo_wine ok( exp.HighPart, "got %08x\n", exp.HighPart ); - ok( buffers[1].pBuffers[1].BufferType == SECBUFFER_ALERT, "Expected buffertype SECBUFFER_ALERT, got %#x\n", buffers[1].pBuffers[1].BufferType); - ok( !buffers[1].pBuffers[1].cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty, got %#x\n", buffers[1].pBuffers[1].cbBuffer); - ok( ctx_handle.dwLower == ctx_handle2.dwLower, "dwLower mismatch, expected %#lx, got %#lx\n", ctx_handle.dwLower, ctx_handle2.dwLower); - ok( ctx_handle.dwUpper == ctx_handle2.dwUpper, "dwUpper mismatch, expected %#lx, got %#lx\n", ctx_handle.dwUpper, ctx_handle2.dwUpper); + ok( attr == flags_ret, "got %08lx\n", attr ); + todo_wine ok( exp.LowPart, "got %08lx\n", exp.LowPart ); + todo_wine ok( exp.HighPart, "got %08lx\n", exp.HighPart ); + ok( buffers[1].pBuffers[1].BufferType == SECBUFFER_ALERT, "Expected buffertype SECBUFFER_ALERT, got %#lx\n", buffers[1].pBuffers[1].BufferType); + ok( !buffers[1].pBuffers[1].cbBuffer, "Expected SECBUFFER_ALERT buffer to be empty, got %#lx\n", buffers[1].pBuffers[1].cbBuffer); + ok( ctx_handle.dwLower == ctx_handle2.dwLower, "dwLower mismatch, expected %#Ix, got %#Ix\n", ctx_handle.dwLower, ctx_handle2.dwLower); + ok( ctx_handle.dwUpper == ctx_handle2.dwUpper, "dwUpper mismatch, expected %#Ix, got %#Ix\n", ctx_handle.dwUpper, ctx_handle2.dwUpper);
/* With no new input buffer, output buffer length should match prior call. */ - ok(buffers[1].pBuffers[0].cbBuffer == prev_buf_len, "Output buffer size mismatch, expected %#x, got %#x\n", + ok(buffers[1].pBuffers[0].cbBuffer == prev_buf_len, "Output buffer size mismatch, expected %#lx, got %#lx\n", prev_buf_len, buffers[1].pBuffers[0].cbBuffer);
/* diff --git a/dlls/secur32/tests/secur32.c b/dlls/secur32/tests/secur32.c index aa286c64732..b1a1db76c3e 100644 --- a/dlls/secur32/tests/secur32.c +++ b/dlls/secur32/tests/secur32.c @@ -77,14 +77,14 @@ static void testGetComputerObjectNameA(void) switch (formats[i]) { case NameUnknown: - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %lu\n", formats[i], GetLastError()); break; default: ok(GetLastError() == ERROR_NONE_MAPPED || GetLastError() == ERROR_NO_SUCH_USER || GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO || GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "%u: got %u\n", formats[i], GetLastError()); + "%u: got %lu\n", formats[i], GetLastError()); break; }
@@ -97,10 +97,10 @@ static void testGetComputerObjectNameA(void) { case NameUnknown: ok(!rc, "GetComputerObjectName(%u) should fail\n", formats[i]); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %lu\n", formats[i], GetLastError()); break; default: - ok(rc, "GetComputerObjectName(%u) error %u\n", formats[i], GetLastError()); + ok(rc, "GetComputerObjectName(%u) error %lu\n", formats[i], GetLastError()); trace("GetComputerObjectName(%u) returned %s\n", formats[i], name); break; } @@ -122,7 +122,7 @@ static void testGetComputerObjectNameW(void) switch (formats[i]) { case NameUnknown: - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %lu\n", formats[i], GetLastError()); break; default: ok(GetLastError() == ERROR_NONE_MAPPED || @@ -130,7 +130,7 @@ static void testGetComputerObjectNameW(void) GetLastError() == ERROR_CANT_ACCESS_DOMAIN_INFO || GetLastError() == WSAHOST_NOT_FOUND || GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "%u: got %u\n", formats[i], GetLastError()); + "%u: got %lu\n", formats[i], GetLastError()); break; }
@@ -143,10 +143,10 @@ static void testGetComputerObjectNameW(void) { case NameUnknown: ok(!rc, "GetComputerObjectName(%u) should fail\n", formats[i]); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %u\n", formats[i], GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%u: got %lu\n", formats[i], GetLastError()); break; default: - ok(rc, "GetComputerObjectName(%u) error %u\n", formats[i], GetLastError()); + ok(rc, "GetComputerObjectName(%u) error %lu\n", formats[i], GetLastError()); trace("GetComputerObjectName(%u) returned %s\n", formats[i], wine_dbgstr_w(nameW)); break; } @@ -170,7 +170,7 @@ static void testGetUserNameExA(void) GetLastError() == ERROR_NONE_MAPPED || broken(formats[i] == NameDnsDomain && GetLastError() == ERROR_INVALID_PARAMETER), - "GetUserNameExW(%d) failed: %d\n", + "GetUserNameExW(%d) failed: %ld\n", formats[i], GetLastError()); }
@@ -179,7 +179,7 @@ static void testGetUserNameExA(void)
size = 0; rc = pGetUserNameExA(NameSamCompatible, NULL, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); + ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError()); ok(size != 0, "Expected size to be set to required size\n");
if (0) /* Crashes on Windows with big enough size */ @@ -190,12 +190,12 @@ static void testGetUserNameExA(void)
size = 0; rc = pGetUserNameExA(NameSamCompatible, name, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); + ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError()); ok(size != 0, "Expected size to be set to required size\n"); size = 1; name[0] = 0xff; rc = pGetUserNameExA(NameSamCompatible, name, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); + ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError()); ok(1 < size, "Expected size to be set to required size\n"); ok(name[0] == (char) 0xff, "Expected unchanged buffer\n"); } @@ -217,7 +217,7 @@ static void testGetUserNameExW(void) GetLastError() == ERROR_NONE_MAPPED || broken(formats[i] == NameDnsDomain && GetLastError() == ERROR_INVALID_PARAMETER), - "GetUserNameExW(%d) failed: %d\n", + "GetUserNameExW(%d) failed: %ld\n", formats[i], GetLastError()); }
@@ -226,7 +226,7 @@ static void testGetUserNameExW(void)
size = 0; rc = pGetUserNameExW(NameSamCompatible, NULL, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); + ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError()); ok(size != 0, "Expected size to be set to required size\n");
if (0) /* Crashes on Windows with big enough size */ @@ -237,12 +237,12 @@ static void testGetUserNameExW(void)
size = 0; rc = pGetUserNameExW(NameSamCompatible, nameW, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); + ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError()); ok(size != 0, "Expected size to be set to required size\n"); size = 1; nameW[0] = 0xff; rc = pGetUserNameExW(NameSamCompatible, nameW, &size); - ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %u\n", rc, GetLastError()); + ok(! rc && GetLastError() == ERROR_MORE_DATA, "Expected fail with ERROR_MORE_DATA, got %d with %lu\n", rc, GetLastError()); ok(1 < size, "Expected size to be set to required size\n"); ok(nameW[0] == (WCHAR) 0xff, "Expected unchanged buffer\n"); } @@ -254,7 +254,7 @@ static void test_InitSecurityInterface(void)
sftA = pInitSecurityInterfaceA(); ok(sftA != NULL, "pInitSecurityInterfaceA failed\n"); - ok(sftA->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftA->dwVersion); + ok(sftA->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %ld in security function table\n", sftA->dwVersion); ok(!sftA->Reserved2, "Reserved2 should be NULL instead of %p in security function table\n", sftA->Reserved2); @@ -271,7 +271,7 @@ static void test_InitSecurityInterface(void)
sftW = pInitSecurityInterfaceW(); ok(sftW != NULL, "pInitSecurityInterfaceW failed\n"); - ok(sftW->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %d in security function table\n", sftW->dwVersion); + ok(sftW->dwVersion == SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION, "wrong dwVersion %ld in security function table\n", sftW->dwVersion); ok(!sftW->Reserved2, "Reserved2 should be NULL instead of %p in security function table\n", sftW->Reserved2); ok(sftW->Reserved3 == sftW->EncryptMessage, "Reserved3 should be equal to EncryptMessage in the security function table\n"); ok(sftW->Reserved4 == sftW->DecryptMessage, "Reserved4 should be equal to DecryptMessage in the security function table\n"); @@ -293,45 +293,45 @@ static void test_SspiEncodeStringsAsAuthIdentity(void) }
status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, NULL, NULL ); - ok( status == SEC_E_INVALID_TOKEN, "got %08x\n", status ); + ok( status == SEC_E_INVALID_TOKEN, "got %08lx\n", status );
id = (PSEC_WINNT_AUTH_IDENTITY_OPAQUE)0xdeadbeef; status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, NULL, &id ); - ok( status == SEC_E_INVALID_TOKEN, "got %08x\n", status ); + ok( status == SEC_E_INVALID_TOKEN, "got %08lx\n", status ); ok( id == (PSEC_WINNT_AUTH_IDENTITY_OPAQUE)0xdeadbeef, "id set\n" );
id = NULL; status = pSspiEncodeStringsAsAuthIdentity( NULL, NULL, password, &id ); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status ); ok( id != NULL, "id not set\n" ); pSspiFreeAuthIdentity( id );
id = NULL; status = pSspiEncodeStringsAsAuthIdentity( NULL, domainname, password, &id ); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status ); ok( id != NULL, "id not set\n" ); pSspiFreeAuthIdentity( id );
id = NULL; status = pSspiEncodeStringsAsAuthIdentity( username, NULL, password, &id ); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status ); ok( id != NULL, "id not set\n" ); pSspiFreeAuthIdentity( id );
id = NULL; status = pSspiEncodeStringsAsAuthIdentity( username, NULL, NULL, &id ); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status ); ok( id != NULL, "id not set\n" ); pSspiFreeAuthIdentity( id );
id = NULL; status = pSspiEncodeStringsAsAuthIdentity( username, domainname, password, &id ); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status ); ok( id != NULL, "id not set\n" );
username_ptr = domainname_ptr = password_ptr = NULL; status = pSspiEncodeAuthIdentityAsStrings( id, &username_ptr, &domainname_ptr, &password_ptr ); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status ); ok( !lstrcmpW( username, username_ptr ), "wrong username\n" ); ok( !lstrcmpW( domainname, domainname_ptr ), "wrong domainname\n" ); ok( !lstrcmpW( password, password_ptr ), "wrong password\n" ); @@ -345,13 +345,13 @@ static void test_SspiEncodeStringsAsAuthIdentity(void)
id = NULL; status = pSspiEncodeStringsAsAuthIdentity( username, NULL, password, &id ); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status ); ok( id != NULL, "id not set\n" );
username_ptr = password_ptr = NULL; domainname_ptr = (const WCHAR *)0xdeadbeef; status = pSspiEncodeAuthIdentityAsStrings( id, &username_ptr, &domainname_ptr, &password_ptr ); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status ); ok( !lstrcmpW( username, username_ptr ), "wrong username\n" ); ok( domainname_ptr == NULL, "domainname_ptr not cleared\n" ); ok( !lstrcmpW( password, password_ptr ), "wrong password\n" ); @@ -386,28 +386,28 @@ static void test_SspiPrepareForCredWrite(void) }
status = pSspiEncodeStringsAsAuthIdentity( usernameW, domainnameW, passwordW, &id ); - ok( status == SEC_E_OK, "got %08x\n", status ); + ok( status == SEC_E_OK, "got %08lx\n", status );
type = size = 0; status = pSspiPrepareForCredWrite( id, NULL, &type, &target, &username, &blob, &size ); - ok( status == SEC_E_OK, "got %08x\n", status ); - ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %u\n", type ); + ok( status == SEC_E_OK, "got %08lx\n", status ); + ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %lu\n", type ); ok( !lstrcmpW( target, targetW ), "got %s\n", wine_dbgstr_w(target) ); ok( !lstrcmpW( username, targetW ), "got %s\n", wine_dbgstr_w(username) ); ok( !memcmp( blob, passwordW, sizeof(passwordW) - sizeof(WCHAR) ), "wrong data\n" ); - ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %u\n", size ); + ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %lu\n", size ); pSspiLocalFree( (void *)target ); pSspiLocalFree( (void *)username ); pSspiLocalFree( blob );
type = size = 0; status = pSspiPrepareForCredWrite( id, target2W, &type, &target, &username, &blob, &size ); - ok( status == SEC_E_OK, "got %08x\n", status ); - ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %u\n", type ); + ok( status == SEC_E_OK, "got %08lx\n", status ); + ok( type == CRED_TYPE_DOMAIN_PASSWORD, "got %lu\n", type ); ok( !lstrcmpW( target, target2W ), "got %s\n", wine_dbgstr_w(target) ); ok( !lstrcmpW( username, targetW ), "got %s\n", wine_dbgstr_w(username) ); ok( !memcmp( blob, passwordW, sizeof(passwordW) - sizeof(WCHAR) ), "wrong data\n" ); - ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %u\n", size ); + ok( size == sizeof(passwordW) - sizeof(WCHAR), "got %lu\n", size ); pSspiLocalFree( (void *)target ); pSspiLocalFree( (void *)username ); pSspiLocalFree( blob ); @@ -450,17 +450,17 @@ static void test_kerberos(void) if(status != SEC_E_OK) return;
- ok( (info->fCapabilities & ~optional_mask) == expected_flags, "got %08x, expected %08x\n", info->fCapabilities, expected_flags ); + ok( (info->fCapabilities & ~optional_mask) == expected_flags, "got %08lx, expected %08lx\n", info->fCapabilities, expected_flags ); ok( info->wVersion == 1, "got %u\n", info->wVersion ); ok( info->wRPCID == RPC_C_AUTHN_GSS_KERBEROS, "got %u\n", info->wRPCID ); - ok( info->cbMaxToken >= 12000, "got %u\n", info->cbMaxToken ); + ok( info->cbMaxToken >= 12000, "got %lu\n", info->cbMaxToken ); ok( !lstrcmpA( info->Name, "Kerberos" ), "got %s\n", info->Name ); ok( !lstrcmpA( info->Comment, "Microsoft Kerberos V1.0" ), "got %s\n", info->Comment ); FreeContextBuffer( info );
status = AcquireCredentialsHandleA( NULL, provider, SECPKG_CRED_OUTBOUND, NULL, NULL, NULL, NULL, &cred, NULL ); - todo_wine ok( status == SEC_E_OK, "AcquireCredentialsHandleA returned %08x\n", status ); + todo_wine ok( status == SEC_E_OK, "AcquireCredentialsHandleA returned %08lx\n", status ); if(status == SEC_E_OK) FreeCredentialHandle( &cred ); } @@ -475,14 +475,14 @@ static void test_ticket_cache(void) LSA_STRING name;
status = LsaConnectUntrusted( &lsa ); - ok( !status, "got %08x\n", status ); + ok( !status, "got %08lx\n", status );
RtlInitAnsiString( &name, MICROSOFT_KERBEROS_NAME_A ); status = LsaLookupAuthenticationPackage( lsa, &name, &package ); - ok( !status, "got %08x\n", status ); + ok( !status, "got %08lx\n", status );
status = LsaCallAuthenticationPackage( lsa, package, &req, sizeof(req), (void **)&resp, &len, &status ); - ok( !status, "got %08x\n", status ); + ok( !status, "got %08lx\n", status ); ok( resp->MessageType == KerbQueryTicketCacheMessage, "got %u\n", resp->MessageType );
for (i = 0; i < resp->CountOfTickets; i++) @@ -490,8 +490,8 @@ static void test_ticket_cache(void) KERB_TICKET_CACHE_INFO *info = &resp->Tickets[i]; trace( "ServerName %s\n", wine_dbgstr_wn(info->ServerName.Buffer, info->ServerName.Length/sizeof(WCHAR)) ); trace( "RealmName %s\n", wine_dbgstr_wn(info->RealmName.Buffer, info->RealmName.Length/sizeof(WCHAR)) ); - trace( "EncryptionType %08x\n", info->EncryptionType ); - trace( "TicketFlags %08x\n", info->TicketFlags ); + trace( "EncryptionType %08lx\n", info->EncryptionType ); + trace( "TicketFlags %08lx\n", info->TicketFlags ); } LsaFreeReturnBuffer( resp ); LsaDeregisterLogonProcess( lsa );
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=109769
Your paranoid android.
=== w1064 (32 bit report) ===
secur32: schannel.c:1442: Test failed: got 00090317 schannel.c:1452: Test failed: DecryptMessage failed: 80090317
=== w1064 (64 bit report) ===
secur32: schannel.c:1442: Test failed: got 00090317 schannel.c:1452: Test failed: DecryptMessage failed: 80090317
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/serialui/tests/Makefile.in | 1 - dlls/serialui/tests/confdlg.c | 64 ++++++++++++++++++++------------------- 2 files changed, 32 insertions(+), 33 deletions(-)
diff --git a/dlls/serialui/tests/Makefile.in b/dlls/serialui/tests/Makefile.in index d1dad8ef186..63f553cae11 100644 --- a/dlls/serialui/tests/Makefile.in +++ b/dlls/serialui/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = serialui.dll
C_SRCS = \ diff --git a/dlls/serialui/tests/confdlg.c b/dlls/serialui/tests/confdlg.c index 31669085d47..f695c9feeb9 100644 --- a/dlls/serialui/tests/confdlg.c +++ b/dlls/serialui/tests/confdlg.c @@ -39,7 +39,7 @@ static DWORD (WINAPI *pGetDefaultCommConfigW)(LPCWSTR, LPCOMMCONFIG, LPDWORD);
static const CHAR com1A[] = "com1"; static const CHAR emptyA[] = ""; -static const CHAR fmt_comA[] = "com%d"; +static const CHAR fmt_comA[] = "com%ld"; static const CHAR str_colonA[] = ":";
/* ################# */ @@ -102,21 +102,21 @@ static void test_drvCommConfigDialogA(void) SetLastError(0xdeadbeef); res = pCommConfigDialogA(bufferA, NULL, pCC); /* OK: ERROR_SUCCESS, Cancel: ERROR_CANCELLED */ - trace("returned %u with %u for '%s'\n", res, GetLastError(), bufferA); + trace("returned %lu with %lu for '%s'\n", res, GetLastError(), bufferA); }
ZeroMemory(pCC, sizeof(pCC)); SetLastError(0xdeadbeef); res = pCommConfigDialogA(bufferA, NULL, pCC); ok( res == ERROR_INSUFFICIENT_BUFFER, - "returned %u with %u for '%s' (expected ERROR_INSUFFICIENT_BUFFER)\n", + "returned %lu with %lu for '%s' (expected ERROR_INSUFFICIENT_BUFFER)\n", res, GetLastError(), bufferA);
SetLastError(0xdeadbeef); res = pCommConfigDialogA(bufferA, NULL, NULL); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u for '%s' (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu for '%s' (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError(), bufferA); } } @@ -126,7 +126,7 @@ static void test_drvCommConfigDialogA(void) SetLastError(0xdeadbeef); res = pCommConfigDialogA(emptyA, NULL, pCC); ok( res == ERROR_INSUFFICIENT_BUFFER, - "returned %u with %u (expected ERROR_INSUFFICIENT_BUFFER)\n", + "returned %lu with %lu (expected ERROR_INSUFFICIENT_BUFFER)\n", res, GetLastError());
@@ -134,7 +134,7 @@ static void test_drvCommConfigDialogA(void) pCC[0].dwSize = sizeof(COMMCONFIG); SetLastError(0xdeadbeef); res = pCommConfigDialogA(emptyA, NULL, pCC); - ok( res == ERROR_BADKEY, "returned %u with %u (expected ERROR_BADKEY)\n", + ok( res == ERROR_BADKEY, "returned %lu with %lu (expected ERROR_BADKEY)\n", res, GetLastError());
@@ -142,7 +142,7 @@ static void test_drvCommConfigDialogA(void) SetLastError(0xdeadbeef); res = pCommConfigDialogA(NULL, NULL, pCC); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError()); }
@@ -177,20 +177,20 @@ static void test_drvCommConfigDialogW(void) SetLastError(0xdeadbeef); res = pCommConfigDialogW(bufferW, NULL, pCC); /* OK: ERROR_SUCCESS, Cancel: ERROR_CANCELLED */ - trace("returned %u with %u for '%s'\n", res, GetLastError(), bufferA); + trace("returned %lu with %lu for '%s'\n", res, GetLastError(), bufferA); }
ZeroMemory(pCC, sizeof(pCC)); SetLastError(0xdeadbeef); res = pCommConfigDialogW(bufferW, NULL, pCC); ok( res == ERROR_INSUFFICIENT_BUFFER, - "returned %u with %u for '%s' (expected ERROR_INSUFFICIENT_BUFFER)\n", + "returned %lu with %lu for '%s' (expected ERROR_INSUFFICIENT_BUFFER)\n", res, GetLastError(), bufferA);
SetLastError(0xdeadbeef); res = pCommConfigDialogW(bufferW, NULL, NULL); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u for '%s' (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu for '%s' (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError(), bufferA); } } @@ -200,7 +200,7 @@ static void test_drvCommConfigDialogW(void) SetLastError(0xdeadbeef); res = pCommConfigDialogW(L"", NULL, pCC); ok( res == ERROR_INSUFFICIENT_BUFFER, - "returned %u with %u (expected ERROR_INSUFFICIENT_BUFFER)\n", + "returned %lu with %lu (expected ERROR_INSUFFICIENT_BUFFER)\n", res, GetLastError());
@@ -208,7 +208,7 @@ static void test_drvCommConfigDialogW(void) pCC[0].dwSize = sizeof(COMMCONFIG); SetLastError(0xdeadbeef); res = pCommConfigDialogW(L"", NULL, pCC); - ok( res == ERROR_BADKEY, "returned %u with %u (expected ERROR_BADKEY)\n", + ok( res == ERROR_BADKEY, "returned %lu with %lu (expected ERROR_BADKEY)\n", res, GetLastError());
@@ -216,7 +216,7 @@ static void test_drvCommConfigDialogW(void) SetLastError(0xdeadbeef); res = pCommConfigDialogW(NULL, NULL, pCC); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError()); }
@@ -244,8 +244,8 @@ static void test_drvGetDefaultCommConfigA(void) return; } ok( (res == ERROR_INSUFFICIENT_BUFFER) && (len >= i), - "returned %u with %u and %u (expected " - "ERROR_INSUFFICIENT_BUFFER and '>= %u')\n", res, GetLastError(), len, i); + "returned %lu with %lu and %lu (expected " + "ERROR_INSUFFICIENT_BUFFER and '>= %lu')\n", res, GetLastError(), len, i);
/* test ports "com0" - "com10" */ for (i = 0; i < 11 ; i++) { @@ -256,13 +256,13 @@ static void test_drvGetDefaultCommConfigA(void) res = pGetDefaultCommConfigA(bufferA, pCC, &len); if (i == 0) { ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected " + "returned %lu with %lu and %lu for %s (expected " "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); } else { ok((res == ERROR_SUCCESS) || (res == ERROR_BADKEY), - "returned %u with %u and %u for %s (expected ERROR_SUCCESS or " + "returned %lu with %lu and %lu for %s (expected ERROR_SUCCESS or " "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); }
@@ -273,7 +273,7 @@ static void test_drvGetDefaultCommConfigA(void) ZeroMemory(pCC, sizeof(pCC)); res = pGetDefaultCommConfigA(bufferA, pCC, &len); ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected '0' with " + "returned %lu with %lu and %lu for %s (expected '0' with " "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); } } @@ -285,7 +285,7 @@ static void test_drvGetDefaultCommConfigA(void) SetLastError(0xdeadbeef); res = pGetDefaultCommConfigA(emptyA, pCC, &len); ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected ERROR_BADKEY)\n", + "returned %lu with %lu and %lu for %s (expected ERROR_BADKEY)\n", res, GetLastError(), len, emptyA);
/* some NULL checks */ @@ -294,7 +294,7 @@ static void test_drvGetDefaultCommConfigA(void) SetLastError(0xdeadbeef); res = pGetDefaultCommConfigA(NULL, pCC, &len); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u and %u for NULL (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu and %lu for NULL (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError(), len);
@@ -302,14 +302,14 @@ static void test_drvGetDefaultCommConfigA(void) SetLastError(0xdeadbeef); res = pGetDefaultCommConfigA(com1A, NULL, &len); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u and %u (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu and %lu (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError(), len);
SetLastError(0xdeadbeef); res = pGetDefaultCommConfigA(com1A, pCC, NULL); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError()); }
@@ -336,8 +336,8 @@ static void test_drvGetDefaultCommConfigW(void) return; } ok( (res == ERROR_INSUFFICIENT_BUFFER) && (len >= i), - "returned %u with %u and %u (expected " - "ERROR_INSUFFICIENT_BUFFER and '>= %u')\n", res, GetLastError(), len, i); + "returned %lu with %lu and %lu (expected " + "ERROR_INSUFFICIENT_BUFFER and '>= %lu')\n", res, GetLastError(), len, i);
/* test ports "com0" - "com10" */ for (i = 0; i < 11 ; i++) { @@ -349,13 +349,13 @@ static void test_drvGetDefaultCommConfigW(void) res = pGetDefaultCommConfigW(bufferW, pCC, &len); if (i == 0) { ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected " + "returned %lu with %lu and %lu for %s (expected " "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); } else { ok((res == ERROR_SUCCESS) || (res == ERROR_BADKEY), - "returned %u with %u and %u for %s (expected ERROR_SUCCESS or " + "returned %lu with %lu and %lu for %s (expected ERROR_SUCCESS or " "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); }
@@ -367,7 +367,7 @@ static void test_drvGetDefaultCommConfigW(void) ZeroMemory(pCC, sizeof(pCC)); res = pGetDefaultCommConfigW(bufferW, pCC, &len); ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected '0' with " + "returned %lu with %lu and %lu for %s (expected '0' with " "ERROR_BADKEY)\n", res, GetLastError(), len, bufferA); } } @@ -378,7 +378,7 @@ static void test_drvGetDefaultCommConfigW(void) SetLastError(0xdeadbeef); res = pGetDefaultCommConfigW(L"", pCC, &len); ok( res == ERROR_BADKEY, - "returned %u with %u and %u for %s (expected ERROR_BADKEY)\n", + "returned %lu with %lu and %lu for %s (expected ERROR_BADKEY)\n", res, GetLastError(), len, emptyA);
/* some NULL checks */ @@ -387,7 +387,7 @@ static void test_drvGetDefaultCommConfigW(void) SetLastError(0xdeadbeef); res = pGetDefaultCommConfigW(NULL, pCC, &len); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u and %u for NULL (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu and %lu for NULL (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError(), len);
@@ -395,14 +395,14 @@ static void test_drvGetDefaultCommConfigW(void) SetLastError(0xdeadbeef); res = pGetDefaultCommConfigW(L"com1", NULL, &len); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u and %u (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu and %lu (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError(), len);
SetLastError(0xdeadbeef); res = pGetDefaultCommConfigW(L"com1", pCC, NULL); ok( res == ERROR_INVALID_PARAMETER, - "returned %u with %u (expected ERROR_INVALID_PARAMETER)\n", + "returned %lu with %lu (expected ERROR_INVALID_PARAMETER)\n", res, GetLastError());
} @@ -415,7 +415,7 @@ START_TEST(confdlg)
ptr = load_functions(); if (ptr) { - win_skip("got NULL with %u for %s\n", GetLastError(), ptr); + win_skip("got NULL with %lu for %s\n", GetLastError(), ptr); return; }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/setupapi/tests/parser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c index c18063fbe38..17251fc923b 100644 --- a/dlls/setupapi/tests/parser.c +++ b/dlls/setupapi/tests/parser.c @@ -268,9 +268,8 @@ static void test_enum_sections(void) static const char *contents = STD_HEADER "[s1]\nfoo=bar\n[s2]\nbar=foo\n[s3]\n[strings]\na=b\n";
BOOL ret; - DWORD len; HINF hinf; - UINT err, index; + UINT err, index, len; char buffer[256];
if (!pSetupEnumInfSectionsA)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/setupapi/tests/Makefile.in | 1 dlls/setupapi/tests/devinst.c | 1140 +++++++++++++++++++------------------ dlls/setupapi/tests/dialog.c | 12 dlls/setupapi/tests/diskspace.c | 80 +-- dlls/setupapi/tests/install.c | 428 +++++++------- dlls/setupapi/tests/misc.c | 162 +++-- dlls/setupapi/tests/parser.c | 76 +- dlls/setupapi/tests/query.c | 36 + dlls/setupapi/tests/setupcab.c | 44 + dlls/setupapi/tests/stringtable.c | 48 +- 10 files changed, 1013 insertions(+), 1014 deletions(-)
diff --git a/dlls/setupapi/tests/Makefile.in b/dlls/setupapi/tests/Makefile.in index 438a2e09bcc..df7c6687875 100644 --- a/dlls/setupapi/tests/Makefile.in +++ b/dlls/setupapi/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = setupapi.dll IMPORTS = advapi32 cabinet ole32 setupapi shell32 uuid user32
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index 91eaba84a3c..bfa564fe746 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -54,9 +54,9 @@ static void create_file(const char *name, const char *data) BOOL ret;
file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failed to create %s, error %u.\n", name, GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Failed to create %s, error %lu.\n", name, GetLastError()); ret = WriteFile(file, data, strlen(data), &size, NULL); - ok(ret && size == strlen(data), "Failed to write %s, error %u.\n", name, GetLastError()); + ok(ret && size == strlen(data), "Failed to write %s, error %lu.\n", name, GetLastError()); CloseHandle(file); }
@@ -68,7 +68,7 @@ static void load_resource(const char *name, const char *filename) void *ptr;
file = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %d\n", filename, GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %ld\n", filename, GetLastError());
res = FindResourceA(NULL, name, "TESTDLL"); ok( res != 0, "couldn't find resource\n" ); @@ -89,7 +89,7 @@ static void test_create_device_list_ex(void) SetLastError(0xdeadbeef); set = SetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, notnull); ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); set = SetupDiCreateDeviceInfoListExW(NULL, NULL, machine, NULL); @@ -97,19 +97,19 @@ static void test_create_device_list_ex(void) ok(GetLastError() == ERROR_INVALID_MACHINENAME || GetLastError() == ERROR_MACHINE_UNAVAILABLE || GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, - "Got unexpected error %#x.\n", GetLastError()); + "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiCreateDeviceInfoListExW(NULL, NULL, empty, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError()); }
static void test_open_class_key(void) @@ -122,18 +122,18 @@ static void test_open_class_key(void) class_key = SetupDiOpenClassRegKeyExA(&guid, KEY_ALL_ACCESS, DIOCR_INSTALLER, NULL, NULL); ok(class_key == INVALID_HANDLE_VALUE, "Expected failure.\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_CLASS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_CLASS, "Got unexpected error %#lx.\n", GetLastError());
root_key = SetupDiOpenClassRegKey(NULL, KEY_ALL_ACCESS); - ok(root_key != INVALID_HANDLE_VALUE, "Failed to open root key, error %#x.\n", GetLastError()); + ok(root_key != INVALID_HANDLE_VALUE, "Failed to open root key, error %#lx.\n", GetLastError());
res = RegCreateKeyA(root_key, guidstr, &class_key); - ok(!res, "Failed to create class key, error %#x.\n", GetLastError()); + ok(!res, "Failed to create class key, error %#lx.\n", GetLastError()); RegCloseKey(class_key);
SetLastError(0xdeadbeef); class_key = SetupDiOpenClassRegKeyExA(&guid, KEY_ALL_ACCESS, DIOCR_INSTALLER, NULL, NULL); - ok(class_key != INVALID_HANDLE_VALUE, "Failed to open class key, error %#x.\n", GetLastError()); + ok(class_key != INVALID_HANDLE_VALUE, "Failed to open class key, error %#lx.\n", GetLastError()); RegCloseKey(class_key);
RegDeleteKeyA(root_key, guidstr); @@ -182,28 +182,28 @@ static void test_install_class(void)
ret = SetupDiInstallClassA(NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiInstallClassA(NULL, NULL, DI_NOVCP, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiInstallClassA(NULL, tmpfile + 2, DI_NOVCP, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiInstallClassA(NULL, tmpfile + 2, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Got unexpected error %#lx.\n", GetLastError());
/* The next call will succeed. Information is put into the registry but the * location(s) is/are depending on the Windows version. */ ret = SetupDiInstallClassA(NULL, tmpfile, 0, NULL); - ok(ret, "Failed to install class, error %#x.\n", GetLastError()); + ok(ret, "Failed to install class, error %#lx.\n", GetLastError());
ret = RegDeleteKeyW(HKEY_LOCAL_MACHINE, classKey); - ok(!ret, "Failed to delete class key, error %u.\n", GetLastError()); + ok(!ret, "Failed to delete class key, error %lu.\n", GetLastError()); DeleteFileA(tmpfile); }
@@ -217,18 +217,18 @@ static void check_device_info_(int line, HDEVINFO set, int index, const GUID *cl ret = SetupDiEnumDeviceInfo(set, index, &device); if (expect_id) { - ok_(__FILE__, line)(ret, "Got unexpected error %#x.\n", GetLastError()); + ok_(__FILE__, line)(ret, "Got unexpected error %#lx.\n", GetLastError()); ok_(__FILE__, line)(IsEqualGUID(&device.ClassGuid, class), "Got unexpected class %s.\n", wine_dbgstr_guid(&device.ClassGuid)); ret = SetupDiGetDeviceInstanceIdA(set, &device, id, sizeof(id), NULL); - ok_(__FILE__, line)(ret, "Got unexpected error %#x.\n", GetLastError()); + ok_(__FILE__, line)(ret, "Got unexpected error %#lx.\n", GetLastError()); ok_(__FILE__, line)(!strcasecmp(id, expect_id), "Got unexpected id %s.\n", id); } else { ok_(__FILE__, line)(!ret, "Expected failure.\n"); ok_(__FILE__, line)(GetLastError() == ERROR_NO_MORE_ITEMS, - "Got unexpected error %#x.\n", GetLastError()); + "Got unexpected error %#lx.\n", GetLastError()); } } #define check_device_info(a,b,c,d) check_device_info_(__LINE__,a,b,c,d) @@ -245,33 +245,33 @@ static void test_device_info(void) SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(NULL, NULL, NULL, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DEVINST_NAME, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DEVINST_NAME, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(NULL, "Root\LEGACY_BOGUS\0000", NULL, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device info, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device info, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", NULL, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &deadbeef, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_CLASS_MISMATCH, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_CLASS_MISMATCH, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &GUID_NULL, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_CLASS_MISMATCH, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_CLASS_MISMATCH, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, NULL); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\0000"); check_device_info(set, 1, &guid, NULL); @@ -279,12 +279,12 @@ static void test_device_info(void) SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_DEVINST_ALREADY_EXISTS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_DEVINST_ALREADY_EXISTS, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0001", &guid, NULL, NULL, 0, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\0000"); check_device_info(set, 1, &guid, "ROOT\LEGACY_BOGUS\0001"); @@ -292,11 +292,11 @@ static void test_device_info(void)
device.cbSize = sizeof(device); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0002", &guid, NULL, NULL, 0, &device); - ok(ret, "Got unexpected error %#x.\n", GetLastError()); + ok(ret, "Got unexpected error %#lx.\n", GetLastError()); ok(IsEqualGUID(&device.ClassGuid, &guid), "Got unexpected class %s.\n", wine_dbgstr_guid(&device.ClassGuid)); ret = SetupDiGetDeviceInstanceIdA(set, &device, id, sizeof(id), NULL); - ok(ret, "Got unexpected error %#x.\n", GetLastError()); + ok(ret, "Got unexpected error %#lx.\n", GetLastError()); ok(!strcmp(id, "ROOT\LEGACY_BOGUS\0002"), "Got unexpected id %s.\n", id);
check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\0000"); @@ -305,27 +305,27 @@ static void test_device_info(void) check_device_info(set, 3, &guid, NULL);
ret = SetupDiEnumDeviceInfo(set, 0, &ret_device); - ok(ret, "Failed to enumerate devices, error %#x.\n", GetLastError()); + ok(ret, "Failed to enumerate devices, error %#lx.\n", GetLastError()); ret = SetupDiDeleteDeviceInfo(set, &ret_device); - ok(ret, "Failed to delete device, error %#x.\n", GetLastError()); + ok(ret, "Failed to delete device, error %#lx.\n", GetLastError());
check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\0001"); check_device_info(set, 1, &guid, "ROOT\LEGACY_BOGUS\0002"); check_device_info(set, 2, &guid, NULL);
ret = SetupDiRemoveDevice(set, &device); - ok(ret, "Got unexpected error %#x.\n", GetLastError()); + ok(ret, "Got unexpected error %#lx.\n", GetLastError());
check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\0001");
ret = SetupDiEnumDeviceInfo(set, 1, &ret_device); - ok(ret, "Got unexpected error %#x.\n", GetLastError()); + ok(ret, "Got unexpected error %#lx.\n", GetLastError()); ok(IsEqualGUID(&ret_device.ClassGuid, &guid), "Got unexpected class %s.\n", wine_dbgstr_guid(&ret_device.ClassGuid)); ret = SetupDiGetDeviceInstanceIdA(set, &ret_device, id, sizeof(id), NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_NO_SUCH_DEVINST, "Got unexpected error %#x.\n", GetLastError()); - ok(ret_device.DevInst == device.DevInst, "Expected device node %#x, got %#x.\n", + ok(GetLastError() == ERROR_NO_SUCH_DEVINST, "Got unexpected error %#lx.\n", GetLastError()); + ok(ret_device.DevInst == device.DevInst, "Expected device node %#lx, got %#lx.\n", device.DevInst, ret_device.DevInst);
check_device_info(set, 2, &guid, NULL); @@ -333,21 +333,21 @@ static void test_device_info(void) SetupDiDestroyDeviceInfoList(set);
set = SetupDiCreateDeviceInfoList(NULL, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device info, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device info, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", NULL, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\deadbeef", &deadbeef, NULL, NULL, 0, NULL); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\null", &GUID_NULL, NULL, NULL, 0, NULL); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\testguid", &guid, NULL, NULL, 0, NULL); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
check_device_info(set, 0, &deadbeef, "ROOT\LEGACY_BOGUS\deadbeef"); check_device_info(set, 1, &GUID_NULL, "ROOT\LEGACY_BOGUS\null"); @@ -360,26 +360,26 @@ static void test_device_info(void) SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(set, id, &guid, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DEVINST_NAME, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DEVINST_NAME, "Got unexpected error %#lx.\n", GetLastError());
id[MAX_DEVICE_ID_LEN] = 0; SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInfoA(set, id, &guid, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DEVINST_NAME, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DEVINST_NAME, "Got unexpected error %#lx.\n", GetLastError());
id[MAX_DEVICE_ID_LEN - 1] = 0; ret = SetupDiCreateDeviceInfoA(set, id, &guid, NULL, NULL, 0, NULL); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
SetupDiDestroyDeviceInfoList(set);
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ret = SetupDiRegisterDeviceInfo(set , &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError()); check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\0000"); check_device_info(set, 1, NULL, NULL); SetupDiDestroyDeviceInfoList(set); @@ -387,7 +387,7 @@ static void test_device_info(void) set = SetupDiCreateDeviceInfoList(&guid, NULL); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); ok(!ret, "Expect failure\n"); - ok(GetLastError() == ERROR_DEVINST_ALREADY_EXISTS, "Got error %#x\n", GetLastError()); + ok(GetLastError() == ERROR_DEVINST_ALREADY_EXISTS, "Got error %#lx\n", GetLastError()); check_device_info(set, 0, NULL, NULL); SetupDiDestroyDeviceInfoList(set);
@@ -395,7 +395,7 @@ static void test_device_info(void) while (SetupDiEnumDeviceInfo(set, i++, &device)) { ret = SetupDiRemoveDevice(set, &device); - ok(ret, "Failed to remove device, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove device, error %#lx.\n", GetLastError()); } SetupDiDestroyDeviceInfoList(set); } @@ -424,10 +424,10 @@ static void test_device_property(void) }
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device_data); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
/* SetupDiSetDevicePropertyW */ /* #1 Null device info list */ @@ -435,56 +435,56 @@ static void test_device_property(void) ret = pSetupDiSetDevicePropertyW(NULL, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_HANDLE, "Expect last error %#x, got %#x\n", ERROR_INVALID_HANDLE, err); + ok(err == ERROR_INVALID_HANDLE, "Expect last error %#x, got %#lx\n", ERROR_INVALID_HANDLE, err);
/* #2 Null device */ SetLastError(0xdeadbeef); ret = pSetupDiSetDevicePropertyW(set, NULL, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_PARAMETER, "Expect last error %#x, got %#x\n", ERROR_INVALID_PARAMETER, err); + ok(err == ERROR_INVALID_PARAMETER, "Expect last error %#x, got %#lx\n", ERROR_INVALID_PARAMETER, err);
/* #3 Null property key pointer */ SetLastError(0xdeadbeef); ret = pSetupDiSetDevicePropertyW(set, &device_data, NULL, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_DATA, "Expect last error %#x, got %#x\n", ERROR_INVALID_DATA, err); + ok(err == ERROR_INVALID_DATA, "Expect last error %#x, got %#lx\n", ERROR_INVALID_DATA, err);
/* #4 Invalid property key type */ SetLastError(0xdeadbeef); ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, 0xffff, (const BYTE *)valueW, sizeof(valueW), 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_DATA, "Expect last error %#x, got %#x\n", ERROR_INVALID_DATA, err); + ok(err == ERROR_INVALID_DATA, "Expect last error %#x, got %#lx\n", ERROR_INVALID_DATA, err);
/* #5 Null buffer pointer */ SetLastError(0xdeadbeef); ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, NULL, sizeof(valueW), 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INVALID_USER_BUFFER, err); + ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#lx\n", ERROR_INVALID_USER_BUFFER, err);
/* #6 Zero buffer size */ SetLastError(0xdeadbeef); ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, 0, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_DATA, "Expect last error %#x, got %#x\n", ERROR_INVALID_DATA, err); + ok(err == ERROR_INVALID_DATA, "Expect last error %#x, got %#lx\n", ERROR_INVALID_DATA, err);
/* #7 Flags not zero */ SetLastError(0xdeadbeef); ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 1); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_FLAGS, "Expect last error %#x, got %#x\n", ERROR_INVALID_FLAGS, err); + ok(err == ERROR_INVALID_FLAGS, "Expect last error %#x, got %#lx\n", ERROR_INVALID_FLAGS, err);
/* #8 Normal */ SetLastError(0xdeadbeef); ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); err = GetLastError(); ok(ret, "Expect success\n"); - ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); + ok(err == NO_ERROR, "Expect last error %#x, got %#lx\n", NO_ERROR, err);
/* #9 Delete property with buffer not null */ ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); @@ -493,7 +493,7 @@ static void test_device_property(void) ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_EMPTY, (const BYTE *)valueW, 0, 0); err = GetLastError(); ok(ret, "Expect success\n"); - ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); + ok(err == NO_ERROR, "Expect last error %#x, got %#lx\n", NO_ERROR, err);
/* #10 Delete property with size not zero */ ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); @@ -502,7 +502,7 @@ static void test_device_property(void) ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_EMPTY, NULL, sizeof(valueW), 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INVALID_USER_BUFFER, err); + ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#lx\n", ERROR_INVALID_USER_BUFFER, err);
/* #11 Delete property */ ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); @@ -511,14 +511,14 @@ static void test_device_property(void) ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_EMPTY, NULL, 0, 0); err = GetLastError(); ok(ret, "Expect success\n"); - ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); + ok(err == NO_ERROR, "Expect last error %#x, got %#lx\n", NO_ERROR, err);
/* #12 Delete non-existent property */ SetLastError(0xdeadbeef); ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_EMPTY, NULL, 0, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_NOT_FOUND, "Expect last error %#x, got %#x\n", ERROR_NOT_FOUND, err); + ok(err == ERROR_NOT_FOUND, "Expect last error %#x, got %#lx\n", ERROR_NOT_FOUND, err);
/* #13 Delete property value with buffer not null */ ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); @@ -527,7 +527,7 @@ static void test_device_property(void) ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_NULL, (const BYTE *)valueW, 0, 0); err = GetLastError(); ok(ret, "Expect success\n"); - ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); + ok(err == NO_ERROR, "Expect last error %#x, got %#lx\n", NO_ERROR, err);
/* #14 Delete property value with size not zero */ ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); @@ -536,7 +536,7 @@ static void test_device_property(void) ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_NULL, NULL, sizeof(valueW), 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INVALID_USER_BUFFER, err); + ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#lx\n", ERROR_INVALID_USER_BUFFER, err);
/* #15 Delete property value */ ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); @@ -545,14 +545,14 @@ static void test_device_property(void) ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_NULL, NULL, 0, 0); err = GetLastError(); ok(ret, "Expect success\n"); - ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); + ok(err == NO_ERROR, "Expect last error %#x, got %#lx\n", NO_ERROR, err);
/* #16 Delete non-existent property value */ SetLastError(0xdeadbeef); ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_NULL, NULL, 0, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_NOT_FOUND, "Expect last error %#x, got %#x\n", ERROR_NOT_FOUND, err); + ok(err == ERROR_NOT_FOUND, "Expect last error %#x, got %#lx\n", ERROR_NOT_FOUND, err);
/* SetupDiGetDevicePropertyW */ @@ -566,9 +566,9 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(NULL, &device_data, &DEVPKEY_Device_FriendlyName, &type, buffer, sizeof(buffer), &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_HANDLE, "Expect last error %#x, got %#x\n", ERROR_INVALID_HANDLE, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == 0, "Expect size %d, got %d\n", 0, size); + ok(err == ERROR_INVALID_HANDLE, "Expect last error %#x, got %#lx\n", ERROR_INVALID_HANDLE, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == 0, "Expect size %d, got %ld\n", 0, size);
/* #2 Null device */ SetLastError(0xdeadbeef); @@ -577,9 +577,9 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, NULL, &DEVPKEY_Device_FriendlyName, &type, buffer, sizeof(buffer), &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_PARAMETER, "Expect last error %#x, got %#x\n", ERROR_INVALID_PARAMETER, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == 0, "Expect size %d, got %d\n", 0, size); + ok(err == ERROR_INVALID_PARAMETER, "Expect last error %#x, got %#lx\n", ERROR_INVALID_PARAMETER, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == 0, "Expect size %d, got %ld\n", 0, size);
/* #3 Null property key */ SetLastError(0xdeadbeef); @@ -588,8 +588,8 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, NULL, &type, buffer, sizeof(buffer), &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_DATA, "Expect last error %#x, got %#x\n", ERROR_INVALID_DATA, err); - ok(size == 0, "Expect size %d, got %d\n", 0, size); + ok(err == ERROR_INVALID_DATA, "Expect last error %#x, got %#lx\n", ERROR_INVALID_DATA, err); + ok(size == 0, "Expect size %d, got %ld\n", 0, size);
/* #4 Null property type */ SetLastError(0xdeadbeef); @@ -598,9 +598,9 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, NULL, buffer, sizeof(buffer), &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INVALID_USER_BUFFER, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == 0, "Expect size %d, got %d\n", 0, size); + ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#lx\n", ERROR_INVALID_USER_BUFFER, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == 0, "Expect size %d, got %ld\n", 0, size);
/* #5 Null buffer */ SetLastError(0xdeadbeef); @@ -609,9 +609,9 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, &type, NULL, sizeof(buffer), &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INVALID_USER_BUFFER, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == 0, "Expect size %d, got %d\n", 0, size); + ok(err == ERROR_INVALID_USER_BUFFER, "Expect last error %#x, got %#lx\n", ERROR_INVALID_USER_BUFFER, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == 0, "Expect size %d, got %ld\n", 0, size);
/* #6 Null buffer with zero size and wrong type */ SetLastError(0xdeadbeef); @@ -620,9 +620,9 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, &type, NULL, 0, &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INSUFFICIENT_BUFFER, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == sizeof(valueW), "Got size %d\n", size); + ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#lx\n", ERROR_INSUFFICIENT_BUFFER, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == sizeof(valueW), "Got size %ld\n", size);
/* #7 Zero buffer size */ SetLastError(0xdeadbeef); @@ -631,9 +631,9 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, &type, buffer, 0, &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INSUFFICIENT_BUFFER, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == sizeof(valueW), "Got size %d\n", size); + ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#lx\n", ERROR_INSUFFICIENT_BUFFER, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == sizeof(valueW), "Got size %ld\n", size);
/* #8 Null required size */ SetLastError(0xdeadbeef); @@ -641,8 +641,8 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, &type, buffer, sizeof(buffer), NULL, 0); err = GetLastError(); ok(ret, "Expect success\n"); - ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); + ok(err == NO_ERROR, "Expect last error %#x, got %#lx\n", NO_ERROR, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type);
/* #9 Flags not zero */ SetLastError(0xdeadbeef); @@ -651,9 +651,9 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, &type, buffer, sizeof(buffer), &size, 1); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INVALID_FLAGS, "Expect last error %#x, got %#x\n", ERROR_INVALID_FLAGS, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == 0, "Expect size %d, got %d\n", 0, size); + ok(err == ERROR_INVALID_FLAGS, "Expect last error %#x, got %#lx\n", ERROR_INVALID_FLAGS, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == 0, "Expect size %d, got %ld\n", 0, size);
/* #10 Non-existent property key */ SetLastError(0xdeadbeef); @@ -662,8 +662,8 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_HardwareIds, &type, buffer, sizeof(buffer), &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_NOT_FOUND, "Expect last error %#x, got %#x\n", ERROR_NOT_FOUND, err); - ok(size == 0, "Expect size %d, got %d\n", 0, size); + ok(err == ERROR_NOT_FOUND, "Expect last error %#x, got %#lx\n", ERROR_NOT_FOUND, err); + ok(size == 0, "Expect size %d, got %ld\n", 0, size);
/* #11 Wrong property key type */ SetLastError(0xdeadbeef); @@ -673,9 +673,9 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, &type, buffer, sizeof(buffer), &size, 0); err = GetLastError(); ok(ret, "Expect success\n"); - ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == sizeof(valueW), "Got size %d\n", size); + ok(err == NO_ERROR, "Expect last error %#x, got %#lx\n", NO_ERROR, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == sizeof(valueW), "Got size %ld\n", size); ok(!lstrcmpW((WCHAR *)buffer, valueW), "Expect buffer %s, got %s\n", wine_dbgstr_w(valueW), wine_dbgstr_w((WCHAR *)buffer));
/* #12 Get null property value */ @@ -689,8 +689,8 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, &type, buffer, sizeof(buffer), &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_NOT_FOUND, "Expect last error %#x, got %#x\n", ERROR_NOT_FOUND, err); - ok(size == 0, "Expect size %d, got %d\n", 0, size); + ok(err == ERROR_NOT_FOUND, "Expect last error %#x, got %#lx\n", ERROR_NOT_FOUND, err); + ok(size == 0, "Expect size %d, got %ld\n", 0, size);
/* #13 Insufficient buffer size */ ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); @@ -701,9 +701,9 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, &type, buffer, sizeof(valueW) - 1, &size, 0); err = GetLastError(); ok(!ret, "Expect failure\n"); - ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#x\n", ERROR_INSUFFICIENT_BUFFER, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == sizeof(valueW), "Got size %d\n", size); + ok(err == ERROR_INSUFFICIENT_BUFFER, "Expect last error %#x, got %#lx\n", ERROR_INSUFFICIENT_BUFFER, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == sizeof(valueW), "Got size %ld\n", size);
/* #14 Normal */ ret = pSetupDiSetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, DEVPROP_TYPE_STRING, (const BYTE *)valueW, sizeof(valueW), 0); @@ -715,13 +715,13 @@ static void test_device_property(void) ret = pSetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_FriendlyName, &type, buffer, sizeof(buffer), &size, 0); err = GetLastError(); ok(ret, "Expect success\n"); - ok(err == NO_ERROR, "Expect last error %#x, got %#x\n", NO_ERROR, err); - ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#x\n", DEVPROP_TYPE_STRING, type); - ok(size == sizeof(valueW), "Got size %d\n", size); + ok(err == NO_ERROR, "Expect last error %#x, got %#lx\n", NO_ERROR, err); + ok(type == DEVPROP_TYPE_STRING, "Expect type %#x, got %#lx\n", DEVPROP_TYPE_STRING, type); + ok(size == sizeof(valueW), "Got size %ld\n", size); ok(!lstrcmpW((WCHAR *)buffer, valueW), "Expect buffer %s, got %s\n", wine_dbgstr_w(valueW), wine_dbgstr_w((WCHAR *)buffer));
ret = SetupDiRemoveDevice(set, &device_data); - ok(ret, "Got unexpected error %#x.\n", GetLastError()); + ok(ret, "Got unexpected error %#lx.\n", GetLastError());
SetupDiDestroyDeviceInfoList(set); FreeLibrary(hmod); @@ -738,54 +738,54 @@ static void test_get_device_instance_id(void) SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInstanceIdA(NULL, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInstanceIdA(NULL, &device, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInstanceIdA(set, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInstanceIdA(set, &device, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInstanceIdA(set, &device, NULL, 0, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
device.cbSize = sizeof(device); SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInstanceIdA(set, &device, NULL, 0, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInstanceIdA(set, &device, NULL, 0, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiGetDeviceInstanceIdA(set, &device, id, sizeof(id), NULL); - ok(ret, "Failed to get device id, error %#x.\n", GetLastError()); + ok(ret, "Failed to get device id, error %#lx.\n", GetLastError()); ok(!strcmp(id, "ROOT\LEGACY_BOGUS\0000"), "Got unexpected id %s.\n", id);
ret = SetupDiCreateDeviceInfoA(set, "LEGACY_BOGUS", &guid, NULL, NULL, DICD_GENERATE_ID, &device); - ok(ret, "SetupDiCreateDeviceInfoA failed: %08x\n", GetLastError()); + ok(ret, "SetupDiCreateDeviceInfoA failed: %08lx\n", GetLastError());
ret = SetupDiGetDeviceInstanceIdA(set, &device, id, sizeof(id), NULL); - ok(ret, "Failed to get device id, error %#x.\n", GetLastError()); + ok(ret, "Failed to get device id, error %#lx.\n", GetLastError()); ok(!strcmp(id, "ROOT\LEGACY_BOGUS\0001"), "Got unexpected id %s.\n", id);
SetupDiDestroyDeviceInfoList(set); @@ -800,40 +800,40 @@ static void test_open_device_info(void) BOOL ret;
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device info, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device info, error %#lx.\n", GetLastError());
/* Open non-existent device */ SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(set, "Root\LEGACY_BOGUS\FFFF", NULL, 0, &device); - ok(GetLastError() == ERROR_NO_SUCH_DEVINST, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_NO_SUCH_DEVINST, "Got unexpected error %#lx.\n", GetLastError()); ok(!ret, "Expected failure.\n"); check_device_info(set, 0, NULL, NULL);
/* Open unregistered device */ ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\1000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(set, "Root\LEGACY_BOGUS\1000", NULL, 0, &device); - ok(GetLastError() == ERROR_NO_SUCH_DEVINST, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_NO_SUCH_DEVINST, "Got unexpected error %#lx.\n", GetLastError()); ok(!ret, "Expected failure.\n"); check_device_info(set, 0, &guid, "Root\LEGACY_BOGUS\1000"); check_device_info(set, 1, NULL, NULL);
/* Open registered device */ ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\1001", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError()); check_device_info(set, 0, &guid, "Root\LEGACY_BOGUS\1000"); check_device_info(set, 1, &guid, "Root\LEGACY_BOGUS\1001"); check_device_info(set, 2, NULL, NULL);
SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(set, "Root\LEGACY_BOGUS\1001", NULL, 0, &device); - ok(GetLastError() == NO_ERROR, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == NO_ERROR, "Got unexpected error %#lx.\n", GetLastError()); ok(ret, "Failed to open device info\n"); ret = SetupDiGetDeviceInstanceIdA(set, &device, id, sizeof(id), NULL); - ok(ret, "Got unexpected error %#x.\n", GetLastError()); + ok(ret, "Got unexpected error %#lx.\n", GetLastError()); ok(!strcasecmp(id, "Root\LEGACY_BOGUS\1001"), "Got unexpected id %s.\n", id); check_device_info(set, 0, &guid, "Root\LEGACY_BOGUS\1000"); check_device_info(set, 1, &guid, "Root\LEGACY_BOGUS\1001"); @@ -842,14 +842,14 @@ static void test_open_device_info(void) /* Open registered device in an empty device info set */ SetupDiDestroyDeviceInfoList(set); set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(set, "Root\LEGACY_BOGUS\1001", NULL, 0, &device); - ok(GetLastError() == NO_ERROR, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == NO_ERROR, "Got unexpected error %#lx.\n", GetLastError()); ok(ret, "Failed to open device info\n"); ret = SetupDiGetDeviceInstanceIdA(set, &device, id, sizeof(id), NULL); - ok(ret, "Got unexpected error %#x.\n", GetLastError()); + ok(ret, "Got unexpected error %#lx.\n", GetLastError()); ok(!strcasecmp(id, "Root\LEGACY_BOGUS\1001"), "Got unexpected id %s.\n", id); check_device_info(set, 0, &guid, "Root\LEGACY_BOGUS\1001"); check_device_info(set, 1, NULL, NULL); @@ -857,10 +857,10 @@ static void test_open_device_info(void) /* Open registered device again */ SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(set, "Root\LEGACY_BOGUS\1001", NULL, 0, &device); - ok(GetLastError() == NO_ERROR, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == NO_ERROR, "Got unexpected error %#lx.\n", GetLastError()); ok(ret, "Failed to open device info\n"); ret = SetupDiGetDeviceInstanceIdA(set, &device, id, sizeof(id), NULL); - ok(ret, "Got unexpected error %#x.\n", GetLastError()); + ok(ret, "Got unexpected error %#lx.\n", GetLastError()); ok(!strcasecmp(id, "Root\LEGACY_BOGUS\1001"), "Got unexpected id %s.\n", id); check_device_info(set, 0, &guid, "Root\LEGACY_BOGUS\1001"); check_device_info(set, 1, NULL, NULL); @@ -868,40 +868,40 @@ static void test_open_device_info(void) /* Open registered device in a new device info set with wrong GUID */ SetupDiDestroyDeviceInfoList(set); set = SetupDiCreateDeviceInfoList(&guid2, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(set, "Root\LEGACY_BOGUS\1001", NULL, 0, &device); - ok(GetLastError() == ERROR_CLASS_MISMATCH, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_CLASS_MISMATCH, "Got unexpected error %#lx.\n", GetLastError()); ok(!ret, "Expected failure.\n"); check_device_info(set, 0, NULL, NULL);
/* Open registered device in a new device info set with NULL GUID */ SetupDiDestroyDeviceInfoList(set); set = SetupDiCreateDeviceInfoList(NULL, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(set, "Root\LEGACY_BOGUS\1001", NULL, 0, &device); - ok(GetLastError() == NO_ERROR, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == NO_ERROR, "Got unexpected error %#lx.\n", GetLastError()); ok(ret, "Failed to open device info\n"); check_device_info(set, 0, &guid, "Root\LEGACY_BOGUS\1001"); check_device_info(set, 1, NULL, NULL);
SetupDiDestroyDeviceInfoList(set); set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#lx.\n", GetLastError());
/* NULL set */ SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(NULL, "Root\LEGACY_BOGUS\1001", NULL, 0, &device); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError()); ok(!ret, "Expected failure.\n");
/* NULL instance id */ SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(set, NULL, NULL, 0, &device); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError()); ok(!ret, "Expected failure.\n"); check_device_info(set, 0, NULL, NULL);
@@ -910,19 +910,19 @@ static void test_open_device_info(void) device.cbSize = 0; ret = SetupDiOpenDeviceInfoA(set, "Root\LEGACY_BOGUS\1001", NULL, 0, &device); device.cbSize = sizeof(device); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); ok(!ret, "Expected failure.\n"); check_device_info(set, 0, &guid, "Root\LEGACY_BOGUS\1001"); check_device_info(set, 1, NULL, NULL);
SetupDiDestroyDeviceInfoList(set); set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device info list, error %#lx.\n", GetLastError());
/* NULL device */ SetLastError(0xdeadbeef); ret = SetupDiOpenDeviceInfoA(set, "Root\LEGACY_BOGUS\1001", NULL, 0, NULL); - ok(GetLastError() == NO_ERROR, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == NO_ERROR, "Got unexpected error %#lx.\n", GetLastError()); ok(ret, "Failed to open device info\n"); check_device_info(set, 0, &guid, "Root\LEGACY_BOGUS\1001"); check_device_info(set, 1, NULL, NULL); @@ -933,7 +933,7 @@ static void test_open_device_info(void) while (SetupDiEnumDeviceInfo(set, i++, &device)) { ret = SetupDiRemoveDevice(set, &device); - ok(ret, "Failed to remove device, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove device, error %#lx.\n", GetLastError()); } SetupDiDestroyDeviceInfoList(set); } @@ -953,64 +953,64 @@ static void test_register_device_info(void) SetLastError(0xdeadbeef); ret = SetupDiRegisterDeviceInfo(NULL, NULL, 0, NULL, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiRegisterDeviceInfo(set, NULL, 0, NULL, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
device.cbSize = sizeof(device); SetLastError(0xdeadbeef); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); RegOpenKeyA(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Enum\ROOT\LEGACY_BOGUS\0000", &hkey); size = sizeof(phantom); ls = RegQueryValueExA(hkey, "Phantom", NULL, &type, (BYTE *)&phantom, &size); - ok(ls == ERROR_SUCCESS, "Got wrong error code %#x\n", ls); - ok(phantom == 1, "Got wrong phantom value %d\n", phantom); - ok(type == REG_DWORD, "Got wrong phantom type %#x\n", type); - ok(size == sizeof(phantom), "Got wrong phantom size %d\n", size); + ok(ls == ERROR_SUCCESS, "Got wrong error code %#lx\n", ls); + ok(phantom == 1, "Got wrong phantom value %ld\n", phantom); + ok(type == REG_DWORD, "Got wrong phantom type %#lx\n", type); + ok(size == sizeof(phantom), "Got wrong phantom size %ld\n", size); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError()); size = sizeof(phantom); ls = RegQueryValueExA(hkey, "Phantom", NULL, NULL, (BYTE *)&phantom, &size); - ok(ls == ERROR_FILE_NOT_FOUND, "Got wrong error code %#x\n", ls); + ok(ls == ERROR_FILE_NOT_FOUND, "Got wrong error code %#lx\n", ls); RegCloseKey(hkey);
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0001", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError()); ret = SetupDiRemoveDevice(set, &device); - ok(ret, "Failed to remove device, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove device, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0002", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError()); ret = SetupDiDeleteDeviceInfo(set, &device); - ok(ret, "Failed to remove device, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove device, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0003", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
SetupDiDestroyDeviceInfoList(set);
set = SetupDiGetClassDevsA(&guid, NULL, NULL, 0); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
check_device_info(set, 0, &guid, "Root\LEGACY_BOGUS\0000"); check_device_info(set, 1, &guid, "Root\LEGACY_BOGUS\0002"); @@ -1019,7 +1019,7 @@ static void test_register_device_info(void) while (SetupDiEnumDeviceInfo(set, i++, &device)) { ret = SetupDiRemoveDevice(set, &device); - ok(ret, "Failed to remove device, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove device, error %#lx.\n", GetLastError()); }
SetupDiDestroyDeviceInfoList(set); @@ -1051,12 +1051,12 @@ static void check_device_iface_(int line, HDEVINFO set, SP_DEVINFO_DATA *device, ret = SetupDiEnumDeviceInterfaces(set, device, class, index, &iface); if (path) { - ok_(__FILE__, line)(ret, "Failed to enumerate interfaces, error %#x.\n", GetLastError()); + ok_(__FILE__, line)(ret, "Failed to enumerate interfaces, error %#lx.\n", GetLastError()); ok_(__FILE__, line)(IsEqualGUID(&iface.InterfaceClassGuid, class), "Got unexpected class %s.\n", wine_dbgstr_guid(&iface.InterfaceClassGuid)); - ok_(__FILE__, line)(iface.Flags == flags, "Got unexpected flags %#x.\n", iface.Flags); + ok_(__FILE__, line)(iface.Flags == flags, "Got unexpected flags %#lx.\n", iface.Flags); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, detail, sizeof(buffer), NULL, NULL); - ok_(__FILE__, line)(ret, "Failed to get interface detail, error %#x.\n", GetLastError()); + ok_(__FILE__, line)(ret, "Failed to get interface detail, error %#lx.\n", GetLastError()); ok_(__FILE__, line)(!strcasecmp(detail->DevicePath, path), "Got unexpected path %s.\n", detail->DevicePath); check_all_lower_case(line, detail->DevicePath); } @@ -1064,7 +1064,7 @@ static void check_device_iface_(int line, HDEVINFO set, SP_DEVINFO_DATA *device, { ok_(__FILE__, line)(!ret, "Expected failure.\n"); ok_(__FILE__, line)(GetLastError() == ERROR_NO_MORE_ITEMS, - "Got unexpected error %#x.\n", GetLastError()); + "Got unexpected error %#lx.\n", GetLastError()); } } #define check_device_iface(a,b,c,d,e,f) check_device_iface_(__LINE__,a,b,c,d,e,f) @@ -1083,64 +1083,64 @@ static void test_device_iface(void) SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInterfaceA(NULL, NULL, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInterfaceA(NULL, NULL, &guid, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInterfaceA(set, NULL, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInterfaceA(set, &device, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
device.cbSize = sizeof(device); ret = SetupDiCreateDeviceInfoA(set, "ROOT\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
check_device_iface(set, &device, &guid, 0, 0, NULL);
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInterfaceA(set, &device, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid, NULL, 0, NULL); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError());
check_device_iface(set, &device, &guid, 0, 0, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}"); check_device_iface(set, &device, &guid, 1, 0, NULL);
/* Creating the same interface a second time succeeds */ ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid, NULL, 0, NULL); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError());
check_device_iface(set, &device, &guid, 0, 0, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}"); check_device_iface(set, &device, &guid, 1, 0, NULL);
ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid, "Oogah", 0, NULL); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError());
check_device_iface(set, &device, &guid, 0, 0, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}"); check_device_iface(set, &device, &guid, 1, 0, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}\Oogah"); check_device_iface(set, &device, &guid, 2, 0, NULL);
ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid, "test", 0, &iface); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError()); ok(IsEqualGUID(&iface.InterfaceClassGuid, &guid), "Got unexpected class %s.\n", wine_dbgstr_guid(&iface.InterfaceClassGuid)); - ok(iface.Flags == 0, "Got unexpected flags %#x.\n", iface.Flags); + ok(iface.Flags == 0, "Got unexpected flags %#lx.\n", iface.Flags); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, detail, sizeof(buffer), NULL, NULL); - ok(ret, "Failed to get interface detail, error %#x.\n", GetLastError()); + ok(ret, "Failed to get interface detail, error %#lx.\n", GetLastError()); ok(!strcasecmp(detail->DevicePath, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}\test"), "Got unexpected path %s.\n", detail->DevicePath);
@@ -1150,32 +1150,32 @@ static void test_device_iface(void) check_device_iface(set, &device, &guid, 3, 0, NULL);
ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid2, NULL, 0, NULL); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError());
check_device_iface(set, &device, &guid2, 0, 0, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A5-3F65-11DB-B704-0011955C2BDB}"); check_device_iface(set, &device, &guid2, 1, 0, NULL);
ret = SetupDiEnumDeviceInterfaces(set, &device, &guid2, 0, &iface); - ok(ret, "Failed to enumerate interfaces, error %#x.\n", GetLastError()); + ok(ret, "Failed to enumerate interfaces, error %#lx.\n", GetLastError()); ret = SetupDiRemoveDeviceInterface(set, &iface); - ok(ret, "Failed to remove interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove interface, error %#lx.\n", GetLastError());
check_device_iface(set, &device, &guid2, 0, SPINT_REMOVED, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A5-3F65-11DB-B704-0011955C2BDB}"); check_device_iface(set, &device, &guid2, 1, 0, NULL);
ret = SetupDiEnumDeviceInterfaces(set, &device, &guid, 0, &iface); - ok(ret, "Failed to enumerate interfaces, error %#x.\n", GetLastError()); + ok(ret, "Failed to enumerate interfaces, error %#lx.\n", GetLastError()); ret = SetupDiDeleteDeviceInterfaceData(set, &iface); - ok(ret, "Failed to delete interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to delete interface, error %#lx.\n", GetLastError());
check_device_iface(set, &device, &guid, 0, 0, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}\Oogah"); check_device_iface(set, &device, &guid, 1, 0, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}\test"); check_device_iface(set, &device, &guid, 2, 0, NULL);
ret = SetupDiCreateDeviceInfoA(set, "ROOT\LEGACY_BOGUS\0001", &guid, NULL, NULL, 0, &device2); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInterfaceA(set, &device2, &guid, NULL, 0, NULL); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError());
check_device_iface(set, NULL, &guid, 0, 0, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}\Oogah"); check_device_iface(set, NULL, &guid, 1, 0, "\\?\ROOT#LEGACY_BOGUS#0000#{6A55B5A4-3F65-11DB-B704-0011955C2BDB}\test"); @@ -1183,7 +1183,7 @@ static void test_device_iface(void) check_device_iface(set, NULL, &guid, 3, 0, NULL);
ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError()); }
static void test_device_iface_detail(void) @@ -1199,37 +1199,37 @@ static void test_device_iface_detail(void) SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInterfaceDetailA(NULL, NULL, NULL, 0, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInterfaceDetailA(set, NULL, NULL, 0, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "ROOT\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid, NULL, 0, &iface); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, NULL, 0, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, NULL, 100, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, NULL, 0, &size, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
detail = heap_alloc(size); expectedsize = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_W, DevicePath[strlen(path) + 1]); @@ -1238,30 +1238,30 @@ static void test_device_iface_detail(void) SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, detail, size, &size, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
detail->cbSize = size; SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, detail, size, &size, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
detail->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA_A); SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, detail, size, &size, NULL); - ok(ret, "Failed to get interface detail, error %#x.\n", GetLastError()); + ok(ret, "Failed to get interface detail, error %#lx.\n", GetLastError()); ok(!strcasecmp(path, detail->DevicePath), "Got unexpected path %s.\n", detail->DevicePath);
ret = SetupDiGetDeviceInterfaceDetailW(set, &iface, NULL, 0, &size, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); - ok(size == expectedsize, "Got unexpected size %d.\n", size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); + ok(size == expectedsize, "Got unexpected size %ld.\n", size);
memset(&device, 0, sizeof(device)); device.cbSize = sizeof(device); ret = SetupDiGetDeviceInterfaceDetailW(set, &iface, NULL, 0, &size, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); ok(IsEqualGUID(&device.ClassGuid, &guid), "Got unexpected class %s.\n", wine_dbgstr_guid(&device.ClassGuid));
heap_free(detail); @@ -1289,62 +1289,62 @@ static void test_device_key(void) SetLastError(0xdeadbeef); key = SetupDiCreateDevRegKeyW(NULL, NULL, 0, 0, 0, NULL, NULL); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
res = RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key); ok(res != ERROR_SUCCESS, "Key should not exist.\n"); RegCloseKey(key);
ret = SetupDiCreateDeviceInfoA(set, "ROOT\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ok(!RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key), "Key should exist.\n"); RegCloseKey(key);
SetLastError(0xdeadbeef); key = SetupDiOpenDevRegKey(NULL, NULL, 0, 0, 0, 0); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); key = SetupDiOpenDevRegKey(set, NULL, 0, 0, 0, 0); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); key = SetupDiOpenDevRegKey(set, &device, 0, 0, 0, 0); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_FLAGS, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); key = SetupDiOpenDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, 0, 0); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_FLAGS, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); key = SetupDiOpenDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_BOTH, 0); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_FLAGS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_FLAGS, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); key = SetupDiOpenDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DRV, 0); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_DEVINFO_NOT_REGISTERED, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_DEVINFO_NOT_REGISTERED, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); key = SetupDiOpenDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DRV, 0); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_KEY_DOES_NOT_EXIST, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_KEY_DOES_NOT_EXIST, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DRIVER, NULL, (BYTE *)driver_path, sizeof(driver_path), NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); res = RegOpenKeyA(HKEY_LOCAL_MACHINE, class_key_path, &key); @@ -1354,24 +1354,24 @@ static void test_device_key(void) /* Vista+ will fail the following call to SetupDiCreateDevKeyW() if the * class key doesn't exist. */ res = RegCreateKeyA(HKEY_LOCAL_MACHINE, class_key_path, &key); - ok(!res, "Failed to create class key, error %u.\n", res); + ok(!res, "Failed to create class key, error %lu.\n", res); RegCloseKey(key);
key = SetupDiCreateDevRegKeyW(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DRV, NULL, NULL); - ok(key != INVALID_HANDLE_VALUE, "Failed to create device key, error %#x.\n", GetLastError()); + ok(key != INVALID_HANDLE_VALUE, "Failed to create device key, error %#lx.\n", GetLastError()); RegCloseKey(key);
ok(!RegOpenKeyA(HKEY_LOCAL_MACHINE, class_key_path, &key), "Key should exist.\n"); RegCloseKey(key);
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Class", &class_key); - ok(!res, "Failed to open class key, error %u.\n", res); + ok(!res, "Failed to open class key, error %lu.\n", res);
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DRIVER, NULL, (BYTE *)driver_path, sizeof(driver_path), NULL); - ok(ret, "Failed to get driver property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get driver property, error %#lx.\n", GetLastError()); res = RegOpenKeyA(class_key, driver_path, &key); - ok(!res, "Failed to open driver key, error %u.\n", res); + ok(!res, "Failed to open driver key, error %lu.\n", res); RegSetValueExA(key, "foo", 0, REG_SZ, (BYTE *)"bar", sizeof("bar")); RegCloseKey(key);
@@ -1380,68 +1380,68 @@ static void test_device_key(void) todo_wine { ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); ok(GetLastError() == ERROR_INVALID_DATA || GetLastError() == ERROR_ACCESS_DENIED, /* win2k3 */ - "Got unexpected error %#x.\n", GetLastError()); + "Got unexpected error %#lx.\n", GetLastError()); }
key = SetupDiOpenDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DRV, KEY_READ); - ok(key != INVALID_HANDLE_VALUE, "Failed to open device key, error %#x.\n", GetLastError()); + ok(key != INVALID_HANDLE_VALUE, "Failed to open device key, error %#lx.\n", GetLastError()); size = sizeof(data); res = RegQueryValueExA(key, "foo", NULL, NULL, (BYTE *)data, &size); - ok(!res, "Failed to get value, error %u.\n", res); + ok(!res, "Failed to get value, error %lu.\n", res); ok(!strcmp(data, "bar"), "Got wrong data %s.\n", data); RegCloseKey(key);
ret = SetupDiDeleteDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DRV); - ok(ret, "Failed to delete device key, error %#x.\n", GetLastError()); + ok(ret, "Failed to delete device key, error %#lx.\n", GetLastError());
res = RegOpenKeyA(class_key, driver_path, &key); ok(res == ERROR_FILE_NOT_FOUND, "Key should not exist.\n");
key = SetupDiOpenDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DRV, 0); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_KEY_DOES_NOT_EXIST, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_KEY_DOES_NOT_EXIST, "Got unexpected error %#lx.\n", GetLastError());
key = SetupDiOpenDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_READ); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_KEY_DOES_NOT_EXIST, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_KEY_DOES_NOT_EXIST, "Got unexpected error %#lx.\n", GetLastError());
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, params_key_path, &key); ok(res == ERROR_FILE_NOT_FOUND, "Key should not exist.\n");
key = SetupDiCreateDevRegKeyA(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DEV, NULL, NULL); - ok(key != INVALID_HANDLE_VALUE, "Got unexpected error %#x.\n", GetLastError()); + ok(key != INVALID_HANDLE_VALUE, "Got unexpected error %#lx.\n", GetLastError()); RegCloseKey(key);
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, params_key_path, &key); - ok(!res, "Failed to open device key, error %u.\n", res); + ok(!res, "Failed to open device key, error %lu.\n", res); res = RegSetValueExA(key, "foo", 0, REG_SZ, (BYTE *)"bar", sizeof("bar")); - ok(!res, "Failed to set value, error %u.\n", res); + ok(!res, "Failed to set value, error %lu.\n", res); RegCloseKey(key);
key = SetupDiOpenDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_READ); - ok(key != INVALID_HANDLE_VALUE, "Got unexpected error %#x.\n", GetLastError()); + ok(key != INVALID_HANDLE_VALUE, "Got unexpected error %#lx.\n", GetLastError()); size = sizeof(data); res = RegQueryValueExA(key, "foo", NULL, NULL, (BYTE *)data, &size); - ok(!res, "Failed to get value, error %u.\n", res); + ok(!res, "Failed to get value, error %lu.\n", res); ok(!strcmp(data, "bar"), "Got wrong data %s.\n", data); RegCloseKey(key);
ret = SetupDiDeleteDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DEV); - ok(ret, "Got unexpected error %#x.\n", GetLastError()); + ok(ret, "Got unexpected error %#lx.\n", GetLastError());
key = SetupDiOpenDevRegKey(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DEV, KEY_READ); ok(key == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_KEY_DOES_NOT_EXIST, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_KEY_DOES_NOT_EXIST, "Got unexpected error %#lx.\n", GetLastError());
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, params_key_path, &key); ok(res == ERROR_FILE_NOT_FOUND, "Key should not exist.\n");
key = SetupDiCreateDevRegKeyW(set, &device, DICS_FLAG_GLOBAL, 0, DIREG_DRV, NULL, NULL); - ok(key != INVALID_HANDLE_VALUE, "Failed to create device key, error %#x.\n", GetLastError()); + ok(key != INVALID_HANDLE_VALUE, "Failed to create device key, error %#lx.\n", GetLastError()); RegCloseKey(key);
ret = SetupDiRemoveDevice(set, &device); - ok(ret, "Failed to remove device, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove device, error %#lx.\n", GetLastError()); SetupDiDestroyDeviceInfoList(set);
res = RegOpenKeyA(class_key, driver_path, &key); @@ -1449,7 +1449,7 @@ todo_wine {
/* Vista+ deletes the key automatically. */ res = RegDeleteKeyA(HKEY_LOCAL_MACHINE, class_key_path); - ok(!res || res == ERROR_FILE_NOT_FOUND, "Failed to delete class key, error %u.\n", res); + ok(!res || res == ERROR_FILE_NOT_FOUND, "Failed to delete class key, error %lu.\n", res);
RegCloseKey(class_key); } @@ -1469,45 +1469,45 @@ static void test_register_device_iface(void) LONG res;
set = SetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
res = RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key); ok(res == ERROR_FILE_NOT_FOUND, "Key should not exist.\n");
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid, NULL, 0, &iface); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid, "removed", 0, &iface); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid, "deleted", 0, &iface); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError()); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError());
ret = SetupDiEnumDeviceInterfaces(set, &device, &guid, 1, &iface); - ok(ret, "Failed to enumerate interfaces, error %#x.\n", GetLastError()); + ok(ret, "Failed to enumerate interfaces, error %#lx.\n", GetLastError()); ret = SetupDiRemoveDeviceInterface(set, &iface); - ok(ret, "Failed to delete interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to delete interface, error %#lx.\n", GetLastError()); ret = SetupDiEnumDeviceInterfaces(set, &device, &guid, 2, &iface); - ok(ret, "Failed to enumerate interfaces, error %#x.\n", GetLastError()); + ok(ret, "Failed to enumerate interfaces, error %#lx.\n", GetLastError()); ret = SetupDiDeleteDeviceInterfaceData(set, &iface); - ok(ret, "Failed to delete interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to delete interface, error %#lx.\n", GetLastError());
set2 = SetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); - ok(set2 != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set2 != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
check_device_iface(set2, NULL, &guid, 0, 0, "\\?\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}"); check_device_iface(set2, NULL, &guid, 1, 0, "\\?\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\deleted"); check_device_iface(set2, NULL, &guid, 2, 0, NULL);
ret = SetupDiEnumDeviceInfo(set2, 0, &device2); - ok(ret, "Failed to enumerate devices, error %#x.\n", GetLastError()); + ok(ret, "Failed to enumerate devices, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInterfaceA(set2, &device2, &guid, "second", 0, NULL); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError());
ret = SetupDiRemoveDevice(set, &device); - ok(ret, "Failed to remove device, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove device, error %#lx.\n", GetLastError());
check_device_iface(set, NULL, &guid, 0, SPINT_REMOVED, "\\?\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}"); check_device_iface(set, NULL, &guid, 1, SPINT_REMOVED, "\\?\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\removed"); @@ -1524,13 +1524,13 @@ static void test_register_device_iface(void) /* make sure all interface keys are deleted when a device is removed */
set = SetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
set2 = SetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); - ok(set2 != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set2 != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_iface(set2, NULL, &guid, 0, 0, NULL); SetupDiDestroyDeviceInfoList(set2);
@@ -1549,26 +1549,26 @@ static void test_registry_property_a(void) HKEY key;
set = SetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "Failed to get device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to get device list, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "LEGACY_BOGUS", &guid, NULL, NULL, DICD_GENERATE_ID, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyA(NULL, NULL, -1, NULL, 0); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyA(set, NULL, -1, NULL, 0); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyA(set, &device, -1, NULL, 0); ok(!ret, "Expected failure.\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_REG_PROPERTY, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_REG_PROPERTY, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiSetDeviceRegistryPropertyA(set, &device, SPDRP_FRIENDLYNAME, NULL, 0); todo_wine @@ -1577,23 +1577,23 @@ static void test_registry_property_a(void)
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyA(set, &device, SPDRP_FRIENDLYNAME, (BYTE *)"Bogus", sizeof("Bogus")); - ok(ret, "Failed to set property, error %#x.\n", GetLastError()); + ok(ret, "Failed to set property, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyA(NULL, NULL, -1, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyA(set, NULL, -1, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, -1, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_REG_PROPERTY, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_REG_PROPERTY, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_FRIENDLYNAME, NULL, NULL, sizeof("Bogus"), NULL); ok(!ret, "Expected failure, got %d\n", ret); @@ -1602,34 +1602,34 @@ static void test_registry_property_a(void) SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_FRIENDLYNAME, NULL, NULL, 0, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); - ok(size == sizeof("Bogus"), "Got unexpected size %d.\n", size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); + ok(size == sizeof("Bogus"), "Got unexpected size %ld.\n", size);
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_FRIENDLYNAME, NULL, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!strcmp(buf, "Bogus"), "Got unexpected property %s.\n", buf);
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_FRIENDLYNAME, &type, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!strcmp(buf, "Bogus"), "Got unexpected property %s.\n", buf); - ok(type == REG_SZ, "Got unexpected type %d.\n", type); + ok(type == REG_SZ, "Got unexpected type %ld.\n", type);
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyA(set, &device, SPDRP_FRIENDLYNAME, NULL, 0); - ok(ret, "Failed to set property, error %#x.\n", GetLastError()); + ok(ret, "Failed to set property, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_FRIENDLYNAME, NULL, (BYTE *)buf, sizeof(buf), &size); todo_wine { ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError()); }
ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_HARDWAREID, NULL, NULL, 0, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError());
SetupDiDestroyDeviceInfoList(set);
@@ -1638,56 +1638,56 @@ todo_wine {
/* Test existing registry properties right after device creation */ set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
/* Create device from a not registered class without device name */ ret = SetupDiCreateDeviceInfoA(set, "LEGACY_BOGUS", &guid, NULL, NULL, DICD_GENERATE_ID, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
/* No SPDRP_DEVICEDESC property */ SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DEVICEDESC, NULL, (BYTE *)buf, sizeof(buf), NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError());
/* No SPDRP_CLASS property */ SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CLASS, NULL, (BYTE *)buf, sizeof(buf), NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError());
/* Have SPDRP_CLASSGUID property */ memset(buf, 0, sizeof(buf)); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CLASSGUID, NULL, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!lstrcmpiA(buf, "{6a55b5a4-3f65-11db-b704-0011955c2bdb}"), "Got unexpected value %s.\n", buf);
ret = SetupDiDeleteDeviceInfo(set, &device); - ok(ret, "Failed to delete device, error %#x.\n", GetLastError()); + ok(ret, "Failed to delete device, error %#lx.\n", GetLastError());
/* Create device from a not registered class with a device name */ ret = SetupDiCreateDeviceInfoA(set, "LEGACY_BOGUS", &guid, "device_name", NULL, DICD_GENERATE_ID, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
/* Have SPDRP_DEVICEDESC property */ memset(buf, 0, sizeof(buf)); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_DEVICEDESC, NULL, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!lstrcmpA(buf, "device_name"), "Got unexpected value %s.\n", buf);
SetupDiDestroyDeviceInfoList(set);
/* Create device from a registered class */ set = SetupDiCreateDeviceInfoList(&GUID_DEVCLASS_DISPLAY, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "display", &GUID_DEVCLASS_DISPLAY, NULL, NULL, DICD_GENERATE_ID, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
/* Have SPDRP_CLASS property */ memset(buf, 0, sizeof(buf)); ret = SetupDiGetDeviceRegistryPropertyA(set, &device, SPDRP_CLASS, NULL, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!lstrcmpA(buf, "Display"), "Got unexpected value %s.\n", buf);
SetupDiDestroyDeviceInfoList(set); @@ -1709,26 +1709,26 @@ static void test_registry_property_w(void) 'L','E','G','A','C','Y','_','B','O','G','U','S',0};
set = SetupDiGetClassDevsA(&guid, NULL, 0, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "Failed to get device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to get device list, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "LEGACY_BOGUS", &guid, NULL, NULL, DICD_GENERATE_ID, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyW(NULL, NULL, -1, NULL, 0); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyW(set, NULL, -1, NULL, 0); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyW(set, &device, -1, NULL, 0); ok(!ret, "Expected failure.\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_REG_PROPERTY, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_REG_PROPERTY, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiSetDeviceRegistryPropertyW(set, &device, SPDRP_FRIENDLYNAME, NULL, 0); todo_wine @@ -1737,23 +1737,23 @@ static void test_registry_property_w(void)
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyW(set, &device, SPDRP_FRIENDLYNAME, (BYTE *)friendly_name, sizeof(friendly_name)); - ok(ret, "Failed to set property, error %#x.\n", GetLastError()); + ok(ret, "Failed to set property, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyW(NULL, NULL, -1, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyW(set, NULL, -1, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, -1, NULL, NULL, 0, NULL); ok(!ret, "Expected failure.\n"); todo_wine - ok(GetLastError() == ERROR_INVALID_REG_PROPERTY, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_REG_PROPERTY, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_FRIENDLYNAME, NULL, NULL, sizeof(buf), NULL); ok(!ret, "Expected failure.\n"); @@ -1762,34 +1762,34 @@ static void test_registry_property_w(void) SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_FRIENDLYNAME, NULL, NULL, 0, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); - ok(size == sizeof(friendly_name), "Got unexpected size %d.\n", size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); + ok(size == sizeof(friendly_name), "Got unexpected size %ld.\n", size);
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_FRIENDLYNAME, NULL, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!lstrcmpW(buf, friendly_name), "Got unexpected property %s.\n", wine_dbgstr_w(buf));
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_FRIENDLYNAME, &type, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!lstrcmpW(buf, friendly_name), "Got unexpected property %s.\n", wine_dbgstr_w(buf)); - ok(type == REG_SZ, "Got unexpected type %d.\n", type); + ok(type == REG_SZ, "Got unexpected type %ld.\n", type);
SetLastError(0xdeadbeef); ret = SetupDiSetDeviceRegistryPropertyW(set, &device, SPDRP_FRIENDLYNAME, NULL, 0); - ok(ret, "Failed to set property, error %#x.\n", GetLastError()); + ok(ret, "Failed to set property, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_FRIENDLYNAME, NULL, (BYTE *)buf, sizeof(buf), &size); todo_wine { ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError()); }
ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_HARDWAREID, NULL, NULL, 0, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError());
SetupDiDestroyDeviceInfoList(set);
@@ -1798,56 +1798,56 @@ todo_wine {
/* Test existing registry properties right after device creation */ set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
/* Create device from a not registered class without device name */ ret = SetupDiCreateDeviceInfoW(set, L"LEGACY_BOGUS", &guid, NULL, NULL, DICD_GENERATE_ID, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
/* No SPDRP_DEVICEDESC property */ SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_DEVICEDESC, NULL, (BYTE *)buf, sizeof(buf), NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError());
/* No SPDRP_CLASS property */ SetLastError(0xdeadbeef); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_CLASS, NULL, (BYTE *)buf, sizeof(buf), NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError());
/* Have SPDRP_CLASSGUID property */ memset(buf, 0, sizeof(buf)); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_CLASSGUID, NULL, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!lstrcmpiW(buf, L"{6a55b5a4-3f65-11db-b704-0011955c2bdb}"), "Got unexpected value %s.\n", wine_dbgstr_w(buf));
ret = SetupDiDeleteDeviceInfo(set, &device); - ok(ret, "Failed to delete device, error %#x.\n", GetLastError()); + ok(ret, "Failed to delete device, error %#lx.\n", GetLastError());
/* Create device from a not registered class with a device name */ ret = SetupDiCreateDeviceInfoW(set, L"LEGACY_BOGUS", &guid, L"device_name", NULL, DICD_GENERATE_ID, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
/* Have SPDRP_DEVICEDESC property */ memset(buf, 0, sizeof(buf)); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_DEVICEDESC, NULL, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!lstrcmpW(buf, L"device_name"), "Got unexpected value %s.\n", wine_dbgstr_w(buf));
SetupDiDestroyDeviceInfoList(set);
/* Create device from a registered class */ set = SetupDiCreateDeviceInfoList(&GUID_DEVCLASS_DISPLAY, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoW(set, L"display", &GUID_DEVCLASS_DISPLAY, NULL, NULL, DICD_GENERATE_ID, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
/* Have SPDRP_CLASS property */ memset(buf, 0, sizeof(buf)); ret = SetupDiGetDeviceRegistryPropertyW(set, &device, SPDRP_CLASS, NULL, (BYTE *)buf, sizeof(buf), NULL); - ok(ret, "Failed to get property, error %#x.\n", GetLastError()); + ok(ret, "Failed to get property, error %#lx.\n", GetLastError()); ok(!lstrcmpW(buf, L"Display"), "Got unexpected value %s.\n", wine_dbgstr_w(buf));
SetupDiDestroyDeviceInfoList(set); @@ -1876,37 +1876,37 @@ static void test_get_inf_class(void) retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(ERROR_FILE_NOT_FOUND == GetLastError(), - "expected error ERROR_FILE_NOT_FOUND, got %u\n", GetLastError()); + "expected error ERROR_FILE_NOT_FOUND, got %lu\n", GetLastError());
/* missing file wins against other invalid parameter */ SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, NULL, cn, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(ERROR_FILE_NOT_FOUND == GetLastError(), - "expected error ERROR_FILE_NOT_FOUND, got %u\n", GetLastError()); + "expected error ERROR_FILE_NOT_FOUND, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, &guid, NULL, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(ERROR_FILE_NOT_FOUND == GetLastError(), - "expected error ERROR_FILE_NOT_FOUND, got %u\n", GetLastError()); + "expected error ERROR_FILE_NOT_FOUND, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, &guid, cn, 0, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(ERROR_FILE_NOT_FOUND == GetLastError(), - "expected error ERROR_FILE_NOT_FOUND, got %u\n", GetLastError()); + "expected error ERROR_FILE_NOT_FOUND, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, NULL); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(ERROR_FILE_NOT_FOUND == GetLastError(), - "expected error ERROR_FILE_NOT_FOUND, got %u\n", GetLastError()); + "expected error ERROR_FILE_NOT_FOUND, got %lu\n", GetLastError());
/* test file content */ h = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(h != INVALID_HANDLE_VALUE, "Failed to create file, error %#x.\n", GetLastError()); + ok(h != INVALID_HANDLE_VALUE, "Failed to create file, error %#lx.\n", GetLastError()); CloseHandle(h);
retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, &count); @@ -1917,7 +1917,7 @@ static void test_get_inf_class(void) trace("testing signature %s\n", signatures[i]); h = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(h != INVALID_HANDLE_VALUE, "Failed to create file, error %#x.\n", GetLastError()); + ok(h != INVALID_HANDLE_VALUE, "Failed to create file, error %#lx.\n", GetLastError()); WriteFile(h, content, sizeof(content), &count, NULL); CloseHandle(h);
@@ -1933,46 +1933,46 @@ static void test_get_inf_class(void)
count = 0xdeadbeef; retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, &count); - ok(retval, "expected SetupDiGetINFClassA to succeed! error %u\n", GetLastError()); - ok(count == 5, "expected count==5, got %u\n", count); + ok(retval, "expected SetupDiGetINFClassA to succeed! error %lu\n", GetLastError()); + ok(count == 5, "expected count==5, got %lu\n", count);
count = 0xdeadbeef; retval = SetupDiGetINFClassA(filename, &guid, cn, 5, &count); - ok(retval, "expected SetupDiGetINFClassA to succeed! error %u\n", GetLastError()); - ok(count == 5, "expected count==5, got %u\n", count); + ok(retval, "expected SetupDiGetINFClassA to succeed! error %lu\n", GetLastError()); + ok(count == 5, "expected count==5, got %lu\n", count);
count = 0xdeadbeef; SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, &guid, cn, 4, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(ERROR_INSUFFICIENT_BUFFER == GetLastError(), - "expected error ERROR_INSUFFICIENT_BUFFER, got %u\n", GetLastError()); - ok(count == 5, "expected count==5, got %u\n", count); + "expected error ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); + ok(count == 5, "expected count==5, got %lu\n", count);
/* invalid parameter */ SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(NULL, &guid, cn, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, NULL, cn, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, &guid, NULL, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "expected error ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); retval = SetupDiGetINFClassA(filename, &guid, cn, 0, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_INVALID_PARAMETER /* 2k3+ */, - "Got unexpected error %#x.\n", GetLastError()); + "Got unexpected error %#lx.\n", GetLastError());
DeleteFileA(filename);
@@ -1983,7 +1983,7 @@ static void test_get_inf_class(void) retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, &count); ok(!retval, "expected SetupDiGetINFClassA to fail!\n"); ok(GetLastError() == RPC_S_INVALID_STRING_UUID || GetLastError() == ERROR_INVALID_PARAMETER /* 7+ */, - "Got unexpected error %#x.\n", GetLastError()); + "Got unexpected error %#lx.\n", GetLastError());
/* network adapter guid */ WritePrivateProfileStringA("Version", "ClassGUID", @@ -1992,9 +1992,9 @@ static void test_get_inf_class(void) /* this test succeeds only if the guid is known to the system */ count = 0xdeadbeef; retval = SetupDiGetINFClassA(filename, &guid, cn, MAX_PATH, &count); - ok(retval, "expected SetupDiGetINFClassA to succeed! error %u\n", GetLastError()); + ok(retval, "expected SetupDiGetINFClassA to succeed! error %lu\n", GetLastError()); todo_wine - ok(count == 4, "expected count==4, got %u(%s)\n", count, cn); + ok(count == 4, "expected count==4, got %lu(%s)\n", count, cn);
DeleteFileA(filename); } @@ -2008,13 +2008,13 @@ static void test_devnode(void) DWORD ret;
set = SetupDiGetClassDevsA(&guid, NULL, NULL, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevs failed: %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevs failed: %#lx\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "SetupDiCreateDeviceInfo failed: %#x\n", GetLastError()); + ok(ret, "SetupDiCreateDeviceInfo failed: %#lx\n", GetLastError());
ret = CM_Get_Device_IDA(device.DevInst, buffer, sizeof(buffer), 0); - ok(!ret, "got %#x\n", ret); + ok(!ret, "got %#lx\n", ret); ok(!strcmp(buffer, "ROOT\LEGACY_BOGUS\0000"), "got %s\n", buffer);
SetupDiDestroyDeviceInfoList(set); @@ -2033,38 +2033,38 @@ static void test_device_interface_key(void) LONG sz, ret;
set = SetupDiGetClassDevsA(NULL, NULL, 0, DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevs failed: %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "SetupDiGetClassDevs failed: %#lx\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "ROOT\LEGACY_BOGUS\0001", &guid, NULL, NULL, 0, &devinfo); - ok(ret, "SetupDiCreateDeviceInfo failed: %#x\n", GetLastError()); + ok(ret, "SetupDiCreateDeviceInfo failed: %#lx\n", GetLastError());
ret = SetupDiCreateDeviceInterfaceA(set, &devinfo, &guid, NULL, 0, &iface); - ok(ret, "SetupDiCreateDeviceInterface failed: %#x\n", GetLastError()); + ok(ret, "SetupDiCreateDeviceInterface failed: %#lx\n", GetLastError());
ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, keypath, &parent); - ok(!ret, "failed to open device parent key: %u\n", ret); + ok(!ret, "failed to open device parent key: %lu\n", ret);
ret = RegOpenKeyA(parent, "#\Device Parameters", &key); ok(ret == ERROR_FILE_NOT_FOUND, "key shouldn't exist\n");
dikey = SetupDiCreateDeviceInterfaceRegKeyA(set, &iface, 0, KEY_ALL_ACCESS, NULL, NULL); - ok(dikey != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(dikey != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
ret = RegOpenKeyA(parent, "#\Device Parameters", &key); - ok(!ret, "key should exist: %u\n", ret); + ok(!ret, "key should exist: %lu\n", ret);
ret = RegSetValueA(key, NULL, REG_SZ, "test", 5); - ok(!ret, "RegSetValue failed: %u\n", ret); + ok(!ret, "RegSetValue failed: %lu\n", ret); sz = sizeof(buffer); ret = RegQueryValueA(dikey, NULL, buffer, &sz); - ok(!ret, "RegQueryValue failed: %u\n", ret); + ok(!ret, "RegQueryValue failed: %lu\n", ret); ok(!strcmp(buffer, "test"), "got wrong data %s\n", buffer);
RegCloseKey(dikey); RegCloseKey(key);
ret = SetupDiDeleteDeviceInterfaceRegKey(set, &iface, 0); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = RegOpenKeyA(parent, "#\Device Parameters", &key); ok(ret == ERROR_FILE_NOT_FOUND, "key shouldn't exist\n"); @@ -2087,15 +2087,15 @@ static void test_open_device_interface_key(void) BOOL ret;
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx\n", GetLastError());
device.cbSize = sizeof(device); ret = SetupDiCreateDeviceInfoA(set, "ROOT\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
iface.cbSize = sizeof(iface); ret = SetupDiCreateDeviceInterfaceA(set, &device, &guid, NULL, 0, &iface); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError());
/* Test open before creation */ key = SetupDiOpenDeviceInterfaceRegKey(set, &iface, 0, KEY_ALL_ACCESS); @@ -2103,34 +2103,34 @@ static void test_open_device_interface_key(void)
/* Test opened key is from SetupDiCreateDeviceInterfaceRegKey */ key = SetupDiCreateDeviceInterfaceRegKeyW(set, &iface, 0, KEY_ALL_ACCESS, NULL, NULL); - ok(key != INVALID_HANDLE_VALUE, "Failed to create interface registry key, error %#x\n", GetLastError()); + ok(key != INVALID_HANDLE_VALUE, "Failed to create interface registry key, error %#lx\n", GetLastError());
lr = RegSetValueA(key, NULL, REG_SZ, "test", 5); - ok(!lr, "RegSetValue failed, error %#x\n", lr); + ok(!lr, "RegSetValue failed, error %#lx\n", lr);
RegCloseKey(key);
key = SetupDiOpenDeviceInterfaceRegKey(set, &iface, 0, KEY_ALL_ACCESS); - ok(key != INVALID_HANDLE_VALUE, "Failed to open interface registry key, error %#x\n", GetLastError()); + ok(key != INVALID_HANDLE_VALUE, "Failed to open interface registry key, error %#lx\n", GetLastError());
size = sizeof(buffer); lr = RegQueryValueA(key, NULL, buffer, &size); - ok(!lr, "RegQueryValue failed, error %#x\n", lr); + ok(!lr, "RegQueryValue failed, error %#lx\n", lr); ok(!strcmp(buffer, "test"), "got wrong data %s\n", buffer);
RegCloseKey(key);
/* Test open after removal */ ret = SetupDiRemoveDeviceInterface(set, &iface); - ok(ret, "Failed to remove device interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove device interface, error %#lx.\n", GetLastError());
key = SetupDiOpenDeviceInterfaceRegKey(set, &iface, 0, KEY_ALL_ACCESS); ok(key == INVALID_HANDLE_VALUE, "Expect open interface registry key failure\n");
ret = SetupDiRemoveDevice(set, &device); - ok(ret, "Failed to remove device, error %#x.\n", GetLastError()); + ok(ret, "Failed to remove device, error %#lx.\n", GetLastError()); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError()); }
static void test_device_install_params(void) @@ -2141,64 +2141,64 @@ static void test_device_install_params(void) BOOL ret;
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
params.cbSize = sizeof(params) - 1; SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInstallParamsA(set, &device, ¶ms); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
params.cbSize = sizeof(params) + 1; SetLastError(0xdeadbeef); ret = SetupDiGetDeviceInstallParamsA(set, &device, ¶ms); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
params.cbSize = sizeof(params) - 1; SetLastError(0xdeadbeef); ret = SetupDiSetDeviceInstallParamsA(set, &device, ¶ms); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
params.cbSize = sizeof(params) + 1; SetLastError(0xdeadbeef); ret = SetupDiSetDeviceInstallParamsA(set, &device, ¶ms); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
memset(¶ms, 0xcc, sizeof(params)); params.cbSize = sizeof(params); ret = SetupDiGetDeviceInstallParamsA(set, &device, ¶ms); - ok(ret, "Failed to get device install params, error %#x.\n", GetLastError()); - ok(!params.Flags, "Got flags %#x.\n", params.Flags); - ok(!params.FlagsEx, "Got extended flags %#x.\n", params.FlagsEx); + ok(ret, "Failed to get device install params, error %#lx.\n", GetLastError()); + ok(!params.Flags, "Got flags %#lx.\n", params.Flags); + ok(!params.FlagsEx, "Got extended flags %#lx.\n", params.FlagsEx); ok(!params.hwndParent, "Got parent %p.\n", params.hwndParent); ok(!params.InstallMsgHandler, "Got callback %p.\n", params.InstallMsgHandler); ok(!params.InstallMsgHandlerContext, "Got callback context %p.\n", params.InstallMsgHandlerContext); ok(!params.FileQueue, "Got queue %p.\n", params.FileQueue); - ok(!params.ClassInstallReserved, "Got class installer data %#lx.\n", params.ClassInstallReserved); + ok(!params.ClassInstallReserved, "Got class installer data %#Ix.\n", params.ClassInstallReserved); ok(!params.DriverPath[0], "Got driver path %s.\n", params.DriverPath);
params.Flags = DI_INF_IS_SORTED; params.FlagsEx = DI_FLAGSEX_ALLOWEXCLUDEDDRVS; strcpy(params.DriverPath, "C:\windows"); ret = SetupDiSetDeviceInstallParamsA(set, &device, ¶ms); - ok(ret, "Failed to set device install params, error %#x.\n", GetLastError()); + ok(ret, "Failed to set device install params, error %#lx.\n", GetLastError());
memset(¶ms, 0xcc, sizeof(params)); params.cbSize = sizeof(params); ret = SetupDiGetDeviceInstallParamsA(set, &device, ¶ms); - ok(ret, "Failed to get device install params, error %#x.\n", GetLastError()); - ok(params.Flags == DI_INF_IS_SORTED, "Got flags %#x.\n", params.Flags); - ok(params.FlagsEx == DI_FLAGSEX_ALLOWEXCLUDEDDRVS, "Got extended flags %#x.\n", params.FlagsEx); + ok(ret, "Failed to get device install params, error %#lx.\n", GetLastError()); + ok(params.Flags == DI_INF_IS_SORTED, "Got flags %#lx.\n", params.Flags); + ok(params.FlagsEx == DI_FLAGSEX_ALLOWEXCLUDEDDRVS, "Got extended flags %#lx.\n", params.FlagsEx); ok(!params.hwndParent, "Got parent %p.\n", params.hwndParent); ok(!params.InstallMsgHandler, "Got callback %p.\n", params.InstallMsgHandler); ok(!params.InstallMsgHandlerContext, "Got callback context %p.\n", params.InstallMsgHandlerContext); ok(!params.FileQueue, "Got queue %p.\n", params.FileQueue); - ok(!params.ClassInstallReserved, "Got class installer data %#lx.\n", params.ClassInstallReserved); + ok(!params.ClassInstallReserved, "Got class installer data %#Ix.\n", params.ClassInstallReserved); ok(!strcasecmp(params.DriverPath, "C:\windows"), "Got driver path %s.\n", params.DriverPath);
SetupDiDestroyDeviceInfoList(set); @@ -2257,63 +2257,63 @@ static void test_get_actual_section(void) create_file(inf_path, inf_data);
hinf = SetupOpenInfFileA(inf_path, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#x.\n", GetLastError()); + ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#lx.\n", GetLastError());
ret = SetupDiGetActualSectionToInstallA(hinf, "section1", section, ARRAY_SIZE(section), NULL, NULL); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcmp(section, "section1"), "Got unexpected section %s.\n", section);
size = 0xdeadbeef; ret = SetupDiGetActualSectionToInstallA(hinf, "section1", NULL, 5, &size, NULL); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); - ok(size == 9, "Got size %u.\n", size); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); + ok(size == 9, "Got size %lu.\n", size);
SetLastError(0xdeadbeef); size = 0xdeadbeef; ret = SetupDiGetActualSectionToInstallA(hinf, "section1", section, 5, &size, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); - ok(size == 9, "Got size %u.\n", size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); + ok(size == 9, "Got size %lu.\n", size);
SetLastError(0xdeadbeef); ret = SetupDiGetActualSectionToInstallA(hinf, "section1", section, ARRAY_SIZE(section), &size, NULL); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section1"), "Got unexpected section %s.\n", section); - ok(size == 9, "Got size %u.\n", size); + ok(size == 9, "Got size %lu.\n", size);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section2", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section2.NT"), "Got unexpected section %s.\n", section); ok(extptr == section + 8, "Got extension %s.\n", extptr);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section3", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section3.NT" MYEXT), "Got unexpected section %s.\n", section); ok(extptr == section + 8, "Got extension %s.\n", extptr);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section4", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section4.NT" MYEXT), "Got unexpected section %s.\n", section); ok(extptr == section + 8, "Got extension %s.\n", extptr);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section5", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section5.NT"), "Got unexpected section %s.\n", section); ok(extptr == section + 8, "Got extension %s.\n", extptr);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section6", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section6.NT" MYEXT), "Got unexpected section %s.\n", section); ok(extptr == section + 8, "Got extension %s.\n", extptr);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section9", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section9.NT" MYEXT), "Got unexpected section %s.\n", section); ok(extptr == section + 8, "Got extension %s.\n", extptr);
@@ -2322,38 +2322,38 @@ static void test_get_actual_section(void) /* For some reason, these calls hang on Windows 10 1809+. */ extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section1", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section1"), "Got unexpected section %s.\n", section); ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section7", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section7"), "Got unexpected section %s.\n", section); ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section8", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section8"), "Got unexpected section %s.\n", section); ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "nonexistent", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "nonexistent"), "Got unexpected section %s.\n", section); ok(!extptr || !*extptr /* Windows 10 1809 */, "Got extension %s.\n", extptr);
extptr = section; ret = SetupDiGetActualSectionToInstallA(hinf, "section10", section, ARRAY_SIZE(section), NULL, &extptr); - ok(ret, "Failed to get section, error %#x.\n", GetLastError()); + ok(ret, "Failed to get section, error %#lx.\n", GetLastError()); ok(!strcasecmp(section, "section10"), "Got unexpected section %s.\n", section); ok(!extptr, "Got extension %s.\n", extptr); }
SetupCloseInfFile(hinf); ret = DeleteFileA(inf_path); - ok(ret, "Failed to delete %s, error %u.\n", inf_path, GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", inf_path, GetLastError()); }
static void test_driver_list(void) @@ -2433,44 +2433,44 @@ static void test_driver_list(void) CloseHandle(file);
set = SetupDiCreateDeviceInfoList(NULL, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\BOGUS\0000", &GUID_NULL, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiSetDeviceRegistryPropertyA(set, &device, SPDRP_HARDWAREID, (const BYTE *)hardware_id, sizeof(hardware_id)); - ok(ret, "Failed to set hardware ID, error %#x.\n", GetLastError()); + ok(ret, "Failed to set hardware ID, error %#lx.\n", GetLastError());
ret = SetupDiSetDeviceRegistryPropertyA(set, &device, SPDRP_COMPATIBLEIDS, (const BYTE *)compat_id, sizeof(compat_id)); - ok(ret, "Failed to set hardware ID, error %#x.\n", GetLastError()); + ok(ret, "Failed to set hardware ID, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, 0, &driver); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_NO_MORE_ITEMS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_NO_MORE_ITEMS, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiGetDeviceInstallParamsA(set, &device, ¶ms); - ok(ret, "Failed to get device install params, error %#x.\n", GetLastError()); + ok(ret, "Failed to get device install params, error %#lx.\n", GetLastError()); strcpy(params.DriverPath, inf_path); params.Flags = DI_ENUMSINGLEINF; ret = SetupDiSetDeviceInstallParamsA(set, &device, ¶ms); - ok(ret, "Failed to set device install params, error %#x.\n", GetLastError()); + ok(ret, "Failed to set device install params, error %#lx.\n", GetLastError());
ret = SetupDiBuildDriverInfoList(set, &device, SPDIT_COMPATDRIVER); - ok(ret, "Failed to build driver list, error %#x.\n", GetLastError()); + ok(ret, "Failed to build driver list, error %#lx.\n", GetLastError());
idx = 0; ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, idx++, &driver); - ok(ret, "Failed to enumerate drivers, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to enumerate drivers, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc0"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, wow64 ? "mfg1_wow" : "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName);
ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, idx++, &driver); - ok(ret, "Failed to enumerate drivers, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to enumerate drivers, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc1"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, wow64 ? "mfg1_wow" : "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName); @@ -2479,96 +2479,96 @@ static void test_driver_list(void)
ret = SetupDiGetDriverInfoDetailA(set, &device, &driver, NULL, 0, &size); ok(ret || GetLastError() == ERROR_INVALID_USER_BUFFER /* Win10 1809 */, - "Failed to get driver details, error %#x.\n", GetLastError()); - ok(size == expect_size, "Got size %u.\n", size); + "Failed to get driver details, error %#lx.\n", GetLastError()); + ok(size == expect_size, "Got size %lu.\n", size);
ret = SetupDiGetDriverInfoDetailA(set, &device, &driver, NULL, sizeof(SP_DRVINFO_DETAIL_DATA_A) - 1, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); - ok(size == expect_size, "Got size %u.\n", size); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); + ok(size == expect_size, "Got size %lu.\n", size);
size = 0xdeadbeef; ret = SetupDiGetDriverInfoDetailA(set, &device, &driver, detail, 0, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); - ok(size == 0xdeadbeef, "Got size %u.\n", size); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); + ok(size == 0xdeadbeef, "Got size %lu.\n", size);
size = 0xdeadbeef; detail->CompatIDsLength = 0xdeadbeef; ret = SetupDiGetDriverInfoDetailA(set, &device, &driver, detail, sizeof(SP_DRVINFO_DETAIL_DATA_A) - 1, &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#x.\n", GetLastError()); - ok(size == 0xdeadbeef, "Got size %u.\n", size); - ok(detail->CompatIDsLength == 0xdeadbeef, "Got wrong compat IDs length %u.\n", detail->CompatIDsLength); + ok(GetLastError() == ERROR_INVALID_USER_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); + ok(size == 0xdeadbeef, "Got size %lu.\n", size); + ok(detail->CompatIDsLength == 0xdeadbeef, "Got wrong compat IDs length %lu.\n", detail->CompatIDsLength);
memset(detail_buffer, 0xcc, sizeof(detail_buffer)); detail->cbSize = sizeof(*detail); ret = SetupDiGetDriverInfoDetailA(set, &device, &driver, detail, sizeof(SP_DRVINFO_DETAIL_DATA_A), NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); ok(detail->InfDate.dwHighDateTime == filetime.dwHighDateTime && detail->InfDate.dwLowDateTime == filetime.dwLowDateTime, - "Expected %#x%08x, got %#x%08x.\n", filetime.dwHighDateTime, filetime.dwLowDateTime, + "Expected %#lx%08lx, got %#lx%08lx.\n", filetime.dwHighDateTime, filetime.dwLowDateTime, detail->InfDate.dwHighDateTime, detail->InfDate.dwLowDateTime); ok(!strcmp(detail->SectionName, "install1"), "Got section name %s.\n", debugstr_a(detail->SectionName)); ok(!stricmp(detail->InfFileName, short_path), "Got INF file name %s.\n", debugstr_a(detail->InfFileName)); ok(!strcmp(detail->DrvDescription, "desc1"), "Got description %s.\n", debugstr_a(detail->DrvDescription)); ok(!detail->CompatIDsOffset || detail->CompatIDsOffset == sizeof("bogus_hardware_id") /* Win10 1809 */, - "Got wrong compat IDs offset %u.\n", detail->CompatIDsOffset); - ok(!detail->CompatIDsLength, "Got wrong compat IDs length %u.\n", detail->CompatIDsLength); + "Got wrong compat IDs offset %lu.\n", detail->CompatIDsOffset); + ok(!detail->CompatIDsLength, "Got wrong compat IDs length %lu.\n", detail->CompatIDsLength); ok(!detail->HardwareID[0], "Got wrong ID list.\n");
size = 0xdeadbeef; ret = SetupDiGetDriverInfoDetailA(set, &device, &driver, detail, sizeof(SP_DRVINFO_DETAIL_DATA_A), &size); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#x.\n", GetLastError()); - ok(size == expect_size, "Got size %u.\n", size); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError()); + ok(size == expect_size, "Got size %lu.\n", size);
size = 0xdeadbeef; ret = SetupDiGetDriverInfoDetailA(set, &device, &driver, detail, sizeof(detail_buffer), &size); - ok(ret, "Failed to get driver details, error %#x.\n", GetLastError()); - ok(size == expect_size, "Got size %u.\n", size); + ok(ret, "Failed to get driver details, error %#lx.\n", GetLastError()); + ok(size == expect_size, "Got size %lu.\n", size); ok(detail->InfDate.dwHighDateTime == filetime.dwHighDateTime && detail->InfDate.dwLowDateTime == filetime.dwLowDateTime, - "Expected %#x%08x, got %#x%08x.\n", filetime.dwHighDateTime, filetime.dwLowDateTime, + "Expected %#lx%08lx, got %#lx%08lx.\n", filetime.dwHighDateTime, filetime.dwLowDateTime, detail->InfDate.dwHighDateTime, detail->InfDate.dwLowDateTime); ok(!strcmp(detail->SectionName, "install1"), "Got section name %s.\n", debugstr_a(detail->SectionName)); ok(!stricmp(detail->InfFileName, short_path), "Got INF file name %s.\n", debugstr_a(detail->InfFileName)); ok(!strcmp(detail->DrvDescription, "desc1"), "Got description %s.\n", debugstr_a(detail->DrvDescription)); - ok(!detail->CompatIDsOffset, "Got wrong compat IDs offset %u.\n", detail->CompatIDsOffset); - ok(!detail->CompatIDsLength, "Got wrong compat IDs length %u.\n", detail->CompatIDsLength); + ok(!detail->CompatIDsOffset, "Got wrong compat IDs offset %lu.\n", detail->CompatIDsOffset); + ok(!detail->CompatIDsLength, "Got wrong compat IDs length %lu.\n", detail->CompatIDsLength); ok(!memcmp(detail->HardwareID, "bogus_hardware_id\0", sizeof("bogus_hardware_id\0")), "Got wrong ID list.\n");
ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, idx++, &driver); - ok(ret, "Failed to enumerate drivers, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to enumerate drivers, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc2"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, wow64 ? "mfg1_wow" : "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName);
ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, idx++, &driver); - ok(ret, "Failed to enumerate drivers, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to enumerate drivers, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc4"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, wow64 ? "mfg1_wow" : "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName); ret = SetupDiGetDriverInfoDetailA(set, &device, &driver, detail, sizeof(detail_buffer), NULL); - ok(ret, "Failed to get driver details, error %#x.\n", GetLastError()); + ok(ret, "Failed to get driver details, error %#lx.\n", GetLastError()); ok(detail->InfDate.dwHighDateTime == filetime.dwHighDateTime && detail->InfDate.dwLowDateTime == filetime.dwLowDateTime, - "Expected %#x%08x, got %#x%08x.\n", filetime.dwHighDateTime, filetime.dwLowDateTime, + "Expected %#lx%08lx, got %#lx%08lx.\n", filetime.dwHighDateTime, filetime.dwLowDateTime, detail->InfDate.dwHighDateTime, detail->InfDate.dwLowDateTime); ok(!detail->SectionName[0], "Got section name %s.\n", debugstr_a(detail->SectionName)); ok(!stricmp(detail->InfFileName, short_path), "Got INF file name %s.\n", debugstr_a(detail->InfFileName)); ok(!strcmp(detail->DrvDescription, "desc4"), "Got description %s.\n", debugstr_a(detail->DrvDescription)); - ok(detail->CompatIDsOffset == sizeof("wrong_hardware_id"), "Got wrong compat IDs offset %u.\n", detail->CompatIDsOffset); - ok(detail->CompatIDsLength == sizeof("bogus_compat_id\0"), "Got wrong compat IDs length %u.\n", detail->CompatIDsLength); + ok(detail->CompatIDsOffset == sizeof("wrong_hardware_id"), "Got wrong compat IDs offset %lu.\n", detail->CompatIDsOffset); + ok(detail->CompatIDsLength == sizeof("bogus_compat_id\0"), "Got wrong compat IDs length %lu.\n", detail->CompatIDsLength); ok(!memcmp(detail->HardwareID, "wrong_hardware_id\0bogus_compat_id\0", sizeof("wrong_hardware_id\0bogus_compat_id\0")), "Got wrong ID list.\n");
ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, idx++, &driver); - ok(ret, "Failed to enumerate drivers, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to enumerate drivers, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc5"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, wow64 ? "mfg2_wow" : "mfg2"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName); @@ -2576,65 +2576,65 @@ static void test_driver_list(void) SetLastError(0xdeadbeef); ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, idx++, &driver); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_NO_MORE_ITEMS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_NO_MORE_ITEMS, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiGetSelectedDriverA(set, &device, &driver); ok(ret /* Win10 1809 */ || GetLastError() == ERROR_NO_DRIVER_SELECTED, - "Got unexpected error %#x.\n", GetLastError()); + "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiSelectBestCompatDrv(set, &device); - ok(ret, "Failed to select driver, error %#x.\n", GetLastError()); + ok(ret, "Failed to select driver, error %#lx.\n", GetLastError());
ret = SetupDiGetSelectedDriverA(set, &device, &driver); - ok(ret, "Failed to get selected driver, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to get selected driver, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc1"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, wow64 ? "mfg1_wow" : "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName);
SetupDiDestroyDeviceInfoList(set); ret = DeleteFileA(inf_path); - ok(ret, "Failed to delete %s, error %u.\n", inf_path, GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", inf_path, GetLastError());
/* Test building from a path. */
GetTempPathA(sizeof(inf_dir), inf_dir); strcat(inf_dir, "setupapi_test"); ret = CreateDirectoryA(inf_dir, NULL); - ok(ret, "Failed to create directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create directory, error %lu.\n", GetLastError()); sprintf(inf_path, "%s/test1.inf", inf_dir); create_file(inf_path, inf_data_file1); sprintf(inf_path2, "%s/test2.inf", inf_dir); create_file(inf_path2, inf_data_file2);
set = SetupDiCreateDeviceInfoList(NULL, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\BOGUS\0000", &GUID_NULL, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiSetDeviceRegistryPropertyA(set, &device, SPDRP_HARDWAREID, (const BYTE *)hardware_id, sizeof(hardware_id)); - ok(ret, "Failed to set hardware ID, error %#x.\n", GetLastError()); + ok(ret, "Failed to set hardware ID, error %#lx.\n", GetLastError());
ret = SetupDiGetDeviceInstallParamsA(set, &device, ¶ms); - ok(ret, "Failed to get device install params, error %#x.\n", GetLastError()); + ok(ret, "Failed to get device install params, error %#lx.\n", GetLastError()); strcpy(params.DriverPath, inf_dir); ret = SetupDiSetDeviceInstallParamsA(set, &device, ¶ms); - ok(ret, "Failed to set device install params, error %#x.\n", GetLastError()); + ok(ret, "Failed to set device install params, error %#lx.\n", GetLastError());
ret = SetupDiBuildDriverInfoList(set, &device, SPDIT_COMPATDRIVER); - ok(ret, "Failed to build driver list, error %#x.\n", GetLastError()); + ok(ret, "Failed to build driver list, error %#lx.\n", GetLastError());
ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, 0, &driver); - ok(ret, "Failed to enumerate drivers, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to enumerate drivers, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc1"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName);
ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, 1, &driver); - ok(ret, "Failed to enumerate drivers, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to enumerate drivers, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc2"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName); @@ -2642,15 +2642,15 @@ static void test_driver_list(void) SetLastError(0xdeadbeef); ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, 2, &driver); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_NO_MORE_ITEMS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_NO_MORE_ITEMS, "Got unexpected error %#lx.\n", GetLastError());
SetupDiDestroyDeviceInfoList(set); ret = DeleteFileA(inf_path); - ok(ret, "Failed to delete %s, error %u.\n", inf_path, GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", inf_path, GetLastError()); ret = DeleteFileA(inf_path2); - ok(ret, "Failed to delete %s, error %u.\n", inf_path2, GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", inf_path2, GetLastError()); ret = RemoveDirectoryA(inf_dir); - ok(ret, "Failed to delete %s, error %u.\n", inf_dir, GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", inf_dir, GetLastError());
/* Test the default path. */
@@ -2658,27 +2658,27 @@ static void test_driver_list(void) create_file("C:/windows/inf/wine_test2.inf", inf_data_file2);
set = SetupDiCreateDeviceInfoList(NULL, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\BOGUS\0000", &GUID_NULL, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiSetDeviceRegistryPropertyA(set, &device, SPDRP_HARDWAREID, (const BYTE *)hardware_id, sizeof(hardware_id)); - ok(ret, "Failed to set hardware ID, error %#x.\n", GetLastError()); + ok(ret, "Failed to set hardware ID, error %#lx.\n", GetLastError());
ret = SetupDiBuildDriverInfoList(set, &device, SPDIT_COMPATDRIVER); - ok(ret, "Failed to build driver list, error %#x.\n", GetLastError()); + ok(ret, "Failed to build driver list, error %#lx.\n", GetLastError());
ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, 0, &driver); - ok(ret, "Failed to enumerate drivers, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to enumerate drivers, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc1"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName);
ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, 1, &driver); - ok(ret, "Failed to enumerate drivers, error %#x.\n", GetLastError()); - ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#x.\n", driver.DriverType); + ok(ret, "Failed to enumerate drivers, error %#lx.\n", GetLastError()); + ok(driver.DriverType == SPDIT_COMPATDRIVER, "Got wrong type %#lx.\n", driver.DriverType); ok(!strcmp(driver.Description, "desc2"), "Got wrong description '%s'.\n", driver.Description); ok(!strcmp(driver.MfgName, "mfg1"), "Got wrong manufacturer '%s'.\n", driver.MfgName); ok(!strcmp(driver.ProviderName, ""), "Got wrong provider '%s'.\n", driver.ProviderName); @@ -2686,13 +2686,13 @@ static void test_driver_list(void) SetLastError(0xdeadbeef); ret = SetupDiEnumDriverInfoA(set, &device, SPDIT_COMPATDRIVER, 2, &driver); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_NO_MORE_ITEMS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_NO_MORE_ITEMS, "Got unexpected error %#lx.\n", GetLastError());
SetupDiDestroyDeviceInfoList(set); ret = DeleteFileA("C:/windows/inf/wine_test1.inf"); - ok(ret, "Failed to delete %s, error %u.\n", inf_path, GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", inf_path, GetLastError()); ret = DeleteFileA("C:/windows/inf/wine_test2.inf"); - ok(ret, "Failed to delete %s, error %u.\n", inf_path2, GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", inf_path2, GetLastError()); /* Windows "precompiles" INF files in this dir; try to avoid leaving them behind. */ DeleteFileA("C:/windows/inf/wine_test1.pnf"); DeleteFileA("C:/windows/inf/wine_test2.pnf"); @@ -2720,26 +2720,26 @@ static void test_class_installer(void)
res = RegCreateKeyA(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\Class" "\{6a55b5a4-3f65-11db-b704-0011955c2bdb}", &class_key); - ok(!res, "Failed to create class key, error %u.\n", res); + ok(!res, "Failed to create class key, error %lu.\n", res);
strcpy(regdata, "winetest_coinst.dll,class_success"); res = RegSetValueExA(class_key, "Installer32", 0, REG_SZ, (BYTE *)regdata, strlen(regdata)+1); - ok(!res, "Failed to set registry value, error %u.\n", res); + ok(!res, "Failed to set registry value, error %lu.\n", res);
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); ok(*coinst_last_message == DIF_ALLOW_INSTALL, "Got unexpected message %#x.\n", *coinst_last_message); *coinst_callback_count = 0;
ret = SetupDiCallClassInstaller(0xdeadbeef, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); ok(*coinst_last_message == 0xdeadbeef, "Got unexpected message %#x.\n", *coinst_last_message); @@ -2747,7 +2747,7 @@ static void test_class_installer(void)
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n"); ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError()); ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); @@ -2755,7 +2755,7 @@ static void test_class_installer(void) *coinst_callback_count = 0;
ret = SetupDiCallClassInstaller(DIF_REMOVE, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError()); ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); @@ -2765,7 +2765,7 @@ static void test_class_installer(void) SetLastError(0xdeadbeef); ret = SetupDiDestroyDeviceInfoList(set); ok(ret, "Failed to destroy device list.\n"); - ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError()); + ok(!GetLastError(), "Got unexpected error %#lx.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message); @@ -2775,75 +2775,75 @@ static void test_class_installer(void)
strcpy(regdata, "winetest_coinst.dll,class_error"); res = RegSetValueExA(class_key, "Installer32", 0, REG_SZ, (BYTE *)regdata, strlen(regdata)+1); - ok(!res, "Failed to set registry value, error %u.\n", res); + ok(!res, "Failed to set registry value, error %lu.\n", res);
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#lx.\n", GetLastError());
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n"); ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#lx.\n", GetLastError()); ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
ret = SetupDiCallClassInstaller(DIF_REMOVE, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#lx.\n", GetLastError()); ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
SetLastError(0xdeadbeef); ret = SetupDiDestroyDeviceInfoList(set); ok(ret, "Failed to destroy device list.\n"); - ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError()); + ok(!GetLastError(), "Got unexpected error %#lx.\n", GetLastError());
/* Test returning ERROR_DI_DO_DEFAULT. */
strcpy(regdata, "winetest_coinst.dll,class_default"); res = RegSetValueExA(class_key, "Installer32", 0, REG_SZ, (BYTE *)regdata, strlen(regdata)+1); - ok(!res, "Failed to set registry value, error %u.\n", res); + ok(!res, "Failed to set registry value, error %lu.\n", res);
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#lx.\n", GetLastError());
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n"); ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError()); ok(device_is_registered(set, &device), "Expected device to be registered.\n");
ret = SetupDiCallClassInstaller(DIF_REMOVE, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError()); ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
SetLastError(0xdeadbeef); ret = SetupDiDestroyDeviceInfoList(set); ok(ret, "Failed to destroy device list.\n"); - ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError()); + ok(!GetLastError(), "Got unexpected error %#lx.\n", GetLastError());
/* The default entry point is ClassInstall(). */
strcpy(regdata, "winetest_coinst.dll"); res = RegSetValueExA(class_key, "Installer32", 0, REG_SZ, (BYTE *)regdata, strlen(regdata)+1); - ok(!res, "Failed to set registry value, error %u.\n", res); + ok(!res, "Failed to set registry value, error %lu.\n", res);
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); ok(*coinst_last_message == DIF_ALLOW_INSTALL, "Got unexpected message %#x.\n", *coinst_last_message); @@ -2852,14 +2852,14 @@ static void test_class_installer(void) SetLastError(0xdeadbeef); ret = SetupDiDestroyDeviceInfoList(set); ok(ret, "Failed to destroy device list.\n"); - ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError()); + ok(!GetLastError(), "Got unexpected error %#lx.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message); *coinst_callback_count = 0;
res = RegDeleteKeyA(class_key, ""); - ok(!res, "Failed to delete class key, error %u.\n", res); + ok(!res, "Failed to delete class key, error %lu.\n", res); RegCloseKey(class_key); }
@@ -2873,23 +2873,23 @@ static void test_class_coinstaller(void) LONG res;
res = RegCreateKeyA(HKEY_LOCAL_MACHINE, "System\CurrentControlSet\Control\CoDeviceInstallers", &coinst_key); - ok(!res, "Failed to open CoDeviceInstallers key, error %u.\n", res); + ok(!res, "Failed to open CoDeviceInstallers key, error %lu.\n", res); strcpy(regdata, "winetest_coinst.dll,co_success"); regdata[strlen(regdata) + 1] = 0; res = RegSetValueExA(coinst_key, "{6a55b5a4-3f65-11db-b704-0011955c2bdb}", 0, REG_MULTI_SZ, (BYTE *)regdata, strlen(regdata) + 2); - ok(!res, "Failed to set registry value, error %u.\n", res); + ok(!res, "Failed to set registry value, error %lu.\n", res);
/* We must recreate the device list, or Windows will not recognize that the * class co-installer exists. */ set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#lx.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); ok(*coinst_last_message == DIF_ALLOW_INSTALL, "Got unexpected message %#x.\n", *coinst_last_message); @@ -2897,7 +2897,7 @@ static void test_class_coinstaller(void)
ret = SetupDiCallClassInstaller(0xdeadbeef, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#lx.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); ok(*coinst_last_message == 0xdeadbeef, "Got unexpected message %#x.\n", *coinst_last_message); @@ -2905,7 +2905,7 @@ static void test_class_coinstaller(void)
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n"); ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError()); ok(device_is_registered(set, &device), "Expected device to be registered.\n");
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); @@ -2913,7 +2913,7 @@ static void test_class_coinstaller(void) *coinst_callback_count = 0;
ret = SetupDiCallClassInstaller(DIF_REMOVE, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError()); ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); @@ -2923,7 +2923,7 @@ static void test_class_coinstaller(void) SetLastError(0xdeadbeef); ret = SetupDiDestroyDeviceInfoList(set); ok(ret, "Failed to destroy device list.\n"); - ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError()); + ok(!GetLastError(), "Got unexpected error %#lx.\n", GetLastError());
todo_wine ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); todo_wine ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message); @@ -2935,27 +2935,27 @@ static void test_class_coinstaller(void) regdata[strlen(regdata) + 1] = 0; res = RegSetValueExA(coinst_key, "{6a55b5a4-3f65-11db-b704-0011955c2bdb}", 0, REG_MULTI_SZ, (BYTE *)regdata, strlen(regdata) + 2); - ok(!res, "Failed to set registry value, error %u.\n", res); + ok(!res, "Failed to set registry value, error %lu.\n", res);
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#lx.\n", GetLastError());
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n"); ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == 0xdeadc0de, "Got unexpected error %#lx.\n", GetLastError()); ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
SetLastError(0xdeadbeef); ret = SetupDiDestroyDeviceInfoList(set); ok(ret, "Failed to destroy device list.\n"); - ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError()); + ok(!GetLastError(), "Got unexpected error %#lx.\n", GetLastError());
/* The default entry point is CoDeviceInstall(). */
@@ -2963,16 +2963,16 @@ static void test_class_coinstaller(void) regdata[strlen(regdata) + 1] = 0; res = RegSetValueExA(coinst_key, "{6a55b5a4-3f65-11db-b704-0011955c2bdb}", 0, REG_MULTI_SZ, (BYTE *)regdata, strlen(regdata) + 2); - ok(!res, "Failed to set registry value, error %u.\n", res); + ok(!res, "Failed to set registry value, error %lu.\n", res);
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#lx.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); ok(*coinst_last_message == DIF_ALLOW_INSTALL, "Got unexpected message %#x.\n", *coinst_last_message); @@ -2981,14 +2981,14 @@ static void test_class_coinstaller(void) SetLastError(0xdeadbeef); ret = SetupDiDestroyDeviceInfoList(set); ok(ret, "Failed to destroy device list.\n"); - ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError()); + ok(!GetLastError(), "Got unexpected error %#lx.\n", GetLastError());
ok(*coinst_callback_count == 1, "Got %d callbacks.\n", *coinst_callback_count); ok(*coinst_last_message == DIF_DESTROYPRIVATEDATA, "Got unexpected message %#x.\n", *coinst_last_message); *coinst_callback_count = 0;
res = RegDeleteValueA(coinst_key, "{6a55b5a4-3f65-11db-b704-0011955c2bdb}"); - ok(!res, "Failed to delete value, error %u.\n", res); + ok(!res, "Failed to delete value, error %lu.\n", res); RegCloseKey(coinst_key); }
@@ -3006,33 +3006,33 @@ static void test_call_class_installer(void) }
set = SetupDiCreateDeviceInfoList(&guid, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\0000", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError());
ok(!device_is_registered(set, &device), "Expected device not to be registered.\n"); ret = SetupDiCallClassInstaller(DIF_REGISTERDEVICE, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError()); ok(device_is_registered(set, &device), "Expected device to be registered.\n");
/* This is probably not failure per se, but rather an indication that no * class installer was called and no default handler exists. */ ret = SetupDiCallClassInstaller(DIF_ALLOW_INSTALL, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiCallClassInstaller(0xdeadbeef, set, &device); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_DI_DO_DEFAULT, "Got unexpected error %#lx.\n", GetLastError());
ret = SetupDiCallClassInstaller(DIF_REMOVE, set, &device); - ok(ret, "Failed to call class installer, error %#x.\n", GetLastError()); + ok(ret, "Failed to call class installer, error %#lx.\n", GetLastError()); ok(!device_is_registered(set, &device), "Expected device not to be registered.\n");
SetLastError(0xdeadbeef); ret = SetupDiDestroyDeviceInfoList(set); ok(ret, "Failed to destroy device list.\n"); - ok(!GetLastError(), "Got unexpected error %#x.\n", GetLastError()); + ok(!GetLastError(), "Got unexpected error %#lx.\n", GetLastError());
load_resource("coinst.dll", "C:\windows\system32\winetest_coinst.dll");
@@ -3046,7 +3046,7 @@ static void test_call_class_installer(void) FreeLibrary(coinst);
ret = DeleteFileA("C:\windows\system32\winetest_coinst.dll"); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void check_all_devices_enumerated_(int line, HDEVINFO set, BOOL expect_dev3) @@ -3091,7 +3091,7 @@ static void check_device_list_(int line, HDEVINFO set, const GUID *expect) { SP_DEVINFO_LIST_DETAIL_DATA_A detail = {sizeof(detail)}; BOOL ret = SetupDiGetDeviceInfoListDetailA(set, &detail); - ok_(__FILE__, line)(ret, "Failed to get list detail, error %#x.\n", GetLastError()); + ok_(__FILE__, line)(ret, "Failed to get list detail, error %#lx.\n", GetLastError()); ok_(__FILE__, line)(IsEqualGUID(&detail.ClassGuid, expect), "Expected class %s, got %s\n", wine_dbgstr_guid(expect), wine_dbgstr_guid(&detail.ClassGuid)); } @@ -3105,78 +3105,78 @@ static void test_get_class_devs(void) BOOL ret;
set = SetupDiCreateDeviceInfoList(NULL, NULL); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\foo", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInterfaceA(set, &device, &iface_guid, NULL, 0, &iface); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInterfaceA(set, &device, &iface_guid2, NULL, 0, &iface); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError()); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\qux", &guid, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ret = SetupDiCreateDeviceInterfaceA(set, &device, &iface_guid, NULL, 0, &iface); - ok(ret, "Failed to create interface, error %#x.\n", GetLastError()); + ok(ret, "Failed to create interface, error %#lx.\n", GetLastError()); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError());
ret = SetupDiCreateDeviceInfoA(set, "Root\LEGACY_BOGUS\bar", &guid2, NULL, NULL, 0, &device); - ok(ret, "Failed to create device, error %#x.\n", GetLastError()); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); ret = SetupDiRegisterDeviceInfo(set, &device, 0, NULL, NULL, NULL); - ok(ret, "Failed to register device, error %#x.\n", GetLastError()); + ok(ret, "Failed to register device, error %#lx.\n", GetLastError());
ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); set = SetupDiGetClassDevsA(NULL, NULL, NULL, 0); ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(NULL, NULL, NULL, DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_all_devices_enumerated(set, TRUE); check_device_iface(set, NULL, &iface_guid, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(&guid, NULL, NULL, 0); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &guid); check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\FOO"); check_device_info(set, 1, &guid, "ROOT\LEGACY_BOGUS\QUX"); check_device_info(set, 2, NULL, NULL); check_device_iface(set, NULL, &iface_guid, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(&guid, NULL, NULL, DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_all_devices_enumerated(set, TRUE); check_device_iface(set, NULL, &iface_guid, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); set = SetupDiGetClassDevsA(NULL, "ROOT", NULL, 0); ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(NULL, "ROOT", NULL, DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_all_devices_enumerated(set, TRUE); check_device_iface(set, NULL, &iface_guid, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(NULL, "ROOT\LEGACY_BOGUS", NULL, DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_device_info(set, 0, &guid2, "ROOT\LEGACY_BOGUS\BAR"); check_device_info(set, 1, &guid, "ROOT\LEGACY_BOGUS\FOO"); @@ -3184,20 +3184,20 @@ static void test_get_class_devs(void) check_device_info(set, 3, NULL, NULL); check_device_iface(set, NULL, &iface_guid, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(&guid, "ROOT\LEGACY_BOGUS", NULL, 0); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &guid); check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\FOO"); check_device_info(set, 1, &guid, "ROOT\LEGACY_BOGUS\QUX"); check_device_info(set, 2, NULL, NULL); check_device_iface(set, NULL, &iface_guid, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(&guid, "ROOT\LEGACY_BOGUS", NULL, DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_device_info(set, 0, &guid2, "ROOT\LEGACY_BOGUS\BAR"); check_device_info(set, 1, &guid, "ROOT\LEGACY_BOGUS\FOO"); @@ -3205,17 +3205,17 @@ static void test_get_class_devs(void) check_device_info(set, 3, NULL, NULL); check_device_iface(set, NULL, &iface_guid, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
/* test DIGCF_DEVICE_INTERFACE */
SetLastError(0xdeadbeef); set = SetupDiGetClassDevsA(NULL, NULL, NULL, DIGCF_DEVICEINTERFACE); ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(NULL, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_all_devices_enumerated(set, FALSE); check_device_iface(set, NULL, &iface_guid, 0, 0, "\\?\root#legacy_bogus#foo#{deadbeef-3f65-11db-b704-0011955c2bdb}"); @@ -3224,19 +3224,19 @@ static void test_get_class_devs(void) check_device_iface(set, NULL, &iface_guid2, 0, 0, "\\?\root#legacy_bogus#foo#{deadf00d-3f65-11db-b704-0011955c2bdb}"); check_device_iface(set, NULL, &iface_guid2, 1, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(&guid, NULL, NULL, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_device_info(set, 0, NULL, NULL); check_device_iface(set, NULL, &iface_guid, 0, 0, NULL); check_device_iface(set, NULL, &iface_guid2, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(&iface_guid, NULL, NULL, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\FOO"); check_device_info(set, 1, &guid, "ROOT\LEGACY_BOGUS\QUX"); @@ -3246,10 +3246,10 @@ static void test_get_class_devs(void) check_device_iface(set, NULL, &iface_guid, 2, 0, NULL); check_device_iface(set, NULL, &iface_guid2, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(&iface_guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_all_devices_enumerated(set, FALSE); check_device_iface(set, NULL, &iface_guid, 0, 0, "\\?\root#legacy_bogus#foo#{deadbeef-3f65-11db-b704-0011955c2bdb}"); @@ -3258,29 +3258,29 @@ static void test_get_class_devs(void) check_device_iface(set, NULL, &iface_guid2, 0, 0, "\\?\root#legacy_bogus#foo#{deadf00d-3f65-11db-b704-0011955c2bdb}"); check_device_iface(set, NULL, &iface_guid2, 1, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); set = SetupDiGetClassDevsA(NULL, "ROOT", NULL, DIGCF_DEVICEINTERFACE); ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got unexpected error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); set = SetupDiGetClassDevsA(NULL, "ROOT", NULL, DIGCF_DEVICEINTERFACE | DIGCF_ALLCLASSES); todo_wine { ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError()); }
SetLastError(0xdeadbeef); set = SetupDiGetClassDevsA(NULL, "ROOT\LEGACY_BOGUS", NULL, DIGCF_DEVICEINTERFACE | DIGCF_ALLCLASSES); todo_wine { ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError()); }
set = SetupDiGetClassDevsA(NULL, "ROOT\LEGACY_BOGUS\foo", NULL, DIGCF_DEVICEINTERFACE | DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\FOO"); check_device_info(set, 1, NULL, NULL); @@ -3289,33 +3289,33 @@ todo_wine { check_device_iface(set, NULL, &iface_guid2, 0, 0, "\\?\root#legacy_bogus#foo#{deadf00d-3f65-11db-b704-0011955c2bdb}"); check_device_iface(set, NULL, &iface_guid2, 1, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(NULL, "ROOT\LEGACY_BOGUS\bar", NULL, DIGCF_DEVICEINTERFACE | DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_device_info(set, 0, NULL, NULL); check_device_iface(set, NULL, &iface_guid, 0, 0, NULL); check_device_iface(set, NULL, &iface_guid2, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
SetLastError(0xdeadbeef); set = SetupDiGetClassDevsA(&iface_guid, "ROOT\LEGACY_BOGUS", NULL, DIGCF_DEVICEINTERFACE); todo_wine { ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError()); }
SetLastError(0xdeadbeef); set = SetupDiGetClassDevsA(&iface_guid, "ROOT\LEGACY_BOGUS", NULL, DIGCF_DEVICEINTERFACE | DIGCF_ALLCLASSES); todo_wine { ok(set == INVALID_HANDLE_VALUE, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "Got unexpected error %#lx.\n", GetLastError()); }
set = SetupDiGetClassDevsA(&iface_guid, "ROOT\LEGACY_BOGUS\foo", NULL, DIGCF_DEVICEINTERFACE); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\FOO"); check_device_info(set, 1, NULL, NULL); @@ -3323,10 +3323,10 @@ todo_wine { check_device_iface(set, NULL, &iface_guid, 1, 0, NULL); check_device_iface(set, NULL, &iface_guid2, 0, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(&iface_guid, "ROOT\LEGACY_BOGUS\foo", NULL, DIGCF_DEVICEINTERFACE | DIGCF_ALLCLASSES); - ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#x.\n", GetLastError()); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); check_device_list(set, &GUID_NULL); check_device_info(set, 0, &guid, "ROOT\LEGACY_BOGUS\FOO"); check_device_info(set, 1, NULL, NULL); @@ -3335,7 +3335,7 @@ todo_wine { check_device_iface(set, NULL, &iface_guid2, 0, 0, "\\?\root#legacy_bogus#foo#{deadf00d-3f65-11db-b704-0011955c2bdb}"); check_device_iface(set, NULL, &iface_guid2, 1, 0, NULL); ret = SetupDiDestroyDeviceInfoList(set); - ok(ret, "Failed to destroy device list, error %#x.\n", GetLastError()); + ok(ret, "Failed to destroy device list, error %#lx.\n", GetLastError());
set = SetupDiGetClassDevsA(&guid, NULL, NULL, 0); SetupDiEnumDeviceInfo(set, 0, &device); diff --git a/dlls/setupapi/tests/dialog.c b/dlls/setupapi/tests/dialog.c index b6191afa41d..33623b952e0 100644 --- a/dlls/setupapi/tests/dialog.c +++ b/dlls/setupapi/tests/dialog.c @@ -42,13 +42,13 @@ static void test_SetupPromptForDiskA(void) memset(buffer, 0, sizeof(buffer)); ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, buffer, sizeof(buffer) - 1, &length); ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret); - ok(length == strlen(path) + 1, "Expect length %u, got %u\n", lstrlenA(path) + 1, length); + ok(length == strlen(path) + 1, "Expect length %u, got %lu\n", lstrlenA(path) + 1, length); ok(!strcmp(path, buffer), "Expected path %s, got %s\n", debugstr_a(path), debugstr_a(buffer));
memset(buffer, 0, sizeof(buffer)); ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, NULL, 0, &length); ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %d\n", ret); - ok(length == strlen(path) + 1, "Expect length %u, got %u\n", lstrlenA(path) + 1, length); + ok(length == strlen(path) + 1, "Expect length %u, got %lu\n", lstrlenA(path) + 1, length);
memset(buffer, 0, sizeof(buffer)); ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, buffer, 1, &length); @@ -61,7 +61,7 @@ static void test_SetupPromptForDiskA(void) memset(buffer, 0, sizeof(buffer)); ret = SetupPromptForDiskA(0, "Test", "Testdisk", path, "kernel32.dll", NULL, IDF_CHECKFIRST, buffer, strlen(path) + 1, &length); ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret); - ok(length == strlen(path) + 1, "Expect length %u, got %u\n", lstrlenA(path) + 1, length); + ok(length == strlen(path) + 1, "Expect length %u, got %lu\n", lstrlenA(path) + 1, length); ok(!strcmp(path, buffer), "Expected path %s, got %s\n", debugstr_a(path), debugstr_a(buffer)); }
@@ -77,13 +77,13 @@ static void test_SetupPromptForDiskW(void) memset(buffer, 0, sizeof(buffer)); ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, buffer, ARRAY_SIZE(buffer) - 1, &length); ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret); - ok(length == lstrlenW(path) + 1, "Expect length %u, got %u\n", lstrlenW(path) + 1, length); + ok(length == lstrlenW(path) + 1, "Expect length %u, got %lu\n", lstrlenW(path) + 1, length); ok(!lstrcmpW(path, buffer), "Expected path %s, got %s\n", debugstr_w(path), debugstr_w(buffer));
memset(buffer, 0, sizeof(buffer)); ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, NULL, 0, &length); ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %d\n", ret); - ok(length == lstrlenW(path) + 1, "Expect length %u, got %u\n", lstrlenW(path) + 1, length); + ok(length == lstrlenW(path) + 1, "Expect length %u, got %lu\n", lstrlenW(path) + 1, length);
memset(buffer, 0, sizeof(buffer)); ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, buffer, 1, &length); @@ -96,7 +96,7 @@ static void test_SetupPromptForDiskW(void) memset(buffer, 0, sizeof(buffer)); ret = SetupPromptForDiskW(0, L"Test", L"Testdisk", path, L"kernel32.dll", NULL, IDF_CHECKFIRST, buffer, lstrlenW(path) + 1, &length); ok(ret == DPROMPT_SUCCESS, "Expected DPROMPT_SUCCESS, got %u\n", ret); - ok(length == lstrlenW(path) + 1, "Expect length %u, got %u\n", lstrlenW(path) + 1, length); + ok(length == lstrlenW(path) + 1, "Expect length %u, got %lu\n", lstrlenW(path) + 1, length); ok(!lstrcmpW(path, buffer), "Expected path %s, got %s\n", debugstr_w(path), debugstr_w(buffer)); }
diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c index dab6705eee3..577b1f84a2a 100644 --- a/dlls/setupapi/tests/diskspace.c +++ b/dlls/setupapi/tests/diskspace.c @@ -52,7 +52,7 @@ static void test_SetupCreateDiskSpaceListA(void) "Expected SetupCreateDiskSpaceListA to return NULL, got %p\n", ret); if (!ret) ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); else ok(SetupDestroyDiskSpaceList(ret), "Expected SetupDestroyDiskSpaceList to succeed\n"); @@ -63,7 +63,7 @@ static void test_SetupCreateDiskSpaceListA(void) "Expected SetupCreateDiskSpaceListA to return NULL, got %p\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef), /* NT4/Win9x/Win2k */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -72,7 +72,7 @@ static void test_SetupCreateDiskSpaceListA(void) "Expected SetupCreateDiskSpaceListA to return NULL, got %p\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef), /* NT4/Win9x/Win2k */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -81,7 +81,7 @@ static void test_SetupCreateDiskSpaceListA(void) "Expected SetupCreateDiskSpaceListA to return NULL, got %p\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef), /* NT4/Win9x/Win2k */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); }
@@ -113,7 +113,7 @@ static void test_SetupCreateDiskSpaceListW(void) "Expected SetupCreateDiskSpaceListW to return NULL, got %p\n", ret); if (!ret) ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); else ok(SetupDestroyDiskSpaceList(ret), "Expected SetupDestroyDiskSpaceList to succeed\n"); @@ -124,7 +124,7 @@ static void test_SetupCreateDiskSpaceListW(void) "Expected SetupCreateDiskSpaceListW to return NULL, got %p\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef), /* NT4/Win2k */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -133,7 +133,7 @@ static void test_SetupCreateDiskSpaceListW(void) "Expected SetupCreateDiskSpaceListW to return NULL, got %p\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef), /* NT4/Win2k */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -142,7 +142,7 @@ static void test_SetupCreateDiskSpaceListW(void) "Expected SetupCreateDiskSpaceListW to return NULL, got %p\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == 0xdeadbeef), /* NT4/Win2k */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError()); }
@@ -154,25 +154,25 @@ static void test_SetupDuplicateDiskSpaceListA(void) duplicate = SetupDuplicateDiskSpaceListA(NULL, NULL, 0, 0); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListA(NULL, (void *)0xdeadbeef, 0, 0); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListA(NULL, NULL, 0xdeadbeef, 0); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListA(NULL, NULL, 0, ~0U); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
handle = SetupCreateDiskSpaceListA(NULL, 0, 0); ok(handle != NULL, @@ -188,25 +188,25 @@ static void test_SetupDuplicateDiskSpaceListA(void) duplicate = SetupDuplicateDiskSpaceListA(handle, (void *)0xdeadbeef, 0, 0); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListA(handle, NULL, 0xdeadbeef, 0); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListA(handle, NULL, 0, SPDSL_IGNORE_DISK); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListA(handle, NULL, 0, ~0U); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
duplicate = SetupDuplicateDiskSpaceListA(handle, NULL, 0, 0); ok(duplicate != NULL, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); @@ -230,25 +230,25 @@ static void test_SetupDuplicateDiskSpaceListW(void) } ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListW(NULL, (void *)0xdeadbeef, 0, 0); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListW(NULL, NULL, 0xdeadbeef, 0); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListW(NULL, NULL, 0, ~0U); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
handle = SetupCreateDiskSpaceListW(NULL, 0, 0); ok(handle != NULL, @@ -264,25 +264,25 @@ static void test_SetupDuplicateDiskSpaceListW(void) duplicate = SetupDuplicateDiskSpaceListW(handle, (void *)0xdeadbeef, 0, 0); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListW(handle, NULL, 0xdeadbeef, 0); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListW(handle, NULL, 0, SPDSL_IGNORE_DISK); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); duplicate = SetupDuplicateDiskSpaceListW(handle, NULL, 0, ~0U); ok(!duplicate, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
duplicate = SetupDuplicateDiskSpaceListW(handle, NULL, 0, 0); ok(duplicate != NULL, "Expected SetupDuplicateDiskSpaceList to return NULL, got %p\n", duplicate); @@ -303,7 +303,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) ret = SetupQuerySpaceRequiredOnDriveA(NULL, NULL, NULL, NULL, 0); ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -312,14 +312,14 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret); ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupQuerySpaceRequiredOnDriveA(NULL, "", NULL, NULL, 0); ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -328,7 +328,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret); ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
handle = SetupCreateDiskSpaceListA(NULL, 0, 0); @@ -340,7 +340,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_DRIVE, /* Win9x */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -350,14 +350,14 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_DRIVE, /* Win9x */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupQuerySpaceRequiredOnDriveA(handle, "", NULL, NULL, 0); ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_DRIVE, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -366,7 +366,7 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void) ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveA to return FALSE, got %d\n", ret); ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n"); ok(GetLastError() == ERROR_INVALID_DRIVE, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
ok(SetupDestroyDiskSpaceList(handle), @@ -390,7 +390,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void) } ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -399,14 +399,14 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void) ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret); ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupQuerySpaceRequiredOnDriveW(NULL, emptyW, NULL, NULL, 0); ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -415,7 +415,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void) ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret); ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n"); ok(GetLastError() == ERROR_INVALID_HANDLE, - "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
handle = SetupCreateDiskSpaceListA(NULL, 0, 0); @@ -427,7 +427,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void) ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_DRIVE, /* NT4/Win2k/XP/Win2k3 */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -437,14 +437,14 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void) ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INVALID_DRIVE, /* NT4/Win2k/XP/Win2k3 */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupQuerySpaceRequiredOnDriveW(handle, emptyW, NULL, NULL, 0); ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_DRIVE, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -453,7 +453,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void) ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret); ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n"); ok(GetLastError() == ERROR_INVALID_DRIVE, - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
ok(SetupDestroyDiskSpaceList(handle), diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c index 6c41c72453e..f53740a8824 100644 --- a/dlls/setupapi/tests/install.c +++ b/dlls/setupapi/tests/install.c @@ -62,7 +62,7 @@ static void load_resource(const char *name, const char *filename) void *ptr;
file = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %d\n", filename, GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %ld\n", filename, GetLastError());
res = FindResourceA(NULL, name, "TESTDLL"); ok( res != 0, "couldn't find resource\n" ); @@ -78,9 +78,9 @@ static void create_inf_file(LPCSTR filename, const char *data) BOOL ret; HANDLE handle = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); - ok(handle != INVALID_HANDLE_VALUE, "Failed to create %s, error %u.\n", filename, GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "Failed to create %s, error %lu.\n", filename, GetLastError()); ret = WriteFile(handle, data, strlen(data), &res, NULL); - ok(ret, "Failed to write file, error %u.\n", GetLastError()); + ok(ret, "Failed to write file, error %lu.\n", GetLastError()); CloseHandle(handle); }
@@ -292,7 +292,7 @@ static void create_cab_file(const CHAR *name, const CHAR *files) res = add_file(hfci, ptr, tcompTYPE_MSZIP); ok(res, "Failed to add file: %s\n", ptr); res = DeleteFileA(ptr); - ok(res, "Failed to delete file %s, error %u\n", ptr, GetLastError()); + ok(res, "Failed to delete file %s, error %lu\n", ptr, GetLastError()); ptr += lstrlenA(ptr) + 1; }
@@ -339,7 +339,7 @@ static void ok_registry(BOOL expectsuccess) ret = RegDeleteKeyA(HKEY_CURRENT_USER, "Software\Wine\setupapitest"); ok((expectsuccess && ret == ERROR_SUCCESS) || (!expectsuccess && ret == ERROR_FILE_NOT_FOUND), - "Expected registry key Software\Wine\setupapitest to %s, RegDeleteKey returned %d\n", + "Expected registry key Software\Wine\setupapitest to %s, RegDeleteKey returned %ld\n", expectsuccess ? "exist" : "not exist", ret); } @@ -356,7 +356,7 @@ static void test_cmdline(void) run_cmdline("DefaultInstall", 128, path); ok_registry(TRUE); ret = DeleteFileA(inffile); - ok(ret, "Expected source inf to exist, last error was %d\n", GetLastError()); + ok(ret, "Expected source inf to exist, last error was %ld\n", GetLastError());
/* Test handling of spaces in path, unquoted and quoted */ create_inf_file(infwithspaces, cmdline_inf); @@ -370,7 +370,7 @@ static void test_cmdline(void) ok_registry(FALSE);
ret = DeleteFileA(infwithspaces); - ok(ret, "Expected source inf to exist, last error was %d\n", GetLastError()); + ok(ret, "Expected source inf to exist, last error was %ld\n", GetLastError()); }
static const char *cmdline_inf_reg = "[Version]\n" @@ -409,7 +409,7 @@ static void test_registry(void) RegDeleteKeyA(HKEY_CURRENT_USER, "Software\Wine\setupapitest"); } ret = DeleteFileA(inffile); - ok(ret, "Expected source inf to exist, last error was %d\n", GetLastError()); + ok(ret, "Expected source inf to exist, last error was %ld\n", GetLastError()); }
static void test_install_from(void) @@ -435,7 +435,7 @@ static void test_install_from(void) ret = SetupInstallFromInfSectionA(NULL, infhandle, "DefaultInstall", SPINST_REGISTRY, key, "A:\", 0, NULL, NULL, NULL, NULL); ok(ret, "Unexpected failure\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
/* Check if the registry key is recursively deleted */ res = RegOpenKeyA(HKEY_CURRENT_USER, "Software\Wine\setupapitest", &key); @@ -470,7 +470,7 @@ static void test_install_svc_from(void) ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SECTION_NOT_FOUND, - "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_SECTION_NOT_FOUND, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -482,7 +482,7 @@ static void test_install_svc_from(void) ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_SECTION_NOT_FOUND, - "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_SECTION_NOT_FOUND, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -494,7 +494,7 @@ static void test_install_svc_from(void) ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); + "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -506,7 +506,7 @@ static void test_install_svc_from(void) ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); + "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -518,7 +518,7 @@ static void test_install_svc_from(void) ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); + "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -530,7 +530,7 @@ static void test_install_svc_from(void) ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); + "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -542,7 +542,7 @@ static void test_install_svc_from(void) ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(!ret, "Expected failure\n"); ok(GetLastError() == ERROR_BAD_SERVICE_INSTALLSECT, - "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n", GetLastError()); + "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -561,7 +561,7 @@ static void test_install_svc_from(void) } ok(ret, "Expected success\n"); ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -573,7 +573,7 @@ static void test_install_svc_from(void)
SetLastError(0xdeadbeef); ret = DeleteService(svc_handle); - ok(ret, "Service could not be deleted : %d\n", GetLastError()); + ok(ret, "Service could not be deleted : %ld\n", GetLastError());
CloseServiceHandle(svc_handle); CloseServiceHandle(scm_handle); @@ -588,7 +588,7 @@ static void test_install_svc_from(void) SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "XSP.InstallPerVer", 0); ok(ret, "Expected success\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -602,7 +602,7 @@ static void test_install_svc_from(void) SetLastError(0xdeadbeef); ret = SetupInstallServicesFromInfSectionA(infhandle, "Winetest.Services", 0); ok(ret, "Expected success\n"); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %08lx\n", GetLastError()); SetupCloseInfFile(infhandle); DeleteFileA(inffile);
@@ -664,11 +664,11 @@ static void test_service_install(const char *executable, const char *argument) lstrcatA(driver, "\system32\drivers\winetest.sys");
ret = CopyFileA(executable, "winetest.sys", TRUE); - ok(ret, "CopyFileA failed, error %u\n", GetLastError()); + ok(ret, "CopyFileA failed, error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(tests); ++i) { - winetest_push_context("%u", i); + winetest_push_context("%lu", i);
sprintf(buffer, inf, tests[i].add_service_flags, argument, tests[i].service_type, tests[i].start_type); create_inf_file(inffile, buffer); @@ -687,20 +687,20 @@ static void test_service_install(const char *executable, const char *argument)
ret = StartServiceA(svc_handle, 0, NULL); if (!tests[i].expect_start_error) - ok(ret, "StartServiceA failed, error %u\n", GetLastError()); + ok(ret, "StartServiceA failed, error %lu\n", GetLastError()); else { ok(!ret, "StartServiceA succeeded\n"); - ok(GetLastError() == tests[i].expect_start_error, "got error %u\n", GetLastError()); + ok(GetLastError() == tests[i].expect_start_error, "got error %lu\n", GetLastError()); }
ret = QueryServiceStatus(svc_handle, &status); - ok(ret, "QueryServiceStatus failed: %u\n", GetLastError()); + ok(ret, "QueryServiceStatus failed: %lu\n", GetLastError()); while (status.dwCurrentState == SERVICE_START_PENDING) { Sleep(100); ret = QueryServiceStatus(svc_handle, &status); - ok(ret, "QueryServiceStatus failed: %u\n", GetLastError()); + ok(ret, "QueryServiceStatus failed: %lu\n", GetLastError()); }
ret = ControlService(svc_handle, SERVICE_CONTROL_STOP, &status); @@ -708,13 +708,13 @@ static void test_service_install(const char *executable, const char *argument) { Sleep(100); ret = QueryServiceStatus(svc_handle, &status); - ok(ret, "QueryServiceStatus failed: %u\n", GetLastError()); + ok(ret, "QueryServiceStatus failed: %lu\n", GetLastError()); } - ok(status.dwCurrentState == SERVICE_STOPPED, "expected SERVICE_STOPPED, got %d\n", status.dwCurrentState); + ok(status.dwCurrentState == SERVICE_STOPPED, "expected SERVICE_STOPPED, got %ld\n", status.dwCurrentState);
SetLastError(0xdeadbeef); ret = DeleteService(svc_handle); - ok(ret, "Service could not be deleted : %d\n", GetLastError()); + ok(ret, "Service could not be deleted : %ld\n", GetLastError());
CloseServiceHandle(svc_handle); CloseServiceHandle(scm_handle); @@ -807,17 +807,17 @@ static void test_inffilelistA(void) */ if (!GetTempFileNameA(CURR_DIR, "inftest", 1, dir)) { - win_skip("GetTempFileNameA failed with error %d\n", GetLastError()); + win_skip("GetTempFileNameA failed with error %ld\n", GetLastError()); return; } if (!CreateDirectoryA(dir, NULL )) { - win_skip("CreateDirectoryA(%s) failed with error %d\n", dir, GetLastError()); + win_skip("CreateDirectoryA(%s) failed with error %ld\n", dir, GetLastError()); return; } if (!SetCurrentDirectoryA(dir)) { - win_skip("SetCurrentDirectoryA failed with error %d\n", GetLastError()); + win_skip("SetCurrentDirectoryA failed with error %ld\n", GetLastError()); RemoveDirectoryA(dir); return; } @@ -831,7 +831,7 @@ static void test_inffilelistA(void) ret = SetupGetInfFileListA(dir, INF_STYLE_OLDNT | INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); ok(ret, "expected SetupGetInfFileListA to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + ok(expected == outsize, "expected required buffersize to be %ld, got %ld\n", expected, outsize); for(p = buffer; lstrlenA(p) && (outsize > (p - buffer)); p+=lstrlenA(p) + 1) ok(!lstrcmpA(p,inffile2) || !lstrcmpA(p,inffile), @@ -872,7 +872,7 @@ static void test_inffilelist(void) expected = 0; SetLastError(0xdeadbeef); ret = SetupGetInfFileListW(NULL, INF_STYLE_WIN4, NULL, 0, &expected); - ok(ret, "expected SetupGetInfFileListW to succeed! Error: %d\n", GetLastError()); + ok(ret, "expected SetupGetInfFileListW to succeed! Error: %ld\n", GetLastError()); ok(expected > 0, "expected required buffersize to be at least 1\n");
/* check if an empty string doesn't behaves like NULL */ @@ -886,17 +886,17 @@ static void test_inffilelist(void) */ if (!GetTempFileNameA(CURR_DIR, "inftest", 1, dirA)) { - win_skip("GetTempFileNameA failed with error %d\n", GetLastError()); + win_skip("GetTempFileNameA failed with error %ld\n", GetLastError()); return; } if (!CreateDirectoryA(dirA, NULL )) { - win_skip("CreateDirectoryA(%s) failed with error %d\n", dirA, GetLastError()); + win_skip("CreateDirectoryA(%s) failed with error %ld\n", dirA, GetLastError()); return; } if (!SetCurrentDirectoryA(dirA)) { - win_skip("SetCurrentDirectoryA failed with error %d\n", GetLastError()); + win_skip("SetCurrentDirectoryA failed with error %ld\n", GetLastError()); RemoveDirectoryA(dirA); return; } @@ -910,9 +910,9 @@ static void test_inffilelist(void) SetLastError(0xdeadbeef); ret = SetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(outsize == 1, "expected required buffersize to be 1, got %d\n", outsize); + ok(outsize == 1, "expected required buffersize to be 1, got %ld\n", outsize); ok(ERROR_PATH_NOT_FOUND == GetLastError(), - "expected error ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + "expected error ERROR_PATH_NOT_FOUND, got %ld\n", GetLastError());
create_inf_file(inffile, inf); create_inf_file(inffile2, inf); @@ -927,7 +927,7 @@ static void test_inffilelist(void) ret = SetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); ok(!ret, "expected SetupGetInfFileListW to fail!\n"); ok(ERROR_DIRECTORY == GetLastError(), - "expected error ERROR_DIRECTORY, got %d\n", GetLastError()); + "expected error ERROR_DIRECTORY, got %ld\n", GetLastError());
/* make the filename look like directory */ @@ -937,7 +937,7 @@ static void test_inffilelist(void) ret = SetupGetInfFileListW(dir, INF_STYLE_WIN4, NULL, 0, &outsize); ok(!ret, "expected SetupGetInfFileListW to fail!\n"); ok(ERROR_DIRECTORY == GetLastError(), - "expected error ERROR_DIRECTORY, got %d\n", GetLastError()); + "expected error ERROR_DIRECTORY, got %ld\n", GetLastError());
/* now check the buffer contents of a valid call */ @@ -945,7 +945,7 @@ static void test_inffilelist(void) expected = 3 + strlen(inffile) + strlen(inffile2); ret = SetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + ok(expected == outsize, "expected required buffersize to be %ld, got %ld\n", expected, outsize); for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW), @@ -956,7 +956,7 @@ static void test_inffilelist(void) create_inf_file(inffile2, inf2); ret = SetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + ok(expected == outsize, "expected required buffersize to be %ld, got %ld\n", expected, outsize); for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW), @@ -968,7 +968,7 @@ static void test_inffilelist(void) expected = 3 + strlen(inffile) + strlen(inffile2); ret = SetupGetInfFileListW(dir, INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + ok(expected == outsize, "expected required buffersize to be %ld, got %ld\n", expected, outsize); for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW), @@ -979,7 +979,7 @@ static void test_inffilelist(void) expected = 2 + strlen(invalid_inf); ret = SetupGetInfFileListW(dir, INF_STYLE_OLDNT, buffer, MAX_PATH, &outsize); ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + ok(expected == outsize, "expected required buffersize to be %ld, got %ld\n", expected, outsize); for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) ok(!lstrcmpW(p,invalid_infW), "unexpected filename %s\n",wine_dbgstr_w(p)); @@ -990,7 +990,7 @@ static void test_inffilelist(void) ret = SetupGetInfFileListW(dir, INF_STYLE_OLDNT | INF_STYLE_WIN4, buffer, MAX_PATH, &outsize); ok(ret, "expected SetupGetInfFileListW to succeed!\n"); - ok(expected == outsize, "expected required buffersize to be %d, got %d\n", + ok(expected == outsize, "expected required buffersize to be %ld, got %ld\n", expected, outsize); for(p = buffer; lstrlenW(p) && (outsize > (p - buffer)); p+=lstrlenW(p) + 1) ok(!lstrcmpW(p,inffile2W) || !lstrcmpW(p,inffileW) || !lstrcmpW(p,invalid_infW), @@ -1036,12 +1036,12 @@ static void check_dirid(int dirid, LPCSTR expected) ret = ERROR_FILE_NOT_FOUND; }
- ok(ret == ERROR_SUCCESS, "Failed getting value for dirid %i, err=%d\n", dirid, ret); + ok(ret == ERROR_SUCCESS, "Failed getting value for dirid %i, err=%ld\n", dirid, ret); ok(!strcmp(actual, expected), "Expected path for dirid %i was "%s", got "%s"\n", dirid, expected, actual);
ok_registry(TRUE); ret = DeleteFileA(inffile); - ok(ret, "Expected source inf to exist, last error was %d\n", GetLastError()); + ok(ret, "Expected source inf to exist, last error was %ld\n", GetLastError()); }
/* Test dirid values */ @@ -1118,21 +1118,21 @@ static void test_install_files_queue(void)
sprintf(path, "%s\%s", CURR_DIR, inffile); hinf = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#x.\n", GetLastError()); + ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#lx.\n", GetLastError());
ret = CreateDirectoryA("src", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("src/alpha", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("src/alpha/beta", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("src/beta", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = SetupSetDirectoryIdA(hinf, 40000, CURR_DIR); - ok(ret, "Failed to set directory ID, error %u.\n", GetLastError()); + ok(ret, "Failed to set directory ID, error %lu.\n", GetLastError());
ret = CreateDirectoryA("dst", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError());
create_file("src/one.txt"); create_file("src/beta/two.txt"); @@ -1144,19 +1144,19 @@ static void test_install_files_queue(void) create_file("dst/ten.txt");
queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError());
context = SetupInitDefaultQueueCallbackEx(NULL, INVALID_HANDLE_VALUE, 0, 0, 0); - ok(!!context, "Failed to create callback context, error %#x.\n", GetLastError()); + ok(!!context, "Failed to create callback context, error %#lx.\n", GetLastError());
ret = SetupInstallFilesFromInfSectionA(hinf, NULL, queue, "DefaultInstall", "src", 0); - ok(ret, "Failed to install files, error %#x.\n", GetLastError()); + ok(ret, "Failed to install files, error %#lx.\n", GetLastError());
ok(file_exists("src/one.txt"), "Source file should exist.\n"); ok(!file_exists("dst/one.txt"), "Destination file should not exist.\n");
ret = SetupCommitFileQueueA(NULL, queue, SetupDefaultQueueCallbackA, context); - ok(ret, "Failed to commit queue, error %#x.\n", GetLastError()); + ok(ret, "Failed to commit queue, error %#lx.\n", GetLastError());
ok(file_exists("src/one.txt"), "Source file should exist.\n"); ok(delete_file("dst/one.txt"), "Destination file should exist.\n"); @@ -1173,7 +1173,7 @@ static void test_install_files_queue(void)
SetupTermDefaultQueueCallback(context); ret = SetupCloseFileQueue(queue); - ok(ret, "Failed to close queue, error %#x.\n", GetLastError()); + ok(ret, "Failed to close queue, error %#lx.\n", GetLastError());
SetupCloseInfFile(hinf); delete_file("src/one.txt"); @@ -1188,7 +1188,7 @@ static void test_install_files_queue(void) delete_file("src/"); delete_file("dst/"); ret = DeleteFileA(inffile); - ok(ret, "Failed to delete INF file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete INF file, error %lu.\n", GetLastError()); }
static unsigned int got_need_media, got_copy_error, got_start_copy; @@ -1196,7 +1196,7 @@ static unsigned int testmode;
static UINT WINAPI need_media_cb(void *context, UINT message, UINT_PTR param1, UINT_PTR param2) { - if (winetest_debug > 1) trace("%p, %#x, %#lx, %#lx\n", context, message, param1, param2); + if (winetest_debug > 1) trace("%p, %#x, %#Ix, %#Ix\n", context, message, param1, param2);
if (message == SPFILENOTIFY_NEEDMEDIA) { @@ -1213,9 +1213,9 @@ static UINT WINAPI need_media_cb(void *context, UINT message, UINT_PTR param1, U path[0] = 0;
if (testmode == 0) - ok(media->Flags == SP_COPY_WARNIFSKIP, "Got Flags %#x.\n", media->Flags); + ok(media->Flags == SP_COPY_WARNIFSKIP, "Got Flags %#lx.\n", media->Flags); else - ok(!media->Flags, "Got Flags %#x for test %u.\n", media->Flags, testmode); + ok(!media->Flags, "Got Flags %#lx for test %u.\n", media->Flags, testmode);
switch (testmode) { @@ -1331,7 +1331,7 @@ static UINT WINAPI need_media_cb(void *context, UINT message, UINT_PTR param1, U
static UINT WINAPI need_media_newpath_cb(void *context, UINT message, UINT_PTR param1, UINT_PTR param2) { - if (winetest_debug > 1) trace("%p, %#x, %#lx, %#lx\n", context, message, param1, param2); + if (winetest_debug > 1) trace("%p, %#x, %#Ix, %#Ix\n", context, message, param1, param2);
if (message == SPFILENOTIFY_NEEDMEDIA) { @@ -1413,12 +1413,12 @@ static void run_queue_(unsigned int line, HSPFILEQ queue, PSP_FILE_CALLBACK_A cb { void *context = SetupInitDefaultQueueCallbackEx(NULL, INVALID_HANDLE_VALUE, 0, 0, 0); BOOL ret; - ok_(__FILE__,line)(!!context, "Failed to create callback context, error %#x.\n", GetLastError()); + ok_(__FILE__,line)(!!context, "Failed to create callback context, error %#lx.\n", GetLastError()); ret = SetupCommitFileQueueA(NULL, queue, cb, context); - ok_(__FILE__,line)(ret, "Failed to commit queue, error %#x.\n", GetLastError()); + ok_(__FILE__,line)(ret, "Failed to commit queue, error %#lx.\n", GetLastError()); SetupTermDefaultQueueCallback(context); ret = SetupCloseFileQueue(queue); - ok_(__FILE__,line)(ret, "Failed to close queue, error %#x.\n", GetLastError()); + ok_(__FILE__,line)(ret, "Failed to close queue, error %#lx.\n", GetLastError()); }
static void test_install_file(void) @@ -1448,16 +1448,16 @@ static void test_install_file(void)
sprintf(path, "%s\%s", CURR_DIR, inffile); hinf = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#x.\n", GetLastError()); + ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#lx.\n", GetLastError());
ret = CreateDirectoryA("src", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("src/alpha", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("src/beta", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("dst", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); create_file("src/one.txt"); create_file("src/beta/two.txt"); create_file("src/alpha/three.txt"); @@ -1467,13 +1467,13 @@ static void test_install_file(void) SetLastError(0xdeadbeef); ret = SetupInstallFileA(hinf, &infctx, "one.txt", "src", "one.txt", 0, NULL, NULL); ok(ret, "Expected success.\n"); - ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#lx.\n", GetLastError()); ok(delete_file("dst/one.txt"), "Destination file should exist.\n");
SetLastError(0xdeadbeef); ret = SetupInstallFileA(hinf, &infctx, "one.txt", "src", "one.txt", SP_COPY_REPLACEONLY, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#lx.\n", GetLastError()); ok(!file_exists("dst/one.txt"), "Destination file should not exist.\n");
ret = SetupFindFirstLineA(hinf, "section1", "two.txt", &infctx); @@ -1481,7 +1481,7 @@ static void test_install_file(void) SetLastError(0xdeadbeef); ret = SetupInstallFileA(hinf, &infctx, "two.txt", "src", "two.txt", 0, NULL, NULL); todo_wine ok(ret, "Expected success.\n"); - todo_wine ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#x.\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#lx.\n", GetLastError()); todo_wine ok(delete_file("dst/two.txt"), "Destination file should exist.\n");
ret = SetupFindFirstLineA(hinf, "section1", "three.txt", &infctx); @@ -1489,7 +1489,7 @@ static void test_install_file(void) SetLastError(0xdeadbeef); ret = SetupInstallFileA(hinf, &infctx, "three.txt", "src", "three.txt", 0, NULL, NULL); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Got unexpected error %#lx.\n", GetLastError()); ok(!file_exists("dst/three.txt"), "Destination file should not exist.\n");
ret = SetupFindFirstLineA(hinf, "section1", "three.txt", &infctx); @@ -1497,7 +1497,7 @@ static void test_install_file(void) SetLastError(0xdeadbeef); ret = SetupInstallFileA(hinf, &infctx, "three.txt", "src/alpha", "three.txt", 0, NULL, NULL); ok(ret, "Expected success.\n"); - ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Got unexpected error %#lx.\n", GetLastError()); ok(delete_file("dst/three.txt"), "Destination file should exist.\n");
SetupCloseInfFile(hinf); @@ -1547,16 +1547,16 @@ static void test_need_media(void)
sprintf(path, "%s\%s", CURR_DIR, inffile); hinf = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#x.\n", GetLastError()); + ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#lx.\n", GetLastError());
ret = CreateDirectoryA("src", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("src/alpha", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("src/beta", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("dst", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); create_file("src/one.txt"); create_file("src/beta/two.txt"); create_file("src/alpha/three.txt"); @@ -1565,19 +1565,19 @@ static void test_need_media(void) create_cab_file("src/alpha/tessares.cab", "seven.txt\0eight.txt\0");
queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", "File One", NULL, "dst", NULL, SP_COPY_WARNIFSKIP); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/one.txt"), "Destination file should exist.\n");
got_need_media = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", "File One", NULL, "dst", NULL, SP_COPY_WARNIFSKIP | SP_COPY_REPLACEONLY); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(!file_exists("dst/one.txt"), "Destination file should exist.\n"); @@ -1587,9 +1587,9 @@ static void test_need_media(void) got_need_media = 0; testmode = 1; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", "beta", "two.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/two.txt"), "Destination file should exist.\n"); @@ -1599,9 +1599,9 @@ static void test_need_media(void) got_need_media = 0; testmode = 2; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", "beta", "two.txt", "desc", "faketag", "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/two.txt"), "Destination file should exist.\n"); @@ -1611,32 +1611,32 @@ static void test_need_media(void) got_need_media = 0; testmode = 3; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopySectionA(queue, "src", hinf, NULL, "section1", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/one.txt"), "Destination file should exist.\n");
got_need_media = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupInstallFilesFromInfSectionA(hinf, NULL, queue, "install_section", "src", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/one.txt"), "Destination file should exist.\n");
got_need_media = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError());
ret = SetupQueueDefaultCopyA(queue, hinf, "src", NULL, "one.txt", 0); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got error %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Got error %#lx.\n", GetLastError());
ret = SetupQueueDefaultCopyA(queue, hinf, "src", "one.txt", "one.txt", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/one.txt"), "Destination file should exist.\n"); @@ -1644,18 +1644,18 @@ static void test_need_media(void) got_need_media = 0; testmode = 4; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopySectionA(queue, "src", hinf, NULL, "section2", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/two.txt"), "Destination file should exist.\n");
got_need_media = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueDefaultCopyA(queue, hinf, "src", "two.txt", "two.txt", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/two.txt"), "Destination file should exist.\n"); @@ -1663,18 +1663,18 @@ static void test_need_media(void) got_need_media = 0; testmode = 5; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopySectionA(queue, "src", hinf, NULL, "section3", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/three.txt"), "Destination file should exist.\n");
got_need_media = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueDefaultCopyA(queue, hinf, "src", "three.txt", "three.txt", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/three.txt"), "Destination file should exist.\n"); @@ -1684,13 +1684,13 @@ static void test_need_media(void) got_need_media = 0; testmode = 6; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", "beta", "two.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src/alpha", NULL, "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 2, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/one.txt"), "Destination file should exist.\n"); @@ -1704,9 +1704,9 @@ static void test_need_media(void) got_need_media = 0; testmode = 8; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopySectionA(queue, "src", hinf, NULL, "section4", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError());\ + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError());\ run_queue(queue, need_media_cb); ok(got_need_media == 2, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/one.txt"), "Destination file should exist.\n"); @@ -1718,11 +1718,11 @@ static void test_need_media(void) got_need_media = 0; testmode = 10; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", "desc1", NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", "beta", "two.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 2, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/one.txt"), "Destination file should exist.\n"); @@ -1731,11 +1731,11 @@ static void test_need_media(void) got_need_media = 0; testmode = 12; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", "desc1", "faketag", "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", "beta", "two.txt", "desc1", "faketag2", "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 2, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/one.txt"), "Destination file should exist.\n"); @@ -1746,11 +1746,11 @@ static void test_need_media(void) got_need_media = 0; testmode = 14; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "four.txt", "desc", "treis.cab", "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", "alpha", "five.txt", "desc", "treis.cab", "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/four.txt"), "Destination file should exist.\n"); @@ -1759,11 +1759,11 @@ static void test_need_media(void) got_need_media = 0; testmode = 15; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", "alpha", "seven.txt", "desc", "tessares.cab", "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "eight.txt", "desc", "tessares.cab", "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/seven.txt"), "Destination file should exist.\n"); @@ -1772,9 +1772,9 @@ static void test_need_media(void) got_need_media = 0; testmode = 16; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueDefaultCopyA(queue, hinf, "src/alpha", "six.txt", "six.txt", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/six.txt"), "Destination file should exist.\n"); @@ -1784,9 +1784,9 @@ static void test_need_media(void) got_need_media = 0; testmode = 1; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", "beta", "two.txt", NULL, NULL, "dst", NULL, SP_COPY_SOURCE_ABSOLUTE); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/two.txt"), "Destination file should exist.\n"); @@ -1794,9 +1794,9 @@ static void test_need_media(void) got_need_media = 0; testmode = 1; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", "beta", "two.txt", NULL, NULL, "dst", NULL, SP_COPY_SOURCEPATH_ABSOLUTE); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/two.txt"), "Destination file should exist.\n"); @@ -1804,9 +1804,9 @@ static void test_need_media(void) got_need_media = 0; testmode = 5; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopySectionA(queue, "src", hinf, NULL, "section3", SP_COPY_SOURCE_ABSOLUTE); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/three.txt"), "Destination file should exist.\n"); @@ -1814,9 +1814,9 @@ static void test_need_media(void) got_need_media = 0; testmode = 5; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopySectionA(queue, "src", hinf, NULL, "section3", SP_COPY_SOURCEPATH_ABSOLUTE); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(delete_file("dst/three.txt"), "Destination file should exist.\n"); @@ -1826,11 +1826,11 @@ static void test_need_media(void) testmode = 0; got_need_media = got_copy_error = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", "alpha", "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(!got_copy_error, "Got %u copy errors.\n", got_copy_error); @@ -1846,11 +1846,11 @@ static void test_need_media(void) testmode = 1; got_need_media = got_copy_error = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", "alpha", "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", "beta", "two.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(!got_copy_error, "Got %u copy errors.\n", got_copy_error); @@ -1859,11 +1859,11 @@ static void test_need_media(void)
got_need_media = got_copy_error = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", "alpha\", "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "six.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(!got_copy_error, "Got %u copy errors.\n", got_copy_error); @@ -1876,11 +1876,11 @@ static void test_need_media(void) testmode = 2; got_need_media = got_copy_error = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", "alpha", "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 2, "Got %u callbacks.\n", got_need_media); ok(!got_copy_error, "Got %u copy errors.\n", got_copy_error); @@ -1892,11 +1892,11 @@ static void test_need_media(void) testmode = 0; got_need_media = got_copy_error = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "fake.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(got_copy_error == 1, "Got %u copy errors.\n", got_copy_error); @@ -1907,13 +1907,13 @@ static void test_need_media(void) testmode = 3; got_need_media = got_copy_error = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "six.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(got_copy_error == 1, "Got %u copy errors.\n", got_copy_error); @@ -1926,13 +1926,13 @@ static void test_need_media(void) testmode = 4; got_need_media = got_copy_error = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "six.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(got_copy_error == 2, "Got %u copy errors.\n", got_copy_error); @@ -1945,11 +1945,11 @@ static void test_need_media(void) testmode = 0; got_need_media = got_copy_error = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "four.txt", "desc", "treis.cab", "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", "alpha", "five.txt", "desc", "treis.cab", "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(!got_copy_error, "Got %u copy errors.\n", got_copy_error); @@ -1961,11 +1961,11 @@ static void test_need_media(void) testmode = 5; got_need_media = got_copy_error = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "fake", "alpha", "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 2, "Got %u callbacks.\n", got_need_media); ok(!got_copy_error, "Got %u copy errors.\n", got_copy_error); @@ -1975,7 +1975,7 @@ static void test_need_media(void) testmode = 6; got_need_media = got_copy_error = got_start_copy = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); copy_params.QueueHandle = queue; copy_params.SourceFilename = "one.txt"; /* Leaving TargetDirectory NULL causes it to be filled with garbage on @@ -1983,7 +1983,7 @@ static void test_need_media(void) * from LayoutInf. */ copy_params.TargetDirectory = "dst"; ret = SetupQueueCopyIndirectA(©_params); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, need_media_newpath_cb); ok(got_need_media == 1, "Got %u callbacks.\n", got_need_media); ok(!got_copy_error, "Got %u copy errors.\n", got_copy_error); @@ -1992,7 +1992,7 @@ static void test_need_media(void)
got_need_media = got_copy_error = got_start_copy = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); copy_params.LayoutInf = hinf; copy_params.QueueHandle = queue; /* In fact this fails with ERROR_INVALID_PARAMETER on 8+. */ @@ -2019,7 +2019,7 @@ static void test_need_media(void) delete_file("src/"); delete_file("dst/"); ret = DeleteFileA(inffile); - ok(ret, "Failed to delete INF file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete INF file, error %lu.\n", GetLastError()); }
static void test_close_queue(void) @@ -2028,11 +2028,11 @@ static void test_close_queue(void) BOOL ret;
context = SetupInitDefaultQueueCallback(NULL); - ok(!!context, "Failed to create callback context, error %#x.\n", GetLastError()); + ok(!!context, "Failed to create callback context, error %#lx.\n", GetLastError());
ret = SetupCloseFileQueue(context); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Got unexpected error %lu.\n", GetLastError());
SetupTermDefaultQueueCallback(context); } @@ -2041,7 +2041,7 @@ static unsigned int start_copy_ret;
static UINT WINAPI start_copy_cb(void *context, UINT message, UINT_PTR param1, UINT_PTR param2) { - if (winetest_debug > 1) trace("%p, %#x, %#lx, %#lx\n", context, message, param1, param2); + if (winetest_debug > 1) trace("%p, %#x, %#Ix, %#Ix\n", context, message, param1, param2);
if (message == SPFILENOTIFY_STARTCOPY) { @@ -2066,7 +2066,7 @@ static void test_start_copy(void) BOOL ret;
ret = CreateDirectoryA("src", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); create_file("src/one.txt"); create_file("src/two.txt"); create_file("src/three.txt"); @@ -2074,15 +2074,15 @@ static void test_start_copy(void) start_copy_ret = FILEOP_DOIT; got_start_copy = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "two.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, start_copy_cb); todo_wine ok(got_start_copy == 3, "Got %u callbacks.\n", got_start_copy); ok(delete_file("dst/one.txt"), "Destination file should exist.\n"); @@ -2092,13 +2092,13 @@ static void test_start_copy(void) start_copy_ret = FILEOP_SKIP; got_start_copy = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "two.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); run_queue(queue, start_copy_cb); ok(got_start_copy == 3, "Got %u callbacks.\n", got_start_copy); ok(delete_file("dst/one.txt"), "Destination file should exist.\n"); @@ -2108,18 +2108,18 @@ static void test_start_copy(void) start_copy_ret = FILEOP_ABORT; got_start_copy = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "one.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "two.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "src", NULL, "three.txt", NULL, NULL, "dst", NULL, 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); context = SetupInitDefaultQueueCallbackEx(NULL, INVALID_HANDLE_VALUE, 0, 0, 0); SetLastError(0xdeadbeef); ret = SetupCommitFileQueueA(NULL, queue, start_copy_cb, context); ok(!ret, "Expected failure.\n"); - ok(GetLastError() == 0xdeadf00d, "Got unexpected error %u.\n", GetLastError()); + ok(GetLastError() == 0xdeadf00d, "Got unexpected error %lu.\n", GetLastError()); SetupTermDefaultQueueCallback(context); SetupCloseFileQueue(queue); ok(got_start_copy == 2, "Got %u callbacks.\n", got_start_copy); @@ -2155,54 +2155,54 @@ static void test_register_dlls(void) create_inf_file("test.inf", inf_data); sprintf(path, "%s\test.inf", CURR_DIR); hinf = SetupOpenInfFileA(path, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#x.\n", GetLastError()); + ok(hinf != INVALID_HANDLE_VALUE, "Failed to open INF file, error %#lx.\n", GetLastError());
load_resource("selfreg.dll", "winetest_selfreg.dll"); ret = SetupSetDirectoryIdA(hinf, 40000, CURR_DIR); - ok(ret, "Failed to set directory ID, error %u.\n", GetLastError()); + ok(ret, "Failed to set directory ID, error %lu.\n", GetLastError());
RegDeleteKeyA(HKEY_CURRENT_USER, "winetest_setupapi_selfreg");
ret = SetupInstallFromInfSectionA(NULL, hinf, "DefaultInstall", SPINST_REGSVR, NULL, "C:\", 0, SetupDefaultQueueCallbackA, context, NULL, NULL); - ok(ret, "Failed to install, error %#x.\n", GetLastError()); + ok(ret, "Failed to install, error %#lx.\n", GetLastError());
l = RegOpenKeyA(HKEY_CURRENT_USER, "winetest_setupapi_selfreg", &key); - ok(!l, "Got error %u.\n", l); + ok(!l, "Got error %lu.\n", l); RegCloseKey(key);
ret = SetupInstallFromInfSectionA(NULL, hinf, "DefaultInstall", SPINST_UNREGSVR, NULL, "C:\", 0, SetupDefaultQueueCallbackA, context, NULL, NULL); - ok(ret, "Failed to install, error %#x.\n", GetLastError()); + ok(ret, "Failed to install, error %#lx.\n", GetLastError());
l = RegOpenKeyA(HKEY_CURRENT_USER, "winetest_setupapi_selfreg", &key); - ok(l == ERROR_FILE_NOT_FOUND, "Got error %u.\n", l); + ok(l == ERROR_FILE_NOT_FOUND, "Got error %lu.\n", l);
hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = SetupInstallFromInfSectionA(NULL, hinf, "DefaultInstall", SPINST_REGSVR, NULL, "C:\", 0, SetupDefaultQueueCallbackA, context, NULL, NULL); - ok(ret, "Failed to install, error %#x.\n", GetLastError()); + ok(ret, "Failed to install, error %#lx.\n", GetLastError());
l = RegOpenKeyA(HKEY_CURRENT_USER, "winetest_setupapi_selfreg", &key); - ok(!l, "Got error %u.\n", l); + ok(!l, "Got error %lu.\n", l); RegCloseKey(key);
ret = SetupInstallFromInfSectionA(NULL, hinf, "DefaultInstall", SPINST_UNREGSVR, NULL, "C:\", 0, SetupDefaultQueueCallbackA, context, NULL, NULL); - ok(ret, "Failed to install, error %#x.\n", GetLastError()); + ok(ret, "Failed to install, error %#lx.\n", GetLastError());
l = RegOpenKeyA(HKEY_CURRENT_USER, "winetest_setupapi_selfreg", &key); - ok(l == ERROR_FILE_NOT_FOUND, "Got error %u.\n", l); + ok(l == ERROR_FILE_NOT_FOUND, "Got error %lu.\n", l);
CoUninitialize();
SetupCloseInfFile(hinf); ret = DeleteFileA("test.inf"); - ok(ret, "Failed to delete INF file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete INF file, error %lu.\n", GetLastError()); ret = DeleteFileA("winetest_selfreg.dll"); - ok(ret, "Failed to delete test DLL, error %u.\n", GetLastError()); + ok(ret, "Failed to delete test DLL, error %lu.\n", GetLastError()); }
static unsigned int start_rename_ret, got_start_rename; @@ -2233,9 +2233,9 @@ static void test_rename(void) BOOL ret;
ret = CreateDirectoryA("a", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError()); ret = CreateDirectoryA("b", NULL); - ok(ret, "Failed to create test directory, error %u.\n", GetLastError()); + ok(ret, "Failed to create test directory, error %lu.\n", GetLastError());
create_file("a/one.txt"); create_file("b/three.txt"); @@ -2244,17 +2244,17 @@ static void test_rename(void) start_rename_ret = FILEOP_DOIT; got_start_rename = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueCopyA(queue, "b", NULL, "one.txt", NULL, NULL, "b", "two.txt", 0); - ok(ret, "Failed to queue copy, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue copy, error %#lx.\n", GetLastError()); ret = SetupQueueRenameA(queue, "a", "one.txt", "b", "one.txt"); - ok(ret, "Failed to queue rename, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue rename, error %#lx.\n", GetLastError()); ret = SetupQueueRenameA(queue, "b", "three.txt", NULL, "four.txt"); - ok(ret, "Failed to queue rename, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue rename, error %#lx.\n", GetLastError()); ret = SetupQueueRenameA(queue, "b", "six.txt", "b", "seven.txt"); - ok(ret, "Failed to queue rename, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue rename, error %#lx.\n", GetLastError()); ret = SetupQueueRenameA(queue, "a", "five.txt", "b", "six.txt"); - ok(ret, "Failed to queue rename, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue rename, error %#lx.\n", GetLastError()); run_queue(queue, start_rename_cb); ok(got_start_rename == 4, "Got %u callbacks.\n", got_start_rename); ok(!delete_file("a/one.txt"), "File should not exist.\n"); @@ -2274,13 +2274,13 @@ static void test_rename(void) start_rename_ret = FILEOP_SKIP; got_start_rename = 0; queue = SetupOpenFileQueue(); - ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#x.\n", GetLastError()); + ok(queue != INVALID_HANDLE_VALUE, "Failed to open queue, error %#lx.\n", GetLastError()); ret = SetupQueueRenameA(queue, "a", "one.txt", "a", "two.txt"); - ok(ret, "Failed to queue rename, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue rename, error %#lx.\n", GetLastError()); ret = SetupQueueRenameA(queue, "a", "three.txt", "a", "four.txt"); - ok(ret, "Failed to queue rename, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue rename, error %#lx.\n", GetLastError()); ret = SetupQueueRenameA(queue, "a", "five.txt", "a", "six.txt"); - ok(ret, "Failed to queue rename, error %#x.\n", GetLastError()); + ok(ret, "Failed to queue rename, error %#lx.\n", GetLastError()); run_queue(queue, start_rename_cb); ok(got_start_rename == 3, "Got %u callbacks.\n", got_start_rename); ok(!delete_file("a/one.txt"), "File should not exist.\n"); @@ -2291,8 +2291,8 @@ static void test_rename(void) ok(delete_file("a/six.txt"), "File should exist.\n"); SetupCloseFileQueue(queue);
- ok(delete_file("a/"), "Failed to delete directory, error %u.\n", GetLastError()); - ok(delete_file("b/"), "Failed to delete directory, error %u.\n", GetLastError()); + ok(delete_file("a/"), "Failed to delete directory, error %lu.\n", GetLastError()); + ok(delete_file("b/"), "Failed to delete directory, error %lu.\n", GetLastError()); }
static WCHAR service_name[] = L"Wine Test Service"; @@ -2321,7 +2321,7 @@ static DWORD WINAPI service_handler( DWORD ctrl, DWORD event_type, LPVOID event_ SetEvent( stop_event ); return NO_ERROR; default: - trace( "got service ctrl %x\n", ctrl ); + trace( "got service ctrl %lx\n", ctrl ); status.dwCurrentState = SERVICE_RUNNING; SetServiceStatus( service_handle, &status ); return NO_ERROR; @@ -2389,7 +2389,7 @@ START_TEST(install)
/* Set CBT hook to disallow MessageBox creation in current thread */ hhook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId()); - ok(!!hhook, "Failed to set hook, error %u.\n", GetLastError()); + ok(!!hhook, "Failed to set hook, error %lu.\n", GetLastError());
test_cmdline(); test_registry(); diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index 10ea7c0cba8..769bcbcb5ca 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -57,9 +57,9 @@ static void create_file(const char *name, const char *data) BOOL ret;
file = CreateFileA(name, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failed to create %s, error %u.\n", name, GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Failed to create %s, error %lu.\n", name, GetLastError()); ret = WriteFile(file, data, strlen(data), &size, NULL); - ok(ret && size == strlen(data), "Failed to write %s, error %u.\n", name, GetLastError()); + ok(ret && size == strlen(data), "Failed to write %s, error %lu.\n", name, GetLastError()); CloseHandle(file); }
@@ -103,24 +103,24 @@ static void test_original_file_name(LPCSTR original, LPCSTR dest) }
hinf = SetupOpenInfFileA(dest, NULL, INF_STYLE_WIN4, NULL); - ok(hinf != NULL, "SetupOpenInfFileA failed with error %d\n", GetLastError()); + ok(hinf != NULL, "SetupOpenInfFileA failed with error %ld\n", GetLastError());
res = SetupGetInfInformationA(hinf, INFINFO_INF_SPEC_IS_HINF, NULL, 0, &size); - ok(res, "SetupGetInfInformation failed with error %d\n", GetLastError()); + ok(res, "SetupGetInfInformation failed with error %ld\n", GetLastError());
pspii = HeapAlloc(GetProcessHeap(), 0, size);
res = SetupGetInfInformationA(hinf, INFINFO_INF_SPEC_IS_HINF, pspii, size, NULL); - ok(res, "SetupGetInfInformation failed with error %d\n", GetLastError()); + ok(res, "SetupGetInfInformation failed with error %ld\n", GetLastError());
spofi.cbSize = 0; res = pSetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi); ok(!res && GetLastError() == ERROR_INVALID_USER_BUFFER, - "SetupQueryInfOriginalFileInformationA should have failed with ERROR_INVALID_USER_BUFFER instead of %d\n", GetLastError()); + "SetupQueryInfOriginalFileInformationA should have failed with ERROR_INVALID_USER_BUFFER instead of %ld\n", GetLastError());
spofi.cbSize = sizeof(spofi); res = pSetupQueryInfOriginalFileInformationA(pspii, 0, NULL, &spofi); - ok(res, "SetupQueryInfOriginalFileInformationA failed with error %d\n", GetLastError()); + ok(res, "SetupQueryInfOriginalFileInformationA failed with error %ld\n", GetLastError()); ok(!spofi.OriginalCatalogName[0], "spofi.OriginalCatalogName should have been "" instead of "%s"\n", spofi.OriginalCatalogName); ok(!strcmp(original, spofi.OriginalInfName), "spofi.OriginalInfName of %s didn't match real original name %s\n", spofi.OriginalInfName, original);
@@ -151,7 +151,7 @@ static void test_SetupCopyOEMInf(void) res = SetupCopyOEMInfA(NULL, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); ok(res == FALSE, "Expected FALSE, got %d\n", res); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* try empty SourceInfFileName */ SetLastError(0xdeadbeef); @@ -159,14 +159,14 @@ static void test_SetupCopyOEMInf(void) ok(res == FALSE, "Expected FALSE, got %d\n", res); ok(GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER, /* Vista, W2K8 */ - "Unexpected error : %d\n", GetLastError()); + "Unexpected error : %ld\n", GetLastError());
/* try a relative nonexistent SourceInfFileName */ SetLastError(0xdeadbeef); res = SetupCopyOEMInfA("nonexistent", NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); ok(res == FALSE, "Expected FALSE, got %d\n", res); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
/* try an absolute nonexistent SourceInfFileName */ strcpy(path, CURR_DIR); @@ -175,7 +175,7 @@ static void test_SetupCopyOEMInf(void) res = SetupCopyOEMInfA(path, NULL, 0, SP_COPY_NOOVERWRITE, NULL, 0, NULL, NULL); ok(res == FALSE, "Expected FALSE, got %d\n", res); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError());
get_temp_filename(tmpfile); create_file(tmpfile, inf_data1); @@ -195,7 +195,7 @@ static void test_SetupCopyOEMInf(void) return; }
- ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); ok(file_exists(tmpfile), "Expected tmpfile to exist\n");
/* try SP_COPY_REPLACEONLY, dest does not exist */ @@ -203,7 +203,7 @@ static void test_SetupCopyOEMInf(void) res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_REPLACEONLY, NULL, 0, NULL, NULL); ok(res == FALSE, "Expected FALSE, got %d\n", res); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); ok(file_exists(tmpfile), "Expected source inf to exist\n");
/* Test a successful call. */ @@ -219,7 +219,7 @@ static void test_SetupCopyOEMInf(void) return; } ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(file_exists(path), "Expected source inf to exist.\n"); ok(file_exists(dest), "Expected dest file to exist.\n"); ok(is_in_inf_dir(dest), "Got unexpected path '%s'.\n", dest); @@ -229,7 +229,7 @@ static void test_SetupCopyOEMInf(void) SetLastError(0xdeadbeef); res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, NULL); ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(file_exists(path), "Expected source inf to exist.\n"); ok(file_exists(dest), "Expected dest file to exist.\n"); ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest); @@ -238,7 +238,7 @@ static void test_SetupCopyOEMInf(void) SetLastError(0xdeadbeef); res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_REPLACEONLY, dest, sizeof(dest), NULL, NULL); ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(file_exists(path), "Expected source inf to exist.\n"); ok(file_exists(dest), "Expected dest file to exist.\n"); ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest); @@ -248,13 +248,13 @@ static void test_SetupCopyOEMInf(void) res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_NOOVERWRITE, dest, sizeof(dest), NULL, NULL); ok(res == FALSE, "Expected FALSE, got %d\n", res); ok(GetLastError() == ERROR_FILE_EXISTS, - "Expected ERROR_FILE_EXISTS, got %d\n", GetLastError()); + "Expected ERROR_FILE_EXISTS, got %ld\n", GetLastError()); ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest);
SetLastError(0xdeadbeef); res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, NULL, 0, NULL, NULL); ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(file_exists(path), "Expected source inf to exist.\n"); ok(file_exists(orig_dest), "Expected dest file to exist.\n");
@@ -264,39 +264,39 @@ static void test_SetupCopyOEMInf(void) res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, 5, &size, NULL); ok(res == FALSE, "Expected FALSE, got %d\n", res); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError()); ok(file_exists(path), "Expected source inf to exist\n"); ok(file_exists(orig_dest), "Expected dest inf to exist\n"); ok(!strcmp(dest, "aaa"), "Expected dest to be unchanged\n"); - ok(size == strlen(orig_dest) + 1, "Got %d.\n", size); + ok(size == strlen(orig_dest) + 1, "Got %ld.\n", size);
SetLastError(0xdeadbeef); res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), &size, NULL); ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest); - ok(size == strlen(dest) + 1, "Got %d.\n", size); + ok(size == strlen(dest) + 1, "Got %ld.\n", size);
test_original_file_name(strrchr(path, '\') + 1, dest);
SetLastError(0xdeadbeef); res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, &filepart); ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest); ok(filepart == strrchr(dest, '\') + 1, "Got unexpected file part %s.\n", filepart);
SetLastError(0xdeadbeef); res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, SP_COPY_DELETESOURCE, NULL, 0, NULL, NULL); ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(!file_exists(path), "Expected source inf to not exist\n");
strcpy(pnf, dest); *(strrchr(pnf, '.') + 1) = 'p';
res = SetupUninstallOEMInfA(strrchr(dest, '\') + 1, 0, NULL); - ok(res, "Failed to uninstall '%s', error %u.\n", dest, GetLastError()); + ok(res, "Failed to uninstall '%s', error %lu.\n", dest, GetLastError()); todo_wine ok(!file_exists(dest), "Expected inf '%s' to not exist\n", dest); DeleteFileA(dest); ok(!file_exists(pnf), "Expected pnf '%s' to not exist\n", pnf); @@ -305,7 +305,7 @@ static void test_SetupCopyOEMInf(void) SetLastError(0xdeadbeef); res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, NULL); ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(is_in_inf_dir(dest), "Got unexpected path '%s'.\n", dest); strcpy(orig_dest, dest);
@@ -313,12 +313,12 @@ static void test_SetupCopyOEMInf(void) SetLastError(0xdeadbeef); res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, NULL); ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(is_in_inf_dir(dest), "Got unexpected path '%s'.\n", dest); ok(strcmp(dest, orig_dest), "Expected INF files to be copied to different paths.\n");
res = SetupUninstallOEMInfA(strrchr(dest, '\') + 1, 0, NULL); - ok(res, "Failed to uninstall '%s', error %u.\n", dest, GetLastError()); + ok(res, "Failed to uninstall '%s', error %lu.\n", dest, GetLastError()); todo_wine ok(!file_exists(dest), "Expected inf '%s' to not exist\n", dest); DeleteFileA(dest); strcpy(pnf, dest); @@ -326,7 +326,7 @@ static void test_SetupCopyOEMInf(void) todo_wine ok(!file_exists(pnf), "Expected pnf '%s' to not exist\n", pnf);
res = SetupUninstallOEMInfA(strrchr(orig_dest, '\') + 1, 0, NULL); - ok(res, "Failed to uninstall '%s', error %u.\n", orig_dest, GetLastError()); + ok(res, "Failed to uninstall '%s', error %lu.\n", orig_dest, GetLastError()); todo_wine ok(!file_exists(orig_dest), "Expected inf '%s' to not exist\n", dest); DeleteFileA(orig_dest); strcpy(pnf, dest); @@ -337,19 +337,19 @@ static void test_SetupCopyOEMInf(void) strcat(orig_dest, "\inf\"); strcat(orig_dest, tmpfile); res = CopyFileA(tmpfile, orig_dest, TRUE); - ok(res, "Failed to copy file, error %u.\n", GetLastError()); + ok(res, "Failed to copy file, error %lu.\n", GetLastError()); SetLastError(0xdeadbeef); res = SetupCopyOEMInfA(path, NULL, SPOST_NONE, 0, dest, sizeof(dest), NULL, NULL); ok(res == TRUE, "Expected TRUE, got %d\n", res); - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %ld\n", GetLastError()); ok(!strcasecmp(dest, orig_dest), "Expected '%s', got '%s'.\n", orig_dest, dest);
/* Since it wasn't actually installed, SetupUninstallOEMInf would fail here. */ res = DeleteFileA(dest); - ok(res, "Failed to delete '%s', error %u.\n", tmpfile, GetLastError()); + ok(res, "Failed to delete '%s', error %lu.\n", tmpfile, GetLastError());
res = DeleteFileA(tmpfile); - ok(res, "Failed to delete '%s', error %u.\n", tmpfile, GetLastError()); + ok(res, "Failed to delete '%s', error %lu.\n", tmpfile, GetLastError()); }
static void create_source_file(LPSTR filename, const BYTE *data, DWORD size) @@ -466,8 +466,8 @@ static void test_SetupGetFileCompressionInfo(void) ret = SetupGetFileCompressionInfoA(source, &name, &source_size, &target_size, &type); ok(!ret, "SetupGetFileCompressionInfo failed unexpectedly\n"); ok(name && !lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(source_size == sizeof(uncompressed), "got %d\n", source_size); - ok(target_size == sizeof(uncompressed), "got %d\n", target_size); + ok(source_size == sizeof(uncompressed), "got %ld\n", source_size); + ok(target_size == sizeof(uncompressed), "got %ld\n", target_size); ok(type == FILE_COMPRESSION_NONE, "got %d, expected FILE_COMPRESSION_NONE\n", type);
MyFree(name); @@ -492,16 +492,16 @@ static void test_SetupGetFileCompressionInfoEx(void)
ret = pSetupGetFileCompressionInfoExA(source, NULL, 0, &required_len, NULL, NULL, NULL); ok(!ret, "SetupGetFileCompressionInfoEx succeeded unexpectedly\n"); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); + ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1);
create_source_file(source, comp_lzx, sizeof(comp_lzx));
ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type); ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret); ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); - ok(source_size == sizeof(comp_lzx), "got %d\n", source_size); - ok(target_size == sizeof(uncompressed), "got %d\n", target_size); + ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1); + ok(source_size == sizeof(comp_lzx), "got %ld\n", source_size); + ok(target_size == sizeof(uncompressed), "got %ld\n", target_size); ok(type == FILE_COMPRESSION_WINLZA, "got %d, expected FILE_COMPRESSION_WINLZA\n", type); DeleteFileA(source);
@@ -510,9 +510,9 @@ static void test_SetupGetFileCompressionInfoEx(void) ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type); ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret); ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); - ok(source_size == sizeof(comp_zip), "got %d\n", source_size); - ok(target_size == sizeof(comp_zip), "got %d\n", target_size); + ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1); + ok(source_size == sizeof(comp_zip), "got %ld\n", source_size); + ok(target_size == sizeof(comp_zip), "got %ld\n", target_size); ok(type == FILE_COMPRESSION_NONE, "got %d, expected FILE_COMPRESSION_NONE\n", type); DeleteFileA(source);
@@ -521,9 +521,9 @@ static void test_SetupGetFileCompressionInfoEx(void) ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type); ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret); ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); - ok(source_size == sizeof(comp_cab_lzx), "got %d\n", source_size); - ok(target_size == sizeof(uncompressed), "got %d\n", target_size); + ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1); + ok(source_size == sizeof(comp_cab_lzx), "got %ld\n", source_size); + ok(target_size == sizeof(uncompressed), "got %ld\n", target_size); ok(type == FILE_COMPRESSION_MSZIP, "got %d, expected FILE_COMPRESSION_MSZIP\n", type); DeleteFileA(source);
@@ -532,9 +532,9 @@ static void test_SetupGetFileCompressionInfoEx(void) ret = pSetupGetFileCompressionInfoExA(source, name, sizeof(name), &required_len, &source_size, &target_size, &type); ok(ret, "SetupGetFileCompressionInfoEx failed unexpectedly: %d\n", ret); ok(!lstrcmpA(name, source), "got %s, expected %s\n", name, source); - ok(required_len == lstrlenA(source) + 1, "got %d, expected %d\n", required_len, lstrlenA(source) + 1); - ok(source_size == sizeof(comp_cab_zip), "got %d\n", source_size); - ok(target_size == sizeof(uncompressed), "got %d\n", target_size); + ok(required_len == lstrlenA(source) + 1, "got %ld, expected %d\n", required_len, lstrlenA(source) + 1); + ok(source_size == sizeof(comp_cab_zip), "got %ld\n", source_size); + ok(target_size == sizeof(uncompressed), "got %ld\n", target_size); ok(type == FILE_COMPRESSION_MSZIP, "got %d, expected FILE_COMPRESSION_MSZIP\n", type); DeleteFileA(source); } @@ -593,7 +593,7 @@ static void test_SetupDecompressOrCopyFile(void) invalid_parameters[i].target, invalid_parameters[i].type); ok(ret == ERROR_INVALID_PARAMETER, - "[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %u\n", + "[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %lu\n", i, ret);
/* try an invalid compression type */ @@ -602,7 +602,7 @@ static void test_SetupDecompressOrCopyFile(void) invalid_parameters[i].target, invalid_parameters[i].type); ok(ret == ERROR_INVALID_PARAMETER, - "[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %u\n", + "[%d] Expected SetupDecompressOrCopyFileA to return ERROR_INVALID_PARAMETER, got %lu\n", i, ret); }
@@ -615,23 +615,23 @@ static void test_SetupDecompressOrCopyFile(void) /* no compression tests */
ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret); ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n");
/* try overwriting existing file */ ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret); DeleteFileA(target);
type = FILE_COMPRESSION_NONE; ret = SetupDecompressOrCopyFileA(source, target, &type); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret); ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n"); DeleteFileA(target);
type = FILE_COMPRESSION_WINLZA; ret = SetupDecompressOrCopyFileA(source, target, &type); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret); ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n"); DeleteFileA(target);
@@ -640,7 +640,7 @@ static void test_SetupDecompressOrCopyFile(void) create_source_file(source, comp_lzx, sizeof(comp_lzx));
ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret); DeleteFileA(target);
/* zip compression tests */ @@ -648,7 +648,7 @@ static void test_SetupDecompressOrCopyFile(void) create_source_file(source, comp_zip, sizeof(comp_zip));
ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret); ok(compare_file_data(target, comp_zip, sizeof(comp_zip)), "incorrect target file\n"); DeleteFileA(target);
@@ -660,23 +660,23 @@ static void test_SetupDecompressOrCopyFile(void) lstrcpyA(p + 1, "wine");
ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret); ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n");
/* try overwriting existing file */ ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret);
/* try zip compression */ type = FILE_COMPRESSION_MSZIP; ret = SetupDecompressOrCopyFileA(source, target, &type); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret); ok(compare_file_data(target, uncompressed, sizeof(uncompressed)), "incorrect target file\n");
/* try no compression */ type = FILE_COMPRESSION_NONE; ret = SetupDecompressOrCopyFileA(source, target, &type); - ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %d\n", ret); + ok(!ret, "SetupDecompressOrCopyFile failed unexpectedly: %ld\n", ret); ok(compare_file_data(target, comp_cab_zip, sizeof(comp_cab_zip)), "incorrect target file\n");
/* Show that SetupDecompressOrCopyFileA simply extracts the first file it @@ -694,7 +694,7 @@ static void test_SetupDecompressOrCopyFile(void) lstrcpyA(p + 1, zip_multi_tests[i].filename);
ret = SetupDecompressOrCopyFileA(source, target, NULL); - ok(!ret, "[%d] SetupDecompressOrCopyFile failed unexpectedly: %d\n", i, ret); + ok(!ret, "[%d] SetupDecompressOrCopyFile failed unexpectedly: %ld\n", i, ret); ok(compare_file_data(target, zip_multi_tests[i].expected_buffer, zip_multi_tests[i].buffer_size), "[%d] incorrect target file\n", i); DeleteFileA(target); @@ -710,14 +710,14 @@ static void test_SetupUninstallOEMInf(void) SetLastError(0xdeadbeef); ret = SetupUninstallOEMInfA(NULL, 0, NULL); ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupUninstallOEMInfA("", 0, NULL); todo_wine { ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); }
SetLastError(0xdeadbeef); @@ -725,7 +725,7 @@ static void test_SetupUninstallOEMInf(void) todo_wine { ok(!ret, "Expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %08lx\n", GetLastError()); } }
@@ -751,7 +751,7 @@ static void test_defaultcallback(void) ctxt = SetupInitDefaultQueueCallbackEx(owner, progress, WM_USER, 0, NULL); ok(ctxt != NULL, "got %p\n", ctxt);
- ok(ctxt->magic == magic || broken(ctxt->magic != magic) /* win2000 */, "got magic 0x%08x\n", ctxt->magic); + ok(ctxt->magic == magic || broken(ctxt->magic != magic) /* win2000 */, "got magic 0x%08lx\n", ctxt->magic); if (ctxt->magic == magic) { ok(ctxt->owner == owner, "got %p, expected %p\n", ctxt->owner, owner); @@ -767,7 +767,7 @@ static void test_defaultcallback(void) }
ctxt = SetupInitDefaultQueueCallback(owner); - ok(ctxt->magic == magic, "got magic 0x%08x\n", ctxt->magic); + ok(ctxt->magic == magic, "got magic 0x%08lx\n", ctxt->magic); ok(ctxt->owner == owner, "got %p, expected %p\n", ctxt->owner, owner); ok(ctxt->progress == NULL, "got %p, expected %p\n", ctxt->progress, progress); ok(ctxt->message == 0, "got %d\n", ctxt->message); @@ -783,7 +783,7 @@ static void test_SetupLogError(void) ret = SetupLogErrorA("Test without opening\r\n", LogSevInformation); error = GetLastError(); ok(!ret, "SetupLogError succeeded\n"); - ok(error == ERROR_FILE_INVALID, "got wrong error: %d\n", error); + ok(error == ERROR_FILE_INVALID, "got wrong error: %ld\n", error);
SetLastError(0xdeadbeef); ret = SetupOpenLog(FALSE); @@ -792,24 +792,24 @@ static void test_SetupLogError(void) skip("SetupOpenLog() failed on insufficient permissions\n"); return; } - ok(ret, "SetupOpenLog failed, error %d\n", GetLastError()); + ok(ret, "SetupOpenLog failed, error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupLogErrorA("Test with wrong log severity\r\n", LogSevMaximum); error = GetLastError(); ok(!ret, "SetupLogError succeeded\n"); - ok(error == 0xdeadbeef, "got wrong error: %d\n", error); + ok(error == 0xdeadbeef, "got wrong error: %ld\n", error); ret = SetupLogErrorA("Test without EOL", LogSevInformation); ok(ret, "SetupLogError failed\n");
SetLastError(0xdeadbeef); ret = SetupLogErrorA(NULL, LogSevInformation); ok(ret || broken(!ret && GetLastError() == ERROR_INVALID_PARAMETER /* Win Vista+ */), - "SetupLogError failed: %08x\n", GetLastError()); + "SetupLogError failed: %08lx\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupOpenLog(FALSE); - ok(ret, "SetupOpenLog failed, error %d\n", GetLastError()); + ok(ret, "SetupOpenLog failed, error %ld\n", GetLastError());
SetupCloseLog(); } @@ -833,14 +833,14 @@ static void _check_device_interface(int line, const char *instance_id, const GUI devinfo = SetupDiGetClassDevsA(guid, instance_id, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); ret = SetupDiEnumDeviceInfo(devinfo, 0, &device_data); ok_(__FILE__, line)(ret || broken(!ret) /* <= Win7 */, - "SetupDiEnumDeviceInfo failed, error %u.\n", GetLastError()); + "SetupDiEnumDeviceInfo failed, error %lu.\n", GetLastError()); if (!ret) { SetupDiDestroyDeviceInfoList(devinfo); return; } ret = SetupDiEnumDeviceInterfaces(devinfo, &device_data, guid, 0, &iface_data); - ok_(__FILE__, line)(ret, "SetupDiEnumDeviceInterfaces failed, error %u.\n", GetLastError()); + ok_(__FILE__, line)(ret, "SetupDiEnumDeviceInterfaces failed, error %lu.\n", GetLastError()); ok_(__FILE__, line)(IsEqualGUID(&iface_data.InterfaceClassGuid, guid), "Expected guid %s, got %s.\n", wine_dbgstr_guid(guid), wine_dbgstr_guid(&iface_data.InterfaceClassGuid)); @@ -859,14 +859,14 @@ static void test_device_interfaces(void)
/* GPUs */ devinfo = SetupDiGetClassDevsW(&GUID_DEVCLASS_DISPLAY, NULL, NULL, DIGCF_PRESENT); - ok(devinfo != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed, error %u.\n", GetLastError()); + ok(devinfo != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed, error %lu.\n", GetLastError()); while ((ret = SetupDiEnumDeviceInfo(devinfo, device_idx, &device_data))) { ret = SetupDiGetDeviceInstanceIdA(devinfo, &device_data, instance_id, ARRAY_SIZE(instance_id), &size); - ok(ret, "SetupDiGetDeviceInstanceIdA failed, error %u.\n", GetLastError()); + ok(ret, "SetupDiGetDeviceInstanceIdA failed, error %lu.\n", GetLastError());
- winetest_push_context("GPU %d", device_idx); + winetest_push_context("GPU %ld", device_idx);
check_device_interface(instance_id, &GUID_DEVINTERFACE_DISPLAY_ADAPTER); check_device_interface(instance_id, &GUID_DISPLAY_DEVICE_ARRIVAL); @@ -875,21 +875,21 @@ static void test_device_interfaces(void) ++device_idx; } error = GetLastError(); - ok(error == ERROR_NO_MORE_ITEMS, "Expected error %u, got %u.\n", ERROR_NO_MORE_ITEMS, error); + ok(error == ERROR_NO_MORE_ITEMS, "Expected error %u, got %lu.\n", ERROR_NO_MORE_ITEMS, error); ok(device_idx > 0, "Expected at least one GPU.\n"); SetupDiDestroyDeviceInfoList(devinfo);
/* Monitors */ device_idx = 0; devinfo = SetupDiGetClassDevsW(&GUID_DEVCLASS_MONITOR, L"DISPLAY", NULL, DIGCF_PRESENT); - ok(devinfo != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed, error %u.\n", GetLastError()); + ok(devinfo != INVALID_HANDLE_VALUE, "SetupDiGetClassDevsW failed, error %lu.\n", GetLastError()); while ((ret = SetupDiEnumDeviceInfo(devinfo, device_idx, &device_data))) { ret = SetupDiGetDeviceInstanceIdA(devinfo, &device_data, instance_id, ARRAY_SIZE(instance_id), &size); - ok(ret, "SetupDiGetDeviceInstanceIdA failed, error %u.\n", GetLastError()); + ok(ret, "SetupDiGetDeviceInstanceIdA failed, error %lu.\n", GetLastError());
- winetest_push_context("Monitor %d", device_idx); + winetest_push_context("Monitor %ld", device_idx);
check_device_interface(instance_id, &GUID_DEVINTERFACE_MONITOR);
@@ -897,7 +897,7 @@ static void test_device_interfaces(void) ++device_idx; } error = GetLastError(); - ok(error == ERROR_NO_MORE_ITEMS, "Expected error %u, got %u.\n", ERROR_NO_MORE_ITEMS, error); + ok(error == ERROR_NO_MORE_ITEMS, "Expected error %u, got %lu.\n", ERROR_NO_MORE_ITEMS, error); ok(device_idx > 0 || broken(device_idx == 0) /* w7u_2qxl TestBot */, "Expected at least one monitor.\n"); SetupDiDestroyDeviceInfoList(devinfo); diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c index 17251fc923b..7c58acdc362 100644 --- a/dlls/setupapi/tests/parser.c +++ b/dlls/setupapi/tests/parser.c @@ -164,13 +164,13 @@ static void test_invalid_files(void) err_line = 0xdeadbeef; hinf = test_file_contents( invalid_files[i].data, invalid_files[i].data_size, &err_line ); err = GetLastError(); - trace( "hinf=%p err=0x%x line=%d\n", hinf, err, err_line ); + trace( "hinf=%p err=0x%lx line=%d\n", hinf, err, err_line ); if (invalid_files[i].error) /* should fail */ { ok( hinf == INVALID_HANDLE_VALUE, "file %u: Open succeeded\n", i ); todo_wine_if (invalid_files[i].todo) { - ok( err == invalid_files[i].error, "file %u: Bad error %u/%u\n", + ok( err == invalid_files[i].error, "file %u: Bad error %lu/%lu\n", i, err, invalid_files[i].error ); ok( err_line == invalid_files[i].err_line, "file %u: Bad error line %d/%d\n", i, err_line, invalid_files[i].err_line ); @@ -181,7 +181,7 @@ static void test_invalid_files(void) todo_wine_if (invalid_files[i].todo) { ok( hinf != INVALID_HANDLE_VALUE, "file %u: Open failed\n", i ); - ok( err == 0, "file %u: Error code set to %u\n", i, err ); + ok( err == 0, "file %u: Error code set to %lu\n", i, err ); } } SetupCloseInfFile( hinf ); @@ -240,23 +240,23 @@ static void test_section_names(void) { SetLastError( 0xdeadbeef ); hinf = test_file_contents( section_names[i].data, strlen(section_names[i].data), &err_line ); - ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %u\n", i, GetLastError() ); + ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %lu\n", i, GetLastError() ); if (hinf == INVALID_HANDLE_VALUE) continue;
ret = SetupGetLineCountA( hinf, section_names[i].section ); err = GetLastError(); - trace( "hinf=%p ret=%d err=0x%x\n", hinf, ret, err ); + trace( "hinf=%p ret=%ld err=0x%lx\n", hinf, ret, err ); if (ret != -1) { ok( !section_names[i].error, "line %u: section name %s found\n", i, section_names[i].section ); - ok( !err, "line %u: bad error code %u\n", i, err ); + ok( !err, "line %u: bad error code %lu\n", i, err ); } else { ok( section_names[i].error, "line %u: section name %s not found\n", i, section_names[i].section ); - ok( err == section_names[i].error, "line %u: bad error %u/%u\n", + ok( err == section_names[i].error, "line %u: bad error %lu/%lu\n", i, err, section_names[i].error ); } SetupCloseInfFile( hinf ); @@ -299,7 +299,7 @@ static void test_enum_sections(void)
SetLastError( 0xdeadbeef ); ret = pSetupEnumInfSectionsA( hinf, index, buffer, sizeof(buffer), &len ); - ok( ret, "SetupEnumInfSectionsA failed err %u\n", GetLastError() ); + ok( ret, "SetupEnumInfSectionsA failed err %lu\n", GetLastError() ); ok( len == 3 || len == 8, "wrong len %u\n", len ); ok( !lstrcmpiA( buffer, "version" ) || !lstrcmpiA( buffer, "s1" ) || !lstrcmpiA( buffer, "s2" ) || !lstrcmpiA( buffer, "s3" ) || !lstrcmpiA( buffer, "strings" ), @@ -408,12 +408,12 @@ static const char *check_key( INFCONTEXT *context, const char *wanted ) if (!key) { ok( !wanted, "missing key %s\n", wanted ); - ok( err == 0 || err == ERROR_INVALID_PARAMETER, "last error set to %u\n", err ); + ok( err == 0 || err == ERROR_INVALID_PARAMETER, "last error set to %lu\n", err ); } else { ok( !strcmp( key, wanted ), "bad key %s/%s\n", key, wanted ); - ok( err == 0, "last error set to %u\n", err ); + ok( err == 0, "last error set to %lu\n", err ); } return key; } @@ -439,7 +439,7 @@ static void test_key_names(void) data_size += key_names[i].data_size; SetLastError( 0xdeadbeef ); hinf = test_file_contents( buffer, data_size, &err_line ); - ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %u\n", i, GetLastError() ); + ok( hinf != INVALID_HANDLE_VALUE, "line %u: open failed err %lu\n", i, GetLastError() ); if (hinf == INVALID_HANDLE_VALUE) continue;
ret = SetupFindFirstLineA( hinf, "Test", key_names[i].key, &context ); @@ -449,11 +449,11 @@ static void test_key_names(void) { ret = SetupFindFirstLineA( hinf, "Test", "%foo%", &context ); ok(!ret, "SetupFindFirstLine() should not match unsubstituted keys\n"); - ok(GetLastError() == ERROR_LINE_NOT_FOUND, "got wrong error %u\n", GetLastError()); + ok(GetLastError() == ERROR_LINE_NOT_FOUND, "got wrong error %lu\n", GetLastError()); }
ret = SetupFindFirstLineA( hinf, "Test", 0, &context ); - ok(ret, "SetupFindFirstLineA failed: le=%u\n", GetLastError()); + ok(ret, "SetupFindFirstLineA failed: le=%lu\n", GetLastError()); if (!ret) { SetupCloseInfFile( hinf ); @@ -469,7 +469,7 @@ static void test_key_names(void) err = GetLastError(); if (field) { - ok( err == 0, "line %u: bad error %u\n", i, err ); + ok( err == 0, "line %u: bad error %lu\n", i, err ); if (key_names[i].fields[index]) { if (i == 52) @@ -499,7 +499,7 @@ static void test_key_names(void) else { ok( err == 0 || err == ERROR_INVALID_PARAMETER, - "line %u: bad error %u\n", i, err ); + "line %u: bad error %lu\n", i, err ); if (key_names[i].fields[index]) ok( 0, "line %u: missing field %s\n", i, key_names[i].fields[index] ); } @@ -523,13 +523,13 @@ static void test_close_inf_file(void) SetupCloseInfFile(NULL); ok(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x, WinMe */ - "Expected 0xdeadbeef, got %u\n", GetLastError()); + "Expected 0xdeadbeef, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); SetupCloseInfFile(INVALID_HANDLE_VALUE); ok(GetLastError() == 0xdeadbeef || GetLastError() == ERROR_INVALID_PARAMETER, /* Win9x, WinMe */ - "Expected 0xdeadbeef, got %u\n", GetLastError()); + "Expected 0xdeadbeef, got %lu\n", GetLastError()); }
static const char *contents = "[Version]\n" @@ -610,7 +610,7 @@ static void test_pSetupGetField(void) fieldW = pSetupGetFieldW( &context, 4 ); ok( fieldW == NULL, "Expected NULL, got %p\n", fieldW ); ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); + "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() ); } else { @@ -623,7 +623,7 @@ static void test_pSetupGetField(void) fieldA = pSetupGetFieldA( &context, 4 ); ok( fieldA == NULL, "Expected NULL, got %p\n", fieldA ); ok( GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %u\n", GetLastError() ); + "Expected ERROR_INVALID_PARAMETER, got %lu\n", GetLastError() ); }
SetupCloseInfFile( hinf ); @@ -677,13 +677,13 @@ static void test_SetupGetIntField(void) ok( retb, "%u: Expected success\n", i ); ok( GetLastError() == ERROR_SUCCESS || GetLastError() == 0xdeadbeef /* win9x, NT4 */, - "%u: Expected ERROR_SUCCESS or 0xdeadbeef, got %u\n", i, GetLastError() ); + "%u: Expected ERROR_SUCCESS or 0xdeadbeef, got %lu\n", i, GetLastError() ); } else { ok( !retb, "%u: Expected failure\n", i ); ok( GetLastError() == keys[i].err, - "%u: Expected %d, got %u\n", i, keys[i].err, GetLastError() ); + "%u: Expected %ld, got %lu\n", i, keys[i].err, GetLastError() ); } ok( intfield == keys[i].value, "%u: Expected %d, got %d\n", i, keys[i].value, intfield );
@@ -716,91 +716,91 @@ static void test_GLE(void) retb = SetupFindFirstLineA( hinf, "ImNotThere", NULL, &context ); ok(!retb, "Expected failure\n"); ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupFindFirstLineA( hinf, "ImNotThere", "ImNotThere", &context ); ok(!retb, "Expected failure\n"); ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupFindFirstLineA( hinf, "Sectionname", NULL, &context ); ok(retb, "Expected success\n"); ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupFindFirstLineA( hinf, "Sectionname", "ImNotThere", &context ); ok(!retb, "Expected failure\n"); ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupFindFirstLineA( hinf, "Sectionname", "Keyname1", &context ); ok(retb, "Expected success\n"); ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupFindNextMatchLineA( &context, "ImNotThere", &context ); ok(!retb, "Expected failure\n"); ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupFindNextMatchLineA( &context, "Keyname2", &context ); ok(retb, "Expected success\n"); ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retl = SetupGetLineCountA( hinf, "ImNotThere"); - ok(retl == -1, "Expected -1, got %d\n", retl); + ok(retl == -1, "Expected -1, got %ld\n", retl); ok(GetLastError() == ERROR_SECTION_NOT_FOUND, - "Expected ERROR_SECTION_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_SECTION_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retl = SetupGetLineCountA( hinf, "Sectionname"); - ok(retl == 2, "Expected 2, got %d\n", retl); + ok(retl == 2, "Expected 2, got %ld\n", retl); ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupGetLineTextA( NULL, hinf, "ImNotThere", "ImNotThere", buf, bufsize, &retsize); ok(!retb, "Expected failure\n"); ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupGetLineTextA( NULL, hinf, "Sectionname", "ImNotThere", buf, bufsize, &retsize); ok(!retb, "Expected failure\n"); ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupGetLineTextA( NULL, hinf, "Sectionname", "Keyname1", buf, bufsize, &retsize); ok(retb, "Expected success\n"); ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupGetLineByIndexA( hinf, "ImNotThere", 1, &context ); ok(!retb, "Expected failure\n"); ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupGetLineByIndexA( hinf, "Sectionname", 1, &context ); ok(retb, "Expected success\n"); ok(GetLastError() == ERROR_SUCCESS, - "Expected ERROR_SUCCESS, got %08x\n", GetLastError()); + "Expected ERROR_SUCCESS, got %08lx\n", GetLastError());
SetLastError(0xdeadbeef); retb = SetupGetLineByIndexA( hinf, "Sectionname", 3, &context ); ok(!retb, "Expected failure\n"); ok(GetLastError() == ERROR_LINE_NOT_FOUND, - "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError()); + "Expected ERROR_LINE_NOT_FOUND, got %08lx\n", GetLastError());
SetupCloseInfFile( hinf ); } diff --git a/dlls/setupapi/tests/query.c b/dlls/setupapi/tests/query.c index 6b6d1bd5c29..6258727c076 100644 --- a/dlls/setupapi/tests/query.c +++ b/dlls/setupapi/tests/query.c @@ -171,7 +171,7 @@ static void test_SetupGetInfInformation(void) broken(GetLastError() == ERROR_PATH_NOT_FOUND) || /* NT4 */ broken(GetLastError() == ERROR_INVALID_NAME) || /* win2k */ broken(GetLastError() == ERROR_GENERAL_SYNTAX), /* another win2k / winMe */ - "Expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); + "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError()); ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* try an invalid inf filename */ @@ -185,7 +185,7 @@ static void test_SetupGetInfInformation(void) ret = SetupGetInfInformationA(NULL, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size); ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); ok(size == 0xdeadbeef, "Expected size to remain unchanged\n"); }
@@ -197,7 +197,7 @@ static void test_SetupGetInfInformation(void) ret = SetupGetInfInformationA(inf_filename, -1, NULL, 0, &size); ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* try a nonexistent inf file */ @@ -206,7 +206,7 @@ static void test_SetupGetInfInformation(void) ret = SetupGetInfInformationA("idontexist", INFINFO_INF_NAME_IS_ABSOLUTE, NULL, 0, &size); ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); ok(GetLastError() == ERROR_FILE_NOT_FOUND, - "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + "Expected ERROR_FILE_NOT_FOUND, got %ld\n", GetLastError()); ok(size == 0xdeadbeef, "Expected size to remain unchanged\n");
/* successfully open the inf file */ @@ -220,7 +220,7 @@ static void test_SetupGetInfInformation(void) ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size, &size); ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
/* set ReturnBuffer to NULL and ReturnBufferSize to non-zero value 'size-1' */ ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, NULL, size-1, &size); @@ -241,7 +241,7 @@ static void test_SetupGetInfInformation(void) ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, info, size - 1, &size); ok(ret == FALSE, "Expected SetupGetInfInformation to fail\n"); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); + "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
/* successfully get the inf information */ ret = SetupGetInfInformationA(inf_filename, INFINFO_INF_NAME_IS_ABSOLUTE, info, size, &size); @@ -267,7 +267,7 @@ static void test_SetupGetInfInformation(void) skip("need admin rights\n"); goto done; } - ok(ret, "can't create inf file %u\n", GetLastError()); + ok(ret, "can't create inf file %lu\n", GetLastError());
HeapFree(GetProcessHeap(), 0, info); info = alloc_inf_info("test.inf", INFINFO_DEFAULT_SEARCH, &size); @@ -289,7 +289,7 @@ static void test_SetupGetInfInformation(void)
/* test the INFINFO_DEFAULT_SEARCH search flag */ ret = SetupGetInfInformationA("test.inf", INFINFO_DEFAULT_SEARCH, info, size, &size); - ok(ret == TRUE, "Expected SetupGetInfInformation to succeed: %d\n", GetLastError()); + ok(ret == TRUE, "Expected SetupGetInfInformation to succeed: %ld\n", GetLastError()); ok(check_info_filename(info, inf_one), "Expected returned filename to be equal\n");
HeapFree(GetProcessHeap(), 0, info); @@ -330,7 +330,7 @@ static void test_SetupGetSourceFileLocation(void) ret = SetupGetSourceFileLocationA(hinf, NULL, "lanconf.exe", &source_id, buffer, sizeof(buffer), &required); ok(ret, "SetupGetSourceFileLocation failed\n");
- ok(required == 1, "unexpected required size: %d\n", required); + ok(required == 1, "unexpected required size: %ld\n", required); ok(source_id == 2, "unexpected source id: %d\n", source_id); ok(!lstrcmpA("", buffer), "unexpected result string: %s\n", buffer);
@@ -343,7 +343,7 @@ static void test_SetupGetSourceFileLocation(void) hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_WIN4, NULL); error = GetLastError(); ok(hinf == INVALID_HANDLE_VALUE, "could open inf file\n"); - ok(error == ERROR_WRONG_INF_STYLE, "got wrong error: %d\n", error); + ok(error == ERROR_WRONG_INF_STYLE, "got wrong error: %ld\n", error);
hinf = SetupOpenInfFileA(inf_filename, NULL, INF_STYLE_OLDNT, NULL); ok(hinf != INVALID_HANDLE_VALUE, "could not open inf file\n"); @@ -376,7 +376,7 @@ static void test_SetupGetSourceInfo(void) ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_PATH, buffer, sizeof(buffer), &required); ok(ret, "SetupGetSourceInfoA failed\n");
- ok(required == 1, "unexpected required size: %d\n", required); + ok(required == 1, "unexpected required size: %ld\n", required); ok(!lstrcmpA("", buffer), "unexpected result string: %s\n", buffer);
required = 0; @@ -385,7 +385,7 @@ static void test_SetupGetSourceInfo(void) ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_TAGFILE, buffer, sizeof(buffer), &required); ok(ret, "SetupGetSourceInfoA failed\n");
- ok(required == 28, "unexpected required size: %d\n", required); + ok(required == 28, "unexpected required size: %ld\n", required); ok(!lstrcmpA("LANCOM\LANtools\lanconf.cab", buffer), "unexpected result string: %s\n", buffer);
required = 0; @@ -394,7 +394,7 @@ static void test_SetupGetSourceInfo(void) ret = SetupGetSourceInfoA(hinf, 2, SRCINFO_DESCRIPTION, buffer, sizeof(buffer), &required); ok(ret, "SetupGetSourceInfoA failed\n");
- ok(required == 19, "unexpected required size: %d\n", required); + ok(required == 19, "unexpected required size: %ld\n", required); ok(!lstrcmpA("LANCOM Software CD", buffer), "unexpected result string: %s\n", buffer);
SetupCloseInfFile(hinf); @@ -428,7 +428,7 @@ static void test_SetupGetTargetPath(void)
ret = SetupGetTargetPathA(hinf, &ctx, NULL, buffer, sizeof(buffer), &required); ok(ret, "SetupGetTargetPathA failed\n"); - ok(required == 10, "unexpected required size: %d\n", required); + ok(required == 10, "unexpected required size: %ld\n", required); /* Retrieve the system drive from the windows directory. * (%SystemDrive% is not available on Win9x) */ @@ -452,7 +452,7 @@ static void test_SetupGetTargetPath(void)
lstrcpyA(destfile, WIN_DIR);
- ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required); + ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required); ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf); @@ -470,7 +470,7 @@ static void test_SetupGetTargetPath(void)
GetSystemDirectoryA(destfile, MAX_PATH);
- ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required); + ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required); ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf); @@ -488,7 +488,7 @@ static void test_SetupGetTargetPath(void)
lstrcpyA(destfile, WIN_DIR);
- ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required); + ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required); ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf); @@ -506,7 +506,7 @@ static void test_SetupGetTargetPath(void)
lstrcpyA(destfile, WIN_DIR);
- ok(required == lstrlenA(destfile) + 1, "unexpected required size: %d\n", required); + ok(required == lstrlenA(destfile) + 1, "unexpected required size: %ld\n", required); ok(!lstrcmpiA(buffer, destfile), "unexpected path: %s\n", buffer);
SetupCloseInfFile(hinf); diff --git a/dlls/setupapi/tests/setupcab.c b/dlls/setupapi/tests/setupcab.c index 0bfab8142c2..5cc251a6756 100644 --- a/dlls/setupapi/tests/setupcab.c +++ b/dlls/setupapi/tests/setupcab.c @@ -69,7 +69,7 @@ static void create_source_fileW(LPWSTR filename, const BYTE *data, DWORD size) static UINT CALLBACK dummy_callbackA(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2) { - ok(0, "Received unexpected notification (%p, %u, %lu, %lu)\n", Context, + ok(0, "Received unexpected notification (%p, %u, %Iu, %Iu)\n", Context, Notification, Param1, Param2); return 0; } @@ -77,7 +77,7 @@ static UINT CALLBACK dummy_callbackA(PVOID Context, UINT Notification, static UINT CALLBACK dummy_callbackW(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2) { - ok(0, "Received unexpected notification (%p, %u, %lu, %lu)\n", Context, + ok(0, "Received unexpected notification (%p, %u, %Iu, %Iu)\n", Context, Notification, Param1, Param2); return 0; } @@ -117,7 +117,7 @@ static void test_invalid_parametersA(void) ok(!ret, "[%d] Expected SetupIterateCabinetA to return 0, got %d\n", i, ret); todo_wine_if (invalid_parameters[i].todo_lasterror) ok(GetLastError() == invalid_parameters[i].expected_lasterror, - "[%d] Expected GetLastError() to return %u, got %u\n", + "[%d] Expected GetLastError() to return %lu, got %lu\n", i, invalid_parameters[i].expected_lasterror, GetLastError()); }
@@ -126,7 +126,7 @@ static void test_invalid_parametersA(void) ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x/NT4/Win2k */ - "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n", + "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -134,7 +134,7 @@ static void test_invalid_parametersA(void) ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x/NT4/Win2k */ - "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n", + "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError());
DeleteFileA(source); @@ -183,7 +183,7 @@ static void test_invalid_parametersW(void) ok(!ret, "[%d] Expected SetupIterateCabinetW to return 0, got %d\n", i, ret); todo_wine_if (invalid_parameters[i].todo_lasterror) ok(GetLastError() == invalid_parameters[i].expected_lasterror, - "[%d] Expected GetLastError() to return %u, got %u\n", + "[%d] Expected GetLastError() to return %lu, got %lu\n", i, invalid_parameters[i].expected_lasterror, GetLastError()); }
@@ -192,7 +192,7 @@ static void test_invalid_parametersW(void) ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Vista/Win2k8 */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -200,7 +200,7 @@ static void test_invalid_parametersW(void) ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_ENOUGH_MEMORY, /* Vista/Win2k8 */ - "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -208,7 +208,7 @@ static void test_invalid_parametersW(void) ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || GetLastError() == ERROR_FILE_NOT_FOUND, /* NT4/Win2k */ - "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n", + "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); @@ -216,7 +216,7 @@ static void test_invalid_parametersW(void) ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY || GetLastError() == ERROR_FILE_NOT_FOUND, /* NT4/Win2k */ - "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %u\n", + "Expected GetLastError() to return ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError());
DeleteFileW(source); @@ -250,14 +250,14 @@ static void test_invalid_callbackA(void) ret = SetupIterateCabinetA(source, 0, NULL, NULL); ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_DATA, - "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupIterateCabinetA(source, 0, crash_callbackA, NULL); ok(!ret, "Expected SetupIterateCabinetA to return 0, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_DATA, - "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n", GetLastError());
DeleteFileA(source); @@ -284,14 +284,14 @@ static void test_invalid_callbackW(void) ret = SetupIterateCabinetW(source, 0, NULL, NULL); ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_DATA, - "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = SetupIterateCabinetW(source, 0, crash_callbackW, NULL); ok(!ret, "Expected SetupIterateCabinetW to return 0, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_DATA, - "Expected GetLastError() to return ERROR_INVALID_DATA, got %u\n", + "Expected GetLastError() to return ERROR_INVALID_DATA, got %lu\n", GetLastError());
DeleteFileW(source); @@ -342,8 +342,8 @@ static UINT CALLBACK simple_callbackA(void *context, UINT message, UINT_PTR para ok(index < ARRAY_SIZE(expected_files), "%u: Got unexpected file.\n", index); ok(!strcmp(info->NameInCabinet, expected_files[index].nameA), "%u: Got file name %s.\n", index, debugstr_a(info->NameInCabinet)); - ok(info->FileSize == expected_files[index].size, "%u: Got file size %u.\n", index, info->FileSize); - ok(!info->Win32Error, "%u: Got error %u.\n", index, info->Win32Error); + ok(info->FileSize == expected_files[index].size, "%u: Got file size %lu.\n", index, info->FileSize); + ok(!info->Win32Error, "%u: Got error %lu.\n", index, info->Win32Error); ok(info->DosDate == 14545, "%u: Got date %u.\n", index, info->DosDate); ok(info->DosTime == 18672, "%u: Got time %u.\n", index, info->DosTime); ok(info->DosAttribs == FILE_ATTRIBUTE_ARCHIVE, "%u: Got attributes %#x.\n", index, info->DosAttribs); @@ -410,12 +410,12 @@ static void test_simple_enumerationA(void) { snprintf(path, ARRAY_SIZE(path), "%s\%s", temp, expected_files[i].nameA); ret = DeleteFileA(path); - ok(ret, "Failed to delete %s, error %u.\n", debugstr_a(path), GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", debugstr_a(path), GetLastError()); }
snprintf(path, ARRAY_SIZE(path), "%s\testcab.cab", temp); ret = DeleteFileA(path); - ok(ret, "Failed to delete %s, error %u.\n", debugstr_a(path), GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", debugstr_a(path), GetLastError()); }
static UINT CALLBACK simple_callbackW(void *context, UINT message, UINT_PTR param1, UINT_PTR param2) @@ -450,8 +450,8 @@ static UINT CALLBACK simple_callbackW(void *context, UINT message, UINT_PTR para ok(index < ARRAY_SIZE(expected_files), "%u: Got unexpected file.\n", index); ok(!wcscmp(info->NameInCabinet, expected_files[index].nameW), "%u: Got file name %s.\n", index, debugstr_w(info->NameInCabinet)); - ok(info->FileSize == expected_files[index].size, "%u: Got file size %u.\n", index, info->FileSize); - ok(!info->Win32Error, "%u: Got error %u.\n", index, info->Win32Error); + ok(info->FileSize == expected_files[index].size, "%u: Got file size %lu.\n", index, info->FileSize); + ok(!info->Win32Error, "%u: Got error %lu.\n", index, info->Win32Error); ok(info->DosDate == 14545, "%u: Got date %u.\n", index, info->DosDate); ok(info->DosTime == 18672, "%u: Got time %u.\n", index, info->DosTime); ok(info->DosAttribs == FILE_ATTRIBUTE_ARCHIVE, "%u: Got attributes %#x.\n", index, info->DosAttribs); @@ -518,12 +518,12 @@ static void test_simple_enumerationW(void) { swprintf(path, ARRAY_SIZE(path), L"%s\%s", temp, expected_files[i].nameW); ret = DeleteFileW(path); - ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(path), GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(path), GetLastError()); }
swprintf(path, ARRAY_SIZE(path), L"%s\testcab.cab", temp); ret = DeleteFileW(path); - ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(path), GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(path), GetLastError()); }
START_TEST(setupcab) diff --git a/dlls/setupapi/tests/stringtable.c b/dlls/setupapi/tests/stringtable.c index dfd50895560..85805550b4b 100644 --- a/dlls/setupapi/tests/stringtable.c +++ b/dlls/setupapi/tests/stringtable.c @@ -87,15 +87,15 @@ static void test_StringTableAddString(void)
retval=pStringTableAddString(table,String,0); ok(retval!=-1,"Failed to add String to String Table\n"); - ok(hstring==retval,"string handle %x != String handle %x in String Table\n", hstring, retval); + ok(hstring==retval,"string handle %lx != String handle %lx in String Table\n", hstring, retval);
hfoo=pStringTableAddString(table,foo,0); ok(hfoo!=-1,"Failed to add foo to String Table\n"); - ok(hfoo!=hstring,"foo and string share the same ID %x in String Table\n", hfoo); + ok(hfoo!=hstring,"foo and string share the same ID %lx in String Table\n", hfoo);
/* case sensitive */ hString=pStringTableAddString(table,String,ST_CASE_SENSITIVE_COMPARE); - ok(hstring!=hString,"String handle and string share same ID %x in Table\n", hstring); + ok(hstring!=hString,"String handle and string share same ID %lx in Table\n", hstring);
pStringTableDestroy(table); } @@ -115,15 +115,15 @@ static void test_StringTableAddStringEx(void)
retval = pStringTableAddStringEx(table, String, 0, NULL, 0); ok(retval != -1, "Failed to add String to String Table\n"); - ok(hstring == retval, "string handle %x != String handle %x in String Table\n", hstring, retval); + ok(hstring == retval, "string handle %lx != String handle %lx in String Table\n", hstring, retval);
hfoo = pStringTableAddStringEx(table, foo, 0, NULL, 0); ok(hfoo != -1, "Failed to add foo to String Table\n"); - ok(hfoo != hstring, "foo and string share the same ID %x in String Table\n", hfoo); + ok(hfoo != hstring, "foo and string share the same ID %lx in String Table\n", hfoo);
/* case sensitive */ hString = pStringTableAddStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, 0); - ok(hstring != hString, "String handle and string share same ID %x in Table\n", hstring); + ok(hstring != hString, "String handle and string share same ID %lx in Table\n", hstring);
pStringTableDestroy(table);
@@ -133,19 +133,19 @@ static void test_StringTableAddStringEx(void)
extra = 10; hstring = pStringTableAddStringEx(table, string, 0, &extra, 4); - ok(hstring != -1, "failed to add string, %d\n", hstring); + ok(hstring != -1, "failed to add string, %ld\n", hstring);
extra = 0; ret = pStringTableGetExtraData(table, hstring, &extra, 4); - ok(ret && extra == 10, "got %d, extra %d\n", ret, extra); + ok(ret && extra == 10, "got %d, extra %ld\n", ret, extra);
extra = 11; hstring = pStringTableAddStringEx(table, string, 0, &extra, 4); - ok(hstring != -1, "failed to add string, %d\n", hstring); + ok(hstring != -1, "failed to add string, %ld\n", hstring);
extra = 0; ret = pStringTableGetExtraData(table, hstring, &extra, 4); - ok(ret && extra == 10, "got %d, extra %d\n", ret, extra); + ok(ret && extra == 10, "got %d, extra %ld\n", ret, extra);
pStringTableDestroy(table); } @@ -188,7 +188,7 @@ static void test_StringTableLookUpString(void) retval=pStringTableLookUpString(table,string,0); ok(retval!=-1,"Failed find string in String Table 1\n"); ok(retval==hstring, - "Lookup for string (%x) does not match previous handle (%x) in String Table 1\n", + "Lookup for string (%lx) does not match previous handle (%lx) in String Table 1\n", retval, hstring);
retval=pStringTableLookUpString(table2,string,0); @@ -203,7 +203,7 @@ static void test_StringTableLookUpString(void) retval=pStringTableLookUpString(table,foo,0); ok(retval!=-1,"Failed find foo in String Table 1\n"); ok(retval==hfoo, - "Lookup for foo (%x) does not match previous handle (%x) in String Table 1\n", + "Lookup for foo (%lx) does not match previous handle (%lx) in String Table 1\n", retval, hfoo);
retval=pStringTableLookUpString(table2,foo,0); @@ -214,7 +214,7 @@ static void test_StringTableLookUpString(void) retval2=pStringTableLookUpString(table,String,ST_CASE_SENSITIVE_COMPARE); ok(retval!=retval2,"Lookup of string equals String in Table 1\n"); ok(retval==hString, - "Lookup for String (%x) does not match previous handle (%x) in String Table 1\n", + "Lookup for String (%lx) does not match previous handle (%lx) in String Table 1\n", retval, hString);
pStringTableDestroy(table); @@ -247,7 +247,7 @@ static void test_StringTableLookUpStringEx(void) retval = pStringTableLookUpStringEx(table, string, 0, NULL, 0); ok(retval != ~0u, "Failed find string in String Table 1\n"); ok(retval == hstring, - "Lookup for string (%x) does not match previous handle (%x) in String Table 1\n", + "Lookup for string (%lx) does not match previous handle (%lx) in String Table 1\n", retval, hstring);
retval = pStringTableLookUpStringEx(table2, string, 0, NULL, 0); @@ -262,7 +262,7 @@ static void test_StringTableLookUpStringEx(void) retval=pStringTableLookUpStringEx(table, foo, 0, NULL, 0); ok(retval != ~0u, "Failed find foo in String Table 1\n"); ok(retval == hfoo, - "Lookup for foo (%x) does not match previous handle (%x) in String Table 1\n", + "Lookup for foo (%lx) does not match previous handle (%lx) in String Table 1\n", retval, hfoo);
retval = pStringTableLookUpStringEx(table2, foo, 0, NULL, 0); @@ -273,7 +273,7 @@ static void test_StringTableLookUpStringEx(void) retval2 = pStringTableLookUpStringEx(table, String, ST_CASE_SENSITIVE_COMPARE, NULL, 0); ok(retval != retval2, "Lookup of string equals String in Table 1\n"); ok(retval == hString, - "Lookup for String (%x) does not match previous handle (%x) in String Table 1\n", + "Lookup for String (%lx) does not match previous handle (%lx) in String Table 1\n", retval, hString);
pStringTableDestroy(table); @@ -318,10 +318,10 @@ static void test_StringTableStringFromId(void)
/* correct */ id2 = pStringTableLookUpString(table, string, 0); - ok(id2 == id, "got %d and %d\n", id2, id); + ok(id2 == id, "got %ld and %ld\n", id2, id);
string2 = pStringTableStringFromId(table, id2); - ok(string2 != NULL, "failed to lookup string %d\n", id2); + ok(string2 != NULL, "failed to lookup string %ld\n", id2); ok(!lstrcmpiW(string, string2), "got %s, expected %s\n", wine_dbgstr_w(string2), wine_dbgstr_w(string));
pStringTableDestroy(table); @@ -347,14 +347,14 @@ static void test_stringtable_layout(void) ptr = (struct stringtable*)table; ok(ptr->data != NULL, "got %p\n", ptr->data); /* first data offset is right after bucket area */ - ok(ptr->nextoffset == 509*sizeof(DWORD), "got %d\n", ptr->nextoffset); - ok(ptr->allocated != 0, "got %d\n", ptr->allocated); + ok(ptr->nextoffset == 509*sizeof(DWORD), "got %ld\n", ptr->nextoffset); + ok(ptr->allocated != 0, "got %ld\n", ptr->allocated); todo_wine { - ok(ptr->unk[0] != 0, "got %lx\n", ptr->unk[0]); - ok(ptr->unk[1] != 0, "got %lx\n", ptr->unk[1]); + ok(ptr->unk[0] != 0, "got %Ix\n", ptr->unk[0]); + ok(ptr->unk[1] != 0, "got %Ix\n", ptr->unk[1]); } - ok(ptr->max_extra_size == 0, "got %d\n", ptr->max_extra_size); - ok(ptr->lcid == GetThreadLocale(), "got %x, thread lcid %x\n", ptr->lcid, GetThreadLocale()); + ok(ptr->max_extra_size == 0, "got %ld\n", ptr->max_extra_size); + ok(ptr->lcid == GetThreadLocale(), "got %lx, thread lcid %lx\n", ptr->lcid, GetThreadLocale());
pStringTableDestroy(table); }
Hi,
My understanding is that these patches are pretty much independent from each other. If so it may help a bit to not send them as a patch series, that is without the partX/total numbering. It could still be a thread for the sake of the mailing list though I don't know if that's easy to achieve.
The reason is that for patch series it has to concatenate each part with all the preceding ones. In this case this means more and more things to recompile and thus increasingly long tasks as it progresses through the series.
That said, for a series like this, most of the time is spent running the tests on Windows so it would only help a little bit. That means if not making a patch series is not practical it's ok not to.
There's no need to resend the already sent patches of course.
Also there was a question about job priority the other day on the mailing list. Notice that this job got a higher niceness that regular mailing list patches: 6 instead of 5. That's because one of its tasks had a long timeout. That mechanism still leaves a lot of room for improvement though.
On 3/8/22 18:27, Francois Gouget wrote:
Hi,
My understanding is that these patches are pretty much independent from each other. If so it may help a bit to not send them as a patch series, that is without the partX/total numbering. It could still be a thread for the sake of the mailing list though I don't know if that's easy to achieve.
The reason is that for patch series it has to concatenate each part with all the preceding ones. In this case this means more and more things to recompile and thus increasingly long tasks as it progresses through the series.
That said, for a series like this, most of the time is spent running the tests on Windows so it would only help a little bit. That means if not making a patch series is not practical it's ok not to.
There's no need to resend the already sent patches of course.
Also there was a question about job priority the other day on the mailing list. Notice that this job got a higher niceness that regular mailing list patches: 6 instead of 5. That's because one of its tasks had a long timeout. That mechanism still leaves a lot of room for improvement though.
Hi François,
I think we currently run Windows test tasks independently for patches, whereas for the Wine tests the testbot runs them all at once with winetest. I think it's also using winetest on Windows for the special EOD job.
Wouldn't it be more efficient to run winetest for patches on Windows too, so it can combine multiple tests at once when needed instead of having to reset the VMs? Is there any complication to doing it? I've tried having a look at the perl source but I'm a bit lost.
Cheers,
Le 08/03/2022 à 18:27, Francois Gouget a écrit :
Hi,
My understanding is that these patches are pretty much independent from each other. If so it may help a bit to not send them as a patch series, that is without the partX/total numbering. It could still be a thread for the sake of the mailing list though I don't know if that's easy to achieve.
Hi François,
most of them are independent yes, but not always
anyway, it's possible to send in smaller independent series (that's not too complicated to do)
(eg looking at what I've sent this morning: except the 3 patches for user32/tests (which are currently bound [*]), all the other ones could have been sent as a single mail)
but, kernel32/tests ain't over yet (need at least one more shot tomorrow, hopefully to wrap it all)
and then we have to tackle ntdll/tests which will be even bigger than kernel32, and all the d3d modules (DLLs and tests) (Henri's in charge of those)
if there are niceness issues, another option is to send less patches every day (I tried to keep it ~25 / per day, even it's more ~20 lately)
let me know if you think that's appropriate
A+
[*] this could be even split further, but sending the cleanup part of last patch not on a the same run. not sure worth it
The reason is that for patch series it has to concatenate each part with all the preceding ones. In this case this means more and more things to recompile and thus increasingly long tasks as it progresses through the series.
That said, for a series like this, most of the time is spent running the tests on Windows so it would only help a little bit. That means if not making a patch series is not practical it's ok not to.
There's no need to resend the already sent patches of course.
Also there was a question about job priority the other day on the mailing list. Notice that this job got a higher niceness that regular mailing list patches: 6 instead of 5. That's because one of its tasks had a long timeout. That mechanism still leaves a lot of room for improvement though.
On Tue, 8 Mar 2022, Eric Pouech wrote: [...]
(eg looking at what I've sent this morning: except the 3 patches for user32/tests (which are currently bound [*]), all the other ones could have been sent as a single mail)
I wouldn't want you to compromise reviewability for the TestBot though.
Also there's a 99 step limit per job which currently translates to something like a maximum of 48 patched test units (one step for 32-bit one for 64-bit). So craming too many test unit patches in a single email would be an issue.
Increasing the limit would be pretty easy. But each step corresponds to 11 tasks so even with the current config that would be a ~1000 tasks job!
if there are niceness issues, another option is to send less patches every day (I tried to keep it ~25 / per day, even it's more ~20 lately)
It's not so much the number of patches per day as the number of test units patched.
Le 08/03/2022 à 20:23, Francois Gouget a écrit :
On Tue, 8 Mar 2022, Eric Pouech wrote: [...]
(eg looking at what I've sent this morning: except the 3 patches for user32/tests (which are currently bound [*]), all the other ones could have been sent as a single mail)
I wouldn't want you to compromise reviewability for the TestBot though.
sorry, my post wasn't clear... I meant replacing the serie of 25 patches with:
- one serie of 4 patches (user)
- 21 individual mail for each of the changes (not folding all of those in a single mail)
if there are niceness issues, another option is to send less patches every day
(I tried to keep it ~25 / per day, even it's more ~20 lately)
It's not so much the number of patches per day as the number of test units patched.
so reducing to one mail = one patch = one file (in tests/*.c) will help here?
A+
On Wed, 9 Mar 2022, Eric Pouech wrote: [...]
sorry, my post wasn't clear... I meant replacing the serie of 25 patches with:
one serie of 4 patches (user)
21 individual mail for each of the changes (not folding all of those in a
single mail)
That will help the debian11 VM a bit.
The main bottleneck is the debian11 VM on VM1, though w1064 on VM3 is not far behind.
The statistics page says that the (non-WineTest) debian11 tasks take 5m 11s on average. Add the 43.6 second revert time and that means it can process a bit over 10 tasks per hour.
Each email generates 2 debian11 tasks (one for 32-bit and one for wow32+wow64). So 25 emails will generate 50 tasks and thus take about 5 hours to process.
Another tidbit: over the past 7 days debian11 has received 5.3 tasks/hour on average. That's 127 tasks/day, though my gut feeling is that most of these have been during weekdays so it's more a rate of about 170 tasks/day (7.4 tasks/hour).
if there are niceness issues, another option is to send less patches every day
(I tried to keep it ~25 / per day, even it's more ~20 lately)
It's not so much the number of patches per day as the number of test units patched.
so reducing to one mail = one patch = one file (in tests/*.c) will help here?
Yes.
Looking at the stats page I noticed that the average debian11 revert time is a bit long (43.6s) so I'm doing a refresh of the VM. That will reduce the size of the disk image and should speed up the reverts a bit (I'm hoping for reverts in the 10 to 30s range).
At the same time I'm upgrading the VM from Debian 11.0 to 11.2.
And I'm also trying to update debiant: there's little point to a Debian Testing machine if it's completely out of date. But at the same time OpenGL multiarch support is quite broken in Debian Testing so the latest may not be very usable. Good to know either way.
On 3/8/22 12:01, Eric Pouech wrote:
if there are niceness issues, another option is to send less patches every day (I tried to keep it ~25 / per day, even it's more ~20 lately)
let me know if you think that's appropriate
I'm not reviewing most of these patches, nor managing the test bot, so take this for what it is, but I'd appreciate following the usual convention, and sending no more than about 5 patches per day. It's a bit overwhelming to be flooded with 25 emails daily, plus more when Marvin can't keep up and starts mis-applying them, and it's making it harder to use the testbot as a resource.