Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/debugger.c | 511 ++++++++++++++++++++-------------------- 1 file changed, 256 insertions(+), 255 deletions(-)
diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index 8b82aaecb9e..2b55da80b34 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.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 <assert.h> @@ -157,8 +158,8 @@ static int load_blackbox(const char* logfile, void* blackbox, int size) } SetLastError(0xdeadbeef); ret=ReadFile(hFile, blackbox, size, &read, NULL); - ok(ret, "ReadFile failed: %d\n", GetLastError()); - ok(read == size, "wrong size for '%s': read=%d\n", logfile, read); + ok(ret, "ReadFile failed: %ld\n", GetLastError()); + ok(read == size, "wrong size for '%s': read=%ld\n", logfile, read); ret = ReadFile(hFile, buf, sizeof(buf) - 1, &read, NULL); if (ret && read) { @@ -259,7 +260,7 @@ static void add_thread(struct debugger_context *ctx, DWORD tid) static struct debuggee_thread *get_debuggee_thread(struct debugger_context *ctx, DWORD tid) { struct wine_rb_entry *entry = wine_rb_get(&ctx->threads, &tid); - ok(entry != NULL, "unknown thread %x\n", tid); + ok(entry != NULL, "unknown thread %lx\n", tid); return WINE_RB_ENTRY_VALUE(entry, struct debuggee_thread, entry); }
@@ -301,13 +302,13 @@ static void fetch_thread_context_(unsigned line, struct debuggee_thread *thread) { thread->handle = OpenThread(THREAD_GET_CONTEXT | THREAD_SET_CONTEXT | THREAD_QUERY_INFORMATION, FALSE, thread->tid); - ok_(__FILE__,line)(thread->handle != NULL, "OpenThread failed: %u\n", GetLastError()); + ok_(__FILE__,line)(thread->handle != NULL, "OpenThread failed: %lu\n", GetLastError()); }
memset(&thread->ctx, 0xaa, sizeof(thread->ctx)); thread->ctx.ContextFlags = CONTEXT_FULL; ret = GetThreadContext(thread->handle, &thread->ctx); - ok_(__FILE__,line)(ret, "GetThreadContext failed: %u\n", GetLastError()); + ok_(__FILE__,line)(ret, "GetThreadContext failed: %lu\n", GetLastError()); }
#define set_thread_context(a,b) set_thread_context_(__LINE__,a,b) @@ -315,7 +316,7 @@ static void set_thread_context_(unsigned line, struct debugger_context *ctx, str { BOOL ret; ret = SetThreadContext(thread->handle, &thread->ctx); - ok_(__FILE__,line)(ret, "SetThreadContext failed: %u\n", GetLastError()); + ok_(__FILE__,line)(ret, "SetThreadContext failed: %lu\n", GetLastError()); }
static void fetch_process_context(struct debugger_context *ctx) @@ -343,14 +344,14 @@ static void next_event_(unsigned line, struct debugger_context *ctx, unsigned ti if (ctx->process_cnt && ctx->ev.dwDebugEventCode != -1) { ret = ContinueDebugEvent(ctx->ev.dwProcessId, ctx->ev.dwThreadId, DBG_CONTINUE); - ok_(__FILE__,line)(ret, "ContinueDebugEvent failed, last error %d.\n", GetLastError()); + ok_(__FILE__,line)(ret, "ContinueDebugEvent failed, last error %ld.\n", GetLastError()); }
ret = WaitForDebugEvent(&ctx->ev, timeout); if (!ret) { ok_(__FILE__,line)(GetLastError() == ERROR_SEM_TIMEOUT, - "WaitForDebugEvent failed, last error %d.\n", GetLastError()); + "WaitForDebugEvent failed, last error %ld.\n", GetLastError()); ctx->ev.dwDebugEventCode = -1; return; } @@ -401,8 +402,8 @@ static void wait_for_breakpoint_(unsigned line, struct debugger_context *ctx) while (ctx->ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT || ctx->ev.dwDebugEventCode == UNLOAD_DLL_DEBUG_EVENT || ctx->ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT);
- ok_(__FILE__,line)(ctx->ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx->ev.dwDebugEventCode); - ok_(__FILE__,line)(ctx->ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %x\n", + ok_(__FILE__,line)(ctx->ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx->ev.dwDebugEventCode); + ok_(__FILE__,line)(ctx->ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", ctx->ev.u.Exception.ExceptionRecord.ExceptionCode); }
@@ -413,12 +414,12 @@ static void process_attach_events(struct debugger_context *ctx, BOOL pass_except
ctx->ev.dwDebugEventCode = -1; next_event(ctx, 0); - ok(ctx->ev.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx->ev.dwDebugEventCode); + ok(ctx->ev.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx->ev.dwDebugEventCode);
next_event(ctx, 0); if (ctx->ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT) /* Vista+ reports ntdll.dll before reporting threads */ { - ok(ctx->ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx->ev.dwDebugEventCode); + ok(ctx->ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx->ev.dwDebugEventCode); ok(ctx->ev.u.LoadDll.lpBaseOfDll == ntdll, "The first reported DLL is not ntdll.dll\n"); next_event(ctx, 0); } @@ -430,7 +431,7 @@ static void process_attach_events(struct debugger_context *ctx, BOOL pass_except { /* even when there are more pending events, they are not reported until current event is continued */ ret = WaitForDebugEvent(&ev, 10); - ok(GetLastError() == ERROR_SEM_TIMEOUT, "WaitForDebugEvent returned %x(%u)\n", ret, GetLastError()); + ok(GetLastError() == ERROR_SEM_TIMEOUT, "WaitForDebugEvent returned %x(%lu)\n", ret, GetLastError());
next_event(ctx, WAIT_EVENT_TIMEOUT); if (ctx->ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT) @@ -439,7 +440,7 @@ static void process_attach_events(struct debugger_context *ctx, BOOL pass_except ok(ctx->dll_cnt > 2, "dll_cnt = %d\n", ctx->dll_cnt);
/* a new thread is created and it executes DbgBreakPoint, which causes the exception */ - ok(ctx->ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx->ev.dwDebugEventCode); + ok(ctx->ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx->ev.dwDebugEventCode); if (ctx->ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT) { DWORD last_thread = ctx->ev.dwThreadId; @@ -447,15 +448,15 @@ static void process_attach_events(struct debugger_context *ctx, BOOL pass_except ok(ctx->ev.dwThreadId == last_thread, "unexpected thread\n"); }
- ok(ctx->ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx->ev.dwDebugEventCode); - ok(ctx->ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %x\n", + ok(ctx->ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx->ev.dwDebugEventCode); + ok(ctx->ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", ctx->ev.u.Exception.ExceptionRecord.ExceptionCode); ok(ctx->ev.u.Exception.ExceptionRecord.ExceptionAddress == pDbgBreakPoint, "ExceptionAddress != DbgBreakPoint\n");
if (pass_exception) { ret = ContinueDebugEvent(ctx->ev.dwProcessId, ctx->ev.dwThreadId, DBG_EXCEPTION_NOT_HANDLED); - ok(ret, "ContinueDebugEvent failed, last error %d.\n", GetLastError()); + ok(ret, "ContinueDebugEvent failed, last error %ld.\n", GetLastError()); ctx->ev.dwDebugEventCode = -1; }
@@ -463,7 +464,7 @@ static void process_attach_events(struct debugger_context *ctx, BOOL pass_except do next_event(ctx, POLL_EVENT_TIMEOUT); while (ctx->ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT || ctx->ev.dwDebugEventCode == UNLOAD_DLL_DEBUG_EVENT || ctx->ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT || ctx->ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT); - ok(ctx->ev.dwDebugEventCode == -1, "dwDebugEventCode = %d\n", ctx->ev.dwDebugEventCode); + ok(ctx->ev.dwDebugEventCode == -1, "dwDebugEventCode = %ld\n", ctx->ev.dwDebugEventCode); }
static void doDebugger(int argc, char** argv) @@ -509,8 +510,8 @@ static void doDebugger(int argc, char** argv) if (strstr(myARGV[2], "process")) { next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); - ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == STATUS_ACCESS_VIOLATION, "ExceptionCode = %x\n", + ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == STATUS_ACCESS_VIOLATION, "ExceptionCode = %lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionCode); }
@@ -594,14 +595,14 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks) return; }
- ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%ld\n", ret);
get_file_name(dbglog); get_events(dbglog, &start_event, &done_event); cmd=HeapAlloc(GetProcessHeap(), 0, strlen(argv0)+10+strlen(dbgtasks)+1+strlen(dbglog)+2+34+1); sprintf(cmd, "%s debugger %s "%s" %%ld %%ld", argv0, dbgtasks, dbglog); ret=RegSetValueExA(hkey, "debugger", 0, REG_SZ, (BYTE*)cmd, strlen(cmd)+1); - ok(ret == ERROR_SUCCESS, "unable to set AeDebug/debugger: ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "unable to set AeDebug/debugger: ret=%ld\n", ret); HeapFree(GetProcessHeap(), 0, cmd);
cmd = HeapAlloc(GetProcessHeap(), 0, strlen(argv0) + 16); @@ -613,7 +614,7 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks) startup.dwFlags = STARTF_USESHOWWINDOW; startup.wShowWindow = SW_SHOWNORMAL; ret=CreateProcessA(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess: err=%d\n", GetLastError()); + ok(ret, "CreateProcess: err=%ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, cmd); CloseHandle(info.hThread);
@@ -635,7 +636,7 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks) #endif ok(wait_code == WAIT_OBJECT_0, "Timed out waiting for the child to crash\n"); bRet = GetExitCodeProcess(info.hProcess, &exit_code); - ok(bRet, "GetExitCodeProcess failed: err=%d\n", GetLastError()); + ok(bRet, "GetExitCodeProcess failed: err=%ld\n", GetLastError()); if (strstr(dbgtasks, "code2")) { /* If, after attaching to the debuggee, the debugger exits without @@ -644,12 +645,12 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks) ok(exit_code == STATUS_DEBUGGER_INACTIVE || broken(exit_code == STATUS_ACCESS_VIOLATION) || /* Intermittent Vista+ */ broken(exit_code == WAIT_ABANDONED), /* NT4, W2K */ - "wrong exit code : %08x\n", exit_code); + "wrong exit code : %08lx\n", exit_code); } else ok(exit_code == STATUS_ACCESS_VIOLATION || broken(exit_code == WAIT_ABANDONED), /* NT4, W2K, W2K3 */ - "wrong exit code : %08x\n", exit_code); + "wrong exit code : %08lx\n", exit_code); CloseHandle(info.hProcess);
/* ...before the debugger */ @@ -673,12 +674,12 @@ static void crash_and_debug(HKEY hkey, const char* argv0, const char* dbgtasks) ok(load_blackbox(dbglog, &dbg_blackbox, sizeof(dbg_blackbox)), "failed to open: %s\n", dbglog);
ok(dbg_blackbox.argc == 6, "wrong debugger argument count: %d\n", dbg_blackbox.argc); - ok(dbg_blackbox.pid == info.dwProcessId, "the child and debugged pids don't match: %d != %d\n", info.dwProcessId, dbg_blackbox.pid); - ok(dbg_blackbox.debug_rc, "debugger: SetEvent(debug_event) failed err=%d\n", dbg_blackbox.debug_err); - ok(dbg_blackbox.attach_rc, "DebugActiveProcess(%d) failed err=%d\n", dbg_blackbox.pid, dbg_blackbox.attach_err); - ok(dbg_blackbox.nokill_rc, "DebugSetProcessKillOnExit(FALSE) failed err=%d\n", dbg_blackbox.nokill_err); - ok(dbg_blackbox.detach_rc, "DebugActiveProcessStop(%d) failed err=%d\n", dbg_blackbox.pid, dbg_blackbox.detach_err); - ok(!dbg_blackbox.failures, "debugger reported %u failures\n", dbg_blackbox.failures); + ok(dbg_blackbox.pid == info.dwProcessId, "the child and debugged pids don't match: %ld != %ld\n", info.dwProcessId, dbg_blackbox.pid); + ok(dbg_blackbox.debug_rc, "debugger: SetEvent(debug_event) failed err=%ld\n", dbg_blackbox.debug_err); + ok(dbg_blackbox.attach_rc, "DebugActiveProcess(%ld) failed err=%ld\n", dbg_blackbox.pid, dbg_blackbox.attach_err); + ok(dbg_blackbox.nokill_rc, "DebugSetProcessKillOnExit(FALSE) failed err=%ld\n", dbg_blackbox.nokill_err); + ok(dbg_blackbox.detach_rc, "DebugActiveProcessStop(%ld) failed err=%ld\n", dbg_blackbox.pid, dbg_blackbox.detach_err); + ok(!dbg_blackbox.failures, "debugger reported %lu failures\n", dbg_blackbox.failures);
DeleteFileA(dbglog); } @@ -693,7 +694,7 @@ static void crash_and_winedbg(HKEY hkey, const char* argv0) DWORD exit_code;
ret=RegSetValueExA(hkey, "auto", 0, REG_SZ, (BYTE*)"1", 2); - ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%d\n", ret); + ok(ret == ERROR_SUCCESS, "unable to set AeDebug/auto: ret=%ld\n", ret);
cmd=HeapAlloc(GetProcessHeap(), 0, strlen(argv0)+15+1); sprintf(cmd, "%s debugger crash", argv0); @@ -703,15 +704,15 @@ static void crash_and_winedbg(HKEY hkey, const char* argv0) startup.dwFlags = STARTF_USESHOWWINDOW; startup.wShowWindow = SW_SHOWNORMAL; ret=CreateProcessA(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info); - ok(ret, "CreateProcess: err=%d\n", GetLastError()); + ok(ret, "CreateProcess: err=%ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, cmd); CloseHandle(info.hThread);
trace("waiting for child exit...\n"); ok(WaitForSingleObject(info.hProcess, 60000) == WAIT_OBJECT_0, "Timed out waiting for the child to crash\n"); bRet = GetExitCodeProcess(info.hProcess, &exit_code); - ok(bRet, "GetExitCodeProcess failed: err=%d\n", GetLastError()); - ok(exit_code == STATUS_ACCESS_VIOLATION, "exit code = %08x\n", exit_code); + ok(bRet, "GetExitCodeProcess failed: err=%ld\n", GetLastError()); + ok(exit_code == STATUS_ACCESS_VIOLATION, "exit code = %08lx\n", exit_code); CloseHandle(info.hProcess); }
@@ -749,7 +750,7 @@ static void test_ExitCode(void) } else if (ret != ERROR_FILE_NOT_FOUND) { - ok(0, "could not open the AeDebug key: %d\n", ret); + ok(0, "could not open the AeDebug key: %ld\n", ret); return; } else @@ -776,7 +777,7 @@ static void test_ExitCode(void) RegCloseKey(hkeyWinedbg); } else - ok(0, "Couldn't access WineDbg Key - error %u\n", ret); + ok(0, "Couldn't access WineDbg Key - error %lu\n", ret); }
if (winetest_interactive) @@ -786,7 +787,7 @@ static void test_ExitCode(void) crash_and_debug(hkey, test_exe, "dbg,none"); else skip(""none" debugger test needs user interaction\n"); - ok(disposition == REG_OPENED_EXISTING_KEY, "expected REG_OPENED_EXISTING_KEY, got %d\n", disposition); + ok(disposition == REG_OPENED_EXISTING_KEY, "expected REG_OPENED_EXISTING_KEY, got %ld\n", disposition); crash_and_debug(hkey, test_exe, "dbg,event,order"); crash_and_debug(hkey, test_exe, "dbg,attach,event,code2"); crash_and_debug(hkey, test_exe, "dbg,attach,event,nokill"); @@ -820,7 +821,7 @@ static void test_RemoteDebugger(void) bret = pCheckRemoteDebuggerPresent(GetCurrentProcess(),&present); ok(bret , "expected CheckRemoteDebuggerPresent to succeed\n"); ok(0xdeadbeef == GetLastError(), - "expected error to be unchanged, got %d/%x\n",GetLastError(), GetLastError()); + "expected error to be unchanged, got %ld/%lx\n",GetLastError(), GetLastError());
present = TRUE; SetLastError(0xdeadbeef); @@ -828,13 +829,13 @@ static void test_RemoteDebugger(void) ok(!bret , "expected CheckRemoteDebuggerPresent to fail\n"); ok(present, "expected parameter to be unchanged\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "expected error ERROR_INVALID_PARAMETER, got %d/%x\n",GetLastError(), GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %ld/%lx\n",GetLastError(), GetLastError());
SetLastError(0xdeadbeef); bret = pCheckRemoteDebuggerPresent(GetCurrentProcess(),NULL); ok(!bret , "expected CheckRemoteDebuggerPresent to fail\n"); ok(ERROR_INVALID_PARAMETER == GetLastError(), - "expected error ERROR_INVALID_PARAMETER, got %d/%x\n",GetLastError(), GetLastError()); + "expected error ERROR_INVALID_PARAMETER, got %ld/%lx\n",GetLastError(), GetLastError()); }
struct child_blackbox @@ -854,36 +855,36 @@ static void doChild(int argc, char **argv) BOOL ret;
blackbox_file = argv[4]; - sscanf(argv[3], "%08x", &ppid); + sscanf(argv[3], "%08lx", &ppid);
parent = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, ppid); - child_ok(!!parent, "OpenProcess failed, last error %#x.\n", GetLastError()); + child_ok(!!parent, "OpenProcess failed, last error %#lx.\n", GetLastError());
ret = pCheckRemoteDebuggerPresent(parent, &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#lx.\n", GetLastError()); child_ok(!debug, "Expected debug == 0, got %#x.\n", debug);
ret = DebugActiveProcess(ppid); - child_ok(ret, "DebugActiveProcess failed, last error %#x.\n", GetLastError()); + child_ok(ret, "DebugActiveProcess failed, last error %#lx.\n", GetLastError());
ret = pCheckRemoteDebuggerPresent(parent, &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#lx.\n", GetLastError()); child_ok(debug, "Expected debug != 0, got %#x.\n", debug);
ret = DebugActiveProcessStop(ppid); - child_ok(ret, "DebugActiveProcessStop failed, last error %#x.\n", GetLastError()); + child_ok(ret, "DebugActiveProcessStop failed, last error %#lx.\n", GetLastError());
ret = pCheckRemoteDebuggerPresent(parent, &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#lx.\n", GetLastError()); child_ok(!debug, "Expected debug == 0, got %#x.\n", debug);
ret = CloseHandle(parent); - child_ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); + child_ok(ret, "CloseHandle failed, last error %#lx.\n", GetLastError());
ret = IsDebuggerPresent(); child_ok(ret, "Expected ret != 0, got %#x.\n", ret); ret = pCheckRemoteDebuggerPresent(GetCurrentProcess(), &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#lx.\n", GetLastError()); child_ok(debug, "Expected debug != 0, got %#x.\n", debug);
NtCurrentTeb()->Peb->BeingDebugged = FALSE; @@ -891,7 +892,7 @@ static void doChild(int argc, char **argv) ret = IsDebuggerPresent(); child_ok(!ret, "Expected ret != 0, got %#x.\n", ret); ret = pCheckRemoteDebuggerPresent(GetCurrentProcess(), &debug); - child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + child_ok(ret, "CheckRemoteDebuggerPresent failed, last error %#lx.\n", GetLastError()); child_ok(debug, "Expected debug != 0, got %#x.\n", debug);
NtCurrentTeb()->Peb->BeingDebugged = TRUE; @@ -902,11 +903,11 @@ static void doChild(int argc, char **argv) GetSystemDirectoryW( path, MAX_PATH ); wcscat( path, L"\oleaut32.dll" ); file = CreateFileW( path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); - child_ok( file != INVALID_HANDLE_VALUE, "failed to open %s: %u\n", debugstr_w(path), GetLastError()); + child_ok( file != INVALID_HANDLE_VALUE, "failed to open %s: %lu\n", debugstr_w(path), GetLastError()); map = CreateFileMappingW( file, NULL, SEC_IMAGE | PAGE_READONLY, 0, 0, NULL ); - child_ok( map != NULL, "failed to create mapping %s: %u\n", debugstr_w(path), GetLastError() ); + child_ok( map != NULL, "failed to create mapping %s: %lu\n", debugstr_w(path), GetLastError() ); mod = MapViewOfFile( map, FILE_MAP_READ, 0, 0, 0 ); - child_ok( mod != NULL, "failed to map %s: %u\n", debugstr_w(path), GetLastError() ); + child_ok( mod != NULL, "failed to map %s: %lu\n", debugstr_w(path), GetLastError() ); CloseHandle( file ); CloseHandle( map ); UnmapViewOfFile( mod ); @@ -923,11 +924,11 @@ static void doChild(int argc, char **argv) else goto done;
file = CreateFileW( path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); - child_ok( file != INVALID_HANDLE_VALUE, "failed to open %s: %u\n", debugstr_w(path), GetLastError()); + child_ok( file != INVALID_HANDLE_VALUE, "failed to open %s: %lu\n", debugstr_w(path), GetLastError()); map = CreateFileMappingW( file, NULL, SEC_IMAGE | PAGE_READONLY, 0, 0, NULL ); - child_ok( map != NULL, "failed to create mapping %s: %u\n", debugstr_w(path), GetLastError() ); + child_ok( map != NULL, "failed to create mapping %s: %lu\n", debugstr_w(path), GetLastError() ); mod = MapViewOfFile( map, FILE_MAP_READ, 0, 0, 0 ); - child_ok( mod != NULL, "failed to map %s: %u\n", debugstr_w(path), GetLastError() ); + child_ok( mod != NULL, "failed to map %s: %lu\n", debugstr_w(path), GetLastError() ); CloseHandle( file ); CloseHandle( map ); UnmapViewOfFile( mod ); @@ -987,17 +988,17 @@ static void test_debug_loop(int argc, char **argv)
get_file_name(blackbox_file); cmd = HeapAlloc(GetProcessHeap(), 0, strlen(argv[0]) + strlen(arguments) + strlen(blackbox_file) + 2 + 10); - sprintf(cmd, "%s%s%08x "%s"", argv[0], arguments, pid, blackbox_file); + sprintf(cmd, "%s%s%08lx "%s"", argv[0], arguments, pid, blackbox_file);
memset(&si, 0, sizeof(si)); si.cb = sizeof(si); ret = CreateProcessA(NULL, cmd, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); + ok(ret, "CreateProcess failed, last error %#lx.\n", GetLastError());
HeapFree(GetProcessHeap(), 0, cmd);
ret = pCheckRemoteDebuggerPresent(pi.hProcess, &debug); - ok(ret, "CheckRemoteDebuggerPresent failed, last error %#x.\n", GetLastError()); + ok(ret, "CheckRemoteDebuggerPresent failed, last error %#lx.\n", GetLastError()); ok(debug, "Expected debug != 0, got %#x.\n", debug);
for (;;) @@ -1005,7 +1006,7 @@ static void test_debug_loop(int argc, char **argv) DEBUG_EVENT ev;
ret = WaitForDebugEvent(&ev, INFINITE); - ok(ret, "WaitForDebugEvent failed, last error %#x.\n", GetLastError()); + ok(ret, "WaitForDebugEvent failed, last error %#lx.\n", GetLastError()); if (!ret) break;
if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT) break; @@ -1020,7 +1021,7 @@ static void test_debug_loop(int argc, char **argv) } #endif ret = ContinueDebugEvent(ev.dwProcessId, ev.dwThreadId, DBG_CONTINUE); - ok(ret, "ContinueDebugEvent failed, last error %#x.\n", GetLastError()); + ok(ret, "ContinueDebugEvent failed, last error %#lx.\n", GetLastError()); if (!ret) break; }
@@ -1033,15 +1034,15 @@ static void test_debug_loop(int argc, char **argv) #endif
ret = CloseHandle(pi.hThread); - ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %#lx.\n", GetLastError()); ret = CloseHandle(pi.hProcess); - ok(ret, "CloseHandle failed, last error %#x.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %#lx.\n", GetLastError());
load_blackbox(blackbox_file, &blackbox, sizeof(blackbox)); - ok(!blackbox.failures, "Got %d failures from child process.\n", blackbox.failures); + ok(!blackbox.failures, "Got %ld failures from child process.\n", blackbox.failures);
ret = DeleteFileA(blackbox_file); - ok(ret, "DeleteFileA failed, last error %#x.\n", GetLastError()); + ok(ret, "DeleteFileA failed, last error %#lx.\n", GetLastError()); }
static void doChildren(int argc, char **argv) @@ -1067,7 +1068,7 @@ static void doChildren(int argc, char **argv) strcpy(event_name, p); strcat(event_name, "_init"); event = OpenEventA(EVENT_ALL_ACCESS, FALSE, event_name); - child_ok(event != NULL, "OpenEvent failed, last error %d.\n", GetLastError()); + child_ok(event != NULL, "OpenEvent failed, last error %ld.\n", GetLastError()); SetEvent(event); CloseHandle(event);
@@ -1076,7 +1077,7 @@ static void doChildren(int argc, char **argv) strcpy(event_name, p); strcat(event_name, "_attach"); event = OpenEventA(EVENT_ALL_ACCESS, FALSE, event_name); - child_ok(event != NULL, "OpenEvent failed, last error %d.\n", GetLastError()); + child_ok(event != NULL, "OpenEvent failed, last error %ld.\n", GetLastError()); WaitForSingleObject(event, INFINITE); CloseHandle(event);
@@ -1086,15 +1087,15 @@ static void doChildren(int argc, char **argv) memset(&si, 0, sizeof(si)); si.cb = sizeof(si); ret = CreateProcessA(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - child_ok(ret, "CreateProcess failed, last error %d.\n", GetLastError()); + child_ok(ret, "CreateProcess failed, last error %ld.\n", GetLastError());
child_ok(WaitForSingleObject(pi.hProcess, 10000) == WAIT_OBJECT_0, "Timed out waiting for the child to exit\n");
ret = CloseHandle(pi.hThread); - child_ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + child_ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); ret = CloseHandle(pi.hProcess); - child_ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + child_ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError());
blackbox.failures = child_failures; save_blackbox(blackbox_file, &blackbox, sizeof(blackbox), NULL); @@ -1130,31 +1131,31 @@ static void test_debug_children(const char *name, DWORD flag, BOOL debug_child, strcpy(event_name, p); strcat(event_name, "_init"); event_init = CreateEventA(NULL, FALSE, FALSE, event_name); - ok(event_init != NULL, "OpenEvent failed, last error %d.\n", GetLastError()); + ok(event_init != NULL, "OpenEvent failed, last error %ld.\n", GetLastError());
p = strrchr(blackbox_file, '\'); p = p ? p+1 : blackbox_file; strcpy(event_name, p); strcat(event_name, "_attach"); event_attach = CreateEventA(NULL, FALSE, flag!=0, event_name); - ok(event_attach != NULL, "CreateEvent failed, last error %d.\n", GetLastError()); + ok(event_attach != NULL, "CreateEvent failed, last error %ld.\n", GetLastError());
memset(&si, 0, sizeof(si)); si.cb = sizeof(si);
ret = CreateProcessA(NULL, cmd, NULL, NULL, FALSE, flag, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed, last error %d.\n", GetLastError()); + ok(ret, "CreateProcess failed, last error %ld.\n", GetLastError()); HeapFree(GetProcessHeap(), 0, cmd); if (!flag) { WaitForSingleObject(event_init, INFINITE); Sleep(100); ret = DebugActiveProcess(pi.dwProcessId); - ok(ret, "DebugActiveProcess failed, last error %d.\n", GetLastError()); + ok(ret, "DebugActiveProcess failed, last error %ld.\n", GetLastError()); }
ret = pCheckRemoteDebuggerPresent(pi.hProcess, &debug); - ok(ret, "CheckRemoteDebuggerPresent failed, last error %d.\n", GetLastError()); + ok(ret, "CheckRemoteDebuggerPresent failed, last error %ld.\n", GetLastError()); ok(debug, "Expected debug != 0, got %x.\n", debug);
trace("starting debugger loop\n"); @@ -1164,19 +1165,19 @@ static void test_debug_children(const char *name, DWORD flag, BOOL debug_child, DWORD last_thread;
next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); ok(ctx.pid == pi.dwProcessId, "unexpected dwProcessId %x\n", ctx.ev.dwProcessId == ctx.pid);
next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); last_thread = ctx.ev.dwThreadId;
wait_for_breakpoint(&ctx); ok(ctx.dll_cnt > 2, "dll_cnt = %d\n", ctx.dll_cnt);
- ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); ok(ctx.ev.dwThreadId == last_thread, "unexpected thread\n"); - ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %x\n", + ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionCode);
/* Except for wxppro and w2008, the initial breakpoint is now somewhere else, possibly within LdrInitShimEngineDynamic, @@ -1195,11 +1196,11 @@ static void test_debug_children(const char *name, DWORD flag, BOOL debug_child, if (pass_exception) { ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_EXCEPTION_NOT_HANDLED); - ok(ret, "ContinueDebugEvent failed, last error %d.\n", GetLastError()); + ok(ret, "ContinueDebugEvent failed, last error %ld.\n", GetLastError()); ctx.ev.dwDebugEventCode = -1;
next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode != EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode != EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); } } else @@ -1207,32 +1208,32 @@ static void test_debug_children(const char *name, DWORD flag, BOOL debug_child, DWORD last_thread;
process_attach_events(&ctx, pass_exception); - ok(ctx.pid == pi.dwProcessId, "unexpected dwProcessId %x\n", ctx.pid); + ok(ctx.pid == pi.dwProcessId, "unexpected dwProcessId %lx\n", ctx.pid);
ret = DebugBreakProcess(pi.hProcess); - ok(ret, "BreakProcess failed: %u\n", GetLastError()); + ok(ret, "BreakProcess failed: %lu\n", GetLastError());
/* a new thread, which executes DbgBreakPoint, is created */ next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); last_thread = ctx.ev.dwThreadId;
if (ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT) next_event(&ctx, WAIT_EVENT_TIMEOUT);
- ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); ok(ctx.ev.dwThreadId == last_thread, "unexpected thread\n"); - ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %x\n", + ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionCode); ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress == pDbgBreakPoint, "ExceptionAddress != DbgBreakPoint\n");
ret = SetEvent(event_attach); - ok(ret, "SetEvent failed, last error %d.\n", GetLastError()); + ok(ret, "SetEvent failed, last error %ld.\n", GetLastError());
if (pass_exception) { ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_EXCEPTION_NOT_HANDLED); - ok(ret, "ContinueDebugEvent failed, last error %d.\n", GetLastError()); + ok(ret, "ContinueDebugEvent failed, last error %ld.\n", GetLastError()); ctx.ev.dwDebugEventCode = -1; } } @@ -1241,27 +1242,27 @@ static void test_debug_children(const char *name, DWORD flag, BOOL debug_child, while (ctx.ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT || ctx.ev.dwDebugEventCode == UNLOAD_DLL_DEBUG_EVENT || ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT || ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT);
- ok(ctx.ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_CONTINUE); - ok(ret, "ContinueDebugEvent failed, last error %d.\n", GetLastError()); + ok(ret, "ContinueDebugEvent failed, last error %ld.\n", GetLastError());
if(debug_child) - ok(ctx.process_cnt == 2, "didn't get any child events (flag: %x).\n", flag); + ok(ctx.process_cnt == 2, "didn't get any child events (flag: %lx).\n", flag); else - ok(ctx.process_cnt == 1, "got child event (flag: %x).\n", flag); + ok(ctx.process_cnt == 1, "got child event (flag: %lx).\n", flag); CloseHandle(event_init); CloseHandle(event_attach);
ret = CloseHandle(pi.hThread); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); ret = CloseHandle(pi.hProcess); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError());
load_blackbox(blackbox_file, &blackbox, sizeof(blackbox)); - ok(!blackbox.failures, "Got %d failures from child process.\n", blackbox.failures); + ok(!blackbox.failures, "Got %ld failures from child process.\n", blackbox.failures);
ret = DeleteFileA(blackbox_file); - ok(ret, "DeleteFileA failed, last error %d.\n", GetLastError()); + ok(ret, "DeleteFileA failed, last error %ld.\n", GetLastError()); }
static void wait_debugger(HANDLE event, unsigned int cnt) @@ -1274,7 +1275,7 @@ static void wait_debugger(HANDLE event, unsigned int cnt) static void expect_event_(unsigned line, struct debugger_context *ctx, DWORD event_code) { next_event(ctx, WAIT_EVENT_TIMEOUT); - ok_(__FILE__,line)(ctx->ev.dwDebugEventCode == event_code, "dwDebugEventCode = %d expected %d\n", + ok_(__FILE__,line)(ctx->ev.dwDebugEventCode == event_code, "dwDebugEventCode = %ld expected %ld\n", ctx->ev.dwDebugEventCode, event_code); }
@@ -1282,7 +1283,7 @@ static void expect_event_(unsigned line, struct debugger_context *ctx, DWORD eve static void expect_exception_(unsigned line, struct debugger_context *ctx, DWORD exception_code) { expect_event_(line, ctx, EXCEPTION_DEBUG_EVENT); - ok_(__FILE__,line)(ctx->ev.u.Exception.ExceptionRecord.ExceptionCode == exception_code, "ExceptionCode = %x expected %x\n", + ok_(__FILE__,line)(ctx->ev.u.Exception.ExceptionRecord.ExceptionCode == exception_code, "ExceptionCode = %lx expected %lx\n", ctx->ev.u.Exception.ExceptionRecord.ExceptionCode, exception_code); }
@@ -1313,7 +1314,7 @@ static void single_step_(unsigned line, struct debugger_context *ctx, struct deb fetch_thread_context(thread); ok_(__FILE__,line)(get_ip(&thread->ctx) == expect_addr, "unexpected instruction pointer %p expected %p\n", get_ip(&thread->ctx), expect_addr); - ok_(__FILE__,line)(!(thread->ctx.EFlags & 0x100), "EFlags = %x\n", thread->ctx.EFlags); + ok_(__FILE__,line)(!(thread->ctx.EFlags & 0x100), "EFlags = %lx\n", thread->ctx.EFlags); #endif }
@@ -1393,19 +1394,19 @@ static void test_debugger(const char *argv0) BOOL ret;
event = CreateEventW(&sa, FALSE, FALSE, NULL); - ok(event != NULL, "CreateEvent failed: %u\n", GetLastError()); + ok(event != NULL, "CreateEvent failed: %lu\n", GetLastError());
cmd = heap_alloc(strlen(argv0) + strlen(arguments) + 16); - sprintf(cmd, "%s%s%x %u\n", argv0, arguments, (DWORD)(DWORD_PTR)event, OP_BP ? 3 : 1); + sprintf(cmd, "%s%s%lx %u\n", argv0, arguments, (DWORD)(DWORD_PTR)event, OP_BP ? 3 : 1);
memset(&si, 0, sizeof(si)); si.cb = sizeof(si); ret = CreateProcessA(NULL, cmd, NULL, NULL, TRUE, DEBUG_PROCESS, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); + ok(ret, "CreateProcess failed, last error %#lx.\n", GetLastError()); heap_free(cmd);
next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == CREATE_PROCESS_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode);
if ((skip_reply_later = !ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_REPLY_LATER))) win_skip("Skipping unsupported DBG_REPLY_LATER tests\n"); @@ -1417,49 +1418,49 @@ static void test_debugger(const char *argv0) ctx.ev.dwDebugEventCode = -1; next_event(&ctx, WAIT_EVENT_TIMEOUT); ok(de.dwDebugEventCode == ctx.ev.dwDebugEventCode, - "dwDebugEventCode differs: %x (was %x)\n", ctx.ev.dwDebugEventCode, de.dwDebugEventCode); + "dwDebugEventCode differs: %lx (was %lx)\n", ctx.ev.dwDebugEventCode, de.dwDebugEventCode); ok(de.dwProcessId == ctx.ev.dwProcessId, - "dwProcessId differs: %x (was %x)\n", ctx.ev.dwProcessId, de.dwProcessId); + "dwProcessId differs: %lx (was %lx)\n", ctx.ev.dwProcessId, de.dwProcessId); ok(de.dwThreadId == ctx.ev.dwThreadId, - "dwThreadId differs: %x (was %x)\n", ctx.ev.dwThreadId, de.dwThreadId); + "dwThreadId differs: %lx (was %lx)\n", ctx.ev.dwThreadId, de.dwThreadId);
/* Suspending the thread should prevent other attach debug events * to be received until it's resumed */ thread = OpenThread(THREAD_SUSPEND_RESUME, FALSE, ctx.ev.dwThreadId); - ok(thread != INVALID_HANDLE_VALUE, "OpenThread failed, last error:%u\n", GetLastError()); + ok(thread != INVALID_HANDLE_VALUE, "OpenThread failed, last error:%lu\n", GetLastError());
status = NtSuspendThread(thread, NULL); - ok(!status, "NtSuspendThread failed, last error:%u\n", GetLastError()); + ok(!status, "NtSuspendThread failed, last error:%lu\n", GetLastError());
ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_REPLY_LATER); - ok(ret, "ContinueDebugEvent failed, last error:%u\n", GetLastError()); + ok(ret, "ContinueDebugEvent failed, last error:%lu\n", GetLastError()); ok(!WaitForDebugEvent(&ctx.ev, POLL_EVENT_TIMEOUT), "WaitForDebugEvent succeeded.\n");
status = NtResumeThread(thread, NULL); - ok(!status, "NtResumeThread failed, last error:%u\n", GetLastError()); + ok(!status, "NtResumeThread failed, last error:%lu\n", GetLastError());
ret = CloseHandle(thread); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError());
ok(WaitForDebugEvent(&ctx.ev, POLL_EVENT_TIMEOUT), "WaitForDebugEvent failed.\n"); ok(de.dwDebugEventCode == ctx.ev.dwDebugEventCode, - "dwDebugEventCode differs: %x (was %x)\n", ctx.ev.dwDebugEventCode, de.dwDebugEventCode); + "dwDebugEventCode differs: %lx (was %lx)\n", ctx.ev.dwDebugEventCode, de.dwDebugEventCode);
next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); de = ctx.ev;
ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_REPLY_LATER); - ok(ret, "ContinueDebugEvent failed, last error:%u\n", GetLastError()); + ok(ret, "ContinueDebugEvent failed, last error:%lu\n", GetLastError());
ctx.ev.dwDebugEventCode = -1; next_event(&ctx, WAIT_EVENT_TIMEOUT); ok(de.dwDebugEventCode == ctx.ev.dwDebugEventCode, - "dwDebugEventCode differs: %x (was %x)\n", ctx.ev.dwDebugEventCode, de.dwDebugEventCode); + "dwDebugEventCode differs: %lx (was %lx)\n", ctx.ev.dwDebugEventCode, de.dwDebugEventCode); ok(de.dwProcessId == ctx.ev.dwProcessId, - "dwProcessId differs: %x (was %x)\n", ctx.ev.dwProcessId, de.dwProcessId); + "dwProcessId differs: %lx (was %lx)\n", ctx.ev.dwProcessId, de.dwProcessId); ok(de.dwThreadId == ctx.ev.dwThreadId, - "dwThreadId differs: %x (was %x)\n", ctx.ev.dwThreadId, de.dwThreadId); + "dwThreadId differs: %lx (was %lx)\n", ctx.ev.dwThreadId, de.dwThreadId); }
wait_for_breakpoint(&ctx); @@ -1467,7 +1468,7 @@ static void test_debugger(const char *argv0) while(ctx.ev.dwDebugEventCode != -1);
mem = VirtualAllocEx(pi.hProcess, NULL, sizeof(buf), MEM_COMMIT, PAGE_EXECUTE_READWRITE); - ok(mem != NULL, "VirtualAllocEx failed: %u\n", GetLastError()); + ok(mem != NULL, "VirtualAllocEx failed: %lu\n", GetLastError()); proc_code = buf + 1024; thread_proc = mem + 1024;
@@ -1478,10 +1479,10 @@ static void test_debugger(const char *argv0) memcpy(proc_code, &loop_code, sizeof(loop_code)); proc_code[0] = OP_BP; /* set a breakpoint */ ret = WriteProcessMemory(pi.hProcess, mem, buf, sizeof(buf), NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void*)thread_proc, NULL, 0, NULL); - ok(thread != NULL, "CreateRemoteThread failed: %u\n", GetLastError()); + ok(thread != NULL, "CreateRemoteThread failed: %lu\n", GetLastError());
expect_event(&ctx, CREATE_THREAD_DEBUG_EVENT); debuggee_thread = get_debuggee_thread(&ctx, ctx.ev.dwThreadId); @@ -1499,7 +1500,7 @@ static void test_debugger(const char *argv0)
byte = 0xc3; /* ret */ ret = WriteProcessMemory(pi.hProcess, thread_proc, &byte, 1, NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
expect_event(&ctx, EXIT_THREAD_DEBUG_EVENT); } @@ -1511,23 +1512,23 @@ static void test_debugger(const char *argv0) memset(buf, OP_BP, sizeof(buf)); memcpy(proc_code, call_debug_service_code, sizeof(call_debug_service_code)); ret = WriteProcessMemory(pi.hProcess, mem, buf, sizeof(buf), NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
/* BREAKPOINT_PRINT */ thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void*)thread_proc, (void*)2, 0, NULL); - ok(thread != NULL, "CreateRemoteThread failed: %u\n", GetLastError()); + ok(thread != NULL, "CreateRemoteThread failed: %lu\n", GetLastError()); expect_event(&ctx, CREATE_THREAD_DEBUG_EVENT); expect_breakpoint_exception(&ctx, NULL); expect_event(&ctx, EXIT_THREAD_DEBUG_EVENT);
/* BREAKPOINT_PROMPT */ thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void*)thread_proc, (void*)1, 0, NULL); - ok(thread != NULL, "CreateRemoteThread failed: %u\n", GetLastError()); + ok(thread != NULL, "CreateRemoteThread failed: %lu\n", GetLastError()); expect_event(&ctx, CREATE_THREAD_DEBUG_EVENT); next_event(&ctx, WAIT_EVENT_TIMEOUT); /* some 32-bit Windows versions report exception to the debugger */ if (sizeof(void *) == 4 && ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT) next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT, "unexpected debug event %u\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT, "unexpected debug event %lu\n", ctx.ev.dwDebugEventCode); } else win_skip("call_debug_service_code not supported on this architecture\n");
@@ -1541,64 +1542,64 @@ static void test_debugger(const char *argv0) memset(buf, OP_BP, sizeof(buf)); memcpy(proc_code, &loop_code, sizeof(loop_code)); ret = WriteProcessMemory(pi.hProcess, mem, buf, sizeof(buf), NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
byte = OP_BP; ret = WriteProcessMemory(pi.hProcess, thread_proc + 1, &byte, 1, NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
thread_a = CreateRemoteThread(pi.hProcess, NULL, 0, (void*)thread_proc, NULL, 0, NULL); - ok(thread_a != NULL, "CreateRemoteThread failed: %u\n", GetLastError()); + ok(thread_a != NULL, "CreateRemoteThread failed: %lu\n", GetLastError()); next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); de_a = ctx.ev;
thread_b = CreateRemoteThread(pi.hProcess, NULL, 0, (void*)thread_proc, NULL, 0, NULL); - ok(thread_b != NULL, "CreateRemoteThread failed: %u\n", GetLastError()); + ok(thread_b != NULL, "CreateRemoteThread failed: %lu\n", GetLastError()); do next_event(&ctx, POLL_EVENT_TIMEOUT); while(ctx.ev.dwDebugEventCode != CREATE_THREAD_DEBUG_EVENT); de_b = ctx.ev;
status = NtSuspendThread(thread_b, NULL); - ok(!status, "NtSuspendThread failed, last error:%u\n", GetLastError()); + ok(!status, "NtSuspendThread failed, last error:%lu\n", GetLastError()); ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_REPLY_LATER); - ok(ret, "ContinueDebugEvent failed, last error:%u\n", GetLastError()); + ok(ret, "ContinueDebugEvent failed, last error:%lu\n", GetLastError());
ctx.ev.dwDebugEventCode = -1; next_event(&ctx, WAIT_EVENT_TIMEOUT); ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, - "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); ok(de_a.dwProcessId == ctx.ev.dwProcessId, - "dwProcessId differs: %x (was %x)\n", ctx.ev.dwProcessId, de_a.dwProcessId); + "dwProcessId differs: %lx (was %lx)\n", ctx.ev.dwProcessId, de_a.dwProcessId); ok(de_a.dwThreadId == ctx.ev.dwThreadId, - "dwThreadId differs: %x (was %x)\n", ctx.ev.dwThreadId, de_a.dwThreadId); + "dwThreadId differs: %lx (was %lx)\n", ctx.ev.dwThreadId, de_a.dwThreadId); de_a = ctx.ev;
byte = 0xc3; /* ret */ ret = WriteProcessMemory(pi.hProcess, thread_proc + 1, &byte, 1, NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
ok(pNtSuspendProcess != NULL, "NtSuspendProcess not found\n"); ok(pNtResumeProcess != NULL, "pNtResumeProcess not found\n"); if (pNtSuspendProcess && pNtResumeProcess) { status = pNtSuspendProcess(pi.hProcess); - ok(!status, "NtSuspendProcess failed, last error:%u\n", GetLastError()); + ok(!status, "NtSuspendProcess failed, last error:%lu\n", GetLastError()); ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_REPLY_LATER); - ok(ret, "ContinueDebugEvent failed, last error:%u\n", GetLastError()); + ok(ret, "ContinueDebugEvent failed, last error:%lu\n", GetLastError()); ok(!WaitForDebugEvent(&ctx.ev, POLL_EVENT_TIMEOUT), "WaitForDebugEvent succeeded.\n");
status = NtResumeThread(thread_b, NULL); - ok(!status, "NtResumeThread failed, last error:%u\n", GetLastError()); + ok(!status, "NtResumeThread failed, last error:%lu\n", GetLastError()); ok(!WaitForDebugEvent(&ctx.ev, POLL_EVENT_TIMEOUT), "WaitForDebugEvent succeeded.\n");
status = pNtResumeProcess(pi.hProcess); - ok(!status, "pNtResumeProcess failed, last error:%u\n", GetLastError()); + ok(!status, "pNtResumeProcess failed, last error:%lu\n", GetLastError()); } else { status = NtResumeThread(thread_b, NULL); - ok(!status, "NtResumeThread failed, last error:%u\n", GetLastError()); + ok(!status, "NtResumeThread failed, last error:%lu\n", GetLastError()); ok(!WaitForDebugEvent(&ctx.ev, POLL_EVENT_TIMEOUT), "WaitForDebugEvent succeeded.\n"); }
@@ -1622,74 +1623,74 @@ static void test_debugger(const char *argv0) if (ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT) { ok(de_a.dwDebugEventCode == ctx.ev.dwDebugEventCode, - "dwDebugEventCode differs: %x (was %x)\n", ctx.ev.dwDebugEventCode, de_a.dwDebugEventCode); + "dwDebugEventCode differs: %lx (was %lx)\n", ctx.ev.dwDebugEventCode, de_a.dwDebugEventCode); ok(de_a.dwProcessId == ctx.ev.dwProcessId, - "dwProcessId differs: %x (was %x)\n", ctx.ev.dwProcessId, de_a.dwProcessId); + "dwProcessId differs: %lx (was %lx)\n", ctx.ev.dwProcessId, de_a.dwProcessId); ok(de_a.dwThreadId == ctx.ev.dwThreadId, - "dwThreadId differs: %x (was %x)\n", ctx.ev.dwThreadId, de_a.dwThreadId); + "dwThreadId differs: %lx (was %lx)\n", ctx.ev.dwThreadId, de_a.dwThreadId);
next_event(&ctx, POLL_EVENT_TIMEOUT); if (ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT) { ok(de_a.dwProcessId == ctx.ev.dwProcessId, - "dwProcessId differs: %x (was %x)\n", ctx.ev.dwProcessId, de_a.dwProcessId); + "dwProcessId differs: %lx (was %lx)\n", ctx.ev.dwProcessId, de_a.dwProcessId); ok(de_a.dwThreadId == ctx.ev.dwThreadId, - "dwThreadId differs: %x (was %x)\n", ctx.ev.dwThreadId, de_a.dwThreadId); + "dwThreadId differs: %lx (was %lx)\n", ctx.ev.dwThreadId, de_a.dwThreadId);
ret = CloseHandle(thread_a); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); thread_a = NULL;
next_event(&ctx, POLL_EVENT_TIMEOUT); }
ok(de_b.dwDebugEventCode == ctx.ev.dwDebugEventCode, - "dwDebugEventCode differs: %x (was %x)\n", ctx.ev.dwDebugEventCode, de_b.dwDebugEventCode); + "dwDebugEventCode differs: %lx (was %lx)\n", ctx.ev.dwDebugEventCode, de_b.dwDebugEventCode); ok(de_b.dwProcessId == ctx.ev.dwProcessId, - "dwProcessId differs: %x (was %x)\n", ctx.ev.dwProcessId, de_b.dwProcessId); + "dwProcessId differs: %lx (was %lx)\n", ctx.ev.dwProcessId, de_b.dwProcessId); ok(de_b.dwThreadId == ctx.ev.dwThreadId, - "dwThreadId differs: %x (was %x)\n", ctx.ev.dwThreadId, de_b.dwThreadId); + "dwThreadId differs: %lx (was %lx)\n", ctx.ev.dwThreadId, de_b.dwThreadId); } else { ok(de_b.dwDebugEventCode == ctx.ev.dwDebugEventCode, - "dwDebugEventCode differs: %x (was %x)\n", ctx.ev.dwDebugEventCode, de_b.dwDebugEventCode); + "dwDebugEventCode differs: %lx (was %lx)\n", ctx.ev.dwDebugEventCode, de_b.dwDebugEventCode); ok(de_b.dwProcessId == ctx.ev.dwProcessId, - "dwProcessId differs: %x (was %x)\n", ctx.ev.dwProcessId, de_b.dwProcessId); + "dwProcessId differs: %lx (was %lx)\n", ctx.ev.dwProcessId, de_b.dwProcessId); ok(de_b.dwThreadId == ctx.ev.dwThreadId, - "dwThreadId differs: %x (was %x)\n", ctx.ev.dwThreadId, de_b.dwThreadId); + "dwThreadId differs: %lx (was %lx)\n", ctx.ev.dwThreadId, de_b.dwThreadId);
next_event(&ctx, POLL_EVENT_TIMEOUT); if (ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT) { ok(de_b.dwProcessId == ctx.ev.dwProcessId, - "dwProcessId differs: %x (was %x)\n", ctx.ev.dwProcessId, de_b.dwProcessId); + "dwProcessId differs: %lx (was %lx)\n", ctx.ev.dwProcessId, de_b.dwProcessId); ok(de_b.dwThreadId == ctx.ev.dwThreadId, - "dwThreadId differs: %x (was %x)\n", ctx.ev.dwThreadId, de_b.dwThreadId); + "dwThreadId differs: %lx (was %lx)\n", ctx.ev.dwThreadId, de_b.dwThreadId);
ret = CloseHandle(thread_b); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); thread_b = NULL;
next_event(&ctx, POLL_EVENT_TIMEOUT); }
ok(de_a.dwDebugEventCode == ctx.ev.dwDebugEventCode, - "dwDebugEventCode differs: %x (was %x)\n", ctx.ev.dwDebugEventCode, de_a.dwDebugEventCode); + "dwDebugEventCode differs: %lx (was %lx)\n", ctx.ev.dwDebugEventCode, de_a.dwDebugEventCode); ok(de_a.dwProcessId == ctx.ev.dwProcessId, - "dwProcessId differs: %x (was %x)\n", ctx.ev.dwProcessId, de_a.dwProcessId); + "dwProcessId differs: %lx (was %lx)\n", ctx.ev.dwProcessId, de_a.dwProcessId); ok(de_a.dwThreadId == ctx.ev.dwThreadId, - "dwThreadId differs: %x (was %x)\n", ctx.ev.dwThreadId, de_a.dwThreadId); + "dwThreadId differs: %lx (was %lx)\n", ctx.ev.dwThreadId, de_a.dwThreadId); }
if (thread_a) { next_event(&ctx, POLL_EVENT_TIMEOUT); ok(ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT, - "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode);
ret = CloseHandle(thread_a); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); }
@@ -1697,10 +1698,10 @@ static void test_debugger(const char *argv0) { next_event(&ctx, POLL_EVENT_TIMEOUT); ok(ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT, - "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode);
ret = CloseHandle(thread_b); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); } }
@@ -1711,7 +1712,7 @@ static void test_debugger(const char *argv0) memset(buf, OP_BP, sizeof(buf)); memcpy(proc_code, &loop_code, sizeof(loop_code)); ret = WriteProcessMemory(pi.hProcess, mem, buf, sizeof(buf), NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
ctx.thread_tag = 1;
@@ -1719,18 +1720,18 @@ static void test_debugger(const char *argv0) for (i = 0; i < worker_cnt; i++) { thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void*)thread_proc, NULL, 0, NULL); - ok(thread != NULL, "CreateRemoteThread failed: %u\n", GetLastError()); + ok(thread != NULL, "CreateRemoteThread failed: %lu\n", GetLastError());
next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode);
ret = CloseHandle(thread); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); }
byte = OP_BP; ret = WriteProcessMemory(pi.hProcess, thread_proc + 1, &byte, 1, NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
expect_breakpoint_exception(&ctx, thread_proc + 1); exception_cnt = 1; @@ -1740,7 +1741,7 @@ static void test_debugger(const char *argv0)
byte = 0xc3; /* ret */ ret = WriteProcessMemory(pi.hProcess, thread_proc + 1, &byte, 1, NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
for (;;) { @@ -1748,12 +1749,12 @@ static void test_debugger(const char *argv0)
/* even when there are more pending events, they are not reported until current event is continued */ ret = WaitForDebugEvent(&ev, 10); - ok(GetLastError() == ERROR_SEM_TIMEOUT, "WaitForDebugEvent returned %x(%u)\n", ret, GetLastError()); + ok(GetLastError() == ERROR_SEM_TIMEOUT, "WaitForDebugEvent returned %x(%lu)\n", ret, GetLastError());
next_event(&ctx, POLL_EVENT_TIMEOUT); if (ctx.ev.dwDebugEventCode != EXCEPTION_DEBUG_EVENT) break; - trace("exception at %p in thread %04x\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress, ctx.ev.dwThreadId); - ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %x\n", + trace("exception at %p in thread %04lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress, ctx.ev.dwThreadId); + ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionCode); ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress == thread_proc + 1, "ExceptionAddress = %p\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress); @@ -1775,7 +1776,7 @@ static void test_debugger(const char *argv0) { ok(ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT || broken(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT), /* sometimes happens on vista */ - "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); + "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); if (ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT && !--worker_cnt) break; next_event(&ctx, WAIT_EVENT_TIMEOUT); } @@ -1792,7 +1793,7 @@ static void test_debugger(const char *argv0)
fetch_thread_context(ctx.main_thread); ret = ReadProcessMemory(pi.hProcess, get_ip(&ctx.main_thread->ctx), &instr, 1, NULL); - ok(ret, "ReadProcessMemory failed: %u\n", GetLastError()); + ok(ret, "ReadProcessMemory failed: %lu\n", GetLastError());
orig_context = ctx.main_thread->ctx; ip = get_ip(&ctx.main_thread->ctx); @@ -1825,36 +1826,36 @@ static void test_debugger(const char *argv0) fetch_thread_context(ctx.main_thread); #if defined(__i386__) /* win2k8 do not preserve eax, rcx and edx; newer versions do */ - ok(ctx.main_thread->ctx.Ebx == 102, "Ebx = %x\n", ctx.main_thread->ctx.Ebx); - ok(ctx.main_thread->ctx.Esi == 105, "Esi = %x\n", ctx.main_thread->ctx.Esi); - ok(ctx.main_thread->ctx.Edi == 106, "Edi = %x\n", ctx.main_thread->ctx.Edi); + ok(ctx.main_thread->ctx.Ebx == 102, "Ebx = %lx\n", ctx.main_thread->ctx.Ebx); + ok(ctx.main_thread->ctx.Esi == 105, "Esi = %lx\n", ctx.main_thread->ctx.Esi); + ok(ctx.main_thread->ctx.Edi == 106, "Edi = %lx\n", ctx.main_thread->ctx.Edi); #elif defined(__x86_64__) - ok(ctx.main_thread->ctx.Rax == 101, "Rax = %x\n", ctx.main_thread->ctx.Rax); - ok(ctx.main_thread->ctx.Rbx == 102, "Rbx = %x\n", ctx.main_thread->ctx.Rbx); - ok(ctx.main_thread->ctx.Rcx == 103, "Rcx = %x\n", ctx.main_thread->ctx.Rcx); - ok(ctx.main_thread->ctx.Rdx == 104, "Rdx = %x\n", ctx.main_thread->ctx.Rdx); - ok(ctx.main_thread->ctx.Rsi == 105, "Rsi = %x\n", ctx.main_thread->ctx.Rsi); - ok(ctx.main_thread->ctx.Rdi == 106, "Rdi = %x\n", ctx.main_thread->ctx.Rdi); - ok(ctx.main_thread->ctx.R8 == 107, "R8 = %x\n", ctx.main_thread->ctx.R8); - ok(ctx.main_thread->ctx.R9 == 108, "R9 = %x\n", ctx.main_thread->ctx.R9); - ok(ctx.main_thread->ctx.R10 == 109, "R10 = %x\n", ctx.main_thread->ctx.R10); - ok(ctx.main_thread->ctx.R11 == 110, "R11 = %x\n", ctx.main_thread->ctx.R11); - ok(ctx.main_thread->ctx.R12 == 111, "R12 = %x\n", ctx.main_thread->ctx.R12); - ok(ctx.main_thread->ctx.R13 == 112, "R13 = %x\n", ctx.main_thread->ctx.R13); - ok(ctx.main_thread->ctx.R14 == 113, "R14 = %x\n", ctx.main_thread->ctx.R14); - ok(ctx.main_thread->ctx.R15 == 114, "R15 = %x\n", ctx.main_thread->ctx.R15); + ok(ctx.main_thread->ctx.Rax == 101, "Rax = %llx\n", ctx.main_thread->ctx.Rax); + ok(ctx.main_thread->ctx.Rbx == 102, "Rbx = %llx\n", ctx.main_thread->ctx.Rbx); + ok(ctx.main_thread->ctx.Rcx == 103, "Rcx = %llx\n", ctx.main_thread->ctx.Rcx); + ok(ctx.main_thread->ctx.Rdx == 104, "Rdx = %llx\n", ctx.main_thread->ctx.Rdx); + ok(ctx.main_thread->ctx.Rsi == 105, "Rsi = %llx\n", ctx.main_thread->ctx.Rsi); + ok(ctx.main_thread->ctx.Rdi == 106, "Rdi = %llx\n", ctx.main_thread->ctx.Rdi); + ok(ctx.main_thread->ctx.R8 == 107, "R8 = %llx\n", ctx.main_thread->ctx.R8); + ok(ctx.main_thread->ctx.R9 == 108, "R9 = %llx\n", ctx.main_thread->ctx.R9); + ok(ctx.main_thread->ctx.R10 == 109, "R10 = %llx\n", ctx.main_thread->ctx.R10); + ok(ctx.main_thread->ctx.R11 == 110, "R11 = %llx\n", ctx.main_thread->ctx.R11); + ok(ctx.main_thread->ctx.R12 == 111, "R12 = %llx\n", ctx.main_thread->ctx.R12); + ok(ctx.main_thread->ctx.R13 == 112, "R13 = %llx\n", ctx.main_thread->ctx.R13); + ok(ctx.main_thread->ctx.R14 == 113, "R14 = %llx\n", ctx.main_thread->ctx.R14); + ok(ctx.main_thread->ctx.R15 == 114, "R15 = %llx\n", ctx.main_thread->ctx.R15); #endif
byte = OP_BP; ret = WriteProcessMemory(pi.hProcess, ip, &byte, 1, NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
SetEvent(event); ResumeThread(ctx.main_thread->handle);
next_event(&ctx, 2000); - ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); - ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %x\n", + ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionCode); ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress == ip, "ExceptionAddress = %p\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress); @@ -1863,27 +1864,27 @@ static void test_debugger(const char *argv0) ok(get_ip(&ctx.main_thread->ctx) == ip + 1, "unexpected instruction pointer %p\n", get_ip(&ctx.main_thread->ctx));
#if defined(__i386__) - ok(ctx.main_thread->ctx.Eax == 0, "Eax = %x\n", ctx.main_thread->ctx.Eax); - ok(ctx.main_thread->ctx.Ebx == 102, "Ebx = %x\n", ctx.main_thread->ctx.Ebx); - ok(ctx.main_thread->ctx.Ecx != 103, "Ecx = %x\n", ctx.main_thread->ctx.Ecx); - ok(ctx.main_thread->ctx.Edx != 104, "Edx = %x\n", ctx.main_thread->ctx.Edx); - ok(ctx.main_thread->ctx.Esi == 105, "Esi = %x\n", ctx.main_thread->ctx.Esi); - ok(ctx.main_thread->ctx.Edi == 106, "Edi = %x\n", ctx.main_thread->ctx.Edi); + ok(ctx.main_thread->ctx.Eax == 0, "Eax = %lx\n", ctx.main_thread->ctx.Eax); + ok(ctx.main_thread->ctx.Ebx == 102, "Ebx = %lx\n", ctx.main_thread->ctx.Ebx); + ok(ctx.main_thread->ctx.Ecx != 103, "Ecx = %lx\n", ctx.main_thread->ctx.Ecx); + ok(ctx.main_thread->ctx.Edx != 104, "Edx = %lx\n", ctx.main_thread->ctx.Edx); + ok(ctx.main_thread->ctx.Esi == 105, "Esi = %lx\n", ctx.main_thread->ctx.Esi); + ok(ctx.main_thread->ctx.Edi == 106, "Edi = %lx\n", ctx.main_thread->ctx.Edi); #elif defined(__x86_64__) - ok(ctx.main_thread->ctx.Rax == 0, "Rax = %x\n", ctx.main_thread->ctx.Rax); - ok(ctx.main_thread->ctx.Rbx == 102, "Rbx = %x\n", ctx.main_thread->ctx.Rbx); - ok(ctx.main_thread->ctx.Rcx != 103, "Rcx = %x\n", ctx.main_thread->ctx.Rcx); - ok(ctx.main_thread->ctx.Rdx != 104, "Rdx = %x\n", ctx.main_thread->ctx.Rdx); - ok(ctx.main_thread->ctx.Rsi == 105, "Rsi = %x\n", ctx.main_thread->ctx.Rsi); - ok(ctx.main_thread->ctx.Rdi == 106, "Rdi = %x\n", ctx.main_thread->ctx.Rdi); - ok(ctx.main_thread->ctx.R8 != 107, "R8 = %x\n", ctx.main_thread->ctx.R8); - ok(ctx.main_thread->ctx.R9 != 108, "R9 = %x\n", ctx.main_thread->ctx.R9); - ok(ctx.main_thread->ctx.R10 != 109, "R10 = %x\n", ctx.main_thread->ctx.R10); - ok(ctx.main_thread->ctx.R11 != 110, "R11 = %x\n", ctx.main_thread->ctx.R11); - ok(ctx.main_thread->ctx.R12 == 111, "R12 = %x\n", ctx.main_thread->ctx.R12); - ok(ctx.main_thread->ctx.R13 == 112, "R13 = %x\n", ctx.main_thread->ctx.R13); - ok(ctx.main_thread->ctx.R14 == 113, "R14 = %x\n", ctx.main_thread->ctx.R14); - ok(ctx.main_thread->ctx.R15 == 114, "R15 = %x\n", ctx.main_thread->ctx.R15); + ok(ctx.main_thread->ctx.Rax == 0, "Rax = %llx\n", ctx.main_thread->ctx.Rax); + ok(ctx.main_thread->ctx.Rbx == 102, "Rbx = %llx\n", ctx.main_thread->ctx.Rbx); + ok(ctx.main_thread->ctx.Rcx != 103, "Rcx = %llx\n", ctx.main_thread->ctx.Rcx); + ok(ctx.main_thread->ctx.Rdx != 104, "Rdx = %llx\n", ctx.main_thread->ctx.Rdx); + ok(ctx.main_thread->ctx.Rsi == 105, "Rsi = %llx\n", ctx.main_thread->ctx.Rsi); + ok(ctx.main_thread->ctx.Rdi == 106, "Rdi = %llx\n", ctx.main_thread->ctx.Rdi); + ok(ctx.main_thread->ctx.R8 != 107, "R8 = %llx\n", ctx.main_thread->ctx.R8); + ok(ctx.main_thread->ctx.R9 != 108, "R9 = %llx\n", ctx.main_thread->ctx.R9); + ok(ctx.main_thread->ctx.R10 != 109, "R10 = %llx\n", ctx.main_thread->ctx.R10); + ok(ctx.main_thread->ctx.R11 != 110, "R11 = %llx\n", ctx.main_thread->ctx.R11); + ok(ctx.main_thread->ctx.R12 == 111, "R12 = %llx\n", ctx.main_thread->ctx.R12); + ok(ctx.main_thread->ctx.R13 == 112, "R13 = %llx\n", ctx.main_thread->ctx.R13); + ok(ctx.main_thread->ctx.R14 == 113, "R14 = %llx\n", ctx.main_thread->ctx.R14); + ok(ctx.main_thread->ctx.R15 == 114, "R15 = %llx\n", ctx.main_thread->ctx.R15); #endif
ctx.main_thread->ctx = orig_context; @@ -1891,11 +1892,11 @@ static void test_debugger(const char *argv0) set_thread_context(&ctx, ctx.main_thread);
ret = WriteProcessMemory(pi.hProcess, ip, &instr, 1, NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
memset(buf + 10, 0x90, 10); /* nop */ ret = WriteProcessMemory(pi.hProcess, mem + 10, buf + 10, 10, NULL); - ok(ret, "WriteProcessMemory failed: %u\n", GetLastError()); + ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError());
next_event(&ctx, POLL_EVENT_TIMEOUT);
@@ -1918,8 +1919,8 @@ static void test_debugger(const char *argv0) next_event(&ctx, WAIT_EVENT_TIMEOUT); if (sizeof(void*) != 4 || ctx.ev.u.Exception.ExceptionRecord.ExceptionCode != EXCEPTION_BREAKPOINT) { - ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %d\n", ctx.ev.dwDebugEventCode); - ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_SINGLE_STEP, "ExceptionCode = %x\n", + ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_SINGLE_STEP, "ExceptionCode = %lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionCode); ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress == mem + 10 || ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress == mem + 11, @@ -1946,11 +1947,11 @@ static void test_debugger(const char *argv0) while (ctx.ev.dwDebugEventCode != EXIT_PROCESS_DEBUG_EVENT);
ret = CloseHandle(event); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); ret = CloseHandle(pi.hThread); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); ret = CloseHandle(pi.hProcess); - ok(ret, "CloseHandle failed, last error %d.\n", GetLastError()); + ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); }
static DWORD run_child_wait( char *cmd, HANDLE event ) @@ -1961,14 +1962,14 @@ static DWORD run_child_wait( char *cmd, HANDLE event ) DWORD exit_code;
ret = CreateProcessA(NULL, cmd, NULL, NULL, TRUE, DEBUG_PROCESS, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); + ok(ret, "CreateProcess failed, last error %#lx.\n", GetLastError()); Sleep(200); CloseHandle( pDbgUiGetThreadDebugObject() ); pDbgUiSetThreadDebugObject( 0 ); SetEvent( event ); WaitForSingleObject( pi.hProcess, 1000 ); ret = GetExitCodeProcess( pi.hProcess, &exit_code ); - ok( ret, "GetExitCodeProcess failed err=%d\n", GetLastError()); + ok( ret, "GetExitCodeProcess failed err=%ld\n", GetLastError()); CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); return exit_code; @@ -1986,11 +1987,11 @@ static DWORD WINAPI debug_and_exit(void *arg) BOOL ret;
ret = CreateProcessA(NULL, cmd, NULL, NULL, TRUE, DEBUG_PROCESS, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); + ok(ret, "CreateProcess failed, last error %#lx.\n", GetLastError()); debug = pDbgUiGetThreadDebugObject(); status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); - ok( !status, "NtSetInformationDebugObject failed %x\n", status ); + ok( !status, "NtSetInformationDebugObject failed %lx\n", status ); *(HANDLE *)arg = debug; Sleep(200); ExitThread(0); @@ -2006,11 +2007,11 @@ static DWORD WINAPI debug_and_wait(void *arg)
pDbgUiSetThreadDebugObject( debug ); ret = CreateProcessA(NULL, cmd, NULL, NULL, TRUE, DEBUG_PROCESS, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed, last error %#x.\n", GetLastError()); + ok(ret, "CreateProcess failed, last error %#lx.\n", GetLastError()); debug = pDbgUiGetThreadDebugObject(); status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); - ok( !status, "NtSetInformationDebugObject failed %x\n", status ); + ok( !status, "NtSetInformationDebugObject failed %lx\n", status ); Sleep(INFINITE); ExitThread(0); } @@ -2020,7 +2021,7 @@ static DWORD WINAPI create_debug_port(void *arg) STARTUPINFOA si = { sizeof(si) }; NTSTATUS status = pDbgUiConnectToDbg();
- ok( !status, "DbgUiConnectToDbg failed %x\n", status ); + ok( !status, "DbgUiConnectToDbg failed %lx\n", status ); *(HANDLE *)arg = pDbgUiGetThreadDebugObject(); Sleep( INFINITE ); ExitThread(0); @@ -2037,50 +2038,50 @@ static void test_kill_on_exit(const char *argv0) ULONG val;
event = CreateEventW(&sa, FALSE, FALSE, NULL); - ok(event != NULL, "CreateEvent failed: %u\n", GetLastError()); + ok(event != NULL, "CreateEvent failed: %lu\n", GetLastError());
cmd = heap_alloc(strlen(argv0) + strlen(arguments) + 16); - sprintf(cmd, "%s%s%x\n", argv0, arguments, (DWORD)(DWORD_PTR)event); + sprintf(cmd, "%s%s%lx\n", argv0, arguments, (DWORD)(DWORD_PTR)event);
status = pNtCreateDebugObject( &debug, DEBUG_ALL_ACCESS, &attr, 0 ); - ok( !status, "NtCreateDebugObject failed %x\n", status ); + ok( !status, "NtCreateDebugObject failed %lx\n", status ); pDbgUiSetThreadDebugObject( debug ); exit_code = run_child_wait( cmd, event ); - ok( exit_code == 0, "exit code = %08x\n", exit_code); + ok( exit_code == 0, "exit code = %08lx\n", exit_code);
status = pNtCreateDebugObject( &debug, DEBUG_ALL_ACCESS, &attr, DEBUG_KILL_ON_CLOSE ); - ok( !status, "NtCreateDebugObject failed %x\n", status ); + ok( !status, "NtCreateDebugObject failed %lx\n", status ); pDbgUiSetThreadDebugObject( debug ); exit_code = run_child_wait( cmd, event ); - ok( exit_code == STATUS_DEBUGGER_INACTIVE, "exit code = %08x\n", exit_code); + ok( exit_code == STATUS_DEBUGGER_INACTIVE, "exit code = %08lx\n", exit_code);
status = pNtCreateDebugObject( &debug, DEBUG_ALL_ACCESS, &attr, 0xfffe ); - ok( status == STATUS_INVALID_PARAMETER, "NtCreateDebugObject failed %x\n", status ); + ok( status == STATUS_INVALID_PARAMETER, "NtCreateDebugObject failed %lx\n", status );
status = pNtCreateDebugObject( &debug, DEBUG_ALL_ACCESS, &attr, 0 ); - ok( !status, "NtCreateDebugObject failed %x\n", status ); + ok( !status, "NtCreateDebugObject failed %lx\n", status ); pDbgUiSetThreadDebugObject( debug ); val = DEBUG_KILL_ON_CLOSE; status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); - ok( !status, "NtSetInformationDebugObject failed %x\n", status ); + ok( !status, "NtSetInformationDebugObject failed %lx\n", status ); exit_code = run_child_wait( cmd, event ); - ok( exit_code == STATUS_DEBUGGER_INACTIVE, "exit code = %08x\n", exit_code); + ok( exit_code == STATUS_DEBUGGER_INACTIVE, "exit code = %08lx\n", exit_code);
status = pNtCreateDebugObject( &debug, DEBUG_ALL_ACCESS, &attr, DEBUG_KILL_ON_CLOSE ); - ok( !status, "NtCreateDebugObject failed %x\n", status ); + ok( !status, "NtCreateDebugObject failed %lx\n", status ); pDbgUiSetThreadDebugObject( debug ); val = 0; status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); - ok( !status, "NtSetInformationDebugObject failed %x\n", status ); + ok( !status, "NtSetInformationDebugObject failed %lx\n", status ); exit_code = run_child_wait( cmd, event ); - ok( exit_code == 0, "exit code = %08x\n", exit_code); + ok( exit_code == 0, "exit code = %08lx\n", exit_code);
status = pDbgUiConnectToDbg(); - ok( !status, "DbgUiConnectToDbg failed %x\n", status ); + ok( !status, "DbgUiConnectToDbg failed %lx\n", status ); exit_code = run_child_wait( cmd, event ); - ok( exit_code == STATUS_DEBUGGER_INACTIVE, "exit code = %08x\n", exit_code); + ok( exit_code == STATUS_DEBUGGER_INACTIVE, "exit code = %08lx\n", exit_code);
/* test that threads close the debug port on exit */ thread = CreateThread(NULL, 0, debug_and_exit, &debug, 0, &tid); @@ -2090,41 +2091,41 @@ static void test_kill_on_exit(const char *argv0) status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); ok( status == STATUS_INVALID_HANDLE || broken(status == STATUS_SUCCESS), /* wow64 */ - "NtSetInformationDebugObject failed %x\n", status ); + "NtSetInformationDebugObject failed %lx\n", status ); SetEvent( event ); if (!status) { WaitForSingleObject( pi.hProcess, 100 ); GetExitCodeProcess( pi.hProcess, &exit_code ); - ok( exit_code == STILL_ACTIVE, "exit code = %08x\n", exit_code); + ok( exit_code == STILL_ACTIVE, "exit code = %08lx\n", exit_code); CloseHandle( debug ); } WaitForSingleObject( pi.hProcess, 1000 ); GetExitCodeProcess( pi.hProcess, &exit_code ); - ok( exit_code == 0, "exit code = %08x\n", exit_code); + ok( exit_code == 0, "exit code = %08lx\n", exit_code); CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); CloseHandle( thread );
/* but not on forced exit */ status = pNtCreateDebugObject( &debug, DEBUG_ALL_ACCESS, &attr, DEBUG_KILL_ON_CLOSE ); - ok( !status, "NtCreateDebugObject failed %x\n", status ); + ok( !status, "NtCreateDebugObject failed %lx\n", status ); thread = CreateThread(NULL, 0, debug_and_wait, &debug, 0, &tid); Sleep( 100 ); ok( debug != 0, "no debug port\n" ); val = 1; status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); - ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %x\n", status ); + ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %lx\n", status ); TerminateThread( thread, 0 ); status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); - ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %x\n", status ); + ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %lx\n", status ); WaitForSingleObject( pi.hProcess, 300 ); GetExitCodeProcess( pi.hProcess, &exit_code ); todo_wine ok( exit_code == STATUS_DEBUGGER_INACTIVE || broken(exit_code == STILL_ACTIVE), /* wow64 */ - "exit code = %08x\n", exit_code); + "exit code = %08lx\n", exit_code); CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); CloseHandle( thread ); @@ -2137,11 +2138,11 @@ static void test_kill_on_exit(const char *argv0) val = 0; status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); - ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %x\n", status ); + ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %lx\n", status ); TerminateThread( thread, 0 ); status = pNtSetInformationDebugObject( debug, DebugObjectKillProcessOnExitInformation, &val, sizeof(val), NULL ); - ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %x\n", status ); + ok( status == STATUS_SUCCESS, "NtSetInformationDebugObject failed %lx\n", status ); CloseHandle( debug ); CloseHandle( thread );
@@ -2191,7 +2192,7 @@ START_TEST(debugger) else if (myARGC >= 4 && !strcmp(myARGV[2], "wait")) { DWORD event, cnt = 1; - sscanf(myARGV[3], "%x", &event); + sscanf(myARGV[3], "%lx", &event); if (myARGC >= 5) cnt = atoi(myARGV[4]); wait_debugger((HANDLE)(DWORD_PTR)event, cnt); }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/environ.c | 213 +++++++++++++++++++++-------------------- 1 file changed, 107 insertions(+), 106 deletions(-)
diff --git a/dlls/kernel32/tests/environ.c b/dlls/kernel32/tests/environ.c index d19b8700c5f..9334ef8add6 100644 --- a/dlls/kernel32/tests/environ.c +++ b/dlls/kernel32/tests/environ.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 <stdarg.h>
@@ -68,15 +69,15 @@ static void test_Predefined(void) return; } NoErr = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token); - ok(NoErr, "Failed to open token, error %u\n", GetLastError()); + ok(NoErr, "Failed to open token, error %lu\n", GetLastError()); DataSize = sizeof(Data); NoErr = pGetUserProfileDirectoryA(Token, Data, &DataSize); - ok(NoErr, "Failed to get user profile dir, error %u\n", GetLastError()); + ok(NoErr, "Failed to get user profile dir, error %lu\n", GetLastError()); if (NoErr) { EnvSize = GetEnvironmentVariableA("USERPROFILE", Env, sizeof(Env)); ok(EnvSize != 0 && EnvSize <= sizeof(Env), - "Failed to retrieve environment variable USERPROFILE, error %u\n", + "Failed to retrieve environment variable USERPROFILE, error %lu\n", GetLastError()); ok(strcmp(Data, Env) == 0, "USERPROFILE env var %s doesn't match GetUserProfileDirectory %s\n", @@ -85,7 +86,7 @@ static void test_Predefined(void) else skip("Skipping USERPROFILE check, can't get user profile dir\n"); NoErr = CloseHandle(Token); - ok(NoErr, "Failed to close token, error %u\n", GetLastError()); + ok(NoErr, "Failed to close token, error %lu\n", GetLastError()); }
static void test_GetSetEnvironmentVariableA(void) @@ -99,34 +100,34 @@ static void test_GetSetEnvironmentVariableA(void)
ret = SetEnvironmentVariableA(name, value); ok(ret == TRUE, - "unexpected error in SetEnvironmentVariableA, GetLastError=%d\n", + "unexpected error in SetEnvironmentVariableA, GetLastError=%ld\n", GetLastError());
/* Try to retrieve the environment variable we just set */ SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableA(name, NULL, 0); ok(ret_size == strlen(value) + 1, - "should return length with terminating 0 ret_size=%d\n", ret_size); + "should return length with terminating 0 ret_size=%ld\n", ret_size); ok(GetLastError() == 0xdeadbeef, - "should not fail with zero size but GetLastError=%d\n", GetLastError()); + "should not fail with zero size but GetLastError=%ld\n", GetLastError());
lstrcpyA(buf, "foo"); ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value)); ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n"); ok(ret_size == strlen(value) + 1, - "should return length with terminating 0 ret_size=%d\n", ret_size); + "should return length with terminating 0 ret_size=%ld\n", ret_size);
lstrcpyA(buf, "foo"); ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1); ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n"); ok(ret_size == strlen(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); + "should return length without terminating 0 ret_size=%ld\n", ret_size);
lstrcpyA(buf, "foo"); ret_size = GetEnvironmentVariableA(name_cased, buf, lstrlenA(value) + 1); ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n"); ok(ret_size == strlen(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); + "should return length without terminating 0 ret_size=%ld\n", ret_size);
/* Remove that environment variable */ ret = SetEnvironmentVariableA(name_cased, NULL); @@ -137,24 +138,24 @@ static void test_GetSetEnvironmentVariableA(void) ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1); ok(lstrcmpA(buf, "foo") == 0, "should not touch the buffer\n"); ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", + "should not find variable but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError());
/* Check behavior of SetEnvironmentVariableA(name, "") */ ret = SetEnvironmentVariableA(name, value); ok(ret == TRUE, - "unexpected error in SetEnvironmentVariableA, GetLastError=%d\n", + "unexpected error in SetEnvironmentVariableA, GetLastError=%ld\n", GetLastError());
lstrcpyA(buf, "foo"); ret_size = GetEnvironmentVariableA(name_cased, buf, lstrlenA(value) + 1); ok(lstrcmpA(buf, value) == 0, "should touch the buffer\n"); ok(ret_size == strlen(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); + "should return length without terminating 0 ret_size=%ld\n", ret_size);
ret = SetEnvironmentVariableA(name_cased, ""); ok(ret == TRUE, - "should not fail with empty value but GetLastError=%d\n", GetLastError()); + "should not fail with empty value but GetLastError=%ld\n", GetLastError());
lstrcpyA(buf, "foo"); SetLastError(0xdeadbeef); @@ -162,36 +163,36 @@ static void test_GetSetEnvironmentVariableA(void) ok(ret_size == 0 && ((GetLastError() == 0xdeadbeef && lstrcmpA(buf, "") == 0) || (GetLastError() == ERROR_ENVVAR_NOT_FOUND)), - "%s should be set to "" (NT) or removed (Win9x) but ret_size=%d GetLastError=%d and buf=%s\n", + "%s should be set to "" (NT) or removed (Win9x) but ret_size=%ld GetLastError=%ld and buf=%s\n", name, ret_size, GetLastError(), buf);
SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableA(name, NULL, 0); ok(ret_size == 1 || broken(ret_size == 0), /* XP */ - "should return 1 for empty string but ret_size=%d GetLastError=%d\n", + "should return 1 for empty string but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError()); ok(GetLastError() == 0xdeadbeef || broken(GetLastError() == ERROR_MORE_DATA), /* XP */ - "should not fail with zero size but GetLastError=%d\n", GetLastError()); + "should not fail with zero size but GetLastError=%ld\n", GetLastError());
/* Test the limits */ SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableA(NULL, NULL, 0); ok(ret_size == 0 && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND), - "should not find variable but ret_size=%d GetLastError=%d\n", + "should not find variable but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError());
SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableA(NULL, buf, lstrlenA(value) + 1); ok(ret_size == 0 && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND), - "should not find variable but ret_size=%d GetLastError=%d\n", + "should not find variable but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError());
SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableA("", buf, lstrlenA(value) + 1); ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", + "should not find variable but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError()); }
@@ -214,17 +215,17 @@ static void test_GetSetEnvironmentVariableW(void) return; } ok(ret == TRUE, - "unexpected error in SetEnvironmentVariableW, GetLastError=%d\n", + "unexpected error in SetEnvironmentVariableW, GetLastError=%ld\n", GetLastError());
/* Try to retrieve the environment variable we just set */ SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableW(name, NULL, 0); ok(ret_size == lstrlenW(value) + 1, - "should return length with terminating 0 ret_size=%d\n", + "should return length with terminating 0 ret_size=%ld\n", ret_size); ok(GetLastError() == 0xdeadbeef, - "should not fail with zero size but GetLastError=%d\n", GetLastError()); + "should not fail with zero size but GetLastError=%ld\n", GetLastError());
lstrcpyW(buf, fooW); ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value)); @@ -233,19 +234,19 @@ static void test_GetSetEnvironmentVariableW(void) "Expected untouched or empty buffer, got "%s"\n", buf);
ok(ret_size == lstrlenW(value) + 1, - "should return length with terminating 0 ret_size=%d\n", ret_size); + "should return length with terminating 0 ret_size=%ld\n", ret_size);
lstrcpyW(buf, fooW); ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1); ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n"); ok(ret_size == lstrlenW(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); + "should return length without terminating 0 ret_size=%ld\n", ret_size);
lstrcpyW(buf, fooW); ret_size = GetEnvironmentVariableW(name_cased, buf, lstrlenW(value) + 1); ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n"); ok(ret_size == lstrlenW(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); + "should return length without terminating 0 ret_size=%ld\n", ret_size);
/* Remove that environment variable */ ret = SetEnvironmentVariableW(name_cased, NULL); @@ -256,23 +257,23 @@ static void test_GetSetEnvironmentVariableW(void) ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1); ok(lstrcmpW(buf, fooW) == 0, "should not touch the buffer\n"); ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", + "should not find variable but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError());
/* Check behavior of SetEnvironmentVariableW(name, "") */ ret = SetEnvironmentVariableW(name, value); ok(ret == TRUE, - "unexpected error in SetEnvironmentVariableW, GetLastError=%d\n", + "unexpected error in SetEnvironmentVariableW, GetLastError=%ld\n", GetLastError());
lstrcpyW(buf, fooW); ret_size = GetEnvironmentVariableW(name, buf, lstrlenW(value) + 1); ok(lstrcmpW(buf, value) == 0, "should touch the buffer\n"); ok(ret_size == lstrlenW(value), - "should return length without terminating 0 ret_size=%d\n", ret_size); + "should return length without terminating 0 ret_size=%ld\n", ret_size);
ret = SetEnvironmentVariableW(name_cased, empty_strW); - ok(ret == TRUE, "should not fail with empty value but GetLastError=%d\n", GetLastError()); + ok(ret == TRUE, "should not fail with empty value but GetLastError=%ld\n", GetLastError());
lstrcpyW(buf, fooW); SetLastError(0xdeadbeef); @@ -280,7 +281,7 @@ static void test_GetSetEnvironmentVariableW(void) ok(ret_size == 0 && ((GetLastError() == 0xdeadbeef && lstrcmpW(buf, empty_strW) == 0) || (GetLastError() == ERROR_ENVVAR_NOT_FOUND)), - "should be set to "" (NT) or removed (Win9x) but ret_size=%d GetLastError=%d\n", + "should be set to "" (NT) or removed (Win9x) but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError()); ok(lstrcmpW(buf, empty_strW) == 0, "should copy an empty string\n");
@@ -288,17 +289,17 @@ static void test_GetSetEnvironmentVariableW(void) ret_size = GetEnvironmentVariableW(name, NULL, 0); ok(ret_size == 1 || broken(ret_size == 0), /* XP */ - "should return 1 for empty string but ret_size=%d GetLastError=%d\n", + "should return 1 for empty string but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError()); ok(GetLastError() == 0xdeadbeef || broken(GetLastError() == ERROR_MORE_DATA), /* XP */ - "should not fail with zero size but GetLastError=%d\n", GetLastError()); + "should not fail with zero size but GetLastError=%ld\n", GetLastError());
/* Test the limits */ SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableW(NULL, NULL, 0); ok(ret_size == 0 && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND), - "should not find variable but ret_size=%d GetLastError=%d\n", + "should not find variable but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError());
if (0) /* Both tests crash on Vista */ @@ -306,13 +307,13 @@ static void test_GetSetEnvironmentVariableW(void) SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableW(NULL, buf, lstrlenW(value) + 1); ok(ret_size == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND, - "should not find variable but ret_size=%d GetLastError=%d\n", + "should not find variable but ret_size=%ld GetLastError=%ld\n", ret_size, GetLastError());
SetLastError(0xdeadbeef); ret = SetEnvironmentVariableW(NULL, NULL); ok(ret == FALSE && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ENVVAR_NOT_FOUND), - "should fail with NULL, NULL but ret=%d and GetLastError=%d\n", + "should fail with NULL, NULL but ret=%d and GetLastError=%ld\n", ret, GetLastError()); } } @@ -336,46 +337,46 @@ static void test_GetSetEnvironmentVariableAW(void)
/* Write W, read A */ ret = SetEnvironmentVariableW(nameW, valueW); - ok(ret == TRUE, "SetEnvironmentVariableW failed, last error %d\n", GetLastError()); + ok(ret == TRUE, "SetEnvironmentVariableW failed, last error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableA(name, NULL, 0); - todo_wine ok(ret_size == lstrlenA(value) + 1, "expected ret_size %d, got %d\n", lstrlenA(value) + 1, ret_size); - ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + todo_wine ok(ret_size == lstrlenA(value) + 1, "expected ret_size %d, got %ld\n", lstrlenA(value) + 1, ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %ld\n", GetLastError());
lstrcpyA(buf, "foo"); SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1); todo_wine ok(lstrcmpA(buf, value) == 0, "expected %s, got %s\n", debugstr_a(value), debugstr_a(buf)); - todo_wine ok(ret_size == lstrlenA(value), "expected ret_size %d, got %d\n", lstrlenA(value), ret_size); - ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + todo_wine ok(ret_size == lstrlenA(value), "expected ret_size %d, got %ld\n", lstrlenA(value), ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %ld\n", GetLastError());
/* Write A, read A/W */ ret = SetEnvironmentVariableA(name, value); - ok(ret == TRUE, "SetEnvironmentVariableW failed, last error %d\n", GetLastError()); + ok(ret == TRUE, "SetEnvironmentVariableW failed, last error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableA(name, NULL, 0); - todo_wine ok(ret_size == lstrlenA(value) + 1, "expected ret_size %d, got %d\n", lstrlenA(value) + 1, ret_size); - ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + todo_wine ok(ret_size == lstrlenA(value) + 1, "expected ret_size %d, got %ld\n", lstrlenA(value) + 1, ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %ld\n", GetLastError());
lstrcpyA(buf, "foo"); SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableA(name, buf, lstrlenA(value) + 1); todo_wine ok(lstrcmpA(buf, value) == 0, "expected %s, got %s\n", debugstr_a(value), debugstr_a(buf)); - todo_wine ok(ret_size == lstrlenA(value), "expected ret_size %d, got %d\n", lstrlenA(value), ret_size); - ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + todo_wine ok(ret_size == lstrlenA(value), "expected ret_size %d, got %ld\n", lstrlenA(value), ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableW(nameW, NULL, 0); - ok(ret_size == lstrlenW(valueW) + 1, "expected ret_size %d, got %d\n", lstrlenW(valueW) + 1, ret_size); - ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + ok(ret_size == lstrlenW(valueW) + 1, "expected ret_size %d, got %ld\n", lstrlenW(valueW) + 1, ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %ld\n", GetLastError());
lstrcpyW(bufW, L"foo"); SetLastError(0xdeadbeef); ret_size = GetEnvironmentVariableW(nameW, bufW, lstrlenW(valueW) + 1); - ok(ret_size == lstrlenW(valueW), "expected ret_size %d, got %d\n", lstrlenW(valueW), ret_size); - ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %d\n", GetLastError()); + ok(ret_size == lstrlenW(valueW), "expected ret_size %d, got %ld\n", lstrlenW(valueW), ret_size); + ok(GetLastError() == 0xdeadbeef, "expected last error 0xdeadbeef, got %ld\n", GetLastError()); ok(lstrcmpW(bufW, valueW) == 0, "expected %s, got %s\n", debugstr_w(valueW), debugstr_w(bufW)); }
@@ -390,7 +391,7 @@ static void test_ExpandEnvironmentStringsA(void)
ret_size = ExpandEnvironmentStringsA(NULL, buf1, sizeof(buf1)); ok(ret_size == 1 || ret_size == 0 /* Win9x */ || ret_size == 2 /* NT4 */, - "ExpandEnvironmentStrings returned %d\n", ret_size); + "ExpandEnvironmentStrings returned %ld\n", ret_size);
/* Try to get the required buffer size 'the natural way' */ strcpy(buf, "%EnvVar%"); @@ -399,7 +400,7 @@ static void test_ExpandEnvironmentStringsA(void) ret_size == (strlen(value)+1)*2 || /* NT4 */ ret_size == strlen(value)+2 || /* win2k, XP, win2k3 */ ret_size == 0 /* Win95 */, - "ExpandEnvironmentStrings returned %d instead of %d, %d or %d\n", + "ExpandEnvironmentStrings returned %ld instead of %d, %d or %d\n", ret_size, lstrlenA(value)+1, lstrlenA(value)+2, 0);
/* Again, side-stepping the Win95 bug */ @@ -407,7 +408,7 @@ static void test_ExpandEnvironmentStringsA(void) /* v5.1.2600.2945 (XP SP2) returns len + 2 here! */ ok(ret_size == strlen(value)+1 || ret_size == strlen(value)+2 || ret_size == (strlen(value)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", + "ExpandEnvironmentStrings returned %ld instead of %d\n", ret_size, lstrlenA(value)+1);
/* Try with a buffer that's too small */ @@ -415,7 +416,7 @@ static void test_ExpandEnvironmentStringsA(void) /* v5.1.2600.2945 (XP SP2) returns len + 2 here! */ ok(ret_size == strlen(value)+1 || ret_size == strlen(value)+2 || ret_size == (strlen(value)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", + "ExpandEnvironmentStrings returned %ld instead of %d\n", ret_size, lstrlenA(value)+1);
/* Try with a buffer of just the right size */ @@ -423,7 +424,7 @@ static void test_ExpandEnvironmentStringsA(void) ret_size = ExpandEnvironmentStringsA(buf, buf1, ret_size); ok(ret_size == strlen(value)+1 || ret_size == strlen(value)+2 || ret_size == (strlen(value)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", + "ExpandEnvironmentStrings returned %ld instead of %d\n", ret_size, lstrlenA(value)+1); ok(!strcmp(buf1, value), "ExpandEnvironmentStrings returned [%s]\n", buf1);
@@ -432,13 +433,13 @@ static void test_ExpandEnvironmentStringsA(void) ret_size = ExpandEnvironmentStringsA(buf, buf1, sizeof(buf1)); ok(ret_size == strlen(not_an_env_var)+1 || ret_size == (strlen(not_an_env_var)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", ret_size, lstrlenA(not_an_env_var)+1); + "ExpandEnvironmentStrings returned %ld instead of %d\n", ret_size, lstrlenA(not_an_env_var)+1); ok(!strcmp(buf1, not_an_env_var), "ExpandEnvironmentStrings returned [%s]\n", buf1);
/* test a large destination size */ strcpy(buf, "12345"); ret_size = ExpandEnvironmentStringsA(buf, buf2, sizeof(buf2)); - ok(!strcmp(buf, buf2), "ExpandEnvironmentStrings failed %s vs %s. ret_size = %d\n", buf, buf2, ret_size); + ok(!strcmp(buf, buf2), "ExpandEnvironmentStrings failed %s vs %s. ret_size = %ld\n", buf, buf2, ret_size);
SetLastError(0xdeadbeef); ret_size1 = GetWindowsDirectoryA(buf1,256); @@ -446,7 +447,7 @@ static void test_ExpandEnvironmentStringsA(void) ret_size = ExpandEnvironmentStringsA("%SystemRoot%",buf,sizeof(buf)); if (ERROR_ENVVAR_NOT_FOUND != GetLastError()) { - ok(!strcmp(buf, buf1), "ExpandEnvironmentStrings failed %s vs %s. ret_size = %d\n", buf, buf1, ret_size); + ok(!strcmp(buf, buf1), "ExpandEnvironmentStrings failed %s vs %s. ret_size = %ld\n", buf, buf1, ret_size); }
/* Try with a variable that references another */ @@ -456,7 +457,7 @@ static void test_ExpandEnvironmentStringsA(void) ret_size = ExpandEnvironmentStringsA(buf, buf1, sizeof(buf1)); ok(ret_size == strlen(buf2)+1 || ret_size == (strlen(buf2)+1)*2 /* NT4 */, - "ExpandEnvironmentStrings returned %d instead of %d\n", ret_size, lstrlenA(buf2)+1); + "ExpandEnvironmentStrings returned %ld instead of %d\n", ret_size, lstrlenA(buf2)+1); ok(!strcmp(buf1, buf2), "ExpandEnvironmentStrings returned [%s]\n", buf1); SetEnvironmentVariableA("IndirectVar", NULL);
@@ -476,27 +477,27 @@ static void test_GetComputerName(void) SetLastError(0xdeadbeef); ret = GetComputerNameA((LPSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_BUFFER_OVERFLOW, "GetComputerNameA should have failed with ERROR_BUFFER_OVERFLOW instead of %d\n", error); + ok(!ret && error == ERROR_BUFFER_OVERFLOW, "GetComputerNameA should have failed with ERROR_BUFFER_OVERFLOW instead of %ld\n", error);
/* Only Vista returns the computer name length as documented in the MSDN */ if (size != 0) { size++; /* nul terminating character */ name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(name != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = GetComputerNameA(name, &size); - ok(ret, "GetComputerNameA failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameA failed with error %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, name); }
size = MAX_COMPUTERNAME_LENGTH + 1; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(name != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = GetComputerNameA(name, &size); - ok(ret, "GetComputerNameA failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameA failed with error %ld\n", GetLastError()); trace("computer name is "%s"\n", name); name_len = strlen(name); - ok(size == name_len, "size should be same as length, name_len=%d, size=%d\n", name_len, size); + ok(size == name_len, "size should be same as length, name_len=%d, size=%ld\n", name_len, size); HeapFree(GetProcessHeap(), 0, name);
size = 0; @@ -507,12 +508,12 @@ static void test_GetComputerName(void) win_skip("GetComputerNameW is not implemented\n"); else { - ok(!ret && error == ERROR_BUFFER_OVERFLOW, "GetComputerNameW should have failed with ERROR_BUFFER_OVERFLOW instead of %d\n", error); + ok(!ret && error == ERROR_BUFFER_OVERFLOW, "GetComputerNameW should have failed with ERROR_BUFFER_OVERFLOW instead of %ld\n", error); size++; /* nul terminating character */ nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(nameW != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = GetComputerNameW(nameW, &size); - ok(ret, "GetComputerNameW failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameW failed with error %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, nameW); } } @@ -537,7 +538,7 @@ static void test_GetComputerNameExA(void) ret = pGetComputerNameExA(ComputerNameDnsDomain, (LPSTR)0xdeadbeef, &size); error = GetLastError(); ok(ret == 0, "Expected 0, got %d\n", ret); - ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); + ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %ld\n", error);
/* size is not set in win2k */ if (size == 0) @@ -546,9 +547,9 @@ static void test_GetComputerNameExA(void) size = MAX_COMP_NAME; } name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(name != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameDnsDomain, name, &size); - ok(ret, "GetComputerNameExA(ComputerNameDnsDomain) failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameExA(ComputerNameDnsDomain) failed with error %ld\n", GetLastError()); trace("domain name is "%s"\n", name); HeapFree(GetProcessHeap(), 0, name);
@@ -557,15 +558,15 @@ static void test_GetComputerNameExA(void) ret = pGetComputerNameExA(ComputerNameDnsFullyQualified, (LPSTR)0xdeadbeef, &size); error = GetLastError(); ok(ret == 0, "Expected 0, got %d\n", ret); - ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); + ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %ld\n", error);
/* size is not set in win2k */ if (size == 0) size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(name != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameDnsFullyQualified, name, &size); - ok(ret, "GetComputerNameExA(ComputerNameDnsFullyQualified) failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameExA(ComputerNameDnsFullyQualified) failed with error %ld\n", GetLastError()); trace("fully qualified hostname is "%s"\n", name); HeapFree(GetProcessHeap(), 0, name);
@@ -574,15 +575,15 @@ static void test_GetComputerNameExA(void) ret = pGetComputerNameExA(ComputerNameDnsHostname, (LPSTR)0xdeadbeef, &size); error = GetLastError(); ok(ret == 0, "Expected 0, got %d\n", ret); - ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); + ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %ld\n", error);
/* size is not set in win2k */ if (size == 0) size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(name != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameDnsHostname, name, &size); - ok(ret, "GetComputerNameExA(ComputerNameDnsHostname) failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameExA(ComputerNameDnsHostname) failed with error %ld\n", GetLastError()); trace("hostname is "%s"\n", name); HeapFree(GetProcessHeap(), 0, name);
@@ -591,22 +592,22 @@ static void test_GetComputerNameExA(void) ret = pGetComputerNameExA(ComputerNameNetBIOS, (LPSTR)0xdeadbeef, &size); error = GetLastError(); ok(ret == 0, "Expected 0, got %d\n", ret); - ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); + ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %ld\n", error);
size = 0; SetLastError(0xdeadbeef); ret = pGetComputerNameExA(ComputerNameNetBIOS, NULL, &size); error = GetLastError(); ok(ret == 0, "Expected 0, got %d\n", ret); - ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", error); + ok(error == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %ld\n", error);
/* size is not set in win2k */ if (size == 0) size = MAX_COMP_NAME; name = HeapAlloc(GetProcessHeap(), 0, size * sizeof(name[0])); - ok(name != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(name != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = pGetComputerNameExA(ComputerNameNetBIOS, name, &size); - ok(ret, "GetComputerNameExA(ComputerNameNetBIOS) failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameExA(ComputerNameNetBIOS) failed with error %ld\n", GetLastError()); trace("NetBIOS name is "%s"\n", name); HeapFree(GetProcessHeap(), 0, name); } @@ -628,51 +629,51 @@ static void test_GetComputerNameExW(void) SetLastError(0xdeadbeef); ret = pGetComputerNameExW(ComputerNameDnsDomain, (LPWSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error); + ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %ld\n", error); nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(nameW != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = pGetComputerNameExW(ComputerNameDnsDomain, nameW, &size); - ok(ret, "GetComputerNameExW(ComputerNameDnsDomain) failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameExW(ComputerNameDnsDomain) failed with error %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, nameW);
size = 0; SetLastError(0xdeadbeef); ret = pGetComputerNameExW(ComputerNameDnsFullyQualified, (LPWSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error); + ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %ld\n", error); nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(nameW != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = pGetComputerNameExW(ComputerNameDnsFullyQualified, nameW, &size); - ok(ret, "GetComputerNameExW(ComputerNameDnsFullyQualified) failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameExW(ComputerNameDnsFullyQualified) failed with error %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, nameW);
size = 0; SetLastError(0xdeadbeef); ret = pGetComputerNameExW(ComputerNameDnsHostname, (LPWSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error); + ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %ld\n", error); nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(nameW != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = pGetComputerNameExW(ComputerNameDnsHostname, nameW, &size); - ok(ret, "GetComputerNameExW(ComputerNameDnsHostname) failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameExW(ComputerNameDnsHostname) failed with error %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, nameW);
size = 0; SetLastError(0xdeadbeef); ret = pGetComputerNameExW(ComputerNameNetBIOS, (LPWSTR)0xdeadbeef, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error); + ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %ld\n", error); nameW = HeapAlloc(GetProcessHeap(), 0, size * sizeof(nameW[0])); - ok(nameW != NULL, "HeapAlloc failed with error %d\n", GetLastError()); + ok(nameW != NULL, "HeapAlloc failed with error %ld\n", GetLastError()); ret = pGetComputerNameExW(ComputerNameNetBIOS, nameW, &size); - ok(ret, "GetComputerNameExW(ComputerNameNetBIOS) failed with error %d\n", GetLastError()); + ok(ret, "GetComputerNameExW(ComputerNameNetBIOS) failed with error %ld\n", GetLastError()); HeapFree(GetProcessHeap(), 0, nameW);
size = 0; SetLastError(0xdeadbeef); ret = pGetComputerNameExW(ComputerNameNetBIOS, NULL, &size); error = GetLastError(); - ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %d\n", error); + ok(!ret && error == ERROR_MORE_DATA, "GetComputerNameExW should have failed with ERROR_MORE_DATA instead of %ld\n", error); }
static void test_GetEnvironmentStringsW(void) @@ -697,13 +698,13 @@ static void check_env_var_(int line, const char *var, const char *value) DWORD size = GetEnvironmentVariableA(var, buffer, sizeof(buffer)); if (value) { - ok_(__FILE__, line)(size == strlen(value), "wrong size %u\n", size); + ok_(__FILE__, line)(size == strlen(value), "wrong size %lu\n", size); ok_(__FILE__, line)(!strcmp(buffer, value), "wrong value %s\n", debugstr_a(buffer)); } else { - ok_(__FILE__, line)(!size, "wrong size %u\n", size); - ok_(__FILE__, line)(GetLastError() == ERROR_ENVVAR_NOT_FOUND, "got error %u\n", GetLastError()); + ok_(__FILE__, line)(!size, "wrong size %lu\n", size); + ok_(__FILE__, line)(GetLastError() == ERROR_ENVVAR_NOT_FOUND, "got error %lu\n", GetLastError()); } } #define check_env_var(a, b) check_env_var_(__LINE__, a, b) @@ -722,15 +723,15 @@ static void test_SetEnvironmentStrings(void) }
ret = SetEnvironmentVariableA("testenv1", "heis"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = SetEnvironmentVariableA("testenv2", "dyo"); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
old_env = GetEnvironmentStringsW();
memcpy(env, testenv, sizeof(testenv)); ret = pSetEnvironmentStringsW(env); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!memcmp(env, testenv, sizeof(testenv)), "input parameter should not be changed\n");
check_env_var("testenv1", "unus"); @@ -739,7 +740,7 @@ static void test_SetEnvironmentStrings(void) check_env_var("PATH", NULL);
ret = pSetEnvironmentStringsW(old_env); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
check_env_var("testenv1", "heis"); check_env_var("testenv2", "dyo"); @@ -752,24 +753,24 @@ static void test_SetEnvironmentStrings(void) SetLastError(0xdeadbeef); ret = pSetEnvironmentStringsW(env); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
copy_string(env, L"=unus\0"); SetLastError(0xdeadbeef); ret = pSetEnvironmentStringsW(env); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError());
copy_string(env, L"one=two=three four=five\0"); ret = pSetEnvironmentStringsW(env); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
check_env_var("one", "two=three four=five");
ret = pSetEnvironmentStringsW(old_env); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ret = FreeEnvironmentStringsW(old_env); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); }
START_TEST(environ)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/file.c | 1549 ++++++++++++++++++++++---------------------- 1 file changed, 775 insertions(+), 774 deletions(-)
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index f16a092a4df..77174d43d5b 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -19,6 +19,7 @@ * 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> @@ -131,7 +132,7 @@ static void test__hread( void ) filehandle = _lcreat( filename, 0 ); if (filehandle == HFILE_ERROR) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; }
@@ -141,7 +142,7 @@ static void test__hread( void )
filehandle = _lopen( filename, OF_READ );
- ok( HFILE_ERROR != filehandle, "couldn't open file "%s" again (err=%d)\n", filename, GetLastError( ) ); + ok( HFILE_ERROR != filehandle, "couldn't open file "%s" again (err=%ld)\n", filename, GetLastError( ) );
bytes_read = _hread( filehandle, buffer, 2 * strlen( sillytext ) );
@@ -160,7 +161,7 @@ static void test__hread( void ) ok( HFILE_ERROR != _lclose( filehandle ), "_lclose complains\n" );
ret = DeleteFileA( filename ); - ok( ret != 0, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret != 0, "DeleteFile failed (%ld)\n", GetLastError( ) ); }
@@ -180,7 +181,7 @@ static void test__hwrite( void ) filehandle = _lcreat( filename, 0 ); if (filehandle == HFILE_ERROR) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; }
@@ -245,7 +246,7 @@ static void test__hwrite( void ) ok( HFILE_ERROR != _lclose( filehandle ), "_lclose complains\n" );
ret = DeleteFileA( filename ); - ok( ret != 0, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret != 0, "DeleteFile failed (%ld)\n", GetLastError( ) );
LocalFree( contents ); } @@ -259,7 +260,7 @@ static void test__lclose( void ) filehandle = _lcreat( filename, 0 ); if (filehandle == HFILE_ERROR) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; }
@@ -268,7 +269,7 @@ static void test__lclose( void ) ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" );
ret = DeleteFileA( filename ); - ok( ret != 0, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret != 0, "DeleteFile failed (%ld)\n", GetLastError( ) ); }
/* helper function for test__lcreat */ @@ -282,7 +283,7 @@ static void get_nt_pathW( const char *name, UNICODE_STRING *nameW ) pRtlInitAnsiString( &str, name );
status = pRtlAnsiStringToUnicodeString( &strW, &str, TRUE ); - ok( !status, "RtlAnsiStringToUnicodeString failed with %08x\n", status ); + ok( !status, "RtlAnsiStringToUnicodeString failed with %08lx\n", status );
ret = pRtlDosPathNameToNtPathName_U( strW.Buffer, nameW, NULL, NULL ); ok( ret, "RtlDosPathNameToNtPathName_U failed\n" ); @@ -307,7 +308,7 @@ static void test__lcreat( void ) filehandle = _lcreat( filename, 0 ); if (filehandle == HFILE_ERROR) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; }
@@ -324,10 +325,10 @@ static void test__lcreat( void ) FindClose( find );
ret = DeleteFileA(filename); - ok( ret != 0, "DeleteFile failed (%d)\n", GetLastError()); + ok( ret != 0, "DeleteFile failed (%ld)\n", GetLastError());
filehandle = _lcreat( filename, 1 ); /* readonly */ - ok( HFILE_ERROR != filehandle, "couldn't create file "%s" (err=%d)\n", filename, GetLastError( ) ); + ok( HFILE_ERROR != filehandle, "couldn't create file "%s" (err=%ld)\n", filename, GetLastError( ) );
ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite shouldn't be able to write never the less\n" );
@@ -339,14 +340,14 @@ static void test__lcreat( void )
SetLastError( 0xdeadbeef ); ok( 0 == DeleteFileA( filename ), "shouldn't be able to delete a readonly file\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() );
ok( SetFileAttributesA(filename, FILE_ATTRIBUTE_NORMAL ) != 0, "couldn't change attributes on file\n" );
ok( DeleteFileA( filename ) != 0, "now it should be possible to delete the file!\n" );
filehandle = _lcreat( filename, 1 ); /* readonly */ - ok( HFILE_ERROR != filehandle, "couldn't create file "%s" (err=%d)\n", filename, GetLastError() ); + ok( HFILE_ERROR != filehandle, "couldn't create file "%s" (err=%ld)\n", filename, GetLastError() ); ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen(sillytext) ), "_hwrite shouldn't be able to write never the less\n" ); ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); @@ -366,24 +367,24 @@ static void test__lcreat( void ) status = pNtCreateFile( &file, GENERIC_READ | GENERIC_WRITE | DELETE, &attr, &io, NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0 ); - ok( status == STATUS_ACCESS_DENIED, "expected STATUS_ACCESS_DENIED, got %08x\n", status ); + ok( status == STATUS_ACCESS_DENIED, "expected STATUS_ACCESS_DENIED, got %08lx\n", status ); ok( GetFileAttributesA( filename ) != INVALID_FILE_ATTRIBUTES, "file was deleted\n" );
status = pNtCreateFile( &file, DELETE, &attr, &io, NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0 ); - ok( status == STATUS_CANNOT_DELETE, "expected STATUS_CANNOT_DELETE, got %08x\n", status ); + ok( status == STATUS_CANNOT_DELETE, "expected STATUS_CANNOT_DELETE, got %08lx\n", status );
status = pNtCreateFile( &file, DELETE, &attr, &io, NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_OPEN, FILE_DELETE_ON_CLOSE | FILE_DIRECTORY_FILE, NULL, 0 ); - ok( status == STATUS_NOT_A_DIRECTORY, "expected STATUS_NOT_A_DIRECTORY, got %08x\n", status ); + ok( status == STATUS_NOT_A_DIRECTORY, "expected STATUS_NOT_A_DIRECTORY, got %08lx\n", status );
status = pNtCreateFile( &file, DELETE, &attr, &io, NULL, 0, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, FILE_OPEN_IF, FILE_DELETE_ON_CLOSE | FILE_NON_DIRECTORY_FILE, NULL, 0 ); todo_wine - ok( status == STATUS_CANNOT_DELETE, "expected STATUS_CANNOT_DELETE, got %08x\n", status ); + ok( status == STATUS_CANNOT_DELETE, "expected STATUS_CANNOT_DELETE, got %08lx\n", status ); if (!status) CloseHandle( file );
pRtlFreeUnicodeString( &filenameW ); @@ -396,7 +397,7 @@ static void test__lcreat( void ) ok( DeleteFileA( filename ) != 0, "now it should be possible to delete the file\n" );
filehandle = _lcreat( filename, 2 ); - ok( HFILE_ERROR != filehandle, "couldn't create file "%s" (err=%d)\n", filename, GetLastError( ) ); + ok( HFILE_ERROR != filehandle, "couldn't create file "%s" (err=%ld)\n", filename, GetLastError( ) );
ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" );
@@ -411,10 +412,10 @@ static void test__lcreat( void ) FindClose( find );
ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret, "DeleteFile failed (%ld)\n", GetLastError( ) );
filehandle = _lcreat( filename, 4 ); /* SYSTEM file */ - ok( HFILE_ERROR != filehandle, "couldn't create file "%s" (err=%d)\n", filename, GetLastError( ) ); + ok( HFILE_ERROR != filehandle, "couldn't create file "%s" (err=%ld)\n", filename, GetLastError( ) );
ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" );
@@ -429,7 +430,7 @@ static void test__lcreat( void ) FindClose( find );
ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret, "DeleteFile failed (%ld)\n", GetLastError( ) );
filehandle=_lcreat (slashname, 0); /* illegal name */ if (HFILE_ERROR==filehandle) { @@ -442,16 +443,16 @@ static void test__lcreat( void ) if (INVALID_HANDLE_VALUE!=find) { ret = FindClose (find); - ok (0 != ret, "FindClose complains (%d)\n", GetLastError ()); + ok (0 != ret, "FindClose complains (%ld)\n", GetLastError ()); slashname[strlen(slashname)-1]=0; ok (!strcmp (slashname, search_results.cFileName), "found unexpected name "%s"\n", search_results.cFileName); ok (FILE_ATTRIBUTE_ARCHIVE==search_results.dwFileAttributes, - "attributes of file "%s" are 0x%04x\n", search_results.cFileName, + "attributes of file "%s" are 0x%04lx\n", search_results.cFileName, search_results.dwFileAttributes); } ret = DeleteFileA( slashname ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret, "DeleteFile failed (%ld)\n", GetLastError( ) ); }
filehandle=_lcreat (filename, 8); /* illegal attribute */ @@ -469,17 +470,17 @@ static void test__lcreat( void ) else name = filename;
ret = FindClose(find); - ok ( 0 != ret, "FindClose complains (%d)\n", GetLastError ()); + ok ( 0 != ret, "FindClose complains (%ld)\n", GetLastError ()); ok (!strcmp (name, search_results.cFileName), "expected "%s", got "%s"\n", name, search_results.cFileName); search_results.dwFileAttributes &= ~FILE_ATTRIBUTE_NOT_CONTENT_INDEXED; search_results.dwFileAttributes &= ~FILE_ATTRIBUTE_COMPRESSED; ok (FILE_ATTRIBUTE_ARCHIVE==search_results.dwFileAttributes, - "attributes of file "%s" are 0x%04x\n", search_results.cFileName, + "attributes of file "%s" are 0x%04lx\n", search_results.cFileName, search_results.dwFileAttributes); } ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret, "DeleteFile failed (%ld)\n", GetLastError( ) ); } }
@@ -495,7 +496,7 @@ static void test__llseek( void ) filehandle = _lcreat( filename, 0 ); if (filehandle == HFILE_ERROR) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; }
@@ -518,7 +519,7 @@ static void test__llseek( void ) ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" );
ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret, "DeleteFile failed (%ld)\n", GetLastError( ) ); }
@@ -532,7 +533,7 @@ static void test__llopen( void ) filehandle = _lcreat( filename, 0 ); if (filehandle == HFILE_ERROR) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; }
@@ -557,7 +558,7 @@ static void test__llopen( void ) ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" );
ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret, "DeleteFile failed (%ld)\n", GetLastError( ) ); /* TODO - add tests for the SHARE modes - use two processes to pull this one off */ }
@@ -574,7 +575,7 @@ static void test__lread( void ) filehandle = _lcreat( filename, 0 ); if (filehandle == HFILE_ERROR) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; }
@@ -584,7 +585,7 @@ static void test__lread( void )
filehandle = _lopen( filename, OF_READ );
- ok( HFILE_ERROR != filehandle, "couldn't open file "%s" again (err=%d)\n", filename, GetLastError()); + ok( HFILE_ERROR != filehandle, "couldn't open file "%s" again (err=%ld)\n", filename, GetLastError());
bytes_read = _lread( filehandle, buffer, 2 * strlen( sillytext ) );
@@ -603,7 +604,7 @@ static void test__lread( void ) ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" );
ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret, "DeleteFile failed (%ld)\n", GetLastError( ) ); }
@@ -623,7 +624,7 @@ static void test__lwrite( void ) filehandle = _lcreat( filename, 0 ); if (filehandle == HFILE_ERROR) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; }
@@ -688,7 +689,7 @@ static void test__lwrite( void ) ok( HFILE_ERROR != _lclose( filehandle ), "_lclose complains\n" );
ret = DeleteFileA( filename ); - ok( ret, "DeleteFile failed (%d)\n", GetLastError( ) ); + ok( ret, "DeleteFile failed (%ld)\n", GetLastError( ) );
LocalFree( contents ); } @@ -706,147 +707,147 @@ static void test_CopyFileA(void) BOOL retok;
ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathA error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameA(temp_path, prefix, 0, source); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
/* copying a file to itself must fail */ retok = CopyFileA(source, source, FALSE); ok( !retok && (GetLastError() == ERROR_SHARING_VIOLATION || broken(GetLastError() == ERROR_FILE_EXISTS) /* Win 9x */), - "copying a file to itself didn't fail (ret=%d, err=%d)\n", retok, GetLastError()); + "copying a file to itself didn't fail (ret=%d, err=%ld)\n", retok, GetLastError());
/* make the source have not zero size */ hfile = CreateFileA(source, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file\n"); retok = WriteFile(hfile, prefix, sizeof(prefix), &ret, NULL ); ok( retok && ret == sizeof(prefix), - "WriteFile error %d\n", GetLastError()); + "WriteFile error %ld\n", GetLastError()); ok(GetFileSize(hfile, NULL) == sizeof(prefix), "source file has wrong size\n"); /* get the file time and change it to prove the difference */ ret = GetFileTime(hfile, NULL, NULL, &ft1); - ok( ret, "GetFileTime error %d\n", GetLastError()); + ok( ret, "GetFileTime error %ld\n", GetLastError()); ft1.dwLowDateTime -= 600000000; /* 60 second */ ret = SetFileTime(hfile, NULL, NULL, &ft1); - ok( ret, "SetFileTime error %d\n", GetLastError()); + ok( ret, "SetFileTime error %ld\n", GetLastError()); GetFileTime(hfile, NULL, NULL, &ft1); /* get the actual time back */ CloseHandle(hfile);
ret = GetTempFileNameA(temp_path, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = CopyFileA(source, dest, TRUE); ok(!ret && GetLastError() == ERROR_FILE_EXISTS, - "CopyFileA: unexpected error %d\n", GetLastError()); + "CopyFileA: unexpected error %ld\n", GetLastError());
ret = CopyFileA(source, dest, FALSE); - ok(ret, "CopyFileA: error %d\n", GetLastError()); + ok(ret, "CopyFileA: error %ld\n", GetLastError());
/* NULL checks */ retok = CopyFileA(NULL, dest, TRUE); ok(!retok && GetLastError() == ERROR_PATH_NOT_FOUND, - "CopyFileA: ret = %d, unexpected error %d\n", retok, GetLastError()); + "CopyFileA: ret = %d, unexpected error %ld\n", retok, GetLastError()); retok = CopyFileA(source, NULL, TRUE); ok(!retok && GetLastError() == ERROR_PATH_NOT_FOUND, - "CopyFileA: ret = %d, unexpected error %d\n", retok, GetLastError()); + "CopyFileA: ret = %d, unexpected error %ld\n", retok, GetLastError());
/* copying from a read-locked source fails */ hfile = CreateFileA(source, GENERIC_READ, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %ld\n", GetLastError()); retok = CopyFileA(source, dest, FALSE); ok(!retok && GetLastError() == ERROR_SHARING_VIOLATION, "copying from a read-locked file succeeded when it shouldn't have\n"); /* in addition, the source is opened before the destination */ retok = CopyFileA("25f99d3b-4ba4-4f66-88f5-2906886993cc", dest, FALSE); ok(!retok && GetLastError() == ERROR_FILE_NOT_FOUND, - "copying from a file that doesn't exist failed in an unexpected way (ret=%d, err=%d)\n", retok, GetLastError()); + "copying from a file that doesn't exist failed in an unexpected way (ret=%d, err=%ld)\n", retok, GetLastError()); CloseHandle(hfile);
/* copying from a r+w opened, r shared source succeeds */ hfile = CreateFileA(source, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %ld\n", GetLastError()); retok = CopyFileA(source, dest, FALSE); ok(retok, - "copying from an r+w opened and r shared file failed (ret=%d, err=%d)\n", retok, GetLastError()); + "copying from an r+w opened and r shared file failed (ret=%d, err=%ld)\n", retok, GetLastError()); CloseHandle(hfile);
/* copying from a delete-locked source mostly succeeds */ hfile = CreateFileA(source, DELETE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %ld\n", GetLastError()); retok = CopyFileA(source, dest, FALSE); ok(retok || broken(!retok && GetLastError() == ERROR_SHARING_VIOLATION) /* NT, 2000, XP */, - "copying from a delete-locked file failed (ret=%d, err=%d)\n", retok, GetLastError()); + "copying from a delete-locked file failed (ret=%d, err=%ld)\n", retok, GetLastError()); CloseHandle(hfile);
/* copying to a write-locked destination fails */ hfile = CreateFileA(dest, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError()); retok = CopyFileA(source, dest, FALSE); ok(!retok && GetLastError() == ERROR_SHARING_VIOLATION, - "copying to a write-locked file didn't fail (ret=%d, err=%d)\n", retok, GetLastError()); + "copying to a write-locked file didn't fail (ret=%d, err=%ld)\n", retok, GetLastError()); CloseHandle(hfile);
/* copying to a r+w opened, w shared destination mostly succeeds */ hfile = CreateFileA(dest, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError()); retok = CopyFileA(source, dest, FALSE); ok(retok || broken(!retok && GetLastError() == ERROR_SHARING_VIOLATION) /* Win 9x */, - "copying to a r+w opened and w shared file failed (ret=%d, err=%d)\n", retok, GetLastError()); + "copying to a r+w opened and w shared file failed (ret=%d, err=%ld)\n", retok, GetLastError()); CloseHandle(hfile);
/* copying to a delete-locked destination fails, even when the destination is delete-shared */ hfile = CreateFileA(dest, DELETE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0); ok(hfile != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_INVALID_PARAMETER) /* Win 9x */, - "failed to open destination file, error %d\n", GetLastError()); + "failed to open destination file, error %ld\n", GetLastError()); if (hfile != INVALID_HANDLE_VALUE) { retok = CopyFileA(source, dest, FALSE); ok(!retok && GetLastError() == ERROR_SHARING_VIOLATION, - "copying to a delete-locked shared file didn't fail (ret=%d, err=%d)\n", retok, GetLastError()); + "copying to a delete-locked shared file didn't fail (ret=%d, err=%ld)\n", retok, GetLastError()); CloseHandle(hfile); }
/* copy to a file that's opened the way Wine opens the source */ hfile = CreateFileA(dest, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError()); retok = CopyFileA(source, dest, FALSE); ok(retok || broken(GetLastError() == ERROR_SHARING_VIOLATION) /* Win 9x */, - "copying to a file opened the way Wine opens the source failed (ret=%d, err=%d)\n", retok, GetLastError()); + "copying to a file opened the way Wine opens the source failed (ret=%d, err=%ld)\n", retok, GetLastError()); CloseHandle(hfile);
/* make sure that destination has correct size */ hfile = CreateFileA(dest, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file\n"); ret = GetFileSize(hfile, NULL); - ok(ret == sizeof(prefix), "destination file has wrong size %d\n", ret); + ok(ret == sizeof(prefix), "destination file has wrong size %ld\n", ret);
/* make sure that destination has the same filetime */ ret = GetFileTime(hfile, NULL, NULL, &ft2); - ok( ret, "GetFileTime error %d\n", GetLastError()); + ok( ret, "GetFileTime error %ld\n", GetLastError()); ok(CompareFileTime(&ft1, &ft2) == 0, "destination file has wrong filetime\n");
SetLastError(0xdeadbeef); ret = CopyFileA(source, dest, FALSE); ok(!ret && GetLastError() == ERROR_SHARING_VIOLATION, - "CopyFileA: ret = %d, unexpected error %d\n", ret, GetLastError()); + "CopyFileA: ret = %ld, unexpected error %ld\n", ret, GetLastError());
/* make sure that destination still has correct size */ ret = GetFileSize(hfile, NULL); - ok(ret == sizeof(prefix), "destination file has wrong size %d\n", ret); + ok(ret == sizeof(prefix), "destination file has wrong size %ld\n", ret); retok = ReadFile(hfile, buf, sizeof(buf), &ret, NULL); ok( retok && ret == sizeof(prefix), - "ReadFile: error %d\n", GetLastError()); + "ReadFile: error %ld\n", GetLastError()); ok(!memcmp(prefix, buf, sizeof(prefix)), "buffer contents mismatch\n");
/* check error on copying over a mapped file that was opened with FILE_SHARE_READ */ hmapfile = CreateFileMappingW(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); + ok(hmapfile != NULL, "CreateFileMapping: error %ld\n", GetLastError());
ret = CopyFileA(source, dest, FALSE); ok(!ret && GetLastError() == ERROR_SHARING_VIOLATION, - "CopyFileA with mapped dest file: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + "CopyFileA with mapped dest file: expected ERROR_SHARING_VIOLATION, got %ld\n", GetLastError());
CloseHandle(hmapfile); CloseHandle(hfile); @@ -856,21 +857,21 @@ static void test_CopyFileA(void)
/* check error on copying over a mapped file that was opened with FILE_SHARE_WRITE */ hmapfile = CreateFileMappingW(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); + ok(hmapfile != NULL, "CreateFileMapping: error %ld\n", GetLastError());
ret = CopyFileA(source, dest, FALSE); ok(!ret, "CopyFileA: expected failure\n"); ok(GetLastError() == ERROR_USER_MAPPED_FILE || broken(GetLastError() == ERROR_SHARING_VIOLATION), /* Win9x */ - "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %d\n", GetLastError()); + "CopyFileA with mapped dest file: expected ERROR_USER_MAPPED_FILE, got %ld\n", GetLastError());
CloseHandle(hmapfile); CloseHandle(hfile);
ret = DeleteFileA(source); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); + ok(ret, "DeleteFileA: error %ld\n", GetLastError()); ret = DeleteFileA(dest); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); + ok(ret, "DeleteFileA: error %ld\n", GetLastError()); }
static void test_CopyFileW(void) @@ -886,26 +887,26 @@ static void test_CopyFileW(void) win_skip("GetTempPathW is not available\n"); return; } - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathW error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameW(temp_path, prefix, 0, source); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %ld\n", GetLastError());
ret = GetTempFileNameW(temp_path, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %ld\n", GetLastError());
ret = CopyFileW(source, dest, TRUE); ok(!ret && GetLastError() == ERROR_FILE_EXISTS, - "CopyFileW: unexpected error %d\n", GetLastError()); + "CopyFileW: unexpected error %ld\n", GetLastError());
ret = CopyFileW(source, dest, FALSE); - ok(ret, "CopyFileW: error %d\n", GetLastError()); + ok(ret, "CopyFileW: error %ld\n", GetLastError());
ret = DeleteFileW(source); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError()); ret = DeleteFileW(dest); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError()); }
static void test_CopyFile2(void) @@ -927,14 +928,14 @@ static void test_CopyFile2(void) }
ret = GetTempPathW(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathW error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameW(temp_path, prefix, 0, source); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %ld\n", GetLastError());
ret = GetTempFileNameW(temp_path, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %ld\n", GetLastError());
/* fail if exists */ memset(¶ms, 0, sizeof(params)); @@ -943,15 +944,15 @@ static void test_CopyFile2(void)
SetLastError(0xdeadbeef); hr = pCopyFile2(source, dest, ¶ms); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "CopyFile2: unexpected error 0x%08x\n", hr); - ok(GetLastError() == ERROR_FILE_EXISTS, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "CopyFile2: unexpected error 0x%08lx\n", hr); + ok(GetLastError() == ERROR_FILE_EXISTS, "CopyFile2: last error %ld\n", GetLastError());
/* don't fail if exists */ params.dwSize = sizeof(params); params.dwCopyFlags = 0;
hr = pCopyFile2(source, dest, ¶ms); - ok(hr == S_OK, "CopyFile2: error 0x%08x\n", hr); + ok(hr == S_OK, "CopyFile2: error 0x%08lx\n", hr);
/* copying a file to itself must fail */ params.dwSize = sizeof(params); @@ -959,160 +960,160 @@ static void test_CopyFile2(void)
SetLastError(0xdeadbeef); hr = pCopyFile2(source, source, ¶ms); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: copying a file to itself didn't fail, 0x%08x\n", hr); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: copying a file to itself didn't fail, 0x%08lx\n", hr); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %ld\n", GetLastError());
/* make the source have not zero size */ hfile = CreateFileW(source, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file\n"); ret = WriteFile(hfile, prefix, sizeof(prefix), &len, NULL ); - ok(ret && len == sizeof(prefix), "WriteFile error %d\n", GetLastError()); + ok(ret && len == sizeof(prefix), "WriteFile error %ld\n", GetLastError()); ok(GetFileSize(hfile, NULL) == sizeof(prefix), "source file has wrong size\n");
/* get the file time and change it to prove the difference */ ret = GetFileTime(hfile, NULL, NULL, &ft1); - ok(ret, "GetFileTime error %d\n", GetLastError()); + ok(ret, "GetFileTime error %ld\n", GetLastError()); ft1.dwLowDateTime -= 600000000; /* 60 second */ ret = SetFileTime(hfile, NULL, NULL, &ft1); - ok(ret, "SetFileTime error %d\n", GetLastError()); + ok(ret, "SetFileTime error %ld\n", GetLastError()); GetFileTime(hfile, NULL, NULL, &ft1); /* get the actual time back */ CloseHandle(hfile);
ret = GetTempFileNameW(temp_path, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = COPY_FILE_FAIL_IF_EXISTS;
SetLastError(0xdeadbeef); hr = pCopyFile2(source, dest, ¶ms); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "CopyFile2: unexpected error 0x%08x\n", hr); - ok(GetLastError() == ERROR_FILE_EXISTS, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "CopyFile2: unexpected error 0x%08lx\n", hr); + ok(GetLastError() == ERROR_FILE_EXISTS, "CopyFile2: last error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; hr = pCopyFile2(source, dest, ¶ms); - ok(ret, "CopyFile2: error 0x%08x\n", hr); + ok(ret, "CopyFile2: error 0x%08lx\n", hr);
/* copying from a read-locked source fails */ hfile = CreateFileW(source, GENERIC_READ, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; SetLastError(0xdeadbeef); hr = pCopyFile2(source, dest, ¶ms); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08x\n", hr); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08lx\n", hr); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %ld\n", GetLastError());
/* in addition, the source is opened before the destination */ params.dwSize = sizeof(params); params.dwCopyFlags = 0; SetLastError(0xdeadbeef); hr = pCopyFile2(doesntexistW, dest, ¶ms); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08lx\n", hr); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "CopyFile2: last error %ld\n", GetLastError()); CloseHandle(hfile);
/* copying from a r+w opened, r shared source succeeds */ hfile = CreateFileW(source, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; hr = pCopyFile2(source, dest, ¶ms); - ok(hr == S_OK, "failed 0x%08x\n", hr); + ok(hr == S_OK, "failed 0x%08lx\n", hr); CloseHandle(hfile);
/* copying from a delete-locked source mostly succeeds */ hfile = CreateFileW(source, DELETE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file, error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; hr = pCopyFile2(source, dest, ¶ms); - ok(hr == S_OK, "failed 0x%08x\n", hr); + ok(hr == S_OK, "failed 0x%08lx\n", hr); CloseHandle(hfile);
/* copying to a write-locked destination fails */ hfile = CreateFileW(dest, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; SetLastError(0xdeadbeef); hr = pCopyFile2(source, dest, FALSE); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08x\n", hr); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08lx\n", hr); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %ld\n", GetLastError()); CloseHandle(hfile);
/* copying to a r+w opened, w shared destination mostly succeeds */ hfile = CreateFileW(dest, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; hr = pCopyFile2(source, dest, FALSE); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CloseHandle(hfile);
/* copying to a delete-locked destination fails, even when the destination is delete-shared */ hfile = CreateFileW(dest, DELETE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; SetLastError(0xdeadbeef); hr = pCopyFile2(source, dest, ¶ms); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08x\n", hr); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08lx\n", hr); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %ld\n", GetLastError()); CloseHandle(hfile);
/* copy to a file that's opened the way Wine opens the source */ hfile = CreateFileW(dest, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; hr = pCopyFile2(source, dest, ¶ms); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); CloseHandle(hfile);
/* make sure that destination has correct size */ hfile = CreateFileW(dest, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file\n"); ret = GetFileSize(hfile, NULL); - ok(ret == sizeof(prefix), "destination file has wrong size %d\n", ret); + ok(ret == sizeof(prefix), "destination file has wrong size %ld\n", ret);
/* make sure that destination has the same filetime */ ret = GetFileTime(hfile, NULL, NULL, &ft2); - ok(ret, "GetFileTime error %d\n", GetLastError()); + ok(ret, "GetFileTime error %ld\n", GetLastError()); ok(CompareFileTime(&ft1, &ft2) == 0, "destination file has wrong filetime\n");
params.dwSize = sizeof(params); params.dwCopyFlags = 0; SetLastError(0xdeadbeef); hr = pCopyFile2(source, dest, ¶ms); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08x\n", hr); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08lx\n", hr); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %ld\n", GetLastError());
/* make sure that destination still has correct size */ ret = GetFileSize(hfile, NULL); - ok(ret == sizeof(prefix), "destination file has wrong size %d\n", ret); + ok(ret == sizeof(prefix), "destination file has wrong size %ld\n", ret); ret = ReadFile(hfile, buf, sizeof(buf), &len, NULL); - ok(ret && len == sizeof(prefix), "ReadFile: error %d\n", GetLastError()); + ok(ret && len == sizeof(prefix), "ReadFile: error %ld\n", GetLastError()); ok(!memcmp(prefix, buf, sizeof(prefix)), "buffer contents mismatch\n");
/* check error on copying over a mapped file that was opened with FILE_SHARE_READ */ hmapfile = CreateFileMappingW(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); + ok(hmapfile != NULL, "CreateFileMapping: error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; SetLastError(0xdeadbeef); hr = pCopyFile2(source, dest, ¶ms); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08x\n", hr); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "CopyFile2: unexpected error 0x%08lx\n", hr); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "CopyFile2: last error %ld\n", GetLastError());
CloseHandle(hmapfile); CloseHandle(hfile); @@ -1122,13 +1123,13 @@ static void test_CopyFile2(void)
/* check error on copying over a mapped file that was opened with FILE_SHARE_WRITE */ hmapfile = CreateFileMappingW(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); + ok(hmapfile != NULL, "CreateFileMapping: error %ld\n", GetLastError());
params.dwSize = sizeof(params); params.dwCopyFlags = 0; hr = pCopyFile2(source, dest, ¶ms); - ok(hr == HRESULT_FROM_WIN32(ERROR_USER_MAPPED_FILE), "CopyFile2: unexpected error 0x%08x\n", hr); - ok(GetLastError() == ERROR_USER_MAPPED_FILE, "CopyFile2: last error %d\n", GetLastError()); + ok(hr == HRESULT_FROM_WIN32(ERROR_USER_MAPPED_FILE), "CopyFile2: unexpected error 0x%08lx\n", hr); + ok(GetLastError() == ERROR_USER_MAPPED_FILE, "CopyFile2: last error %ld\n", GetLastError());
CloseHandle(hmapfile); CloseHandle(hfile); @@ -1141,7 +1142,7 @@ static DWORD WINAPI copy_progress_cb(LARGE_INTEGER total_size, LARGE_INTEGER tot LARGE_INTEGER stream_size, LARGE_INTEGER stream_transferred, DWORD stream, DWORD reason, HANDLE source, HANDLE dest, LPVOID userdata) { - ok(reason == CALLBACK_STREAM_SWITCH, "expected CALLBACK_STREAM_SWITCH, got %u\n", reason); + ok(reason == CALLBACK_STREAM_SWITCH, "expected CALLBACK_STREAM_SWITCH, got %lu\n", reason); CloseHandle(userdata); return PROGRESS_CANCEL; } @@ -1156,47 +1157,47 @@ static void test_CopyFileEx(void) BOOL retok;
ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathA error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameA(temp_path, prefix, 0, source); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
ret = GetTempFileNameA(temp_path, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
hfile = CreateFileA(dest, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError()); SetLastError(0xdeadbeef); retok = CopyFileExA(source, dest, copy_progress_cb, hfile, NULL, 0); todo_wine ok(!retok, "CopyFileExA unexpectedly succeeded\n"); todo_wine - ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %ld\n", GetLastError()); ok(GetFileAttributesA(dest) != INVALID_FILE_ATTRIBUTES, "file was deleted\n");
hfile = CreateFileA(dest, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0); todo_wine - ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "failed to open destination file, error %ld\n", GetLastError()); SetLastError(0xdeadbeef); retok = CopyFileExA(source, dest, copy_progress_cb, hfile, NULL, 0); todo_wine ok(!retok, "CopyFileExA unexpectedly succeeded\n"); todo_wine - ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_REQUEST_ABORTED, "expected ERROR_REQUEST_ABORTED, got %ld\n", GetLastError()); todo_wine ok(GetFileAttributesA(dest) == INVALID_FILE_ATTRIBUTES, "file was not deleted\n");
retok = CopyFileExA(source, NULL, copy_progress_cb, hfile, NULL, 0); ok(!retok, "CopyFileExA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_PATH_NOT_FOUND, "expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_PATH_NOT_FOUND, "expected ERROR_PATH_NOT_FOUND, got %ld\n", GetLastError()); retok = CopyFileExA(NULL, dest, copy_progress_cb, hfile, NULL, 0); ok(!retok, "CopyFileExA unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_PATH_NOT_FOUND, "expected ERROR_PATH_NOT_FOUND, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_PATH_NOT_FOUND, "expected ERROR_PATH_NOT_FOUND, got %ld\n", GetLastError());
ret = DeleteFileA(source); - ok(ret, "DeleteFileA failed with error %d\n", GetLastError()); + ok(ret, "DeleteFileA failed with error %ld\n", GetLastError()); ret = DeleteFileA(dest); ok(!ret, "DeleteFileA unexpectedly succeeded\n"); } @@ -1256,11 +1257,11 @@ static void test_CreateFileA(void) WCHAR curdir[MAX_PATH];
ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathA error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameA(temp_path, prefix, 0, filename); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hFile = CreateFileA(filename, GENERIC_READ, 0, NULL, @@ -1272,7 +1273,7 @@ static void test_CreateFileA(void) hFile = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); + "hFile %p, last error %lu\n", hFile, GetLastError());
CloseHandle(hFile);
@@ -1280,43 +1281,43 @@ static void test_CreateFileA(void) hFile = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); + "hFile %p, last error %lu\n", hFile, GetLastError());
CloseHandle(hFile);
ret = DeleteFileA(filename); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); + ok(ret, "DeleteFileA: error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hFile = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == 0, - "hFile %p, last error %u\n", hFile, GetLastError()); + "hFile %p, last error %lu\n", hFile, GetLastError());
CloseHandle(hFile);
ret = DeleteFileA(filename); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); + ok(ret, "DeleteFileA: error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hFile = CreateFileA("c:\*.*", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ok(hFile == INVALID_HANDLE_VALUE, "hFile should have been INVALID_HANDLE_VALUE\n"); ok(GetLastError() == ERROR_INVALID_NAME || broken(GetLastError() == ERROR_FILE_NOT_FOUND), /* Win98 */ - "LastError should have been ERROR_INVALID_NAME or ERROR_FILE_NOT_FOUND but got %u\n", GetLastError()); + "LastError should have been ERROR_INVALID_NAME or ERROR_FILE_NOT_FOUND but got %lu\n", GetLastError());
/* get windows drive letter */ ret = GetWindowsDirectoryA(windowsdir, sizeof(windowsdir)); ok(ret < sizeof(windowsdir), "windowsdir is abnormally long!\n"); - ok(ret != 0, "GetWindowsDirectory: error %d\n", GetLastError()); + ok(ret != 0, "GetWindowsDirectory: error %ld\n", GetLastError());
/* test error return codes from CreateFile for some cases */ ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathA error %ld\n", GetLastError()); strcpy(dirname, temp_path); strcat(dirname, directory); ret = CreateDirectoryA(dirname, NULL); - ok( ret, "Createdirectory failed, gle=%d\n", GetLastError() ); + ok( ret, "Createdirectory failed, gle=%ld\n", GetLastError() ); /* set current drive & directory to known location */ GetCurrentDirectoryW( MAX_PATH, curdir); SetCurrentDirectoryA( temp_path ); @@ -1353,7 +1354,7 @@ static void test_CreateFileA(void) p[i].err != ERROR_ACCESS_DENIED) { if (p[i].todo_flag) - skip("Either no authority to volume, or is todo_wine for %s err=%d should be %d\n", filename, GetLastError(), p[i].err); + skip("Either no authority to volume, or is todo_wine for %s err=%ld should be %ld\n", filename, GetLastError(), p[i].err); else skip("Do not have authority to access volumes. Test for %s skipped\n", filename); } @@ -1364,7 +1365,7 @@ static void test_CreateFileA(void) ok((hFile == INVALID_HANDLE_VALUE && (p[i].err == GetLastError() || p[i].err2 == GetLastError())) || (hFile != INVALID_HANDLE_VALUE && p[i].err == ERROR_SUCCESS), - "CreateFileA failed on %s, hFile %p, err=%u, should be %u\n", + "CreateFileA failed on %s, hFile %p, err=%lu, should be %lu\n", filename, hFile, GetLastError(), p[i].err); } if (hFile != INVALID_HANDLE_VALUE) @@ -1372,7 +1373,7 @@ static void test_CreateFileA(void) i++; } ret = RemoveDirectoryA(dirname); - ok(ret, "RemoveDirectoryA: error %d\n", GetLastError()); + ok(ret, "RemoveDirectoryA: error %ld\n", GetLastError()); SetCurrentDirectoryW(curdir);
/* test opening directory as a directory */ @@ -1384,7 +1385,7 @@ static void test_CreateFileA(void) if (hFile != INVALID_HANDLE_VALUE && GetLastError() != ERROR_PATH_NOT_FOUND) { ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_SUCCESS, - "CreateFileA did not work, last error %u on volume <%s>\n", + "CreateFileA did not work, last error %lu on volume <%s>\n", GetLastError(), temp_path );
if (hFile != INVALID_HANDLE_VALUE) @@ -1393,7 +1394,7 @@ static void test_CreateFileA(void) if (ret) { ok(Finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY, - "CreateFileA probably did not open temp directory %s correctly\n file information does not include FILE_ATTRIBUTE_DIRECTORY, actual=0x%08x\n", + "CreateFileA probably did not open temp directory %s correctly\n file information does not include FILE_ATTRIBUTE_DIRECTORY, actual=0x%08lx\n", temp_path, Finfo.dwFileAttributes); } CloseHandle( hFile ); @@ -1417,7 +1418,7 @@ static void test_CreateFileA(void) (GetLastError() != ERROR_ACCESS_DENIED && GetLastError() != ERROR_BAD_NETPATH)) { /* if we have adm rights to volume, then try rest of tests */ - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA did not open %s, last error=%u\n", + ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA did not open %s, last error=%lu\n", filename, GetLastError()); if (hFile != INVALID_HANDLE_VALUE) { @@ -1426,7 +1427,7 @@ static void test_CreateFileA(void) /* what the data is at this time. */ len = 512; ret = ReadFile( hFile, buffer, len, &len, NULL ); - todo_wine ok(ret, "Failed to read volume, last error %u, %u, for %s\n", + todo_wine ok(ret, "Failed to read volume, last error %lu, %lu, for %s\n", GetLastError(), ret, filename); if (ret) { @@ -1447,7 +1448,7 @@ static void test_CreateFileA(void) FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING, NULL ); todo_wine ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %u\n", + "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %lu\n", filename, GetLastError()); if (hFile != INVALID_HANDLE_VALUE) CloseHandle( hFile ); @@ -1462,7 +1463,7 @@ static void test_CreateFileA(void) NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL ); ok(hFile != INVALID_HANDLE_VALUE, - "CreateFileA should have worked on %s, but got %u\n", + "CreateFileA should have worked on %s, but got %lu\n", filename, GetLastError()); if (hFile != INVALID_HANDLE_VALUE) CloseHandle( hFile ); @@ -1476,7 +1477,7 @@ static void test_CreateFileA(void) FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING, NULL ); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA did not open %s, last error=%u\n", + ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA did not open %s, last error=%lu\n", filename, GetLastError()); if (hFile != INVALID_HANDLE_VALUE) CloseHandle( hFile ); @@ -1495,7 +1496,7 @@ static void test_CreateFileA(void) strcpy(filename, "c:\"); filename[0] = windowsdir[0]; ret = pGetVolumeNameForVolumeMountPointA( filename, Volume_1, MAX_PATH ); - ok(ret, "GetVolumeNameForVolumeMountPointA failed, for %s, last error=%d\n", filename, GetLastError()); + ok(ret, "GetVolumeNameForVolumeMountPointA failed, for %s, last error=%ld\n", filename, GetLastError()); if (ret) { ok(strlen(Volume_1) == 49, "GetVolumeNameForVolumeMountPointA returned wrong length name <%s>\n", Volume_1); @@ -1515,7 +1516,7 @@ static void test_CreateFileA(void) filename, hFile); todo_wine ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %u\n", + "CreateFileA should have returned ERROR_PATH_NOT_FOUND on %s, but got %lu\n", filename, GetLastError()); if (hFile != INVALID_HANDLE_VALUE) CloseHandle( hFile ); @@ -1532,7 +1533,7 @@ static void test_CreateFileA(void) FILE_FLAG_BACKUP_SEMANTICS, NULL ); todo_wine ok(hFile != INVALID_HANDLE_VALUE, - "CreateFileA should have opened %s, but got %u\n", + "CreateFileA should have opened %s, but got %lu\n", filename, GetLastError()); if (hFile != INVALID_HANDLE_VALUE) CloseHandle( hFile ); @@ -1551,7 +1552,7 @@ static void test_CreateFileA(void) if (hFile != INVALID_HANDLE_VALUE || GetLastError() != ERROR_ACCESS_DENIED) { /* if we have adm rights to volume, then try rest of tests */ - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA did not open %s, last error=%u\n", + ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA did not open %s, last error=%lu\n", filename, GetLastError()); if (hFile != INVALID_HANDLE_VALUE) { @@ -1560,7 +1561,7 @@ static void test_CreateFileA(void) /* what the data is at this time. */ len = 512; ret = ReadFile( hFile, buffer, len, &len, NULL ); - todo_wine ok(ret, "Failed to read volume, last error %u, %u, for %s\n", + todo_wine ok(ret, "Failed to read volume, last error %lu, %lu, for %s\n", GetLastError(), ret, filename); if (ret) { @@ -1596,11 +1597,11 @@ static void test_CreateFileW(void) win_skip("GetTempPathW is not available\n"); return; } - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathW error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameW(temp_path, prefix, 0, filename); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hFile = CreateFileW(filename, GENERIC_READ, 0, NULL, @@ -1612,7 +1613,7 @@ static void test_CreateFileW(void) hFile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); + "hFile %p, last error %lu\n", hFile, GetLastError());
CloseHandle(hFile);
@@ -1620,23 +1621,23 @@ static void test_CreateFileW(void) hFile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); + "hFile %p, last error %lu\n", hFile, GetLastError());
CloseHandle(hFile);
ret = DeleteFileW(filename); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hFile = CreateFileW(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == 0, - "hFile %p, last error %u\n", hFile, GetLastError()); + "hFile %p, last error %lu\n", hFile, GetLastError());
CloseHandle(hFile);
ret = DeleteFileW(filename); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError());
if (0) { @@ -1644,29 +1645,29 @@ static void test_CreateFileW(void) hFile = CreateFileW(NULL, GENERIC_READ, 0, NULL, CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0); ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateFileW(NULL) returned ret=%p error=%u\n",hFile,GetLastError()); + "CreateFileW(NULL) returned ret=%p error=%lu\n",hFile,GetLastError()); }
hFile = CreateFileW(emptyW, GENERIC_READ, 0, NULL, CREATE_NEW, FILE_FLAG_RANDOM_ACCESS, 0); ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateFileW("") returned ret=%p error=%d\n",hFile,GetLastError()); + "CreateFileW("") returned ret=%p error=%ld\n",hFile,GetLastError());
/* test the result of opening a nonexistent driver name */ hFile = CreateFileW(bogus, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_NOT_FOUND, - "CreateFileW on invalid VxD name returned ret=%p error=%d\n",hFile,GetLastError()); + "CreateFileW on invalid VxD name returned ret=%p error=%ld\n",hFile,GetLastError());
ret = CreateDirectoryW(filename, NULL); ok(ret == TRUE, "couldn't create temporary directory\n"); hFile = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, NULL); ok(hFile != INVALID_HANDLE_VALUE, - "expected CreateFile to succeed on existing directory, error: %d\n", GetLastError()); + "expected CreateFile to succeed on existing directory, error: %ld\n", GetLastError()); CloseHandle(hFile); ret = RemoveDirectoryW(filename); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError()); }
static void test_CreateFile2(void) @@ -1687,11 +1688,11 @@ static void test_CreateFile2(void) }
ret = GetTempPathW(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathW error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameW(temp_path, prefix, 0, filename); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %ld\n", GetLastError());
SetLastError(0xdeadbeef); exparams.dwSize = sizeof(exparams); @@ -1707,36 +1708,36 @@ static void test_CreateFile2(void) SetLastError(0xdeadbeef); hFile = pCreateFile2(filename, GENERIC_READ, FILE_SHARE_READ, CREATE_ALWAYS, &exparams); ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); + "hFile %p, last error %lu\n", hFile, GetLastError()); CloseHandle(hFile);
SetLastError(0xdeadbeef); hFile = pCreateFile2(filename, GENERIC_READ, FILE_SHARE_READ, OPEN_ALWAYS, &exparams); ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == ERROR_ALREADY_EXISTS, - "hFile %p, last error %u\n", hFile, GetLastError()); + "hFile %p, last error %lu\n", hFile, GetLastError()); CloseHandle(hFile);
ret = DeleteFileW(filename); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError());
SetLastError(0xdeadbeef); hFile = pCreateFile2(filename, GENERIC_READ, FILE_SHARE_READ, OPEN_ALWAYS, &exparams); ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == 0, - "hFile %p, last error %u\n", hFile, GetLastError()); + "hFile %p, last error %lu\n", hFile, GetLastError()); CloseHandle(hFile);
ret = DeleteFileW(filename); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError());
hFile = pCreateFile2(emptyW, GENERIC_READ, 0, CREATE_NEW, &exparams); ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_PATH_NOT_FOUND, - "CreateFile2("") returned ret=%p error=%d\n",hFile,GetLastError()); + "CreateFile2("") returned ret=%p error=%ld\n",hFile,GetLastError());
/* test the result of opening a nonexistent driver name */ exparams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; hFile = pCreateFile2(bogus, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING, &exparams); ok(hFile == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_NOT_FOUND, - "CreateFile2 on invalid VxD name returned ret=%p error=%d\n",hFile,GetLastError()); + "CreateFile2 on invalid VxD name returned ret=%p error=%ld\n",hFile,GetLastError());
ret = CreateDirectoryW(filename, NULL); ok(ret == TRUE, "couldn't create temporary directory\n"); @@ -1745,10 +1746,10 @@ static void test_CreateFile2(void) SetLastError(0xdeadbeef); hFile = pCreateFile2(filename, GENERIC_READ | GENERIC_WRITE, 0, OPEN_ALWAYS, &exparams); ok(hFile != INVALID_HANDLE_VALUE, - "CreateFile2 failed with FILE_FLAG_BACKUP_SEMANTICS on existing directory, error: %d\n", GetLastError()); + "CreateFile2 failed with FILE_FLAG_BACKUP_SEMANTICS on existing directory, error: %ld\n", GetLastError()); CloseHandle(hFile); ret = RemoveDirectoryW(filename); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError());
for (i = 0; i < 2; ++i) { @@ -1767,18 +1768,18 @@ static void test_CreateFile2(void)
SetLastError(0xdeadbeef); hFile = pCreateFile2(filename, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, CREATE_ALWAYS, &exparams); - ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == 0, "%d: hFile %p, last error %u\n", i, hFile, GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE && GetLastError() == 0, "%ld: hFile %p, last error %lu\n", i, hFile, GetLastError());
iocp = CreateIoCompletionPort(hFile, NULL, 0, 2); - if (i == 1) ok(iocp == NULL && GetLastError() == ERROR_INVALID_PARAMETER, "%d: CreateIoCompletionPort returned %p, error %u\n", i, iocp, GetLastError()); - else ok(iocp != INVALID_HANDLE_VALUE && GetLastError() == 0, "%d: CreateIoCompletionPort returned %p, error %u\n", i, iocp, GetLastError()); + if (i == 1) ok(iocp == NULL && GetLastError() == ERROR_INVALID_PARAMETER, "%ld: CreateIoCompletionPort returned %p, error %lu\n", i, iocp, GetLastError()); + else ok(iocp != INVALID_HANDLE_VALUE && GetLastError() == 0, "%ld: CreateIoCompletionPort returned %p, error %lu\n", i, iocp, GetLastError());
CloseHandle(iocp); CloseHandle(hFile);
ret = DeleteFileW(filename); - if (i == 1) ok(ret, "%d: unexpected DeleteFileW failure, error %u\n", i, GetLastError()); - else ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "%d: unexpected DeleteFileW result, ret %d error %u\n", i, ret, GetLastError()); + if (i == 1) ok(ret, "%ld: unexpected DeleteFileW failure, error %lu\n", i, GetLastError()); + else ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "%ld: unexpected DeleteFileW result, ret %ld error %lu\n", i, ret, GetLastError()); } }
@@ -1792,7 +1793,7 @@ static void test_GetTempFileNameA(void)
result = GetWindowsDirectoryA(windowsdir, sizeof(windowsdir)); ok(result < sizeof(windowsdir), "windowsdir is abnormally long!\n"); - ok(result != 0, "GetWindowsDirectory: error %d\n", GetLastError()); + ok(result != 0, "GetWindowsDirectory: error %ld\n", GetLastError());
/* If the Windows directory is the root directory, it ends in backslash, not else. */ if (strlen(windowsdir) != 3) /* As in "C:" or "F:" */ @@ -1805,13 +1806,13 @@ static void test_GetTempFileNameA(void) windowsdrive[2] = '\0';
result = GetTempFileNameA(windowsdrive, "abc", 1, out); - ok(result != 0, "GetTempFileNameA: error %d\n", GetLastError()); + ok(result != 0, "GetTempFileNameA: error %ld\n", GetLastError()); ok(((out[0] == windowsdrive[0]) && (out[1] == ':')) && (out[2] == '\'), "GetTempFileNameA: first three characters should be %c:\, string was actually %s\n", windowsdrive[0], out);
result = GetTempFileNameA(windowsdir, "abc", 2, out); - ok(result != 0, "GetTempFileNameA: error %d\n", GetLastError()); + ok(result != 0, "GetTempFileNameA: error %ld\n", GetLastError()); expected[0] = '\0'; strcat(expected, windowsdir); strcat(expected, "abc2.tmp"); @@ -1829,68 +1830,68 @@ static void test_DeleteFileA( void ) ret = DeleteFileA(NULL); ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_PATH_NOT_FOUND), - "DeleteFileA(NULL) returned ret=%d error=%d\n",ret,GetLastError()); + "DeleteFileA(NULL) returned ret=%d error=%ld\n",ret,GetLastError());
ret = DeleteFileA(""); ok(!ret && (GetLastError() == ERROR_PATH_NOT_FOUND || GetLastError() == ERROR_BAD_PATHNAME), - "DeleteFileA("") returned ret=%d error=%d\n",ret,GetLastError()); + "DeleteFileA("") returned ret=%d error=%ld\n",ret,GetLastError());
ret = DeleteFileA("nul"); ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == ERROR_INVALID_FUNCTION), - "DeleteFileA("nul") returned ret=%d error=%d\n",ret,GetLastError()); + "DeleteFileA("nul") returned ret=%d error=%ld\n",ret,GetLastError());
ret = DeleteFileA("nonexist.txt"); - ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "DeleteFileA("nonexist.txt") returned ret=%d error=%d\n",ret,GetLastError()); + ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "DeleteFileA("nonexist.txt") returned ret=%d error=%ld\n",ret,GetLastError());
GetTempPathA(MAX_PATH, temp_path); GetTempFileNameA(temp_path, "tst", 0, temp_file);
SetLastError(0xdeadbeef); hfile = CreateFileA(temp_file, GENERIC_READ, FILE_SHARE_DELETE | 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); ret = DeleteFileA(temp_file); - ok(ret, "DeleteFile error %d\n", GetLastError()); + ok(ret, "DeleteFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = CloseHandle(hfile); - ok(ret, "CloseHandle error %d\n", GetLastError()); + ok(ret, "CloseHandle error %ld\n", GetLastError()); ret = DeleteFileA(temp_file); ok(!ret, "DeleteFile should fail\n");
SetLastError(0xdeadbeef); ret = CreateDirectoryA("testdir", NULL); - ok(ret, "CreateDirectory failed, got err %d\n", GetLastError()); + ok(ret, "CreateDirectory failed, got err %ld\n", GetLastError()); ret = DeleteFileA("testdir"); ok(!ret && GetLastError() == ERROR_ACCESS_DENIED, - "Expected ERROR_ACCESS_DENIED, got error %d\n", GetLastError()); + "Expected ERROR_ACCESS_DENIED, got error %ld\n", GetLastError()); ret = RemoveDirectoryA("testdir"); - ok(ret, "Remove a directory failed, got error %d\n", GetLastError()); + ok(ret, "Remove a directory failed, got error %ld\n", GetLastError());
winetest_get_mainargs(&argv);
ret = CopyFileA(argv[0], temp_file, FALSE); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); hfile = CreateFileA(temp_file, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
mapping = CreateFileMappingA(hfile, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, NULL); - ok(!!mapping, "got error %u\n", GetLastError()); + ok(!!mapping, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = DeleteFileA(temp_file); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
CloseHandle(mapping);
ret = DeleteFileA(temp_file); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
CloseHandle(hfile); } @@ -1911,11 +1912,11 @@ static void test_DeleteFileW( void ) return; } ok(!ret && GetLastError() == ERROR_PATH_NOT_FOUND, - "DeleteFileW(NULL) returned ret=%d error=%d\n",ret,GetLastError()); + "DeleteFileW(NULL) returned ret=%d error=%ld\n",ret,GetLastError());
ret = DeleteFileW(emptyW); ok(!ret && GetLastError() == ERROR_PATH_NOT_FOUND, - "DeleteFileW("") returned ret=%d error=%d\n",ret,GetLastError()); + "DeleteFileW("") returned ret=%d error=%ld\n",ret,GetLastError());
/* test DeleteFile on empty directory */ ret = GetTempPathW(MAX_PATH, pathW); @@ -1961,40 +1962,40 @@ static void test_MoveFileA(void) BOOL retok;
ret = GetTempPathA(MAX_PATH, tempdir); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathA error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameA(tempdir, prefix, 0, source); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
ret = GetTempFileNameA(tempdir, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
ret = MoveFileA(source, source); - ok(ret, "MoveFileA: failed, error %d\n", GetLastError()); + ok(ret, "MoveFileA: failed, error %ld\n", GetLastError());
ret = MoveFileA(source, dest); ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS, - "MoveFileA: unexpected error %d\n", GetLastError()); + "MoveFileA: unexpected error %ld\n", GetLastError());
ret = DeleteFileA(dest); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); + ok(ret, "DeleteFileA: error %ld\n", GetLastError());
hfile = CreateFileA(source, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file\n");
retok = WriteFile(hfile, prefix, sizeof(prefix), &ret, NULL ); ok( retok && ret == sizeof(prefix), - "WriteFile error %d\n", GetLastError()); + "WriteFile error %ld\n", GetLastError());
hmapfile = CreateFileMappingW(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); + ok(hmapfile != NULL, "CreateFileMapping: error %ld\n", GetLastError());
ret = MoveFileA(source, dest); ok(!ret, "MoveFileA: expected failure\n"); ok(GetLastError() == ERROR_SHARING_VIOLATION || broken(GetLastError() == ERROR_ACCESS_DENIED), /* Win9x and WinMe */ - "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + "MoveFileA: expected ERROR_SHARING_VIOLATION, got %ld\n", GetLastError());
CloseHandle(hmapfile); CloseHandle(hfile); @@ -2006,13 +2007,13 @@ static void test_MoveFileA(void) ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file\n");
hmapfile = CreateFileMappingW(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError()); + ok(hmapfile != NULL, "CreateFileMapping: error %ld\n", GetLastError());
ret = MoveFileA(source, dest); ok(!ret, "MoveFileA: expected failure\n"); ok(GetLastError() == ERROR_SHARING_VIOLATION || broken(GetLastError() == ERROR_ACCESS_DENIED), /* Win9x and WinMe */ - "MoveFileA: expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + "MoveFileA: expected ERROR_SHARING_VIOLATION, got %ld\n", GetLastError());
CloseHandle(hmapfile); CloseHandle(hfile); @@ -2021,7 +2022,7 @@ static void test_MoveFileA(void) if (ret) MoveFileA(dest, source);
ret = MoveFileA(source, dest); - ok(ret, "MoveFileA: failed, error %d\n", GetLastError()); + ok(ret, "MoveFileA: failed, error %ld\n", GetLastError());
lstrcatA(tempdir, "Remove Me");
@@ -2034,10 +2035,10 @@ static void test_MoveFileA(void) CloseHandle(hfile);
ret = MoveFileA(source, tempdir); - ok(ret, "MoveFileA: failed, error %d\n", GetLastError()); + ok(ret, "MoveFileA: failed, error %ld\n", GetLastError());
hfile = FindFirstFileA(tempdir, &find_data); - ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %ld\n", GetLastError()); if (hfile != INVALID_HANDLE_VALUE) { todo_wine ok(!lstrcmpA(strrchr(tempdir, '\') + 1, find_data.cFileName), @@ -2054,14 +2055,14 @@ static void test_MoveFileA(void)
ret = MoveFileA(tempdir, source); ok(!ret, "MoveFileA: expected failure\n"); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "MoveFileA: expected ERROR_ALREADY_EXISTS, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "MoveFileA: expected ERROR_ALREADY_EXISTS, got %ld\n", GetLastError()); ret = MoveFileExA(tempdir, source, MOVEFILE_REPLACE_EXISTING); - ok(ret, "MoveFileExA: failed, error %d\n", GetLastError()); + ok(ret, "MoveFileExA: failed, error %ld\n", GetLastError());
tempdir[lstrlenA(tempdir) - 2] = 'm';
hfile = FindFirstFileA(tempdir, &find_data); - ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %ld\n", GetLastError()); if (hfile != INVALID_HANDLE_VALUE) { ok(!lstrcmpA(strrchr(source, '\') + 1, find_data.cFileName), @@ -2070,7 +2071,7 @@ static void test_MoveFileA(void) CloseHandle(hfile);
ret = DeleteFileA(tempdir); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); + ok(ret, "DeleteFileA: error %ld\n", GetLastError());
/* now test a directory from "Remove me" to uppercase "Me" */ ret = CreateDirectoryA(tempdir, NULL); @@ -2079,10 +2080,10 @@ static void test_MoveFileA(void) lstrcpyA(source, tempdir); tempdir[lstrlenA(tempdir) - 2] = 'M'; ret = MoveFileA(source, tempdir); - ok(ret, "MoveFileA: failed, error %d\n", GetLastError()); + ok(ret, "MoveFileA: failed, error %ld\n", GetLastError());
hfile = FindFirstFileA(tempdir, &find_data); - ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %d\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "FindFirstFileA: failed, error %ld\n", GetLastError()); if (hfile != INVALID_HANDLE_VALUE) { todo_wine ok(!lstrcmpA(strrchr(tempdir, '\') + 1, find_data.cFileName), @@ -2098,7 +2099,7 @@ static void test_MoveFileA(void) ok(!ret, "MoveFileA: shouldn't move to wildcard file\n"); ok(GetLastError() == ERROR_INVALID_NAME || /* NT */ GetLastError() == ERROR_FILE_NOT_FOUND, /* Win9x */ - "MoveFileA: with wildcards, unexpected error %d\n", GetLastError()); + "MoveFileA: with wildcards, unexpected error %ld\n", GetLastError()); if (ret || (GetLastError() != ERROR_INVALID_NAME)) { WIN32_FIND_DATAA fd; @@ -2123,11 +2124,11 @@ static void test_MoveFileA(void) } } ret = DeleteFileA(source); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); + ok(ret, "DeleteFileA: error %ld\n", GetLastError()); ret = DeleteFileA(dest); - ok(!ret, "DeleteFileA: error %d\n", GetLastError()); + ok(!ret, "DeleteFileA: error %ld\n", GetLastError()); ret = RemoveDirectoryA(tempdir); - ok(ret, "DeleteDirectoryA: error %d\n", GetLastError()); + ok(ret, "DeleteDirectoryA: error %ld\n", GetLastError()); }
static void test_MoveFileW(void) @@ -2143,23 +2144,23 @@ static void test_MoveFileW(void) win_skip("GetTempPathW is not available\n"); return; } - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathW error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameW(temp_path, prefix, 0, source); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %ld\n", GetLastError());
ret = GetTempFileNameW(temp_path, prefix, 0, dest); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %ld\n", GetLastError());
ret = MoveFileW(source, dest); ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS, - "CopyFileW: unexpected error %d\n", GetLastError()); + "CopyFileW: unexpected error %ld\n", GetLastError());
ret = DeleteFileW(source); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError()); ret = DeleteFileW(dest); - ok(ret, "DeleteFileW: error %d\n", GetLastError()); + ok(ret, "DeleteFileW: error %ld\n", GetLastError()); }
#define PATTERN_OFFSET 0x10 @@ -2176,19 +2177,19 @@ static void test_offset_in_overlapped_structure(void) BOOL ret;
ret =GetTempPathA(MAX_PATH, temp_path); - ok( ret, "GetTempPathA error %d\n", GetLastError()); + ok( ret, "GetTempPathA error %ld\n", GetLastError()); ret =GetTempFileNameA(temp_path, "pfx", 0, temp_fname); - ok( ret, "GetTempFileNameA error %d\n", GetLastError()); + ok( ret, "GetTempFileNameA error %ld\n", GetLastError());
/*** Write File *****************************************************/
hFile = CreateFileA(temp_fname, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA error %d\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA error %ld\n", GetLastError());
for(i = 0; i < sizeof(buf); i++) buf[i] = i; ret = WriteFile(hFile, buf, sizeof(buf), &done, NULL); - ok( ret, "WriteFile error %d\n", GetLastError()); - ok(done == sizeof(buf), "expected number of bytes written %u\n", done); + ok( ret, "WriteFile error %ld\n", GetLastError()); + ok(done == sizeof(buf), "expected number of bytes written %lu\n", done);
memset(&ov, 0, sizeof(ov)); S(U(ov)).Offset = PATTERN_OFFSET; @@ -2196,18 +2197,18 @@ static void test_offset_in_overlapped_structure(void) rc=WriteFile(hFile, pattern, sizeof(pattern), &done, &ov); /* Win 9x does not support the overlapped I/O on files */ if (rc || GetLastError()!=ERROR_INVALID_PARAMETER) { - ok(rc, "WriteFile error %d\n", GetLastError()); - ok(done == sizeof(pattern), "expected number of bytes written %u\n", done); + ok(rc, "WriteFile error %ld\n", GetLastError()); + ok(done == sizeof(pattern), "expected number of bytes written %lu\n", done); offset = SetFilePointer(hFile, 0, NULL, FILE_CURRENT); - ok(offset == PATTERN_OFFSET + sizeof(pattern), "wrong file offset %d\n", offset); + ok(offset == PATTERN_OFFSET + sizeof(pattern), "wrong file offset %ld\n", offset);
S(U(ov)).Offset = sizeof(buf) * 2; S(U(ov)).OffsetHigh = 0; ret = WriteFile(hFile, pattern, sizeof(pattern), &done, &ov); - ok( ret, "WriteFile error %d\n", GetLastError()); - ok(done == sizeof(pattern), "expected number of bytes written %u\n", done); + ok( ret, "WriteFile error %ld\n", GetLastError()); + ok(done == sizeof(pattern), "expected number of bytes written %lu\n", done); offset = SetFilePointer(hFile, 0, NULL, FILE_CURRENT); - ok(offset == sizeof(buf) * 2 + sizeof(pattern), "wrong file offset %d\n", offset); + ok(offset == sizeof(buf) * 2 + sizeof(pattern), "wrong file offset %ld\n", offset); }
CloseHandle(hFile); @@ -2215,7 +2216,7 @@ static void test_offset_in_overlapped_structure(void) /*** Read File *****************************************************/
hFile = CreateFileA(temp_fname, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA error %d\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA error %ld\n", GetLastError());
memset(buf, 0, sizeof(buf)); memset(&ov, 0, sizeof(ov)); @@ -2224,17 +2225,17 @@ static void test_offset_in_overlapped_structure(void) rc=ReadFile(hFile, buf, sizeof(pattern), &done, &ov); /* Win 9x does not support the overlapped I/O on files */ if (rc || GetLastError()!=ERROR_INVALID_PARAMETER) { - ok(rc, "ReadFile error %d\n", GetLastError()); - ok(done == sizeof(pattern), "expected number of bytes read %u\n", done); + ok(rc, "ReadFile error %ld\n", GetLastError()); + ok(done == sizeof(pattern), "expected number of bytes read %lu\n", done); offset = SetFilePointer(hFile, 0, NULL, FILE_CURRENT); - ok(offset == PATTERN_OFFSET + sizeof(pattern), "wrong file offset %d\n", offset); + ok(offset == PATTERN_OFFSET + sizeof(pattern), "wrong file offset %ld\n", offset); ok(!memcmp(buf, pattern, sizeof(pattern)), "pattern match failed\n"); }
CloseHandle(hFile);
ret = DeleteFileA(temp_fname); - ok( ret, "DeleteFileA error %d\n", GetLastError()); + ok( ret, "DeleteFileA error %ld\n", GetLastError()); }
static void test_LockFile(void) @@ -2251,7 +2252,7 @@ static void test_LockFile(void) CREATE_ALWAYS, 0, 0 ); if (handle == INVALID_HANDLE_VALUE) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; } handle2 = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, @@ -2259,7 +2260,7 @@ static void test_LockFile(void) OPEN_EXISTING, 0, 0 ); if (handle2 == INVALID_HANDLE_VALUE) { - ok( 0, "couldn't open file "%s" (err=%d)\n", filename, GetLastError() ); + ok( 0, "couldn't open file "%s" (err=%ld)\n", filename, GetLastError() ); goto cleanup; } ok( WriteFile( handle, sillytext, strlen(sillytext), &written, NULL ), "write failed\n" ); @@ -2336,7 +2337,7 @@ static void test_LockFile(void) ok( UnlockFile( handle, 0, 0x10000000, 0, 0xf0000000 ), "UnlockFile failed\n" ); } else /* win9x */ - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong LockFile error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong LockFile error %lu\n", GetLastError() );
/* wrap-around lock should not do anything */ /* (but still succeeds on NT4 so we don't check result) */ @@ -2506,7 +2507,7 @@ static void test_file_sharing(void) /* make sure the file exists */ if (!create_fake_dll( filename )) { - ok(0, "couldn't create file "%s" (err=%d)\n", filename, GetLastError()); + ok(0, "couldn't create file "%s" (err=%ld)\n", filename, GetLastError()); return; }
@@ -2519,7 +2520,7 @@ static void test_file_sharing(void) NULL, OPEN_EXISTING, 0, 0 ); if (h == INVALID_HANDLE_VALUE) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; } for (a2 = 0; a2 < ARRAY_SIZE(access_modes); a2++) @@ -2564,11 +2565,11 @@ static void test_file_sharing(void) h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); if (h == INVALID_HANDLE_VALUE) { - ok(0,"couldn't create file "%s" (err=%d)\n",filename,GetLastError()); + ok(0,"couldn't create file "%s" (err=%ld)\n",filename,GetLastError()); return; } m = CreateFileMappingA( h, NULL, mapping_modes[a1].dw, 0, 0, NULL ); - ok( m != 0, "failed to create mapping %s err %u\n", mapping_modes[a1].str, GetLastError() ); + ok( m != 0, "failed to create mapping %s err %lu\n", mapping_modes[a1].str, GetLastError() ); CloseHandle( h ); if (!m) continue;
@@ -2641,15 +2642,15 @@ static void test_file_sharing(void)
SetLastError(0xdeadbeef); h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0, 0 ); - ok( h != INVALID_HANDLE_VALUE, "CreateFileA error %d\n", GetLastError() ); + ok( h != INVALID_HANDLE_VALUE, "CreateFileA error %ld\n", GetLastError() );
SetLastError(0xdeadbeef); h2 = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); ok( h2 == INVALID_HANDLE_VALUE, "CreateFileA should fail\n"); - ok( GetLastError() == ERROR_SHARING_VIOLATION, "wrong error code %d\n", GetLastError() ); + ok( GetLastError() == ERROR_SHARING_VIOLATION, "wrong error code %ld\n", GetLastError() );
h2 = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 ); - ok( h2 != INVALID_HANDLE_VALUE, "CreateFileA error %d\n", GetLastError() ); + ok( h2 != INVALID_HANDLE_VALUE, "CreateFileA error %ld\n", GetLastError() );
CloseHandle(h); CloseHandle(h2); @@ -2770,15 +2771,15 @@ static void test_FindFirstFileA(void) ok( 0 == lstrcmpiA(data.cFileName, "nul"), "wrong name %s\n", data.cFileName ); ok( FILE_ATTRIBUTE_ARCHIVE == data.dwFileAttributes || FILE_ATTRIBUTE_DEVICE == data.dwFileAttributes /* Win9x */, - "wrong attributes %x\n", data.dwFileAttributes ); + "wrong attributes %lx\n", data.dwFileAttributes ); if (data.dwFileAttributes == FILE_ATTRIBUTE_ARCHIVE) { - ok( 0 == data.nFileSizeHigh, "wrong size %d\n", data.nFileSizeHigh ); - ok( 0 == data.nFileSizeLow, "wrong size %d\n", data.nFileSizeLow ); + ok( 0 == data.nFileSizeHigh, "wrong size %ld\n", data.nFileSizeHigh ); + ok( 0 == data.nFileSizeLow, "wrong size %ld\n", data.nFileSizeLow ); } SetLastError( 0xdeadbeaf ); ok( !FindNextFileA( handle, &data ), "FindNextFileA succeeded\n" ); - ok( GetLastError() == ERROR_NO_MORE_FILES, "bad error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_NO_MORE_FILES, "bad error %ld\n", GetLastError() ); ok( FindClose( handle ), "failed to close handle\n" );
/* try FindFirstFileA on "lpt1" */ @@ -2790,15 +2791,15 @@ static void test_FindFirstFileA(void) ok( 0 == lstrcmpiA(data.cFileName, "lpt1"), "wrong name %s\n", data.cFileName ); ok( FILE_ATTRIBUTE_ARCHIVE == data.dwFileAttributes || FILE_ATTRIBUTE_DEVICE == data.dwFileAttributes /* Win9x */, - "wrong attributes %x\n", data.dwFileAttributes ); + "wrong attributes %lx\n", data.dwFileAttributes ); if (data.dwFileAttributes == FILE_ATTRIBUTE_ARCHIVE) { - ok( 0 == data.nFileSizeHigh, "wrong size %d\n", data.nFileSizeHigh ); - ok( 0 == data.nFileSizeLow, "wrong size %d\n", data.nFileSizeLow ); + ok( 0 == data.nFileSizeHigh, "wrong size %ld\n", data.nFileSizeHigh ); + ok( 0 == data.nFileSizeLow, "wrong size %ld\n", data.nFileSizeLow ); } SetLastError( 0xdeadbeaf ); ok( !FindNextFileA( handle, &data ), "FindNextFileA succeeded\n" ); - ok( GetLastError() == ERROR_NO_MORE_FILES, "bad error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_NO_MORE_FILES, "bad error %ld\n", GetLastError() ); ok( FindClose( handle ), "failed to close handle\n" );
/* try FindFirstFileA on "c:\nul*" */ @@ -2873,7 +2874,7 @@ static void test_FindFirstFileExA(FINDEX_INFO_LEVELS level, FINDEX_SEARCH_OPS se return; }
- trace("Running FindFirstFileExA tests with level=%d, search_ops=%d, flags=%u\n", + trace("Running FindFirstFileExA tests with level=%d, search_ops=%d, flags=%lu\n", level, search_ops, flags);
CreateDirectoryA("test-dir", NULL); @@ -2901,7 +2902,7 @@ static void test_FindFirstFileExA(FINDEX_INFO_LEVELS level, FINDEX_SEARCH_OPS se #define CHECK_NAME(fn) (strcmp((fn), "file1") == 0 || strcmp((fn), "file2") == 0 || strcmp((fn), "dir1") == 0) #define CHECK_LEVEL(fn) (level != FindExInfoBasic || !(fn)[0])
- ok(handle != INVALID_HANDLE_VALUE, "FindFirstFile failed (err=%u)\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "FindFirstFile failed (err=%lu)\n", GetLastError()); ok(strcmp(search_results.cFileName, ".") == 0, "First entry should be '.', is %s\n", search_results.cFileName); ok(CHECK_LEVEL(search_results.cAlternateFileName), "FindFirstFile unexpectedly returned an alternate filename\n");
@@ -2948,12 +2949,12 @@ static void test_FindFirstFileExA(FINDEX_INFO_LEVELS level, FINDEX_SEARCH_OPS se if (flags & FIND_FIRST_EX_CASE_SENSITIVE) { ok(handle != INVALID_HANDLE_VALUE || GetLastError() == ERROR_PATH_NOT_FOUND, - "Unexpected error %x, expected valid handle or ERROR_PATH_NOT_FOUND\n", GetLastError()); + "Unexpected error %lx, expected valid handle or ERROR_PATH_NOT_FOUND\n", GetLastError()); trace("FindFirstFileExA flag FIND_FIRST_EX_CASE_SENSITIVE is %signored\n", (handle == INVALID_HANDLE_VALUE) ? "not " : ""); } else - ok(handle != INVALID_HANDLE_VALUE, "Unexpected error %x, expected valid handle\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "Unexpected error %lx, expected valid handle\n", GetLastError()); if (handle != INVALID_HANDLE_VALUE) FindClose( handle );
@@ -3153,19 +3154,19 @@ static void test_GetFileType(void) HANDLE h = CreateFileA( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); ok( h != INVALID_HANDLE_VALUE, "open %s failed\n", filename ); type = GetFileType(h); - ok( type == FILE_TYPE_DISK, "expected type disk got %d\n", type ); + ok( type == FILE_TYPE_DISK, "expected type disk got %ld\n", type ); CloseHandle( h ); h = CreateFileA( "nul", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); ok( h != INVALID_HANDLE_VALUE, "open nul failed\n" ); type = GetFileType(h); - ok( type == FILE_TYPE_CHAR, "expected type char for nul got %d\n", type ); + ok( type == FILE_TYPE_CHAR, "expected type char for nul got %ld\n", type ); CloseHandle( h ); DeleteFileA( filename ); h = GetStdHandle( STD_OUTPUT_HANDLE ); ok( h != INVALID_HANDLE_VALUE, "GetStdHandle failed\n" ); type = GetFileType( (HANDLE)STD_OUTPUT_HANDLE ); type2 = GetFileType( h ); - ok(type == type2, "expected type %d for STD_OUTPUT_HANDLE got %d\n", type2, type); + ok(type == type2, "expected type %ld for STD_OUTPUT_HANDLE got %ld\n", type2, type); }
static int completion_count; @@ -3236,36 +3237,36 @@ static void test_read_write(void) static const char prefix[] = "pfx";
ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathA error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameA(temp_path, prefix, 0, filename); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError());
hFile = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_RANDOM_ACCESS, 0); - ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError()); + ok(hFile != INVALID_HANDLE_VALUE, "CreateFileA: error %ld\n", GetLastError());
user_apc_ran = FALSE; ret = QueueUserAPC(&user_apc, GetCurrentThread(), 0); - ok(ret, "QueueUserAPC failed: %d\n", GetLastError()); + ok(ret, "QueueUserAPC failed: %ld\n", GetLastError());
SetLastError(12345678); bytes = 12345678; ret = WriteFile(hFile, NULL, 0, &bytes, NULL); ok(ret && GetLastError() == 12345678, - "ret = %d, error %d\n", ret, GetLastError()); - ok(!bytes, "bytes = %d\n", bytes); + "ret = %ld, error %ld\n", ret, GetLastError()); + ok(!bytes, "bytes = %ld\n", bytes);
SetLastError(12345678); bytes = 12345678; ret = WriteFile(hFile, NULL, 10, &bytes, NULL); ok((!ret && GetLastError() == ERROR_INVALID_USER_BUFFER) || /* Win2k */ (ret && GetLastError() == 12345678), /* Win9x */ - "ret = %d, error %d\n", ret, GetLastError()); + "ret = %ld, error %ld\n", ret, GetLastError()); ok(!bytes || /* Win2k */ bytes == 10, /* Win9x */ - "bytes = %d\n", bytes); + "bytes = %ld\n", bytes);
/* make sure the file contains data */ WriteFile(hFile, "this is the test data", 21, &bytes, NULL); @@ -3275,16 +3276,16 @@ static void test_read_write(void) bytes = 12345678; ret = ReadFile(hFile, NULL, 0, &bytes, NULL); ok(ret && GetLastError() == 12345678, - "ret = %d, error %d\n", ret, GetLastError()); - ok(!bytes, "bytes = %d\n", bytes); + "ret = %ld, error %ld\n", ret, GetLastError()); + ok(!bytes, "bytes = %ld\n", bytes);
SetLastError(12345678); bytes = 12345678; ret = ReadFile(hFile, NULL, 10, &bytes, NULL); ok(!ret && (GetLastError() == ERROR_NOACCESS || /* Win2k */ GetLastError() == ERROR_INVALID_PARAMETER), /* Win9x */ - "ret = %d, error %d\n", ret, GetLastError()); - ok(!bytes, "bytes = %d\n", bytes); + "ret = %ld, error %ld\n", ret, GetLastError()); + ok(!bytes, "bytes = %ld\n", bytes);
ok(user_apc_ran == FALSE, "UserAPC ran, file using alertable io mode\n"); SleepEx(0, TRUE); /* get rid of apc */ @@ -3292,38 +3293,38 @@ static void test_read_write(void) /* test passing protected memory as buffer */
mem = VirtualAlloc( NULL, 0x4000, MEM_COMMIT, PAGE_READWRITE ); - ok( mem != NULL, "failed to allocate virtual mem error %u\n", GetLastError() ); + ok( mem != NULL, "failed to allocate virtual mem error %lu\n", GetLastError() );
ret = WriteFile( hFile, mem, 0x4000, &bytes, NULL ); - ok( ret, "WriteFile failed error %u\n", GetLastError() ); - ok( bytes == 0x4000, "only wrote %x bytes\n", bytes ); + ok( ret, "WriteFile failed error %lu\n", GetLastError() ); + ok( bytes == 0x4000, "only wrote %lx bytes\n", bytes );
ret = VirtualProtect( mem + 0x2000, 0x2000, PAGE_NOACCESS, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); + ok( ret, "VirtualProtect failed error %lu\n", GetLastError() );
ret = WriteFile( hFile, mem, 0x4000, &bytes, NULL ); ok( !ret, "WriteFile succeeded\n" ); ok( GetLastError() == ERROR_INVALID_USER_BUFFER || GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "wrote %x bytes\n", bytes ); + "wrong error %lu\n", GetLastError() ); + ok( bytes == 0, "wrote %lx bytes\n", bytes );
ret = WriteFile( (HANDLE)0xdead, mem, 0x4000, &bytes, NULL ); ok( !ret, "WriteFile succeeded\n" ); ok( GetLastError() == ERROR_INVALID_HANDLE || /* handle is checked before buffer on NT */ GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "wrote %x bytes\n", bytes ); + "wrong error %lu\n", GetLastError() ); + ok( bytes == 0, "wrote %lx bytes\n", bytes );
ret = VirtualProtect( mem, 0x2000, PAGE_NOACCESS, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); + ok( ret, "VirtualProtect failed error %lu\n", GetLastError() );
ret = WriteFile( hFile, mem, 0x4000, &bytes, NULL ); ok( !ret, "WriteFile succeeded\n" ); ok( GetLastError() == ERROR_INVALID_USER_BUFFER || GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "wrote %x bytes\n", bytes ); + "wrong error %lu\n", GetLastError() ); + ok( bytes == 0, "wrote %lx bytes\n", bytes );
SetFilePointer( hFile, 0, NULL, FILE_BEGIN );
@@ -3331,28 +3332,28 @@ static void test_read_write(void) ok( !ret, "ReadFile succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); + "wrong error %lu\n", GetLastError() ); + ok( bytes == 0, "read %lx bytes\n", bytes );
ret = VirtualProtect( mem, 0x2000, PAGE_READONLY, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); + ok( ret, "VirtualProtect failed error %lu\n", GetLastError() );
ret = ReadFile( hFile, mem, 0x4000, &bytes, NULL ); ok( !ret, "ReadFile succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); + "wrong error %lu\n", GetLastError() ); + ok( bytes == 0, "read %lx bytes\n", bytes );
ret = VirtualProtect( mem, 0x2000, PAGE_READWRITE, &old_prot ); - ok( ret, "VirtualProtect failed error %u\n", GetLastError() ); + ok( ret, "VirtualProtect failed error %lu\n", GetLastError() );
ret = ReadFile( hFile, mem, 0x4000, &bytes, NULL ); ok( !ret, "ReadFile succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); + "wrong error %lu\n", GetLastError() ); + ok( bytes == 0, "read %lx bytes\n", bytes );
SetFilePointer( hFile, 0x1234, NULL, FILE_BEGIN ); SetEndOfFile( hFile ); @@ -3362,26 +3363,26 @@ static void test_read_write(void) ok( !ret, "ReadFile succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); + "wrong error %lu\n", GetLastError() ); + ok( bytes == 0, "read %lx bytes\n", bytes );
ret = ReadFile( hFile, mem, 0x2000, &bytes, NULL ); - ok( ret, "ReadFile failed error %u\n", GetLastError() ); - ok( bytes == 0x1234, "read %x bytes\n", bytes ); + ok( ret, "ReadFile failed error %lu\n", GetLastError() ); + ok( bytes == 0x1234, "read %lx bytes\n", bytes );
ret = ReadFile( hFile, NULL, 1, &bytes, NULL ); ok( !ret, "ReadFile succeeded\n" ); ok( GetLastError() == ERROR_NOACCESS || GetLastError() == ERROR_INVALID_PARAMETER, /* win9x */ - "wrong error %u\n", GetLastError() ); - ok( bytes == 0, "read %x bytes\n", bytes ); + "wrong error %lu\n", GetLastError() ); + ok( bytes == 0, "read %lx bytes\n", bytes );
VirtualFree( mem, 0, MEM_RELEASE );
ret = CloseHandle(hFile); - ok( ret, "CloseHandle: error %d\n", GetLastError()); + ok( ret, "CloseHandle: error %ld\n", GetLastError()); ret = DeleteFileA(filename); - ok( ret, "DeleteFileA: error %d\n", GetLastError()); + ok( ret, "DeleteFileA: error %ld\n", GetLastError()); }
static void test_OpenFile(void) @@ -3420,9 +3421,9 @@ static void test_OpenFile(void) SetLastError(0xfaceabee);
hFile = OpenFile(buff, &ofs, OF_EXIST); - ok( hFile == TRUE, "%s not found : %d\n", buff, GetLastError() ); + ok( hFile == TRUE, "%s not found : %ld\n", buff, GetLastError() ); ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); + "GetLastError() returns %ld\n", GetLastError() ); ok( ofs.cBytes == sizeof(ofs), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); ok( ofs.nErrCode == ERROR_SUCCESS, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); ok( lstrcmpiA(ofs.szPathName, buff) == 0, @@ -3443,8 +3444,8 @@ static void test_OpenFile(void) SetLastError(0xfaceabee);
hFile = OpenFile(foo, &ofs, OF_EXIST); - ok( hFile == HFILE_ERROR, "hFile != HFILE_ERROR : %d\n", GetLastError()); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() returns %d\n", GetLastError() ); + ok( hFile == HFILE_ERROR, "hFile != HFILE_ERROR : %ld\n", GetLastError()); + ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetLastError() returns %ld\n", GetLastError() ); todo_wine ok( ofs.cBytes == 0xA5, "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); ok( ofs.nErrCode == ERROR_FILE_NOT_FOUND, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); @@ -3464,9 +3465,9 @@ static void test_OpenFile(void) SetLastError(0xfaceabee);
hFile = OpenFile(foo_too_long, &ofs, OF_EXIST); - ok( hFile == HFILE_ERROR, "hFile != HFILE_ERROR : %d\n", GetLastError()); + ok( hFile == HFILE_ERROR, "hFile != HFILE_ERROR : %ld\n", GetLastError()); ok( GetLastError() == ERROR_INVALID_DATA || GetLastError() == ERROR_FILENAME_EXCED_RANGE, - "GetLastError() returns %d\n", GetLastError() ); + "GetLastError() returns %ld\n", GetLastError() ); todo_wine ok( ofs.cBytes == 0xA5, "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); ok( ofs.nErrCode == ERROR_INVALID_DATA || ofs.nErrCode == ERROR_FILENAME_EXCED_RANGE, @@ -3482,14 +3483,14 @@ static void test_OpenFile(void) hFile = OpenFile(filename, &ofs, OF_CREATE); ok( hFile != HFILE_ERROR, "OpenFile failed to create nonexistent file\n" ); ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); + "GetLastError() returns %ld\n", GetLastError() ); ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); ret = _lclose(hFile); ok( !ret, "_lclose() returns %d\n", ret ); retval = GetFileAttributesA(filename); - ok( retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA: error %d\n", GetLastError() ); + ok( retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributesA: error %ld\n", GetLastError() );
memset(&ofs, 0xA5, sizeof(ofs)); SetLastError(0xfaceabee); @@ -3498,7 +3499,7 @@ static void test_OpenFile(void) hFile = OpenFile(filename, &ofs, OF_READ); ok( hFile != HFILE_ERROR, "OpenFile failed on read\n" ); ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); + "GetLastError() returns %ld\n", GetLastError() ); ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); @@ -3513,7 +3514,7 @@ static void test_OpenFile(void) hFile = OpenFile(filename, &ofs, OF_WRITE); ok( hFile != HFILE_ERROR, "OpenFile failed on write\n" ); ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); + "GetLastError() returns %ld\n", GetLastError() ); ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); @@ -3528,7 +3529,7 @@ static void test_OpenFile(void) hFile = OpenFile(filename, &ofs, OF_READWRITE); ok( hFile != HFILE_ERROR, "OpenFile failed on read/write\n" ); ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); + "GetLastError() returns %ld\n", GetLastError() ); ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); @@ -3543,7 +3544,7 @@ static void test_OpenFile(void) hFile = OpenFile(filename, &ofs, OF_EXIST); ok( hFile == 1, "OpenFile failed on finding our created file\n" ); ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); + "GetLastError() returns %ld\n", GetLastError() ); ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); @@ -3556,7 +3557,7 @@ static void test_OpenFile(void) hFile = OpenFile(filename, &ofs, OF_DELETE); ok( hFile == 1, "OpenFile failed on delete (%d)\n", hFile ); ok( GetLastError() == 0xfaceabee || GetLastError() == ERROR_SUCCESS, - "GetLastError() returns %d\n", GetLastError() ); + "GetLastError() returns %ld\n", GetLastError() ); ok( ofs.cBytes == sizeof(OFSTRUCT), "OpenFile set ofs.cBytes to %d\n", ofs.cBytes ); ok( ofs.nErrCode == ERROR_SUCCESS || broken(ofs.nErrCode != ERROR_SUCCESS) /* win9x */, "OpenFile set ofs.nErrCode to %d\n", ofs.nErrCode ); @@ -3584,27 +3585,27 @@ static void test_overlapped(void) result = 1; r = GetOverlappedResult(0, &ov, &result, 0); if (r) - ok( result == 0, "wrong result %u\n", result ); + ok( result == 0, "wrong result %lu\n", result ); else /* win9x */ - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() );
result = 0; ov.Internal = 0; ov.InternalHigh = 0xabcd; r = GetOverlappedResult(0, &ov, &result, 0); if (r) - ok( result == 0xabcd, "wrong result %u\n", result ); + ok( result == 0xabcd, "wrong result %lu\n", result ); else /* win9x */ - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() );
SetLastError( 0xb00 ); result = 0; ov.Internal = STATUS_INVALID_HANDLE; ov.InternalHigh = 0xabcd; r = GetOverlappedResult(0, &ov, &result, 0); - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() ); ok( r == FALSE, "should return false\n"); - ok( result == 0xabcd || result == 0 /* win9x */, "wrong result %u\n", result ); + ok( result == 0xabcd || result == 0 /* win9x */, "wrong result %lu\n", result );
SetLastError( 0xb00 ); result = 0; @@ -3612,9 +3613,9 @@ static void test_overlapped(void) ov.InternalHigh = 0xabcd; r = GetOverlappedResult(0, &ov, &result, 0); ok( GetLastError() == ERROR_IO_INCOMPLETE || GetLastError() == ERROR_INVALID_HANDLE /* win9x */, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); ok( r == FALSE, "should return false\n"); - ok( result == 0, "wrong result %u\n", result ); + ok( result == 0, "wrong result %lu\n", result );
SetLastError( 0xb00 ); ov.hEvent = CreateEventW( NULL, 1, 1, NULL ); @@ -3622,13 +3623,13 @@ static void test_overlapped(void) ov.InternalHigh = 0xabcd; r = GetOverlappedResult(0, &ov, &result, 0); ok( GetLastError() == ERROR_IO_INCOMPLETE || GetLastError() == ERROR_INVALID_HANDLE /* win9x */, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); ok( r == FALSE, "should return false\n");
r = GetOverlappedResult( 0, &ov, &result, TRUE ); ok( r == TRUE, "should return TRUE\n" ); - ok( result == 0xabcd, "wrong result %u\n", result ); - ok( ov.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", ov.Internal ); + ok( result == 0xabcd, "wrong result %lu\n", result ); + ok( ov.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08Ix\n", ov.Internal );
ResetEvent( ov.hEvent );
@@ -3637,7 +3638,7 @@ static void test_overlapped(void) ov.InternalHigh = 0; r = GetOverlappedResult(0, &ov, &result, 0); ok( GetLastError() == ERROR_IO_INCOMPLETE || GetLastError() == ERROR_INVALID_HANDLE /* win9x */, - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); ok( r == FALSE, "should return false\n");
r = CloseHandle( ov.hEvent ); @@ -3650,19 +3651,19 @@ static void test_RemoveDirectory(void) char directory[] = "removeme";
rc = CreateDirectoryA(directory, NULL); - ok( rc, "Createdirectory failed, gle=%d\n", GetLastError() ); + ok( rc, "Createdirectory failed, gle=%ld\n", GetLastError() );
rc = SetCurrentDirectoryA(directory); - ok( rc, "SetCurrentDirectory failed, gle=%d\n", GetLastError() ); + ok( rc, "SetCurrentDirectory failed, gle=%ld\n", GetLastError() );
rc = RemoveDirectoryA("."); if (!rc) { rc = SetCurrentDirectoryA(".."); - ok( rc, "SetCurrentDirectory failed, gle=%d\n", GetLastError() ); + ok( rc, "SetCurrentDirectory failed, gle=%ld\n", GetLastError() );
rc = RemoveDirectoryA(directory); - ok( rc, "RemoveDirectory failed, gle=%d\n", GetLastError() ); + ok( rc, "RemoveDirectory failed, gle=%ld\n", GetLastError() ); } }
@@ -3688,17 +3689,17 @@ static void test_ReplaceFileA(void) char **argv;
ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathA error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameA(temp_path, prefix, 0, replaced); - ok(ret != 0, "GetTempFileNameA error (replaced) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error (replaced) %ld\n", GetLastError());
ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error (replacement) %ld\n", GetLastError());
ret = GetTempFileNameA(temp_path, prefix, 0, backup); - ok(ret != 0, "GetTempFileNameA error (backup) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error (backup) %ld\n", GetLastError());
/* place predictable data in the file to be replaced */ hReplacedFile = CreateFileA(replaced, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0 ); @@ -3706,7 +3707,7 @@ static void test_ReplaceFileA(void) "failed to open replaced file\n"); retok = WriteFile(hReplacedFile, replacedData, sizeof(replacedData), &ret, NULL ); ok( retok && ret == sizeof(replacedData), - "WriteFile error (replaced) %d\n", GetLastError()); + "WriteFile error (replaced) %ld\n", GetLastError()); ok(GetFileSize(hReplacedFile, NULL) == sizeof(replacedData), "replaced file has wrong size\n"); /* place predictable data in the file to be the replacement */ @@ -3715,7 +3716,7 @@ static void test_ReplaceFileA(void) "failed to open replacement file\n"); retok = WriteFile(hReplacementFile, replacementData, sizeof(replacementData), &ret, NULL ); ok( retok && ret == sizeof(replacementData), - "WriteFile error (replacement) %d\n", GetLastError()); + "WriteFile error (replacement) %ld\n", GetLastError()); ok(GetFileSize(hReplacementFile, NULL) == sizeof(replacementData), "replacement file has wrong size\n"); /* place predictable data in the backup file (to be over-written) */ @@ -3724,28 +3725,28 @@ static void test_ReplaceFileA(void) "failed to open backup file\n"); retok = WriteFile(hBackupFile, backupData, sizeof(backupData), &ret, NULL ); ok( retok && ret == sizeof(backupData), - "WriteFile error (replacement) %d\n", GetLastError()); + "WriteFile error (replacement) %ld\n", GetLastError()); ok(GetFileSize(hBackupFile, NULL) == sizeof(backupData), "backup file has wrong size\n"); /* change the filetime on the "replaced" file to ensure that it changes */ ret = GetFileTime(hReplacedFile, NULL, NULL, &ftReplaced); - ok( ret, "GetFileTime error (replaced) %d\n", GetLastError()); + ok( ret, "GetFileTime error (replaced) %ld\n", GetLastError()); ftReplaced.dwLowDateTime -= 600000000; /* 60 second */ ret = SetFileTime(hReplacedFile, NULL, NULL, &ftReplaced); - ok( ret, "SetFileTime error (replaced) %d\n", GetLastError()); + ok( ret, "SetFileTime error (replaced) %ld\n", GetLastError()); GetFileTime(hReplacedFile, NULL, NULL, &ftReplaced); /* get the actual time back */ CloseHandle(hReplacedFile); /* change the filetime on the backup to ensure that it changes */ ret = GetFileTime(hBackupFile, NULL, NULL, &ftBackup); - ok( ret, "GetFileTime error (backup) %d\n", GetLastError()); + ok( ret, "GetFileTime error (backup) %ld\n", GetLastError()); ftBackup.dwLowDateTime -= 1200000000; /* 120 second */ ret = SetFileTime(hBackupFile, NULL, NULL, &ftBackup); - ok( ret, "SetFileTime error (backup) %d\n", GetLastError()); + ok( ret, "SetFileTime error (backup) %ld\n", GetLastError()); GetFileTime(hBackupFile, NULL, NULL, &ftBackup); /* get the actual time back */ CloseHandle(hBackupFile); /* get the filetime on the replacement file to perform checks */ ret = GetFileTime(hReplacementFile, NULL, NULL, &ftReplacement); - ok( ret, "GetFileTime error (replacement) %d\n", GetLastError()); + ok( ret, "GetFileTime error (replacement) %ld\n", GetLastError()); CloseHandle(hReplacementFile);
/* perform replacement w/ backup @@ -3753,37 +3754,37 @@ static void test_ReplaceFileA(void) */ SetLastError(0xdeadbeef); ret = ReplaceFileA(replaced, replacement, backup, 0, 0, 0); - ok(ret, "ReplaceFileA: unexpected error %d\n", GetLastError()); + ok(ret, "ReplaceFileA: unexpected error %ld\n", GetLastError()); /* make sure that the backup has the size of the old "replaced" file */ hBackupFile = CreateFileA(backup, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); ok(hBackupFile != INVALID_HANDLE_VALUE, "failed to open backup file\n"); ret = GetFileSize(hBackupFile, NULL); ok(ret == sizeof(replacedData), - "backup file has wrong size %d\n", ret); + "backup file has wrong size %ld\n", ret); /* make sure that the "replaced" file has the size of the replacement file */ hReplacedFile = CreateFileA(replaced, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); ok(hReplacedFile != INVALID_HANDLE_VALUE, - "failed to open replaced file: %d\n", GetLastError()); + "failed to open replaced file: %ld\n", GetLastError()); if (hReplacedFile != INVALID_HANDLE_VALUE) { ret = GetFileSize(hReplacedFile, NULL); ok(ret == sizeof(replacementData), - "replaced file has wrong size %d\n", ret); + "replaced file has wrong size %ld\n", ret); /* make sure that the replacement file no-longer exists */ hReplacementFile = CreateFileA(replacement, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); ok(hReplacementFile == INVALID_HANDLE_VALUE, - "unexpected error, replacement file should not exist %d\n", GetLastError()); + "unexpected error, replacement file should not exist %ld\n", GetLastError()); /* make sure that the backup has the old "replaced" filetime */ ret = GetFileTime(hBackupFile, NULL, NULL, &ftBackup); - ok( ret, "GetFileTime error (backup %d\n", GetLastError()); + ok( ret, "GetFileTime error (backup %ld\n", GetLastError()); ok(check_file_time(&ftBackup, &ftReplaced, 20000000), "backup file has wrong filetime\n"); CloseHandle(hBackupFile); /* make sure that the "replaced" has the old replacement filetime */ ret = GetFileTime(hReplacedFile, NULL, NULL, &ftReplaced); - ok( ret, "GetFileTime error (backup %d\n", GetLastError()); + ok( ret, "GetFileTime error (backup %ld\n", GetLastError()); ok(check_file_time(&ftReplaced, &ftReplacement, 20000000), - "replaced file has wrong filetime %x%08x / %x%08x\n", + "replaced file has wrong filetime %lx%08lx / %lx%08lx\n", ftReplaced.dwHighDateTime, ftReplaced.dwLowDateTime, ftReplacement.dwHighDateTime, ftReplacement.dwLowDateTime ); CloseHandle(hReplacedFile); @@ -3793,64 +3794,64 @@ static void test_ReplaceFileA(void)
/* re-create replacement file for pass w/o backup (blank) */ ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error (replacement) %ld\n", GetLastError()); /* perform replacement w/o backup * TODO: flags are not implemented */ SetLastError(0xdeadbeef); ret = ReplaceFileA(replaced, replacement, NULL, 0, 0, 0); ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "ReplaceFileA: unexpected error %d\n", GetLastError()); + "ReplaceFileA: unexpected error %ld\n", GetLastError());
/* re-create replacement file for pass w/ backup (backup-file not existing) */ DeleteFileA(replacement); ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error (replacement) %ld\n", GetLastError()); ret = DeleteFileA(backup); - ok(ret, "DeleteFileA: error (backup) %d\n", GetLastError()); + ok(ret, "DeleteFileA: error (backup) %ld\n", GetLastError()); /* perform replacement w/ backup (no pre-existing backup) * TODO: flags are not implemented */ SetLastError(0xdeadbeef); ret = ReplaceFileA(replaced, replacement, backup, 0, 0, 0); ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "ReplaceFileA: unexpected error %d\n", GetLastError()); + "ReplaceFileA: unexpected error %ld\n", GetLastError()); if (ret) removeBackup = TRUE;
/* re-create replacement file for pass w/ no permissions to "replaced" */ DeleteFileA(replacement); ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error (replacement) %ld\n", GetLastError()); ret = SetFileAttributesA(replaced, FILE_ATTRIBUTE_READONLY); ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "SetFileAttributesA: error setting to read only %d\n", GetLastError()); + "SetFileAttributesA: error setting to read only %ld\n", GetLastError()); /* perform replacement w/ backup (no permission to "replaced") * TODO: flags are not implemented */ SetLastError(0xdeadbeef); ret = ReplaceFileA(replaced, replacement, backup, 0, 0, 0); - ok(ret == 0 && GetLastError() == ERROR_ACCESS_DENIED, "ReplaceFileA: unexpected error %d\n", GetLastError()); + ok(ret == 0 && GetLastError() == ERROR_ACCESS_DENIED, "ReplaceFileA: unexpected error %ld\n", GetLastError()); /* make sure that the replacement file still exists */ hReplacementFile = CreateFileA(replacement, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); ok(hReplacementFile != INVALID_HANDLE_VALUE || broken(GetLastError() == ERROR_FILE_NOT_FOUND), /* win2k */ - "unexpected error, replacement file should still exist %d\n", GetLastError()); + "unexpected error, replacement file should still exist %ld\n", GetLastError()); CloseHandle(hReplacementFile); ret = SetFileAttributesA(replaced, FILE_ATTRIBUTE_NORMAL); ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "SetFileAttributesA: error setting to normal %d\n", GetLastError()); + "SetFileAttributesA: error setting to normal %ld\n", GetLastError());
/* replacement readonly */ DeleteFileA(replacement); ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %#x\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error (replacement) %#lx\n", GetLastError()); ret = SetFileAttributesA(replacement, FILE_ATTRIBUTE_READONLY); - ok(ret, "SetFileAttributesA: error setting to readonly %#x\n", GetLastError()); + ok(ret, "SetFileAttributesA: error setting to readonly %#lx\n", GetLastError()); ret = ReplaceFileA(replaced, replacement, NULL, 0, 0, 0); - ok(GetLastError() == ERROR_ACCESS_DENIED, "ReplaceFileA: unexpected error %#x\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "ReplaceFileA: unexpected error %#lx\n", GetLastError()); ret = SetFileAttributesA(replacement, FILE_ATTRIBUTE_NORMAL); - ok(ret, "SetFileAttributesA: error setting to normal %#x\n", GetLastError()); + ok(ret, "SetFileAttributesA: error setting to normal %#lx\n", GetLastError());
/* re-create replacement file for pass w/ replaced opened with * the same permissions as an exe (Replicating an exe trying to @@ -3858,32 +3859,32 @@ static void test_ReplaceFileA(void) */ DeleteFileA(replacement); ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error (replacement) %ld\n", GetLastError());
/* make sure that the replaced file is opened like an exe*/ hReplacedFile = CreateFileA(replaced, GENERIC_READ | SYNCHRONIZE, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0); ok(hReplacedFile != INVALID_HANDLE_VALUE, - "unexpected error, replaced file should be able to be opened %d\n", GetLastError()); + "unexpected error, replaced file should be able to be opened %ld\n", GetLastError()); /*Calling ReplaceFileA on an exe should succeed*/ ret = ReplaceFileA(replaced, replacement, NULL, 0, 0, 0); - ok(ret, "ReplaceFileA: unexpected error %d\n", GetLastError()); + ok(ret, "ReplaceFileA: unexpected error %ld\n", GetLastError()); CloseHandle(hReplacedFile);
/* replace file while replacement is opened */ ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameA error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error (replacement) %ld\n", GetLastError()); hReplacementFile = CreateFileA(replacement, GENERIC_READ | SYNCHRONIZE, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0); - ok(hReplacementFile != INVALID_HANDLE_VALUE, "unexpected error, replacement file should be able to be opened %d\n", + ok(hReplacementFile != INVALID_HANDLE_VALUE, "unexpected error, replacement file should be able to be opened %ld\n", GetLastError()); ret = ReplaceFileA(replaced, replacement, NULL, 0, 0, 0); ok(!ret, "expect failure\n"); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "expect ERROR_SHARING_VIOLATION, got %#x.\n", GetLastError()); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "expect ERROR_SHARING_VIOLATION, got %#lx.\n", GetLastError()); CloseHandle(hReplacementFile);
/* replacement file still exists, make pass w/o "replaced" */ ret = DeleteFileA(replaced); ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "DeleteFileA: error (replaced) %d\n", GetLastError()); + "DeleteFileA: error (replaced) %ld\n", GetLastError()); /* perform replacement w/ backup (no pre-existing backup or "replaced") * TODO: flags are not implemented */ @@ -3891,7 +3892,7 @@ static void test_ReplaceFileA(void) ret = ReplaceFileA(replaced, replacement, backup, 0, 0, 0); ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_ACCESS_DENIED), - "ReplaceFileA: unexpected error %d\n", GetLastError()); + "ReplaceFileA: unexpected error %ld\n", GetLastError());
/* perform replacement w/o existing "replacement" file * TODO: flags are not implemented @@ -3900,7 +3901,7 @@ static void test_ReplaceFileA(void) ret = ReplaceFileA(replaced, replacement, NULL, 0, 0, 0); ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_ACCESS_DENIED), - "ReplaceFileA: unexpected error %d\n", GetLastError()); + "ReplaceFileA: unexpected error %ld\n", GetLastError()); DeleteFileA( replacement );
/* @@ -3915,45 +3916,45 @@ static void test_ReplaceFileA(void) ret = DeleteFileA(backup); ok(ret || broken(GetLastError() == ERROR_ACCESS_DENIED), /* win2k */ - "DeleteFileA: error (backup) %d\n", GetLastError()); + "DeleteFileA: error (backup) %ld\n", GetLastError()); }
ret = GetTempFileNameA(temp_path, prefix, 0, replaced); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); hReplacedFile = CreateFileA(replaced, 0, 0, NULL, OPEN_EXISTING, 0, 0); - ok(hReplacedFile != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(hReplacedFile != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = ReplaceFileA(replaced, replacement, NULL, 0, 0, 0); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
CloseHandle(hReplacedFile); ret = DeleteFileA(replaced); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
winetest_get_mainargs(&argv);
ret = CopyFileA(argv[0], replaced, FALSE); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); hReplacedFile = CreateFileA(replaced, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0); - ok(hReplacedFile != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(hReplacedFile != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
mapping = CreateFileMappingA(hReplacedFile, NULL, PAGE_READONLY | SEC_IMAGE, 0, 0, NULL); - ok(!!mapping, "got error %u\n", GetLastError()); + ok(!!mapping, "got error %lu\n", GetLastError());
ret = GetTempFileNameA(temp_path, prefix, 0, replacement); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
ret = ReplaceFileA(replaced, replacement, NULL, 0, 0, 0); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
CloseHandle(mapping); CloseHandle(hReplacedFile); ret = DeleteFileA(replaced); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); }
/* @@ -3980,60 +3981,60 @@ static void test_ReplaceFileW(void) win_skip("GetTempPathW is not available\n"); return; } - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathW error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameW(temp_path, prefix, 0, replaced); - ok(ret != 0, "GetTempFileNameW error (replaced) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error (replaced) %ld\n", GetLastError());
ret = GetTempFileNameW(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameW error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error (replacement) %ld\n", GetLastError());
ret = GetTempFileNameW(temp_path, prefix, 0, backup); - ok(ret != 0, "GetTempFileNameW error (backup) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error (backup) %ld\n", GetLastError());
ret = pReplaceFileW(replaced, replacement, backup, 0, 0, 0); - ok(ret, "ReplaceFileW: error %d\n", GetLastError()); + ok(ret, "ReplaceFileW: error %ld\n", GetLastError());
ret = GetTempFileNameW(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameW error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error (replacement) %ld\n", GetLastError()); ret = pReplaceFileW(replaced, replacement, NULL, 0, 0, 0); ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "ReplaceFileW: error %d\n", GetLastError()); + "ReplaceFileW: error %ld\n", GetLastError());
ret = GetTempFileNameW(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameW error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error (replacement) %ld\n", GetLastError()); ret = DeleteFileW(backup); - ok(ret, "DeleteFileW: error (backup) %d\n", GetLastError()); + ok(ret, "DeleteFileW: error (backup) %ld\n", GetLastError()); ret = pReplaceFileW(replaced, replacement, backup, 0, 0, 0); ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "ReplaceFileW: error %d\n", GetLastError()); + "ReplaceFileW: error %ld\n", GetLastError());
ret = GetTempFileNameW(temp_path, prefix, 0, replacement); - ok(ret != 0, "GetTempFileNameW error (replacement) %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error (replacement) %ld\n", GetLastError()); ret = SetFileAttributesW(replaced, FILE_ATTRIBUTE_READONLY); ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "SetFileAttributesW: error setting to read only %d\n", GetLastError()); + "SetFileAttributesW: error setting to read only %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = pReplaceFileW(replaced, replacement, backup, 0, 0, 0); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError()); ret = SetFileAttributesW(replaced, FILE_ATTRIBUTE_NORMAL); ok(ret || GetLastError() == ERROR_ACCESS_DENIED, - "SetFileAttributesW: error setting to normal %d\n", GetLastError()); + "SetFileAttributesW: error setting to normal %ld\n", GetLastError()); if (ret) removeBackup = TRUE;
ret = DeleteFileW(replaced); - ok(ret, "DeleteFileW: error (replaced) %d\n", GetLastError()); + ok(ret, "DeleteFileW: error (replaced) %ld\n", GetLastError()); ret = pReplaceFileW(replaced, replacement, backup, 0, 0, 0); - ok(!ret, "ReplaceFileW: error %d\n", GetLastError()); + ok(!ret, "ReplaceFileW: error %ld\n", GetLastError());
ret = pReplaceFileW(replaced, replacement, NULL, 0, 0, 0); ok(!ret && (GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_ACCESS_DENIED), - "ReplaceFileW: unexpected error %d\n", GetLastError()); + "ReplaceFileW: unexpected error %ld\n", GetLastError()); DeleteFileW( replacement );
if (removeBackup) @@ -4041,7 +4042,7 @@ static void test_ReplaceFileW(void) ret = DeleteFileW(backup); ok(ret || broken(GetLastError() == ERROR_ACCESS_DENIED), /* win2k */ - "DeleteFileW: error (backup) %d\n", GetLastError()); + "DeleteFileW: error (backup) %ld\n", GetLastError()); } }
@@ -4100,25 +4101,25 @@ static void test_CreateFile(void) { /* FIXME: remove once Wine is fixed */ todo_wine_if (i == 5) - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%ld: expected ERROR_INVALID_PARAMETER, got %ld\n", i, GetLastError()); } else { /* FIXME: remove once Wine is fixed */ todo_wine_if (i == 1) - ok(GetLastError() == ERROR_ACCESS_DENIED, "%d: expected ERROR_ACCESS_DENIED, got %d\n", i, GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "%ld: expected ERROR_ACCESS_DENIED, got %ld\n", i, GetLastError()); }
SetLastError(0xdeadbeef); hfile = CreateFileA(temp_path, GENERIC_WRITE, 0, NULL, i, 0, 0); ok(hfile == INVALID_HANDLE_VALUE, "CreateFile should fail\n"); if (i == 0) - ok(GetLastError() == ERROR_INVALID_PARAMETER, "%d: expected ERROR_INVALID_PARAMETER, got %d\n", i, GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "%ld: expected ERROR_INVALID_PARAMETER, got %ld\n", i, GetLastError()); else { /* FIXME: remove once Wine is fixed */ todo_wine_if (i == 1) - ok(GetLastError() == ERROR_ACCESS_DENIED, "%d: expected ERROR_ACCESS_DENIED, got %d\n", i, GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "%ld: expected ERROR_ACCESS_DENIED, got %ld\n", i, GetLastError()); } }
@@ -4128,27 +4129,27 @@ static void test_CreateFile(void) hfile = CreateFileA(file_name, td[i].access, 0, NULL, td[i].disposition, 0, 0); if (!td[i].error) { - ok(hfile != INVALID_HANDLE_VALUE, "%d: CreateFile error %d\n", i, GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "%ld: CreateFile error %ld\n", i, GetLastError()); written = 0xdeadbeef; SetLastError(0xdeadbeef); ret = WriteFile(hfile, &td[i].error, sizeof(td[i].error), &written, NULL); if (td[i].access & GENERIC_WRITE) - ok(ret, "%d: WriteFile error %d\n", i, GetLastError()); + ok(ret, "%ld: WriteFile error %ld\n", i, GetLastError()); else { - ok(!ret, "%d: WriteFile should fail\n", i); - ok(GetLastError() == ERROR_ACCESS_DENIED, "%d: expected ERROR_ACCESS_DENIED, got %d\n", i, GetLastError()); + ok(!ret, "%ld: WriteFile should fail\n", i); + ok(GetLastError() == ERROR_ACCESS_DENIED, "%ld: expected ERROR_ACCESS_DENIED, got %ld\n", i, GetLastError()); } SetLastError(0xdeadbeef); ret = SetFileTime(hfile, NULL, NULL, NULL); if (td[i].access & GENERIC_WRITE) /* actually FILE_WRITE_ATTRIBUTES */ - ok(ret, "%d: SetFileTime error %d\n", i, GetLastError()); + ok(ret, "%ld: SetFileTime error %ld\n", i, GetLastError()); else { todo_wine { - ok(!ret, "%d: SetFileTime should fail\n", i); - ok(GetLastError() == ERROR_ACCESS_DENIED, "%d: expected ERROR_ACCESS_DENIED, got %d\n", i, GetLastError()); + ok(!ret, "%ld: SetFileTime should fail\n", i); + ok(GetLastError() == ERROR_ACCESS_DENIED, "%ld: expected ERROR_ACCESS_DENIED, got %ld\n", i, GetLastError()); } } CloseHandle(hfile); @@ -4160,15 +4161,15 @@ static void test_CreateFile(void) { todo_wine { - ok(hfile == INVALID_HANDLE_VALUE, "%d: CreateFile should fail\n", i); - ok(GetLastError() == td[i].error, "%d: expected %d, got %d\n", i, td[i].error, GetLastError()); + ok(hfile == INVALID_HANDLE_VALUE, "%ld: CreateFile should fail\n", i); + ok(GetLastError() == td[i].error, "%ld: expected %ld, got %ld\n", i, td[i].error, GetLastError()); } CloseHandle(hfile); } else { - ok(hfile == INVALID_HANDLE_VALUE, "%d: CreateFile should fail\n", i); - ok(GetLastError() == td[i].error, "%d: expected %d, got %d\n", i, td[i].error, GetLastError()); + ok(hfile == INVALID_HANDLE_VALUE, "%ld: CreateFile should fail\n", i); + ok(GetLastError() == td[i].error, "%ld: expected %ld, got %ld\n", i, td[i].error, GetLastError()); } }
@@ -4214,26 +4215,26 @@ static void test_GetFileInformationByHandleEx(void) }
ret2 = GetTempPathA(sizeof(tempPath), tempPath); - ok(ret2, "GetFileInformationByHandleEx: GetTempPathA failed, got error %u.\n", GetLastError()); + ok(ret2, "GetFileInformationByHandleEx: GetTempPathA failed, got error %lu.\n", GetLastError());
/* ensure the existence of a file in the temp folder */ ret2 = GetTempFileNameA(tempPath, "abc", 0, tempFileName); - ok(ret2, "GetFileInformationByHandleEx: GetTempFileNameA failed, got error %u.\n", GetLastError()); + ok(ret2, "GetFileInformationByHandleEx: GetTempFileNameA failed, got error %lu.\n", GetLastError()); ret2 = GetFileAttributesA(tempFileName); ok(ret2 != INVALID_FILE_ATTRIBUTES, "GetFileInformationByHandleEx: " - "GetFileAttributesA failed to find the temp file, got error %u.\n", GetLastError()); + "GetFileAttributesA failed to find the temp file, got error %lu.\n", GetLastError());
directory = CreateFileA(tempPath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); ok(directory != INVALID_HANDLE_VALUE, "GetFileInformationByHandleEx: failed to open the temp folder, " - "got error %u.\n", GetLastError()); + "got error %lu.\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(checks); i += 1) { SetLastError(0xdeadbeef); ret = pGetFileInformationByHandleEx(directory, checks[i].handleClass, checks[i].ptr, checks[i].size); - ok(!ret && GetLastError() == checks[i].errorCode, "GetFileInformationByHandleEx: expected error %u, " - "got %u.\n", checks[i].errorCode, GetLastError()); + ok(!ret && GetLastError() == checks[i].errorCode, "GetFileInformationByHandleEx: expected error %lu, " + "got %lu.\n", checks[i].errorCode, GetLastError()); }
while (TRUE) @@ -4242,7 +4243,7 @@ static void test_GetFileInformationByHandleEx(void) ret = pGetFileInformationByHandleEx(directory, FileIdBothDirectoryInfo, buffer, sizeof(buffer)); if (!ret && GetLastError() == ERROR_NO_MORE_FILES) break; - ok(ret, "GetFileInformationByHandleEx: failed to query for FileIdBothDirectoryInfo, got error %u.\n", GetLastError()); + ok(ret, "GetFileInformationByHandleEx: failed to query for FileIdBothDirectoryInfo, got error %lu.\n", GetLastError()); if (!ret) break; bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)buffer; @@ -4262,12 +4263,12 @@ static void test_GetFileInformationByHandleEx(void) file = CreateFileA(tempFileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL); ok(file != INVALID_HANDLE_VALUE, "GetFileInformationByHandleEx: failed to open the temp file, " - "got error %u.\n", GetLastError()); + "got error %lu.\n", GetLastError());
/* Test FileBasicInfo; make sure the write time changes when a file is updated */ memset(buffer, 0xff, sizeof(buffer)); ret = pGetFileInformationByHandleEx(file, FileBasicInfo, buffer, sizeof(buffer)); - ok(ret, "GetFileInformationByHandleEx: failed to get FileBasicInfo, %u\n", GetLastError()); + ok(ret, "GetFileInformationByHandleEx: failed to get FileBasicInfo, %lu\n", GetLastError()); basicInfo = (FILE_BASIC_INFO *)buffer; prevWrite = basicInfo->LastWriteTime; CloseHandle(file); @@ -4278,7 +4279,7 @@ static void test_GetFileInformationByHandleEx(void) file = CreateFileA(tempFileName, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL); ok(file != INVALID_HANDLE_VALUE, "GetFileInformationByHandleEx: failed to open the temp file, " - "got error %u.\n", GetLastError()); + "got error %lu.\n", GetLastError()); ret = WriteFile(file, tempFileName, strlen(tempFileName), &written, NULL); ok(ret, "GetFileInformationByHandleEx: Write failed\n"); CloseHandle(file); @@ -4286,11 +4287,11 @@ static void test_GetFileInformationByHandleEx(void) file = CreateFileA(tempFileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL); ok(file != INVALID_HANDLE_VALUE, "GetFileInformationByHandleEx: failed to open the temp file, " - "got error %u.\n", GetLastError()); + "got error %lu.\n", GetLastError());
memset(buffer, 0xff, sizeof(buffer)); ret = pGetFileInformationByHandleEx(file, FileBasicInfo, buffer, sizeof(buffer)); - ok(ret, "GetFileInformationByHandleEx: failed to get FileBasicInfo, %u\n", GetLastError()); + ok(ret, "GetFileInformationByHandleEx: failed to get FileBasicInfo, %lu\n", GetLastError()); basicInfo = (FILE_BASIC_INFO *)buffer; /* Could also check that the creation time didn't change - on windows * it doesn't, but on wine, it does change even if it shouldn't. */ @@ -4300,7 +4301,7 @@ static void test_GetFileInformationByHandleEx(void) /* Test FileStandardInfo, check some basic parameters */ memset(buffer, 0xff, sizeof(buffer)); ret = pGetFileInformationByHandleEx(file, FileStandardInfo, buffer, sizeof(buffer)); - ok(ret, "GetFileInformationByHandleEx: failed to get FileStandardInfo, %u\n", GetLastError()); + ok(ret, "GetFileInformationByHandleEx: failed to get FileStandardInfo, %lu\n", GetLastError()); standardInfo = (FILE_STANDARD_INFO *)buffer; ok(standardInfo->NumberOfLinks == 1, "GetFileInformationByHandleEx: Unexpected number of links\n"); ok(standardInfo->DeletePending == FALSE, "GetFileInformationByHandleEx: Unexpected pending delete\n"); @@ -4309,7 +4310,7 @@ static void test_GetFileInformationByHandleEx(void) /* Test FileNameInfo */ memset(buffer, 0xff, sizeof(buffer)); ret = pGetFileInformationByHandleEx(file, FileNameInfo, buffer, sizeof(buffer)); - ok(ret, "GetFileInformationByHandleEx: failed to get FileNameInfo, %u\n", GetLastError()); + ok(ret, "GetFileInformationByHandleEx: failed to get FileNameInfo, %lu\n", GetLastError()); nameInfo = (FILE_NAME_INFO *)buffer; strPtr = strchr(tempFileName, '\'); ok(strPtr != NULL, "GetFileInformationByHandleEx: Temp filename didn't contain backslash\n"); @@ -4322,23 +4323,23 @@ static void test_GetFileInformationByHandleEx(void) /* invalid classes */ SetLastError(0xdeadbeef); ret = pGetFileInformationByHandleEx(file, FileEndOfFileInfo, &eofinfo, sizeof(eofinfo)); - 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());
SetLastError(0xdeadbeef); ret = pGetFileInformationByHandleEx(file, FileIoPriorityHintInfo, &priohintinfo, sizeof(priohintinfo)); - 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());
SetLastError(0xdeadbeef); ret = pGetFileInformationByHandleEx(file, FileAllocationInfo, &allocinfo, sizeof(allocinfo)); - 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());
SetLastError(0xdeadbeef); ret = pGetFileInformationByHandleEx(file, FileDispositionInfo, &dispinfo, sizeof(dispinfo)); - 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());
SetLastError(0xdeadbeef); ret = pGetFileInformationByHandleEx(file, FileRenameInfo, &renameinfo, sizeof(renameinfo)); - 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());
CloseHandle(file); DeleteFileA(tempFileName); @@ -4361,38 +4362,38 @@ static void test_OpenFileById(void) }
ret2 = GetTempPathA(sizeof(tempPath), tempPath); - ok(ret2, "OpenFileById: GetTempPath failed, got error %u.\n", GetLastError()); + ok(ret2, "OpenFileById: GetTempPath failed, got error %lu.\n", GetLastError());
/* ensure the existence of a file in the temp folder */ ret2 = GetTempFileNameA(tempPath, "abc", 0, tempFileName); - ok(ret2, "OpenFileById: GetTempFileNameA failed, got error %u.\n", GetLastError()); + ok(ret2, "OpenFileById: GetTempFileNameA failed, got error %lu.\n", GetLastError()); ret2 = GetFileAttributesA(tempFileName); ok(ret2 != INVALID_FILE_ATTRIBUTES, - "OpenFileById: GetFileAttributesA failed to find the temp file, got error %u\n", GetLastError()); + "OpenFileById: GetFileAttributesA failed to find the temp file, got error %lu\n", GetLastError());
ret2 = MultiByteToWideChar(CP_ACP, 0, tempFileName + strlen(tempPath), -1, tempFileNameW, ARRAY_SIZE(tempFileNameW)); - ok(ret2, "OpenFileById: MultiByteToWideChar failed to convert tempFileName, got error %u.\n", GetLastError()); + ok(ret2, "OpenFileById: MultiByteToWideChar failed to convert tempFileName, got error %lu.\n", GetLastError()); tempFileNameLen = ret2 - 1;
tempFile = CreateFileA(tempFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); ok(tempFile != INVALID_HANDLE_VALUE, "OpenFileById: failed to create a temp file, " - "got error %u.\n", GetLastError()); - ret2 = sprintf(tickCount, "%u", GetTickCount()); + "got error %lu.\n", GetLastError()); + ret2 = sprintf(tickCount, "%lu", GetTickCount()); ret = WriteFile(tempFile, tickCount, ret2, &count, NULL); - ok(ret, "OpenFileById: WriteFile failed, got error %u.\n", GetLastError()); + ok(ret, "OpenFileById: WriteFile failed, got error %lu.\n", GetLastError()); CloseHandle(tempFile);
directory = CreateFileA(tempPath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); ok(directory != INVALID_HANDLE_VALUE, "OpenFileById: failed to open the temp folder, " - "got error %u.\n", GetLastError()); + "got error %lu.\n", GetLastError());
/* get info about the temp folder itself */ bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)buffer; ret = pGetFileInformationByHandleEx(directory, FileIdBothDirectoryInfo, buffer, sizeof(buffer)); - ok(ret, "OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %u.\n", GetLastError()); + ok(ret, "OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %lu.\n", GetLastError()); ok(bothDirInfo->FileNameLength == sizeof(WCHAR) && bothDirInfo->FileName[0] == '.', - "OpenFileById: failed to return the temp folder at the first entry, got error %u.\n", GetLastError()); + "OpenFileById: failed to return the temp folder at the first entry, got error %lu.\n", GetLastError());
/* open the temp folder itself */ fileIdDescr.dwSize = sizeof(fileIdDescr); @@ -4400,7 +4401,7 @@ static void test_OpenFileById(void) U(fileIdDescr).FileId = bothDirInfo->FileId; handle = pOpenFileById(directory, &fileIdDescr, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, 0); todo_wine - ok(handle != INVALID_HANDLE_VALUE, "OpenFileById: failed to open the temp folder itself, got error %u.\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "OpenFileById: failed to open the temp folder itself, got error %lu.\n", GetLastError()); CloseHandle(handle);
/* find the temp file in the temp folder */ @@ -4408,7 +4409,7 @@ static void test_OpenFileById(void) while (!found) { ret = pGetFileInformationByHandleEx(directory, FileIdBothDirectoryInfo, buffer, sizeof(buffer)); - ok(ret, "OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %u.\n", GetLastError()); + ok(ret, "OpenFileById: failed to query for FileIdBothDirectoryInfo, got error %lu.\n", GetLastError()); if (!ret) break; bothDirInfo = (FILE_ID_BOTH_DIR_INFO *)buffer; @@ -4430,17 +4431,17 @@ static void test_OpenFileById(void) SetLastError(0xdeadbeef); handle = pOpenFileById(directory, NULL, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, 0); ok(handle == INVALID_HANDLE_VALUE && GetLastError() == ERROR_INVALID_PARAMETER, - "OpenFileById: expected ERROR_INVALID_PARAMETER, got error %u.\n", GetLastError()); + "OpenFileById: expected ERROR_INVALID_PARAMETER, got error %lu.\n", GetLastError());
fileIdDescr.dwSize = sizeof(fileIdDescr); fileIdDescr.Type = FileIdType; U(fileIdDescr).FileId = bothDirInfo->FileId; handle = pOpenFileById(directory, &fileIdDescr, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, 0); - ok(handle != INVALID_HANDLE_VALUE, "OpenFileById: failed to open the file, got error %u.\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "OpenFileById: failed to open the file, got error %lu.\n", GetLastError());
ret = ReadFile(handle, buffer, sizeof(buffer), &count, NULL); buffer[count] = 0; - ok(ret, "OpenFileById: ReadFile failed, got error %u.\n", GetLastError()); + ok(ret, "OpenFileById: ReadFile failed, got error %lu.\n", GetLastError()); ok(strcmp(tickCount, buffer) == 0, "OpenFileById: invalid contents of the temp file.\n");
CloseHandle(handle); @@ -4472,13 +4473,13 @@ static void test_SetFileValidData(void) ret = pSetFileValidData(INVALID_HANDLE_VALUE, 0); error = GetLastError(); ok(!ret, "SetFileValidData succeeded\n"); - ok(error == ERROR_INVALID_HANDLE, "got %u\n", error); + ok(error == ERROR_INVALID_HANDLE, "got %lu\n", error);
SetLastError(0xdeadbeef); ret = pSetFileValidData(INVALID_HANDLE_VALUE, -1); error = GetLastError(); ok(!ret, "SetFileValidData succeeded\n"); - ok(error == ERROR_INVALID_HANDLE, "got %u\n", error); + ok(error == ERROR_INVALID_HANDLE, "got %lu\n", error);
/* file opened for reading */ handle = CreateFileA(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); @@ -4487,13 +4488,13 @@ static void test_SetFileValidData(void) ret = pSetFileValidData(handle, 0); ok(!ret, "SetFileValidData succeeded\n"); error = GetLastError(); - ok(error == ERROR_ACCESS_DENIED, "got %u\n", error); + ok(error == ERROR_ACCESS_DENIED, "got %lu\n", error);
SetLastError(0xdeadbeef); ret = pSetFileValidData(handle, -1); error = GetLastError(); ok(!ret, "SetFileValidData succeeded\n"); - ok(error == ERROR_ACCESS_DENIED, "got %u\n", error); + ok(error == ERROR_ACCESS_DENIED, "got %lu\n", error); CloseHandle(handle);
handle = CreateFileA(filename, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); @@ -4502,7 +4503,7 @@ static void test_SetFileValidData(void) ret = pSetFileValidData(handle, 0); error = GetLastError(); ok(!ret, "SetFileValidData succeeded\n"); - todo_wine ok(error == ERROR_PRIVILEGE_NOT_HELD, "got %u\n", error); + todo_wine ok(error == ERROR_PRIVILEGE_NOT_HELD, "got %lu\n", error); CloseHandle(handle);
privs.PrivilegeCount = 1; @@ -4524,58 +4525,58 @@ static void test_SetFileValidData(void) ret = pSetFileValidData(handle, 0); error = GetLastError(); ok(!ret, "SetFileValidData succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
SetLastError(0xdeadbeef); ret = pSetFileValidData(handle, -1); error = GetLastError(); ok(!ret, "SetFileValidData succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
SetLastError(0xdeadbeef); ret = pSetFileValidData(handle, 2); error = GetLastError(); todo_wine ok(!ret, "SetFileValidData succeeded\n"); - todo_wine ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error); + todo_wine ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
ret = pSetFileValidData(handle, 4); - ok(ret, "SetFileValidData failed %u\n", GetLastError()); + ok(ret, "SetFileValidData failed %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = pSetFileValidData(handle, 8); error = GetLastError(); ok(!ret, "SetFileValidData succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
count = SetFilePointer(handle, 1024, NULL, FILE_END); - ok(count != INVALID_SET_FILE_POINTER, "SetFilePointer failed %u\n", GetLastError()); + ok(count != INVALID_SET_FILE_POINTER, "SetFilePointer failed %lu\n", GetLastError()); ret = SetEndOfFile(handle); - ok(ret, "SetEndOfFile failed %u\n", GetLastError()); + ok(ret, "SetEndOfFile failed %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = pSetFileValidData(handle, 2); error = GetLastError(); todo_wine ok(!ret, "SetFileValidData succeeded\n"); - todo_wine ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error); + todo_wine ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
ret = pSetFileValidData(handle, 4); - ok(ret, "SetFileValidData failed %u\n", GetLastError()); + ok(ret, "SetFileValidData failed %lu\n", GetLastError());
ret = pSetFileValidData(handle, 8); - ok(ret, "SetFileValidData failed %u\n", GetLastError()); + ok(ret, "SetFileValidData failed %lu\n", GetLastError());
ret = pSetFileValidData(handle, 4); error = GetLastError(); todo_wine ok(!ret, "SetFileValidData succeeded\n"); - todo_wine ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error); + todo_wine ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
ret = pSetFileValidData(handle, 1024); - ok(ret, "SetFileValidData failed %u\n", GetLastError()); + ok(ret, "SetFileValidData failed %lu\n", GetLastError());
ret = pSetFileValidData(handle, 2048); error = GetLastError(); ok(!ret, "SetFileValidData succeeded\n"); - ok(error == ERROR_INVALID_PARAMETER, "got %u\n", error); + ok(error == ERROR_INVALID_PARAMETER, "got %lu\n", error);
privs.Privileges[0].Attributes = 0; AdjustTokenPrivileges(token, FALSE, &privs, sizeof(privs), NULL, NULL); @@ -4626,54 +4627,54 @@ static void test_ReOpenFile(void)
file = CreateFileA(filename, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - ok(file != INVALID_HANDLE_VALUE, "failed to create file, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to create file, error %lu\n", GetLastError()); ret = WriteFile(file, "foo", 4, &size, NULL); - ok(ret, "failed to write file, error %u\n", GetLastError()); + ok(ret, "failed to write file, error %lu\n", GetLastError());
for (i = 0; i < ARRAY_SIZE(invalid_attributes); ++i) { SetLastError(0xdeadbeef); new = pReOpenFile(file, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, invalid_attributes[i]); ok(new == INVALID_HANDLE_VALUE, "got %p\n", new); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %lu\n", GetLastError()); }
new = pReOpenFile(file, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0); - ok(new != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(new != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
ret = ReadFile(new, buffer, sizeof(buffer), &size, NULL); - ok(ret, "failed to read file, error %u\n", GetLastError()); - ok(size == 4, "got size %u\n", size); + ok(ret, "failed to read file, error %lu\n", GetLastError()); + ok(size == 4, "got size %lu\n", size); ok(!strcmp(buffer, "foo"), "got wrong data\n"); CloseHandle(new);
for (i = 0; i < ARRAY_SIZE(valid_attributes); ++i) { new = pReOpenFile(file, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, valid_attributes[i]); - ok(new != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(new != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError()); CloseHandle(new); }
SetLastError(0xdeadbeef); new = pReOpenFile(file, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0); ok(new == INVALID_HANDLE_VALUE, "got %p\n", new); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "got error %lu\n", GetLastError());
CloseHandle(file); ret = DeleteFileA(filename); - ok(ret, "failed to delete file, error %u\n", GetLastError()); + ok(ret, "failed to delete file, error %lu\n", GetLastError());
file = CreateNamedPipeA("\\.\pipe\test_pipe", PIPE_ACCESS_DUPLEX, 0, 1, 1000, 1000, 1000, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed to create pipe, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to create pipe, error %lu\n", GetLastError());
new = pReOpenFile(file, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, 0); - ok(new != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(new != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
ret = WriteFile(file, "foo", 4, &size, NULL); - ok(ret, "failed to write file, error %u\n", GetLastError()); + ok(ret, "failed to write file, error %lu\n", GetLastError()); ret = ReadFile(new, buffer, sizeof(buffer), &size, NULL); - ok(ret, "failed to read file, error %u\n", GetLastError()); - ok(size == 4, "got size %u\n", size); + ok(ret, "failed to read file, error %lu\n", GetLastError()); + ok(size == 4, "got size %lu\n", size); ok(!strcmp(buffer, "foo"), "got wrong data\n");
CloseHandle(new); @@ -4695,29 +4696,29 @@ static void test_WriteFileGather(void) evt = CreateEventW( NULL, TRUE, FALSE, NULL );
ret = GetTempPathA( MAX_PATH, temp_path ); - ok( ret != 0, "GetTempPathA error %d\n", GetLastError() ); + ok( ret != 0, "GetTempPathA error %ld\n", GetLastError() ); ok( ret < MAX_PATH, "temp path should fit into MAX_PATH\n" ); ret = GetTempFileNameA( temp_path, "wfg", 0, filename ); - ok( ret != 0, "GetTempFileNameA error %d\n", GetLastError() ); + ok( ret != 0, "GetTempFileNameA error %ld\n", GetLastError() );
hfile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED | FILE_ATTRIBUTE_NORMAL, 0 ); - ok( hfile != INVALID_HANDLE_VALUE, "CreateFile failed err %u\n", GetLastError() ); + ok( hfile != INVALID_HANDLE_VALUE, "CreateFile failed err %lu\n", GetLastError() ); if (hfile == INVALID_HANDLE_VALUE) return;
hiocp1 = CreateIoCompletionPort( INVALID_HANDLE_VALUE, NULL, 999, 0 ); hiocp2 = CreateIoCompletionPort( hfile, hiocp1, 999, 0 ); - ok( hiocp2 != 0, "CreateIoCompletionPort failed err %u\n", GetLastError() ); + ok( hiocp2 != 0, "CreateIoCompletionPort failed err %lu\n", GetLastError() );
GetSystemInfo( &si ); wbuf = VirtualAlloc( NULL, si.dwPageSize, MEM_COMMIT, PAGE_READWRITE ); - ok( wbuf != NULL, "VirtualAlloc failed err %u\n", GetLastError() ); + ok( wbuf != NULL, "VirtualAlloc failed err %lu\n", GetLastError() );
rbuf1 = VirtualAlloc( NULL, si.dwPageSize, MEM_COMMIT, PAGE_READWRITE ); - ok( rbuf1 != NULL, "VirtualAlloc failed err %u\n", GetLastError() ); + ok( rbuf1 != NULL, "VirtualAlloc failed err %lu\n", GetLastError() );
rbuf2 = VirtualAlloc( NULL, si.dwPageSize, MEM_COMMIT, PAGE_READWRITE ); - ok( rbuf2 != NULL, "VirtualAlloc failed err %u\n", GetLastError() ); + ok( rbuf2 != NULL, "VirtualAlloc failed err %lu\n", GetLastError() );
memset( &ovl, 0, sizeof(ovl) ); ovl.hEvent = evt; @@ -4726,16 +4727,16 @@ static void test_WriteFileGather(void) memset( wbuf, 0x42, si.dwPageSize ); SetLastError( 0xdeadbeef ); if (!WriteFileGather( hfile, fse, si.dwPageSize, NULL, &ovl )) - ok( GetLastError() == ERROR_IO_PENDING, "WriteFileGather failed err %u\n", GetLastError() ); + ok( GetLastError() == ERROR_IO_PENDING, "WriteFileGather failed err %lu\n", GetLastError() );
ret = GetQueuedCompletionStatus( hiocp2, &size, &key, &povl, 1000 ); - ok( ret, "GetQueuedCompletionStatus failed err %u\n", GetLastError()); + ok( ret, "GetQueuedCompletionStatus failed err %lu\n", GetLastError()); ok( povl == &ovl, "wrong ovl %p\n", povl );
tx = 0; br = GetOverlappedResult( hfile, &ovl, &tx, TRUE ); - ok( br == TRUE, "GetOverlappedResult failed: %u\n", GetLastError() ); - ok( tx == si.dwPageSize, "got unexpected bytes transferred: %u\n", tx ); + ok( br == TRUE, "GetOverlappedResult failed: %lu\n", GetLastError() ); + ok( tx == si.dwPageSize, "got unexpected bytes transferred: %lu\n", tx );
ResetEvent( evt );
@@ -4748,16 +4749,16 @@ static void test_WriteFileGather(void) SetLastError( 0xdeadbeef ); br = ReadFileScatter( hfile, fse, si.dwPageSize, NULL, &ovl ); ok( br == FALSE, "ReadFileScatter should be asynchronous\n" ); - ok( GetLastError() == ERROR_IO_PENDING, "ReadFileScatter failed err %u\n", GetLastError() ); + ok( GetLastError() == ERROR_IO_PENDING, "ReadFileScatter failed err %lu\n", GetLastError() );
ret = GetQueuedCompletionStatus( hiocp2, &size, &key, &povl, 1000 ); - ok( ret, "GetQueuedCompletionStatus failed err %u\n", GetLastError()); + ok( ret, "GetQueuedCompletionStatus failed err %lu\n", GetLastError()); ok( povl == &ovl, "wrong ovl %p\n", povl );
tx = 0; br = GetOverlappedResult( hfile, &ovl, &tx, TRUE ); - ok( br == TRUE, "GetOverlappedResult failed: %u\n", GetLastError() ); - ok( tx == si.dwPageSize, "got unexpected bytes transferred: %u\n", tx ); + ok( br == TRUE, "GetOverlappedResult failed: %lu\n", GetLastError() ); + ok( tx == si.dwPageSize, "got unexpected bytes transferred: %lu\n", tx );
ok( memcmp( rbuf1, wbuf, si.dwPageSize ) == 0, "data was not read into buffer\n" ); @@ -4775,26 +4776,26 @@ static void test_WriteFileGather(void) br = ReadFileScatter( hfile, fse, si.dwPageSize, NULL, &ovl ); ok( br == FALSE, "ReadFileScatter should have failed\n" ); ok( GetLastError() == ERROR_HANDLE_EOF || - GetLastError() == ERROR_IO_PENDING, "ReadFileScatter gave wrong error %u\n", GetLastError() ); + GetLastError() == ERROR_IO_PENDING, "ReadFileScatter gave wrong error %lu\n", GetLastError() ); if (GetLastError() == ERROR_IO_PENDING) { SetLastError( 0xdeadbeef ); ret = GetQueuedCompletionStatus( hiocp2, &size, &key, &povl, 1000 ); ok( !ret, "GetQueuedCompletionStatus should have returned failure\n" ); - ok( GetLastError() == ERROR_HANDLE_EOF, "Got wrong error: %u\n", GetLastError() ); + ok( GetLastError() == ERROR_HANDLE_EOF, "Got wrong error: %lu\n", GetLastError() ); ok( povl == &ovl, "wrong ovl %p\n", povl );
SetLastError( 0xdeadbeef ); br = GetOverlappedResult( hfile, &ovl, &tx, TRUE ); ok( br == FALSE, "GetOverlappedResult should have failed\n" ); - ok( GetLastError() == ERROR_HANDLE_EOF, "Got wrong error: %u\n", GetLastError() ); + ok( GetLastError() == ERROR_HANDLE_EOF, "Got wrong error: %lu\n", GetLastError() ); } else { SetLastError( 0xdeadbeef ); ret = GetQueuedCompletionStatus( hiocp2, &size, &key, &povl, 100 ); - ok( !ret, "GetQueuedCompletionStatus failed err %u\n", GetLastError() ); - ok( GetLastError() == WAIT_TIMEOUT, "GetQueuedCompletionStatus gave wrong error %u\n", GetLastError() ); + ok( !ret, "GetQueuedCompletionStatus failed err %lu\n", GetLastError() ); + ok( GetLastError() == WAIT_TIMEOUT, "GetQueuedCompletionStatus gave wrong error %lu\n", GetLastError() ); ok( povl == NULL, "wrong ovl %p\n", povl ); }
@@ -4811,16 +4812,16 @@ static void test_WriteFileGather(void) SetLastError( 0xdeadbeef ); br = ReadFileScatter( hfile, fse, si.dwPageSize * 2, NULL, &ovl ); ok( br == FALSE, "ReadFileScatter should be asynchronous\n" ); - ok( GetLastError() == ERROR_IO_PENDING, "ReadFileScatter failed err %u\n", GetLastError() ); + ok( GetLastError() == ERROR_IO_PENDING, "ReadFileScatter failed err %lu\n", GetLastError() );
ret = GetQueuedCompletionStatus( hiocp2, &size, &key, &povl, 1000 ); - ok( ret, "GetQueuedCompletionStatus failed err %u\n", GetLastError() ); + ok( ret, "GetQueuedCompletionStatus failed err %lu\n", GetLastError() ); ok( povl == &ovl, "wrong ovl %p\n", povl );
tx = 0; br = GetOverlappedResult( hfile, &ovl, &tx, TRUE ); - ok( br == TRUE, "GetOverlappedResult failed: %u\n", GetLastError() ); - ok( tx == si.dwPageSize, "got unexpected bytes transferred: %u\n", tx ); + ok( br == TRUE, "GetOverlappedResult failed: %lu\n", GetLastError() ); + ok( tx == si.dwPageSize, "got unexpected bytes transferred: %lu\n", tx );
ok( memcmp( rbuf1, wbuf, si.dwPageSize ) == 0, "data was not read into buffer\n" ); @@ -4839,16 +4840,16 @@ static void test_WriteFileGather(void) SetLastError( 0xdeadbeef ); br = ReadFileScatter( hfile, fse, si.dwPageSize / 2, NULL, &ovl ); ok( br == FALSE, "ReadFileScatter should be asynchronous\n" ); - ok( GetLastError() == ERROR_IO_PENDING, "ReadFileScatter failed err %u\n", GetLastError() ); + ok( GetLastError() == ERROR_IO_PENDING, "ReadFileScatter failed err %lu\n", GetLastError() );
ret = GetQueuedCompletionStatus( hiocp2, &size, &key, &povl, 1000 ); - ok( ret, "GetQueuedCompletionStatus failed err %u\n", GetLastError() ); + ok( ret, "GetQueuedCompletionStatus failed err %lu\n", GetLastError() ); ok( povl == &ovl, "wrong ovl %p\n", povl );
tx = 0; br = GetOverlappedResult( hfile, &ovl, &tx, TRUE ); - ok( br == TRUE, "GetOverlappedResult failed: %u\n", GetLastError() ); - ok( tx == si.dwPageSize / 2, "got unexpected bytes transferred: %u\n", tx ); + ok( br == TRUE, "GetOverlappedResult failed: %lu\n", GetLastError() ); + ok( tx == si.dwPageSize / 2, "got unexpected bytes transferred: %lu\n", tx );
ok( memcmp( rbuf1, wbuf, si.dwPageSize / 2 ) == 0, "invalid data was read into buffer\n" ); @@ -4859,19 +4860,19 @@ static void test_WriteFileGather(void) if (pSetFileCompletionNotificationModes) { br = pSetFileCompletionNotificationModes(hfile, FILE_SKIP_COMPLETION_PORT_ON_SUCCESS); - ok(br, "SetFileCompletionNotificationModes failed, error %u.\n", GetLastError()); + ok(br, "SetFileCompletionNotificationModes failed, error %lu.\n", GetLastError());
br = ReadFileScatter(hfile, fse, si.dwPageSize, NULL, &ovl); ok(br == FALSE, "ReadFileScatter should be asynchronous.\n"); - ok(GetLastError() == ERROR_IO_PENDING, "ReadFileScatter failed, error %u.\n", GetLastError()); + ok(GetLastError() == ERROR_IO_PENDING, "ReadFileScatter failed, error %lu.\n", GetLastError());
br = GetQueuedCompletionStatus(hiocp2, &size, &key, &povl, 1000); - ok(br, "GetQueuedCompletionStatus failed, err %u.\n", GetLastError()); + ok(br, "GetQueuedCompletionStatus failed, err %lu.\n", GetLastError()); ok(povl == &ovl, "Wrong ovl %p.\n", povl);
br = GetOverlappedResult(hfile, &ovl, &tx, TRUE); - ok(br, "GetOverlappedResult failed, err %u.\n", GetLastError()); - ok(tx == si.dwPageSize, "Got unexpected size %u.\n", tx); + ok(br, "GetOverlappedResult failed, err %lu.\n", GetLastError()); + ok(tx == si.dwPageSize, "Got unexpected size %lu.\n", tx);
ResetEvent(evt); } @@ -4885,7 +4886,7 @@ static void test_WriteFileGather(void) /* file handle must be overlapped */ hfile = CreateFileA( filename, GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING | FILE_ATTRIBUTE_NORMAL, 0 ); - ok( hfile != INVALID_HANDLE_VALUE, "CreateFile failed err %u\n", GetLastError() ); + ok( hfile != INVALID_HANDLE_VALUE, "CreateFile failed err %lu\n", GetLastError() );
memset( &ovl, 0, sizeof(ovl) ); memset( fse, 0, sizeof(fse) ); @@ -4894,7 +4895,7 @@ static void test_WriteFileGather(void) SetLastError( 0xdeadbeef ); br = ReadFileScatter( hfile, fse, si.dwPageSize, NULL, &ovl ); ok( br == FALSE, "ReadFileScatter should fail\n" ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "ReadFileScatter failed err %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "ReadFileScatter failed err %lu\n", GetLastError() );
VirtualFree( wbuf, 0, MEM_RELEASE ); VirtualFree( rbuf1, 0, MEM_RELEASE ); @@ -4952,12 +4953,12 @@ static void test_file_access(void) FILE_FLAG_DELETE_ON_CLOSE, 0); if (td[i].create_error) { - ok(hfile == INVALID_HANDLE_VALUE, "%d: CreateFile should fail\n", i); - ok(td[i].create_error == GetLastError(), "%d: expected %d, got %d\n", i, td[i].create_error, GetLastError()); + ok(hfile == INVALID_HANDLE_VALUE, "%ld: CreateFile should fail\n", i); + ok(td[i].create_error == GetLastError(), "%ld: expected %d, got %ld\n", i, td[i].create_error, GetLastError()); continue; } else - ok(hfile != INVALID_HANDLE_VALUE, "%d: CreateFile error %d\n", i, GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "%ld: CreateFile error %ld\n", i, GetLastError());
for (j = 0; j < ARRAY_SIZE(td); j++) { @@ -4965,7 +4966,7 @@ static void test_file_access(void) ret = DuplicateHandle(GetCurrentProcess(), hfile, GetCurrentProcess(), &hdup, td[j].access, 0, 0); if (is_access_compatible(td[i].access, td[j].access)) - ok(ret, "DuplicateHandle(%#x => %#x) error %d\n", td[i].access, td[j].access, GetLastError()); + ok(ret, "DuplicateHandle(%#x => %#x) error %ld\n", td[i].access, td[j].access, GetLastError()); else { /* FIXME: Remove once Wine is fixed */ @@ -4975,7 +4976,7 @@ static void test_file_access(void) (!(td[i].access & (GENERIC_WRITE)) && (td[j].access & FILE_APPEND_DATA)))) { ok(!ret, "DuplicateHandle(%#x => %#x) should fail\n", td[i].access, td[j].access); - 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()); } } if (ret) CloseHandle(hdup); @@ -4986,38 +4987,38 @@ static void test_file_access(void) ret = WriteFile(hfile, "\x5e\xa7", 2, &bytes, NULL); if (td[i].write_error) { - ok(!ret, "%d: WriteFile should fail\n", i); - ok(td[i].write_error == GetLastError(), "%d: expected %d, got %d\n", i, td[i].write_error, GetLastError()); - ok(bytes == 0, "%d: expected 0, got %u\n", i, bytes); + ok(!ret, "%ld: WriteFile should fail\n", i); + ok(td[i].write_error == GetLastError(), "%ld: expected %d, got %ld\n", i, td[i].write_error, GetLastError()); + ok(bytes == 0, "%ld: expected 0, got %lu\n", i, bytes); } else { - ok(ret, "%d: WriteFile error %d\n", i, GetLastError()); - ok(bytes == 2, "%d: expected 2, got %u\n", i, bytes); + ok(ret, "%ld: WriteFile error %ld\n", i, GetLastError()); + ok(bytes == 2, "%ld: expected 2, got %lu\n", i, bytes); }
SetLastError(0xdeadbeef); ret = SetFilePointer(hfile, 0, NULL, FILE_BEGIN); - ok(ret != INVALID_SET_FILE_POINTER, "SetFilePointer error %d\n", GetLastError()); + ok(ret != INVALID_SET_FILE_POINTER, "SetFilePointer error %ld\n", GetLastError());
SetLastError(0xdeadbeef); bytes = 0xdeadbeef; ret = ReadFile(hfile, buf, sizeof(buf), &bytes, NULL); if (td[i].read_error) { - ok(!ret, "%d: ReadFile should fail\n", i); - ok(td[i].read_error == GetLastError(), "%d: expected %d, got %d\n", i, td[i].read_error, GetLastError()); - ok(bytes == 0, "%d: expected 0, got %u\n", i, bytes); + ok(!ret, "%ld: ReadFile should fail\n", i); + ok(td[i].read_error == GetLastError(), "%ld: expected %d, got %ld\n", i, td[i].read_error, GetLastError()); + ok(bytes == 0, "%ld: expected 0, got %lu\n", i, bytes); } else { - ok(ret, "%d: ReadFile error %d\n", i, GetLastError()); + ok(ret, "%ld: ReadFile error %ld\n", i, GetLastError()); if (td[i].write_error) - ok(bytes == 0, "%d: expected 0, got %u\n", i, bytes); + ok(bytes == 0, "%ld: expected 0, got %lu\n", i, bytes); else { - ok(bytes == 2, "%d: expected 2, got %u\n", i, bytes); - ok(buf[0] == 0x5e && buf[1] == 0xa7, "%d: expected 5ea7, got %02x%02x\n", i, buf[0], buf[1]); + ok(bytes == 2, "%ld: expected 2, got %lu\n", i, bytes); + ok(buf[0] == 0x5e && buf[1] == 0xa7, "%ld: expected 5ea7, got %02x%02x\n", i, buf[0], buf[1]); } }
@@ -5045,66 +5046,66 @@ static void test_GetFinalPathNameByHandleA(void) /* Test calling with INVALID_HANDLE_VALUE */ SetLastError(0xdeadbeaf); count = pGetFinalPathNameByHandleA(INVALID_HANDLE_VALUE, result_path, MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == 0, "Expected length 0, got %u\n", count); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + ok(count == 0, "Expected length 0, got %lu\n", count); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
count = GetTempPathA(MAX_PATH, temp_path); - ok(count, "Failed to get temp path, error %u\n", GetLastError()); + ok(count, "Failed to get temp path, error %lu\n", GetLastError()); ret = GetTempFileNameA(temp_path, prefix, 0, test_path); - ok(ret != 0, "GetTempFileNameA error %u\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %lu\n", GetLastError()); ret = GetLongPathNameA(test_path, long_path, MAX_PATH); - ok(ret != 0, "GetLongPathNameA error %u\n", GetLastError()); + ok(ret != 0, "GetLongPathNameA error %lu\n", GetLastError()); strcpy(dos_path, dos_prefix); strcat(dos_path, long_path);
count = pGetFinalPathNameByHandleA(INVALID_HANDLE_VALUE, NULL, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == 0, "Expected length 0, got %u\n", count); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + ok(count == 0, "Expected length 0, got %lu\n", count); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
file = CreateFileA(test_path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFileA error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA error %lu\n", GetLastError());
if (0) { /* Windows crashes on NULL path */ count = pGetFinalPathNameByHandleA(file, NULL, MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == 0, "Expected length 0, got %u\n", count); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + ok(count == 0, "Expected length 0, got %lu\n", count); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %lu\n", GetLastError()); }
/* Test 0-length path */ count = pGetFinalPathNameByHandleA(file, result_path, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == strlen(dos_path), "Expected length %u, got %u\n", lstrlenA(dos_path), count); + ok(count == strlen(dos_path), "Expected length %u, got %lu\n", lstrlenA(dos_path), count);
/* Test 0 and NULL path */ count = pGetFinalPathNameByHandleA(file, NULL, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == strlen(dos_path), "Expected length %u, got %u\n", lstrlenA(dos_path), count); + ok(count == strlen(dos_path), "Expected length %u, got %lu\n", lstrlenA(dos_path), count);
/* Test VOLUME_NAME_DOS with sufficient buffer size */ memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleA(file, result_path, MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == strlen(dos_path), "Expected length %u, got %u\n", (DWORD)strlen(dos_path), count); + ok(count == strlen(dos_path), "Expected length %lu, got %lu\n", (DWORD)strlen(dos_path), count); ok(lstrcmpiA(dos_path, result_path) == 0, "Expected %s, got %s\n", dos_path, result_path);
/* Test VOLUME_NAME_DOS with insufficient buffer size */ memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleA(file, result_path, strlen(dos_path)-2, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == strlen(dos_path), "Expected length %u, got %u\n", (DWORD)strlen(dos_path), count); + ok(count == strlen(dos_path), "Expected length %lu, got %lu\n", (DWORD)strlen(dos_path), count); ok(result_path[0] == 0x11, "Result path was modified\n");
memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleA(file, result_path, strlen(dos_path)-1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == strlen(dos_path), "Expected length %u, got %u\n", (DWORD)strlen(dos_path), count); + ok(count == strlen(dos_path), "Expected length %lu, got %lu\n", (DWORD)strlen(dos_path), count); ok(result_path[0] == 0x11, "Result path was modified\n");
memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleA(file, result_path, strlen(dos_path), FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == strlen(dos_path), "Expected length %u, got %u\n", (DWORD)strlen(dos_path), count); + ok(count == strlen(dos_path), "Expected length %lu, got %lu\n", (DWORD)strlen(dos_path), count); ok(result_path[0] == 0x11, "Result path was modified\n");
memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleA(file, result_path, strlen(dos_path)+1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == strlen(dos_path), "Expected length %u, got %u\n", (DWORD)strlen(dos_path), count); + ok(count == strlen(dos_path), "Expected length %lu, got %lu\n", (DWORD)strlen(dos_path), count); ok(result_path[0] != 0x11, "Result path was not modified\n"); ok(!result_path[strlen(dos_path)], "Expected nullterminated string\n"); ok(result_path[strlen(dos_path)+1] == 0x11, "Buffer overflow\n"); @@ -5138,77 +5139,77 @@ static void test_GetFinalPathNameByHandleW(void) /* Test calling with INVALID_HANDLE_VALUE */ SetLastError(0xdeadbeaf); count = pGetFinalPathNameByHandleW(INVALID_HANDLE_VALUE, result_path, MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == 0, "Expected length 0, got %u\n", count); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + ok(count == 0, "Expected length 0, got %lu\n", count); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
count = pGetFinalPathNameByHandleW(INVALID_HANDLE_VALUE, NULL, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == 0, "Expected length 0, got %u\n", count); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + ok(count == 0, "Expected length 0, got %lu\n", count); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %lu\n", GetLastError());
count = GetTempPathW(MAX_PATH, temp_path); - ok(count, "Failed to get temp path, error %u\n", GetLastError()); + ok(count, "Failed to get temp path, error %lu\n", GetLastError()); ret = GetTempFileNameW(temp_path, prefix, 0, test_path); - ok(ret != 0, "GetTempFileNameW error %u\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %lu\n", GetLastError()); ret = GetLongPathNameW(test_path, long_path, MAX_PATH); - ok(ret != 0, "GetLongPathNameW error %u\n", GetLastError()); + ok(ret != 0, "GetLongPathNameW error %lu\n", GetLastError()); lstrcpyW(dos_path, dos_prefix); lstrcatW(dos_path, long_path);
file = CreateFileW(test_path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, 0); - ok(file != INVALID_HANDLE_VALUE, "CreateFileW error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "CreateFileW error %lu\n", GetLastError());
if (0) { /* Windows crashes on NULL path */ count = pGetFinalPathNameByHandleW(file, NULL, MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == 0, "Expected length 0, got %u\n", count); - ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %u\n", GetLastError()); + ok(count == 0, "Expected length 0, got %lu\n", count); + ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %lu\n", GetLastError()); }
/* Test 0-length path */ count = pGetFinalPathNameByHandleW(file, result_path, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); ok(count == lstrlenW(dos_path) + 1 || - broken(count == lstrlenW(dos_path) + 2), "Expected length %u, got %u\n", lstrlenW(dos_path) + 1, count); + broken(count == lstrlenW(dos_path) + 2), "Expected length %u, got %lu\n", lstrlenW(dos_path) + 1, count);
/* Test 0 and NULL path */ count = pGetFinalPathNameByHandleW(file, NULL, 0, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); ok(count == lstrlenW(dos_path) + 1 || - broken(count == lstrlenW(dos_path) + 2), "Expected length %u, got %u\n", lstrlenW(dos_path) + 1, count); + broken(count == lstrlenW(dos_path) + 2), "Expected length %u, got %lu\n", lstrlenW(dos_path) + 1, count);
/* Test VOLUME_NAME_DOS with sufficient buffer size */ memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleW(file, result_path, MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == lstrlenW(dos_path), "Expected length %u, got %u\n", lstrlenW(dos_path), count); + ok(count == lstrlenW(dos_path), "Expected length %u, got %lu\n", lstrlenW(dos_path), count); ok(lstrcmpiW(dos_path, result_path) == 0, "Expected %s, got %s\n", wine_dbgstr_w(dos_path), wine_dbgstr_w(result_path));
/* Test VOLUME_NAME_DOS with insufficient buffer size */ memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleW(file, result_path, lstrlenW(dos_path)-1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == lstrlenW(dos_path) + 1, "Expected length %u, got %u\n", lstrlenW(dos_path) + 1, count); + ok(count == lstrlenW(dos_path) + 1, "Expected length %u, got %lu\n", lstrlenW(dos_path) + 1, count); ok(result_path[0] == 0x1111, "Result path was modified\n");
memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleW(file, result_path, lstrlenW(dos_path), FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == lstrlenW(dos_path) + 1, "Expected length %u, got %u\n", lstrlenW(dos_path) + 1, count); + ok(count == lstrlenW(dos_path) + 1, "Expected length %u, got %lu\n", lstrlenW(dos_path) + 1, count); ok(result_path[0] == 0x1111, "Result path was modified\n");
memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleW(file, result_path, lstrlenW(dos_path)+1, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); - ok(count == lstrlenW(dos_path), "Expected length %u, got %u\n", lstrlenW(dos_path), count); + ok(count == lstrlenW(dos_path), "Expected length %u, got %lu\n", lstrlenW(dos_path), count); ok(result_path[0] != 0x1111, "Result path was not modified\n"); ok(!result_path[lstrlenW(dos_path)], "Expected nullterminated string\n"); ok(result_path[lstrlenW(dos_path)+1] == 0x1111, "Buffer overflow\n");
success = GetVolumePathNameW(long_path, drive_part, MAX_PATH); - ok(success, "GetVolumePathNameW error %u\n", GetLastError()); + ok(success, "GetVolumePathNameW error %lu\n", GetLastError()); success = GetVolumeNameForVolumeMountPointW(drive_part, volume_path, ARRAY_SIZE(volume_path)); - ok(success, "GetVolumeNameForVolumeMountPointW error %u\n", GetLastError()); + ok(success, "GetVolumeNameForVolumeMountPointW error %lu\n", GetLastError());
/* Test for VOLUME_NAME_GUID */ lstrcatW(volume_path, long_path + lstrlenW(drive_part)); memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleW(file, result_path, MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_GUID); - ok(count == lstrlenW(volume_path), "Expected length %u, got %u\n", lstrlenW(volume_path), count); + ok(count == lstrlenW(volume_path), "Expected length %u, got %lu\n", lstrlenW(volume_path), count); ok(lstrcmpiW(volume_path, result_path) == 0, "Expected %s, got %s\n", wine_dbgstr_w(volume_path), wine_dbgstr_w(result_path));
@@ -5216,19 +5217,19 @@ static void test_GetFinalPathNameByHandleW(void) file_part = long_path + lstrlenW(drive_part) - 1; memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleW(file, result_path, MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_NONE); - ok(count == lstrlenW(file_part), "Expected length %u, got %u\n", lstrlenW(file_part), count); + ok(count == lstrlenW(file_part), "Expected length %u, got %lu\n", lstrlenW(file_part), count); ok(lstrcmpiW(file_part, result_path) == 0, "Expected %s, got %s\n", wine_dbgstr_w(file_part), wine_dbgstr_w(result_path));
drive_part[lstrlenW(drive_part)-1] = 0; success = QueryDosDeviceW(drive_part, nt_path, ARRAY_SIZE(nt_path)); - ok(success, "QueryDosDeviceW error %u\n", GetLastError()); + ok(success, "QueryDosDeviceW error %lu\n", GetLastError());
/* Test for VOLUME_NAME_NT */ lstrcatW(nt_path, file_part); memset(result_path, 0x11, sizeof(result_path)); count = pGetFinalPathNameByHandleW(file, result_path, MAX_PATH, FILE_NAME_NORMALIZED | VOLUME_NAME_NT); - ok(count == lstrlenW(nt_path), "Expected length %u, got %u\n", lstrlenW(nt_path), count); + ok(count == lstrlenW(nt_path), "Expected length %u, got %lu\n", lstrlenW(nt_path), count); ok(lstrcmpiW(nt_path, result_path) == 0, "Expected %s, got %s\n", wine_dbgstr_w(nt_path), wine_dbgstr_w(result_path));
@@ -5257,97 +5258,97 @@ static void test_SetFileInformationByHandle(void) }
ret = GetTempPathA(sizeof(tempPath), tempPath); - ok(ret, "GetTempPathA failed, got error %u.\n", GetLastError()); + ok(ret, "GetTempPathA failed, got error %lu.\n", GetLastError());
/* ensure the existence of a file in the temp folder */ ret = GetTempFileNameA(tempPath, "abc", 0, tempFileName); - ok(ret, "GetTempFileNameA failed, got error %u.\n", GetLastError()); + ok(ret, "GetTempFileNameA failed, got error %lu.\n", GetLastError());
file = CreateFileA(tempFileName, GENERIC_READ | FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, NULL); - ok(file != INVALID_HANDLE_VALUE, "failed to open the temp file, error %u.\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open the temp file, error %lu.\n", GetLastError());
/* invalid classes */ SetLastError(0xdeadbeef); ret = pSetFileInformationByHandle(file, FileStandardInfo, &stdinfo, sizeof(stdinfo)); - 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());
memset(&compressinfo, 0, sizeof(compressinfo)); SetLastError(0xdeadbeef); ret = pSetFileInformationByHandle(file, FileCompressionInfo, &compressinfo, sizeof(compressinfo)); - 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());
SetLastError(0xdeadbeef); ret = pSetFileInformationByHandle(file, FileAttributeTagInfo, &fileattrinfo, sizeof(fileattrinfo)); - 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());
SetLastError(0xdeadbeef); hintinfo.PriorityHint = MaximumIoPriorityHintType; ret = pSetFileInformationByHandle(file, FileIoPriorityHintInfo, &hintinfo, sizeof(hintinfo)); - 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());
hintinfo.PriorityHint = IoPriorityHintNormal; ret = pSetFileInformationByHandle(file, FileIoPriorityHintInfo, &hintinfo, sizeof(hintinfo)); - ok(ret, "setting FileIoPriorityHintInfo got %d, error %d\n", ret, GetLastError()); + ok(ret, "setting FileIoPriorityHintInfo got %d, error %ld\n", ret, GetLastError());
hintinfo.PriorityHint = IoPriorityHintVeryLow; ret = pSetFileInformationByHandle(file, FileIoPriorityHintInfo, &hintinfo, sizeof(hintinfo)); - ok(ret, "setting FileIoPriorityHintInfo got %d, error %d\n", ret, GetLastError()); + ok(ret, "setting FileIoPriorityHintInfo got %d, error %ld\n", ret, GetLastError());
SetLastError(0xdeadbeef); ret = pSetFileInformationByHandle(file, FileIoPriorityHintInfo, &hintinfo, sizeof(hintinfo) - 1); - ok(!ret && GetLastError() == ERROR_BAD_LENGTH, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_BAD_LENGTH, "got %d, error %ld\n", ret, GetLastError());
SetLastError(0xdeadbeef); hintinfo.PriorityHint = IoPriorityHintVeryLow - 1; ret = pSetFileInformationByHandle(file, FileIoPriorityHintInfo, &hintinfo, sizeof(hintinfo)); - 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());
memset(&protinfo, 0, sizeof(protinfo)); protinfo.StructureVersion = 1; protinfo.StructureSize = sizeof(protinfo); SetLastError(0xdeadbeef); ret = pSetFileInformationByHandle(file, FileRemoteProtocolInfo, &protinfo, sizeof(protinfo)); - 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());
/* test FileDispositionInfo, additional details already covered by ntdll tests */ SetLastError(0xdeadbeef); ret = pSetFileInformationByHandle(file, FileDispositionInfo, &dispinfo, 0); todo_wine - ok(!ret && GetLastError() == ERROR_BAD_LENGTH, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_BAD_LENGTH, "got %d, error %ld\n", ret, GetLastError());
SetLastError(0xdeadbeef); ret = pSetFileInformationByHandle(file, FileBasicInfo, &basicinfo, 0); todo_wine - ok(!ret && GetLastError() == ERROR_BAD_LENGTH, "got %d, error %d\n", ret, GetLastError()); + ok(!ret && GetLastError() == ERROR_BAD_LENGTH, "got %d, error %ld\n", ret, GetLastError());
memset(&basicinfo, 0, sizeof(basicinfo)); ret = pGetFileInformationByHandleEx(file, FileBasicInfo, &basicinfo, sizeof(basicinfo)); - ok(ret, "Failed to get basic info, error %d.\n", GetLastError()); + ok(ret, "Failed to get basic info, error %ld.\n", GetLastError()); atime = basicinfo.LastAccessTime;
basicinfo.LastAccessTime.QuadPart++; ret = pSetFileInformationByHandle(file, FileBasicInfo, &basicinfo, sizeof(basicinfo)); - ok(ret, "Failed to set basic info, error %d.\n", GetLastError()); + ok(ret, "Failed to set basic info, error %ld.\n", GetLastError());
memset(&basicinfo, 0, sizeof(basicinfo)); ret = pGetFileInformationByHandleEx(file, FileBasicInfo, &basicinfo, sizeof(basicinfo)); - ok(ret, "Failed to get basic info, error %d.\n", GetLastError()); + ok(ret, "Failed to get basic info, error %ld.\n", GetLastError()); ok(atime.QuadPart + 1 == basicinfo.LastAccessTime.QuadPart, "Unexpected access time.\n");
memset(&basicinfo, 0, sizeof(basicinfo)); basicinfo.LastAccessTime.QuadPart = -1; ret = pSetFileInformationByHandle(file, FileBasicInfo, &basicinfo, sizeof(basicinfo)); - ok(ret, "Failed to set basic info, error %d.\n", GetLastError()); + ok(ret, "Failed to set basic info, error %ld.\n", GetLastError());
memset(&basicinfo, 0, sizeof(basicinfo)); ret = pGetFileInformationByHandleEx(file, FileBasicInfo, &basicinfo, sizeof(basicinfo)); - ok(ret, "Failed to get basic info, error %d.\n", GetLastError()); + ok(ret, "Failed to get basic info, error %ld.\n", GetLastError()); ok(atime.QuadPart + 1 == basicinfo.LastAccessTime.QuadPart, "Unexpected access time.\n");
dispinfo.DeleteFile = TRUE; ret = pSetFileInformationByHandle(file, FileDispositionInfo, &dispinfo, sizeof(dispinfo)); - ok(ret, "setting FileDispositionInfo failed, error %d\n", GetLastError()); + ok(ret, "setting FileDispositionInfo failed, error %ld\n", GetLastError());
CloseHandle(file); } @@ -5368,19 +5369,19 @@ static void test_SetFileRenameInfo(void) }
ret = GetTempPathW(MAX_PATH, tempPath); - ok(ret, "GetTempPathW failed, got error %u.\n", GetLastError()); + ok(ret, "GetTempPathW failed, got error %lu.\n", GetLastError());
ret = GetTempFileNameW(tempPath, L"abc", 0, tempFileFrom); - ok(ret, "GetTempFileNameW failed, got error %u.\n", GetLastError()); + ok(ret, "GetTempFileNameW failed, got error %lu.\n", GetLastError());
ret = GetTempFileNameW(tempPath, L"abc", 0, tempFileTo1); - ok(ret, "GetTempFileNameW failed, got error %u.\n", GetLastError()); + ok(ret, "GetTempFileNameW failed, got error %lu.\n", GetLastError());
ret = GetTempFileNameW(tempPath, L"abc", 1, tempFileTo2); - ok(ret, "GetTempFileNameW failed, got error %u.\n", GetLastError()); + ok(ret, "GetTempFileNameW failed, got error %lu.\n", GetLastError());
file = CreateFileW(tempFileFrom, GENERIC_READ | GENERIC_WRITE | DELETE, 0, 0, OPEN_EXISTING, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "failed to create temp file, error %u.\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to create temp file, error %lu.\n", GetLastError());
size = sizeof(FILE_RENAME_INFORMATION) + MAX_PATH; fri = HeapAlloc(GetProcessHeap(), 0, size); @@ -5390,27 +5391,27 @@ static void test_SetFileRenameInfo(void) fri->FileNameLength = wcslen(tempFileTo1) * sizeof(WCHAR); memcpy(fri->FileName, tempFileTo1, fri->FileNameLength + sizeof(WCHAR)); ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); - ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS, "FileRenameInfo unexpected result %d\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS, "FileRenameInfo unexpected result %ld\n", GetLastError());
fri->ReplaceIfExists = TRUE; ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); - ok(ret, "FileRenameInfo failed, error %d\n", GetLastError()); + ok(ret, "FileRenameInfo failed, error %ld\n", GetLastError());
fri->ReplaceIfExists = FALSE; fri->FileNameLength = wcslen(tempFileTo2) * sizeof(WCHAR); memcpy(fri->FileName, tempFileTo2, fri->FileNameLength + sizeof(WCHAR)); ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); - ok(ret, "FileRenameInfo failed, error %d\n", GetLastError()); + ok(ret, "FileRenameInfo failed, error %ld\n", GetLastError()); CloseHandle(file);
file = CreateFileW(tempFileTo2, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "file not renamed, error %d\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "file not renamed, error %ld\n", GetLastError());
fri->FileNameLength = wcslen(tempFileTo1) * sizeof(WCHAR); memcpy(fri->FileName, tempFileTo1, fri->FileNameLength + sizeof(WCHAR)); ret = pSetFileInformationByHandle(file, FileRenameInfo, fri, size); todo_wine - ok(!ret && GetLastError() == ERROR_ACCESS_DENIED, "FileRenameInfo unexpected result %d\n", GetLastError()); + ok(!ret && GetLastError() == ERROR_ACCESS_DENIED, "FileRenameInfo unexpected result %ld\n", GetLastError()); CloseHandle(file);
HeapFree(GetProcessHeap(), 0, fri); @@ -5439,13 +5440,13 @@ static void test_GetFileAttributesExW(void)
for (test_idx = 0; test_idx < ARRAY_SIZE(tests); ++test_idx) { - winetest_push_context("Test %u", test_idx); + winetest_push_context("Test %lu", test_idx);
SetLastError(0xdeadbeef); ret = GetFileAttributesExW(tests[test_idx].path, GetFileExInfoStandard, &info); error = GetLastError(); ok(!ret, "GetFileAttributesExW succeeded\n"); - ok(error == tests[test_idx].expected_error, "Expected error %u, got %u\n", + ok(error == tests[test_idx].expected_error, "Expected error %lu, got %lu\n", tests[test_idx].expected_error, error);
winetest_pop_context(); @@ -5463,24 +5464,24 @@ static void test_post_completion(void) BOOL ret;
port = CreateIoCompletionPort( INVALID_HANDLE_VALUE, NULL, 999, 0 ); - ok(port != NULL, "CreateIoCompletionPort failed: %u\n", GetLastError()); + ok(port != NULL, "CreateIoCompletionPort failed: %lu\n", GetLastError());
ret = GetQueuedCompletionStatus( port, &size, &key, &povl, 0 ); ok(!ret, "GetQueuedCompletionStatus succeeded\n"); - ok(GetLastError() == WAIT_TIMEOUT, "wrong error %u\n", GetLastError()); + ok(GetLastError() == WAIT_TIMEOUT, "wrong error %lu\n", GetLastError());
ret = PostQueuedCompletionStatus( port, 123, 456, &ovl ); - ok(ret, "PostQueuedCompletionStatus failed: %u\n", GetLastError()); + ok(ret, "PostQueuedCompletionStatus failed: %lu\n", GetLastError());
ret = GetQueuedCompletionStatus( port, &size, &key, &povl, 0 ); - ok(ret, "GetQueuedCompletionStatus failed: %u\n", GetLastError()); - ok(size == 123, "wrong size %u\n", size); - ok(key == 456, "wrong key %lu\n", key); + ok(ret, "GetQueuedCompletionStatus failed: %lu\n", GetLastError()); + ok(size == 123, "wrong size %lu\n", size); + ok(key == 456, "wrong key %Iu\n", key); ok(povl == &ovl, "wrong ovl %p\n", povl);
ret = GetQueuedCompletionStatus( port, &size, &key, &povl, 0 ); ok(!ret, "GetQueuedCompletionStatus succeeded\n"); - ok(GetLastError() == WAIT_TIMEOUT, "wrong error %u\n", GetLastError()); + ok(GetLastError() == WAIT_TIMEOUT, "wrong error %lu\n", GetLastError());
if (!pGetQueuedCompletionStatusEx) { @@ -5492,67 +5493,67 @@ static void test_post_completion(void) count = 0xdeadbeef; ret = pGetQueuedCompletionStatusEx( port, entries, 2, &count, 0, FALSE ); ok(!ret, "GetQueuedCompletionStatusEx succeeded\n"); - ok(GetLastError() == WAIT_TIMEOUT, "wrong error %u\n", GetLastError()); - ok(count == 1, "wrong count %u\n", count); + ok(GetLastError() == WAIT_TIMEOUT, "wrong error %lu\n", GetLastError()); + ok(count == 1, "wrong count %lu\n", count);
ret = PostQueuedCompletionStatus( port, 123, 456, &ovl ); - ok(ret, "PostQueuedCompletionStatus failed: %u\n", GetLastError()); + ok(ret, "PostQueuedCompletionStatus failed: %lu\n", GetLastError());
count = 0xdeadbeef; memset( entries, 0xcc, sizeof(entries) ); ret = pGetQueuedCompletionStatusEx( port, entries, 2, &count, 0, FALSE ); ok(ret, "GetQueuedCompletionStatusEx failed\n"); - ok(count == 1, "wrong count %u\n", count); - ok(entries[0].lpCompletionKey == 456, "wrong key %lu\n", entries[0].lpCompletionKey); + ok(count == 1, "wrong count %lu\n", count); + ok(entries[0].lpCompletionKey == 456, "wrong key %Iu\n", entries[0].lpCompletionKey); ok(entries[0].lpOverlapped == &ovl, "wrong ovl %p\n", entries[0].lpOverlapped); - ok(!(ULONG)entries[0].Internal, "wrong internal %#x\n", (ULONG)entries[0].Internal); - ok(entries[0].dwNumberOfBytesTransferred == 123, "wrong size %u\n", entries[0].dwNumberOfBytesTransferred); + ok(!(ULONG)entries[0].Internal, "wrong internal %#lx\n", (ULONG)entries[0].Internal); + ok(entries[0].dwNumberOfBytesTransferred == 123, "wrong size %lu\n", entries[0].dwNumberOfBytesTransferred);
ret = PostQueuedCompletionStatus( port, 123, 456, &ovl ); - ok(ret, "PostQueuedCompletionStatus failed: %u\n", GetLastError()); + ok(ret, "PostQueuedCompletionStatus failed: %lu\n", GetLastError());
ret = PostQueuedCompletionStatus( port, 654, 321, &ovl2 ); - ok(ret, "PostQueuedCompletionStatus failed: %u\n", GetLastError()); + ok(ret, "PostQueuedCompletionStatus failed: %lu\n", GetLastError());
count = 0xdeadbeef; memset( entries, 0xcc, sizeof(entries) ); ret = pGetQueuedCompletionStatusEx( port, entries, 2, &count, 0, FALSE ); ok(ret, "GetQueuedCompletionStatusEx failed\n"); - ok(count == 2, "wrong count %u\n", count); - ok(entries[0].lpCompletionKey == 456, "wrong key %lu\n", entries[0].lpCompletionKey); + ok(count == 2, "wrong count %lu\n", count); + ok(entries[0].lpCompletionKey == 456, "wrong key %Iu\n", entries[0].lpCompletionKey); ok(entries[0].lpOverlapped == &ovl, "wrong ovl %p\n", entries[0].lpOverlapped); - ok(!(ULONG)entries[0].Internal, "wrong internal %#x\n", (ULONG)entries[0].Internal); - ok(entries[0].dwNumberOfBytesTransferred == 123, "wrong size %u\n", entries[0].dwNumberOfBytesTransferred); - ok(entries[1].lpCompletionKey == 321, "wrong key %lu\n", entries[1].lpCompletionKey); + ok(!(ULONG)entries[0].Internal, "wrong internal %#lx\n", (ULONG)entries[0].Internal); + ok(entries[0].dwNumberOfBytesTransferred == 123, "wrong size %lu\n", entries[0].dwNumberOfBytesTransferred); + ok(entries[1].lpCompletionKey == 321, "wrong key %Iu\n", entries[1].lpCompletionKey); ok(entries[1].lpOverlapped == &ovl2, "wrong ovl %p\n", entries[1].lpOverlapped); - ok(!(ULONG)entries[1].Internal, "wrong internal %#x\n", (ULONG)entries[1].Internal); - ok(entries[1].dwNumberOfBytesTransferred == 654, "wrong size %u\n", entries[1].dwNumberOfBytesTransferred); + ok(!(ULONG)entries[1].Internal, "wrong internal %#lx\n", (ULONG)entries[1].Internal); + ok(entries[1].dwNumberOfBytesTransferred == 654, "wrong size %lu\n", entries[1].dwNumberOfBytesTransferred);
user_apc_ran = FALSE; QueueUserAPC( user_apc, GetCurrentThread(), 0 );
ret = pGetQueuedCompletionStatusEx( port, entries, 2, &count, 0, FALSE ); ok(!ret, "GetQueuedCompletionStatusEx succeeded\n"); - ok(GetLastError() == WAIT_TIMEOUT, "wrong error %u\n", GetLastError()); - ok(count == 1, "wrong count %u\n", count); + ok(GetLastError() == WAIT_TIMEOUT, "wrong error %lu\n", GetLastError()); + ok(count == 1, "wrong count %lu\n", count); ok(!user_apc_ran, "user APC should not have run\n");
ret = pGetQueuedCompletionStatusEx( port, entries, 2, &count, 0, TRUE ); ok(!ret || broken(ret) /* Vista */, "GetQueuedCompletionStatusEx succeeded\n"); if (!ret) - ok(GetLastError() == WAIT_IO_COMPLETION, "wrong error %u\n", GetLastError()); - ok(count == 1, "wrong count %u\n", count); + ok(GetLastError() == WAIT_IO_COMPLETION, "wrong error %lu\n", GetLastError()); + ok(count == 1, "wrong count %lu\n", count); ok(user_apc_ran, "user APC should have run\n");
user_apc_ran = FALSE; QueueUserAPC( user_apc, GetCurrentThread(), 0 );
ret = PostQueuedCompletionStatus( port, 123, 456, &ovl ); - ok(ret, "PostQueuedCompletionStatus failed: %u\n", GetLastError()); + ok(ret, "PostQueuedCompletionStatus failed: %lu\n", GetLastError());
ret = pGetQueuedCompletionStatusEx( port, entries, 2, &count, 0, TRUE ); ok(ret, "GetQueuedCompletionStatusEx failed\n"); - ok(count == 1, "wrong count %u\n", count); + ok(count == 1, "wrong count %lu\n", count); ok(!user_apc_ran, "user APC should not have run\n");
SleepEx(0, TRUE); @@ -5575,34 +5576,34 @@ static void test_overlapped_read(void) DWORD ret;
ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret, "Unexpected error %u.\n", GetLastError()); + ok(ret, "Unexpected error %lu.\n", GetLastError()); ret = GetTempFileNameA(temp_path, prefix, 0, file_name); - ok(ret, "Unexpected error %u.\n", GetLastError()); + ok(ret, "Unexpected error %lu.\n", GetLastError());
hfile = CreateFileA(file_name, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING, NULL); - ok(hfile != INVALID_HANDLE_VALUE, "Failed to create file, GetLastError() %u.\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "Failed to create file, GetLastError() %lu.\n", GetLastError()); memset(buffer, 0x55, sizeof(buffer)); ret = WriteFile(hfile, buffer, TEST_OVERLAPPED_READ_SIZE, &bytes_count, NULL); ok(ret && bytes_count == TEST_OVERLAPPED_READ_SIZE, - "Unexpected WriteFile result, ret %#x, bytes_count %u, GetLastError() %u.\n", + "Unexpected WriteFile result, ret %#lx, bytes_count %lu, GetLastError() %lu.\n", ret, bytes_count, GetLastError()); CloseHandle(hfile);
hfile = CreateFileA(file_name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | FILE_FLAG_NO_BUFFERING, NULL); - ok(hfile != INVALID_HANDLE_VALUE, "Failed to create file, GetLastError() %u.\n", GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "Failed to create file, GetLastError() %lu.\n", GetLastError());
memset(&ov, 0, sizeof(ov));
bytes_count = 0xffffffff; ret = ReadFile(hfile, buffer, TEST_OVERLAPPED_READ_SIZE, &bytes_count, &ov); ok(!ret && GetLastError() == ERROR_IO_PENDING, - "Unexpected ReadFile result, ret %#x, GetLastError() %u.\n", ret, GetLastError()); - ok(!bytes_count, "Unexpected read size %u.\n", bytes_count); + "Unexpected ReadFile result, ret %#lx, GetLastError() %lu.\n", ret, GetLastError()); + ok(!bytes_count, "Unexpected read size %lu.\n", bytes_count); ret = GetOverlappedResult(hfile, &ov, &bytes_count, TRUE); - ok(ret, "Unexpected error %u.\n", GetLastError()); - ok(bytes_count == TEST_OVERLAPPED_READ_SIZE, "Unexpected read size %u.\n", bytes_count); + ok(ret, "Unexpected error %lu.\n", GetLastError()); + ok(bytes_count == TEST_OVERLAPPED_READ_SIZE, "Unexpected read size %lu.\n", bytes_count);
S(U(ov)).Offset = bytes_count; ret = ReadFile(hfile, buffer, TEST_OVERLAPPED_READ_SIZE, &bytes_count, &ov); @@ -5610,18 +5611,18 @@ static void test_overlapped_read(void) /* Win8+ return ERROR_IO_PENDING like stated in MSDN, while older ones * return ERROR_HANDLE_EOF right away. */ ok(!ret && (err == ERROR_IO_PENDING || broken(err == ERROR_HANDLE_EOF)), - "Unexpected ReadFile result, ret %#x, GetLastError() %u.\n", ret, GetLastError()); + "Unexpected ReadFile result, ret %#lx, GetLastError() %lu.\n", ret, GetLastError()); if (err == ERROR_IO_PENDING) { ret = GetOverlappedResult(hfile, &ov, &bytes_count, TRUE); - ok(!ret && GetLastError() == ERROR_HANDLE_EOF, "Unexpected result %#x, GetLasttError() %u.\n", + ok(!ret && GetLastError() == ERROR_HANDLE_EOF, "Unexpected result %#lx, GetLasttError() %lu.\n", ret, GetLastError()); } - ok(!bytes_count, "Unexpected read size %u.\n", bytes_count); + ok(!bytes_count, "Unexpected read size %lu.\n", bytes_count);
CloseHandle(hfile); ret = DeleteFileA(file_name); - ok(ret, "Unexpected error %u.\n", GetLastError()); + ok(ret, "Unexpected error %lu.\n", GetLastError()); }
static void test_file_readonly_access(void) @@ -5636,21 +5637,21 @@ static void test_file_readonly_access(void)
/* Set up */ ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathA error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathA error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameA(temp_path, prefix, 0, file_name); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError()); ret = DeleteFileA(file_name); ok(ret, "expect success\n");
ret = GetTempFileNameA(temp_path, prefix, 0, file_name2); - ok(ret != 0, "GetTempFileNameA error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameA error %ld\n", GetLastError()); ret = DeleteFileA(file_name2); ok(ret, "expect success\n");
handle = CreateFileA(file_name, 0, default_sharing, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_READONLY, 0); - ok(handle != INVALID_HANDLE_VALUE, "CreateFileA: error %d\n", GetLastError()); + ok(handle != INVALID_HANDLE_VALUE, "CreateFileA: error %ld\n", GetLastError()); CloseHandle(handle);
/* CreateFile GENERIC_WRITE */ @@ -5658,7 +5659,7 @@ static void test_file_readonly_access(void) handle = CreateFileA(file_name, GENERIC_WRITE, default_sharing, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); error = GetLastError(); ok(handle == INVALID_HANDLE_VALUE, "expect failure\n"); - ok(error == ERROR_ACCESS_DENIED, "wrong error code: %#x\n", error); + ok(error == ERROR_ACCESS_DENIED, "wrong error code: %#lx\n", error);
/* CreateFile DELETE without FILE_FLAG_DELETE_ON_CLOSE */ handle = CreateFileA(file_name, DELETE, default_sharing, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); @@ -5671,7 +5672,7 @@ static void test_file_readonly_access(void) FILE_FLAG_DELETE_ON_CLOSE | FILE_ATTRIBUTE_NORMAL, 0); error = GetLastError(); ok(handle == INVALID_HANDLE_VALUE, "expect failure\n"); - ok(error == ERROR_ACCESS_DENIED, "wrong error code: %#x\n", error); + ok(error == ERROR_ACCESS_DENIED, "wrong error code: %#lx\n", error);
ret = MoveFileA(file_name, file_name2); ok(ret, "expect success\n"); @@ -5682,15 +5683,15 @@ static void test_file_readonly_access(void) ret = DeleteFileA(file_name); error = GetLastError(); ok(!ret, "expect failure\n"); - ok(error == ERROR_ACCESS_DENIED, "wrong error code: %#x\n", error); + ok(error == ERROR_ACCESS_DENIED, "wrong error code: %#lx\n", error);
ret = GetFileAttributesA(file_name); - ok(ret & FILE_ATTRIBUTE_READONLY, "got wrong attribute: %#x.\n", ret); + ok(ret & FILE_ATTRIBUTE_READONLY, "got wrong attribute: %#lx.\n", ret);
/* Clean up */ SetFileAttributesA(file_name, FILE_ATTRIBUTE_NORMAL); ret = DeleteFileA(file_name); - ok(ret, "DeleteFileA: error %d\n", GetLastError()); + ok(ret, "DeleteFileA: error %ld\n", GetLastError()); }
static void test_find_file_stream(void) @@ -5722,35 +5723,35 @@ static void test_SetFileTime(void) HANDLE hfile;
ret = GetTempPathW(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPathW error %d\n", GetLastError()); + ok(ret != 0, "GetTempPathW error %ld\n", GetLastError()); ok(ret < MAX_PATH, "temp path should fit into MAX_PATH\n");
ret = GetTempFileNameW(temp_path, prefix, 0, path); - ok(ret != 0, "GetTempFileNameW error %d\n", GetLastError()); + ok(ret != 0, "GetTempFileNameW error %ld\n", GetLastError());
hfile = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_FLAG_DELETE_ON_CLOSE, 0); ok(hfile != INVALID_HANDLE_VALUE, "failed to open source file\n"); ret = WriteFile(hfile, prefix, sizeof(prefix), &len, NULL ); - ok(ret && len == sizeof(prefix), "WriteFile error %d\n", GetLastError()); + ok(ret && len == sizeof(prefix), "WriteFile error %ld\n", GetLastError()); ok(GetFileSize(hfile, NULL) == sizeof(prefix), "source file has wrong size\n");
ret = GetFileTime(hfile, NULL, NULL, &ft1); - ok(ret, "GetFileTime error %d\n", GetLastError()); + ok(ret, "GetFileTime error %ld\n", GetLastError()); ft2 = ft1; ft2.dwLowDateTime -= 600000000; /* 60 second */ ret = SetFileTime(hfile, NULL, NULL, &ft2); - ok(ret, "SetFileTime error %d\n", GetLastError()); + ok(ret, "SetFileTime error %ld\n", GetLastError()); memset(&ft2, 0, sizeof(ft2)); ret = GetFileTime(hfile, NULL, NULL, &ft2); /* get the actual time back */ - ok(ret, "GetFileTime error %d\n", GetLastError()); + ok(ret, "GetFileTime error %ld\n", GetLastError()); ok(memcmp(&ft1, &ft2, sizeof(ft1)), "Unexpected write time.\n");
memset(&ft1, 0xff, sizeof(ft1)); ret = SetFileTime(hfile, NULL, NULL, &ft1); - ok(ret, "SetFileTime error %d\n", GetLastError()); + ok(ret, "SetFileTime error %ld\n", GetLastError()); memset(&ft1, 0, sizeof(ft1)); ret = GetFileTime(hfile, NULL, NULL, &ft1); /* get the actual time back */ - ok(ret, "GetFileTime error %d\n", GetLastError()); + ok(ret, "GetFileTime error %ld\n", GetLastError()); ok(!memcmp(&ft1, &ft2, sizeof(ft1)), "Unexpected write time.\n");
CloseHandle(hfile); @@ -5771,67 +5772,67 @@ static void test_hard_link(void) SetCurrentDirectoryA( temp_dir );
ret = CreateDirectoryA( "winetest_dir1", NULL ); - ok(ret, "failed to create directory, error %u\n", GetLastError()); + ok(ret, "failed to create directory, error %lu\n", GetLastError()); ret = CreateDirectoryA( "winetest_dir2", NULL ); - ok(ret, "failed to create directory, error %u\n", GetLastError()); + ok(ret, "failed to create directory, error %lu\n", GetLastError()); create_file( "winetest_file1" ); create_file( "winetest_file2" );
ret = CreateHardLinkA( "winetest_file3", "winetest_file1", NULL ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError());
file = CreateFileA( "winetest_file3", FILE_READ_DATA, 0, NULL, OPEN_EXISTING, 0, NULL ); - ok(file != INVALID_HANDLE_VALUE, "got error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "got error %lu\n", GetLastError());
status = NtQueryInformationFile( file, &io, name_buffer, sizeof(name_buffer), FileNameInformation ); - ok(!status, "got status %#x\n", status); + ok(!status, "got status %#lx\n", status); ok(!wcsncmp(name_info->FileName + (name_info->FileNameLength / sizeof(WCHAR)) - wcslen(L"\winetest_file3"), L"\winetest_file3", wcslen(L"\winetest_file3")), "got name %s\n", debugstr_wn(name_info->FileName, name_info->FileNameLength / sizeof(WCHAR)));
ret = ReadFile( file, buffer, sizeof(buffer), &size, NULL ); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!memcmp( buffer, "winetest_file1", size ), "got file contents %s\n", debugstr_an( buffer, size ));
CloseHandle( file );
ret = DeleteFileA( "winetest_file3" ); - ok(ret, "failed to delete file, error %u\n", GetLastError()); + ok(ret, "failed to delete file, error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = CreateHardLinkA( "winetest_file2", "winetest_file1", NULL ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = CreateHardLinkA( "WineTest_File1", "winetest_file1", NULL ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = CreateHardLinkA( "winetest_file3", "winetest_dir1", NULL ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = CreateHardLinkA( "winetest_dir2", "winetest_dir1", NULL ); ok(!ret, "expected failure\n"); ok(GetLastError() == ERROR_ACCESS_DENIED - || GetLastError() == ERROR_ALREADY_EXISTS /* XP */, "got error %u\n", GetLastError()); + || GetLastError() == ERROR_ALREADY_EXISTS /* XP */, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = CreateHardLinkA( "winetest_dir1", "winetest_file1", NULL ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %lu\n", GetLastError());
ret = RemoveDirectoryA( "winetest_dir1" ); - ok(ret, "failed to remove directory, error %u\n", GetLastError()); + ok(ret, "failed to remove directory, error %lu\n", GetLastError()); ret = RemoveDirectoryA( "winetest_dir2" ); - ok(ret, "failed to remove directory, error %u\n", GetLastError()); + ok(ret, "failed to remove directory, error %lu\n", GetLastError()); ret = DeleteFileA( "winetest_file1" ); - ok(ret, "failed to delete file, error %u\n", GetLastError()); + ok(ret, "failed to delete file, error %lu\n", GetLastError()); ret = DeleteFileA( "winetest_file2" ); - ok(ret, "failed to delete file, error %u\n", GetLastError()); + ok(ret, "failed to delete file, error %lu\n", GetLastError()); SetCurrentDirectoryA( cwd ); }
@@ -5846,14 +5847,14 @@ static void test_move_file(void) SetCurrentDirectoryA( temp_dir );
ret = CreateDirectoryA( "winetest_dir1", NULL ); - ok(ret, "failed to create directory, error %u\n", GetLastError()); + ok(ret, "failed to create directory, error %lu\n", GetLastError()); ret = CreateDirectoryA( "winetest_dir2", NULL ); - ok(ret, "failed to create directory, error %u\n", GetLastError()); + ok(ret, "failed to create directory, error %lu\n", GetLastError()); create_file( "winetest_file1" ); create_file( "winetest_file2" );
ret = MoveFileA( "winetest_file1", "winetest_file3" ); - ok(ret, "failed to move file, error %u\n", GetLastError()); + ok(ret, "failed to move file, error %lu\n", GetLastError()); ret = GetFileAttributesA( "winetest_file1" ); ok(ret == INVALID_FILE_ATTRIBUTES, "got %#x\n", ret); ret = GetFileAttributesA( "winetest_file3" ); @@ -5862,32 +5863,32 @@ static void test_move_file(void) SetLastError(0xdeadbeef); ret = MoveFileA( "winetest_file3", "winetest_file2" ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = MoveFileA( "winetest_file1", "winetest_file4" ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "got error %lu\n", GetLastError());
ret = MoveFileA( "winetest_dir1", "winetest_dir3" ); - ok(ret, "failed to move file, error %u\n", GetLastError()); + ok(ret, "failed to move file, error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = MoveFileA( "winetest_dir3", "winetest_dir2" ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ALREADY_EXISTS, "got error %lu\n", GetLastError());
file = CreateFileA( "winetest_file3", DELETE, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %lu\n", GetLastError()); ret = MoveFileA( "winetest_file3", "winetest_file1" ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_SHARING_VIOLATION, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_SHARING_VIOLATION, "got error %lu\n", GetLastError()); CloseHandle( file );
file = CreateFileA( "winetest_file3", 0, 0, NULL, OPEN_EXISTING, 0, 0 ); - ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %lu\n", GetLastError()); ret = MoveFileA( "winetest_file3", "winetest_file1" ); - ok(ret, "failed to move file, error %u\n", GetLastError()); + ok(ret, "failed to move file, error %lu\n", GetLastError()); ret = GetFileAttributesA( "winetest_file1" ); ok(ret != INVALID_FILE_ATTRIBUTES, "got %#x\n", ret); ret = GetFileAttributesA( "winetest_file3" ); @@ -5895,36 +5896,36 @@ static void test_move_file(void) CloseHandle( file );
ret = MoveFileExA( "winetest_file1", "winetest_file2", MOVEFILE_REPLACE_EXISTING ); - ok(ret, "failed to move file, error %u\n", GetLastError()); + ok(ret, "failed to move file, error %lu\n", GetLastError());
file = CreateFileA( "winetest_file1", GENERIC_ALL, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, CREATE_NEW, 0, 0 ); - ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to open file, error %lu\n", GetLastError()); SetLastError(0xdeadbeef); ret = MoveFileExA( "winetest_file2", "winetest_file1", MOVEFILE_REPLACE_EXISTING ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError()); CloseHandle( file );
SetLastError(0xdeadbeef); ret = MoveFileExA( "winetest_file2", "winetest_dir2", MOVEFILE_REPLACE_EXISTING ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); ret = MoveFileExA( "winetest_dir3", "winetest_dir2", MOVEFILE_REPLACE_EXISTING ); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "got error %lu\n", GetLastError());
ret = MoveFileExA( "winetest_dir2", "winetest_file2", MOVEFILE_REPLACE_EXISTING ); - ok(ret, "failed to move file, error %u\n", GetLastError()); + ok(ret, "failed to move file, error %lu\n", GetLastError());
ret = RemoveDirectoryA( "winetest_dir3" ); - ok(ret, "failed to remove directory, error %u\n", GetLastError()); + ok(ret, "failed to remove directory, error %lu\n", GetLastError()); ret = RemoveDirectoryA( "winetest_file2" ); - ok(ret, "failed to remove directory, error %u\n", GetLastError()); + ok(ret, "failed to remove directory, error %lu\n", GetLastError()); ret = DeleteFileA( "winetest_file1" ); - ok(ret, "failed to delete file, error %u\n", GetLastError()); + ok(ret, "failed to delete file, error %lu\n", GetLastError()); SetCurrentDirectoryA( cwd ); }
@@ -5954,23 +5955,23 @@ static void test_eof(void) GetTempFileNameA(temp_path, "eof", 0, filename);
file = CreateFileA(filename, GENERIC_READ | GENERIC_WRITE | DELETE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "failed to create file, error %u\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "failed to create file, error %lu\n", GetLastError());
ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(!file_size.QuadPart, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 2, NULL, SEEK_SET);
ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(!file_size.QuadPart, "got size %I64d\n", file_size.QuadPart);
SetLastError(0xdeadbeef); ret = ReadFile(file, buffer, sizeof(buffer), &size, NULL); - ok(ret, "failed to read, error %u\n", GetLastError()); - ok(!size, "got size %u\n", size); - ok(GetLastError() == 0xdeadbeef, "got error %u\n", GetLastError()); + ok(ret, "failed to read, error %lu\n", GetLastError()); + ok(!size, "got size %lu\n", size); + ok(GetLastError() == 0xdeadbeef, "got error %lu\n", GetLastError());
SetFilePointer(file, 2, NULL, SEEK_SET);
@@ -5979,155 +5980,155 @@ static void test_eof(void) overlapped.Offset = 2; ret = ReadFile(file, buffer, sizeof(buffer), &size, &overlapped); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_HANDLE_EOF, "got error %u\n", GetLastError()); - ok(!size, "got size %u\n", size); - todo_wine ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "got status %#x\n", (NTSTATUS)overlapped.Internal); + ok(GetLastError() == ERROR_HANDLE_EOF, "got error %lu\n", GetLastError()); + ok(!size, "got size %lu\n", size); + todo_wine ok((NTSTATUS)overlapped.Internal == STATUS_PENDING, "got status %#lx\n", (NTSTATUS)overlapped.Internal); ok(!overlapped.InternalHigh, "got size %Iu\n", overlapped.InternalHigh);
SetFilePointer(file, 2, NULL, SEEK_SET);
ret = SetEndOfFile(file); - ok(ret, "failed to set EOF, error %u\n", GetLastError()); + ok(ret, "failed to set EOF, error %lu\n", GetLastError());
ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 2, "got size %I64d\n", file_size.QuadPart);
ret = WriteFile(file, "data", 4, &size, NULL); - ok(ret, "failed to write, error %u\n", GetLastError()); - ok(size == 4, "got size %u\n", size); + ok(ret, "failed to write, error %lu\n", GetLastError()); + ok(size == 4, "got size %lu\n", size);
ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 4, NULL, SEEK_SET); ret = SetEndOfFile(file); - ok(ret, "failed to set EOF, error %u\n", GetLastError()); + ok(ret, "failed to set EOF, error %lu\n", GetLastError());
ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 4, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 0, NULL, SEEK_SET); ret = ReadFile(file, buffer, sizeof(buffer), &size, NULL); - ok(ret, "failed to read, error %u\n", GetLastError()); - ok(size == 4, "got size %u\n", size); + ok(ret, "failed to read, error %lu\n", GetLastError()); + ok(size == 4, "got size %lu\n", size); ok(!memcmp(buffer, "\0\0da", 4), "wrong data\n");
SetFilePointer(file, 6, NULL, SEEK_SET); ret = SetEndOfFile(file); - ok(ret, "failed to set EOF, error %u\n", GetLastError()); + ok(ret, "failed to set EOF, error %lu\n", GetLastError());
ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 0, NULL, SEEK_SET); ret = ReadFile(file, buffer, sizeof(buffer), &size, NULL); - ok(ret, "failed to read, error %u\n", GetLastError()); - ok(size == 6, "got size %u\n", size); + ok(ret, "failed to read, error %lu\n", GetLastError()); + ok(size == 6, "got size %lu\n", size); ok(!memcmp(buffer, "\0\0da\0\0", 6), "wrong data\n");
ret = SetEndOfFile(file); - ok(ret, "failed to set EOF, error %u\n", GetLastError()); + ok(ret, "failed to set EOF, error %lu\n", GetLastError());
SetFilePointer(file, 2, NULL, SEEK_SET); ret = WriteFile(file, "data", 4, &size, NULL); - ok(ret, "failed to write, error %u\n", GetLastError()); - ok(size == 4, "got size %u\n", size); + ok(ret, "failed to write, error %lu\n", GetLastError()); + ok(size == 4, "got size %lu\n", size);
ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 0, NULL, SEEK_SET); ret = ReadFile(file, buffer, sizeof(buffer), &size, NULL); - ok(ret, "failed to read, error %u\n", GetLastError()); - ok(size == 6, "got size %u\n", size); + ok(ret, "failed to read, error %lu\n", GetLastError()); + ok(size == 6, "got size %lu\n", size); ok(!memcmp(buffer, "\0\0data", 6), "wrong data\n");
for (i = 0; i < ARRAY_SIZE(map_tests); ++i) { mapping = CreateFileMappingA(file, NULL, map_tests[i].protection, 0, 4, NULL); - ok(!!mapping, "failed to create mapping, error %u\n", GetLastError()); + ok(!!mapping, "failed to create mapping, error %lu\n", GetLastError());
ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 6, NULL, SEEK_SET); ret = SetEndOfFile(file); - ok(ret, "failed to set EOF, error %u\n", GetLastError()); + ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 8, NULL, SEEK_SET); ret = SetEndOfFile(file); - ok(ret, "failed to set EOF, error %u\n", GetLastError()); + ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 8, "got size %I64d\n", file_size.QuadPart);
SetLastError(0xdeadbeef); SetFilePointer(file, 6, NULL, SEEK_SET); ret = SetEndOfFile(file); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_USER_MAPPED_FILE, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_USER_MAPPED_FILE, "got error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 8, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 8192, NULL, SEEK_SET); ret = SetEndOfFile(file); - ok(ret, "failed to set EOF, error %u\n", GetLastError()); + ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 8192, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 8191, NULL, SEEK_SET); ret = SetEndOfFile(file); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_USER_MAPPED_FILE, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_USER_MAPPED_FILE, "got error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 8192, "got size %I64d\n", file_size.QuadPart);
view = MapViewOfFile(mapping, map_tests[i].view_access, 0, 0, 4); - ok(!!view, "failed to map view, error %u\n", GetLastError()); + ok(!!view, "failed to map view, error %lu\n", GetLastError());
CloseHandle(mapping);
SetFilePointer(file, 16384, NULL, SEEK_SET); ret = SetEndOfFile(file); - ok(ret, "failed to set EOF, error %u\n", GetLastError()); + ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 16384, "got size %I64d\n", file_size.QuadPart);
SetFilePointer(file, 16383, NULL, SEEK_SET); ret = SetEndOfFile(file); ok(!ret, "expected failure\n"); - ok(GetLastError() == ERROR_USER_MAPPED_FILE, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_USER_MAPPED_FILE, "got error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 16384, "got size %I64d\n", file_size.QuadPart);
ret = UnmapViewOfFile(view); - ok(ret, "failed to unmap view, error %u\n", GetLastError()); + ok(ret, "failed to unmap view, error %lu\n", GetLastError());
SetFilePointer(file, 6, NULL, SEEK_SET); ret = SetEndOfFile(file); - ok(ret, "failed to set EOF, error %u\n", GetLastError()); + ok(ret, "failed to set EOF, error %lu\n", GetLastError()); ret = GetFileSizeEx(file, &file_size); - ok(ret, "failed to get size, error %u\n", GetLastError()); + ok(ret, "failed to get size, error %lu\n", GetLastError()); ok(file_size.QuadPart == 6, "got size %I64d\n", file_size.QuadPart); }
CloseHandle(file); ret = DeleteFileA(filename); - ok(ret, "failed to delete %s, error %u\n", debugstr_a(filename), GetLastError()); + ok(ret, "failed to delete %s, error %lu\n", debugstr_a(filename), GetLastError()); }
START_TEST(file) @@ -6138,11 +6139,11 @@ START_TEST(file) InitFunctionPointers();
ret = GetTempPathA(MAX_PATH, temp_path); - ok(ret != 0, "GetTempPath error %u\n", GetLastError()); + ok(ret != 0, "GetTempPath error %lu\n", GetLastError()); ret = GetTempFileNameA(temp_path, "tmp", 0, filename); - ok(ret != 0, "GetTempFileName error %u\n", GetLastError()); + ok(ret != 0, "GetTempFileName error %lu\n", GetLastError()); ret = DeleteFileA(filename); - ok(ret != 0, "DeleteFile error %u\n", GetLastError()); + ok(ret != 0, "DeleteFile error %lu\n", GetLastError());
test__hread( ); test__hwrite( );
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/kernel32/tests/format_msg.c | 547 +++++++++++++++++++------------------- 1 file changed, 274 insertions(+), 273 deletions(-)
diff --git a/dlls/kernel32/tests/format_msg.c b/dlls/kernel32/tests/format_msg.c index 0e09ba904d0..677ca35a15d 100644 --- a/dlls/kernel32/tests/format_msg.c +++ b/dlls/kernel32/tests/format_msg.c @@ -16,6 +16,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>
@@ -60,7 +61,7 @@ static void test_message_from_string_wide(void) /* the basics */ r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, L"test", 0, 0, out, ARRAY_SIZE(out), NULL); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4, "failed: r=%d\n", r); + ok(r==4, "failed: r=%ld\n", r);
/* null string, crashes on Windows */ if (0) @@ -76,8 +77,8 @@ static void test_message_from_string_wide(void) r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, L"", 0, 0, out, ARRAY_SIZE(out), NULL); error = GetLastError(); ok(!lstrcmpW(L"", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==0, "succeeded: r=%d\n", r); - ok(error == ERROR_NO_WORK_DONE || broken(error == 0xdeadbeef), "last error %u\n", error); + ok(r==0, "succeeded: r=%ld\n", r); + ok(error == ERROR_NO_WORK_DONE || broken(error == 0xdeadbeef), "last error %lu\n", error);
/* format placeholder with no specifier */ SetLastError(0xdeadbeef); @@ -86,8 +87,8 @@ static void test_message_from_string_wide(void) error = GetLastError(); ok(!lstrcmpW( out, L"xxxxxx" ), "Expected the buffer to be unchanged\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(error==ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(r==0, "succeeded: r=%ld\n", r); + ok(error==ERROR_INVALID_PARAMETER, "last error %lu\n", error);
/* test string with format placeholder with no specifier */ SetLastError(0xdeadbeef); @@ -96,8 +97,8 @@ static void test_message_from_string_wide(void) error = GetLastError(); ok(!lstrcmpW(out, L"testxx") || broken(!lstrcmpW( out, L"xxxxxx" )), /* winxp */ "Expected the buffer to be unchanged\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(error==ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(r==0, "succeeded: r=%ld\n", r); + ok(error==ERROR_INVALID_PARAMETER, "last error %lu\n", error);
/* insertion with no variadic arguments */ SetLastError(0xdeadbeef); @@ -106,8 +107,8 @@ static void test_message_from_string_wide(void) error = GetLastError(); ok(!lstrcmpW( out, L"xxxxxx" ), "Expected the buffer to be unchanged\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(error==ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(r==0, "succeeded: r=%ld\n", r); + ok(error==ERROR_INVALID_PARAMETER, "last error %lu\n", error);
SetLastError(0xdeadbeef); lstrcpyW( out, L"xxxxxx" ); @@ -116,194 +117,194 @@ static void test_message_from_string_wide(void) error = GetLastError(); ok(!lstrcmpW( out, L"xxxxxx" ), "Expected the buffer to be unchanged\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(error==ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(r==0, "succeeded: r=%ld\n", r); + ok(error==ERROR_INVALID_PARAMETER, "last error %lu\n", error);
/* using the format feature */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!s!", 0, 0, out, ARRAY_SIZE(out), L"test"); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* no format */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1", 0, 0, out, ARRAY_SIZE(out), L"test"); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* two pieces */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1%2", 0, 0, out, ARRAY_SIZE(out), L"te", L"st"); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* three pieces */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1%3%2%1", 0, 0, out, ARRAY_SIZE(out), L"t", L"s", L"e"); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* ls is unicode */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!ls!", 0, 0, out, ARRAY_SIZE(out), L"test"); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4, "failed: r=%d\n", r); + ok(r==4, "failed: r=%ld\n", r);
/* S is ansi */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!S!", 0, 0, out, ARRAY_SIZE(out), "test"); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4, "failed: r=%d\n", r); + ok(r==4, "failed: r=%ld\n", r);
/* ws is unicode */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!ws!", 0, 0, out, ARRAY_SIZE(out), L"test"); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4, "failed: r=%d\n", r); + ok(r==4, "failed: r=%ld\n", r);
/* as characters */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!c!%2!c!%3!c!%1!c!", 0, 0, out, ARRAY_SIZE(out), 't', 'e', 's'); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* lc is unicode */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!lc!%2!lc!%3!lc!%1!lc!", 0, 0, out, ARRAY_SIZE(out), 't', 'e', 's'); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* wc is unicode */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!wc!%2!wc!%3!wc!%1!wc!", 0, 0, out, ARRAY_SIZE(out), 't', 'e', 's'); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* C is unicode */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!C!%2!C!%3!C!%1!C!", 0, 0, out, ARRAY_SIZE(out), 't', 'e', 's'); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* some numbers */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!d!%2!d!%3!d!", 0, 0, out, ARRAY_SIZE(out), 1, 2, 3); ok(!lstrcmpW(L"123", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==3,"failed: r=%d\n", r); + ok(r==3,"failed: r=%ld\n", r);
/* a single digit with some spacing */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!4d!", 0, 0, out, ARRAY_SIZE(out), 1); ok(!lstrcmpW(L" 1", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* a single digit, left justified */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!-4d!", 0, 0, out, ARRAY_SIZE(out), 1); ok(!lstrcmpW(L"1 ", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* two digit decimal number */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!4d!", 0, 0, out, ARRAY_SIZE(out), 11); ok(!lstrcmpW(L" 11", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* a hex number */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!4x!", 0, 0, out, ARRAY_SIZE(out), 11); ok(!lstrcmpW(L" b", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* a hex number, upper case */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!4X!", 0, 0, out, ARRAY_SIZE(out), 11); ok(!lstrcmpW(L" B", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* a hex number, upper case, left justified */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!-4X!", 0, 0, out, ARRAY_SIZE(out), 11); ok(!lstrcmpW(L"B ", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* a long hex number, upper case */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!4X!", 0, 0, out, ARRAY_SIZE(out), 0x1ab); ok(!lstrcmpW(L" 1AB", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* two percent... */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L" %%%% ", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L" %% ", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* periods are special cases */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L" %.%. %1!d!", 0, 0, out, ARRAY_SIZE(out), 0x1ab); ok(!lstrcmpW(L" .. 427", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==8,"failed: r=%d\n", r); + ok(r==8,"failed: r=%ld\n", r);
/* %0 ends the line */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"test%0test", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L"test", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* %! prints an exclamation */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"yah%!%0 ", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L"yah!", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* %space */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"% % ", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L" ", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* %n yields \r\n, %r yields \r, %t yields \t */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%n%r%t", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L"\r\n\r\t", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* line feed */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"hi\n", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L"hi\r\n", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* carriage return line feed */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"hi\r\n", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L"hi\r\n", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* carriage return */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"\r", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L"\r\n", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==2,"failed: r=%d\n", r); + ok(r==2,"failed: r=%ld\n", r);
/* double carriage return line feed */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"\r\r\n", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L"\r\n\r\n", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n", r); + ok(r==4,"failed: r=%ld\n", r);
/* null string as argument */ r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1", 0, 0, out, ARRAY_SIZE(out), NULL); ok(!lstrcmpW(L"(null)", out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==6,"failed: r=%d\n",r); + ok(r==6,"failed: r=%ld\n",r);
/* precision and width */
r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!3s!", 0, 0, out, ARRAY_SIZE(out), L"t" ); ok(!lstrcmpW(L" t", out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==3, "failed: r=%d\n",r); + ok(r==3, "failed: r=%ld\n",r); r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!*s!", 0, 0, out, ARRAY_SIZE(out), 4, L"t" ); ok(!lstrcmpW( L" t", out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r); r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!4.2u!", 0, 0, out, ARRAY_SIZE(out), 3 ); ok(!lstrcmpW( L" 03", out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r); r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!*.*u!", 0, 0, out, ARRAY_SIZE(out), 5, 3, 1 ); ok(!lstrcmpW( L" 001", out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==5,"failed: r=%d\n",r); + ok(r==5,"failed: r=%ld\n",r); r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!*.*u!,%1!*.*u!", 0, 0, out, ARRAY_SIZE(out), 5, 3, 1, 4, 2 ); ok(!lstrcmpW( L" 001, 0002", out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==11,"failed: r=%d\n",r); + ok(r==11,"failed: r=%ld\n",r); r = doitW(FORMAT_MESSAGE_FROM_STRING, L"%1!*.*u!,%3!*.*u!", 0, 0, out, ARRAY_SIZE(out), 5, 3, 1, 6, 4, 2 ); ok(!lstrcmpW( L" 001, 0002", out) || broken(!lstrcmpW(L" 001,000004", out)), /* NT4/Win2k */ "failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==12,"failed: r=%d\n",r); + ok(r==12,"failed: r=%ld\n",r); /* args are not counted the same way with an argument array */ { ULONG_PTR args[] = { 6, 4, 2, 5, 3, 1 }; r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, L"%1!*.*u!,%1!*.*u!", 0, 0, out, ARRAY_SIZE(out), (va_list *)args ); ok(!lstrcmpW(L" 0002, 00003", out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==13,"failed: r=%d\n",r); + ok(r==13,"failed: r=%ld\n",r); r = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, L"%1!*.*u!,%4!*.*u!", 0, 0, out, ARRAY_SIZE(out), (va_list *)args ); ok(!lstrcmpW(L" 0002, 001", out),"failed out=[%s]\n", wine_dbgstr_w(out)); - ok(r==12,"failed: r=%d\n",r); + ok(r==12,"failed: r=%ld\n",r); }
/* change of pace... test the low byte of dwflags */ @@ -312,25 +313,25 @@ static void test_message_from_string_wide(void) r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, L"hi\n", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L"hi ", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==3,"failed: r=%d\n", r); + ok(r==3,"failed: r=%ld\n", r);
/* carriage return line feed */ r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, L"hi\r\n", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L"hi ", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==3,"failed: r=%d\n", r); + ok(r==3,"failed: r=%ld\n", r);
/* carriage return */ r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, L"\r", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L" ", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==1,"failed: r=%d\n", r); + ok(r==1,"failed: r=%ld\n", r);
/* double carriage return line feed */ r = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, L"\r\r\n", 0, 0, out, ARRAY_SIZE(out)); ok(!lstrcmpW(L" ", out), "failed out=%s\n", wine_dbgstr_w(out)); - ok(r==2,"failed: r=%d\n", r); + ok(r==2,"failed: r=%ld\n", r); }
static void test_message_from_string(void) @@ -342,7 +343,7 @@ static void test_message_from_string(void) /* the basics */ r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, ARRAY_SIZE(out),NULL); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* null string, crashes on Windows */ if (0) @@ -357,9 +358,9 @@ static void test_message_from_string(void) memcpy(out, init_buf, sizeof(init_buf)); r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "", 0, 0, out, ARRAY_SIZE(out), NULL); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); + ok(r==0, "succeeded: r=%ld\n", r); ok(GetLastError() == ERROR_NO_WORK_DONE || broken(GetLastError() == 0xdeadbeef), - "last error %u\n", GetLastError()); + "last error %lu\n", GetLastError());
/* format placeholder with no specifier */ SetLastError(0xdeadbeef); @@ -367,9 +368,9 @@ static void test_message_from_string(void) r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "%", 0, 0, out, ARRAY_SIZE(out), NULL); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); + ok(r==0, "succeeded: r=%ld\n", r); ok(GetLastError()==ERROR_INVALID_PARAMETER, - "last error %u\n", GetLastError()); + "last error %lu\n", GetLastError());
/* test string with format placeholder with no specifier */ SetLastError(0xdeadbeef); @@ -377,210 +378,210 @@ static void test_message_from_string(void) r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test%", 0, 0, out, ARRAY_SIZE(out), NULL); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); + ok(r==0, "succeeded: r=%ld\n", r); ok(GetLastError()==ERROR_INVALID_PARAMETER, - "last error %u\n", GetLastError()); + "last error %lu\n", GetLastError());
/* insertion with no variadic arguments */ SetLastError(0xdeadbeef); memcpy(out, init_buf, sizeof(init_buf)); r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "%1", 0, 0, out, ARRAY_SIZE(out), NULL); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(GetLastError()==ERROR_INVALID_PARAMETER, "last error %u\n", GetLastError()); + ok(r==0, "succeeded: r=%ld\n", r); + ok(GetLastError()==ERROR_INVALID_PARAMETER, "last error %lu\n", GetLastError());
SetLastError(0xdeadbeef); memcpy(out, init_buf, sizeof(init_buf)); r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, "%1", 0, 0, out, ARRAY_SIZE(out), NULL); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the buffer to be untouched\n"); - ok(r==0, "succeeded: r=%d\n", r); - ok(GetLastError()==ERROR_INVALID_PARAMETER, "last error %u\n", GetLastError()); + ok(r==0, "succeeded: r=%ld\n", r); + ok(GetLastError()==ERROR_INVALID_PARAMETER, "last error %lu\n", GetLastError());
/* using the format feature */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!s!", 0, 0, out, ARRAY_SIZE(out), "test"); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* no format */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1", 0, 0, out, ARRAY_SIZE(out), "test"); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* two pieces */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1%2", 0, 0, out, ARRAY_SIZE(out), "te","st"); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* three pieces */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1%3%2%1", 0, 0, out, ARRAY_SIZE(out), "t","s","e"); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* s is ansi */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!s!", 0, 0, out, ARRAY_SIZE(out), "test"); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* ls is unicode */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!ls!", 0, 0, out, ARRAY_SIZE(out), L"test"); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* S is unicode */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!S!", 0, 0, out, ARRAY_SIZE(out), L"test"); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* ws is unicode */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!ws!", 0, 0, out, ARRAY_SIZE(out), L"test"); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* as characters */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!c!%2!c!%3!c!%1!c!", 0, 0, out, ARRAY_SIZE(out), 't','e','s'); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* lc is unicode */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!lc!%2!lc!%3!lc!%1!lc!", 0, 0, out, ARRAY_SIZE(out), 't','e','s'); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* wc is unicode */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!wc!%2!wc!%3!wc!%1!wc!", 0, 0, out, ARRAY_SIZE(out), 't','e','s'); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* C is unicode */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!C!%2!C!%3!C!%1!C!", 0, 0, out, ARRAY_SIZE(out), 't','e','s'); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* some numbers */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!d!%2!d!%3!d!", 0, 0, out, ARRAY_SIZE(out), 1,2,3); ok(!strcmp("123", out),"failed out=[%s]\n",out); - ok(r==3,"failed: r=%d\n",r); + ok(r==3,"failed: r=%ld\n",r);
/* a single digit with some spacing */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4d!", 0, 0, out, ARRAY_SIZE(out), 1); ok(!strcmp(" 1", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* a single digit, left justified */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!-4d!", 0, 0, out, ARRAY_SIZE(out), 1); ok(!strcmp("1 ", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* two digit decimal number */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4d!", 0, 0, out, ARRAY_SIZE(out), 11); ok(!strcmp(" 11", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* a hex number */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4x!", 0, 0, out, ARRAY_SIZE(out), 11); ok(!strcmp(" b", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* a hex number, upper case */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4X!", 0, 0, out, ARRAY_SIZE(out), 11); ok(!strcmp(" B", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* a hex number, upper case, left justified */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!-4X!", 0, 0, out, ARRAY_SIZE(out), 11); ok(!strcmp("B ", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* a long hex number, upper case */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4X!", 0, 0, out, ARRAY_SIZE(out), 0x1ab); ok(!strcmp(" 1AB", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* two percent... */ r = doit(FORMAT_MESSAGE_FROM_STRING, " %%%% ", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp(" %% ", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* periods are special cases */ r = doit(FORMAT_MESSAGE_FROM_STRING, " %.%. %1!d!", 0, 0, out, ARRAY_SIZE(out), 0x1ab); ok(!strcmp(" .. 427", out),"failed out=[%s]\n",out); - ok(r==7,"failed: r=%d\n",r); + ok(r==7,"failed: r=%ld\n",r);
/* %0 ends the line */ r = doit(FORMAT_MESSAGE_FROM_STRING, "test%0test", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp("test", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* %! prints an exclamation */ r = doit(FORMAT_MESSAGE_FROM_STRING, "yah%!%0 ", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp("yah!", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* %space */ r = doit(FORMAT_MESSAGE_FROM_STRING, "% % ", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp(" ", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* %n yields \r\n, %r yields \r, %t yields \t */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%n%r%t", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp("\r\n\r\t", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* line feed */ r = doit(FORMAT_MESSAGE_FROM_STRING, "hi\n", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp("hi\r\n", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* carriage return line feed */ r = doit(FORMAT_MESSAGE_FROM_STRING, "hi\r\n", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp("hi\r\n", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* carriage return */ r = doit(FORMAT_MESSAGE_FROM_STRING, "\r", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp("\r\n", out),"failed out=[%s]\n",out); - ok(r==2,"failed: r=%d\n",r); + ok(r==2,"failed: r=%ld\n",r);
/* double carriage return line feed */ r = doit(FORMAT_MESSAGE_FROM_STRING, "\r\r\n", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp("\r\n\r\n", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r);
/* null string as argument */ r = doit(FORMAT_MESSAGE_FROM_STRING, "%1", 0, 0, out, ARRAY_SIZE(out), NULL); ok(!strcmp("(null)", out),"failed out=[%s]\n",out); - ok(r==6,"failed: r=%d\n",r); + ok(r==6,"failed: r=%ld\n",r);
/* precision and width */
r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!3s!", 0, 0, out, sizeof(out), "t" ); ok(!strcmp(" t", out),"failed out=[%s]\n",out); - ok(r==3, "failed: r=%d\n",r); + ok(r==3, "failed: r=%ld\n",r); r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!*s!", 0, 0, out, sizeof(out), 4, "t"); if (!strcmp("*s",out)) win_skip( "width/precision not supported\n" ); else { ok(!strcmp( " t", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r); r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!4.2u!", 0, 0, out, sizeof(out), 3 ); ok(!strcmp( " 03", out),"failed out=[%s]\n",out); - ok(r==4,"failed: r=%d\n",r); + ok(r==4,"failed: r=%ld\n",r); r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!*.*u!", 0, 0, out, sizeof(out), 5, 3, 1 ); ok(!strcmp( " 001", out),"failed out=[%s]\n",out); - ok(r==5,"failed: r=%d\n",r); + ok(r==5,"failed: r=%ld\n",r); r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!*.*u!,%1!*.*u!", 0, 0, out, sizeof(out), 5, 3, 1, 4, 2 ); ok(!strcmp( " 001, 0002", out),"failed out=[%s]\n",out); - ok(r==11,"failed: r=%d\n",r); + ok(r==11,"failed: r=%ld\n",r); r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!*.*u!,%3!*.*u!", 0, 0, out, sizeof(out), 5, 3, 1, 6, 4, 2 ); /* older Win versions marked as broken even though this is arguably the correct behavior */ @@ -588,18 +589,18 @@ static void test_message_from_string(void) ok(!strcmp( " 001, 0002", out) || broken(!strcmp(" 001,000004", out)), /* NT4/Win2k */ "failed out=[%s]\n",out); - ok(r==12,"failed: r=%d\n",r); + ok(r==12,"failed: r=%ld\n",r); /* args are not counted the same way with an argument array */ { ULONG_PTR args[] = { 6, 4, 2, 5, 3, 1 }; r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, "%1!*.*u!,%1!*.*u!", 0, 0, out, sizeof(out), (va_list *)args ); ok(!strcmp(" 0002, 00003", out),"failed out=[%s]\n",out); - ok(r==13,"failed: r=%d\n",r); + ok(r==13,"failed: r=%ld\n",r); r = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY, "%1!*.*u!,%4!*.*u!", 0, 0, out, sizeof(out), (va_list *)args ); ok(!strcmp(" 0002, 001", out),"failed out=[%s]\n",out); - ok(r==12,"failed: r=%d\n",r); + ok(r==12,"failed: r=%ld\n",r); } }
@@ -609,25 +610,25 @@ static void test_message_from_string(void) r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\n", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp("hi ", out), "failed out=[%s]\n",out); - ok(r==3, "failed: r=%d\n",r); + ok(r==3, "failed: r=%ld\n",r);
/* carriage return line feed */ r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\r\n", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp("hi ", out),"failed out=[%s]\n",out); - ok(r==3,"failed: r=%d\n",r); + ok(r==3,"failed: r=%ld\n",r);
/* carriage return */ r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp(" ", out),"failed out=[%s]\n",out); - ok(r==1,"failed: r=%d\n",r); + ok(r==1,"failed: r=%ld\n",r);
/* double carriage return line feed */ r = doit(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r\r\n", 0, 0, out, ARRAY_SIZE(out)); ok(!strcmp(" ", out),"failed out=[%s]\n",out); - ok(r==2,"failed: r=%d\n",r); + ok(r==2,"failed: r=%ld\n",r); }
static void test_message_ignore_inserts(void) @@ -639,18 +640,18 @@ static void test_message_ignore_inserts(void)
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %ld\n", ret); ok(!strcmp("test", out), "Expected output string "test", got %s\n", out);
/* The %0 escape sequence is handled. */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test%0", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %ld\n", ret); ok(!strcmp("test", out), "Expected output string "test", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test%0test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %ld\n", ret); ok(!strcmp("test", out), "Expected output string "test", got %s\n", out);
/* While FormatMessageA returns 0 in this case, no last error code is set. */ @@ -658,68 +659,68 @@ static void test_message_ignore_inserts(void) memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "%0test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %d\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %ld\n", ret); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the output buffer to be untouched\n"); ok(GetLastError() == ERROR_NO_WORK_DONE || broken(GetLastError() == 0xdeadbeef), - "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %lu\n", GetLastError());
/* Insert sequences are ignored. */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "test%1%2!*.*s!%99", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 17, "Expected FormatMessageA to return 17, got %d\n", ret); + ok(ret == 17, "Expected FormatMessageA to return 17, got %ld\n", ret); ok(!strcmp("test%1%2!*.*s!%99", out), "Expected output string "test%%1%%2!*.*s!%%99", got %s\n", out);
/* Only the "%n", "%r", and "%t" escape sequences are processed. */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "%%% %.%!", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 8, "Expected FormatMessageA to return 8, got %d\n", ret); + ok(ret == 8, "Expected FormatMessageA to return 8, got %ld\n", ret); ok(!strcmp("%%% %.%!", out), "Expected output string "%%%%%% %%.%%!", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "%n%r%t", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %ld\n", ret); ok(!strcmp("\r\n\r\t", out), "Expected output string "\r\n\r\t", got %s\n", out);
/* CRLF characters are processed normally. */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "hi\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %ld\n", ret); ok(!strcmp("hi\r\n", out), "Expected output string "hi\r\n", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "hi\r\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %ld\n", ret); ok(!strcmp("hi\r\n", out), "Expected output string "hi\r\n", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "\r", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 2, "Expected FormatMessageA to return 2, got %d\n", ret); + ok(ret == 2, "Expected FormatMessageA to return 2, got %ld\n", ret); ok(!strcmp("\r\n", out), "Expected output string "\r\n", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, "\r\r\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %ld\n", ret); ok(!strcmp("\r\n\r\n", out), "Expected output string "\r\n\r\n", got %s\n", out);
/* The width parameter is handled the same also. */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\n", 0, 0, out, ARRAY_SIZE(out), NULL); ok(!strcmp("hi ", out), "Expected output string "hi ", got %s\n", out); - ok(ret == 3, "Expected FormatMessageA to return 3, got %d\n", ret); + ok(ret == 3, "Expected FormatMessageA to return 3, got %ld\n", ret);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, "hi\r\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 3, "Expected FormatMessageA to return 3, got %d\n", ret); + ok(ret == 3, "Expected FormatMessageA to return 3, got %ld\n", ret); ok(!strcmp("hi ", out), "Expected output string "hi ", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 1, "Expected FormatMessageA to return 1, got %d\n", ret); + ok(ret == 1, "Expected FormatMessageA to return 1, got %ld\n", ret); ok(!strcmp(" ", out), "Expected output string " ", got %s\n", out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, "\r\r\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 2, "Expected FormatMessageA to return 2, got %d\n", ret); + ok(ret == 2, "Expected FormatMessageA to return 2, got %ld\n", ret); ok(!strcmp(" ", out), "Expected output string " ", got %s\n", out); }
@@ -730,89 +731,89 @@ static void test_message_ignore_inserts_wide(void)
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %ld\n", ret); ok(!lstrcmpW(L"test", out), "Expected output string "test", got %s\n", wine_dbgstr_w(out));
/* The %0 escape sequence is handled. */ ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"test%0", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %ld\n", ret); ok(!lstrcmpW(L"test", out), "Expected output string "test", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"test%0test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %ld\n", ret); ok(!lstrcmpW(L"test", out), "Expected output string "test", got %s\n", wine_dbgstr_w(out));
/* While FormatMessageA returns 0 in this case, no last error code is set. */ SetLastError(0xdeadbeef); ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"%0test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %d\n", ret); + ok(ret == 0, "Expected FormatMessageW to return 0, got %ld\n", ret); ok(!lstrcmpW(L"", out), "Expected the output buffer to be the empty string, got %s\n", wine_dbgstr_w(out)); ok(GetLastError() == ERROR_NO_WORK_DONE || broken(GetLastError() == 0xdeadbeef), - "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %lu\n", GetLastError());
/* Insert sequences are ignored. */ ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"test%1%2!*.*s!%99", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 17, "Expected FormatMessageW to return 17, got %d\n", ret); + ok(ret == 17, "Expected FormatMessageW to return 17, got %ld\n", ret); ok(!lstrcmpW(L"test%1%2!*.*s!%99", out), "Expected output string "test%%1%%2!*.*s!%%99", got %s\n", wine_dbgstr_w(out));
/* Only the "%n", "%r", and "%t" escape sequences are processed. */ ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"%%% %.%!", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 8, "Expected FormatMessageW to return 8, got %d\n", ret); + ok(ret == 8, "Expected FormatMessageW to return 8, got %ld\n", ret); ok(!lstrcmpW(L"%%% %.%!", out), "Expected output string "%%%%%% %%.%%!", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"%n%r%t", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %ld\n", ret); ok(!lstrcmpW(L"\r\n\r\t", out), "Expected output string "\r\n\r\t", got %s\n", wine_dbgstr_w(out));
/* CRLF characters are processed normally. */ ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"hi\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %ld\n", ret); ok(!lstrcmpW(L"hi\r\n", out), "Expected output string "hi\r\n", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"hi\r\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %ld\n", ret); ok(!lstrcmpW(L"hi\r\n", out), "Expected output string "hi\r\n", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"\r", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 2, "Expected FormatMessageW to return 2, got %d\n", ret); + ok(ret == 2, "Expected FormatMessageW to return 2, got %ld\n", ret); ok(!lstrcmpW(L"\r\n", out), "Expected output string "\r\n", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS, L"\r\r\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %d\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %ld\n", ret); ok(!lstrcmpW(L"\r\n\r\n", out), "Expected output string "\r\n\r\n", got %s\n", wine_dbgstr_w(out));
/* The width parameter is handled the same also. */ ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, L"hi\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 3, "Expected FormatMessageW to return 3, got %d\n", ret); + ok(ret == 3, "Expected FormatMessageW to return 3, got %ld\n", ret); ok(!lstrcmpW(L"hi ", out), "Expected output string "hi ", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, L"hi\r\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 3, "Expected FormatMessageW to return 3, got %d\n", ret); + ok(ret == 3, "Expected FormatMessageW to return 3, got %ld\n", ret); ok(!lstrcmpW(L"hi ", out), "Expected output string "hi ", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, L"\r", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 1, "Expected FormatMessageW to return 1, got %d\n", ret); + ok(ret == 1, "Expected FormatMessageW to return 1, got %ld\n", ret); ok(!lstrcmpW(L" ", out), "Expected output string " ", got %s\n", wine_dbgstr_w(out));
ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, L"\r\r\n", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 2, "Expected FormatMessageW to return 2, got %d\n", ret); + ok(ret == 2, "Expected FormatMessageW to return 2, got %ld\n", ret); ok(!lstrcmpW(L" ", out), "Expected output string " ", got %s\n", wine_dbgstr_w(out)); }
@@ -825,134 +826,134 @@ static void test_message_wrap(void) /* No need for wrapping */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 20, "short long line", 0, 0, out, sizeof(out), NULL); - ok(ret == 15, "Expected FormatMessageW to return 15, got %d\n", ret); + ok(ret == 15, "Expected FormatMessageW to return 15, got %ld\n", ret); ok(!strcmp("short long line", out),"failed out=[%s]\n",out);
/* Wrap the last word */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "short long line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short long\r\nline", out),"failed out=[%s]\n",out);
/* Wrap the very last word */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 20, "short long long line", 0, 0, out, sizeof(out), NULL); - ok(ret == 21, "Expected FormatMessageW to return 21, got %d\n", ret); + ok(ret == 21, "Expected FormatMessageW to return 21, got %ld\n", ret); ok(!strcmp("short long long\r\nline", out),"failed out=[%s]\n",out);
/* Strictly less than 10 characters per line! */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 10, "short long line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\r\nlong line", out),"failed out=[%s]\n",out);
/* Handling of duplicate spaces */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 16, "short long line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short long\r\nline", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 16, "short long wordlongerthanaline", 0, 0, out, sizeof(out), NULL); - ok(ret == 33, "Expected FormatMessageW to return 33, got %d\n", ret); + ok(ret == 33, "Expected FormatMessageW to return 33, got %ld\n", ret); ok(!strcmp("short long\r\nwordlongerthanal\r\nine", out),"failed out=[%s]\n",out);
/* Breaking in the middle of spaces */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 12, "short long line", 0, 0, out, sizeof(out), NULL); - ok(ret == 18, "Expected FormatMessageW to return 18, got %d\n", ret); + ok(ret == 18, "Expected FormatMessageW to return 18, got %ld\n", ret); ok(!strcmp("short long\r\n line", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 12, "short long wordlongerthanaline", 0, 0, out, sizeof(out), NULL); - ok(ret == 35, "Expected FormatMessageW to return 35, got %d\n", ret); + ok(ret == 35, "Expected FormatMessageW to return 35, got %ld\n", ret); ok(!strcmp("short long\r\n\r\nwordlongerth\r\nanaline", out),"failed out=[%s]\n",out);
/* Handling of start-of-string spaces */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 15, " short line", 0, 0, out, sizeof(out), NULL); - ok(ret == 13, "Expected FormatMessageW to return 13, got %d\n", ret); + ok(ret == 13, "Expected FormatMessageW to return 13, got %ld\n", ret); ok(!strcmp(" short line", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, " shortlong line", 0, 0, out, sizeof(out), NULL); - ok(ret == 17, "Expected FormatMessageW to return 17, got %d\n", ret); + ok(ret == 17, "Expected FormatMessageW to return 17, got %ld\n", ret); ok(!strcmp("\r\nshortlong\r\nline", out),"failed out=[%s]\n",out);
/* Handling of start-of-line spaces */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "l1%n shortlong line", 0, 0, out, sizeof(out), NULL); - ok(ret == 21, "Expected FormatMessageW to return 21, got %d\n", ret); + ok(ret == 21, "Expected FormatMessageW to return 21, got %ld\n", ret); ok(!strcmp("l1\r\n\r\nshortlong\r\nline", out),"failed out=[%s]\n",out);
/* Pure space wrapping */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 5, " ", 0, 0, out, sizeof(out), NULL); - ok(ret == 7, "Expected FormatMessageW to return 7, got %d\n", ret); + ok(ret == 7, "Expected FormatMessageW to return 7, got %ld\n", ret); ok(!strcmp("\r\n\r\n\r\n ", out),"failed out=[%s]\n",out);
/* Handling of trailing spaces */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 5, "l1 ", 0, 0, out, sizeof(out), NULL); - ok(ret == 10, "Expected FormatMessageW to return 10, got %d\n", ret); + ok(ret == 10, "Expected FormatMessageW to return 10, got %ld\n", ret); ok(!strcmp("l1\r\n\r\n\r\n ", out),"failed out=[%s]\n",out);
/* Word that just fills the line */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 8, "shortlon", 0, 0, out, sizeof(out), NULL); - ok(ret == 10, "Expected FormatMessageW to return 10, got %d\n", ret); + ok(ret == 10, "Expected FormatMessageW to return 10, got %ld\n", ret); ok(!strcmp("shortlon\r\n", out),"failed out=[%s]\n",out);
/* Word longer than the line */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 8, "shortlongline", 0, 0, out, sizeof(out), NULL); - ok(ret == 15, "Expected FormatMessageW to return 15, got %d\n", ret); + ok(ret == 15, "Expected FormatMessageW to return 15, got %ld\n", ret); ok(!strcmp("shortlon\r\ngline", out),"failed out=[%s]\n",out);
/* Wrap the line multiple times */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 7, "short long line", 0, 0, out, sizeof(out), NULL); - ok(ret == 17, "Expected FormatMessageW to return 17, got %d\n", ret); + ok(ret == 17, "Expected FormatMessageW to return 17, got %ld\n", ret); ok(!strcmp("short\r\nlong\r\nline", out),"failed out=[%s]\n",out);
/* '\n's in the source are ignored */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "short\nlong line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short long\r\nline", out),"failed out=[%s]\n",out);
/* Wrap even before a '%n' */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 8, "shortlon%n", 0, 0, out, sizeof(out), NULL); - ok(ret == 12, "Expected FormatMessageW to return 12, got %d\n", ret); + ok(ret == 12, "Expected FormatMessageW to return 12, got %ld\n", ret); ok(!strcmp("shortlon\r\n\r\n", out),"failed out=[%s]\n",out);
/* '%n's count as starting a new line and combine with line wrapping */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 10, "short%nlong line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\r\nlong line", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 8, "short%nlong line", 0, 0, out, sizeof(out), NULL); - ok(ret == 17, "Expected FormatMessageW to return 17, got %d\n", ret); + ok(ret == 17, "Expected FormatMessageW to return 17, got %ld\n", ret); ok(!strcmp("short\r\nlong\r\nline", out),"failed out=[%s]\n",out);
/* '%r's also count as starting a new line and all */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 10, "short%rlong line", 0, 0, out, sizeof(out), NULL); - ok(ret == 15, "Expected FormatMessageW to return 15, got %d\n", ret); + ok(ret == 15, "Expected FormatMessageW to return 15, got %ld\n", ret); ok(!strcmp("short\rlong line", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 8, "short%rlong line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\rlong\r\nline", out),"failed out=[%s]\n",out);
/* IGNORE_INSERTS does not prevent line wrapping or disable '%n' */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_IGNORE_INSERTS | 8, "short%nlong line%1", 0, 0, out, sizeof(out), NULL); - ok(ret == 19, "Expected FormatMessageW to return 19, got %d\n", ret); + ok(ret == 19, "Expected FormatMessageW to return 19, got %ld\n", ret); ok(!strcmp("short\r\nlong\r\nline%1", out),"failed out=[%s]\n",out);
/* MAX_WIDTH_MASK is the same as specifying an infinite line width */ @@ -965,43 +966,43 @@ static void test_message_wrap(void) } ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_MAX_WIDTH_MASK, in, 0, 0, out, sizeof(out), NULL); - ok(ret == 272, "Expected FormatMessageW to return 272, got %d\n", ret); + ok(ret == 272, "Expected FormatMessageW to return 272, got %ld\n", ret); ok(!strcmp(ref, out),"failed out=[%s]\n",out);
/* Wrapping and non-space characters */ ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "short long\tline", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\r\nlong\tline", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "short long-line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\r\nlong-line", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "short long_line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\r\nlong_line", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "short long.line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\r\nlong.line", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "short long,line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\r\nlong,line", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "short long!line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\r\nlong!line", out),"failed out=[%s]\n",out);
ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | 11, "short long?line", 0, 0, out, sizeof(out), NULL); - ok(ret == 16, "Expected FormatMessageW to return 16, got %d\n", ret); + ok(ret == 16, "Expected FormatMessageW to return 16, got %ld\n", ret); ok(!strcmp("short\r\nlong?line", out),"failed out=[%s]\n",out); }
@@ -1015,9 +1016,9 @@ static void test_message_insufficient_buffer(void) SetLastError(0xdeadbeef); memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, 0, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", + "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); ok(!memcmp(expected_buf, out, sizeof(expected_buf)), "Expected the buffer to be untouched\n"); @@ -1025,9 +1026,9 @@ static void test_message_insufficient_buffer(void) SetLastError(0xdeadbeef); memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, 1, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", + "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); ok(!memcmp(expected_buf, out, sizeof(expected_buf)), "Expected the buffer to be untouched\n"); @@ -1035,9 +1036,9 @@ static void test_message_insufficient_buffer(void) SetLastError(0xdeadbeef); memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING, "test", 0, 0, out, ARRAY_SIZE(out) - 1, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", + "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); ok(!memcmp(expected_buf, out, sizeof(expected_buf)), "Expected the buffer to be untouched\n"); @@ -1053,27 +1054,27 @@ static void test_message_insufficient_buffer(void) ret = FormatMessageA( FORMAT_MESSAGE_FROM_STRING, tmp, 0, 0, buf, size, NULL ); if (size < 32768) { - ok( ret == size - 1, "%u: got %u\n", size, ret ); + ok( ret == size - 1, "%lu: got %lu\n", size, ret ); ok( !strcmp( tmp, buf ), "wrong buffer\n" ); } else { - ok( ret == 0, "%u: got %u\n", size, ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == 0, "%lu: got %lu\n", size, ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); }
SetLastError( 0xdeadbeef ); ret = doit( FORMAT_MESSAGE_FROM_STRING, "%1", 0, 0, buf, size, tmp ); if (size < 32768) { - ok( ret == size - 1, "%u: got %u\n", size, ret ); + ok( ret == size - 1, "%lu: got %lu\n", size, ret ); ok( !strcmp( tmp, buf ), "wrong buffer\n" ); } else { - ok( ret == 0, "%u: got %u\n", size, ret ); + ok( ret == 0, "%lu: got %lu\n", size, ret ); ok( GetLastError() == ERROR_INVALID_PARAMETER || broken(GetLastError() == ERROR_MORE_DATA), /* winxp */ - "wrong error %u\n", GetLastError() ); + "wrong error %lu\n", GetLastError() ); } HeapFree( GetProcessHeap(), 0, buf );
@@ -1082,14 +1083,14 @@ static void test_message_insufficient_buffer(void) tmp, 0, 0, (char *)&buf, size, NULL ); if (size < 32768) { - ok( ret == size - 1, "%u: got %u\n", size, ret ); + ok( ret == size - 1, "%lu: got %lu\n", size, ret ); ok( !strcmp( tmp, buf ), "wrong buffer\n" ); HeapFree( GetProcessHeap(), 0, buf ); } else { - ok( ret == 0, "%u: got %u\n", size, ret ); - ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %u\n", GetLastError() ); + ok( ret == 0, "%lu: got %lu\n", size, ret ); + ok( GetLastError() == ERROR_INVALID_PARAMETER, "wrong error %lu\n", GetLastError() ); } HeapFree( GetProcessHeap(), 0, tmp ); } @@ -1103,9 +1104,9 @@ static void test_message_insufficient_buffer_wide(void) SetLastError(0xdeadbeef); lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, L"test", 0, 0, out, 0, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", + "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); ok(!lstrcmpW( out, L"xxxxxx" ), "Expected the buffer to be untouched\n"); @@ -1113,9 +1114,9 @@ static void test_message_insufficient_buffer_wide(void) SetLastError(0xdeadbeef); lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, L"test", 0, 0, out, 1, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", + "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); ok(!memcmp(out, L"\0xxxxx", 6 * sizeof(WCHAR)) || broken(!lstrcmpW( out, L"xxxxxx" )), /* winxp */ @@ -1124,9 +1125,9 @@ static void test_message_insufficient_buffer_wide(void) SetLastError(0xdeadbeef); lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, L"test", 0, 0, out, 4, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %u\n", + "Expected GetLastError() to return ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError()); ok(!memcmp(out, L"tes\0xx", 6 * sizeof(WCHAR)) || broken(!lstrcmpW( out, L"xxxxxx" )), /* winxp */ @@ -1139,16 +1140,16 @@ static void test_message_insufficient_buffer_wide(void) for (i = 0; i < size; i++) tmp[i] = 'A' + i % 26; tmp[size - 1] = 0; ret = FormatMessageW( FORMAT_MESSAGE_FROM_STRING, tmp, 0, 0, buf, size, NULL ); - ok(ret == size - 1 || broken(!ret), /* winxp */ "got %u\n", ret); + ok(ret == size - 1 || broken(!ret), /* winxp */ "got %lu\n", ret); if (!ret) break; ok( !lstrcmpW( tmp, buf ), "wrong buffer\n" ); ret = doitW( FORMAT_MESSAGE_FROM_STRING, L"%1", 0, 0, buf, size, tmp ); - ok(ret == size - 1, "got %u\n", ret); + ok(ret == size - 1, "got %lu\n", ret); ok( !lstrcmpW( tmp, buf ), "wrong buffer\n" ); HeapFree( GetProcessHeap(), 0, buf ); ret = FormatMessageW( FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, tmp, 0, 0, (WCHAR *)&buf, size, NULL ); - ok(ret == size - 1, "got %u\n", ret); + ok(ret == size - 1, "got %lu\n", ret); ok( !lstrcmpW( tmp, buf ), "wrong buffer\n" ); HeapFree( GetProcessHeap(), 0, tmp ); HeapFree( GetProcessHeap(), 0, buf ); @@ -1163,14 +1164,14 @@ static void test_message_null_buffer(void) SetLastError(0xdeadbeef); ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 0, NULL); error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_INSUFFICIENT_BUFFER, "last error %u\n", error); + ok(!ret, "FormatMessageA returned %lu\n", ret); + ok(error == ERROR_INSUFFICIENT_BUFFER, "last error %lu\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 1, NULL); error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_INSUFFICIENT_BUFFER, "last error %u\n", error); + ok(!ret, "FormatMessageA returned %lu\n", ret); + ok(error == ERROR_INSUFFICIENT_BUFFER, "last error %lu\n", error);
if (0) /* crashes on Windows */ { @@ -1181,20 +1182,20 @@ static void test_message_null_buffer(void) SetLastError(0xdeadbeef); ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 0, NULL); error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_NOT_ENOUGH_MEMORY, "last error %u\n", error); + ok(!ret, "FormatMessageA returned %lu\n", ret); + ok(error == ERROR_NOT_ENOUGH_MEMORY, "last error %lu\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 1, NULL); error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_NOT_ENOUGH_MEMORY, "last error %u\n", error); + ok(!ret, "FormatMessageA returned %lu\n", ret); + ok(error == ERROR_NOT_ENOUGH_MEMORY, "last error %lu\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 256, NULL); error = GetLastError(); - ok(!ret, "FormatMessageA returned %u\n", ret); - ok(error == ERROR_NOT_ENOUGH_MEMORY, "last error %u\n", error); + ok(!ret, "FormatMessageA returned %lu\n", ret); + ok(error == ERROR_NOT_ENOUGH_MEMORY, "last error %lu\n", error); }
static void test_message_null_buffer_wide(void) @@ -1204,38 +1205,38 @@ static void test_message_null_buffer_wide(void) SetLastError(0xdeadbeef); ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 0, NULL); error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(!ret, "FormatMessageW returned %lu\n", ret); + ok(error == ERROR_INVALID_PARAMETER, "last error %lu\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 1, NULL); error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(!ret, "FormatMessageW returned %lu\n", ret); + ok(error == ERROR_INVALID_PARAMETER, "last error %lu\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, 0, 0, NULL, 256, NULL); error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(!ret, "FormatMessageW returned %lu\n", ret); + ok(error == ERROR_INVALID_PARAMETER, "last error %lu\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 0, NULL); error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(!ret, "FormatMessageW returned %lu\n", ret); + ok(error == ERROR_INVALID_PARAMETER, "last error %lu\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 1, NULL); error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(!ret, "FormatMessageW returned %lu\n", ret); + ok(error == ERROR_INVALID_PARAMETER, "last error %lu\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL, 0, 0, NULL, 256, NULL); error = GetLastError(); - ok(!ret, "FormatMessageW returned %u\n", ret); - ok(error == ERROR_INVALID_PARAMETER, "last error %u\n", error); + ok(!ret, "FormatMessageW returned %lu\n", ret); + ok(error == ERROR_INVALID_PARAMETER, "last error %lu\n", error); }
static void test_message_allocate_buffer(void) @@ -1254,15 +1255,15 @@ static void test_message_allocate_buffer(void) buf = (char *)0xdeadbeef; ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, "", 0, 0, (char *)&buf, 0, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(buf == NULL, "Expected output buffer pointer to be NULL\n"); ok(GetLastError() == ERROR_NO_WORK_DONE || broken(GetLastError() == 0xdeadbeef), - "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %lu\n", GetLastError());
buf = (char *)0xdeadbeef; ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, "test", 0, 0, (char *)&buf, 0, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (char *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (char *)0xdeadbeef) @@ -1275,7 +1276,7 @@ static void test_message_allocate_buffer(void) buf = (char *)0xdeadbeef; ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, "test", 0, 0, (char *)&buf, strlen("test"), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (char *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (char *)0xdeadbeef) @@ -1288,7 +1289,7 @@ static void test_message_allocate_buffer(void) buf = (char *)0xdeadbeef; ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, "test", 0, 0, (char *)&buf, strlen("test") + 1, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (char *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (char *)0xdeadbeef) @@ -1301,7 +1302,7 @@ static void test_message_allocate_buffer(void) buf = (char *)0xdeadbeef; ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, "test", 0, 0, (char *)&buf, strlen("test") + 2, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (char *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (char *)0xdeadbeef) @@ -1314,7 +1315,7 @@ static void test_message_allocate_buffer(void) buf = (char *)0xdeadbeef; ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, "test", 0, 0, (char *)&buf, 1024, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (char *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (char *)0xdeadbeef) @@ -1348,24 +1349,24 @@ static void test_message_allocate_buffer_wide(void) buf = (WCHAR *)0xdeadbeef; ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, L"", 0, 0, (WCHAR *)&buf, 0, NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageW to return 0, got %lu\n", ret); ok(buf == NULL, "Expected output buffer pointer to be NULL\n"); ok(GetLastError() == ERROR_NO_WORK_DONE || broken(GetLastError() == 0xdeadbeef), - "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %lu\n", GetLastError());
SetLastError(0xdeadbeef); buf = (WCHAR *)0xdeadbeef; ret = doitW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, L"%1", 0, 0, (WCHAR *)&buf, 0, L"" ); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageW to return 0, got %lu\n", ret); ok(buf == NULL, "Expected output buffer pointer to be NULL\n"); ok(GetLastError() == ERROR_NO_WORK_DONE || broken(GetLastError() == 0xdeadbeef), - "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %u\n", GetLastError()); + "Expected GetLastError() to return ERROR_NO_WORK_DONE, got %lu\n", GetLastError());
buf = (WCHAR *)0xdeadbeef; ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, L"test", 0, 0, (WCHAR *)&buf, 0, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (WCHAR *)0xdeadbeef) @@ -1378,7 +1379,7 @@ static void test_message_allocate_buffer_wide(void) buf = (WCHAR *)0xdeadbeef; ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, L"test", 0, 0, (WCHAR *)&buf, 4, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (WCHAR *)0xdeadbeef) @@ -1391,7 +1392,7 @@ static void test_message_allocate_buffer_wide(void) buf = (WCHAR *)0xdeadbeef; ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, L"test", 0, 0, (WCHAR *)&buf, 5, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (WCHAR *)0xdeadbeef) @@ -1404,7 +1405,7 @@ static void test_message_allocate_buffer_wide(void) buf = (WCHAR *)0xdeadbeef; ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, L"test", 0, 0, (WCHAR *)&buf, 6, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (WCHAR *)0xdeadbeef) @@ -1417,7 +1418,7 @@ static void test_message_allocate_buffer_wide(void) buf = (WCHAR *)0xdeadbeef; ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, L"test", 0, 0, (WCHAR *)&buf, 1024, NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(buf != NULL && buf != (WCHAR *)0xdeadbeef, "Expected output buffer pointer to be valid\n"); if (buf != NULL && buf != (WCHAR *)0xdeadbeef) @@ -1467,52 +1468,52 @@ static void test_message_from_hmodule(void) ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, ARRAY_SIZE(out), NULL); error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); + ok(ret == 0, "FormatMessageA returned %lu instead of 0\n", ret); ok(error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_FOUND || - error == ERROR_RESOURCE_TYPE_NOT_FOUND, "Unexpected last error %u.\n", error); + error == ERROR_RESOURCE_TYPE_NOT_FOUND, "Unexpected last error %lu.\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), out, ARRAY_SIZE(out), NULL); error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); + ok(ret == 0, "FormatMessageA returned %lu instead of 0\n", ret); ok(error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_LOADED || - error == ERROR_RESOURCE_TYPE_NOT_FOUND, "Unexpected last error %u.\n", error); + error == ERROR_RESOURCE_TYPE_NOT_FOUND, "Unexpected last error %lu.\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, MAKELANGID(LANG_NEUTRAL, SUBLANG_SYS_DEFAULT), out, ARRAY_SIZE(out), NULL); error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); + ok(ret == 0, "FormatMessageA returned %lu instead of 0\n", ret); ok(error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_LOADED || - error == ERROR_RESOURCE_TYPE_NOT_FOUND, "Unexpected last error %u.\n", error); + error == ERROR_RESOURCE_TYPE_NOT_FOUND, "Unexpected last error %lu.\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), out, ARRAY_SIZE(out), NULL); error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); + ok(ret == 0, "FormatMessageA returned %lu instead of 0\n", ret); ok(error == ERROR_RESOURCE_LANG_NOT_FOUND || error == ERROR_RESOURCE_TYPE_NOT_FOUND || error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_FOUND || error == ERROR_MUI_FILE_NOT_LOADED, - "last error %u\n", error); + "last error %lu\n", error);
SetLastError(0xdeadbeef); ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 3044, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_UK), out, ARRAY_SIZE(out), NULL); error = GetLastError(); - ok(ret == 0, "FormatMessageA returned %u instead of 0\n", ret); + ok(ret == 0, "FormatMessageA returned %lu instead of 0\n", ret); ok(error == ERROR_RESOURCE_LANG_NOT_FOUND || error == ERROR_RESOURCE_TYPE_NOT_FOUND || error == ERROR_MR_MID_NOT_FOUND || error == ERROR_MUI_FILE_NOT_FOUND || error == ERROR_MUI_FILE_NOT_LOADED, - "last error %u\n", error); + "last error %lu\n", error); }
static void test_message_invalid_flags(void) @@ -1526,50 +1527,50 @@ static void test_message_invalid_flags(void) SetLastError(0xdeadbeef); memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(0, "test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the output buffer 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); ptr = (char *)0xdeadbeef; ret = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER, "test", 0, 0, (char *)&ptr, 0, NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(ptr == NULL, "Expected output pointer to be initialized to NULL, got %p\n", ptr); 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); memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS, "test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the output buffer 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); memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_ARGUMENT_ARRAY, "test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the output buffer 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); memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_MAX_WIDTH_MASK, "test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageA to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageA to return 0, got %lu\n", ret); ok(!memcmp(out, init_buf, sizeof(init_buf)), "Expected the output buffer 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());
/* Simultaneously setting FORMAT_MESSAGE_FROM_STRING with other source @@ -1579,21 +1580,21 @@ static void test_message_invalid_flags(void) memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_SYSTEM, "test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(!strcmp("test", out), "Expected the output buffer to be untouched\n");
memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE, "test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(!strcmp("test", out), "Expected the output buffer to be untouched\n");
memcpy(out, init_buf, sizeof(init_buf)); ret = FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_FROM_SYSTEM, "test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageA to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageA to return 4, got %lu\n", ret); ok(!strcmp("test", out), "Expected the output buffer to be untouched\n"); } @@ -1607,50 +1608,50 @@ static void test_message_invalid_flags_wide(void) SetLastError(0xdeadbeef); lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(0, L"test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageW to return 0, got %lu\n", ret); ok(!lstrcmpW( out, L"xxxxxx" ), "Expected the output buffer 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); ptr = (WCHAR *)0xdeadbeef; ret = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER, L"test", 0, 0, (WCHAR *)&ptr, 0, NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageW to return 0, got %lu\n", ret); ok(ptr == NULL, "Expected output pointer to be initialized to NULL, got %p\n", ptr); 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); lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(FORMAT_MESSAGE_IGNORE_INSERTS, L"test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageW to return 0, got %lu\n", ret); ok(!lstrcmpW( out, L"xxxxxx" ), "Expected the output buffer 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); lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(FORMAT_MESSAGE_ARGUMENT_ARRAY, L"test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageW to return 0, got %lu\n", ret); ok(!lstrcmpW( out, L"xxxxxx" ), "Expected the output buffer 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); lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(FORMAT_MESSAGE_MAX_WIDTH_MASK, L"test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 0, "Expected FormatMessageW to return 0, got %u\n", ret); + ok(ret == 0, "Expected FormatMessageW to return 0, got %lu\n", ret); ok(!lstrcmpW( out, L"xxxxxx" ), "Expected the output buffer 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());
/* Simultaneously setting FORMAT_MESSAGE_FROM_STRING with other source @@ -1660,21 +1661,21 @@ static void test_message_invalid_flags_wide(void) lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_SYSTEM, L"test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %lu\n", ret); ok(!lstrcmpW(L"test", out), "Expected the output buffer to be untouched\n");
lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE, L"test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %lu\n", ret); ok(!lstrcmpW(L"test", out), "Expected the output buffer to be untouched\n");
lstrcpyW( out, L"xxxxxx" ); ret = FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_FROM_SYSTEM, L"test", 0, 0, out, ARRAY_SIZE(out), NULL); - ok(ret == 4, "Expected FormatMessageW to return 4, got %u\n", ret); + ok(ret == 4, "Expected FormatMessageW to return 4, got %lu\n", ret); ok(!lstrcmpW(L"test", out), "Expected the output buffer to be untouched\n"); } @@ -1719,12 +1720,12 @@ static void test_message_from_64bit_number(void) MultiByteToWideChar(CP_ACP, 0, unsigned_tests[i].expected, -1, expW, ARRAY_SIZE(expW)); ok(!lstrcmpW(outW, expW),"[%d] failed, expected %s, got %s\n", i, unsigned_tests[i].expected, wine_dbgstr_w(outW)); - ok(r == unsigned_tests[i].len,"[%d] failed: r=%d\n", i, r); + ok(r == unsigned_tests[i].len,"[%d] failed: r=%ld\n", i, r); r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!I64u!", 0, 0, outA, sizeof(outA), unsigned_tests[i].number); ok(!strcmp(outA, unsigned_tests[i].expected),"[%d] failed, expected %s, got %s\n", i, unsigned_tests[i].expected, outA); - ok(r == unsigned_tests[i].len,"[%d] failed: r=%d\n", i, r); + ok(r == unsigned_tests[i].len,"[%d] failed: r=%ld\n", i, r); }
for (i = 0; i < ARRAY_SIZE(signed_tests); i++) @@ -1734,12 +1735,12 @@ static void test_message_from_64bit_number(void) MultiByteToWideChar(CP_ACP, 0, signed_tests[i].expected, -1, expW, ARRAY_SIZE(expW)); ok(!lstrcmpW(outW, expW),"[%d] failed, expected %s, got %s\n", i, signed_tests[i].expected, wine_dbgstr_w(outW)); - ok(r == signed_tests[i].len,"[%d] failed: r=%d\n", i, r); + ok(r == signed_tests[i].len,"[%d] failed: r=%ld\n", i, r); r = doit(FORMAT_MESSAGE_FROM_STRING, "%1!I64d!", 0, 0, outA, sizeof(outA), signed_tests[i].number); ok(!strcmp(outA, signed_tests[i].expected),"[%d] failed, expected %s, got %s\n", i, signed_tests[i].expected, outA); - ok(r == signed_tests[i].len,"[%d] failed: r=%d\n", i, r); + ok(r == signed_tests[i].len,"[%d] failed: r=%ld\n", i, r); } }
@@ -1766,7 +1767,7 @@ static void test_message_system_errors(void) { len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, tests[i].error_code, LANG_USER_DEFAULT, buffer, ARRAY_SIZE(buffer), NULL); - ok(len || broken(tests[i].broken), "Got zero len, code %#x.\n", tests[i].error_code); + ok(len || broken(tests[i].broken), "Got zero len, code %#lx.\n", tests[i].error_code); } }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/mfplat/tests/mfplat.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 91c9d971a3b..d0e79646dae 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -1154,8 +1154,9 @@ static void test_media_type(void) IMFMediaType *mediatype, *mediatype2; IMFVideoMediaType *video_type; IUnknown *unk, *unk2; - DWORD count, flags; BOOL compressed; + DWORD flags; + UINT count; HRESULT hr; GUID guid;
@@ -1956,10 +1957,11 @@ static void test_MFCreateMFByteStreamOnStream(void) IMFByteStream *bytestream2; IStream *stream; IMFAttributes *attributes = NULL; - DWORD caps, written, count; + DWORD caps, written; IUnknown *unknown; ULONG ref, size; HRESULT hr; + UINT count;
if(!pMFCreateMFByteStreamOnStream) { @@ -2061,10 +2063,11 @@ static void test_file_stream(void) IMFAttributes *attributes = NULL; MF_ATTRIBUTE_TYPE item_type; WCHAR pathW[MAX_PATH]; - DWORD caps, count; WCHAR *filename; HRESULT hr; WCHAR *str; + DWORD caps; + UINT count; BOOL eos;
filename = load_resource(L"test.mp4"); @@ -4235,6 +4238,7 @@ image_size_tests[] = static void test_MFCalculateImageSize(void) { unsigned int i; + DWORD plsize; UINT32 size; HRESULT hr;
@@ -4260,9 +4264,9 @@ static void test_MFCalculateImageSize(void) { unsigned int plane_size = ptr->plane_size ? ptr->plane_size : ptr->size;
- hr = pMFGetPlaneSize(ptr->subtype->Data1, ptr->width, ptr->height, &size); + hr = pMFGetPlaneSize(ptr->subtype->Data1, ptr->width, ptr->height, &plsize); ok(hr == S_OK, "%u: failed to get plane size, hr %#x.\n", i, hr); - ok(size == plane_size, "%u: unexpected plane size %u, expected %u.\n", i, size, plane_size); + ok(plsize == plane_size, "%u: unexpected plane size %u, expected %u.\n", i, plsize, plane_size); } } } @@ -4270,7 +4274,7 @@ static void test_MFCalculateImageSize(void) static void test_MFGetPlaneSize(void) { unsigned int i; - UINT32 size; + DWORD size; HRESULT hr;
if (!pMFGetPlaneSize) @@ -5685,12 +5689,13 @@ static void test_MFCreate2DMediaBuffer(void) { 1, 4, D3DFMT_A8R8G8B8, 16, 64 }, { 4, 1, D3DFMT_A8R8G8B8, 16, 64 }, }; - unsigned int max_length, length, length2; + DWORD max_length, length, length2; BYTE *buffer_start, *data, *data2; - int i, j, k, pitch, pitch2, stride; + LONG pitch, pitch2, stride; IMF2DBuffer2 *_2dbuffer2; IMF2DBuffer *_2dbuffer; IMFMediaBuffer *buffer; + int i, j, k; HRESULT hr; BOOL ret;
@@ -5986,7 +5991,7 @@ static void test_MFCreateMediaBufferFromMediaType(void) { 2, 0, 0, 4, 16, 52 }, }; IMFMediaBuffer *buffer; - UINT32 length; + DWORD length; HRESULT hr; IMFMediaType *media_type; unsigned int i; @@ -7094,11 +7099,11 @@ static void test_sample_allocator_sysmem(void) IMFVideoSampleAllocatorCallback *allocator_cb; IMFVideoSampleAllocatorEx *allocatorex; IMFVideoSampleAllocator *allocator; - unsigned int buffer_count; IMFSample *sample, *sample2; IMFAttributes *attributes; IMFMediaBuffer *buffer; LONG refcount, count; + DWORD buffer_count; IUnknown *unk; HRESULT hr;
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=109657
Your paranoid android.
=== w7u_el (32 bit report) ===
mfplat: 0868:mfplat: unhandled exception c0000005 at 6EFA7D1C
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/mfplat/tests/Makefile.in | 1 dlls/mfplat/tests/mfplat.c | 2580 +++++++++++++++++++++-------------------- 2 files changed, 1290 insertions(+), 1291 deletions(-)
diff --git a/dlls/mfplat/tests/Makefile.in b/dlls/mfplat/tests/Makefile.in index d5ef14e88f0..ae9cc378933 100644 --- a/dlls/mfplat/tests/Makefile.in +++ b/dlls/mfplat/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = mfplat.dll IMPORTS = ole32 mfplat user32 d3d9 dxva2 mfuuid propsys uuid strmiids
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index d0e79646dae..29da815023d 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -72,7 +72,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 ULONG get_refcount(void *iface) @@ -92,7 +92,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); } @@ -112,7 +112,7 @@ static void check_service_interface_(unsigned int line, void *iface_ptr, REFGUID hr = IMFGetService_GetService(gs, service, iid, (void **)&unk); IMFGetService_Release(gs); } - 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); } @@ -143,7 +143,7 @@ static void init_d3d11_resource_readback(ID3D11Resource *resource, ID3D11Resourc if (FAILED(hr = ID3D11DeviceContext_Map(rb->immediate_context, rb->resource, sub_resource_idx, D3D11_MAP_READ, 0, &rb->map_desc))) { - trace("Failed to map resource, hr %#x.\n", hr); + trace("Failed to map resource, hr %#lx.\n", hr); ID3D11Resource_Release(rb->resource); rb->resource = NULL; ID3D11DeviceContext_Release(rb->immediate_context); @@ -171,7 +171,7 @@ static void get_d3d11_texture2d_readback(ID3D11Texture2D *texture, unsigned int texture_desc.MiscFlags = 0; if (FAILED(hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, (ID3D11Texture2D **)&rb_texture))) { - trace("Failed to create texture, hr %#x.\n", hr); + trace("Failed to create texture, hr %#lx.\n", hr); ID3D11Device_Release(device); return; } @@ -317,7 +317,7 @@ static WCHAR *load_resource(const WCHAR *name)
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %d\n", + ok(file != INVALID_HANDLE_VALUE, "file creation failed, at %s, error %ld\n", wine_dbgstr_w(pathW), GetLastError());
res = FindResourceW(NULL, name, (LPCWSTR)RT_RCDATA); @@ -418,57 +418,57 @@ static void test_register(void) win_skip("Not enough permissions to register a transform.\n"); return; } - ok(ret == S_OK, "Failed to register dummy transform, hr %#x.\n", ret); + ok(ret == S_OK, "Failed to register dummy transform, hr %#lx.\n", ret);
if(0) { /* NULL name crashes on windows */ ret = MFTRegister(DUMMY_CLSID, MFT_CATEGORY_OTHER, NULL, 0, 1, input, 1, output, NULL); - ok(ret == E_INVALIDARG, "got %x\n", ret); + ok(ret == E_INVALIDARG, "got %lx\n", ret); }
ret = MFTRegister(DUMMY_CLSID, MFT_CATEGORY_OTHER, name, 0, 0, NULL, 0, NULL, NULL); - ok(ret == S_OK, "Failed to register dummy filter: %x\n", ret); + ok(ret == S_OK, "Failed to register dummy filter: %lx\n", ret);
ret = MFTRegister(DUMMY_CLSID, MFT_CATEGORY_OTHER, name, 0, 1, NULL, 0, NULL, NULL); - ok(ret == S_OK, "Failed to register dummy filter: %x\n", ret); + ok(ret == S_OK, "Failed to register dummy filter: %lx\n", ret);
ret = MFTRegister(DUMMY_CLSID, MFT_CATEGORY_OTHER, name, 0, 0, NULL, 1, NULL, NULL); - ok(ret == S_OK, "Failed to register dummy filter: %x\n", ret); + ok(ret == S_OK, "Failed to register dummy filter: %lx\n", ret);
if(0) { /* NULL clsids/count crashes on windows (vista) */ count = 0; ret = MFTEnum(MFT_CATEGORY_OTHER, 0, NULL, NULL, NULL, NULL, &count); - ok(ret == E_POINTER, "Failed to enumerate filters: %x\n", ret); + ok(ret == E_POINTER, "Failed to enumerate filters: %lx\n", ret); ok(count == 0, "Expected count == 0\n");
clsids = NULL; ret = MFTEnum(MFT_CATEGORY_OTHER, 0, NULL, NULL, NULL, &clsids, NULL); - ok(ret == E_POINTER, "Failed to enumerate filters: %x\n", ret); + ok(ret == E_POINTER, "Failed to enumerate filters: %lx\n", ret); } hr = MFTGetInfo(DUMMY_CLSID, &mft_name, NULL, NULL, NULL, NULL, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!lstrcmpW(mft_name, L"Wine test"), "Unexpected name %s.\n", wine_dbgstr_w(mft_name)); CoTaskMemFree(mft_name);
hr = MFTGetInfo(DUMMY_CLSID, NULL, NULL, NULL, NULL, NULL, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
in_count = out_count = 1; hr = MFTGetInfo(DUMMY_CLSID, NULL, NULL, &in_count, NULL, &out_count, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!in_count, "Unexpected count %u.\n", in_count); ok(!out_count, "Unexpected count %u.\n", out_count);
hr = MFTGetInfo(DUMMY_CLSID, NULL, NULL, NULL, NULL, NULL, &attributes); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!attributes, "Unexpected attributes.\n"); IMFAttributes_Release(attributes);
hr = MFTGetInfo(DUMMY_CLSID, &mft_name, &in_types, &in_count, &out_types, &out_count, &attributes); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!lstrcmpW(mft_name, L"Wine test"), "Unexpected name %s.\n", wine_dbgstr_w(mft_name)); ok(!!in_types, "Unexpected pointer.\n"); ok(!!out_types, "Unexpected pointer.\n"); @@ -485,7 +485,7 @@ if(0) ok(!!attributes, "Unexpected attributes.\n"); count = 1; 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, "Unexpected count %u.\n", count); CoTaskMemFree(mft_name); CoTaskMemFree(in_types); @@ -495,7 +495,7 @@ if(0) count = 0; clsids = NULL; ret = MFTEnum(MFT_CATEGORY_OTHER, 0, NULL, NULL, NULL, &clsids, &count); - ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(ret == S_OK, "Failed to enumerate filters: %lx\n", ret); ok(count > 0, "Expected count > 0\n"); ok(clsids != NULL, "Expected clsids != NULL\n"); ok(check_clsid(clsids, count), "Filter was not part of enumeration\n"); @@ -504,7 +504,7 @@ if(0) count = 0; clsids = NULL; ret = MFTEnum(MFT_CATEGORY_OTHER, 0, input, NULL, NULL, &clsids, &count); - ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(ret == S_OK, "Failed to enumerate filters: %lx\n", ret); ok(count > 0, "Expected count > 0\n"); ok(clsids != NULL, "Expected clsids != NULL\n"); ok(check_clsid(clsids, count), "Filter was not part of enumeration\n"); @@ -513,7 +513,7 @@ if(0) count = 0; clsids = NULL; ret = MFTEnum(MFT_CATEGORY_OTHER, 0, NULL, output, NULL, &clsids, &count); - ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(ret == S_OK, "Failed to enumerate filters: %lx\n", ret); ok(count > 0, "Expected count > 0\n"); ok(clsids != NULL, "Expected clsids != NULL\n"); ok(check_clsid(clsids, count), "Filter was not part of enumeration\n"); @@ -522,7 +522,7 @@ if(0) count = 0; clsids = NULL; ret = MFTEnum(MFT_CATEGORY_OTHER, 0, input, output, NULL, &clsids, &count); - ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(ret == S_OK, "Failed to enumerate filters: %lx\n", ret); ok(count > 0, "Expected count > 0\n"); ok(clsids != NULL, "Expected clsids != NULL\n"); ok(check_clsid(clsids, count), "Filter was not part of enumeration\n"); @@ -532,17 +532,17 @@ if(0) count = 0; clsids = NULL; ret = MFTEnum(MFT_CATEGORY_OTHER, 0, output, input, NULL, &clsids, &count); - ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(ret == S_OK, "Failed to enumerate filters: %lx\n", ret); ok(!count, "got %d\n", count); ok(clsids == NULL, "Expected clsids == NULL\n");
ret = MFTUnregister(DUMMY_CLSID); ok(ret == S_OK || /* w7pro64 */ - broken(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)), "got %x\n", ret); + broken(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)), "got %lx\n", ret);
ret = MFTUnregister(DUMMY_CLSID); - ok(ret == S_OK || broken(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)), "got %x\n", ret); + ok(ret == S_OK || broken(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)), "got %lx\n", ret); }
static HRESULT WINAPI test_create_from_url_callback_Invoke(IMFAsyncCallback *iface, IMFAsyncResult *result) @@ -559,10 +559,10 @@ static HRESULT WINAPI test_create_from_url_callback_Invoke(IMFAsyncCallback *ifa
object = NULL; hr = IMFSourceResolver_EndCreateObjectFromURL(resolver, result, &obj_type, &object); - ok(hr == S_OK, "Failed to create an object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create an object, hr %#lx.\n", hr);
hr = IMFAsyncResult_GetObject(result, &object2); - ok(hr == S_OK, "Failed to get result object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get result object, hr %#lx.\n", hr); ok(object2 == object, "Unexpected object.\n");
if (object) @@ -596,12 +596,12 @@ static HRESULT WINAPI test_create_from_file_handler_callback_Invoke(IMFAsyncCall handler = (IMFSchemeHandler *)IMFAsyncResult_GetStateNoAddRef(result);
hr = IMFSchemeHandler_EndCreateObject(handler, result, &obj_type, &object); - ok(hr == S_OK, "Failed to create an object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create an object, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { hr = IMFAsyncResult_GetObject(result, &object2); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(object); } @@ -631,7 +631,7 @@ static HRESULT WINAPI source_events_callback_Invoke(IMFAsyncCallback *iface, IMF generator = (IMFMediaEventGenerator *)IMFAsyncResult_GetStateNoAddRef(result);
hr = IMFMediaEventGenerator_EndGetEvent(generator, result, &callback->media_event); - ok(hr == S_OK, "Failed to create an object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create an object, hr %#lx.\n", hr);
SetEvent(callback->event);
@@ -673,7 +673,7 @@ static BOOL get_event(IMFMediaEventGenerator *generator, MediaEventType expected { hr = IMFMediaEventGenerator_BeginGetEvent(generator, &callback->IMFAsyncCallback_iface, (IUnknown *)generator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (WaitForSingleObject(callback->event, 1000) == WAIT_TIMEOUT) { @@ -684,14 +684,14 @@ static BOOL get_event(IMFMediaEventGenerator *generator, MediaEventType expected Sleep(10);
hr = IMFMediaEvent_GetType(callback->media_event, &event_type); - ok(hr == S_OK, "Failed to event type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to event type, hr %#lx.\n", hr);
if ((ret = (event_type == expected_event_type))) { if (value) { hr = IMFMediaEvent_GetValue(callback->media_event, value); - ok(hr == S_OK, "Failed to get value of event, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get value of event, hr %#lx.\n", hr); }
break; @@ -743,16 +743,16 @@ static void test_source_resolver(void) callback2 = create_test_callback(&test_create_from_file_handler_callback_vtbl);
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = pMFCreateSourceResolver(NULL); - ok(hr == E_POINTER, "got %#x\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr);
hr = pMFCreateSourceResolver(&resolver); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = pMFCreateSourceResolver(&resolver2); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); ok(resolver != resolver2, "Expected new instance\n");
IMFSourceResolver_Release(resolver2); @@ -760,20 +760,20 @@ static void test_source_resolver(void) filename = load_resource(L"test.mp4");
hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, filename, &stream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFSourceResolver_CreateObjectFromByteStream( resolver, NULL, NULL, MF_RESOLUTION_MEDIASOURCE, NULL, &obj_type, (IUnknown **)&mediasource); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
hr = IMFSourceResolver_CreateObjectFromByteStream(resolver, stream, NULL, MF_RESOLUTION_MEDIASOURCE, NULL, NULL, (IUnknown **)&mediasource); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
hr = IMFSourceResolver_CreateObjectFromByteStream(resolver, stream, NULL, MF_RESOLUTION_MEDIASOURCE, NULL, &obj_type, NULL); - ok(hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_POINTER, "got 0x%08lx\n", hr);
IMFByteStream_Release(stream);
@@ -782,16 +782,16 @@ static void test_source_resolver(void)
hr = IMFSourceResolver_CreateObjectFromURL(resolver, L"nonexisting.mp4", MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, (IUnknown **)&stream); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
hr = IMFSourceResolver_CreateObjectFromURL(resolver, filename, MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, (IUnknown **)&stream); - ok(hr == S_OK, "Failed to resolve url, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resolve url, hr %#lx.\n", hr); IMFByteStream_Release(stream);
hr = IMFSourceResolver_BeginCreateObjectFromURL(resolver, filename, MF_RESOLUTION_BYTESTREAM, NULL, &cancel_cookie, &callback->IMFAsyncCallback_iface, (IUnknown *)resolver); - ok(hr == S_OK, "Create request failed, hr %#x.\n", hr); + ok(hr == S_OK, "Create request failed, hr %#lx.\n", hr); ok(cancel_cookie != NULL, "Unexpected cancel object.\n"); IUnknown_Release(cancel_cookie);
@@ -804,18 +804,18 @@ static void test_source_resolver(void)
hr = IMFSourceResolver_CreateObjectFromURL(resolver, pathW, MF_RESOLUTION_BYTESTREAM, NULL, &obj_type, (IUnknown **)&stream); - ok(hr == S_OK, "Failed to resolve url, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to resolve url, hr %#lx.\n", hr); IMFByteStream_Release(stream);
/* We have to create a new bytestream here, because all following * calls to CreateObjectFromByteStream will fail. */ hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, filename, &stream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFByteStream_QueryInterface(stream, &IID_IMFAttributes, (void **)&attributes); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IMFAttributes_SetString(attributes, &MF_BYTESTREAM_CONTENT_TYPE, L"video/mp4"); - ok(hr == S_OK, "Failed to set string value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set string value, hr %#lx.\n", hr); IMFAttributes_Release(attributes);
/* Start of gstreamer dependent tests */ @@ -823,14 +823,14 @@ static void test_source_resolver(void) hr = IMFSourceResolver_CreateObjectFromByteStream(resolver, stream, NULL, MF_RESOLUTION_MEDIASOURCE, NULL, &obj_type, (IUnknown **)&mediasource); if (strcmp(winetest_platform, "wine")) - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (FAILED(hr)) { IMFByteStream_Release(stream); IMFSourceResolver_Release(resolver);
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);
DeleteFileW(filename); return; @@ -842,98 +842,98 @@ static void test_source_resolver(void) check_service_interface(mediasource, &MF_RATE_CONTROL_SERVICE, &IID_IMFRateSupport, TRUE);
hr = IMFMediaSource_QueryInterface(mediasource, &IID_IMFGetService, (void**)&get_service); - ok(hr == S_OK, "Failed to get service interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get service interface, hr %#lx.\n", hr);
hr = IMFGetService_GetService(get_service, &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 = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == S_OK, "Failed to query fastest rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query fastest rate, hr %#lx.\n", hr); ok(rate == 1e6f, "Unexpected fastest rate %f.\n", rate); hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_FORWARD, TRUE, &rate); - ok(hr == S_OK, "Failed to query fastest rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query fastest rate, hr %#lx.\n", hr); ok(rate == 1e6f, "Unexpected fastest rate %f.\n", rate); hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_REVERSE, FALSE, &rate); - ok(hr == S_OK, "Failed to query fastest rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query fastest rate, hr %#lx.\n", hr); ok(rate == -1e6f, "Unexpected fastest rate %f.\n", rate); hr = IMFRateSupport_GetFastestRate(rate_support, MFRATE_REVERSE, TRUE, &rate); - ok(hr == S_OK, "Failed to query fastest rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query fastest rate, hr %#lx.\n", hr); ok(rate == -1e6f, "Unexpected fastest rate %f.\n", rate);
hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, FALSE, &rate); - ok(hr == S_OK, "Failed to query slowest rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query slowest rate, hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected slowest rate %f.\n", rate); hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_FORWARD, TRUE, &rate); - ok(hr == S_OK, "Failed to query slowest rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query slowest rate, hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected slowest rate %f.\n", rate); hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, FALSE, &rate); - ok(hr == S_OK, "Failed to query slowest rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query slowest rate, hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected slowest rate %f.\n", rate); hr = IMFRateSupport_GetSlowestRate(rate_support, MFRATE_REVERSE, TRUE, &rate); - ok(hr == S_OK, "Failed to query slowest rate, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to query slowest rate, hr %#lx.\n", hr); ok(rate == 0.0f, "Unexpected slowest rate %f.\n", rate);
hr = IMFRateSupport_IsRateSupported(rate_support, FALSE, 0.0f, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFRateSupport_IsRateSupported(rate_support, FALSE, 0.0f, &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, FALSE, 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); hr = IMFRateSupport_IsRateSupported(rate_support, FALSE, -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); hr = IMFRateSupport_IsRateSupported(rate_support, FALSE, 1e6f + 1.0f, &rate); - ok(hr == MF_E_UNSUPPORTED_RATE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_UNSUPPORTED_RATE, "Unexpected hr %#lx.\n", hr); ok(rate == 1e6f + 1.0f || broken(rate == 1e6f) /* Win7 */, "Unexpected %f.\n", rate); hr = IMFRateSupport_IsRateSupported(rate_support, FALSE, -1e6f, &rate); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(rate == -1e6f, "Unexpected rate %f.\n", rate);
hr = IMFRateSupport_IsRateSupported(rate_support, FALSE, -1e6f - 1.0f, &rate); - ok(hr == MF_E_UNSUPPORTED_RATE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_UNSUPPORTED_RATE, "Unexpected hr %#lx.\n", hr); ok(rate == -1e6f - 1.0f || broken(rate == -1e6f) /* Win7 */, "Unexpected rate %f.\n", rate);
check_service_interface(mediasource, &MF_RATE_CONTROL_SERVICE, &IID_IMFRateControl, TRUE); hr = IMFMediaSource_CreatePresentationDescriptor(mediasource, &descriptor); - ok(hr == S_OK, "Failed to get presentation descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get presentation descriptor, hr %#lx.\n", hr); ok(descriptor != NULL, "got %p\n", descriptor);
hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(descriptor, 0, &selected, &sd); - ok(hr == S_OK, "Failed to get stream descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream descriptor, hr %#lx.\n", hr);
hr = IMFStreamDescriptor_GetMediaTypeHandler(sd, &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); IMFStreamDescriptor_Release(sd);
hr = IMFMediaTypeHandler_GetMajorType(handler, &guid); - ok(hr == S_OK, "Failed to get stream major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream major type, hr %#lx.\n", hr);
/* Check major/minor type for the test media. */ ok(IsEqualGUID(&guid, &MFMediaType_Video), "Unexpected major type %s.\n", debugstr_guid(&guid));
hr = IMFMediaTypeHandler_GetCurrentMediaType(handler, &media_type); - ok(hr == S_OK, "Failed to get current media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get current media type, hr %#lx.\n", hr); hr = IMFMediaType_GetGUID(media_type, &MF_MT_SUBTYPE, &guid); - ok(hr == S_OK, "Failed to get media sub type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get media sub type, hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&guid, &MFVideoFormat_M4S2), "Unexpected sub type %s.\n", debugstr_guid(&guid));
hr = IMFMediaType_GetUINT32(media_type, &MF_MT_VIDEO_ROTATION, &rotation); - ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Win7 */, "Failed to get rotation, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Win7 */, "Failed to get rotation, hr %#lx.\n", hr); if (hr == S_OK) ok(rotation == MFVideoRotationFormat_0, "Got wrong rotation %u.\n", rotation);
IMFMediaType_Release(media_type);
hr = IMFPresentationDescriptor_SelectStream(descriptor, 0); - ok(hr == S_OK, "Failed to select video stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to select video stream, hr %#lx.\n", hr);
var.vt = VT_EMPTY; hr = IMFMediaSource_Start(mediasource, descriptor, &GUID_NULL, &var); - ok(hr == S_OK, "Failed to start media source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start media source, hr %#lx.\n", hr);
video_stream = NULL; if (get_event((IMFMediaEventGenerator *)mediasource, MENewStream, &var)) @@ -943,39 +943,39 @@ static void test_source_resolver(void) }
hr = IMFMediaSource_Pause(mediasource); - ok(hr == S_OK, "Failed to pause media source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause media source, hr %#lx.\n", hr); if (get_event((IMFMediaEventGenerator *)mediasource, MESourcePaused, &var)) ok(var.vt == VT_EMPTY, "Unexpected value type.\n");
var.vt = VT_EMPTY; hr = IMFMediaSource_Start(mediasource, descriptor, &GUID_NULL, &var); - ok(hr == S_OK, "Failed to start media source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start media source, hr %#lx.\n", hr);
if (get_event((IMFMediaEventGenerator *)mediasource, MESourceStarted, &var)) ok(var.vt == VT_EMPTY, "Unexpected value type.\n");
hr = IMFMediaSource_Pause(mediasource); - ok(hr == S_OK, "Failed to pause media source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause media source, hr %#lx.\n", hr); if (get_event((IMFMediaEventGenerator *)mediasource, MESourcePaused, &var)) ok(var.vt == VT_EMPTY, "Unexpected value type.\n");
var.vt = VT_I8; var.uhVal.QuadPart = 0; hr = IMFMediaSource_Start(mediasource, descriptor, &GUID_NULL, &var); - ok(hr == S_OK, "Failed to start media source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start media source, hr %#lx.\n", hr);
if (get_event((IMFMediaEventGenerator *)mediasource, MESourceSeeked, &var)) ok(var.vt == VT_I8, "Unexpected value type.\n");
hr = IMFMediaSource_Stop(mediasource); - ok(hr == S_OK, "Failed to pause media source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause media source, hr %#lx.\n", hr); if (get_event((IMFMediaEventGenerator *)mediasource, MESourceStopped, &var)) ok(var.vt == VT_EMPTY, "Unexpected value type.\n");
var.vt = VT_I8; var.uhVal.QuadPart = 0; hr = IMFMediaSource_Start(mediasource, descriptor, &GUID_NULL, &var); - ok(hr == S_OK, "Failed to start media source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start media source, hr %#lx.\n", hr);
if (get_event((IMFMediaEventGenerator *)mediasource, MESourceStarted, &var)) ok(var.vt == VT_I8, "Unexpected value type.\n"); @@ -985,7 +985,7 @@ static void test_source_resolver(void) for (i = 0; i < sample_count; ++i) { hr = IMFMediaStream_RequestSample(video_stream, NULL); - ok(hr == S_OK, "Failed to request sample %u, hr %#x.\n", i + 1, hr); + ok(hr == S_OK, "Failed to request sample %u, hr %#lx.\n", i + 1, hr); if (hr != S_OK) break; } @@ -1007,15 +1007,15 @@ static void test_source_resolver(void) sample = (IMFSample *)var.punkVal;
hr = IMFSample_GetBufferCount(sample, &buffer_count); - ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr); - ok(buffer_count == 1, "Unexpected buffer count %u.\n", buffer_count); + ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr); + ok(buffer_count == 1, "Unexpected buffer count %lu.\n", buffer_count);
hr = IMFSample_GetSampleDuration(sample, &duration); - ok(hr == S_OK, "Failed to get sample duration, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sample duration, hr %#lx.\n", hr); ok(duration == 40 * MILLI_TO_100_NANO, "Unexpected duration %s.\n", wine_dbgstr_longlong(duration));
hr = IMFSample_GetSampleTime(sample, &time); - ok(hr == S_OK, "Failed to get sample time, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sample time, hr %#lx.\n", hr); ok(time == i * 40 * MILLI_TO_100_NANO, "Unexpected time %s.\n", wine_dbgstr_longlong(time));
IMFSample_Release(sample); @@ -1028,16 +1028,16 @@ static void test_source_resolver(void) /* MEEndOfStream isn't queued until after a one request beyond the last frame is submitted */ Sleep(100); hr = IMFMediaEventGenerator_GetEvent((IMFMediaEventGenerator *)video_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);
hr = IMFMediaStream_RequestSample(video_stream, NULL); - ok (hr == S_OK || hr == MF_E_END_OF_STREAM, "Unexpected hr %#x.\n", hr); + ok (hr == S_OK || hr == MF_E_END_OF_STREAM, "Unexpected hr %#lx.\n", hr); get_event((IMFMediaEventGenerator *)video_stream, MEEndOfStream, NULL); }
hr = IMFMediaStream_RequestSample(video_stream, NULL); - ok(hr == MF_E_END_OF_STREAM, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_END_OF_STREAM, "Unexpected hr %#lx.\n", hr);
get_event((IMFMediaEventGenerator *)mediasource, MEEndOfPresentation, NULL);
@@ -1046,10 +1046,10 @@ static void test_source_resolver(void) IMFPresentationDescriptor_Release(descriptor);
hr = IMFMediaSource_Shutdown(mediasource); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaSource_CreatePresentationDescriptor(mediasource, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
IMFRateSupport_Release(rate_support); IMFGetService_Release(get_service); @@ -1058,18 +1058,18 @@ static void test_source_resolver(void)
/* Create directly through scheme handler. */ hr = CoInitialize(NULL); - ok(SUCCEEDED(hr), "Failed to initialize, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to initialize, hr %#lx.\n", hr); do_uninit = hr == S_OK;
hr = CoCreateInstance(&CLSID_FileSchemePlugin, NULL, CLSCTX_INPROC_SERVER, &IID_IMFSchemeHandler, (void **)&scheme_handler); - ok(hr == S_OK, "Failed to create handler object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create handler object, hr %#lx.\n", hr);
callback2->event = callback->event; cancel_cookie = NULL; hr = IMFSchemeHandler_BeginCreateObject(scheme_handler, pathW, MF_RESOLUTION_MEDIASOURCE, NULL, &cancel_cookie, &callback2->IMFAsyncCallback_iface, (IUnknown *)scheme_handler); - ok(hr == S_OK, "Create request failed, hr %#x.\n", hr); + ok(hr == S_OK, "Create request failed, hr %#lx.\n", hr); ok(!!cancel_cookie, "Unexpected cancel object.\n"); IUnknown_Release(cancel_cookie);
@@ -1085,7 +1085,7 @@ static void test_source_resolver(void) IMFSourceResolver_Release(resolver);
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);
IMFAsyncCallback_Release(&callback->IMFAsyncCallback_iface); IMFAsyncCallback_Release(&callback2->IMFAsyncCallback_iface); @@ -1164,140 +1164,140 @@ if(0) { /* Crash on Windows Vista/7 */ hr = MFCreateMediaType(NULL); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr); }
hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFMediaType_GetMajorType(mediatype, &guid); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
compressed = FALSE; hr = IMFMediaType_IsCompressedFormat(mediatype, &compressed); - ok(hr == S_OK, "Failed to get media type property, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get media type property, hr %#lx.\n", hr); ok(compressed, "Unexpected value %d.\n", compressed);
hr = IMFMediaType_SetUINT32(mediatype, &MF_MT_ALL_SAMPLES_INDEPENDENT, 0); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
compressed = FALSE; hr = IMFMediaType_IsCompressedFormat(mediatype, &compressed); - ok(hr == S_OK, "Failed to get media type property, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get media type property, hr %#lx.\n", hr); ok(compressed, "Unexpected value %d.\n", compressed);
hr = IMFMediaType_SetUINT32(mediatype, &MF_MT_COMPRESSED, 0); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
compressed = FALSE; hr = IMFMediaType_IsCompressedFormat(mediatype, &compressed); - ok(hr == S_OK, "Failed to get media type property, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get media type property, hr %#lx.\n", hr); ok(compressed, "Unexpected value %d.\n", compressed);
hr = IMFMediaType_SetUINT32(mediatype, &MF_MT_ALL_SAMPLES_INDEPENDENT, 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(mediatype, &MF_MT_COMPRESSED, 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);
compressed = TRUE; hr = IMFMediaType_IsCompressedFormat(mediatype, &compressed); - ok(hr == S_OK, "Failed to get media type property, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get media type property, hr %#lx.\n", hr); ok(!compressed, "Unexpected value %d.\n", compressed);
hr = IMFMediaType_DeleteItem(mediatype, &MF_MT_COMPRESSED); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set GUID value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set GUID value, hr %#lx.\n", hr);
hr = IMFMediaType_GetMajorType(mediatype, &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");
/* IsEqual() */ 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);
flags = 0xdeadbeef; hr = IMFMediaType_IsEqual(mediatype, mediatype2, &flags); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); - ok(flags == 0, "Unexpected flags %#x.\n", flags); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); + ok(flags == 0, "Unexpected flags %#lx.\n", flags);
/* Different major types. */ hr = IMFMediaType_SetGUID(mediatype2, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set major type, hr %#lx.\n", hr);
flags = 0; hr = IMFMediaType_IsEqual(mediatype, mediatype2, &flags); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); ok(flags == (MF_MEDIATYPE_EQUAL_FORMAT_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA), - "Unexpected flags %#x.\n", flags); + "Unexpected flags %#lx.\n", flags);
/* Same major types, different subtypes. */ hr = IMFMediaType_SetGUID(mediatype2, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set major type, hr %#lx.\n", hr);
flags = 0; hr = IMFMediaType_IsEqual(mediatype, mediatype2, &flags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(flags == (MF_MEDIATYPE_EQUAL_MAJOR_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_DATA - | MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA), "Unexpected flags %#x.\n", flags); + | MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA), "Unexpected flags %#lx.\n", flags);
/* Different user data. */ hr = IMFMediaType_SetBlob(mediatype, &MF_MT_USER_DATA, (const UINT8 *)&flags, sizeof(flags)); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
flags = 0; hr = IMFMediaType_IsEqual(mediatype, mediatype2, &flags); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); ok(flags == (MF_MEDIATYPE_EQUAL_MAJOR_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_DATA), - "Unexpected flags %#x.\n", flags); + "Unexpected flags %#lx.\n", flags);
hr = IMFMediaType_DeleteItem(mediatype, &MF_MT_USER_DATA); - ok(hr == S_OK, "Failed to delete item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to delete item, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_SUBTYPE, &MFVideoFormat_RGB32); - ok(hr == S_OK, "Failed to set subtype, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set subtype, hr %#lx.\n", hr);
flags = 0; hr = IMFMediaType_IsEqual(mediatype, mediatype2, &flags); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); ok(flags == (MF_MEDIATYPE_EQUAL_MAJOR_TYPES | MF_MEDIATYPE_EQUAL_FORMAT_DATA | MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA), - "Unexpected flags %#x.\n", flags); + "Unexpected flags %#lx.\n", flags);
IMFMediaType_Release(mediatype2); IMFMediaType_Release(mediatype);
/* IMFVideoMediaType */ hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(mediatype, &IID_IMFVideoMediaType, FALSE);
hr = IMFMediaType_QueryInterface(mediatype, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk == (IUnknown *)mediatype, "Unexpected pointer.\n"); IUnknown_Release(unk);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set GUID value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set GUID value, hr %#lx.\n", hr);
hr = IMFMediaType_QueryInterface(mediatype, &IID_IMFVideoMediaType, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk2 == (IUnknown *)mediatype, "Unexpected pointer.\n"); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IMFAttributes, (void **)&unk2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk2 == (IUnknown *)mediatype, "Unexpected pointer.\n"); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IMFMediaType, (void **)&unk2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk2 == (IUnknown *)mediatype, "Unexpected pointer.\n"); IUnknown_Release(unk2);
@@ -1307,20 +1307,20 @@ if(0) if (pMFCreateVideoMediaTypeFromSubtype) { hr = pMFCreateVideoMediaTypeFromSubtype(&MFVideoFormat_RGB555, &video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(video_type, &IID_IMFMediaType, TRUE); check_interface(video_type, &IID_IMFVideoMediaType, TRUE);
/* Major and subtype are set on creation. */ hr = IMFVideoMediaType_GetCount(video_type, &count); - ok(count == 2, "Unexpected attribute count %#x.\n", hr); + ok(count == 2, "Unexpected attribute count %#lx.\n", hr);
hr = IMFVideoMediaType_DeleteAllItems(video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoMediaType_GetCount(video_type, &count); - ok(!count, "Unexpected attribute count %#x.\n", hr); + ok(!count, "Unexpected attribute count %#lx.\n", hr);
check_interface(video_type, &IID_IMFVideoMediaType, FALSE);
@@ -1331,33 +1331,33 @@ if(0)
/* IMFAudioMediaType */ hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(mediatype, &IID_IMFAudioMediaType, FALSE);
hr = IMFMediaType_QueryInterface(mediatype, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk == (IUnknown *)mediatype, "Unexpected pointer.\n"); IUnknown_Release(unk);
hr = IMFMediaType_SetGUID(mediatype, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set GUID value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set GUID value, hr %#lx.\n", hr);
hr = IMFMediaType_QueryInterface(mediatype, &IID_IMFAudioMediaType, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk2 == (IUnknown *)mediatype, "Unexpected pointer.\n"); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IMFAttributes, (void **)&unk2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk2 == (IUnknown *)mediatype, "Unexpected pointer.\n"); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IMFMediaType, (void **)&unk2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk2 == (IUnknown *)mediatype, "Unexpected pointer.\n"); IUnknown_Release(unk2);
@@ -1380,50 +1380,50 @@ static void test_MFCreateMediaEvent(void) value.vt = VT_UNKNOWN;
hr = MFCreateMediaEvent(MEError, &GUID_NULL, E_FAIL, &value, &mediaevent); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
PropVariantClear(&value);
hr = IMFMediaEvent_GetType(mediaevent, &type); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(type == MEError, "got %#x\n", type); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(type == MEError, "got %#lx\n", type);
hr = IMFMediaEvent_GetExtendedType(mediaevent, &extended_type); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&extended_type, &GUID_NULL), "got %s\n", wine_dbgstr_guid(&extended_type));
hr = IMFMediaEvent_GetStatus(mediaevent, &status); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(status == E_FAIL, "got 0x%08x\n", status); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(status == E_FAIL, "got 0x%08lx\n", status);
PropVariantInit(&value); hr = IMFMediaEvent_GetValue(mediaevent, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(value.vt == VT_UNKNOWN, "got %#x\n", value.vt); PropVariantClear(&value);
IMFMediaEvent_Release(mediaevent);
hr = MFCreateMediaEvent(MEUnknown, &DUMMY_GUID1, S_OK, NULL, &mediaevent); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFMediaEvent_GetType(mediaevent, &type); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(type == MEUnknown, "got %#x\n", type); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(type == MEUnknown, "got %#lx\n", type);
hr = IMFMediaEvent_GetExtendedType(mediaevent, &extended_type); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(IsEqualGUID(&extended_type, &DUMMY_GUID1), "got %s\n", wine_dbgstr_guid(&extended_type));
hr = IMFMediaEvent_GetStatus(mediaevent, &status); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(status == S_OK, "got 0x%08x\n", status); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(status == S_OK, "got 0x%08lx\n", status);
PropVariantInit(&value); hr = IMFMediaEvent_GetValue(mediaevent, &value); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(value.vt == VT_EMPTY, "got %#x\n", value.vt); PropVariantClear(&value);
@@ -1435,7 +1435,7 @@ static void check_attr_count(IMFAttributes* obj, UINT32 expected, int line) { UINT32 count = expected + 1; HRESULT hr = IMFAttributes_GetCount(obj, &count); - ok_(__FILE__, line)(hr == S_OK, "Failed to get attributes count, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get attributes count, hr %#lx.\n", hr); ok_(__FILE__, line)(count == expected, "Unexpected count %u, expected %u.\n", count, expected); }
@@ -1446,7 +1446,7 @@ static void check_attr_type(IMFAttributes *obj, const GUID *key, MF_ATTRIBUTE_TY HRESULT hr;
hr = IMFAttributes_GetItemType(obj, key, &type); - ok_(__FILE__, line)(hr == S_OK, "Failed to get item type, hr %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "Failed to get item type, hr %#lx.\n", hr); ok_(__FILE__, line)(type == expected, "Unexpected item type %d, expected %d.\n", type, expected); }
@@ -1470,71 +1470,71 @@ static void test_attributes(void) GUID key;
hr = MFCreateAttributes( &attributes, 3 ); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFAttributes_GetItemType(attributes, &GUID_NULL, &type); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
CHECK_ATTR_COUNT(attributes, 0); hr = IMFAttributes_SetUINT32(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 123); - ok(hr == S_OK, "Failed to set UINT32 value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set UINT32 value, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 1); CHECK_ATTR_TYPE(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, MF_ATTRIBUTE_UINT32);
value = 0xdeadbeef; hr = IMFAttributes_GetUINT32(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, &value); - ok(hr == S_OK, "Failed to get UINT32 value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get UINT32 value, hr %#lx.\n", hr); ok(value == 123, "Unexpected value %u, expected: 123.\n", value);
value64 = 0xdeadbeef; hr = IMFAttributes_GetUINT64(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, &value64); - ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#lx.\n", hr); ok(value64 == 0xdeadbeef, "Unexpected value.\n");
hr = IMFAttributes_SetUINT64(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 65536); - ok(hr == S_OK, "Failed to set UINT64 value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set UINT64 value, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 1); CHECK_ATTR_TYPE(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, MF_ATTRIBUTE_UINT64);
hr = IMFAttributes_GetUINT64(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, &value64); - ok(hr == S_OK, "Failed to get UINT64 value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get UINT64 value, hr %#lx.\n", hr); ok(value64 == 65536, "Unexpected value.\n");
value = 0xdeadbeef; hr = IMFAttributes_GetUINT32(attributes, &MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, &value); - ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#lx.\n", hr); ok(value == 0xdeadbeef, "Unexpected value.\n");
IMFAttributes_Release(attributes);
hr = MFCreateAttributes(&attributes, 0); - ok(hr == S_OK, "Failed to create attributes object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create attributes object, hr %#lx.\n", hr);
PropVariantInit(&propvar); propvar.vt = MF_ATTRIBUTE_UINT32; U(propvar).ulVal = 123; hr = IMFAttributes_SetItem(attributes, &DUMMY_GUID1, &propvar); - ok(hr == S_OK, "Failed to set item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set item, hr %#lx.\n", hr); PropVariantInit(&ret_propvar); ret_propvar.vt = MF_ATTRIBUTE_UINT32; U(ret_propvar).ulVal = 0xdeadbeef; hr = IMFAttributes_GetItem(attributes, &DUMMY_GUID1, &ret_propvar); - ok(hr == S_OK, "Failed to get item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item, hr %#lx.\n", hr); ok(!PropVariantCompareEx(&propvar, &ret_propvar, 0, 0), "Unexpected item value.\n"); PropVariantClear(&ret_propvar); CHECK_ATTR_COUNT(attributes, 1);
hr = IMFAttributes_GetItem(attributes, &DUMMY_GUID1, NULL); - ok(hr == S_OK, "Item check failed, hr %#x.\n", hr); + ok(hr == S_OK, "Item check failed, hr %#lx.\n", hr);
hr = IMFAttributes_GetItem(attributes, &DUMMY_GUID2, NULL); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
PropVariantInit(&ret_propvar); ret_propvar.vt = MF_ATTRIBUTE_STRING; U(ret_propvar).pwszVal = NULL; hr = IMFAttributes_GetItem(attributes, &DUMMY_GUID1, &ret_propvar); - ok(hr == S_OK, "Failed to get item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item, hr %#lx.\n", hr); ok(!PropVariantCompareEx(&propvar, &ret_propvar, 0, 0), "Unexpected item value.\n"); PropVariantClear(&ret_propvar);
@@ -1544,12 +1544,12 @@ static void test_attributes(void) propvar.vt = MF_ATTRIBUTE_UINT64; U(propvar).uhVal.QuadPart = 65536; hr = IMFAttributes_SetItem(attributes, &DUMMY_GUID1, &propvar); - ok(hr == S_OK, "Failed to set item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set item, hr %#lx.\n", hr); PropVariantInit(&ret_propvar); ret_propvar.vt = MF_ATTRIBUTE_UINT32; U(ret_propvar).ulVal = 0xdeadbeef; hr = IMFAttributes_GetItem(attributes, &DUMMY_GUID1, &ret_propvar); - ok(hr == S_OK, "Failed to get item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item, hr %#lx.\n", hr); ok(!PropVariantCompareEx(&propvar, &ret_propvar, 0, 0), "Unexpected item value.\n"); PropVariantClear(&ret_propvar); PropVariantClear(&propvar); @@ -1559,12 +1559,12 @@ static void test_attributes(void) propvar.vt = VT_I4; U(propvar).lVal = 123; hr = IMFAttributes_SetItem(attributes, &DUMMY_GUID2, &propvar); - ok(hr == MF_E_INVALIDTYPE, "Failed to set item, hr %#x.\n", hr); + ok(hr == MF_E_INVALIDTYPE, "Failed to set item, hr %#lx.\n", hr); PropVariantInit(&ret_propvar); ret_propvar.vt = MF_ATTRIBUTE_UINT32; U(ret_propvar).lVal = 0xdeadbeef; hr = IMFAttributes_GetItem(attributes, &DUMMY_GUID2, &ret_propvar); - ok(hr == S_OK, "Failed to get item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item, hr %#lx.\n", hr); PropVariantClear(&propvar); ok(!PropVariantCompareEx(&propvar, &ret_propvar, 0, 0), "Unexpected item value.\n"); PropVariantClear(&ret_propvar); @@ -1573,18 +1573,18 @@ static void test_attributes(void) propvar.vt = MF_ATTRIBUTE_UINT32; U(propvar).ulVal = 123; hr = IMFAttributes_SetItem(attributes, &DUMMY_GUID3, &propvar); - ok(hr == S_OK, "Failed to set item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set item, hr %#lx.\n", hr);
hr = IMFAttributes_DeleteItem(attributes, &DUMMY_GUID2); - ok(hr == S_OK, "Failed to delete item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to delete item, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 2);
hr = IMFAttributes_DeleteItem(attributes, &DUMMY_GUID2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 2);
hr = IMFAttributes_GetItem(attributes, &DUMMY_GUID3, &ret_propvar); - ok(hr == S_OK, "Failed to get item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item, hr %#lx.\n", hr); ok(!PropVariantCompareEx(&propvar, &ret_propvar, 0, 0), "Unexpected item value.\n"); PropVariantClear(&ret_propvar); PropVariantClear(&propvar); @@ -1593,358 +1593,358 @@ static void test_attributes(void) U(propvar).uhVal.QuadPart = 65536;
hr = IMFAttributes_GetItem(attributes, &DUMMY_GUID1, &ret_propvar); - ok(hr == S_OK, "Failed to get item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item, hr %#lx.\n", hr); ok(!PropVariantCompareEx(&propvar, &ret_propvar, 0, 0), "Unexpected item value.\n"); PropVariantClear(&ret_propvar); PropVariantClear(&propvar);
/* Item ordering is not consistent across Windows version. */ hr = IMFAttributes_GetItemByIndex(attributes, 0, &key, &ret_propvar); - ok(hr == S_OK, "Failed to get item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item, hr %#lx.\n", hr); PropVariantClear(&ret_propvar);
hr = IMFAttributes_GetItemByIndex(attributes, 100, &key, &ret_propvar); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); PropVariantClear(&ret_propvar);
hr = IMFAttributes_SetDouble(attributes, &GUID_NULL, 22.0); - ok(hr == S_OK, "Failed to set double value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set double value, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 3); CHECK_ATTR_TYPE(attributes, &GUID_NULL, MF_ATTRIBUTE_DOUBLE);
double_value = 0xdeadbeef; hr = IMFAttributes_GetDouble(attributes, &GUID_NULL, &double_value); - ok(hr == S_OK, "Failed to get double value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get double value, hr %#lx.\n", hr); ok(double_value == 22.0, "Unexpected value: %f, expected: 22.0.\n", double_value);
propvar.vt = MF_ATTRIBUTE_UINT64; U(propvar).uhVal.QuadPart = 22; hr = IMFAttributes_CompareItem(attributes, &GUID_NULL, &propvar, &result); - ok(hr == S_OK, "Failed to compare items, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare items, hr %#lx.\n", hr); ok(!result, "Unexpected result.\n");
propvar.vt = MF_ATTRIBUTE_DOUBLE; U(propvar).dblVal = 22.0; hr = IMFAttributes_CompareItem(attributes, &GUID_NULL, &propvar, &result); - ok(hr == S_OK, "Failed to compare items, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare items, hr %#lx.\n", hr); ok(result, "Unexpected result.\n");
hr = IMFAttributes_SetString(attributes, &DUMMY_GUID1, stringW); - ok(hr == S_OK, "Failed to set string attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set string attribute, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 3); CHECK_ATTR_TYPE(attributes, &DUMMY_GUID1, MF_ATTRIBUTE_STRING);
hr = IMFAttributes_GetStringLength(attributes, &DUMMY_GUID1, &string_length); - ok(hr == S_OK, "Failed to get string length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get string length, hr %#lx.\n", hr); ok(string_length == lstrlenW(stringW), "Unexpected length %u.\n", string_length);
string_length = 0xdeadbeef; hr = IMFAttributes_GetAllocatedString(attributes, &DUMMY_GUID1, &string, &string_length); - ok(hr == S_OK, "Failed to get allocated string, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get allocated string, hr %#lx.\n", hr); ok(!lstrcmpW(string, stringW), "Unexpected string %s.\n", wine_dbgstr_w(string)); ok(string_length == lstrlenW(stringW), "Unexpected length %u.\n", string_length); CoTaskMemFree(string);
string_length = 0xdeadbeef; hr = IMFAttributes_GetString(attributes, &DUMMY_GUID1, bufferW, ARRAY_SIZE(bufferW), &string_length); - ok(hr == S_OK, "Failed to get string value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get string value, hr %#lx.\n", hr); ok(!lstrcmpW(bufferW, stringW), "Unexpected string %s.\n", wine_dbgstr_w(bufferW)); ok(string_length == lstrlenW(stringW), "Unexpected length %u.\n", string_length); memset(bufferW, 0, sizeof(bufferW));
hr = IMFAttributes_GetString(attributes, &DUMMY_GUID1, bufferW, ARRAY_SIZE(bufferW), NULL); - ok(hr == S_OK, "Failed to get string value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get string value, hr %#lx.\n", hr); ok(!lstrcmpW(bufferW, stringW), "Unexpected string %s.\n", wine_dbgstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW));
string_length = 0; hr = IMFAttributes_GetString(attributes, &DUMMY_GUID1, bufferW, 1, &string_length); - ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr); ok(!bufferW[0], "Unexpected string %s.\n", wine_dbgstr_w(bufferW)); ok(string_length, "Unexpected length.\n");
string_length = 0xdeadbeef; hr = IMFAttributes_GetStringLength(attributes, &GUID_NULL, &string_length); - ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#lx.\n", hr); ok(string_length == 0xdeadbeef, "Unexpected length %u.\n", string_length);
/* VT_UNKNOWN */ hr = IMFAttributes_SetUnknown(attributes, &DUMMY_GUID2, (IUnknown *)attributes); - ok(hr == S_OK, "Failed to set value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set value, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 4); CHECK_ATTR_TYPE(attributes, &DUMMY_GUID2, MF_ATTRIBUTE_IUNKNOWN);
hr = IMFAttributes_GetUnknown(attributes, &DUMMY_GUID2, &IID_IUnknown, (void **)&unk_value); - ok(hr == S_OK, "Failed to get value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get value, hr %#lx.\n", hr); IUnknown_Release(unk_value);
hr = IMFAttributes_GetUnknown(attributes, &DUMMY_GUID2, &IID_IMFAttributes, (void **)&unk_value); - ok(hr == S_OK, "Failed to get value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get value, hr %#lx.\n", hr); IUnknown_Release(unk_value);
hr = IMFAttributes_GetUnknown(attributes, &DUMMY_GUID2, &IID_IStream, (void **)&unk_value); - ok(hr == E_NOINTERFACE, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_SetUnknown(attributes, &DUMMY_CLSID, NULL); - ok(hr == S_OK, "Failed to set value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set value, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 5);
unk_value = NULL; hr = IMFAttributes_GetUnknown(attributes, &DUMMY_CLSID, &IID_IUnknown, (void **)&unk_value); - ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDTYPE, "Unexpected hr %#lx.\n", hr);
/* CopyAllItems() */ hr = MFCreateAttributes(&attributes1, 0); - ok(hr == S_OK, "Failed to create attributes object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create attributes object, hr %#lx.\n", hr); hr = IMFAttributes_CopyAllItems(attributes, attributes1); - ok(hr == S_OK, "Failed to copy items, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy items, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 5); CHECK_ATTR_COUNT(attributes1, 5);
hr = IMFAttributes_DeleteAllItems(attributes1); - ok(hr == S_OK, "Failed to delete items, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to delete items, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes1, 0);
propvar.vt = MF_ATTRIBUTE_UINT64; U(propvar).uhVal.QuadPart = 22; hr = IMFAttributes_CompareItem(attributes, &GUID_NULL, &propvar, &result); - ok(hr == S_OK, "Failed to compare items, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare items, hr %#lx.\n", hr); ok(!result, "Unexpected result.\n");
hr = IMFAttributes_CopyAllItems(attributes1, attributes); - ok(hr == S_OK, "Failed to copy items, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy items, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 0);
/* Blob */ hr = IMFAttributes_SetBlob(attributes, &DUMMY_GUID1, blob, sizeof(blob)); - ok(hr == S_OK, "Failed to set blob attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set blob attribute, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 1); CHECK_ATTR_TYPE(attributes, &DUMMY_GUID1, MF_ATTRIBUTE_BLOB); hr = IMFAttributes_GetBlobSize(attributes, &DUMMY_GUID1, &size); - ok(hr == S_OK, "Failed to get blob size, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get blob size, hr %#lx.\n", hr); ok(size == sizeof(blob), "Unexpected blob size %u.\n", size);
hr = IMFAttributes_GetBlobSize(attributes, &DUMMY_GUID2, &size); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
size = 0; hr = IMFAttributes_GetBlob(attributes, &DUMMY_GUID1, blob_value, sizeof(blob_value), &size); - ok(hr == S_OK, "Failed to get blob, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get blob, hr %#lx.\n", hr); ok(size == sizeof(blob), "Unexpected blob size %u.\n", size); ok(!memcmp(blob_value, blob, size), "Unexpected blob.\n");
hr = IMFAttributes_GetBlob(attributes, &DUMMY_GUID2, blob_value, sizeof(blob_value), &size); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
memset(blob_value, 0, sizeof(blob_value)); size = 0; hr = IMFAttributes_GetAllocatedBlob(attributes, &DUMMY_GUID1, &blob_buf, &size); - ok(hr == S_OK, "Failed to get allocated blob, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get allocated blob, hr %#lx.\n", hr); ok(size == sizeof(blob), "Unexpected blob size %u.\n", size); ok(!memcmp(blob_buf, blob, size), "Unexpected blob.\n"); CoTaskMemFree(blob_buf);
hr = IMFAttributes_GetAllocatedBlob(attributes, &DUMMY_GUID2, &blob_buf, &size); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_GetBlob(attributes, &DUMMY_GUID1, blob_value, sizeof(blob) - 1, NULL); - ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOT_SUFFICIENT_BUFFER, "Unexpected hr %#lx.\n", hr);
IMFAttributes_Release(attributes); IMFAttributes_Release(attributes1);
/* Compare() */ hr = MFCreateAttributes(&attributes, 0); - ok(hr == S_OK, "Failed to create attributes object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create attributes object, hr %#lx.\n", hr); hr = MFCreateAttributes(&attributes1, 0); - ok(hr == S_OK, "Failed to create attributes object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create attributes object, hr %#lx.\n", hr);
hr = IMFAttributes_Compare(attributes, attributes, MF_ATTRIBUTES_MATCH_SMALLER + 1, &result); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
for (match_type = MF_ATTRIBUTES_MATCH_OUR_ITEMS; match_type <= MF_ATTRIBUTES_MATCH_SMALLER; ++match_type) { result = FALSE; hr = IMFAttributes_Compare(attributes, attributes, match_type, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, match_type, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result); }
hr = IMFAttributes_SetUINT32(attributes, &DUMMY_GUID1, 1); - ok(hr == S_OK, "Failed to set value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set value, hr %#lx.\n", hr);
result = TRUE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_ALL_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_INTERSECTION, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_SMALLER, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
hr = IMFAttributes_SetUINT32(attributes1, &DUMMY_GUID1, 2); - ok(hr == S_OK, "Failed to set value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set value, hr %#lx.\n", hr);
result = TRUE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_ALL_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_THEIR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_INTERSECTION, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_SMALLER, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_ALL_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_THEIR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_INTERSECTION, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_SMALLER, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
hr = IMFAttributes_SetUINT32(attributes1, &DUMMY_GUID1, 1); - ok(hr == S_OK, "Failed to set value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set value, hr %#lx.\n", hr);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_ALL_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_THEIR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_INTERSECTION, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_SMALLER, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_ALL_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_THEIR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_INTERSECTION, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_SMALLER, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
hr = IMFAttributes_SetUINT32(attributes1, &DUMMY_GUID2, 2); - ok(hr == S_OK, "Failed to set value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set value, hr %#lx.\n", hr);
result = TRUE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_ALL_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_THEIR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_INTERSECTION, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes, attributes1, MF_ATTRIBUTES_MATCH_SMALLER, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_ALL_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_THEIR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = TRUE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_OUR_ITEMS, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(!result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_INTERSECTION, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
result = FALSE; hr = IMFAttributes_Compare(attributes1, attributes, MF_ATTRIBUTES_MATCH_SMALLER, &result); - ok(hr == S_OK, "Failed to compare, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to compare, hr %#lx.\n", hr); ok(result, "Unexpected result %d.\n", result);
IMFAttributes_Release(attributes); @@ -1970,34 +1970,34 @@ static void test_MFCreateMFByteStreamOnStream(void) }
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
caps = 0xffff0000; hr = IStream_Write(stream, &caps, sizeof(caps), &written); - ok(hr == S_OK, "Failed to write, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to write, hr %#lx.\n", hr);
hr = pMFCreateMFByteStreamOnStream(stream, &bytestream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFByteStream_QueryInterface(bytestream, &IID_IUnknown, (void **)&unknown); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok((void *)unknown == (void *)bytestream, "got %p\n", unknown); ref = IUnknown_Release(unknown); - ok(ref == 1, "got %u\n", ref); + ok(ref == 1, "got %lu\n", ref);
hr = IUnknown_QueryInterface(unknown, &IID_IMFByteStream, (void **)&bytestream2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(bytestream2 == bytestream, "got %p\n", bytestream2); ref = IMFByteStream_Release(bytestream2); - ok(ref == 1, "got %u\n", ref); + ok(ref == 1, "got %lu\n", ref);
hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFAttributes, (void **)&attributes); ok(hr == S_OK || /* w7pro64 */ - broken(hr == E_NOINTERFACE), "got 0x%08x\n", hr); + broken(hr == E_NOINTERFACE), "got 0x%08lx\n", hr);
if (hr != S_OK) { @@ -2009,22 +2009,22 @@ static void test_MFCreateMFByteStreamOnStream(void)
ok(attributes != NULL, "got NULL\n"); hr = IMFAttributes_GetCount(attributes, &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 == 0, "Unexpected attributes count %u.\n", count);
hr = IMFAttributes_QueryInterface(attributes, &IID_IUnknown, (void **)&unknown); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok((void *)unknown == (void *)bytestream, "got %p\n", unknown); ref = IUnknown_Release(unknown); - ok(ref == 2, "got %u\n", ref); + ok(ref == 2, "got %lu\n", ref);
hr = IMFAttributes_QueryInterface(attributes, &IID_IMFByteStream, (void **)&bytestream2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(bytestream2 == bytestream, "got %p\n", bytestream2); ref = IMFByteStream_Release(bytestream2); - ok(ref == 2, "got %u\n", ref); + ok(ref == 2, "got %lu\n", ref);
check_interface(bytestream, &IID_IMFByteStreamBuffering, FALSE); check_interface(bytestream, &IID_IMFByteStreamCacheControl, FALSE); @@ -2032,22 +2032,22 @@ static void test_MFCreateMFByteStreamOnStream(void) check_interface(bytestream, &IID_IMFGetService, FALSE);
hr = IMFByteStream_GetCapabilities(bytestream, &caps); - ok(hr == S_OK, "Failed to get stream capabilities, hr %#x.\n", hr); - ok(caps == (MFBYTESTREAM_IS_READABLE | MFBYTESTREAM_IS_SEEKABLE), "Unexpected caps %#x.\n", caps); + ok(hr == S_OK, "Failed to get stream capabilities, hr %#lx.\n", hr); + ok(caps == (MFBYTESTREAM_IS_READABLE | MFBYTESTREAM_IS_SEEKABLE), "Unexpected caps %#lx.\n", caps);
hr = IMFByteStream_Close(bytestream); - ok(hr == S_OK, "Failed to close, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to close, hr %#lx.\n", hr);
hr = IMFByteStream_Close(bytestream); - ok(hr == S_OK, "Failed to close, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to close, hr %#lx.\n", hr);
hr = IMFByteStream_GetCapabilities(bytestream, &caps); - ok(hr == S_OK, "Failed to get stream capabilities, hr %#x.\n", hr); - ok(caps == (MFBYTESTREAM_IS_READABLE | MFBYTESTREAM_IS_SEEKABLE), "Unexpected caps %#x.\n", caps); + ok(hr == S_OK, "Failed to get stream capabilities, hr %#lx.\n", hr); + ok(caps == (MFBYTESTREAM_IS_READABLE | MFBYTESTREAM_IS_SEEKABLE), "Unexpected caps %#lx.\n", caps);
caps = 0; hr = IMFByteStream_Read(bytestream, (BYTE *)&caps, sizeof(caps), &size); - ok(hr == S_OK, "Failed to read from stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to read from stream, hr %#lx.\n", hr); ok(caps == 0xffff0000, "Unexpected content.\n");
IMFAttributes_Release(attributes); @@ -2073,11 +2073,11 @@ static void test_file_stream(void) filename = load_resource(L"test.mp4");
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, filename, &bytestream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
check_interface(bytestream, &IID_IMFByteStreamBuffering, FALSE); check_interface(bytestream, &IID_IMFByteStreamCacheControl, FALSE); @@ -2085,108 +2085,108 @@ static void test_file_stream(void) check_interface(bytestream, &IID_IMFGetService, TRUE);
hr = IMFByteStream_GetCapabilities(bytestream, &caps); - ok(hr == S_OK, "Failed to get stream capabilities, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream capabilities, hr %#lx.\n", hr); if (is_win8_plus) { ok(caps == (MFBYTESTREAM_IS_READABLE | MFBYTESTREAM_IS_SEEKABLE | MFBYTESTREAM_DOES_NOT_USE_NETWORK), - "Unexpected caps %#x.\n", caps); + "Unexpected caps %#lx.\n", caps); } else - ok(caps == (MFBYTESTREAM_IS_READABLE | MFBYTESTREAM_IS_SEEKABLE), "Unexpected caps %#x.\n", caps); + ok(caps == (MFBYTESTREAM_IS_READABLE | MFBYTESTREAM_IS_SEEKABLE), "Unexpected caps %#lx.\n", caps);
hr = IMFByteStream_QueryInterface(bytestream, &IID_IMFAttributes, (void **)&attributes); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(attributes != NULL, "got NULL\n");
hr = IMFAttributes_GetCount(attributes, &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 attributes count %u.\n", count);
/* Original file name. */ hr = IMFAttributes_GetAllocatedString(attributes, &MF_BYTESTREAM_ORIGIN_NAME, &str, &count); - 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(!lstrcmpW(str, filename), "Unexpected name %s.\n", wine_dbgstr_w(str)); CoTaskMemFree(str);
/* Modification time. */ hr = IMFAttributes_GetItemType(attributes, &MF_BYTESTREAM_LAST_MODIFIED_TIME, &item_type); - ok(hr == S_OK, "Failed to get item type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item type, hr %#lx.\n", hr); ok(item_type == MF_ATTRIBUTE_BLOB, "Unexpected item type.\n");
IMFAttributes_Release(attributes);
/* Length. */ hr = IMFByteStream_GetLength(bytestream, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
bytestream_length = 0; hr = IMFByteStream_GetLength(bytestream, &bytestream_length); - ok(hr == S_OK, "Failed to get bytestream length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get bytestream length, hr %#lx.\n", hr); ok(bytestream_length > 0, "Unexpected bytestream length %s.\n", wine_dbgstr_longlong(bytestream_length));
hr = IMFByteStream_SetCurrentPosition(bytestream, bytestream_length); - ok(hr == S_OK, "Failed to set bytestream position, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set bytestream position, hr %#lx.\n", hr);
hr = IMFByteStream_IsEndOfStream(bytestream, &eos); - ok(hr == S_OK, "Failed query end of stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed query end of stream, hr %#lx.\n", hr); ok(eos == TRUE, "Unexpected IsEndOfStream result, %u.\n", eos);
hr = IMFByteStream_SetCurrentPosition(bytestream, 2 * bytestream_length); - ok(hr == S_OK, "Failed to set bytestream position, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set bytestream position, hr %#lx.\n", hr);
hr = IMFByteStream_GetCurrentPosition(bytestream, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFByteStream_GetCurrentPosition(bytestream, &position); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(position == 2 * bytestream_length, "Unexpected position.\n");
hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, filename, &bytestream2); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); IMFByteStream_Release(bytestream2);
hr = MFCreateFile(MF_ACCESSMODE_WRITE, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, filename, &bytestream2); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#lx.\n", hr);
hr = MFCreateFile(MF_ACCESSMODE_READWRITE, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, filename, &bytestream2); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#lx.\n", hr);
IMFByteStream_Release(bytestream);
hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, newfilename, &bytestream); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08lx\n", hr);
hr = MFCreateFile(MF_ACCESSMODE_WRITE, MF_OPENMODE_FAIL_IF_EXIST, MF_FILEFLAGS_NONE, filename, &bytestream); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "got 0x%08x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_EXISTS), "got 0x%08lx\n", hr);
hr = MFCreateFile(MF_ACCESSMODE_WRITE, MF_OPENMODE_FAIL_IF_EXIST, MF_FILEFLAGS_NONE, newfilename, &bytestream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, newfilename, &bytestream2); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#lx.\n", hr);
hr = MFCreateFile(MF_ACCESSMODE_WRITE, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, newfilename, &bytestream2); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#lx.\n", hr);
hr = MFCreateFile(MF_ACCESSMODE_WRITE, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_ALLOW_WRITE_SHARING, newfilename, &bytestream2); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#lx.\n", hr);
IMFByteStream_Release(bytestream);
hr = MFCreateFile(MF_ACCESSMODE_WRITE, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_ALLOW_WRITE_SHARING, newfilename, &bytestream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Opening the file again fails even though MF_FILEFLAGS_ALLOW_WRITE_SHARING is set. */ hr = MFCreateFile(MF_ACCESSMODE_WRITE, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_ALLOW_WRITE_SHARING, newfilename, &bytestream2); - ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_SHARING_VIOLATION), "Unexpected hr %#lx.\n", hr);
IMFByteStream_Release(bytestream);
@@ -2194,15 +2194,15 @@ static void test_file_stream(void) lstrcpyW(pathW, fileschemeW); lstrcatW(pathW, filename); hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, pathW, &bytestream); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = MFCreateFile(MF_ACCESSMODE_READ, MF_OPENMODE_FAIL_IF_NOT_EXIST, MF_FILEFLAGS_NONE, filename, &bytestream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(DeleteFileW(filename), "failed to delete file\n"); IMFByteStream_Release(bytestream);
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);
DeleteFileW(newfilename); } @@ -2215,113 +2215,113 @@ static void test_system_memory_buffer(void) BYTE *data, *data2;
hr = MFCreateMemoryBuffer(1024, NULL); - ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08lx\n", hr);
hr = MFCreateMemoryBuffer(0, &buffer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if(buffer) { hr = IMFMediaBuffer_GetMaxLength(buffer, &length); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(length == 0, "got %u\n", length); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(length == 0, "got %lu\n", length);
IMFMediaBuffer_Release(buffer); }
hr = MFCreateMemoryBuffer(1024, &buffer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
check_interface(buffer, &IID_IMFGetService, FALSE);
hr = IMFMediaBuffer_GetMaxLength(buffer, NULL); - ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08lx\n", hr);
hr = IMFMediaBuffer_GetMaxLength(buffer, &length); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(length == 1024, "got %u\n", length); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(length == 1024, "got %lu\n", length);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 1025); - ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG, "got 0x%08lx\n", hr);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 10); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, NULL); - ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08x\n", hr); + ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08lx\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(length == 10, "got %u\n", length); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(length == 10, "got %lu\n", length);
length = 0; max = 0; hr = IMFMediaBuffer_Lock(buffer, NULL, &length, &max); - ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08x\n", hr); - ok(length == 0, "got %u\n", length); - ok(max == 0, "got %u\n", length); + ok(hr == E_INVALIDARG || hr == E_POINTER, "got 0x%08lx\n", hr); + ok(length == 0, "got %lu\n", length); + ok(max == 0, "got %lu\n", length);
hr = IMFMediaBuffer_Lock(buffer, &data, &max, &length); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(length == 10, "got %u\n", length); - ok(max == 1024, "got %u\n", max); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(length == 10, "got %lu\n", length); + ok(max == 1024, "got %lu\n", max);
/* Attempt to lock the buffer twice */ hr = IMFMediaBuffer_Lock(buffer, &data2, &max, &length); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(data == data2, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(data == data2, "got 0x%08lx\n", hr);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
/* Extra Unlock */ hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IMFMediaBuffer_Release(buffer);
/* Aligned buffer. */ hr = MFCreateAlignedMemoryBuffer(16, MF_8_BYTE_ALIGNMENT, NULL); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = MFCreateAlignedMemoryBuffer(201, MF_8_BYTE_ALIGNMENT, &buffer); - ok(hr == S_OK, "Failed to create memory buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create memory buffer, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length); - ok(hr == S_OK, "Failed to get current length, hr %#x.\n", hr); - ok(length == 0, "Unexpected current length %u.\n", length); + ok(hr == S_OK, "Failed to get current length, hr %#lx.\n", hr); + ok(length == 0, "Unexpected current length %lu.\n", length);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 1); - ok(hr == S_OK, "Failed to set current length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current length, hr %#lx.\n", hr); hr = IMFMediaBuffer_GetCurrentLength(buffer, &length); - ok(hr == S_OK, "Failed to get current length, hr %#x.\n", hr); - ok(length == 1, "Unexpected current length %u.\n", length); + ok(hr == S_OK, "Failed to get current length, hr %#lx.\n", hr); + ok(length == 1, "Unexpected current length %lu.\n", length);
hr = IMFMediaBuffer_GetMaxLength(buffer, &length); - ok(hr == S_OK, "Failed to get max length, hr %#x.\n", hr); - ok(length == 201, "Unexpected max length %u.\n", length); + ok(hr == S_OK, "Failed to get max length, hr %#lx.\n", hr); + ok(length == 201, "Unexpected max length %lu.\n", length);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 202); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); hr = IMFMediaBuffer_GetMaxLength(buffer, &length); - ok(hr == S_OK, "Failed to get max length, hr %#x.\n", hr); - ok(length == 201, "Unexpected max length %u.\n", length); + ok(hr == S_OK, "Failed to get max length, hr %#lx.\n", hr); + ok(length == 201, "Unexpected max length %lu.\n", length); hr = IMFMediaBuffer_SetCurrentLength(buffer, 10); - ok(hr == S_OK, "Failed to set current length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current length, hr %#lx.\n", hr);
hr = IMFMediaBuffer_Lock(buffer, &data, &max, &length); - ok(hr == S_OK, "Failed to lock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock, hr %#lx.\n", hr); ok(max == 201 && length == 10, "Unexpected length.\n"); hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Failed to unlock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock, hr %#lx.\n", hr);
IMFMediaBuffer_Release(buffer); } @@ -2338,101 +2338,101 @@ static void test_sample(void) BYTE *data;
hr = MFCreateSample( &sample ); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IMFSample_QueryInterface(sample, &IID_IMFAttributes, (void **)&attributes); - ok(hr == S_OK, "Failed to get attributes interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get attributes interface, hr %#lx.\n", hr);
CHECK_ATTR_COUNT(attributes, 0);
hr = IMFSample_GetBufferCount(sample, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetBufferCount(sample, &count); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(count == 0, "got %d\n", count); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(count == 0, "got %ld\n", count);
hr = IMFSample_GetSampleFlags(sample, &flags); - ok(hr == S_OK, "Failed to get sample flags, hr %#x.\n", hr); - ok(!flags, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get sample flags, hr %#lx.\n", hr); + ok(!flags, "Unexpected flags %#lx.\n", flags);
hr = IMFSample_SetSampleFlags(sample, 0x123); - ok(hr == S_OK, "Failed to set sample flags, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set sample flags, hr %#lx.\n", hr); hr = IMFSample_GetSampleFlags(sample, &flags); - ok(hr == S_OK, "Failed to get sample flags, hr %#x.\n", hr); - ok(flags == 0x123, "Unexpected flags %#x.\n", flags); + ok(hr == S_OK, "Failed to get sample flags, hr %#lx.\n", hr); + ok(flags == 0x123, "Unexpected flags %#lx.\n", flags);
hr = IMFSample_GetSampleTime(sample, &time); - ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_SAMPLE_TIMESTAMP, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetSampleDuration(sample, &time); - ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NO_SAMPLE_DURATION, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_RemoveBufferByIndex(sample, 0); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_RemoveAllBuffers(sample); - ok(hr == S_OK, "Failed to remove all, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to remove all, hr %#lx.\n", hr);
hr = IMFSample_GetTotalLength(sample, &length); - ok(hr == S_OK, "Failed to get total length, hr %#x.\n", hr); - ok(!length, "Unexpected total length %u.\n", length); + ok(hr == S_OK, "Failed to get total length, hr %#lx.\n", hr); + ok(!length, "Unexpected total length %lu.\n", length);
hr = MFCreateMemoryBuffer(16, &buffer); - ok(hr == S_OK, "Failed to create buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create buffer, hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(sample, buffer); - ok(hr == S_OK, "Failed to add buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add buffer, hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(sample, buffer); - ok(hr == S_OK, "Failed to add buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add buffer, hr %#lx.\n", hr);
hr = IMFSample_GetBufferCount(sample, &count); - ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr); - ok(count == 2, "Unexpected buffer count %u.\n", count); + ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr); + ok(count == 2, "Unexpected buffer count %lu.\n", count);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer2); - ok(hr == S_OK, "Failed to get buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get buffer, hr %#lx.\n", hr); ok(buffer2 == buffer, "Unexpected object.\n"); IMFMediaBuffer_Release(buffer2);
hr = IMFSample_GetTotalLength(sample, &length); - ok(hr == S_OK, "Failed to get total length, hr %#x.\n", hr); - ok(!length, "Unexpected total length %u.\n", length); + ok(hr == S_OK, "Failed to get total length, hr %#lx.\n", hr); + ok(!length, "Unexpected total length %lu.\n", length);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 2); - ok(hr == S_OK, "Failed to set current length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current length, hr %#lx.\n", hr);
hr = IMFSample_GetTotalLength(sample, &length); - ok(hr == S_OK, "Failed to get total length, hr %#x.\n", hr); - ok(length == 4, "Unexpected total length %u.\n", length); + ok(hr == S_OK, "Failed to get total length, hr %#lx.\n", hr); + ok(length == 4, "Unexpected total length %lu.\n", length);
hr = IMFSample_RemoveBufferByIndex(sample, 1); - ok(hr == S_OK, "Failed to remove buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to remove buffer, hr %#lx.\n", hr);
hr = IMFSample_GetTotalLength(sample, &length); - ok(hr == S_OK, "Failed to get total length, hr %#x.\n", hr); - ok(length == 2, "Unexpected total length %u.\n", length); + ok(hr == S_OK, "Failed to get total length, hr %#lx.\n", hr); + ok(length == 2, "Unexpected total length %lu.\n", length);
IMFMediaBuffer_Release(buffer);
/* Duration */ hr = IMFSample_SetSampleDuration(sample, 10); - ok(hr == S_OK, "Failed to set duration, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set duration, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 0); hr = IMFSample_GetSampleDuration(sample, &time); - ok(hr == S_OK, "Failed to get sample duration, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sample duration, hr %#lx.\n", hr); ok(time == 10, "Unexpected duration.\n");
/* Timestamp */ hr = IMFSample_SetSampleTime(sample, 1); - ok(hr == S_OK, "Failed to set timestamp, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set timestamp, hr %#lx.\n", hr); CHECK_ATTR_COUNT(attributes, 0); hr = IMFSample_GetSampleTime(sample, &time); - ok(hr == S_OK, "Failed to get sample time, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sample time, hr %#lx.\n", hr); ok(time == 1, "Unexpected timestamp.\n");
IMFAttributes_Release(attributes); @@ -2440,165 +2440,165 @@ static void test_sample(void)
/* CopyToBuffer() */ 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 = MFCreateMemoryBuffer(16, &buffer2); - 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);
/* Sample with no buffers. */ hr = IMFMediaBuffer_SetCurrentLength(buffer2, 1); - ok(hr == S_OK, "Failed to set current length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current length, hr %#lx.\n", hr); hr = IMFSample_CopyToBuffer(sample, buffer2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = IMFMediaBuffer_GetCurrentLength(buffer2, &length); - ok(hr == S_OK, "Failed to get current length, hr %#x.\n", hr); - ok(!length, "Unexpected length %u.\n", length); + ok(hr == S_OK, "Failed to get current length, hr %#lx.\n", hr); + ok(!length, "Unexpected length %lu.\n", length);
/* Single buffer, larger destination. */ hr = MFCreateMemoryBuffer(8, &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 = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr); *(DWORD *)data = 0x11111111; hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Failed to unlock, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock, hr %#lx.\n", hr); hr = IMFMediaBuffer_SetCurrentLength(buffer, 4); - ok(hr == S_OK, "Failed to set current length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current length, hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(sample, buffer); - ok(hr == S_OK, "Failed to add buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add buffer, hr %#lx.\n", hr);
/* Existing content is overwritten. */ hr = IMFMediaBuffer_SetCurrentLength(buffer2, 8); - ok(hr == S_OK, "Failed to set length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set length, hr %#lx.\n", hr);
hr = IMFSample_CopyToBuffer(sample, buffer2); - ok(hr == S_OK, "Failed to copy to buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy to buffer, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer2, &length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(length == 4, "Unexpected buffer length %u.\n", length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(length == 4, "Unexpected buffer length %lu.\n", length);
/* Multiple buffers, matching total size. */ hr = IMFSample_AddBuffer(sample, buffer); - ok(hr == S_OK, "Failed to add buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add buffer, hr %#lx.\n", hr);
hr = IMFSample_GetBufferCount(sample, &count); - ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr); - ok(count == 2, "Unexpected buffer count %u.\n", count); + ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr); + ok(count == 2, "Unexpected buffer count %lu.\n", count);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 8); - ok(hr == S_OK, "Failed to set current length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current length, hr %#lx.\n", hr);
hr = IMFSample_CopyToBuffer(sample, buffer2); - ok(hr == S_OK, "Failed to copy to buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy to buffer, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer2, &length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(length == 16, "Unexpected buffer length %u.\n", length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(length == 16, "Unexpected buffer length %lu.\n", length);
hr = IMFSample_AddBuffer(sample, buffer); - ok(hr == S_OK, "Failed to add buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add buffer, hr %#lx.\n", hr);
hr = IMFMediaBuffer_SetCurrentLength(buffer2, 1); - ok(hr == S_OK, "Failed to set buffer length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set buffer length, hr %#lx.\n", hr);
hr = IMFMediaBuffer_Lock(buffer2, &data, NULL, NULL); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr); *(DWORD *)data = test_pattern; hr = IMFMediaBuffer_Unlock(buffer2); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = IMFSample_CopyToBuffer(sample, buffer2); - ok(hr == MF_E_BUFFERTOOSMALL, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_BUFFERTOOSMALL, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Lock(buffer2, &data, NULL, NULL); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); - ok(!memcmp(data, &test_pattern, sizeof(test_pattern)), "Unexpected contents, %#x\n", *(DWORD *)data); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr); + ok(!memcmp(data, &test_pattern, sizeof(test_pattern)), "Unexpected contents, %#lx\n", *(DWORD *)data); hr = IMFMediaBuffer_Unlock(buffer2); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer2, &length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(!length, "Unexpected buffer length %u.\n", length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(!length, "Unexpected buffer length %lu.\n", length);
IMFMediaBuffer_Release(buffer2); IMFSample_Release(sample);
/* ConvertToContiguousBuffer() */ 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 = IMFSample_ConvertToContiguousBuffer(sample, &buffer); - ok(hr == E_UNEXPECTED, "Unexpected hr %#x.\n", hr); + ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMemoryBuffer(16, &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(sample, buffer); - ok(hr == S_OK, "Failed to add buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add buffer, hr %#lx.\n", hr);
hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer2); - ok(hr == S_OK, "Failed to convert, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to convert, hr %#lx.\n", hr); ok(buffer2 == buffer, "Unexpected buffer instance.\n"); IMFMediaBuffer_Release(buffer2);
hr = IMFSample_ConvertToContiguousBuffer(sample, NULL); - ok(hr == S_OK, "Failed to convert, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to convert, hr %#lx.\n", hr);
hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer2); - ok(hr == S_OK, "Failed to convert, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to convert, hr %#lx.\n", hr); ok(buffer2 == buffer, "Unexpected buffer instance.\n"); IMFMediaBuffer_Release(buffer2);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 3); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFCreateMemoryBuffer(16, &buffer2); - 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 = IMFMediaBuffer_SetCurrentLength(buffer2, 4); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_AddBuffer(sample, buffer2); - ok(hr == S_OK, "Failed to add buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add buffer, hr %#lx.\n", hr); IMFMediaBuffer_Release(buffer2);
hr = IMFSample_GetBufferCount(sample, &count); - ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr); - ok(count == 2, "Unexpected buffer count %u.\n", count); + ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr); + ok(count == 2, "Unexpected buffer count %lu.\n", count);
hr = IMFSample_ConvertToContiguousBuffer(sample, &buffer3); - ok(hr == S_OK, "Failed to convert, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to convert, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetMaxLength(buffer3, &length); - ok(hr == S_OK, "Failed to get maximum length, hr %#x.\n", hr); - ok(length == 7, "Unexpected length %u.\n", length); + ok(hr == S_OK, "Failed to get maximum length, hr %#lx.\n", hr); + ok(length == 7, "Unexpected length %lu.\n", length);
hr = IMFMediaBuffer_GetCurrentLength(buffer3, &length); - ok(hr == S_OK, "Failed to get maximum length, hr %#x.\n", hr); - ok(length == 7, "Unexpected length %u.\n", length); + ok(hr == S_OK, "Failed to get maximum length, hr %#lx.\n", hr); + ok(length == 7, "Unexpected length %lu.\n", length);
IMFMediaBuffer_Release(buffer3);
hr = IMFSample_GetBufferCount(sample, &count); - ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr); - ok(count == 1, "Unexpected buffer count %u.\n", count); + ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr); + ok(count == 1, "Unexpected buffer count %lu.\n", count);
hr = IMFSample_AddBuffer(sample, buffer); - ok(hr == S_OK, "Failed to add buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add buffer, hr %#lx.\n", hr);
hr = IMFSample_GetBufferCount(sample, &count); - ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr); - ok(count == 2, "Unexpected buffer count %u.\n", count); + ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr); + ok(count == 2, "Unexpected buffer count %lu.\n", count);
hr = IMFSample_ConvertToContiguousBuffer(sample, NULL); - ok(hr == S_OK, "Failed to convert, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to convert, hr %#lx.\n", hr);
hr = IMFSample_GetBufferCount(sample, &count); - ok(hr == S_OK, "Failed to get buffer count, hr %#x.\n", hr); - ok(count == 1, "Unexpected buffer count %u.\n", count); + ok(hr == S_OK, "Failed to get buffer count, hr %#lx.\n", hr); + ok(count == 1, "Unexpected buffer count %lu.\n", count);
IMFMediaBuffer_Release(buffer);
@@ -2622,23 +2622,23 @@ static HRESULT WINAPI testcallback_Invoke(IMFAsyncCallback *iface, IMFAsyncResul if (is_win8_plus) { hr = IMFMediaEventQueue_GetEvent(queue, MF_EVENT_FLAG_NO_WAIT, &event); - ok(hr == MF_E_MULTIPLE_SUBSCRIBERS, "Failed to get event, hr %#x.\n", hr); + ok(hr == MF_E_MULTIPLE_SUBSCRIBERS, "Failed to get event, hr %#lx.\n", hr);
hr = IMFMediaEventQueue_GetEvent(queue, 0, &event); - ok(hr == MF_E_MULTIPLE_SUBSCRIBERS, "Failed to get event, hr %#x.\n", hr); + ok(hr == MF_E_MULTIPLE_SUBSCRIBERS, "Failed to get event, hr %#lx.\n", hr);
hr = IMFMediaEventQueue_EndGetEvent(queue, result, &event); - ok(hr == S_OK, "Failed to finalize GetEvent, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to finalize GetEvent, hr %#lx.\n", hr);
hr = IMFMediaEventQueue_EndGetEvent(queue, result, &event2); - ok(hr == E_FAIL, "Unexpected result, hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected result, hr %#lx.\n", hr);
if (event) IMFMediaEvent_Release(event); }
hr = IMFAsyncResult_GetObject(result, &obj); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IMFMediaEventQueue_Release(queue);
@@ -2672,42 +2672,42 @@ static void test_MFCreateAsyncResult(void) callback = create_test_callback(NULL);
hr = MFCreateAsyncResult(NULL, NULL, NULL, NULL); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = MFCreateAsyncResult(NULL, NULL, NULL, &result); - ok(hr == S_OK, "Failed to create object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create object, hr %#lx.\n", hr);
data = (MFASYNCRESULT *)result; ok(data->pCallback == NULL, "Unexpected callback value.\n"); - ok(data->hrStatusResult == S_OK, "Unexpected status %#x.\n", data->hrStatusResult); - ok(data->dwBytesTransferred == 0, "Unexpected byte length %u.\n", data->dwBytesTransferred); + ok(data->hrStatusResult == S_OK, "Unexpected status %#lx.\n", data->hrStatusResult); + ok(data->dwBytesTransferred == 0, "Unexpected byte length %lu.\n", data->dwBytesTransferred); ok(data->hEvent == NULL, "Unexpected event.\n");
hr = IMFAsyncResult_GetState(result, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
state = (void *)0xdeadbeef; hr = IMFAsyncResult_GetState(result, &state); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); ok(state == (void *)0xdeadbeef, "Unexpected state.\n");
hr = IMFAsyncResult_GetStatus(result); - ok(hr == S_OK, "Unexpected status %#x.\n", hr); + ok(hr == S_OK, "Unexpected status %#lx.\n", hr);
data->hrStatusResult = 123; hr = IMFAsyncResult_GetStatus(result); - ok(hr == 123, "Unexpected status %#x.\n", hr); + ok(hr == 123, "Unexpected status %#lx.\n", hr);
hr = IMFAsyncResult_SetStatus(result, E_FAIL); - ok(hr == S_OK, "Failed to set status, hr %#x.\n", hr); - ok(data->hrStatusResult == E_FAIL, "Unexpected status %#x.\n", hr); + ok(hr == S_OK, "Failed to set status, hr %#lx.\n", hr); + ok(data->hrStatusResult == E_FAIL, "Unexpected status %#lx.\n", hr);
hr = IMFAsyncResult_GetObject(result, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
object = (void *)0xdeadbeef; hr = IMFAsyncResult_GetObject(result, &object); - ok(hr == E_POINTER, "Failed to get object, hr %#x.\n", hr); + ok(hr == E_POINTER, "Failed to get object, hr %#lx.\n", hr); ok(object == (void *)0xdeadbeef, "Unexpected object.\n");
state = IMFAsyncResult_GetStateNoAddRef(result); @@ -2715,17 +2715,17 @@ static void test_MFCreateAsyncResult(void)
/* Object. */ hr = MFCreateAsyncResult((IUnknown *)result, &callback->IMFAsyncCallback_iface, NULL, &result2); - ok(hr == S_OK, "Failed to create object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create object, hr %#lx.\n", hr);
data = (MFASYNCRESULT *)result2; ok(data->pCallback == &callback->IMFAsyncCallback_iface, "Unexpected callback value.\n"); - ok(data->hrStatusResult == S_OK, "Unexpected status %#x.\n", data->hrStatusResult); - ok(data->dwBytesTransferred == 0, "Unexpected byte length %u.\n", data->dwBytesTransferred); + ok(data->hrStatusResult == S_OK, "Unexpected status %#lx.\n", data->hrStatusResult); + ok(data->dwBytesTransferred == 0, "Unexpected byte length %lu.\n", data->dwBytesTransferred); ok(data->hEvent == NULL, "Unexpected event.\n");
object = NULL; hr = IMFAsyncResult_GetObject(result2, &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 == (IUnknown *)result, "Unexpected object.\n"); IUnknown_Release(object);
@@ -2733,17 +2733,17 @@ static void test_MFCreateAsyncResult(void)
/* State object. */ hr = MFCreateAsyncResult(NULL, &callback->IMFAsyncCallback_iface, (IUnknown *)result, &result2); - ok(hr == S_OK, "Failed to create object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create object, hr %#lx.\n", hr);
data = (MFASYNCRESULT *)result2; ok(data->pCallback == &callback->IMFAsyncCallback_iface, "Unexpected callback value.\n"); - ok(data->hrStatusResult == S_OK, "Unexpected status %#x.\n", data->hrStatusResult); - ok(data->dwBytesTransferred == 0, "Unexpected byte length %u.\n", data->dwBytesTransferred); + ok(data->hrStatusResult == S_OK, "Unexpected status %#lx.\n", data->hrStatusResult); + ok(data->dwBytesTransferred == 0, "Unexpected byte length %lu.\n", data->dwBytesTransferred); ok(data->hEvent == NULL, "Unexpected event.\n");
state = NULL; hr = IMFAsyncResult_GetState(result2, &state); - ok(hr == S_OK, "Failed to get state object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get state object, hr %#lx.\n", hr); ok(state == (IUnknown *)result, "Unexpected state.\n"); IUnknown_Release(state);
@@ -2751,13 +2751,13 @@ static void test_MFCreateAsyncResult(void) ok(state == (IUnknown *)result, "Unexpected state.\n");
refcount = IMFAsyncResult_Release(result2); - ok(!refcount, "Unexpected refcount %u.\n", refcount); + ok(!refcount, "Unexpected refcount %lu.\n", refcount); refcount = IMFAsyncResult_Release(result); - ok(!refcount, "Unexpected refcount %u.\n", refcount); + ok(!refcount, "Unexpected refcount %lu.\n", refcount);
/* Event handle is closed on release. */ hr = MFCreateAsyncResult(NULL, NULL, NULL, &result); - ok(hr == S_OK, "Failed to create object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create object, hr %#lx.\n", hr);
data = (MFASYNCRESULT *)result; data->hEvent = event = CreateEventA(NULL, FALSE, FALSE, NULL); @@ -2766,12 +2766,12 @@ static void test_MFCreateAsyncResult(void) ok(ret, "Failed to get handle info.\n");
refcount = IMFAsyncResult_Release(result); - ok(!refcount, "Unexpected refcount %u.\n", refcount); + ok(!refcount, "Unexpected refcount %lu.\n", refcount); ret = GetHandleInformation(event, &flags); ok(!ret, "Expected handle to be closed.\n");
hr = MFCreateAsyncResult(NULL, &callback->IMFAsyncCallback_iface, NULL, &result); - ok(hr == S_OK, "Failed to create object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create object, hr %#lx.\n", hr);
data = (MFASYNCRESULT *)result; data->hEvent = event = CreateEventA(NULL, FALSE, FALSE, NULL); @@ -2780,7 +2780,7 @@ static void test_MFCreateAsyncResult(void) ok(ret, "Failed to get handle info.\n");
refcount = IMFAsyncResult_Release(result); - ok(!refcount, "Unexpected refcount %u.\n", refcount); + ok(!refcount, "Unexpected refcount %lu.\n", refcount); ret = GetHandleInformation(event, &flags); ok(!ret, "Expected handle to be closed.\n");
@@ -2793,63 +2793,63 @@ static void test_startup(void) HRESULT hr;
hr = MFStartup(MAKELONG(MF_API_VERSION, 0xdead), MFSTARTUP_FULL); - ok(hr == MF_E_BAD_STARTUP_VERSION, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_BAD_STARTUP_VERSION, "Unexpected hr %#lx.\n", hr);
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 = MFAllocateWorkQueue(&queue); - ok(hr == S_OK, "Failed to allocate a queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to allocate a queue, hr %#lx.\n", hr); hr = MFUnlockWorkQueue(queue); - ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock the queue, hr %#lx.\n", hr);
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);
hr = MFAllocateWorkQueue(&queue); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
/* Already shut down, has no effect. */ 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);
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 = MFAllocateWorkQueue(&queue); - ok(hr == S_OK, "Failed to allocate a queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to allocate a queue, hr %#lx.\n", hr); hr = MFUnlockWorkQueue(queue); - ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock the queue, hr %#lx.\n", hr);
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);
/* Platform lock. */ 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 = MFAllocateWorkQueue(&queue); - ok(hr == S_OK, "Failed to allocate a queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to allocate a queue, hr %#lx.\n", hr); hr = MFUnlockWorkQueue(queue); - ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock the queue, hr %#lx.\n", hr);
/* Unlocking implies shutdown. */ hr = MFUnlockPlatform(); - ok(hr == S_OK, "Failed to unlock, %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock, %#lx.\n", hr);
hr = MFAllocateWorkQueue(&queue); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = MFLockPlatform(); - ok(hr == S_OK, "Failed to lock, %#x.\n", hr); + ok(hr == S_OK, "Failed to lock, %#lx.\n", hr);
hr = MFAllocateWorkQueue(&queue); - ok(hr == S_OK, "Failed to allocate a queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to allocate a queue, hr %#lx.\n", hr); hr = MFUnlockWorkQueue(queue); - ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock the queue, hr %#lx.\n", hr);
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_allocate_queue(void) @@ -2858,37 +2858,37 @@ static void test_allocate_queue(void) HRESULT hr;
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 = MFAllocateWorkQueue(&queue); - ok(hr == S_OK, "Failed to allocate a queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to allocate a queue, hr %#lx.\n", hr); ok(queue & MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK, "Unexpected queue id.\n");
hr = MFUnlockWorkQueue(queue); - ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock the queue, hr %#lx.\n", hr);
hr = MFUnlockWorkQueue(queue); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
hr = MFAllocateWorkQueue(&queue2); - ok(hr == S_OK, "Failed to allocate a queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to allocate a queue, hr %#lx.\n", hr); ok(queue2 & MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK, "Unexpected queue id.\n");
hr = MFUnlockWorkQueue(queue2); - ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock the queue, hr %#lx.\n", hr);
/* Unlock in system queue range. */ hr = MFUnlockWorkQueue(MFASYNC_CALLBACK_QUEUE_STANDARD); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFUnlockWorkQueue(MFASYNC_CALLBACK_QUEUE_UNDEFINED); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFUnlockWorkQueue(0x20); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
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_MFCopyImage(void) @@ -2906,21 +2906,21 @@ static void test_MFCopyImage(void) memset(src, 0x11, sizeof(src));
hr = pMFCopyImage(dest, 8, src, 8, 4, 1); - ok(hr == S_OK, "Failed to copy image %#x.\n", hr); + ok(hr == S_OK, "Failed to copy image %#lx.\n", hr); ok(!memcmp(dest, src, 4) && dest[4] == 0xaa, "Unexpected buffer contents.\n");
memset(dest, 0xaa, sizeof(dest)); memset(src, 0x11, sizeof(src));
hr = pMFCopyImage(dest, 8, src, 8, 16, 1); - ok(hr == S_OK, "Failed to copy image %#x.\n", hr); + ok(hr == S_OK, "Failed to copy image %#lx.\n", hr); ok(!memcmp(dest, src, 16), "Unexpected buffer contents.\n");
memset(dest, 0xaa, sizeof(dest)); memset(src, 0x11, sizeof(src));
hr = pMFCopyImage(dest, 8, src, 8, 8, 2); - ok(hr == S_OK, "Failed to copy image %#x.\n", hr); + ok(hr == S_OK, "Failed to copy image %#lx.\n", hr); ok(!memcmp(dest, src, 16), "Unexpected buffer contents.\n"); }
@@ -2932,96 +2932,96 @@ static void test_MFCreateCollection(void) HRESULT hr;
hr = MFCreateCollection(NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = MFCreateCollection(&collection); - ok(hr == S_OK, "Failed to create collection, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create collection, hr %#lx.\n", hr);
hr = IMFCollection_GetElementCount(collection, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
count = 1; hr = IMFCollection_GetElementCount(collection, &count); - ok(hr == S_OK, "Failed to get element count, hr %#x.\n", hr); - ok(count == 0, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get element count, hr %#lx.\n", hr); + ok(count == 0, "Unexpected count %lu.\n", count);
hr = IMFCollection_GetElement(collection, 0, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
element = (void *)0xdeadbeef; hr = IMFCollection_GetElement(collection, 0, &element); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(element == (void *)0xdeadbeef, "Unexpected pointer.\n");
hr = IMFCollection_RemoveElement(collection, 0, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
element = (void *)0xdeadbeef; hr = IMFCollection_RemoveElement(collection, 0, &element); - ok(hr == E_INVALIDARG, "Failed to remove element, hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Failed to remove element, hr %#lx.\n", hr); ok(element == (void *)0xdeadbeef, "Unexpected pointer.\n");
hr = IMFCollection_RemoveAllElements(collection); - ok(hr == S_OK, "Failed to clear, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear, hr %#lx.\n", hr);
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);
count = 0; hr = IMFCollection_GetElementCount(collection, &count); - ok(hr == S_OK, "Failed to get element count, hr %#x.\n", hr); - ok(count == 1, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get element count, hr %#lx.\n", hr); + ok(count == 1, "Unexpected count %lu.\n", count);
hr = IMFCollection_AddElement(collection, NULL); - ok(hr == S_OK, "Failed to add element, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add element, hr %#lx.\n", hr);
count = 0; hr = IMFCollection_GetElementCount(collection, &count); - ok(hr == S_OK, "Failed to get element count, hr %#x.\n", hr); - ok(count == 2, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get element count, hr %#lx.\n", hr); + ok(count == 2, "Unexpected count %lu.\n", count);
hr = IMFCollection_InsertElementAt(collection, 10, (IUnknown *)collection); - ok(hr == S_OK, "Failed to insert element, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to insert element, hr %#lx.\n", hr);
count = 0; hr = IMFCollection_GetElementCount(collection, &count); - ok(hr == S_OK, "Failed to get element count, hr %#x.\n", hr); - ok(count == 11, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get element count, hr %#lx.\n", hr); + ok(count == 11, "Unexpected count %lu.\n", count);
hr = IMFCollection_GetElement(collection, 0, &element); - ok(hr == S_OK, "Failed to get element, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get element, hr %#lx.\n", hr); ok(element == (IUnknown *)collection, "Unexpected element.\n"); IUnknown_Release(element);
hr = IMFCollection_GetElement(collection, 1, &element); - ok(hr == E_UNEXPECTED, "Unexpected hr %#x.\n", hr); + ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr); ok(!element, "Unexpected element.\n");
hr = IMFCollection_GetElement(collection, 2, &element); - ok(hr == E_UNEXPECTED, "Unexpected hr %#x.\n", hr); + ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr); ok(!element, "Unexpected element.\n");
hr = IMFCollection_GetElement(collection, 10, &element); - ok(hr == S_OK, "Failed to get element, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get element, hr %#lx.\n", hr); ok(element == (IUnknown *)collection, "Unexpected element.\n"); IUnknown_Release(element);
hr = IMFCollection_InsertElementAt(collection, 0, NULL); - ok(hr == S_OK, "Failed to insert element, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to insert element, hr %#lx.\n", hr);
hr = IMFCollection_GetElement(collection, 0, &element); - ok(hr == E_UNEXPECTED, "Unexpected hr %#x.\n", hr); + ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = IMFCollection_RemoveAllElements(collection); - ok(hr == S_OK, "Failed to clear, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clear, hr %#lx.\n", hr);
count = 1; hr = IMFCollection_GetElementCount(collection, &count); - ok(hr == S_OK, "Failed to get element count, hr %#x.\n", hr); - ok(count == 0, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get element count, hr %#lx.\n", hr); + ok(count == 0, "Unexpected count %lu.\n", count);
hr = IMFCollection_InsertElementAt(collection, 0, NULL); - ok(hr == S_OK, "Failed to insert element, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to insert element, hr %#lx.\n", hr);
IMFCollection_Release(collection); } @@ -3046,16 +3046,16 @@ static void test_scheduled_items(void) callback = create_test_callback(NULL);
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 = MFScheduleWorkItem(&callback->IMFAsyncCallback_iface, NULL, -5000, &key); - ok(hr == S_OK, "Failed to schedule item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to schedule item, hr %#lx.\n", hr);
hr = MFCancelWorkItem(key); - ok(hr == S_OK, "Failed to cancel item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to cancel item, hr %#lx.\n", hr);
hr = MFCancelWorkItem(key); - ok(hr == MF_E_NOT_FOUND || broken(hr == S_OK) /* < win10 */, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_FOUND || broken(hr == S_OK) /* < win10 */, "Unexpected hr %#lx.\n", hr);
if (!pMFPutWaitingWorkItem) { @@ -3064,30 +3064,30 @@ static void test_scheduled_items(void) }
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 = pMFPutWaitingWorkItem(NULL, 0, result, &key); - ok(hr == S_OK, "Failed to add waiting item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add waiting item, hr %#lx.\n", hr);
hr = pMFPutWaitingWorkItem(NULL, 0, result, &key2); - ok(hr == S_OK, "Failed to add waiting item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to add waiting item, hr %#lx.\n", hr);
hr = MFCancelWorkItem(key); - ok(hr == S_OK, "Failed to cancel item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to cancel item, hr %#lx.\n", hr);
hr = MFCancelWorkItem(key2); - ok(hr == S_OK, "Failed to cancel item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to cancel item, hr %#lx.\n", hr);
IMFAsyncResult_Release(result);
hr = MFScheduleWorkItem(&callback->IMFAsyncCallback_iface, NULL, -5000, &key); - ok(hr == S_OK, "Failed to schedule item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to schedule item, hr %#lx.\n", hr);
hr = MFCancelWorkItem(key); - ok(hr == S_OK, "Failed to cancel item, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to cancel item, hr %#lx.\n", hr);
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);
IMFAsyncCallback_Release(&callback->IMFAsyncCallback_iface); } @@ -3114,7 +3114,7 @@ static void test_serial_queue(void) }
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);
for (i = 0; i < ARRAY_SIZE(queue_ids); ++i) { @@ -3123,30 +3123,30 @@ static void test_serial_queue(void)
hr = pMFAllocateSerialWorkQueue(queue_ids[i], &serial_queue); ok(hr == S_OK || broken(broken_types && hr == E_INVALIDARG) /* Win8 */, - "%u: failed to allocate a queue, hr %#x.\n", i, hr); + "%u: failed to allocate a queue, hr %#lx.\n", i, hr);
if (SUCCEEDED(hr)) { hr = MFUnlockWorkQueue(serial_queue); - ok(hr == S_OK, "%u: failed to unlock the queue, hr %#x.\n", i, hr); + ok(hr == S_OK, "%u: failed to unlock the queue, hr %#lx.\n", i, hr); } }
/* Chain them together. */ hr = pMFAllocateSerialWorkQueue(MFASYNC_CALLBACK_QUEUE_STANDARD, &serial_queue); - ok(hr == S_OK, "Failed to allocate a queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to allocate a queue, hr %#lx.\n", hr);
hr = pMFAllocateSerialWorkQueue(serial_queue, &queue); - ok(hr == S_OK, "Failed to allocate a queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to allocate a queue, hr %#lx.\n", hr);
hr = MFUnlockWorkQueue(serial_queue); - ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock the queue, hr %#lx.\n", hr);
hr = MFUnlockWorkQueue(queue); - ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock the queue, hr %#lx.\n", hr);
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 LONG periodic_counter; @@ -3161,36 +3161,36 @@ static void test_periodic_callback(void) HRESULT hr;
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);
period = 0; hr = MFGetTimerPeriodicity(&period); - ok(hr == S_OK, "Failed to get timer perdiod, hr %#x.\n", hr); - ok(period == 10, "Unexpected period %u.\n", period); + ok(hr == S_OK, "Failed to get timer perdiod, hr %#lx.\n", hr); + ok(period == 10, "Unexpected period %lu.\n", period);
if (!pMFAddPeriodicCallback) { win_skip("Periodic callbacks are not supported.\n"); 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); return; }
- ok(periodic_counter == 0, "Unexpected counter value %u.\n", periodic_counter); + ok(periodic_counter == 0, "Unexpected counter value %lu.\n", periodic_counter);
hr = pMFAddPeriodicCallback(periodic_callback, NULL, &key); - ok(hr == S_OK, "Failed to add periodic callback, hr %#x.\n", hr); - ok(key != 0, "Unexpected key %#x.\n", key); + ok(hr == S_OK, "Failed to add periodic callback, hr %#lx.\n", hr); + ok(key != 0, "Unexpected key %#lx.\n", key);
Sleep(10 * period);
hr = pMFRemovePeriodicCallback(key); - ok(hr == S_OK, "Failed to remove callback, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to remove callback, hr %#lx.\n", hr);
- ok(periodic_counter > 0, "Unexpected counter value %u.\n", periodic_counter); + ok(periodic_counter > 0, "Unexpected counter value %lu.\n", periodic_counter);
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_event_queue(void) @@ -3206,108 +3206,108 @@ static void test_event_queue(void) callback2 = create_test_callback(NULL);
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 = MFCreateEventQueue(&queue); - ok(hr == S_OK, "Failed to create event queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create event queue, hr %#lx.\n", hr);
hr = IMFMediaEventQueue_GetEvent(queue, 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 = MFCreateMediaEvent(MEError, &GUID_NULL, E_FAIL, 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);
if (is_win8_plus) { hr = IMFMediaEventQueue_QueueEvent(queue, event); - ok(hr == S_OK, "Failed to queue event, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to queue event, hr %#lx.\n", hr);
hr = IMFMediaEventQueue_GetEvent(queue, MF_EVENT_FLAG_NO_WAIT, &event2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(event2 == event, "Unexpected event object.\n"); IMFMediaEvent_Release(event2);
hr = IMFMediaEventQueue_QueueEvent(queue, event); - ok(hr == S_OK, "Failed to queue event, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to queue event, hr %#lx.\n", hr);
hr = IMFMediaEventQueue_GetEvent(queue, 0, &event2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFMediaEvent_Release(event2); }
/* Async case. */ hr = IMFMediaEventQueue_BeginGetEvent(queue, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaEventQueue_BeginGetEvent(queue, &callback->IMFAsyncCallback_iface, (IUnknown *)queue); - 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 = IMFMediaEventQueue_BeginGetEvent(queue, &callback->IMFAsyncCallback_iface, (IUnknown *)queue); - 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 = IMFMediaEventQueue_BeginGetEvent(queue, &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 = IMFMediaEventQueue_BeginGetEvent(queue, &callback2->IMFAsyncCallback_iface, (IUnknown *)queue); - 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 = IMFMediaEventQueue_BeginGetEvent(queue, &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);
callback->event = CreateEventA(NULL, FALSE, FALSE, NULL);
hr = IMFMediaEventQueue_QueueEvent(queue, event); - ok(hr == S_OK, "Failed to queue event, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to queue event, hr %#lx.\n", hr);
ret = WaitForSingleObject(callback->event, 500); - ok(ret == WAIT_OBJECT_0, "Unexpected return value %#x.\n", ret); + ok(ret == WAIT_OBJECT_0, "Unexpected return value %#lx.\n", ret);
CloseHandle(callback->event);
IMFMediaEvent_Release(event);
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 = IMFMediaEventQueue_EndGetEvent(queue, result, &event); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
/* Shutdown behavior. */ hr = IMFMediaEventQueue_Shutdown(queue); - 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 = IMFMediaEventQueue_GetEvent(queue, 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 = MFCreateMediaEvent(MEError, &GUID_NULL, E_FAIL, 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 = IMFMediaEventQueue_QueueEvent(queue, event); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr); IMFMediaEvent_Release(event);
hr = IMFMediaEventQueue_QueueEventParamUnk(queue, MEError, &GUID_NULL, E_FAIL, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaEventQueue_QueueEventParamVar(queue, MEError, &GUID_NULL, E_FAIL, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaEventQueue_BeginGetEvent(queue, &callback->IMFAsyncCallback_iface, NULL); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaEventQueue_BeginGetEvent(queue, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaEventQueue_EndGetEvent(queue, result, &event); - ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SHUTDOWN, "Unexpected hr %#lx.\n", hr); IMFAsyncResult_Release(result);
/* Already shut down. */ hr = IMFMediaEventQueue_Shutdown(queue); - ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
IMFMediaEventQueue_Release(queue); IMFAsyncCallback_Release(&callback->IMFAsyncCallback_iface); @@ -3316,20 +3316,20 @@ static void test_event_queue(void) callback = create_test_callback(NULL);
hr = MFCreateEventQueue(&queue); - ok(hr == S_OK, "Failed to create event queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create event queue, hr %#lx.\n", hr);
hr = IMFMediaEventQueue_BeginGetEvent(queue, &callback->IMFAsyncCallback_iface, NULL); - ok(hr == S_OK, "Failed to Begin*, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to Begin*, hr %#lx.\n", hr); EXPECT_REF(&callback->IMFAsyncCallback_iface, 2);
IMFMediaEventQueue_Release(queue); ret = get_refcount(&callback->IMFAsyncCallback_iface); ok(ret == 1 || broken(ret == 2) /* Vista */, - "Unexpected refcount %d, expected 1.\n", ret); + "Unexpected refcount %ld, expected 1.\n", ret); IMFAsyncCallback_Release(&callback->IMFAsyncCallback_iface);
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_presentation_descriptor(void) @@ -3344,58 +3344,58 @@ static void test_presentation_descriptor(void) HRESULT 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);
for (i = 0; i < ARRAY_SIZE(stream_desc); ++i) { hr = MFCreateStreamDescriptor(0, 1, &media_type, &stream_desc[i]); - ok(hr == S_OK, "Failed to create descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create descriptor, hr %#lx.\n", hr); }
hr = MFCreatePresentationDescriptor(ARRAY_SIZE(stream_desc), stream_desc, &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_GetStreamDescriptorCount(pd, &count); - ok(count == ARRAY_SIZE(stream_desc), "Unexpected count %u.\n", count); + ok(count == ARRAY_SIZE(stream_desc), "Unexpected count %lu.\n", count);
for (i = 0; i < count; ++i) { hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(pd, i, &selected, &stream_desc2); - ok(hr == S_OK, "Failed to get stream descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream descriptor, hr %#lx.\n", hr); ok(!selected, "Unexpected selected state.\n"); ok(stream_desc[i] == stream_desc2, "Unexpected object.\n"); IMFStreamDescriptor_Release(stream_desc2); }
hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(pd, 10, &selected, &stream_desc2); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationDescriptor_SelectStream(pd, 10); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationDescriptor_SelectStream(pd, 0); - ok(hr == S_OK, "Failed to select a stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to select a stream, hr %#lx.\n", hr);
hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(pd, 0, &selected, &stream_desc2); - ok(hr == S_OK, "Failed to get stream descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream descriptor, hr %#lx.\n", hr); ok(!!selected, "Unexpected selected state.\n"); IMFStreamDescriptor_Release(stream_desc2);
hr = IMFPresentationDescriptor_SetUINT64(pd, &MF_PD_TOTAL_FILE_SIZE, 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 = IMFPresentationDescriptor_Clone(pd, &pd2); - ok(hr == S_OK, "Failed to clone, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to clone, hr %#lx.\n", hr);
hr = IMFPresentationDescriptor_GetStreamDescriptorByIndex(pd2, 0, &selected, &stream_desc2); - ok(hr == S_OK, "Failed to get stream descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stream descriptor, hr %#lx.\n", hr); ok(!!selected, "Unexpected selected state.\n"); ok(stream_desc2 == stream_desc[0], "Unexpected stream descriptor.\n"); IMFStreamDescriptor_Release(stream_desc2);
value = 0; hr = IMFPresentationDescriptor_GetUINT64(pd2, &MF_PD_TOTAL_FILE_SIZE, &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 attribute value.\n");
IMFPresentationDescriptor_Release(pd2); @@ -3408,11 +3408,11 @@ static void test_presentation_descriptor(void)
/* Partially initialized array. */ hr = MFCreateStreamDescriptor(0, 1, &media_type, &stream_desc[1]); - ok(hr == S_OK, "Failed to create descriptor, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create descriptor, hr %#lx.\n", hr); stream_desc[0] = NULL;
hr = MFCreatePresentationDescriptor(ARRAY_SIZE(stream_desc), stream_desc, &pd); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
IMFStreamDescriptor_Release(stream_desc[1]); IMFMediaType_Release(media_type); @@ -3466,24 +3466,24 @@ static void test_system_time_source(void) HRESULT 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 = IMFPresentationTimeSource_GetClockCharacteristics(time_source, &value); - ok(hr == S_OK, "Failed to get flags, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get flags, hr %#lx.\n", hr); ok(value == (MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ | MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK), - "Unexpected flags %#x.\n", value); + "Unexpected flags %#lx.\n", value);
value = 1; hr = IMFPresentationTimeSource_GetContinuityKey(time_source, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(value == 0, "Unexpected value %u.\n", value); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(value == 0, "Unexpected value %lu.\n", value);
hr = IMFPresentationTimeSource_GetState(time_source, 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 = IMFPresentationTimeSource_QueryInterface(time_source, &IID_IMFClockStateSink, (void **)&statesink); - 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);
/* State changes. */ for (i = 0; i < ARRAY_SIZE(clock_state_change); ++i) @@ -3505,9 +3505,9 @@ static void test_system_time_source(void) default: ; } - ok(hr == (clock_state_change[i].is_invalid ? MF_E_INVALIDREQUEST : S_OK), "%u: unexpected hr %#x.\n", i, hr); + ok(hr == (clock_state_change[i].is_invalid ? MF_E_INVALIDREQUEST : S_OK), "%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].state, "%u: unexpected state %d.\n", i, state); }
@@ -3515,32 +3515,32 @@ static void test_system_time_source(void)
/* Properties. */ hr = IMFPresentationTimeSource_GetProperties(time_source, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetProperties(time_source, &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(props.qwCorrelationRate == 0, "Unexpected correlation rate %s.\n", wine_dbgstr_longlong(props.qwCorrelationRate)); ok(IsEqualGUID(&props.guidClockId, &GUID_NULL), "Unexpected clock id %s.\n", wine_dbgstr_guid(&props.guidClockId)); - ok(props.dwClockFlags == 0, "Unexpected flags %#x.\n", props.dwClockFlags); + ok(props.dwClockFlags == 0, "Unexpected flags %#lx.\n", props.dwClockFlags); ok(props.qwClockFrequency == MFCLOCK_FREQUENCY_HNS, "Unexpected frequency %s.\n", wine_dbgstr_longlong(props.qwClockFrequency)); - ok(props.dwClockTolerance == MFCLOCK_TOLERANCE_UNKNOWN, "Unexpected tolerance %u.\n", props.dwClockTolerance); - ok(props.dwClockJitter == 1, "Unexpected jitter %u.\n", props.dwClockJitter); + ok(props.dwClockTolerance == MFCLOCK_TOLERANCE_UNKNOWN, "Unexpected tolerance %lu.\n", props.dwClockTolerance); + ok(props.dwClockJitter == 1, "Unexpected jitter %lu.\n", props.dwClockJitter);
/* Underlying clock. */ hr = MFCreateSystemTimeSource(&time_source2); - 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); EXPECT_REF(time_source2, 1); hr = IMFPresentationTimeSource_GetUnderlyingClock(time_source2, &clock2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(time_source2, 1); EXPECT_REF(clock2, 2);
EXPECT_REF(time_source, 1); hr = IMFPresentationTimeSource_GetUnderlyingClock(time_source, &clock); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(time_source, 1); EXPECT_REF(clock, 2);
@@ -3550,209 +3550,209 @@ static void test_system_time_source(void) IMFClock_Release(clock2);
hr = IMFClock_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_ALWAYS_RUNNING | - MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK), "Unexpected flags %#x.\n", value); + MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK), "Unexpected flags %#lx.\n", value);
hr = IMFClock_GetContinuityKey(clock, &value); - ok(hr == S_OK, "Failed to get clock key, hr %#x.\n", hr); - ok(value == 0, "Unexpected key value %u.\n", value); + ok(hr == S_OK, "Failed to get clock key, hr %#lx.\n", hr); + ok(value == 0, "Unexpected key value %lu.\n", value);
hr = IMFClock_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 = IMFClock_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(props.qwCorrelationRate == 0, "Unexpected correlation rate %s.\n", wine_dbgstr_longlong(props.qwCorrelationRate)); ok(IsEqualGUID(&props.guidClockId, &GUID_NULL), "Unexpected clock id %s.\n", wine_dbgstr_guid(&props.guidClockId)); - ok(props.dwClockFlags == 0, "Unexpected flags %#x.\n", props.dwClockFlags); + ok(props.dwClockFlags == 0, "Unexpected flags %#lx.\n", props.dwClockFlags); ok(props.qwClockFrequency == MFCLOCK_FREQUENCY_HNS, "Unexpected frequency %s.\n", wine_dbgstr_longlong(props.qwClockFrequency)); - ok(props.dwClockTolerance == MFCLOCK_TOLERANCE_UNKNOWN, "Unexpected tolerance %u.\n", props.dwClockTolerance); - ok(props.dwClockJitter == 1, "Unexpected jitter %u.\n", props.dwClockJitter); + ok(props.dwClockTolerance == MFCLOCK_TOLERANCE_UNKNOWN, "Unexpected tolerance %lu.\n", props.dwClockTolerance); + ok(props.dwClockJitter == 1, "Unexpected jitter %lu.\n", props.dwClockJitter);
hr = IMFClock_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 == systime, "Unexpected time %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
IMFClock_Release(clock);
/* Test returned time regarding specified rate and offset. */ hr = IMFPresentationTimeSource_QueryInterface(time_source, &IID_IMFClockStateSink, (void **)&statesink); - ok(hr == S_OK, "Failed to get sink interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sink interface, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetState(time_source, 0, &state); - ok(hr == S_OK, "Failed to get state %#x.\n", hr); + ok(hr == S_OK, "Failed to get state %#lx.\n", hr); ok(state == MFCLOCK_STATE_STOPPED, "Unexpected state %d.\n", state);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 0, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 0, 0); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 0, 1); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime + 1, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockPause(statesink, 2); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 3, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockRestart(statesink, 5); - ok(hr == S_OK, "Failed to restart source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to restart source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime - 2, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockPause(statesink, 0); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == -2, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStop(statesink, 123); - ok(hr == S_OK, "Failed to stop source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to stop source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 0, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
/* Increased rate. */ hr = IMFClockStateSink_OnClockSetRate(statesink, 0, 2.0f); - 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 = IMFClockStateSink_OnClockStart(statesink, 0, 0); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockSetRate(statesink, 5, 2.0f); - 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 = IMFClockStateSink_OnClockPause(statesink, 6); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 12 && !!systime, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockRestart(statesink, 7); - ok(hr == S_OK, "Failed to restart source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to restart source, hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockPause(statesink, 8); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 14 && !!systime, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 0, 0); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 2 * systime, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(2 * systime));
hr = IMFClockStateSink_OnClockStart(statesink, 0, 10); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 2 * systime + 10, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(2 * systime));
hr = IMFClockStateSink_OnClockPause(statesink, 2); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 10 + 2 * 2, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockRestart(statesink, 5); - ok(hr == S_OK, "Failed to restart source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to restart source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 2 * systime + 14 - 5 * 2, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockPause(statesink, 0); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 4, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStop(statesink, 123); - ok(hr == S_OK, "Failed to stop source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to stop source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 0, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 10, 0); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 2 * systime - 2 * 10, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(2 * systime));
hr = IMFClockStateSink_OnClockStop(statesink, 123); - ok(hr == S_OK, "Failed to stop source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to stop source, hr %#lx.\n", hr);
hr = IMFClockStateSink_OnClockStart(statesink, 10, 20); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 2 * systime, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(2 * systime));
hr = IMFClockStateSink_OnClockPause(statesink, 2); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 2 * 2, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockRestart(statesink, 5); - ok(hr == S_OK, "Failed to restart source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to restart source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == 2 * systime + 4 - 5 * 2, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockPause(statesink, 0); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == -6, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
@@ -3761,105 +3761,105 @@ static void test_system_time_source(void)
/* PRESENTATION_CURRENT_POSITION */ 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_QueryInterface(time_source, &IID_IMFClockStateSink, (void **)&statesink); - ok(hr == S_OK, "Failed to get sink interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get sink interface, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(!time && systime, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
/* INVALID -> RUNNING */ hr = IMFClockStateSink_OnClockStart(statesink, 10, PRESENTATION_CURRENT_POSITION); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime - 10, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
/* RUNNING -> RUNNING */ hr = IMFClockStateSink_OnClockStart(statesink, 20, PRESENTATION_CURRENT_POSITION); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime - 10, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 0, PRESENTATION_CURRENT_POSITION); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime - 10, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 0, 0); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 30, PRESENTATION_CURRENT_POSITION); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
/* STOPPED -> RUNNING */ hr = IMFClockStateSink_OnClockStop(statesink, 567); - ok(hr == S_OK, "Failed to stop source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to stop source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(!time && systime != 0, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 30, PRESENTATION_CURRENT_POSITION); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime - 30, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
/* PAUSED -> RUNNING */ hr = IMFClockStateSink_OnClockPause(statesink, 8); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == (-30 + 8) && systime != 0, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 40, PRESENTATION_CURRENT_POSITION); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime + (-30 + 8 - 40), "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockPause(statesink, 7); - ok(hr == S_OK, "Failed to pause source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to pause source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == (-30 + 8 - 40 + 7) && systime != 0, "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
hr = IMFClockStateSink_OnClockStart(statesink, 50, 7); - ok(hr == S_OK, "Failed to start source, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to start source, hr %#lx.\n", hr);
hr = IMFPresentationTimeSource_GetCorrelatedTime(time_source, 0, &time, &systime); - ok(hr == S_OK, "Failed to get time %#x.\n", hr); + ok(hr == S_OK, "Failed to get time %#lx.\n", hr); ok(time == systime + (-50 + 7), "Unexpected time stamp %s, %s.\n", wine_dbgstr_longlong(time), wine_dbgstr_longlong(systime));
@@ -3877,30 +3877,30 @@ static void test_MFInvokeCallback(void) DWORD ret;
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);
callback = create_test_callback(NULL);
hr = MFCreateAsyncResult(NULL, &callback->IMFAsyncCallback_iface, NULL, &result); - ok(hr == S_OK, "Failed to create object, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create object, hr %#lx.\n", hr);
data = (MFASYNCRESULT *)result; data->hEvent = CreateEventA(NULL, FALSE, FALSE, NULL); ok(data->hEvent != NULL, "Failed to create event.\n");
hr = MFInvokeCallback(result); - ok(hr == S_OK, "Failed to invoke, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to invoke, hr %#lx.\n", hr);
ret = WaitForSingleObject(data->hEvent, 100); - ok(ret == WAIT_TIMEOUT, "Expected timeout, ret %#x.\n", ret); + ok(ret == WAIT_TIMEOUT, "Expected timeout, ret %#lx.\n", ret);
refcount = IMFAsyncResult_Release(result); - ok(!refcount, "Unexpected refcount %u.\n", refcount); + ok(!refcount, "Unexpected refcount %lu.\n", refcount);
IMFAsyncCallback_Release(&callback->IMFAsyncCallback_iface);
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_stream_descriptor(void) @@ -3914,41 +3914,41 @@ static void test_stream_descriptor(void) HRESULT hr;
hr = MFCreateStreamDescriptor(123, 0, NULL, &stream_desc); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(media_types); ++i) { hr = MFCreateMediaType(&media_types[i]); - 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 = MFCreateStreamDescriptor(123, 0, media_types, &stream_desc); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = MFCreateStreamDescriptor(123, ARRAY_SIZE(media_types), media_types, &stream_desc); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamDescriptor_GetStreamIdentifier(stream_desc, &id); - ok(hr == S_OK, "Failed to get descriptor id, hr %#x.\n", hr); - ok(id == 123, "Unexpected id %#x.\n", id); + ok(hr == S_OK, "Failed to get descriptor id, hr %#lx.\n", hr); + ok(id == 123, "Unexpected id %#lx.\n", id);
hr = IMFStreamDescriptor_GetMediaTypeHandler(stream_desc, &type_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(type_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); ok(count == ARRAY_SIZE(media_types), "Unexpected type count.\n");
hr = IMFMediaTypeHandler_GetCurrentMediaType(type_handler, &media_type); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMajorType(type_handler, &major_type); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(media_types); ++i) { hr = IMFMediaTypeHandler_GetMediaTypeByIndex(type_handler, i, &media_type); - 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(media_type == media_types[i], "Unexpected object.\n");
if (SUCCEEDED(hr)) @@ -3956,88 +3956,88 @@ static void test_stream_descriptor(void) }
hr = IMFMediaTypeHandler_GetMediaTypeByIndex(type_handler, 2, &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);
/* IsMediaTypeSupported() */
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, NULL, &media_type2); - 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, "Failed to create media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create media type, hr %#lx.\n", hr);
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);
media_type2 = (void *)0xdeadbeef; 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); ok(!media_type2, "Unexpected pointer.\n");
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 = 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);
media_type2 = (void *)0xdeadbeef; 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); ok(!media_type2, "Unexpected pointer.\n");
hr = IMFMediaTypeHandler_GetMajorType(type_handler, &major_type); - 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_Audio); - ok(hr == S_OK, "Failed to set major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set major type, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_GetMajorType(type_handler, &major_type); - 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(&major_type, &MFMediaType_Audio), "Unexpected major type.\n");
/* Mismatching major types. */ hr = IMFMediaType_SetGUID(media_type3, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set major type, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_handler, media_type3, &media_type2); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
/* Subtype missing. */ 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);
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_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_handler, media_type3, &media_type2); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
hr = IMFMediaType_SetGUID(media_type3, &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_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_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");
/* Mismatching subtype. */ hr = IMFMediaType_SetGUID(media_type3, &MF_MT_SUBTYPE, &MFAudioFormat_MP3); - 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(type_handler, media_type3, &media_type2); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
hr = IMFMediaTypeHandler_GetMediaTypeCount(type_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); ok(count == ARRAY_SIZE(media_types), "Unexpected type count.\n");
IMFMediaTypeHandler_Release(type_handler); @@ -4045,60 +4045,60 @@ static void test_stream_descriptor(void)
/* IsMediaTypeSupported() for unset current type. */ hr = MFCreateStreamDescriptor(123, ARRAY_SIZE(media_types), media_types, &stream_desc); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamDescriptor_GetMediaTypeHandler(stream_desc, &type_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_IsMediaTypeSupported(type_handler, media_type3, NULL); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
/* Initialize one from initial type set. */ hr = IMFMediaType_CopyAllItems(media_type3, (IMFAttributes *)media_types[0]); - ok(hr == S_OK, "Failed to copy attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy attributes, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_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");
hr = IMFMediaType_SetGUID(media_type3, &MF_MT_SUBTYPE, &MFAudioFormat_PCM); - ok(hr == S_OK, "Failed to copy attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy attributes, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_handler, media_type3, &media_type2); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr); ok(!media_type2, "Unexpected pointer.\n");
hr = IMFMediaType_SetGUID(media_type3, &MF_MT_SUBTYPE, &MFAudioFormat_MP3); - ok(hr == S_OK, "Failed to copy attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy attributes, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_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");
/* Now set current type that's not compatible. */ hr = IMFMediaType_SetGUID(media_type3, &MF_MT_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to copy attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy attributes, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_type3, &MF_MT_SUBTYPE, &MFVideoFormat_RGB8); - ok(hr == S_OK, "Failed to copy attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy attributes, hr %#lx.\n", hr);
hr = IMFMediaTypeHandler_SetCurrentMediaType(type_handler, media_type3); - 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_type2 = (void *)0xdeadbeef; hr = IMFMediaTypeHandler_IsMediaTypeSupported(type_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");
hr = IMFMediaType_CopyAllItems(media_types[0], (IMFAttributes *)media_type); - ok(hr == S_OK, "Failed to copy attributes, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to copy attributes, hr %#lx.\n", hr);
media_type2 = (void *)0xdeadbeef; 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 pointer.\n");
IMFMediaType_Release(media_type); @@ -4110,32 +4110,32 @@ static void test_stream_descriptor(void)
/* Major type is returned for first entry. */ hr = MFCreateMediaType(&media_types[0]); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = MFCreateMediaType(&media_types[1]); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(media_types[0], &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 = IMFMediaType_SetGUID(media_types[1], &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 = MFCreateStreamDescriptor(0, 2, media_types, &stream_desc); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFStreamDescriptor_GetMediaTypeHandler(stream_desc, &type_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_GetMajorType(type_handler, &major_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(IsEqualGUID(&major_type, &MFMediaType_Audio), "Unexpected major type %s.\n", wine_dbgstr_guid(&major_type));
hr = IMFMediaType_SetGUID(media_types[0], &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_types[1], &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_GetMajorType(type_handler, &major_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(IsEqualGUID(&major_type, &MFMediaType_Video), "Unexpected major type %s.\n", wine_dbgstr_guid(&major_type));
IMFMediaType_Release(media_types[0]); @@ -4244,7 +4244,7 @@ static void test_MFCalculateImageSize(void)
size = 1; hr = MFCalculateImageSize(&IID_IUnknown, 1, 1, &size); - ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Vista */, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG || broken(hr == S_OK) /* Vista */, "Unexpected hr %#lx.\n", hr); ok(size == 0, "Unexpected size %u.\n", size);
for (i = 0; i < ARRAY_SIZE(image_size_tests); ++i) @@ -4256,7 +4256,7 @@ static void test_MFCalculateImageSize(void) IsEqualGUID(ptr->subtype, &MFVideoFormat_A2R10G10B10);
hr = MFCalculateImageSize(ptr->subtype, ptr->width, ptr->height, &size); - ok(hr == S_OK || (is_broken && hr == E_INVALIDARG), "%u: failed to calculate image size, hr %#x.\n", i, hr); + ok(hr == S_OK || (is_broken && hr == E_INVALIDARG), "%u: failed to calculate image size, hr %#lx.\n", i, hr); ok(size == ptr->size, "%u: unexpected image size %u, expected %u. Size %u x %u, format %s.\n", i, size, ptr->size, ptr->width, ptr->height, wine_dbgstr_an((char *)&ptr->subtype->Data1, 4));
@@ -4265,8 +4265,8 @@ static void test_MFCalculateImageSize(void) unsigned int plane_size = ptr->plane_size ? ptr->plane_size : ptr->size;
hr = pMFGetPlaneSize(ptr->subtype->Data1, ptr->width, ptr->height, &plsize); - ok(hr == S_OK, "%u: failed to get plane size, hr %#x.\n", i, hr); - ok(plsize == plane_size, "%u: unexpected plane size %u, expected %u.\n", i, plsize, plane_size); + ok(hr == S_OK, "%u: failed to get plane size, hr %#lx.\n", i, hr); + ok(plsize == plane_size, "%u: unexpected plane size %lu, expected %u.\n", i, plsize, plane_size); } } } @@ -4285,8 +4285,8 @@ static void test_MFGetPlaneSize(void)
size = 1; hr = pMFGetPlaneSize(0xdeadbeef, 64, 64, &size); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(size == 0, "Unexpected size %u.\n", size); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(size == 0, "Unexpected size %lu.\n", size);
for (i = 0; i < ARRAY_SIZE(image_size_tests); ++i) { @@ -4294,8 +4294,8 @@ static void test_MFGetPlaneSize(void) unsigned int plane_size = ptr->plane_size ? ptr->plane_size : ptr->size;
hr = pMFGetPlaneSize(ptr->subtype->Data1, ptr->width, ptr->height, &size); - ok(hr == S_OK, "%u: failed to get plane size, hr %#x.\n", i, hr); - ok(size == plane_size, "%u: unexpected plane size %u, expected %u.\n", i, size, plane_size); + ok(hr == S_OK, "%u: failed to get plane size, hr %#lx.\n", i, hr); + ok(size == plane_size, "%u: unexpected plane size %lu, expected %u.\n", i, size, plane_size); } }
@@ -4306,31 +4306,31 @@ static void test_MFCompareFullToPartialMediaType(void) BOOL ret;
hr = MFCreateMediaType(&full_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(&partial_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);
ret = MFCompareFullToPartialMediaType(full_type, partial_type); ok(!ret, "Unexpected result %d.\n", ret);
hr = IMFMediaType_SetGUID(full_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set major type, hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(partial_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set major type, hr %#lx.\n", hr);
ret = MFCompareFullToPartialMediaType(full_type, partial_type); ok(ret, "Unexpected result %d.\n", ret);
hr = IMFMediaType_SetGUID(full_type, &MF_MT_SUBTYPE, &MFMediaType_Audio); - ok(hr == S_OK, "Failed to set major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set major type, hr %#lx.\n", hr);
ret = MFCompareFullToPartialMediaType(full_type, partial_type); ok(ret, "Unexpected result %d.\n", ret);
hr = IMFMediaType_SetGUID(partial_type, &MF_MT_SUBTYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set major type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set major type, hr %#lx.\n", hr);
ret = MFCompareFullToPartialMediaType(full_type, partial_type); ok(!ret, "Unexpected result %d.\n", ret); @@ -4353,35 +4353,35 @@ static void test_attributes_serialization(void) GUID guid;
hr = MFCreateAttributes(&attributes, 0); - 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 = MFCreateAttributes(&dest, 0); - 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 = MFGetAttributesAsBlobSize(attributes, &size); - ok(hr == S_OK, "Failed to get blob size, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get blob size, hr %#lx.\n", hr); ok(size == 8, "Got size %u.\n", size);
buffer = malloc(size);
hr = MFGetAttributesAsBlob(attributes, buffer, size); - ok(hr == S_OK, "Failed to serialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to serialize, hr %#lx.\n", hr);
hr = MFGetAttributesAsBlob(attributes, buffer, size - 1); - ok(hr == MF_E_BUFFERTOOSMALL, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_BUFFERTOOSMALL, "Unexpected hr %#lx.\n", hr);
hr = MFInitAttributesFromBlob(dest, buffer, size - 1); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_SetUINT32(dest, &MF_MT_MAJOR_TYPE, 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 = MFInitAttributesFromBlob(dest, buffer, size); - ok(hr == S_OK, "Failed to deserialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to deserialize, hr %#lx.\n", hr);
/* Previous items are cleared. */ hr = IMFAttributes_GetCount(dest, &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 count %u.\n", count);
free(buffer); @@ -4396,36 +4396,36 @@ static void test_attributes_serialization(void) IMFAttributes_SetBlob(attributes, &DUMMY_GUID1, blob, sizeof(blob));
hr = MFGetAttributesAsBlobSize(attributes, &size); - ok(hr == S_OK, "Failed to get blob size, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get blob size, hr %#lx.\n", hr); ok(size > 8, "Got unexpected size %u.\n", size);
buffer = malloc(size); hr = MFGetAttributesAsBlob(attributes, buffer, size); - ok(hr == S_OK, "Failed to serialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to serialize, hr %#lx.\n", hr); hr = MFInitAttributesFromBlob(dest, buffer, size); - ok(hr == S_OK, "Failed to deserialize, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to deserialize, hr %#lx.\n", hr); free(buffer);
hr = IMFAttributes_GetUINT32(dest, &MF_MT_MAJOR_TYPE, &value32); - ok(hr == S_OK, "Failed to get get uint32 value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get get uint32 value, hr %#lx.\n", hr); ok(value32 == 456, "Unexpected value %u.\n", value32); hr = IMFAttributes_GetUINT64(dest, &MF_MT_SUBTYPE, &value64); - ok(hr == S_OK, "Failed to get get uint64 value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get get uint64 value, hr %#lx.\n", hr); ok(value64 == 123, "Unexpected value.\n"); hr = IMFAttributes_GetDouble(dest, &IID_IUnknown, &value_dbl); - ok(hr == S_OK, "Failed to get get double value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get get double value, hr %#lx.\n", hr); ok(value_dbl == 0.5, "Unexpected value.\n"); hr = IMFAttributes_GetUnknown(dest, &IID_IMFAttributes, &IID_IUnknown, (void **)&obj); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr); hr = IMFAttributes_GetGUID(dest, &GUID_NULL, &guid); - ok(hr == S_OK, "Failed to get guid value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get guid value, hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &IID_IUnknown), "Unexpected guid.\n"); hr = IMFAttributes_GetAllocatedString(dest, &DUMMY_CLSID, &str, &size); - ok(hr == S_OK, "Failed to get string value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get string value, hr %#lx.\n", hr); ok(!lstrcmpW(str, L"Text"), "Unexpected string.\n"); CoTaskMemFree(str); hr = IMFAttributes_GetAllocatedBlob(dest, &DUMMY_GUID1, &buffer, &size); - ok(hr == S_OK, "Failed to get blob value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get blob value, hr %#lx.\n", hr); ok(!memcmp(buffer, blob, sizeof(blob)), "Unexpected blob.\n"); CoTaskMemFree(buffer);
@@ -4441,49 +4441,49 @@ static void test_wrapped_media_type(void) GUID guid;
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 = MFUnwrapMediaType(mediatype, &mediatype2); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT32(mediatype, &GUID_NULL, 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(mediatype, &DUMMY_GUID1, 2); - 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_MAJOR_TYPE, &MFMediaType_Video); - ok(hr == S_OK, "Failed to set GUID value, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set GUID value, hr %#lx.\n", hr);
hr = MFWrapMediaType(mediatype, &MFMediaType_Audio, &IID_IUnknown, &mediatype2); - ok(hr == S_OK, "Failed to create wrapped media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create wrapped media type, hr %#lx.\n", hr);
hr = IMFMediaType_GetGUID(mediatype2, &MF_MT_MAJOR_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_Audio), "Unexpected major type.\n");
hr = IMFMediaType_GetGUID(mediatype2, &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(IsEqualGUID(&guid, &IID_IUnknown), "Unexpected major type.\n");
hr = IMFMediaType_GetCount(mediatype2, &count); - 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(count == 3, "Unexpected count %u.\n", count);
hr = IMFMediaType_GetItemType(mediatype2, &MF_MT_WRAPPED_TYPE, &type); - ok(hr == S_OK, "Failed to get item type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get item type, hr %#lx.\n", hr); ok(type == MF_ATTRIBUTE_BLOB, "Unexpected item type.\n");
IMFMediaType_Release(mediatype);
hr = MFUnwrapMediaType(mediatype2, &mediatype); - ok(hr == S_OK, "Failed to unwrap, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unwrap, hr %#lx.\n", hr);
hr = IMFMediaType_GetGUID(mediatype, &MF_MT_MAJOR_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_GetGUID(mediatype, &MF_MT_SUBTYPE, &guid); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
IMFMediaType_Release(mediatype); IMFMediaType_Release(mediatype2); @@ -4508,36 +4508,36 @@ static void test_MFCreateWaveFormatExFromMFMediaType(void) HRESULT 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 = MFCreateWaveFormatExFromMFMediaType(mediatype, &format, &size, MFWaveFormatExConvertFlag_Normal); - 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 = MFCreateWaveFormatExFromMFMediaType(mediatype, &format, &size, MFWaveFormatExConvertFlag_Normal); - 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_SUBTYPE, &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_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);
for (i = 0; i < ARRAY_SIZE(wave_fmt_tests); ++i) { hr = IMFMediaType_SetGUID(mediatype, &MF_MT_SUBTYPE, wave_fmt_tests[i].subtype); - 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 = MFCreateWaveFormatExFromMFMediaType(mediatype, &format, &size, MFWaveFormatExConvertFlag_Normal); - ok(hr == S_OK, "Failed to create format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create format, hr %#lx.\n", hr); ok(format != NULL, "Expected format structure.\n"); ok(size == sizeof(*format), "Unexpected size %u.\n", size); ok(format->wFormatTag == wave_fmt_tests[i].format_tag, "Expected tag %u, got %u.\n", wave_fmt_tests[i].format_tag, format->wFormatTag); ok(format->nChannels == 0, "Unexpected number of channels, %u.\n", format->nChannels); - ok(format->nSamplesPerSec == 0, "Unexpected sample rate, %u.\n", format->nSamplesPerSec); - ok(format->nAvgBytesPerSec == 0, "Unexpected average data rate rate, %u.\n", format->nAvgBytesPerSec); + ok(format->nSamplesPerSec == 0, "Unexpected sample rate, %lu.\n", format->nSamplesPerSec); + ok(format->nAvgBytesPerSec == 0, "Unexpected average data rate rate, %lu.\n", format->nAvgBytesPerSec); ok(format->nBlockAlign == 0, "Unexpected alignment, %u.\n", format->nBlockAlign); ok(format->wBitsPerSample == 0, "Unexpected sample size, %u.\n", format->wBitsPerSample); ok(format->cbSize == 0, "Unexpected size field, %u.\n", format->cbSize); @@ -4545,13 +4545,13 @@ static void test_MFCreateWaveFormatExFromMFMediaType(void)
hr = MFCreateWaveFormatExFromMFMediaType(mediatype, (WAVEFORMATEX **)&format_ext, &size, MFWaveFormatExConvertFlag_ForceExtensible); - ok(hr == S_OK, "Failed to create format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create format, hr %#lx.\n", hr); ok(format_ext != NULL, "Expected format structure.\n"); ok(size == sizeof(*format_ext), "Unexpected size %u.\n", size); ok(format_ext->Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE, "Unexpected tag.\n"); ok(format_ext->Format.nChannels == 0, "Unexpected number of channels, %u.\n", format_ext->Format.nChannels); - ok(format_ext->Format.nSamplesPerSec == 0, "Unexpected sample rate, %u.\n", format_ext->Format.nSamplesPerSec); - ok(format_ext->Format.nAvgBytesPerSec == 0, "Unexpected average data rate rate, %u.\n", + ok(format_ext->Format.nSamplesPerSec == 0, "Unexpected sample rate, %lu.\n", format_ext->Format.nSamplesPerSec); + ok(format_ext->Format.nAvgBytesPerSec == 0, "Unexpected average data rate rate, %lu.\n", format_ext->Format.nAvgBytesPerSec); ok(format_ext->Format.nBlockAlign == 0, "Unexpected alignment, %u.\n", format_ext->Format.nBlockAlign); ok(format_ext->Format.wBitsPerSample == 0, "Unexpected sample size, %u.\n", format_ext->Format.wBitsPerSample); @@ -4560,7 +4560,7 @@ static void test_MFCreateWaveFormatExFromMFMediaType(void) CoTaskMemFree(format_ext);
hr = MFCreateWaveFormatExFromMFMediaType(mediatype, &format, &size, MFWaveFormatExConvertFlag_ForceExtensible + 1); - ok(hr == S_OK, "Failed to create format, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create format, hr %#lx.\n", hr); ok(size == sizeof(*format), "Unexpected size %u.\n", size); CoTaskMemFree(format); } @@ -4580,10 +4580,10 @@ static HRESULT WINAPI test_create_file_callback_Invoke(IMFAsyncCallback *iface, ok((IUnknown *)iface == IMFAsyncResult_GetStateNoAddRef(result), "Unexpected result state.\n");
hr = IMFAsyncResult_GetObject(result, &object); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = MFEndCreateFile(result, &stream); - ok(hr == S_OK, "Failed to get file stream, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get file stream, hr %#lx.\n", hr); IMFByteStream_Release(stream);
SetEvent(callback->event); @@ -4611,7 +4611,7 @@ static void test_async_create_file(void) callback = create_test_callback(&test_create_file_callback_vtbl);
hr = MFStartup(MF_VERSION, MFSTARTUP_FULL); - ok(hr == S_OK, "Fail to start up, hr %#x.\n", hr); + ok(hr == S_OK, "Fail to start up, hr %#lx.\n", hr);
callback->event = CreateEventA(NULL, FALSE, FALSE, NULL);
@@ -4620,7 +4620,7 @@ static void test_async_create_file(void)
hr = MFBeginCreateFile(MF_ACCESSMODE_READWRITE, MF_OPENMODE_DELETE_IF_EXIST, MF_FILEFLAGS_NONE, fileW, &callback->IMFAsyncCallback_iface, (IUnknown *)&callback->IMFAsyncCallback_iface, &cancel_cookie); - ok(hr == S_OK, "Async create request failed, hr %#x.\n", hr); + ok(hr == S_OK, "Async create request failed, hr %#lx.\n", hr); ok(cancel_cookie != NULL, "Unexpected cancellation object.\n");
WaitForSingleObject(callback->event, INFINITE); @@ -4630,7 +4630,7 @@ static void test_async_create_file(void) CloseHandle(callback->event);
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);
IMFAsyncCallback_Release(&callback->IMFAsyncCallback_iface);
@@ -4891,34 +4891,34 @@ static void test_local_handlers(void) }
hr = pMFRegisterLocalSchemeHandler(NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = pMFRegisterLocalSchemeHandler(localW, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = pMFRegisterLocalSchemeHandler(NULL, &local_activate); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = pMFRegisterLocalSchemeHandler(localW, &local_activate); - ok(hr == S_OK, "Failed to register scheme handler, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register scheme handler, hr %#lx.\n", hr);
hr = pMFRegisterLocalSchemeHandler(localW, &local_activate); - ok(hr == S_OK, "Failed to register scheme handler, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register scheme handler, hr %#lx.\n", hr);
hr = pMFRegisterLocalByteStreamHandler(NULL, NULL, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = pMFRegisterLocalByteStreamHandler(NULL, NULL, &local_activate); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = pMFRegisterLocalByteStreamHandler(NULL, localW, &local_activate); - ok(hr == S_OK, "Failed to register stream handler, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register stream handler, hr %#lx.\n", hr);
hr = pMFRegisterLocalByteStreamHandler(localW, NULL, &local_activate); - ok(hr == S_OK, "Failed to register stream handler, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register stream handler, hr %#lx.\n", hr);
hr = pMFRegisterLocalByteStreamHandler(localW, localW, &local_activate); - ok(hr == S_OK, "Failed to register stream handler, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register stream handler, hr %#lx.\n", hr); }
static void test_create_property_store(void) @@ -4932,13 +4932,13 @@ static void test_create_property_store(void) HRESULT hr;
hr = CreatePropertyStore(NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CreatePropertyStore(&store); - ok(hr == S_OK, "Failed to create property store, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create property store, hr %#lx.\n", hr);
hr = CreatePropertyStore(&store2); - ok(hr == S_OK, "Failed to create property store, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create property store, hr %#lx.\n", hr); ok(store2 != store, "Expected different store objects.\n"); IPropertyStore_Release(store2);
@@ -4946,77 +4946,77 @@ static void test_create_property_store(void) check_interface(store, &IID_IPersistSerializedPropStorage, FALSE);
hr = IPropertyStore_GetCount(store, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
count = 0xdeadbeef; hr = IPropertyStore_GetCount(store, &count); - ok(hr == S_OK, "Failed to get count, hr %#x.\n", hr); - ok(!count, "Unexpected count %u.\n", count); + ok(hr == S_OK, "Failed to get count, hr %#lx.\n", hr); + ok(!count, "Unexpected count %lu.\n", count);
hr = IPropertyStore_Commit(store); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IPropertyStore_GetAt(store, 0, &key); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IPropertyStore_GetValue(store, NULL, &value); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IPropertyStore_GetValue(store, &test_pkey, NULL); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IPropertyStore_GetValue(store, &test_pkey, &value); - ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
memset(&value, 0, sizeof(PROPVARIANT)); value.vt = VT_I4; value.lVal = 0xdeadbeef; hr = IPropertyStore_SetValue(store, &test_pkey, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (0) { /* crashes on Windows */ hr = IPropertyStore_SetValue(store, NULL, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); }
hr = IPropertyStore_GetCount(store, &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 = IPropertyStore_Commit(store); - ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
hr = IPropertyStore_GetAt(store, 0, &key); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!memcmp(&key, &test_pkey, sizeof(PROPERTYKEY)), "Keys didn't match.\n");
hr = IPropertyStore_GetAt(store, 1, &key); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
memset(&value, 0xcc, sizeof(PROPVARIANT)); hr = IPropertyStore_GetValue(store, &test_pkey, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(value.vt == VT_I4, "Unexpected type %u.\n", value.vt); - ok(value.lVal == 0xdeadbeef, "Unexpected value %#x.\n", value.lVal); + ok(value.lVal == 0xdeadbeef, "Unexpected value %#lx.\n", value.lVal);
memset(&value, 0, sizeof(PROPVARIANT)); hr = IPropertyStore_SetValue(store, &test_pkey, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IPropertyStore_GetCount(store, &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);
memset(&value, 0xcc, sizeof(PROPVARIANT)); hr = IPropertyStore_GetValue(store, &test_pkey, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(value.vt == VT_EMPTY, "Unexpected type %u.\n", value.vt); - ok(!value.lVal, "Unexpected value %#x.\n", value.lVal); + ok(!value.lVal, "Unexpected value %#lx.\n", value.lVal);
refcount = IPropertyStore_Release(store); - ok(!refcount, "Unexpected refcount %u.\n", refcount); + ok(!refcount, "Unexpected refcount %lu.\n", refcount); }
struct test_thread_param @@ -5062,184 +5062,184 @@ static void test_dxgi_device_manager(void) }
hr = pMFCreateDXGIDeviceManager(NULL, &manager); - ok(hr == E_POINTER, "MFCreateDXGIDeviceManager should failed: %#x.\n", hr); + ok(hr == E_POINTER, "MFCreateDXGIDeviceManager should failed: %#lx.\n", hr);
token = 0; hr = pMFCreateDXGIDeviceManager(&token, NULL); - ok(hr == E_POINTER, "MFCreateDXGIDeviceManager should failed: %#x.\n", hr); + ok(hr == E_POINTER, "MFCreateDXGIDeviceManager should failed: %#lx.\n", hr); ok(!token, "got wrong token: %u.\n", token);
hr = pMFCreateDXGIDeviceManager(&token, &manager); - ok(hr == S_OK, "MFCreateDXGIDeviceManager failed: %#x.\n", hr); + ok(hr == S_OK, "MFCreateDXGIDeviceManager failed: %#lx.\n", hr); EXPECT_REF(manager, 1); ok(!!token, "got wrong token: %u.\n", token);
Sleep(50); token2 = 0; hr = pMFCreateDXGIDeviceManager(&token2, &manager2); - ok(hr == S_OK, "MFCreateDXGIDeviceManager failed: %#x.\n", hr); + ok(hr == S_OK, "MFCreateDXGIDeviceManager failed: %#lx.\n", hr); EXPECT_REF(manager2, 1); ok(token2 && token2 != token, "got wrong token: %u, %u.\n", token2, token); ok(manager != manager2, "got wrong pointer: %p.\n", manager2); EXPECT_REF(manager, 1);
hr = IMFDXGIDeviceManager_GetVideoService(manager, NULL, &IID_ID3D11Device, (void **)&unk); - ok(hr == MF_E_DXGI_DEVICE_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_DXGI_DEVICE_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_OpenDeviceHandle(manager, &handle); - ok(hr == MF_E_DXGI_DEVICE_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_DXGI_DEVICE_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, 0); - ok(hr == E_HANDLE, "Unexpected hr %#x.\n", hr); + ok(hr == E_HANDLE, "Unexpected hr %#lx.\n", hr);
hr = pD3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, D3D11_CREATE_DEVICE_VIDEO_SUPPORT, NULL, 0, D3D11_SDK_VERSION, &d3d11_dev, NULL, NULL); - ok(hr == S_OK, "D3D11CreateDevice failed: %#x.\n", hr); + ok(hr == S_OK, "D3D11CreateDevice failed: %#lx.\n", hr); EXPECT_REF(d3d11_dev, 1);
hr = IMFDXGIDeviceManager_ResetDevice(manager, (IUnknown *)d3d11_dev, token - 1); - ok(hr == E_INVALIDARG, "IMFDXGIDeviceManager_ResetDevice should failed: %#x.\n", hr); + ok(hr == E_INVALIDARG, "IMFDXGIDeviceManager_ResetDevice should failed: %#lx.\n", hr); EXPECT_REF(d3d11_dev, 1);
hr = IMFDXGIDeviceManager_ResetDevice(manager, NULL, token); - ok(hr == E_INVALIDARG, "IMFDXGIDeviceManager_ResetDevice should failed: %#x.\n", hr); + ok(hr == E_INVALIDARG, "IMFDXGIDeviceManager_ResetDevice should failed: %#lx.\n", hr);
hr = IMFDXGIDeviceManager_ResetDevice(manager, (IUnknown *)d3d11_dev, token); - ok(hr == S_OK, "IMFDXGIDeviceManager_ResetDevice failed: %#x.\n", hr); + ok(hr == S_OK, "IMFDXGIDeviceManager_ResetDevice failed: %#lx.\n", hr); EXPECT_REF(manager, 1); EXPECT_REF(d3d11_dev, 2);
hr = IMFDXGIDeviceManager_ResetDevice(manager, (IUnknown *)manager2, token); - ok(hr == E_INVALIDARG, "IMFDXGIDeviceManager_ResetDevice should failed: %#x.\n", hr); + ok(hr == E_INVALIDARG, "IMFDXGIDeviceManager_ResetDevice should failed: %#lx.\n", hr); EXPECT_REF(manager2, 1); EXPECT_REF(d3d11_dev, 2);
hr = IMFDXGIDeviceManager_ResetDevice(manager, (IUnknown *)d3d11_dev, token); - ok(hr == S_OK, "IMFDXGIDeviceManager_ResetDevice failed: %#x.\n", hr); + ok(hr == S_OK, "IMFDXGIDeviceManager_ResetDevice failed: %#lx.\n", hr); EXPECT_REF(manager, 1); EXPECT_REF(d3d11_dev, 2);
/* GetVideoService() on device change. */ handle = NULL; hr = IMFDXGIDeviceManager_OpenDeviceHandle(manager, &handle); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!handle, "Unexpected handle value %p.\n", handle);
hr = pD3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, NULL, 0, D3D11_SDK_VERSION, &d3d11_dev2, NULL, NULL); - ok(hr == S_OK, "D3D11CreateDevice failed: %#x.\n", hr); + ok(hr == S_OK, "D3D11CreateDevice failed: %#lx.\n", hr); EXPECT_REF(d3d11_dev2, 1); hr = IMFDXGIDeviceManager_ResetDevice(manager, (IUnknown *)d3d11_dev2, token); - ok(hr == S_OK, "IMFDXGIDeviceManager_ResetDevice failed: %#x.\n", hr); + ok(hr == S_OK, "IMFDXGIDeviceManager_ResetDevice failed: %#lx.\n", hr); EXPECT_REF(manager, 1); EXPECT_REF(d3d11_dev2, 2); EXPECT_REF(d3d11_dev, 1);
hr = IMFDXGIDeviceManager_GetVideoService(manager, handle, &IID_ID3D11Device, (void **)&unk); - ok(hr == MF_E_DXGI_NEW_VIDEO_DEVICE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_DXGI_NEW_VIDEO_DEVICE, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, handle); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
handle = NULL; hr = IMFDXGIDeviceManager_OpenDeviceHandle(manager, &handle); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!handle, "Unexpected handle value %p.\n", handle);
hr = IMFDXGIDeviceManager_GetVideoService(manager, NULL, &IID_ID3D11Device, (void **)&unk); - ok(hr == E_HANDLE, "Unexpected hr %#x.\n", hr); + ok(hr == E_HANDLE, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_GetVideoService(manager, handle, &IID_ID3D11Device, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unk);
hr = IMFDXGIDeviceManager_GetVideoService(manager, handle, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unk);
hr = IMFDXGIDeviceManager_GetVideoService(manager, handle, &IID_IDXGIDevice, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IUnknown_Release(unk);
handle1 = NULL; hr = IMFDXGIDeviceManager_OpenDeviceHandle(manager, &handle1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(handle != handle1, "Unexpected handle.\n");
hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, handle); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Already closed. */ hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, handle); - ok(hr == E_HANDLE, "Unexpected hr %#x.\n", hr); + ok(hr == E_HANDLE, "Unexpected hr %#lx.\n", hr);
handle = NULL; hr = IMFDXGIDeviceManager_OpenDeviceHandle(manager, &handle); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, handle1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_TestDevice(manager, handle1); - ok(hr == E_HANDLE, "Unexpected hr %#x.\n", hr); + ok(hr == E_HANDLE, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_LockDevice(manager, handle, &IID_ID3D11Device, (void **)&device, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(device == d3d11_dev2, "Unexpected device pointer.\n"); ID3D11Device_Release(device);
hr = IMFDXGIDeviceManager_UnlockDevice(manager, handle, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_UnlockDevice(manager, handle, FALSE); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_UnlockDevice(manager, UlongToHandle(100), FALSE); - ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
/* Locked with one handle, unlock with another. */ hr = IMFDXGIDeviceManager_OpenDeviceHandle(manager, &handle1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_LockDevice(manager, handle, &IID_ID3D11Device, (void **)&device, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_UnlockDevice(manager, handle1, FALSE); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
ID3D11Device_Release(device);
/* Closing unlocks the device. */ hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, handle); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_LockDevice(manager, handle1, &IID_ID3D11Device, (void **)&device, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ID3D11Device_Release(device);
hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, handle1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Open two handles. */ hr = IMFDXGIDeviceManager_OpenDeviceHandle(manager, &handle); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_OpenDeviceHandle(manager, &handle1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_LockDevice(manager, handle, &IID_ID3D11Device, (void **)&device, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ID3D11Device_Release(device);
hr = IMFDXGIDeviceManager_LockDevice(manager, handle1, &IID_ID3D11Device, (void **)&device, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ID3D11Device_Release(device);
hr = IMFDXGIDeviceManager_UnlockDevice(manager, handle, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_UnlockDevice(manager, handle, FALSE); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
param.manager = manager; param.handle = handle; @@ -5247,18 +5247,18 @@ static void test_dxgi_device_manager(void) thread = CreateThread(NULL, 0, test_device_manager_thread, ¶m, 0, NULL); ok(!WaitForSingleObject(thread, 1000), "Wait for a test thread failed.\n"); GetExitCodeThread(thread, (DWORD *)&hr); - ok(hr == MF_E_DXGI_VIDEO_DEVICE_LOCKED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_DXGI_VIDEO_DEVICE_LOCKED, "Unexpected hr %#lx.\n", hr); CloseHandle(thread);
hr = IMFDXGIDeviceManager_UnlockDevice(manager, handle1, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_UnlockDevice(manager, handle1, FALSE); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Lock on main thread, unlock on another. */ hr = IMFDXGIDeviceManager_LockDevice(manager, handle, &IID_ID3D11Device, (void **)&device, FALSE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ID3D11Device_Release(device);
param.manager = manager; @@ -5267,14 +5267,14 @@ static void test_dxgi_device_manager(void) thread = CreateThread(NULL, 0, test_device_manager_thread, ¶m, 0, NULL); ok(!WaitForSingleObject(thread, 1000), "Wait for a test thread failed.\n"); GetExitCodeThread(thread, (DWORD *)&hr); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); CloseHandle(thread);
hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, handle1); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_CloseDeviceHandle(manager, handle); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFDXGIDeviceManager_Release(manager); EXPECT_REF(d3d11_dev2, 1); @@ -5296,10 +5296,10 @@ static void test_MFCreateTransformActivate(void) }
hr = pMFCreateTransformActivate(&activate); - ok(hr == S_OK, "Failed to create activator, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create activator, hr %#lx.\n", hr);
hr = IMFActivate_GetCount(activate, &count); - ok(hr == S_OK, "Failed to get count, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get count, hr %#lx.\n", hr); ok(!count, "Unexpected attribute count %u.\n", count);
IMFActivate_Release(activate); @@ -5368,49 +5368,49 @@ static void test_MFTRegisterLocal(void) input_types[0].guidMajorType = MFMediaType_Audio; input_types[0].guidSubtype = MFAudioFormat_PCM; hr = pMFTRegisterLocal(&test_factory, &MFT_CATEGORY_OTHER, L"Local MFT name", 0, 1, input_types, 0, NULL); - ok(hr == S_OK, "Failed to register MFT, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register MFT, hr %#lx.\n", hr);
hr = pMFTRegisterLocal(&test_factory, &MFT_CATEGORY_OTHER, L"Local MFT name", 0, 1, input_types, 0, NULL); - ok(hr == S_OK, "Failed to register MFT, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register MFT, hr %#lx.\n", hr);
hr = pMFTEnumEx(MFT_CATEGORY_OTHER, MFT_ENUM_FLAG_LOCALMFT, NULL, NULL, &activate, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(count > 0, "Unexpected count %u.\n", count); CoTaskMemFree(activate);
hr = pMFTUnregisterLocal(&test_factory); - ok(hr == S_OK, "Failed to unregister MFT, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unregister MFT, hr %#lx.\n", hr);
hr = pMFTEnumEx(MFT_CATEGORY_OTHER, MFT_ENUM_FLAG_LOCALMFT, NULL, NULL, &activate, &count2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(count2 < count, "Unexpected count %u.\n", count2); CoTaskMemFree(activate);
hr = pMFTUnregisterLocal(&test_factory); - ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
hr = pMFTUnregisterLocal(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = pMFTRegisterLocalByCLSID(&MFT_CATEGORY_OTHER, &MFT_CATEGORY_OTHER, L"Local MFT name 2", 0, 1, input_types, 0, NULL); - ok(hr == S_OK, "Failed to register MFT, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register MFT, hr %#lx.\n", hr);
hr = MFTGetInfo(MFT_CATEGORY_OTHER, &name, &in_types, &count, &out_types, &count2, &attributes); - ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
hr = pMFTUnregisterLocal(NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = pMFTUnregisterLocalByCLSID(MFT_CATEGORY_OTHER); - ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
hr = pMFTRegisterLocalByCLSID(&MFT_CATEGORY_OTHER, &MFT_CATEGORY_OTHER, L"Local MFT name 2", 0, 1, input_types, 0, NULL); - ok(hr == S_OK, "Failed to register MFT, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register MFT, hr %#lx.\n", hr);
hr = pMFTUnregisterLocalByCLSID(MFT_CATEGORY_OTHER); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); }
static void test_queue_com(void) @@ -5479,16 +5479,16 @@ static HRESULT WINAPI test_queue_com_state_callback_Invoke(IMFAsyncCallback *ifa HRESULT hr;
hr = pCoGetApartmentType(&com_type, &qualifier); - ok(SUCCEEDED(hr), "Failed to get apartment type, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to get apartment type, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { todo_wine { if (callback->param == MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION) ok(com_type == APTTYPE_MAINSTA && qualifier == APTTYPEQUALIFIER_NONE, - "%#x: unexpected type %u, qualifier %u.\n", callback->param, com_type, qualifier); + "%#lx: unexpected type %u, qualifier %u.\n", callback->param, com_type, qualifier); else ok(com_type == APTTYPE_MTA && qualifier == APTTYPEQUALIFIER_NONE, - "%#x: unexpected type %u, qualifier %u.\n", callback->param, com_type, qualifier); + "%#lx: unexpected type %u, qualifier %u.\n", callback->param, com_type, qualifier); } }
@@ -5515,13 +5515,13 @@ static void test_queue_com_state(const char *name) callback->event = CreateEventA(NULL, FALSE, FALSE, NULL);
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);
if (name[0] == 's') { callback->param = name[1] - '0'; hr = MFPutWorkItem(callback->param, &callback->IMFAsyncCallback_iface, NULL); - ok(SUCCEEDED(hr), "Failed to queue work item, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to queue work item, hr %#lx.\n", hr); WaitForSingleObject(callback->event, INFINITE); } else if (name[0] == 'u') @@ -5530,24 +5530,24 @@ static void test_queue_com_state(const char *name)
hr = pMFAllocateWorkQueueEx(queue_type, &queue); ok(hr == S_OK || broken(queue_type == MF_MULTITHREADED_WORKQUEUE && hr == E_INVALIDARG) /* Win7 */, - "Failed to allocate a queue of type %u, hr %#x.\n", queue_type, hr); + "Failed to allocate a queue of type %lu, hr %#lx.\n", queue_type, hr);
if (SUCCEEDED(hr)) { callback->param = queue; hr = MFPutWorkItem(queue, &callback->IMFAsyncCallback_iface, NULL); - ok(SUCCEEDED(hr), "Failed to queue work item, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Failed to queue work item, hr %#lx.\n", hr); WaitForSingleObject(callback->event, INFINITE);
hr = MFUnlockWorkQueue(queue); - ok(hr == S_OK, "Failed to unlock the queue, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock the queue, hr %#lx.\n", hr); } }
CloseHandle(callback->event);
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);
IMFAsyncCallback_Release(&callback->IMFAsyncCallback_iface); } @@ -5622,13 +5622,13 @@ static void test_MFGetStrideForBitmapInfoHeader(void) }
hr = pMFGetStrideForBitmapInfoHeader(MAKEFOURCC('H','2','6','4'), 1, &stride); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(stride_tests); ++i) { hr = pMFGetStrideForBitmapInfoHeader(stride_tests[i].subtype->Data1, stride_tests[i].width, &stride); - ok(hr == S_OK, "%u: failed to get stride, hr %#x.\n", i, hr); - ok(stride == stride_tests[i].stride, "%u: format %s, unexpected stride %d, expected %d.\n", i, + ok(hr == S_OK, "%u: failed to get stride, hr %#lx.\n", i, hr); + ok(stride == stride_tests[i].stride, "%u: format %s, unexpected stride %ld, expected %ld.\n", i, wine_dbgstr_an((char *)&stride_tests[i].subtype->Data1, 4), stride, stride_tests[i].stride); } } @@ -5706,160 +5706,160 @@ static void test_MFCreate2DMediaBuffer(void) }
hr = pMFCreate2DMediaBuffer(2, 3, MAKEFOURCC('H','2','6','4'), FALSE, &buffer); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = pMFCreate2DMediaBuffer(2, 3, MAKEFOURCC('N','V','1','2'), FALSE, NULL); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
/* YUV formats can't be bottom-up. */ hr = pMFCreate2DMediaBuffer(2, 3, MAKEFOURCC('N','V','1','2'), TRUE, &buffer); - ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDMEDIATYPE, "Unexpected hr %#lx.\n", hr);
hr = pMFCreate2DMediaBuffer(2, 3, MAKEFOURCC('N','V','1','2'), FALSE, &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);
check_interface(buffer, &IID_IMFGetService, TRUE); check_interface(buffer, &IID_IMF2DBuffer, TRUE);
/* Full backing buffer size, with 64 bytes per row alignment. */ hr = IMFMediaBuffer_GetMaxLength(buffer, &max_length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(max_length > 0, "Unexpected length %u.\n", max_length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(max_length > 0, "Unexpected length %lu.\n", max_length);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length); - ok(hr == S_OK, "Failed to get current length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get current length, hr %#lx.\n", hr); ok(!length, "Unexpected length.\n");
hr = IMFMediaBuffer_SetCurrentLength(buffer, 10); - ok(hr == S_OK, "Failed to set current length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set current length, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length); - ok(hr == S_OK, "Failed to get current length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get current length, hr %#lx.\n", hr); ok(length == 10, "Unexpected length.\n");
/* Linear lock/unlock. */
hr = IMFMediaBuffer_Lock(buffer, NULL, &max_length, &length); - ok(FAILED(hr), "Unexpected hr %#x.\n", hr); + ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
/* Linear locking call returns plane size.*/ hr = IMFMediaBuffer_Lock(buffer, &data, &max_length, &length); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr); ok(max_length == length, "Unexpected length.\n");
length = 0; pMFGetPlaneSize(MAKEFOURCC('N','V','1','2'), 2, 3, &length); - ok(max_length == length && length == 9, "Unexpected length %u.\n", length); + ok(max_length == length && length == 9, "Unexpected length %lu.\n", length);
/* Already locked */ hr = IMFMediaBuffer_Lock(buffer, &data2, NULL, NULL); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr); ok(data2 == data, "Unexpected pointer.\n");
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&_2dbuffer); - 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 = IMF2DBuffer_GetContiguousLength(_2dbuffer, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_GetContiguousLength(_2dbuffer, &length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(length == 9, "Unexpected length %u.\n", length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(length == 9, "Unexpected length %lu.\n", length);
hr = IMF2DBuffer_IsContiguousFormat(_2dbuffer, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* 2D lock. */ hr = IMF2DBuffer_Lock2D(_2dbuffer, &data, &pitch); - ok(hr == MF_E_UNEXPECTED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_GetScanline0AndPitch(_2dbuffer, &data, &pitch); - ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer_GetScanline0AndPitch(_2dbuffer, &data, &pitch); - ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Lock2D(_2dbuffer, NULL, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Lock2D(_2dbuffer, &data, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Lock2D(_2dbuffer, NULL, &pitch); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Lock2D(_2dbuffer, &data, &pitch); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr); ok(!!data, "Expected data pointer.\n"); - ok(pitch == 64, "Unexpected pitch %d.\n", pitch); + ok(pitch == 64, "Unexpected pitch %ld.\n", pitch);
hr = IMF2DBuffer_Lock2D(_2dbuffer, &data2, &pitch); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr); ok(data == data2, "Expected data pointer.\n");
hr = IMF2DBuffer_GetScanline0AndPitch(_2dbuffer, NULL, &pitch); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_GetScanline0AndPitch(_2dbuffer, &data, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Active 2D lock */ hr = IMFMediaBuffer_Lock(buffer, &data2, NULL, NULL); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = IMFMediaBuffer_Lock(buffer, &data2, NULL, NULL); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer2, (void **)&_2dbuffer2); - ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), "Failed to get interface, hr %#lx.\n", hr);
if (SUCCEEDED(hr)) { hr = IMF2DBuffer_Lock2D(_2dbuffer, &data, &pitch); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer2_Lock2DSize(_2dbuffer2, MF2DBuffer_LockFlags_Read, &data2, &pitch, &buffer_start, &length); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
/* Flags are ignored. */ hr = IMF2DBuffer2_Lock2DSize(_2dbuffer2, MF2DBuffer_LockFlags_Read, &data2, &pitch, &buffer_start, &length); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer2_Lock2DSize(_2dbuffer2, MF2DBuffer_LockFlags_Write, &data2, &pitch, &buffer_start, &length); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer2_Lock2DSize(_2dbuffer2, MF2DBuffer_LockFlags_Write, &data2, &pitch, NULL, &length); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer2_Lock2DSize(_2dbuffer2, MF2DBuffer_LockFlags_Write, &data2, &pitch, &buffer_start, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IMF2DBuffer2_Release(_2dbuffer2); } @@ -5875,44 +5875,44 @@ static void test_MFCreate2DMediaBuffer(void) const struct _2d_buffer_test *ptr = &_2d_buffer_tests[i];
hr = pMFCreate2DMediaBuffer(ptr->width, ptr->height, ptr->fourcc, FALSE, &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 = IMFMediaBuffer_GetMaxLength(buffer, &length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (ptr->max_length) - ok(length == ptr->max_length, "%u: unexpected maximum length %u for %u x %u, format %s.\n", + ok(length == ptr->max_length, "%u: unexpected maximum length %lu for %u x %u, format %s.\n", i, length, ptr->width, ptr->height, wine_dbgstr_an((char *)&ptr->fourcc, 4));
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&_2dbuffer); - 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 = IMF2DBuffer_GetContiguousLength(_2dbuffer, &length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(length == ptr->contiguous_length, "%d: unexpected contiguous length %u for %u x %u, format %s.\n", + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(length == ptr->contiguous_length, "%d: unexpected contiguous length %lu for %u x %u, format %s.\n", i, length, ptr->width, ptr->height, wine_dbgstr_an((char *)&ptr->fourcc, 4));
hr = IMFMediaBuffer_Lock(buffer, &data, &length2, NULL); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); - ok(length2 == ptr->contiguous_length, "%d: unexpected linear buffer length %u for %u x %u, format %s.\n", + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr); + ok(length2 == ptr->contiguous_length, "%d: unexpected linear buffer length %lu for %u x %u, format %s.\n", i, length2, ptr->width, ptr->height, wine_dbgstr_an((char *)&ptr->fourcc, 4));
memset(data, 0xff, length2);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
hr = pMFGetPlaneSize(ptr->fourcc, ptr->width, ptr->height, &length2); - ok(hr == S_OK, "Failed to get plane size, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get plane size, hr %#lx.\n", hr); if (ptr->plane_multiplier) length2 *= ptr->plane_multiplier; - ok(length2 == length, "%d: contiguous length %u does not match plane size %u, %u x %u, format %s.\n", i, length, + ok(length2 == length, "%d: contiguous length %lu does not match plane size %lu, %u x %u, format %s.\n", i, length, length2, ptr->width, ptr->height, wine_dbgstr_an((char *)&ptr->fourcc, 4));
hr = IMF2DBuffer_Lock2D(_2dbuffer, &data, &pitch); - ok(hr == S_OK, "Failed to lock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to lock buffer, hr %#lx.\n", hr);
hr = IMF2DBuffer_GetScanline0AndPitch(_2dbuffer, &data2, &pitch2); - ok(hr == S_OK, "Failed to get scanline, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get scanline, hr %#lx.\n", hr); ok(data2 == data, "Unexpected data pointer.\n"); ok(pitch == pitch2, "Unexpected pitch.\n");
@@ -5922,7 +5922,7 @@ static void test_MFCreate2DMediaBuffer(void) ok(data[j * pitch + k] == 0xff, "Unexpected byte %02x at test %d row %d column %d.\n", data[j * pitch + k], i, j, k);
hr = pMFGetStrideForBitmapInfoHeader(ptr->fourcc, ptr->width, &stride); - ok(hr == S_OK, "Failed to get stride, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get stride, hr %#lx.\n", hr);
/* secondary planes */ switch (ptr->fourcc) @@ -5955,14 +5955,14 @@ static void test_MFCreate2DMediaBuffer(void) }
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == S_OK, "Failed to unlock buffer, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to unlock buffer, hr %#lx.\n", hr);
- ok(pitch == ptr->pitch, "%d: unexpected pitch %d, expected %d, %u x %u, format %s.\n", i, pitch, ptr->pitch, + ok(pitch == ptr->pitch, "%d: unexpected pitch %ld, expected %d, %u x %u, format %s.\n", i, pitch, ptr->pitch, ptr->width, ptr->height, wine_dbgstr_an((char *)&ptr->fourcc, 4));
ret = TRUE; hr = IMF2DBuffer_IsContiguousFormat(_2dbuffer, &ret); - ok(hr == S_OK, "Failed to get format flag, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get format flag, hr %#lx.\n", hr); ok(!ret, "%d: unexpected format flag %d.\n", i, ret);
IMF2DBuffer_Release(_2dbuffer); @@ -6003,35 +6003,35 @@ static void test_MFCreateMediaBufferFromMediaType(void) }
hr = pMFCreateMediaBufferFromMediaType(NULL, 0, 0, 0, &buffer); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "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);
for (i = 0; i < ARRAY_SIZE(audio_tests); ++i) { const struct audio_buffer_test *ptr = &audio_tests[i];
hr = IMFMediaType_SetUINT32(media_type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, ptr->block_alignment); - 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_AVG_BYTES_PER_SECOND, ptr->bytes_per_second); - 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 = pMFCreateMediaBufferFromMediaType(media_type, ptr->duration * 10000000, ptr->min_length, ptr->min_alignment, &buffer); - ok(hr == S_OK || broken(FAILED(hr)) /* Win8 */, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK || broken(FAILED(hr)) /* Win8 */, "Unexpected hr %#lx.\n", hr); if (FAILED(hr)) break;
check_interface(buffer, &IID_IMFGetService, FALSE);
hr = IMFMediaBuffer_GetMaxLength(buffer, &length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(ptr->buffer_length == length, "%d: unexpected buffer length %u, expected %u.\n", i, length, ptr->buffer_length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(ptr->buffer_length == length, "%d: unexpected buffer length %lu, expected %u.\n", i, length, ptr->buffer_length);
IMFMediaBuffer_Release(buffer); } @@ -6046,11 +6046,11 @@ static void validate_media_type(IMFMediaType *mediatype, const WAVEFORMATEX *for HRESULT hr;
hr = IMFMediaType_GetMajorType(mediatype, &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 = IMFMediaType_GetGUID(mediatype, &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);
if (format->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { @@ -6060,14 +6060,14 @@ static void validate_media_type(IMFMediaType *mediatype, const WAVEFORMATEX *for if (fex->dwChannelMask) { hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_CHANNEL_MASK, &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 == fex->dwChannelMask, "Unexpected CHANNEL_MASK %#x.\n", value); }
if (format->wBitsPerSample && fex->Samples.wValidBitsPerSample) { hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_VALID_BITS_PER_SAMPLE, &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 == fex->Samples.wValidBitsPerSample, "Unexpected VALID_BITS_PER_SAMPLE %#x.\n", value); } } @@ -6078,42 +6078,42 @@ static void validate_media_type(IMFMediaType *mediatype, const WAVEFORMATEX *for ok(IsEqualGUID(&guid, &subtype), "Unexpected subtype %s.\n", wine_dbgstr_guid(&guid));
hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_PREFER_WAVEFORMATEX, &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, "Unexpected value.\n"); }
if (format->nChannels) { hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_NUM_CHANNELS, &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 == format->nChannels, "Unexpected NUM_CHANNELS %u.\n", value); }
if (format->nSamplesPerSec) { hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &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 == format->nSamplesPerSec, "Unexpected SAMPLES_PER_SECOND %u.\n", value); }
if (format->nAvgBytesPerSec) { hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, &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 == format->nAvgBytesPerSec, "Unexpected AVG_BYTES_PER_SECOND %u.\n", value); }
if (format->nBlockAlign) { hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_BLOCK_ALIGNMENT, &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 == format->nBlockAlign, "Unexpected BLOCK_ALIGNMENT %u.\n", value); }
if (format->wBitsPerSample) { hr = IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_BITS_PER_SAMPLE, &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 == format->wBitsPerSample, "Unexpected BITS_PER_SAMPLE %u.\n", value); }
@@ -6122,7 +6122,7 @@ static void validate_media_type(IMFMediaType *mediatype, const WAVEFORMATEX *for if (IsEqualGUID(&guid, &MFAudioFormat_Float) || IsEqualGUID(&guid, &MFAudioFormat_PCM)) { - 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, "Unexpected ALL_SAMPLES_INDEPENDENT value.\n"); } else @@ -6168,12 +6168,12 @@ static void test_MFInitMediaTypeFromWaveFormatEx(void) HRESULT hr;
hr = MFCreateMediaType(&mediatype); - ok(hr == S_OK, "Failed to create mediatype, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create mediatype, hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(waveformatex_tests); ++i) { hr = MFInitMediaTypeFromWaveFormatEx(mediatype, &waveformatex_tests[i], sizeof(waveformatex_tests[i])); - ok(hr == S_OK, "%d: format %#x, failed to initialize media type, hr %#x.\n", i, waveformatex_tests[i].wFormatTag, hr); + ok(hr == S_OK, "%d: format %#x, failed to initialize media type, hr %#lx.\n", i, waveformatex_tests[i].wFormatTag, hr);
validate_media_type(mediatype, &waveformatex_tests[i]);
@@ -6186,10 +6186,10 @@ static void test_MFInitMediaTypeFromWaveFormatEx(void) waveformatext.SubFormat.Data1 = waveformatex_tests[i].wFormatTag;
hr = MFInitMediaTypeFromWaveFormatEx(mediatype, &waveformatext.Format, sizeof(waveformatext)); - ok(hr == S_OK, "Failed to initialize media type, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to initialize media type, hr %#lx.\n", hr);
hr = IMFMediaType_GetItem(mediatype, &MF_MT_USER_DATA, NULL); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
validate_media_type(mediatype, &waveformatext.Format); } @@ -6209,11 +6209,11 @@ static void test_MFInitMediaTypeFromWaveFormatEx(void) mp3format.nCodecDelay = 0;
hr = MFInitMediaTypeFromWaveFormatEx(mediatype, (WAVEFORMATEX *)&mp3format, sizeof(mp3format)); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
validate_media_type(mediatype, &mp3format.wfx); hr = IMFMediaType_GetBlob(mediatype, &MF_MT_USER_DATA, buff, sizeof(buff), &size); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(size == mp3format.wfx.cbSize, "Unexpected size %u.\n", size); ok(!memcmp(buff, (WAVEFORMATEX *)&mp3format + 1, size), "Unexpected user data.\n");
@@ -6228,10 +6228,10 @@ static void test_MFCreateMFVideoFormatFromMFMediaType(void) HRESULT 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 = MFCreateMFVideoFormatFromMFMediaType(media_type, &video_format, &size); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!video_format, "Unexpected format.\n"); ok(video_format->dwSize == size && size == sizeof(*video_format), "Unexpected size %u.\n", size); CoTaskMemFree(video_format); @@ -6272,19 +6272,19 @@ static void test_MFCreateDXSurfaceBuffer(void) }
hr = IDirect3DDevice9_GetSwapChain(device, 0, &swapchain); - ok(SUCCEEDED(hr), "Failed to get the implicit swapchain (%08x)\n", hr); + ok(SUCCEEDED(hr), "Failed to get the implicit swapchain (%08lx)\n", hr);
hr = IDirect3DSwapChain9_GetBackBuffer(swapchain, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); - ok(SUCCEEDED(hr), "Failed to get the back buffer (%08x)\n", hr); + ok(SUCCEEDED(hr), "Failed to get the back buffer (%08lx)\n", hr); ok(backbuffer != NULL, "The back buffer is NULL\n");
IDirect3DSwapChain9_Release(swapchain);
hr = pMFCreateDXSurfaceBuffer(&IID_IUnknown, (IUnknown *)backbuffer, FALSE, &buffer); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = pMFCreateDXSurfaceBuffer(&IID_IDirect3DSurface9, (IUnknown *)backbuffer, FALSE, &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);
check_interface(buffer, &IID_IMF2DBuffer, TRUE); check_interface(buffer, &IID_IMF2DBuffer2, TRUE); @@ -6292,116 +6292,116 @@ static void test_MFCreateDXSurfaceBuffer(void)
/* Surface is accessible. */ hr = IMFMediaBuffer_QueryInterface(buffer, &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, &MR_BUFFER_SERVICE, &IID_IDirect3DSurface9, (void **)&surface); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(surface == backbuffer, "Unexpected surface pointer.\n"); IDirect3DSurface9_Release(surface); IMFGetService_Release(gs);
max_length = 0; hr = IMFMediaBuffer_GetMaxLength(buffer, &max_length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!!max_length, "Unexpected length %u.\n", max_length); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!max_length, "Unexpected length %lu.\n", max_length);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(!length, "Unexpected length %u.\n", length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(!length, "Unexpected length %lu.\n", length);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 2 * max_length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(length == 2 * max_length, "Unexpected length %u.\n", length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(length == 2 * max_length, "Unexpected length %lu.\n", length);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, &length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(length == max_length, "Unexpected length.\n");
/* Unlock twice. */ hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#lx.\n", hr);
/* Lock twice. */ hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Lock(buffer, &data2, NULL, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(data == data2, "Unexpected pointer.\n");
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&_2dbuffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Unlocked. */ hr = IMF2DBuffer_GetScanline0AndPitch(_2dbuffer, &data, &pitch); - ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Lock2D(_2dbuffer, &data, &pitch); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_GetScanline0AndPitch(_2dbuffer, &data, &pitch); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Lock(buffer, &data2, NULL, NULL); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Lock2D(_2dbuffer, &data, &pitch); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2dbuffer); - ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_IsContiguousFormat(_2dbuffer, &value); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!value, "Unexpected return value %d.\n", value);
hr = IMF2DBuffer_GetContiguousLength(_2dbuffer, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); hr = IMF2DBuffer_GetContiguousLength(_2dbuffer, &length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(length == max_length, "Unexpected length %u.\n", length); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(length == max_length, "Unexpected length %lu.\n", length);
IMF2DBuffer_Release(_2dbuffer);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer2, (void **)&_2dbuffer2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer2_Lock2DSize(_2dbuffer2, MF2DBuffer_LockFlags_Read, &data, &pitch, &data2, &length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(data == data2, "Unexpected scanline pointer.\n"); memset(data, 0xab, 4); IMF2DBuffer2_Unlock2D(_2dbuffer2);
hr = IMF2DBuffer2_Lock2DSize(_2dbuffer2, MF2DBuffer_LockFlags_Write, &data, &pitch, &data2, &length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(data[0] == 0xab, "Unexpected leading byte.\n"); IMF2DBuffer2_Unlock2D(_2dbuffer2);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(data[0] == 0xab, "Unexpected leading byte.\n"); hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer2_Lock2DSize(_2dbuffer2, MF2DBuffer_LockFlags_ReadWrite, &data, &pitch, &data2, &length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMF2DBuffer2_Unlock2D(_2dbuffer2);
IMF2DBuffer2_Release(_2dbuffer2); @@ -6429,14 +6429,14 @@ static void test_MFCreateTrackedSample(void) }
hr = pMFCreateTrackedSample(&tracked_sample); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* It's actually a sample. */ hr = IMFTrackedSample_QueryInterface(tracked_sample, &IID_IMFSample, (void **)&sample); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTrackedSample_QueryInterface(tracked_sample, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(unk == (IUnknown *)sample, "Unexpected pointer.\n"); IUnknown_Release(unk);
@@ -6474,12 +6474,12 @@ static void test_MFFrameRateToAverageTimePerFrame(void)
avgtime = 1; hr = MFFrameRateToAverageTimePerFrame(0, 0, &avgtime); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!avgtime, "Unexpected frame time.\n");
avgtime = 1; hr = MFFrameRateToAverageTimePerFrame(0, 1001, &avgtime); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!avgtime, "Unexpected frame time.\n");
for (i = 0; i < ARRAY_SIZE(frame_rate_tests); ++i) @@ -6487,7 +6487,7 @@ static void test_MFFrameRateToAverageTimePerFrame(void) avgtime = 0; hr = MFFrameRateToAverageTimePerFrame(frame_rate_tests[i].numerator, frame_rate_tests[i].denominator, &avgtime); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(avgtime == frame_rate_tests[i].avgtime, "%u: unexpected frame time %s, expected %s.\n", i, wine_dbgstr_longlong(avgtime), wine_dbgstr_longlong(frame_rate_tests[i].avgtime)); } @@ -6526,14 +6526,14 @@ static void test_MFAverageTimePerFrameToFrameRate(void)
numerator = denominator = 1; hr = MFAverageTimePerFrameToFrameRate(0, &numerator, &denominator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!numerator && !denominator, "Unexpected output %u/%u.\n", numerator, denominator);
for (i = 0; i < ARRAY_SIZE(frame_rate_tests); ++i) { numerator = denominator = 12345; hr = MFAverageTimePerFrameToFrameRate(frame_rate_tests[i].avgtime, &numerator, &denominator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(numerator == frame_rate_tests[i].numerator && denominator == frame_rate_tests[i].denominator, "%u: unexpected %u/%u, expected %u/%u.\n", i, numerator, denominator, frame_rate_tests[i].numerator, frame_rate_tests[i].denominator); @@ -6606,7 +6606,7 @@ static void test_MFMapDXGIFormatToDX9Format(void) for (i = 0; i < ARRAY_SIZE(formats_map); ++i) { format = pMFMapDXGIFormatToDX9Format(formats_map[i].dxgi_format); - ok(format == formats_map[i].d3d9_format, "Unexpected d3d9 format %#x, dxgi format %#x.\n", format, formats_map[i].dxgi_format); + ok(format == formats_map[i].d3d9_format, "Unexpected d3d9 format %#lx, dxgi format %#x.\n", format, formats_map[i].dxgi_format); } }
@@ -6670,7 +6670,7 @@ static void test_MFMapDX9FormatToDXGIFormat(void) for (i = 0; i < ARRAY_SIZE(formats_map); ++i) { format = pMFMapDX9FormatToDXGIFormat(formats_map[i].d3d9_format); - ok(format == formats_map[i].dxgi_format, "Unexpected DXGI format %#x, d3d9 format %#x.\n", + ok(format == formats_map[i].dxgi_format, "Unexpected DXGI format %#x, d3d9 format %#lx.\n", format, formats_map[i].d3d9_format); } } @@ -6719,13 +6719,13 @@ static IMFMediaType * create_video_type(const GUID *subtype) HRESULT hr;
hr = MFCreateMediaType(&video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetGUID(video_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(video_type, &MF_MT_SUBTYPE, subtype); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
return video_type; } @@ -6826,10 +6826,10 @@ static void test_d3d11_surface_buffer(void) desc.SampleDesc.Quality = 0;
hr = ID3D11Device_CreateTexture2D(device, &desc, NULL, &texture); - ok(hr == S_OK, "Failed to create a texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a texture, hr %#lx.\n", hr);
hr = pMFCreateDXGISurfaceBuffer(&IID_ID3D11Texture2D, (IUnknown *)texture, 0, FALSE, &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);
check_interface(buffer, &IID_IMF2DBuffer, TRUE); check_interface(buffer, &IID_IMF2DBuffer2, TRUE); @@ -6838,150 +6838,150 @@ static void test_d3d11_surface_buffer(void)
max_length = 0; hr = IMFMediaBuffer_GetMaxLength(buffer, &max_length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!!max_length, "Unexpected length %u.\n", max_length); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!max_length, "Unexpected length %lu.\n", max_length);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &cur_length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(!cur_length, "Unexpected length %u.\n", cur_length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(!cur_length, "Unexpected length %lu.\n", cur_length);
hr = IMFMediaBuffer_SetCurrentLength(buffer, 2 * max_length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr);
hr = IMFMediaBuffer_GetCurrentLength(buffer, &cur_length); - ok(hr == S_OK, "Failed to get length, hr %#x.\n", hr); - ok(cur_length == 2 * max_length, "Unexpected length %u.\n", cur_length); + ok(hr == S_OK, "Failed to get length, hr %#lx.\n", hr); + ok(cur_length == 2 * max_length, "Unexpected length %lu.\n", cur_length);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&_2d_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_GetContiguousLength(_2d_buffer, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr); hr = IMF2DBuffer_GetContiguousLength(_2d_buffer, &length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(length == max_length, "Unexpected length %u.\n", length); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(length == max_length, "Unexpected length %lu.\n", length); IMF2DBuffer_Release(_2d_buffer);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFDXGIBuffer, (void **)&dxgi_buffer); - ok(hr == S_OK, "Failed to get interface, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get interface, hr %#lx.\n", hr);
EXPECT_REF(texture, 2); hr = IMFDXGIBuffer_GetResource(dxgi_buffer, &IID_ID3D11Texture2D, (void **)&obj); - ok(hr == S_OK, "Failed to get resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get resource, hr %#lx.\n", hr); EXPECT_REF(texture, 3); ok(obj == (IUnknown *)texture, "Unexpected resource pointer.\n"); IUnknown_Release(obj);
hr = IMFDXGIBuffer_GetSubresourceIndex(dxgi_buffer, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIBuffer_GetSubresourceIndex(dxgi_buffer, &index); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(index == 0, "Unexpected subresource index.\n");
hr = IMFDXGIBuffer_SetUnknown(dxgi_buffer, &IID_IMFDXGIBuffer, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIBuffer_SetUnknown(dxgi_buffer, &IID_IMFDXGIBuffer, (void *)device); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIBuffer_SetUnknown(dxgi_buffer, &IID_IMFDXGIBuffer, (void *)device); - ok(hr == HRESULT_FROM_WIN32(ERROR_OBJECT_ALREADY_EXISTS), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_OBJECT_ALREADY_EXISTS), "Unexpected hr %#lx.\n", hr);
hr = ID3D11Texture2D_GetPrivateData(texture, &IID_IMFDXGIBuffer, &size, &data); - ok(hr == DXGI_ERROR_NOT_FOUND, "Unexpected hr %#x.\n", hr); + ok(hr == DXGI_ERROR_NOT_FOUND, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIBuffer_GetUnknown(dxgi_buffer, &IID_IMFDXGIBuffer, &IID_ID3D11Device, (void **)&obj); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(obj == (IUnknown *)device, "Unexpected pointer.\n"); IUnknown_Release(obj);
hr = IMFDXGIBuffer_SetUnknown(dxgi_buffer, &IID_IMFDXGIBuffer, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFDXGIBuffer_GetUnknown(dxgi_buffer, &IID_IMFDXGIBuffer, &IID_IUnknown, (void **)&obj); - ok(hr == MF_E_NOT_FOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_FOUND, "Unexpected hr %#lx.\n", hr);
IMFDXGIBuffer_Release(dxgi_buffer);
/* Texture updates. */ color = get_d3d11_texture_color(texture, 0, 0); - ok(!color, "Unexpected texture color %#x.\n", color); + ok(!color, "Unexpected texture color %#lx.\n", color);
max_length = cur_length = 0; data = NULL; hr = IMFMediaBuffer_Lock(buffer, &data, &max_length, &cur_length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(max_length && max_length == cur_length, "Unexpected length %u.\n", max_length); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(max_length && max_length == cur_length, "Unexpected length %lu.\n", max_length); if (data) *(DWORD *)data = ~0u;
color = get_d3d11_texture_color(texture, 0, 0); - ok(!color, "Unexpected texture color %#x.\n", color); + ok(!color, "Unexpected texture color %#lx.\n", color);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
color = get_d3d11_texture_color(texture, 0, 0); - ok(color == ~0u, "Unexpected texture color %#x.\n", color); + ok(color == ~0u, "Unexpected texture color %#lx.\n", color);
hr = IMFMediaBuffer_Lock(buffer, &data, &max_length, &cur_length); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(*(DWORD *)data == ~0u, "Unexpected buffer %#x.\n", *(DWORD *)data); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(*(DWORD *)data == ~0u, "Unexpected buffer %#lx.\n", *(DWORD *)data);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Lock2D()/Unlock2D() */ hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&_2d_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_GetScanline0AndPitch(_2d_buffer, &data2, &pitch2); - ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Lock2D(_2d_buffer, &data, &pitch); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!!data && pitch == desc.Width * 4, "Unexpected pitch %d.\n", pitch); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!data && pitch == desc.Width * 4, "Unexpected pitch %ld.\n", pitch);
hr = IMF2DBuffer_Lock2D(_2d_buffer, &data, &pitch); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!!data && pitch == desc.Width * 4, "Unexpected pitch %d.\n", pitch); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!data && pitch == desc.Width * 4, "Unexpected pitch %ld.\n", pitch);
hr = IMF2DBuffer_GetScanline0AndPitch(_2d_buffer, &data2, &pitch2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(data2 == data && pitch2 == pitch, "Unexpected data/pitch.\n");
hr = IMFMediaBuffer_Lock(buffer, &data, &max_length, &cur_length); - ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_INVALIDREQUEST, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2d_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2d_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Unlock2D(_2d_buffer); - ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_WAS_UNLOCKED), "Unexpected hr %#lx.\n", hr);
IMF2DBuffer_Release(_2d_buffer); IMFMediaBuffer_Release(buffer);
/* Bottom up. */ hr = pMFCreateDXGISurfaceBuffer(&IID_ID3D11Texture2D, (IUnknown *)texture, 0, TRUE, &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 = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&_2d_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMF2DBuffer_Lock2D(_2d_buffer, &data, &pitch); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!!data && pitch == desc.Width * 4, "Unexpected pitch %d.\n", pitch); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!!data && pitch == desc.Width * 4, "Unexpected pitch %ld.\n", pitch);
hr = IMF2DBuffer_GetScanline0AndPitch(_2d_buffer, &data2, &pitch2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(data2 == data && pitch2 == pitch, "Unexpected data/pitch.\n");
hr = IMF2DBuffer_Unlock2D(_2d_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMF2DBuffer_Release(_2d_buffer); IMFMediaBuffer_Release(buffer); @@ -6990,13 +6990,13 @@ static void test_d3d11_surface_buffer(void)
/* Subresource index 1. */ hr = ID3D11Device_CreateTexture2D(device, &desc, NULL, &texture); - ok(hr == S_OK, "Failed to create a texture, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create a texture, hr %#lx.\n", hr);
hr = pMFCreateDXGISurfaceBuffer(&IID_ID3D11Texture2D, (IUnknown *)texture, 1, FALSE, &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 = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&_2d_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Pitch reflects top level. */ memset(buff, 0, sizeof(buff)); @@ -7004,12 +7004,12 @@ static void test_d3d11_surface_buffer(void) update_d3d11_texture(texture, 1, buff, 64 * 4);
hr = IMF2DBuffer_Lock2D(_2d_buffer, &data, &pitch); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(pitch == desc.Width * 4, "Unexpected pitch %d.\n", pitch); - ok(*(DWORD *)data == 0xff00ff00, "Unexpected color %#x.\n", *(DWORD *)data); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(pitch == desc.Width * 4, "Unexpected pitch %ld.\n", pitch); + ok(*(DWORD *)data == 0xff00ff00, "Unexpected color %#lx.\n", *(DWORD *)data);
hr = IMF2DBuffer_Unlock2D(_2d_buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMF2DBuffer_Release(_2d_buffer); IMFMediaBuffer_Release(buffer); @@ -7056,7 +7056,7 @@ static void test_d3d12_surface_buffer(void)
hr = ID3D12Device_CreateCommittedResource(device, &heap_props, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_RENDER_TARGET, NULL, &IID_ID3D12Resource, (void **)&resource); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = pMFCreateDXGISurfaceBuffer(&IID_ID3D12Resource, (IUnknown *)resource, 0, FALSE, &buffer); if (hr == E_INVALIDARG) @@ -7065,7 +7065,7 @@ static void test_d3d12_surface_buffer(void) win_skip("D3D12 resource buffers are not supported.\n"); goto notsupported; } - 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);
if (SUCCEEDED(hr)) { @@ -7075,10 +7075,10 @@ if (SUCCEEDED(hr)) check_interface(buffer, &IID_IMFGetService, FALSE);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFDXGIBuffer, (void **)&dxgi_buffer); - 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 = IMFDXGIBuffer_GetResource(dxgi_buffer, &IID_ID3D12Resource, (void **)&obj); - ok(hr == S_OK, "Failed to get resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get resource, hr %#lx.\n", hr); ok(obj == (IUnknown *)resource, "Unexpected resource pointer.\n"); IUnknown_Release(obj);
@@ -7111,7 +7111,7 @@ static void test_sample_allocator_sysmem(void) return;
hr = pMFCreateVideoSampleAllocatorEx(&IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(unk, &IID_IMFVideoSampleAllocator, TRUE); check_interface(unk, &IID_IMFVideoSampleAllocatorEx, TRUE); @@ -7120,123 +7120,123 @@ static void test_sample_allocator_sysmem(void) IUnknown_Release(unk);
hr = pMFCreateVideoSampleAllocatorEx(&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_cb); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_SetCallback(allocator_cb, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_SetCallback(allocator_cb, &test_notify); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_SetCallback(allocator_cb, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
count = 10; hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!count, "Unexpected count %d.\n", count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!count, "Unexpected count %ld.\n", count);
hr = IMFVideoSampleAllocator_UninitializeSampleAllocator(allocator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
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);
hr = IMFVideoSampleAllocator_SetDirectXManager(allocator, 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, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 2, media_type); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
video_type = create_video_type(&MFVideoFormat_RGB32); video_type2 = create_video_type(&MFVideoFormat_RGB32);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 2, video_type); - ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
/* Frame size is required. */ hr = IMFMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64) 320 << 32 | 240); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaType_SetUINT64(video_type2, &MF_MT_FRAME_SIZE, (UINT64) 320 << 32 | 240); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 0, video_type); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(video_type, 1); hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 1, video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(video_type, 2);
hr = IMFMediaType_SetUINT64(video_type2, &IID_IUnknown, (UINT64) 320 << 32 | 240); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* Setting identical type does not replace it. */ hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 1, video_type2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(video_type, 2); EXPECT_REF(video_type2, 1);
hr = IMFMediaType_SetUINT64(video_type2, &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 = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 1, video_type2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(video_type2, 2); EXPECT_REF(video_type, 1);
/* Modify referenced type. */ hr = IMFMediaType_SetUINT64(video_type2, &MF_MT_FRAME_SIZE, (UINT64) 320 << 32 | 64); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 1, video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(video_type, 2); EXPECT_REF(video_type2, 1);
count = 0; hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(count == 1, "Unexpected count %d.\n", count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(count == 1, "Unexpected count %ld.\n", count);
sample = NULL; hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); refcount = get_refcount(sample);
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!count, "Unexpected count %d.\n", count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!count, "Unexpected count %ld.\n", count);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample2); - ok(hr == MF_E_SAMPLEALLOCATOR_EMPTY, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SAMPLEALLOCATOR_EMPTY, "Unexpected hr %#lx.\n", hr);
/* Reinitialize with active sample. */ hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 2, video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(refcount == get_refcount(sample), "Unexpected refcount %u.\n", get_refcount(sample)); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(refcount == get_refcount(sample), "Unexpected refcount %lu.\n", get_refcount(sample)); EXPECT_REF(video_type, 2);
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); todo_wine - ok(!count, "Unexpected count %d.\n", count); + ok(!count, "Unexpected count %ld.\n", count);
check_interface(sample, &IID_IMFTrackedSample, TRUE); check_interface(sample, &IID_IMFDesiredSample, FALSE);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(buffer, &IID_IMF2DBuffer, TRUE); check_interface(buffer, &IID_IMF2DBuffer2, TRUE); @@ -7246,72 +7246,72 @@ static void test_sample_allocator_sysmem(void) IMFMediaBuffer_Release(buffer);
hr = IMFSample_GetBufferCount(sample, &buffer_count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(buffer_count == 1, "Unexpected buffer count %u.\n", buffer_count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(buffer_count == 1, "Unexpected buffer count %lu.\n", buffer_count);
IMFSample_Release(sample);
hr = IMFVideoSampleAllocator_UninitializeSampleAllocator(allocator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); todo_wine EXPECT_REF(video_type, 2);
hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(!count, "Unexpected count %d.\n", count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(!count, "Unexpected count %ld.\n", 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_cb); IMFVideoSampleAllocator_Release(allocator);
/* IMFVideoSampleAllocatorEx */ hr = MFCreateAttributes(&attributes, 0); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = pMFCreateVideoSampleAllocatorEx(&IID_IMFVideoSampleAllocatorEx, (void **)&allocatorex); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorEx_QueryInterface(allocatorex, &IID_IMFVideoSampleAllocatorCallback, (void **)&allocator_cb); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx(allocatorex, 1, 0, NULL, video_type); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_SetUINT32(attributes, &MF_SA_BUFFERS_PER_SAMPLE, 2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorEx_AllocateSample(allocatorex, &sample); - ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_NOT_INITIALIZED, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(attributes, 1); hr = IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx(allocatorex, 0, 0, attributes, video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(attributes, 2);
count = 0; hr = IMFVideoSampleAllocatorCallback_GetFreeSampleCount(allocator_cb, &count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(count == 1, "Unexpected count %d.\n", count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(count == 1, "Unexpected count %ld.\n", count);
hr = IMFVideoSampleAllocatorEx_AllocateSample(allocatorex, &sample); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetBufferCount(sample, &buffer_count); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(buffer_count == 2, "Unexpected buffer count %u.\n", buffer_count); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(buffer_count == 2, "Unexpected buffer count %lu.\n", buffer_count);
hr = IMFVideoSampleAllocatorEx_AllocateSample(allocatorex, &sample2); - ok(hr == MF_E_SAMPLEALLOCATOR_EMPTY, "Unexpected hr %#x.\n", hr); + ok(hr == MF_E_SAMPLEALLOCATOR_EMPTY, "Unexpected hr %#lx.\n", hr);
/* Reinitialize with already allocated samples. */ hr = IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx(allocatorex, 0, 0, NULL, video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(attributes, 1);
hr = IMFVideoSampleAllocatorEx_AllocateSample(allocatorex, &sample2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); IMFSample_Release(sample2);
IMFSample_Release(sample); @@ -7347,34 +7347,34 @@ static void test_sample_allocator_d3d9(void) }
hr = DXVA2CreateDirect3DDeviceManager9(&token, &d3d9_manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirect3DDeviceManager9_ResetDevice(d3d9_manager, d3d9_device, token); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = pMFCreateVideoSampleAllocatorEx(&IID_IMFVideoSampleAllocator, (void **)&allocator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_SetDirectXManager(allocator, (IUnknown *)d3d9_manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
video_type = create_video_type(&MFVideoFormat_RGB32);
/* Frame size is required. */ hr = IMFMediaType_SetUINT64(video_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 = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 1, video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(sample, &IID_IMFTrackedSample, TRUE); check_interface(sample, &IID_IMFDesiredSample, FALSE);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(buffer, &IID_IMF2DBuffer, TRUE); check_interface(buffer, &IID_IMF2DBuffer2, TRUE); @@ -7433,31 +7433,31 @@ static void test_sample_allocator_d3d11(void) }
hr = pMFCreateDXGIDeviceManager(&token, &manager); - ok(hr == S_OK, "Failed to create device manager, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create device manager, hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_ResetDevice(manager, (IUnknown *)device, token); - ok(hr == S_OK, "Failed to set a device, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set a device, hr %#lx.\n", hr);
hr = pMFCreateVideoSampleAllocatorEx(&IID_IMFVideoSampleAllocator, (void **)&allocator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(manager, 1); hr = IMFVideoSampleAllocator_SetDirectXManager(allocator, (IUnknown *)manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(manager, 2);
video_type = create_video_type(&MFVideoFormat_RGB32); hr = IMFMediaType_SetUINT64(video_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 = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 1, video_type); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(buffer, &IID_IMF2DBuffer, TRUE); check_interface(buffer, &IID_IMF2DBuffer2, TRUE); @@ -7465,10 +7465,10 @@ static void test_sample_allocator_d3d11(void) check_interface(buffer, &IID_IMFGetService, FALSE);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFDXGIBuffer, (void **)&dxgi_buffer); - 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 = IMFDXGIBuffer_GetResource(dxgi_buffer, &IID_ID3D11Texture2D, (void **)&texture); - ok(hr == S_OK, "Failed to get resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get resource, hr %#lx.\n", hr);
ID3D11Texture2D_GetDesc(texture, &desc); ok(desc.Width == 64, "Unexpected width %u.\n", desc.Width); @@ -7488,10 +7488,10 @@ static void test_sample_allocator_d3d11(void) IMFDXGIBuffer_Release(dxgi_buffer);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_Unlock(buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IMFSample_Release(sample);
@@ -7499,42 +7499,42 @@ static void test_sample_allocator_d3d11(void)
/* MF_SA_D3D11_USAGE */ 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);
for (i = 0; i < ARRAY_SIZE(usage); ++i) { hr = pMFCreateVideoSampleAllocatorEx(&IID_IMFVideoSampleAllocatorEx, (void **)&allocatorex); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorEx_SetDirectXManager(allocatorex, (IUnknown *)manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_SetUINT32(attributes, &MF_SA_D3D11_USAGE, usage[i]); - 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 = IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx(allocatorex, 0, 0, attributes, video_type); if (usage[i] == D3D11_USAGE_IMMUTABLE || usage[i] > D3D11_USAGE_STAGING) { - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); IMFVideoSampleAllocatorEx_Release(allocatorex); continue; } - ok(hr == S_OK, "%u: Unexpected hr %#x.\n", usage[i], hr); + ok(hr == S_OK, "%u: Unexpected hr %#lx.\n", usage[i], hr);
hr = IMFAttributes_SetUINT32(attributes, &MF_SA_D3D11_USAGE, D3D11_USAGE_DEFAULT); - 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 = IMFVideoSampleAllocatorEx_AllocateSample(allocatorex, &sample); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFDXGIBuffer, (void **)&dxgi_buffer); - 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 = IMFDXGIBuffer_GetResource(dxgi_buffer, &IID_ID3D11Texture2D, (void **)&texture); - ok(hr == S_OK, "Failed to get resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get resource, hr %#lx.\n", hr);
ID3D11Texture2D_GetDesc(texture, &desc); ok(desc.Usage == usage[i], "Unexpected usage %u.\n", desc.Usage); @@ -7570,50 +7570,50 @@ static void test_sample_allocator_d3d11(void) for (i = 0; i < ARRAY_SIZE(sharing); ++i) { hr = pMFCreateVideoSampleAllocatorEx(&IID_IMFVideoSampleAllocatorEx, (void **)&allocatorex); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocatorEx_SetDirectXManager(allocatorex, (IUnknown *)manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_DeleteAllItems(attributes); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFAttributes_SetUINT32(attributes, &MF_SA_D3D11_USAGE, D3D11_USAGE_DEFAULT); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr);
if (sharing[i] & D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX) { hr = IMFAttributes_SetUINT32(attributes, &MF_SA_D3D11_SHARED, TRUE); - ok(hr == S_OK, "Failed to set attribute, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set attribute, hr %#lx.\n", hr); }
if (sharing[i] & D3D11_RESOURCE_MISC_SHARED) { hr = IMFAttributes_SetUINT32(attributes, &MF_SA_D3D11_SHARED_WITHOUT_MUTEX, TRUE); - 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 = IMFVideoSampleAllocatorEx_InitializeSampleAllocatorEx(allocatorex, 0, 0, attributes, video_type); if (sharing[i] == (D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX | D3D11_RESOURCE_MISC_SHARED)) { todo_wine - ok(hr == E_INVALIDARG, "%u: Unexpected hr %#x.\n", i, hr); + ok(hr == E_INVALIDARG, "%u: Unexpected hr %#lx.\n", i, hr); IMFVideoSampleAllocatorEx_Release(allocatorex); continue; } - ok(hr == S_OK, "%u: Unexpected hr %#x.\n", i, hr); + ok(hr == S_OK, "%u: Unexpected hr %#lx.\n", i, hr);
hr = IMFVideoSampleAllocatorEx_AllocateSample(allocatorex, &sample); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFDXGIBuffer, (void **)&dxgi_buffer); - 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 = IMFDXGIBuffer_GetResource(dxgi_buffer, &IID_ID3D11Texture2D, (void **)&texture); - ok(hr == S_OK, "Failed to get resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get resource, hr %#lx.\n", hr);
ID3D11Texture2D_GetDesc(texture, &desc); ok(desc.MiscFlags == sharing[i], "%u: unexpected misc flags %#x.\n", i, desc.MiscFlags); @@ -7656,7 +7656,7 @@ static void test_sample_allocator_d3d12(void) }
hr = pMFCreateDXGIDeviceManager(&token, &manager); - ok(hr == S_OK, "Failed to create device manager, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create device manager, hr %#lx.\n", hr);
hr = IMFDXGIDeviceManager_ResetDevice(manager, (IUnknown *)device, token); if (FAILED(hr)) @@ -7664,32 +7664,32 @@ static void test_sample_allocator_d3d12(void) win_skip("Device manager does not support D3D12 devices.\n"); goto done; } - ok(hr == S_OK, "Failed to set a device, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to set a device, hr %#lx.\n", hr);
hr = pMFCreateVideoSampleAllocatorEx(&IID_IMFVideoSampleAllocator, (void **)&allocator); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(manager, 1); hr = IMFVideoSampleAllocator_SetDirectXManager(allocator, (IUnknown *)manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); EXPECT_REF(manager, 2);
video_type = create_video_type(&MFVideoFormat_RGB32); hr = IMFMediaType_SetUINT64(video_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(video_type, &MF_MT_D3D_RESOURCE_VERSION, MF_D3D12_RESOURCE); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoSampleAllocator_InitializeSampleAllocator(allocator, 1, video_type); todo_wine - ok(hr == S_OK || broken(hr == MF_E_UNEXPECTED) /* Some Win10 versions fail. */, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == MF_E_UNEXPECTED) /* Some Win10 versions fail. */, "Unexpected hr %#lx.\n", hr); if (FAILED(hr)) goto done;
hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
check_interface(buffer, &IID_IMF2DBuffer, TRUE); check_interface(buffer, &IID_IMF2DBuffer2, TRUE); @@ -7697,10 +7697,10 @@ static void test_sample_allocator_d3d12(void) check_interface(buffer, &IID_IMFGetService, FALSE);
hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFDXGIBuffer, (void **)&dxgi_buffer); - 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 = IMFDXGIBuffer_GetResource(dxgi_buffer, &IID_ID3D12Resource, (void **)&resource); - ok(hr == S_OK, "Failed to get resource, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to get resource, hr %#lx.\n", hr);
resource->lpVtbl->GetDesc(resource, &desc); ok(desc.Width == 64, "Unexpected width.\n"); @@ -7714,7 +7714,7 @@ static void test_sample_allocator_d3d12(void) ok(!desc.Flags, "Unexpected flags %#x.\n", desc.Flags);
hr = ID3D12Resource_GetHeapProperties(resource, &heap_props, &heap_flags); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(heap_props.Type == D3D12_HEAP_TYPE_DEFAULT, "Unexpected heap type %u.\n", heap_props.Type); ok(heap_props.CPUPageProperty == D3D12_CPU_PAGE_PROPERTY_UNKNOWN, "Unexpected page property %u.\n", heap_props.CPUPageProperty); @@ -7744,17 +7744,17 @@ static void test_MFLockSharedWorkQueue(void) }
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 = pMFLockSharedWorkQueue(NULL, 0, &taskid, &queue); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = pMFLockSharedWorkQueue(NULL, 0, NULL, &queue); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
taskid = 0; hr = pMFLockSharedWorkQueue(L"", 0, &taskid, &queue); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
queue = 0; hr = pMFLockSharedWorkQueue(L"", 0, NULL, &queue); @@ -7762,17 +7762,17 @@ static void test_MFLockSharedWorkQueue(void)
queue2 = 0; hr = pMFLockSharedWorkQueue(L"", 0, NULL, &queue2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(queue == queue2, "Unexpected queue %#x.\n", queue2); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); + ok(queue == queue2, "Unexpected queue %#lx.\n", queue2);
hr = MFUnlockWorkQueue(queue2); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = MFUnlockWorkQueue(queue); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
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_MFllMulDiv(void) @@ -7825,25 +7825,25 @@ static void test_shared_dxgi_device_manager(void) }
hr = pMFUnlockDXGIDeviceManager(); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
manager = NULL; hr = pMFLockDXGIDeviceManager(NULL, &manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(!!manager, "Unexpected instance.\n");
hr = pMFLockDXGIDeviceManager(&token, &manager); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(manager, 3);
hr = pMFUnlockDXGIDeviceManager(); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(manager, 2);
hr = pMFUnlockDXGIDeviceManager(); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); }
static void check_video_format(const MFVIDEOFORMAT *format, unsigned int width, unsigned int height, @@ -7873,8 +7873,8 @@ static void check_video_format(const MFVIDEOFORMAT *format, unsigned int width, guid.Data1 = d3dformat;
ok(format->dwSize == sizeof(*format), "Unexpected format size.\n"); - ok(format->videoInfo.dwWidth == width, "Unexpected width %u.\n", format->videoInfo.dwWidth); - ok(format->videoInfo.dwHeight == height, "Unexpected height %u.\n", format->videoInfo.dwHeight); + ok(format->videoInfo.dwWidth == width, "Unexpected width %lu.\n", format->videoInfo.dwWidth); + ok(format->videoInfo.dwHeight == height, "Unexpected height %lu.\n", format->videoInfo.dwHeight); ok(format->videoInfo.PixelAspectRatio.Numerator == 1 && format->videoInfo.PixelAspectRatio.Denominator == 1, "Unexpected PAR.\n"); ok(format->videoInfo.SourceChromaSubsampling == MFVideoChromaSubsampling_Unknown, "Unexpected chroma subsampling.\n"); @@ -7888,7 +7888,7 @@ static void check_video_format(const MFVIDEOFORMAT *format, unsigned int width, ok(format->videoInfo.SourceLighting == MFVideoLighting_office, "Unexpected source lighting %u.\n", format->videoInfo.SourceLighting); ok(format->videoInfo.FramesPerSecond.Numerator == 60 && - format->videoInfo.FramesPerSecond.Denominator == 1, "Unexpected frame rate %u/%u.\n", + format->videoInfo.FramesPerSecond.Denominator == 1, "Unexpected frame rate %lu/%lu.\n", format->videoInfo.FramesPerSecond.Numerator, format->videoInfo.FramesPerSecond.Denominator); ok(format->videoInfo.NominalRange == MFNominalRange_Normal, "Unexpected nominal range %u.\n", format->videoInfo.NominalRange); @@ -7903,8 +7903,8 @@ static void check_video_format(const MFVIDEOFORMAT *format, unsigned int width, ok(format->compressedInfo.AvgBitrate == 0, "Unexpected bitrate.\n"); ok(format->compressedInfo.AvgBitErrorRate == 0, "Unexpected error bitrate.\n"); ok(format->compressedInfo.MaxKeyFrameSpacing == 0, "Unexpected MaxKeyFrameSpacing.\n"); - ok(format->surfaceInfo.Format == d3dformat, "Unexpected format %u.\n", format->surfaceInfo.Format); - ok(format->surfaceInfo.PaletteEntries == 0, "Unexpected palette size %u.\n", format->surfaceInfo.PaletteEntries); + ok(format->surfaceInfo.Format == d3dformat, "Unexpected format %lu.\n", format->surfaceInfo.Format); + ok(format->surfaceInfo.PaletteEntries == 0, "Unexpected palette size %lu.\n", format->surfaceInfo.PaletteEntries); }
static void test_MFInitVideoFormat_RGB(void) @@ -7937,13 +7937,13 @@ static void test_MFInitVideoFormat_RGB(void) }
hr = pMFInitVideoFormat_RGB(NULL, 64, 32, 0); - ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(formats); ++i) { memset(&format, 0, sizeof(format)); hr = pMFInitVideoFormat_RGB(&format, 64, 32, formats[i]); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); if (SUCCEEDED(hr)) check_video_format(&format, 64, 32, formats[i]); }
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=109658
Your paranoid android.
=== w7u_adm (32 bit report) ===
mfplat: 0930:mfplat: unhandled exception c0000005 at 6EAB7D1C
=== w7u_el (32 bit report) ===
mfplat: 086c:mfplat: unhandled exception c0000005 at 6EDD7D24
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/packager/tests/Makefile.in | 1 - dlls/packager/tests/oleobj.c | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/dlls/packager/tests/Makefile.in b/dlls/packager/tests/Makefile.in index afab992cdb2..9988caad906 100644 --- a/dlls/packager/tests/Makefile.in +++ b/dlls/packager/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = packager.dll IMPORTS = ole32
diff --git a/dlls/packager/tests/oleobj.c b/dlls/packager/tests/oleobj.c index 62875584931..108882612db 100644 --- a/dlls/packager/tests/oleobj.c +++ b/dlls/packager/tests/oleobj.c @@ -418,7 +418,7 @@ static void test_packager(void) hr = CoCreateInstance(&CLSID_Package, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, &IID_IOleObject, (void**)&oleobj); ok(hr == S_OK || - hr == REGDB_E_CLASSNOTREG, "CoCreateInstance(CLSID_Package) failed: %08x\n", hr); + hr == REGDB_E_CLASSNOTREG, "CoCreateInstance(CLSID_Package) failed: %08lx\n", hr); if(hr == S_OK){ IOleObject_Release(oleobj); /* older OSes store temporary files in obscure locations, so don't run @@ -429,28 +429,28 @@ static void test_packager(void)
hr = CoCreateInstance(&CLSID_Package_Alt, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, &IID_IOleObject, (void**)&oleobj); - ok(hr == S_OK, "CoCreateInstance(CLSID_Package_Alt) failed: %08x\n", hr); + ok(hr == S_OK, "CoCreateInstance(CLSID_Package_Alt) failed: %08lx\n", hr);
hr = IOleObject_SetClientSite(oleobj, NULL); - ok(hr == S_OK, "SetClientSite failed: %08x\n", hr); + ok(hr == S_OK, "SetClientSite failed: %08lx\n", hr);
hr = IOleObject_SetClientSite(oleobj, &clientsite); - ok(hr == S_OK, "SetClientSite failed: %08x\n", hr); + ok(hr == S_OK, "SetClientSite failed: %08lx\n", hr);
hr = IOleObject_GetMiscStatus(oleobj, DVASPECT_CONTENT, NULL); - ok(hr == E_INVALIDARG, "GetMiscStatus failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "GetMiscStatus failed: %08lx\n", hr);
hr = IOleObject_GetMiscStatus(oleobj, DVASPECT_CONTENT, &status); - ok(hr == S_OK, "GetMiscStatus failed: %08x\n", hr); + ok(hr == S_OK, "GetMiscStatus failed: %08lx\n", hr); ok(status == OLEMISC_ONLYICONIC || status == OLEMISC_CANTLINKINSIDE /* winxp */, - "Got wrong DVASPECT_CONTENT status: 0x%x\n", status); + "Got wrong DVASPECT_CONTENT status: 0x%lx\n", status);
hr = IOleObject_QueryInterface(oleobj, &IID_IPersistStorage, (void**)&persist); - ok(hr == S_OK, "QueryInterface(IPersistStorage) failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface(IPersistStorage) failed: %08lx\n", hr);
hr = IPersistStorage_Load(persist, &stg); - ok(hr == S_OK, "Load failed: %08x\n", hr); + ok(hr == S_OK, "Load failed: %08lx\n", hr);
if(extended){ len = GetTempPathW(ARRAY_SIZE(filename), filename); @@ -458,19 +458,19 @@ static void test_packager(void)
file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ok(file != INVALID_HANDLE_VALUE, "Couldn't find temporary file %s: %u\n", + ok(file != INVALID_HANDLE_VALUE, "Couldn't find temporary file %s: %lu\n", wine_dbgstr_w(filename), GetLastError());
br = ReadFile(file, contents, sizeof(contents), &bytes_read, NULL); ok(br == TRUE, "ReadFile failed\n"); - ok(bytes_read == 10, "Got wrong file size: %u\n", bytes_read); + ok(bytes_read == 10, "Got wrong file size: %lu\n", bytes_read); ok(!memcmp(contents, "some text\n", 10), "Got wrong file contents\n");
CloseHandle(file); }
hr = IOleObject_Close(oleobj, OLECLOSE_NOSAVE); - ok(hr == S_OK, "Close failed: %08x\n", hr); + ok(hr == S_OK, "Close failed: %08lx\n", hr);
if(extended){ file = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING,
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/pdh/tests/Makefile.in | 1 dlls/pdh/tests/pdh.c | 442 ++++++++++++++++++++++---------------------- 2 files changed, 221 insertions(+), 222 deletions(-)
diff --git a/dlls/pdh/tests/Makefile.in b/dlls/pdh/tests/Makefile.in index ed1eea6c004..cb50923565b 100644 --- a/dlls/pdh/tests/Makefile.in +++ b/dlls/pdh/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = pdh.dll IMPORTS = pdh
diff --git a/dlls/pdh/tests/pdh.c b/dlls/pdh/tests/pdh.c index 928714475bb..195fd89eba5 100644 --- a/dlls/pdh/tests/pdh.c +++ b/dlls/pdh/tests/pdh.c @@ -84,22 +84,22 @@ static void test_PdhOpenQueryA( void ) PDH_HQUERY query;
ret = PdhOpenQueryA( NULL, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhCloseQuery( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08lx\n", ret);
ret = PdhCloseQuery( &query ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhOpenQueryW( void ) @@ -108,22 +108,22 @@ static void test_PdhOpenQueryW( void ) PDH_HQUERY query;
ret = PdhOpenQueryW( NULL, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhOpenQueryW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhOpenQueryW failed 0x%08lx\n", ret);
ret = PdhOpenQueryW( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08lx\n", ret);
ret = PdhCloseQuery( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08lx\n", ret);
ret = PdhCloseQuery( &query ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhAddCounterA( void ) @@ -133,46 +133,46 @@ static void test_PdhAddCounterA( void ) PDH_HCOUNTER counter;
ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( NULL, "\System\System Up Time", 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( NULL, "\System\System Up Time", 0, &counter ); - ok(ret == PDH_INVALID_HANDLE, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( query, NULL, 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( query, "\System\System Up Time", 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( query, "\System\Nonexistent Counter", 0, &counter ); ok(ret == PDH_CSTATUS_NO_COUNTER || broken(ret == PDH_INVALID_PATH), /* Win2K */ - "PdhAddCounterA failed 0x%08x\n", ret); + "PdhAddCounterA failed 0x%08lx\n", ret); ok(!counter, "PdhAddCounterA failed %p\n", counter);
ret = PdhAddCounterA( query, "\System\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( counter ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhRemoveCounter( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhRemoveCounter failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhRemoveCounter failed 0x%08lx\n", ret);
ret = PdhRemoveCounter( counter ); - ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhAddCounterW( void ) @@ -182,46 +182,46 @@ static void test_PdhAddCounterW( void ) PDH_HCOUNTER counter;
ret = PdhOpenQueryW( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08lx\n", ret);
ret = PdhAddCounterW( NULL, percentage_processor_time, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08lx\n", ret);
ret = PdhAddCounterW( NULL, percentage_processor_time, 0, &counter ); - ok(ret == PDH_INVALID_HANDLE, "PdhAddCounterW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhAddCounterW failed 0x%08lx\n", ret);
ret = PdhAddCounterW( query, NULL, 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08lx\n", ret);
ret = PdhAddCounterW( query, percentage_processor_time, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddCounterW failed 0x%08lx\n", ret);
ret = PdhAddCounterW( query, nonexistent_counter, 0, &counter ); ok(ret == PDH_CSTATUS_NO_COUNTER || broken(ret == PDH_INVALID_PATH), /* Win2K */ - "PdhAddCounterW failed 0x%08x\n", ret); + "PdhAddCounterW failed 0x%08lx\n", ret); ok(!counter, "PdhAddCounterW failed %p\n", counter);
ret = PdhAddCounterW( query, percentage_processor_time, 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterW failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddCounterW failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( counter ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhRemoveCounter( NULL ); - ok(ret == PDH_INVALID_HANDLE, "PdhRemoveCounter failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhRemoveCounter failed 0x%08lx\n", ret);
ret = PdhRemoveCounter( counter ); - ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhAddEnglishCounterA( void ) @@ -231,39 +231,39 @@ static void test_PdhAddEnglishCounterA( void ) PDH_HCOUNTER counter;
ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( query ); - ok(ret == PDH_NO_DATA, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == PDH_NO_DATA, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterA( NULL, "\System\System Up Time", 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterA( NULL, "\System\System Up Time", 0, &counter ); ok(ret == PDH_INVALID_HANDLE || broken(ret == PDH_INVALID_ARGUMENT) /* win10 <= 1909 */, - "PdhAddEnglishCounterA failed 0x%08x\n", ret); + "PdhAddEnglishCounterA failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterA( query, NULL, 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterA( query, "\System\System Up Time", 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterA failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterA( query, "\System\System Down Time", 0, &counter ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddEnglishCounterA failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddEnglishCounterA failed 0x%08lx\n", ret); ok(!counter, "PdhAddEnglishCounterA failed %p\n", counter);
ret = pPdhAddEnglishCounterA( query, "\System\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddEnglishCounterA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddEnglishCounterA failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhRemoveCounter( counter ); - ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhAddEnglishCounterW( void ) @@ -273,39 +273,39 @@ static void test_PdhAddEnglishCounterW( void ) PDH_HCOUNTER counter;
ret = PdhOpenQueryW( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( query ); - ok(ret == PDH_NO_DATA, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == PDH_NO_DATA, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterW( NULL, system_uptime, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterW( NULL, system_uptime, 0, &counter ); ok(ret == PDH_INVALID_HANDLE || broken(ret == PDH_INVALID_ARGUMENT) /* win10 <= 1909 */, - "PdhAddEnglishCounterW failed 0x%08x\n", ret); + "PdhAddEnglishCounterW failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterW( query, NULL, 0, &counter ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterW( query, system_uptime, 0, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhAddEnglishCounterW failed 0x%08lx\n", ret);
ret = pPdhAddEnglishCounterW( query, nonexistent_counter, 0, &counter ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddEnglishCounterW failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhAddEnglishCounterW failed 0x%08lx\n", ret); ok(!counter, "PdhAddEnglishCounterA failed %p\n", counter);
ret = pPdhAddEnglishCounterW( query, system_uptime, 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddEnglishCounterW failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddEnglishCounterW failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhRemoveCounter( counter ); - ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhRemoveCounter failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhCollectQueryDataWithTime( void ) @@ -316,28 +316,28 @@ static void test_PdhCollectQueryDataWithTime( void ) LONGLONG time;
ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( query ); - ok(ret == PDH_NO_DATA, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == PDH_NO_DATA, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhAddCounterA( query, "\System\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = pPdhCollectQueryDataWithTime( NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhCollectQueryDataWithTime failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhCollectQueryDataWithTime failed 0x%08lx\n", ret);
ret = pPdhCollectQueryDataWithTime( query, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhCollectQueryDataWithTime failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhCollectQueryDataWithTime failed 0x%08lx\n", ret);
ret = pPdhCollectQueryDataWithTime( NULL, &time ); - ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryDataWithTime failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhCollectQueryDataWithTime failed 0x%08lx\n", ret);
ret = pPdhCollectQueryDataWithTime( query, &time ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryDataWithTime failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryDataWithTime failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhGetFormattedCounterValue( void ) @@ -348,46 +348,46 @@ static void test_PdhGetFormattedCounterValue( void ) PDH_FMT_COUNTERVALUE value;
ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( query, "\System\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhGetFormattedCounterValue( NULL, PDH_FMT_LARGE, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetFormattedCounterValue failed 0x%08lx\n", ret);
ret = PdhGetFormattedCounterValue( NULL, PDH_FMT_LARGE, NULL, &value ); - ok(ret == PDH_INVALID_HANDLE, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhGetFormattedCounterValue failed 0x%08lx\n", ret);
ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetFormattedCounterValue failed 0x%08lx\n", ret);
ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08lx\n", ret);
ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08lx\n", ret);
ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE | PDH_FMT_NOSCALE, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08lx\n", ret);
ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE | PDH_FMT_NOCAP100, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08lx\n", ret);
ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE | PDH_FMT_1000, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08lx\n", ret);
ret = PdhSetCounterScaleFactor( counter, 2 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhGetRawCounterValue( void ) @@ -398,30 +398,30 @@ static void test_PdhGetRawCounterValue( void ) PDH_RAW_COUNTER value;
ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( query, "\System\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhGetRawCounterValue( NULL, NULL, &value ); - ok(ret == PDH_INVALID_HANDLE, "PdhGetRawCounterValue failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhGetRawCounterValue failed 0x%08lx\n", ret);
ret = PdhGetRawCounterValue( counter, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetRawCounterValue failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetRawCounterValue failed 0x%08lx\n", ret);
ret = PdhGetRawCounterValue( counter, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetRawCounterValue failed 0x%08x\n", ret); - ok(value.CStatus == ERROR_SUCCESS, "expected ERROR_SUCCESS got %x\n", value.CStatus); + ok(ret == ERROR_SUCCESS, "PdhGetRawCounterValue failed 0x%08lx\n", ret); + ok(value.CStatus == ERROR_SUCCESS, "expected ERROR_SUCCESS got %lx\n", value.CStatus);
ret = PdhCollectQueryData( query ); - ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08lx\n", ret);
ret = PdhGetRawCounterValue( counter, NULL, &value ); - ok(ret == ERROR_SUCCESS, "PdhGetRawCounterValue failed 0x%08x\n", ret); - ok(value.CStatus == ERROR_SUCCESS, "expected ERROR_SUCCESS got %x\n", value.CStatus); + ok(ret == ERROR_SUCCESS, "PdhGetRawCounterValue failed 0x%08lx\n", ret); + ok(value.CStatus == ERROR_SUCCESS, "expected ERROR_SUCCESS got %lx\n", value.CStatus);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhSetCounterScaleFactor( void ) @@ -431,31 +431,31 @@ static void test_PdhSetCounterScaleFactor( void ) PDH_HCOUNTER counter;
ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( query, "\System\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhSetCounterScaleFactor( NULL, 8 ); - ok(ret == PDH_INVALID_HANDLE, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhSetCounterScaleFactor( NULL, 1 ); - ok(ret == PDH_INVALID_HANDLE, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhSetCounterScaleFactor( counter, 8 ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhSetCounterScaleFactor( counter, -8 ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhSetCounterScaleFactor( counter, 7 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhSetCounterScaleFactor( counter, 0 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhGetCounterTimeBase( void ) @@ -466,25 +466,25 @@ static void test_PdhGetCounterTimeBase( void ) LONGLONG base;
ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( query, "\System\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhGetCounterTimeBase( NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterTimeBase failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterTimeBase failed 0x%08lx\n", ret);
ret = PdhGetCounterTimeBase( NULL, &base ); - ok(ret == PDH_INVALID_HANDLE, "PdhGetCounterTimeBase failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE, "PdhGetCounterTimeBase failed 0x%08lx\n", ret);
ret = PdhGetCounterTimeBase( counter, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterTimeBase failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterTimeBase failed 0x%08lx\n", ret);
ret = PdhGetCounterTimeBase( counter, &base ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterTimeBase failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhGetCounterTimeBase failed 0x%08lx\n", ret);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhGetCounterInfoA( void ) @@ -496,49 +496,49 @@ static void test_PdhGetCounterInfoA( void ) DWORD size;
ret = PdhOpenQueryA( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryA failed 0x%08lx\n", ret);
ret = PdhAddCounterA( query, "\System\System Up Time", 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoA( NULL, 0, NULL, NULL ); - ok(ret == PDH_INVALID_HANDLE || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoA( counter, 0, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoA( counter, 0, NULL, &info ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08lx\n", ret);
size = sizeof(info) - 1; ret = PdhGetCounterInfoA( counter, 0, &size, NULL ); - ok(ret == PDH_MORE_DATA || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08x\n", ret); + ok(ret == PDH_MORE_DATA || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoA failed 0x%08lx\n", ret);
size = sizeof(info); ret = PdhGetCounterInfoA( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08x\n", ret); - ok(size == sizeof(info), "PdhGetCounterInfoA failed %d\n", size); + ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08lx\n", ret); + ok(size == sizeof(info), "PdhGetCounterInfoA failed %ld\n", size);
ret = PdhGetCounterInfoA( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08x\n", ret); - ok(info.lScale == 0, "lScale %d\n", info.lScale); + ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08lx\n", ret); + ok(info.lScale == 0, "lScale %ld\n", info.lScale);
ret = PdhSetCounterScaleFactor( counter, 0 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoA( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08x\n", ret); - ok(info.lScale == 0, "lScale %d\n", info.lScale); + ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08lx\n", ret); + ok(info.lScale == 0, "lScale %ld\n", info.lScale);
ret = PdhSetCounterScaleFactor( counter, -5 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoA( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08x\n", ret); - ok(info.lScale == -5, "lScale %d\n", info.lScale); + ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoA failed 0x%08lx\n", ret); + ok(info.lScale == -5, "lScale %ld\n", info.lScale);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhGetCounterInfoW( void ) @@ -550,49 +550,49 @@ static void test_PdhGetCounterInfoW( void ) DWORD size;
ret = PdhOpenQueryW( NULL, 0, &query ); - ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhOpenQueryW failed 0x%08lx\n", ret);
ret = PdhAddCounterW( query, percentage_processor_time, 0, &counter ); - ok(ret == ERROR_SUCCESS, "PdhAddCounterW failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhAddCounterW failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoW( NULL, 0, NULL, NULL ); - ok(ret == PDH_INVALID_HANDLE || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_HANDLE || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoW( counter, 0, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoW( counter, 0, NULL, &info ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08lx\n", ret);
size = sizeof(info) - 1; ret = PdhGetCounterInfoW( counter, 0, &size, NULL ); - ok(ret == PDH_MORE_DATA || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08x\n", ret); + ok(ret == PDH_MORE_DATA || ret == PDH_INVALID_ARGUMENT, "PdhGetCounterInfoW failed 0x%08lx\n", ret);
size = sizeof(info); ret = PdhGetCounterInfoW( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08x\n", ret); - ok(size == sizeof(info), "PdhGetCounterInfoW failed %d\n", size); + ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08lx\n", ret); + ok(size == sizeof(info), "PdhGetCounterInfoW failed %ld\n", size);
ret = PdhGetCounterInfoW( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08x\n", ret); - ok(info.lScale == 0, "lScale %d\n", info.lScale); + ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08lx\n", ret); + ok(info.lScale == 0, "lScale %ld\n", info.lScale);
ret = PdhSetCounterScaleFactor( counter, 0 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoW( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08x\n", ret); - ok(info.lScale == 0, "lScale %d\n", info.lScale); + ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08lx\n", ret); + ok(info.lScale == 0, "lScale %ld\n", info.lScale);
ret = PdhSetCounterScaleFactor( counter, -5 ); - ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhSetCounterScaleFactor failed 0x%08lx\n", ret);
ret = PdhGetCounterInfoW( counter, 0, &size, &info ); - ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08x\n", ret); - ok(info.lScale == -5, "lScale %d\n", info.lScale); + ok(ret == ERROR_SUCCESS, "PdhGetCounterInfoW failed 0x%08lx\n", ret); + ok(info.lScale == -5, "lScale %ld\n", info.lScale);
ret = PdhCloseQuery( query ); - ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", ret); }
static void test_PdhLookupPerfIndexByNameA( void ) @@ -601,24 +601,24 @@ static void test_PdhLookupPerfIndexByNameA( void ) DWORD index;
ret = PdhLookupPerfIndexByNameA( NULL, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameA failed 0x%08lx\n", ret);
ret = PdhLookupPerfIndexByNameA( NULL, NULL, &index ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameA failed 0x%08lx\n", ret);
ret = PdhLookupPerfIndexByNameA( NULL, "No Counter", &index ); - ok(ret == PDH_STRING_NOT_FOUND, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); + ok(ret == PDH_STRING_NOT_FOUND, "PdhLookupPerfIndexByNameA failed 0x%08lx\n", ret);
ret = PdhLookupPerfIndexByNameA( NULL, "% Processor Time", NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameA failed 0x%08lx\n", ret);
ret = PdhLookupPerfIndexByNameA( NULL, "% Processor Time", &index ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); - ok(index == 6, "PdhLookupPerfIndexByNameA failed %d\n", index); + ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameA failed 0x%08lx\n", ret); + ok(index == 6, "PdhLookupPerfIndexByNameA failed %ld\n", index);
ret = PdhLookupPerfIndexByNameA( NULL, "System Up Time", &index ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameA failed 0x%08x\n", ret); - ok(index == 674, "PdhLookupPerfIndexByNameA failed %d\n", index); + ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameA failed 0x%08lx\n", ret); + ok(index == 674, "PdhLookupPerfIndexByNameA failed %ld\n", index); }
static void test_PdhLookupPerfIndexByNameW( void ) @@ -627,24 +627,24 @@ static void test_PdhLookupPerfIndexByNameW( void ) DWORD index;
ret = PdhLookupPerfIndexByNameW( NULL, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameW failed 0x%08lx\n", ret);
ret = PdhLookupPerfIndexByNameW( NULL, NULL, &index ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameW failed 0x%08lx\n", ret);
ret = PdhLookupPerfIndexByNameW( NULL, L"No Counter", &index ); - ok(ret == PDH_STRING_NOT_FOUND, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); + ok(ret == PDH_STRING_NOT_FOUND, "PdhLookupPerfIndexByNameW failed 0x%08lx\n", ret);
ret = PdhLookupPerfIndexByNameW( NULL, processor_time, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfIndexByNameW failed 0x%08lx\n", ret);
ret = PdhLookupPerfIndexByNameW( NULL, processor_time, &index ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); - ok(index == 6, "PdhLookupPerfIndexByNameW failed %d\n", index); + ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameW failed 0x%08lx\n", ret); + ok(index == 6, "PdhLookupPerfIndexByNameW failed %ld\n", index);
ret = PdhLookupPerfIndexByNameW( NULL, uptime, &index ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameW failed 0x%08x\n", ret); - ok(index == 674, "PdhLookupPerfIndexByNameW failed %d\n", index); + ok(ret == ERROR_SUCCESS, "PdhLookupPerfIndexByNameW failed 0x%08lx\n", ret); + ok(index == 674, "PdhLookupPerfIndexByNameW failed %ld\n", index); }
static void test_PdhLookupPerfNameByIndexA( void ) @@ -654,31 +654,31 @@ static void test_PdhLookupPerfNameByIndexA( void ) DWORD size;
ret = PdhLookupPerfNameByIndexA( NULL, 0, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfNameByIndexA failed 0x%08lx\n", ret);
size = 0; ret = PdhLookupPerfNameByIndexA( NULL, 6, buffer, &size ); - ok(ret == PDH_MORE_DATA || ret == PDH_INSUFFICIENT_BUFFER, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); + ok(ret == PDH_MORE_DATA || ret == PDH_INSUFFICIENT_BUFFER, "PdhLookupPerfNameByIndexA failed 0x%08lx\n", ret);
size = sizeof(buffer); ret = PdhLookupPerfNameByIndexA( NULL, 6, buffer, &size ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexA failed 0x%08lx\n", ret); ok(!lstrcmpA( buffer, "% Processor Time" ), "PdhLookupPerfNameByIndexA failed, got %s expected '%% Processor Time'\n", buffer); - ok(size == sizeof("% Processor Time"), "PdhLookupPerfNameByIndexA failed %d\n", size); + ok(size == sizeof("% Processor Time"), "PdhLookupPerfNameByIndexA failed %ld\n", size);
size = sizeof(buffer); ret = PdhLookupPerfNameByIndexA( NULL, 674, NULL, &size ); ok(ret == PDH_INVALID_ARGUMENT || ret == PDH_MORE_DATA, /* win2k3 */ - "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); + "PdhLookupPerfNameByIndexA failed 0x%08lx\n", ret);
size = sizeof(buffer); ret = PdhLookupPerfNameByIndexA( NULL, 674, buffer, &size ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexA failed 0x%08lx\n", ret); ok(!lstrcmpA( buffer, "System Up Time" ), "PdhLookupPerfNameByIndexA failed, got %s expected 'System Up Time'\n", buffer); - ok(size == sizeof("System Up Time"), "PdhLookupPerfNameByIndexA failed %d\n", size); + ok(size == sizeof("System Up Time"), "PdhLookupPerfNameByIndexA failed %ld\n", size); }
static void test_PdhLookupPerfNameByIndexW( void ) @@ -688,27 +688,27 @@ static void test_PdhLookupPerfNameByIndexW( void ) DWORD size;
ret = PdhLookupPerfNameByIndexW( NULL, 0, NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhLookupPerfNameByIndexW failed 0x%08lx\n", ret);
size = 0; ret = PdhLookupPerfNameByIndexW( NULL, 6, buffer, &size ); - ok(ret == PDH_MORE_DATA || ret == PDH_INSUFFICIENT_BUFFER, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); + ok(ret == PDH_MORE_DATA || ret == PDH_INSUFFICIENT_BUFFER, "PdhLookupPerfNameByIndexW failed 0x%08lx\n", ret);
size = ARRAY_SIZE(buffer); ret = PdhLookupPerfNameByIndexW( NULL, 6, buffer, &size ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); - ok(size == ARRAY_SIZE(processor_time), "PdhLookupPerfNameByIndexW failed %d\n", size); + ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexW failed 0x%08lx\n", ret); + ok(size == ARRAY_SIZE(processor_time), "PdhLookupPerfNameByIndexW failed %ld\n", size);
size = ARRAY_SIZE(buffer); ret = PdhLookupPerfNameByIndexW( NULL, 674, NULL, &size ); ok(ret == PDH_INVALID_ARGUMENT || ret == PDH_MORE_DATA, /* win2k3 */ - "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); + "PdhLookupPerfNameByIndexW failed 0x%08lx\n", ret);
size = ARRAY_SIZE(buffer); ret = PdhLookupPerfNameByIndexW( NULL, 674, buffer, &size ); - ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexW failed 0x%08x\n", ret); - ok(size == ARRAY_SIZE(uptime), "PdhLookupPerfNameByIndexW failed %d\n", size); + ok(ret == ERROR_SUCCESS, "PdhLookupPerfNameByIndexW failed 0x%08lx\n", ret); + ok(size == ARRAY_SIZE(uptime), "PdhLookupPerfNameByIndexW failed %ld\n", size); }
static void test_PdhValidatePathA( void ) @@ -716,22 +716,22 @@ static void test_PdhValidatePathA( void ) PDH_STATUS ret;
ret = PdhValidatePathA( NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathA failed 0x%08lx\n", ret);
ret = PdhValidatePathA( "" ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathA failed 0x%08lx\n", ret);
ret = PdhValidatePathA( "\System" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathA failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathA failed 0x%08lx\n", ret);
ret = PdhValidatePathA( "System Up Time" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathA failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathA failed 0x%08lx\n", ret);
ret = PdhValidatePathA( "\System\Nonexistent Counter" ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathA failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathA failed 0x%08lx\n", ret);
ret = PdhValidatePathA( "\System\System Up Time" ); - ok(ret == ERROR_SUCCESS, "PdhValidatePathA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhValidatePathA failed 0x%08lx\n", ret); }
static void test_PdhValidatePathW( void ) @@ -739,22 +739,22 @@ static void test_PdhValidatePathW( void ) PDH_STATUS ret;
ret = PdhValidatePathW( NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathW failed 0x%08lx\n", ret);
ret = PdhValidatePathW( L"" ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathW failed 0x%08lx\n", ret);
ret = PdhValidatePathW( L"\System" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathW failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathW failed 0x%08lx\n", ret);
ret = PdhValidatePathW( uptime ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathW failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathW failed 0x%08lx\n", ret);
ret = PdhValidatePathW( nonexistent_counter ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathW failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathW failed 0x%08lx\n", ret);
ret = PdhValidatePathW( system_uptime ); - ok(ret == ERROR_SUCCESS, "PdhValidatePathW failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhValidatePathW failed 0x%08lx\n", ret); }
static void test_PdhValidatePathExA( void ) @@ -762,22 +762,22 @@ static void test_PdhValidatePathExA( void ) PDH_STATUS ret;
ret = pPdhValidatePathExA( NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExA failed 0x%08lx\n", ret);
ret = pPdhValidatePathExA( NULL, "" ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExA failed 0x%08lx\n", ret);
ret = pPdhValidatePathExA( NULL, "\System" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExA failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExA failed 0x%08lx\n", ret);
ret = pPdhValidatePathExA( NULL, "System Up Time" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExA failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExA failed 0x%08lx\n", ret);
ret = pPdhValidatePathExA( NULL, "\System\System Down Time" ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathExA failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathExA failed 0x%08lx\n", ret);
ret = pPdhValidatePathExA( NULL, "\System\System Up Time" ); - ok(ret == ERROR_SUCCESS, "PdhValidatePathExA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhValidatePathExA failed 0x%08lx\n", ret); }
static void test_PdhValidatePathExW( void ) @@ -785,22 +785,22 @@ static void test_PdhValidatePathExW( void ) PDH_STATUS ret;
ret = pPdhValidatePathExW( NULL, NULL ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExW failed 0x%08lx\n", ret);
ret = pPdhValidatePathExW( NULL, L"" ); - ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExW failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhValidatePathExW failed 0x%08lx\n", ret);
ret = pPdhValidatePathExW( NULL, L"\System" ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExW failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExW failed 0x%08lx\n", ret);
ret = pPdhValidatePathExW( NULL, uptime ); - ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExW failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_BAD_COUNTERNAME, "PdhValidatePathExW failed 0x%08lx\n", ret);
ret = pPdhValidatePathExW( NULL, nonexistent_counter ); - ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathExW failed 0x%08x\n", ret); + ok(ret == PDH_CSTATUS_NO_COUNTER, "PdhValidatePathExW failed 0x%08lx\n", ret);
ret = pPdhValidatePathExW( NULL, system_uptime ); - ok(ret == ERROR_SUCCESS, "PdhValidatePathExW failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhValidatePathExW failed 0x%08lx\n", ret); }
static void test_PdhCollectQueryDataEx(void) @@ -813,25 +813,25 @@ static void test_PdhCollectQueryDataEx(void) UINT i;
status = PdhOpenQueryA( NULL, 0, &query ); - ok(status == ERROR_SUCCESS, "PdhOpenQuery failed 0x%08x\n", status); + ok(status == ERROR_SUCCESS, "PdhOpenQuery failed 0x%08lx\n", status);
event = CreateEventA( NULL, FALSE, FALSE, "winetest" ); ok(event != NULL, "CreateEvent failed\n");
status = PdhAddCounterA( query, "\System\System Up Time", 0, &counter ); - ok(status == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08x\n", status); + ok(status == ERROR_SUCCESS, "PdhAddCounterA failed 0x%08lx\n", status);
status = PdhCollectQueryDataEx( NULL, 1, event ); - ok(status == PDH_INVALID_HANDLE, "PdhCollectQueryDataEx failed 0x%08x\n", status); + ok(status == PDH_INVALID_HANDLE, "PdhCollectQueryDataEx failed 0x%08lx\n", status);
status = PdhCollectQueryDataEx( query, 1, NULL ); - ok(status == ERROR_SUCCESS, "PdhCollectQueryDataEx failed 0x%08x\n", status); + ok(status == ERROR_SUCCESS, "PdhCollectQueryDataEx failed 0x%08lx\n", status);
status = PdhCollectQueryDataEx( query, 1, event ); - ok(status == ERROR_SUCCESS, "PdhCollectQueryDataEx failed 0x%08x\n", status); + ok(status == ERROR_SUCCESS, "PdhCollectQueryDataEx failed 0x%08lx\n", status);
status = PdhCollectQueryData( query ); - ok(status == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08x\n", status); + ok(status == ERROR_SUCCESS, "PdhCollectQueryData failed 0x%08lx\n", status);
for (i = 0; i < 3; i++) { @@ -840,7 +840,7 @@ static void test_PdhCollectQueryDataEx(void) PDH_FMT_COUNTERVALUE value;
status = PdhGetFormattedCounterValue( counter, PDH_FMT_LARGE, NULL, &value ); - ok(status == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08x\n", status); + ok(status == ERROR_SUCCESS, "PdhGetFormattedCounterValue failed 0x%08lx\n", status);
trace( "uptime %s\n", wine_dbgstr_longlong(U(value).largeValue) ); } @@ -850,7 +850,7 @@ static void test_PdhCollectQueryDataEx(void) ok(ret, "CloseHandle failed\n");
status = PdhCloseQuery( query ); - ok(status == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08x\n", status); + ok(status == ERROR_SUCCESS, "PdhCloseQuery failed 0x%08lx\n", status); }
static void test_PdhMakeCounterPathA(void) @@ -861,63 +861,63 @@ static void test_PdhMakeCounterPathA(void) DWORD buflen;
ret = PdhMakeCounterPathA(NULL, NULL, NULL, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret);
buflen = 0; ret = PdhMakeCounterPathA(NULL, NULL, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret);
if (0) { /* Crashes on Windows 10 >= 2004 */ buflen = 0; ret = PdhMakeCounterPathA(NULL, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret); }
buflen = sizeof(buffer); memset(&e, 0, sizeof(e)); ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret);
buffer[0] = 0; buflen = sizeof(buffer); e.szMachineName = (char *)"machine"; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret); ok(!strcmp(buffer, ""), "expected "machine" got %s\n", buffer);
buffer[0] = 0; buflen = sizeof(buffer); e.szObjectName = (char *)"object"; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret); ok(!strcmp(buffer, ""), "expected "machine" got %s\n", buffer);
buffer[0] = 0; buflen = sizeof(buffer); e.szInstanceName = (char *)"instance"; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret); ok(!strcmp(buffer, ""), "expected "machine" got %s\n", buffer);
buffer[0] = 0; buflen = sizeof(buffer); e.szParentInstance = (char *)"parent"; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret); ok(!strcmp(buffer, ""), "expected "machine" got %s\n", buffer);
buffer[0] = 0; buflen = sizeof(buffer); e.dwInstanceIndex = 1; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret); ok(!strcmp(buffer, ""), "expected "machine" got %s\n", buffer);
buffer[0] = 0; buflen = sizeof(buffer); e.szCounterName = (char *)"counter"; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08lx\n", ret); ok(!strcmp(buffer, "\\machine\object(parent/instance#1)\counter"), "expected "\\machine\object(parent/instance#1)\counter" got %s\n", buffer);
@@ -925,7 +925,7 @@ static void test_PdhMakeCounterPathA(void) buflen = sizeof(buffer); e.szParentInstance = NULL; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08lx\n", ret); ok(!strcmp(buffer, "\\machine\object(instance#1)\counter"), "expected "\\machine\object(instance#1)\counter" got %s\n", buffer);
@@ -933,7 +933,7 @@ static void test_PdhMakeCounterPathA(void) buflen = sizeof(buffer); e.szInstanceName = NULL; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08lx\n", ret); ok(!strcmp(buffer, "\\machine\object\counter"), "expected "\\machine\object\counter" got %s\n", buffer);
@@ -941,7 +941,7 @@ static void test_PdhMakeCounterPathA(void) buflen = sizeof(buffer); e.szMachineName = NULL; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == ERROR_SUCCESS, "PdhMakeCounterPathA failed 0x%08lx\n", ret); ok(!strcmp(buffer, "\object\counter"), "expected "\object\counter" got %s\n", buffer);
@@ -949,7 +949,7 @@ static void test_PdhMakeCounterPathA(void) buflen = sizeof(buffer); e.szObjectName = NULL; ret = PdhMakeCounterPathA(&e, buffer, &buflen, 0); - ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08x\n", ret); + ok(ret == PDH_INVALID_ARGUMENT, "PdhMakeCounterPathA failed 0x%08lx\n", ret); }
static void test_PdhGetDllVersion(void) @@ -960,17 +960,17 @@ static void test_PdhGetDllVersion(void) ret = PdhGetDllVersion(NULL); ok(ret == PDH_INVALID_ARGUMENT || broken(ret == ERROR_SUCCESS), /* Vista+ */ - "Expected PdhGetDllVersion to return PDH_INVALID_ARGUMENT, got %d\n", ret); + "Expected PdhGetDllVersion to return PDH_INVALID_ARGUMENT, got %ld\n", ret);
ret = PdhGetDllVersion(&version); ok(ret == ERROR_SUCCESS, - "Expected PdhGetDllVersion to return ERROR_SUCCESS, got %d\n", ret); + "Expected PdhGetDllVersion to return ERROR_SUCCESS, got %ld\n", ret);
if (ret == ERROR_SUCCESS) { ok(version == PDH_CVERSION_WIN50 || version == PDH_VERSION, - "Expected version number to be PDH_CVERSION_WIN50 or PDH_VERSION, got %u\n", version); + "Expected version number to be PDH_CVERSION_WIN50 or PDH_VERSION, got %lu\n", version); } }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/prntvpt/tests/Makefile.in | 1 - dlls/prntvpt/tests/prntvpt.c | 30 +++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/dlls/prntvpt/tests/Makefile.in b/dlls/prntvpt/tests/Makefile.in index 659a25a064c..692a134d016 100644 --- a/dlls/prntvpt/tests/Makefile.in +++ b/dlls/prntvpt/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = prntvpt.dll IMPORTS = prntvpt winspool ole32
diff --git a/dlls/prntvpt/tests/prntvpt.c b/dlls/prntvpt/tests/prntvpt.c index 55b6f3fdef1..8d955cd866b 100644 --- a/dlls/prntvpt/tests/prntvpt.c +++ b/dlls/prntvpt/tests/prntvpt.c @@ -55,27 +55,27 @@ static void test_PTOpenProvider(void) struct hprov_data data;
hr = PTOpenProvider(default_name, 1, &hprov); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
data.hprov = hprov; hthread = CreateThread(NULL, 0, CloseProvider_proc, &data, 0, &tid); WaitForSingleObject(hthread, INFINITE); CloseHandle(hthread); - ok(data.hr == E_HANDLE || data.hr == E_INVALIDARG /* XP */ || broken(data.hr == S_OK) /* Win8 */, "got %#x\n", data.hr); + ok(data.hr == E_HANDLE || data.hr == E_INVALIDARG /* XP */ || broken(data.hr == S_OK) /* Win8 */, "got %#lx\n", data.hr);
if (data.hr != S_OK) { hr = PTCloseProvider(hprov); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); }
hr = PTOpenProvider(default_name, 0, &hprov); - ok(hr == E_INVALIDARG, "got %#x\n", hr); + ok(hr == E_INVALIDARG, "got %#lx\n", hr);
for (i = 2; i < 20; i++) { hr = PTOpenProvider(default_name, i, &hprov); - ok(hr == 0x80040001 || hr == E_INVALIDARG /* Wine */, "%u: got %#x\n", i, hr); + ok(hr == 0x80040001 || hr == E_INVALIDARG /* Wine */, "%lu: got %#lx\n", i, hr); } }
@@ -88,40 +88,40 @@ static void test_PTOpenProviderEx(void) struct hprov_data data;
hr = PTOpenProviderEx(default_name, 1, 1, &hprov, NULL); - ok(hr == E_INVALIDARG, "got %#x\n", hr); + ok(hr == E_INVALIDARG, "got %#lx\n", hr);
ver = 0xdeadbeef; hr = PTOpenProviderEx(default_name, 1, 1, &hprov, &ver); - ok(hr == S_OK, "got %#x\n", hr); - ok(ver == 1, "got %#x\n", ver); + ok(hr == S_OK, "got %#lx\n", hr); + ok(ver == 1, "got %#lx\n", ver);
data.hprov = hprov; hthread = CreateThread(NULL, 0, CloseProvider_proc, &data, 0, &tid); WaitForSingleObject(hthread, INFINITE); CloseHandle(hthread); - ok(data.hr == E_HANDLE || data.hr == E_INVALIDARG /* XP */ || broken(data.hr == S_OK) /* Win8 */, "got %#x\n", data.hr); + ok(data.hr == E_HANDLE || data.hr == E_INVALIDARG /* XP */ || broken(data.hr == S_OK) /* Win8 */, "got %#lx\n", data.hr);
if (data.hr != S_OK) { hr = PTCloseProvider(hprov); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); }
for (i = 1; i < 20; i++) { hr = PTOpenProviderEx(default_name, 0, i, &hprov, &ver); - ok(hr == E_INVALIDARG, "%u: got %#x\n", i, hr); + ok(hr == E_INVALIDARG, "%lu: got %#lx\n", i, hr);
ver = 0xdeadbeef; hr = PTOpenProviderEx(default_name, 1, i, &hprov, &ver); - ok(hr == S_OK, "%u: got %#x\n", i, hr); - ok(ver == 1, "%u: got %#x\n", i, ver); + ok(hr == S_OK, "%lu: got %#lx\n", i, hr); + ok(ver == 1, "%lu: got %#lx\n", i, ver); PTCloseProvider(hprov);
ver = 0xdeadbeef; hr = PTOpenProviderEx(default_name, i, i, &hprov, &ver); - ok(hr == S_OK, "%u: got %#x\n", i, hr); - ok(ver == 1, "%u: got %#x\n", i, ver); + ok(hr == S_OK, "%lu: got %#lx\n", i, hr); + ok(ver == 1, "%lu: got %#lx\n", i, ver); PTCloseProvider(hprov); } }
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/propsys/tests/Makefile.in | 1 dlls/propsys/tests/propsys.c | 388 ++++++++++++++++++++-------------------- 2 files changed, 194 insertions(+), 195 deletions(-)
diff --git a/dlls/propsys/tests/Makefile.in b/dlls/propsys/tests/Makefile.in index 7b233cf640e..19e30afde77 100644 --- a/dlls/propsys/tests/Makefile.in +++ b/dlls/propsys/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = propsys.dll IMPORTS = propsys ole32 oleaut32
diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c index 792ef1dd785..36b1a9dca8e 100644 --- a/dlls/propsys/tests/propsys.c +++ b/dlls/propsys/tests/propsys.c @@ -54,7 +54,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 void test_PSStringFromPropertyKey(void) @@ -149,7 +149,7 @@ static void test_PSStringFromPropertyKey(void) testcases[i].cch); ok(ret == testcases[i].hr_expect || broken(testcases[i].hr_broken && ret == testcases[i].hr2), /* Vista/Win2k8 */ - "[%d] Expected PSStringFromPropertyKey to return 0x%08x, got 0x%08x\n", + "[%d] Expected PSStringFromPropertyKey to return 0x%08lx, got 0x%08lx\n", i, testcases[i].hr_expect, ret);
if (testcases[i].psz) @@ -430,7 +430,7 @@ static void test_PSPropertyKeyFromString(void)
ret = PSPropertyKeyFromString(testcases[i].pwzString, testcases[i].pkey); ok(ret == testcases[i].hr_expect, - "[%d] Expected PSPropertyKeyFromString to return 0x%08x, got 0x%08x\n", + "[%d] Expected PSPropertyKeyFromString to return 0x%08lx, got 0x%08lx\n", i, testcases[i].hr_expect, ret);
if (testcases[i].pkey) @@ -439,7 +439,7 @@ static void test_PSPropertyKeyFromString(void) "[%d] Expected GUID %s, got %s\n", i, wine_dbgstr_guid(&testcases[i].pkey_expect.fmtid), wine_dbgstr_guid(&testcases[i].pkey->fmtid)); ok(testcases[i].pkey->pid == testcases[i].pkey_expect.pid, - "[%d] Expected property ID %u, got %u\n", + "[%d] Expected property ID %lu, got %lu\n", i, testcases[i].pkey_expect.pid, testcases[i].pkey->pid); } } @@ -452,13 +452,13 @@ static void test_PSRefreshPropertySchema(void) ret = PSRefreshPropertySchema(); todo_wine ok(ret == CO_E_NOTINITIALIZED, - "Expected PSRefreshPropertySchema to return CO_E_NOTINITIALIZED, got 0x%08x\n", ret); + "Expected PSRefreshPropertySchema to return CO_E_NOTINITIALIZED, got 0x%08lx\n", ret);
CoInitialize(NULL);
ret = PSRefreshPropertySchema(); ok(ret == S_OK, - "Expected PSRefreshPropertySchema to return S_OK, got 0x%08x\n", ret); + "Expected PSRefreshPropertySchema to return S_OK, got 0x%08lx\n", ret);
CoUninitialize(); } @@ -479,7 +479,7 @@ static void test_InitPropVariantFromGUIDAsString(void) };
hres = InitPropVariantFromGUIDAsString(NULL, &propvar); - ok(hres == E_FAIL, "InitPropVariantFromGUIDAsString returned %x\n", hres); + ok(hres == E_FAIL, "InitPropVariantFromGUIDAsString returned %lx\n", hres);
if(0) { /* Returns strange data on Win7, crashes on older systems */ @@ -493,7 +493,7 @@ static void test_InitPropVariantFromGUIDAsString(void) for(i=0; i < ARRAY_SIZE(testcases); i++) { memset(&propvar, 0, sizeof(PROPVARIANT)); hres = InitPropVariantFromGUIDAsString(testcases[i].guid, &propvar); - ok(hres == S_OK, "%d) InitPropVariantFromGUIDAsString returned %x\n", i, hres); + ok(hres == S_OK, "%d) InitPropVariantFromGUIDAsString returned %lx\n", i, hres); ok(propvar.vt == VT_LPWSTR, "%d) propvar.vt = %d\n", i, propvar.vt); ok(!lstrcmpW(propvar.pwszVal, testcases[i].str), "%d) propvar.pwszVal = %s\n", i, wine_dbgstr_w(propvar.pwszVal)); @@ -501,7 +501,7 @@ static void test_InitPropVariantFromGUIDAsString(void)
memset(&var, 0, sizeof(VARIANT)); hres = InitVariantFromGUIDAsString(testcases[i].guid, &var); - ok(hres == S_OK, "%d) InitVariantFromGUIDAsString returned %x\n", i, hres); + ok(hres == S_OK, "%d) InitVariantFromGUIDAsString returned %lx\n", i, hres); ok(V_VT(&var) == VT_BSTR, "%d) V_VT(&var) = %d\n", i, V_VT(&var)); ok(SysStringLen(V_BSTR(&var)) == 38, "SysStringLen returned %d\n", SysStringLen(V_BSTR(&var))); @@ -521,47 +521,47 @@ static void test_InitPropVariantFromBuffer(void) LONG size;
hres = InitPropVariantFromBuffer(NULL, 0, &propvar); - ok(hres == S_OK, "InitPropVariantFromBuffer returned %x\n", hres); + ok(hres == S_OK, "InitPropVariantFromBuffer returned %lx\n", hres); ok(propvar.vt == (VT_VECTOR|VT_UI1), "propvar.vt = %d\n", propvar.vt); ok(propvar.caub.cElems == 0, "cElems = %d\n", propvar.caub.cElems == 0); PropVariantClear(&propvar);
hres = InitPropVariantFromBuffer(data_in, 4, &propvar); - ok(hres == S_OK, "InitPropVariantFromBuffer returned %x\n", hres); + ok(hres == S_OK, "InitPropVariantFromBuffer returned %lx\n", hres); ok(propvar.vt == (VT_VECTOR|VT_UI1), "propvar.vt = %d\n", propvar.vt); ok(propvar.caub.cElems == 4, "cElems = %d\n", propvar.caub.cElems == 0); ok(!memcmp(propvar.caub.pElems, data_in, 4), "Data inside array is incorrect\n"); PropVariantClear(&propvar);
hres = InitVariantFromBuffer(NULL, 0, &var); - ok(hres == S_OK, "InitVariantFromBuffer returned %x\n", hres); + ok(hres == S_OK, "InitVariantFromBuffer returned %lx\n", hres); ok(V_VT(&var) == (VT_ARRAY|VT_UI1), "V_VT(&var) = %d\n", V_VT(&var)); size = SafeArrayGetDim(V_ARRAY(&var)); - ok(size == 1, "SafeArrayGetDim returned %d\n", size); + ok(size == 1, "SafeArrayGetDim returned %ld\n", size); hres = SafeArrayGetLBound(V_ARRAY(&var), 1, &size); - ok(hres == S_OK, "SafeArrayGetLBound returned %x\n", hres); - ok(size == 0, "LBound = %d\n", size); + ok(hres == S_OK, "SafeArrayGetLBound returned %lx\n", hres); + ok(size == 0, "LBound = %ld\n", size); hres = SafeArrayGetUBound(V_ARRAY(&var), 1, &size); - ok(hres == S_OK, "SafeArrayGetUBound returned %x\n", hres); - ok(size == -1, "UBound = %d\n", size); + ok(hres == S_OK, "SafeArrayGetUBound returned %lx\n", hres); + ok(size == -1, "UBound = %ld\n", size); VariantClear(&var);
hres = InitVariantFromBuffer(data_in, 4, &var); - ok(hres == S_OK, "InitVariantFromBuffer returned %x\n", hres); + ok(hres == S_OK, "InitVariantFromBuffer returned %lx\n", hres); ok(V_VT(&var) == (VT_ARRAY|VT_UI1), "V_VT(&var) = %d\n", V_VT(&var)); size = SafeArrayGetDim(V_ARRAY(&var)); - ok(size == 1, "SafeArrayGetDim returned %d\n", size); + ok(size == 1, "SafeArrayGetDim returned %ld\n", size); hres = SafeArrayGetLBound(V_ARRAY(&var), 1, &size); - ok(hres == S_OK, "SafeArrayGetLBound returned %x\n", hres); - ok(size == 0, "LBound = %d\n", size); + ok(hres == S_OK, "SafeArrayGetLBound returned %lx\n", hres); + ok(size == 0, "LBound = %ld\n", size); hres = SafeArrayGetUBound(V_ARRAY(&var), 1, &size); - ok(hres == S_OK, "SafeArrayGetUBound returned %x\n", hres); - ok(size == 3, "UBound = %d\n", size); + ok(hres == S_OK, "SafeArrayGetUBound returned %lx\n", hres); + ok(size == 3, "UBound = %ld\n", size); hres = SafeArrayAccessData(V_ARRAY(&var), &data_out); - ok(hres == S_OK, "SafeArrayAccessData failed %x\n", hres); + ok(hres == S_OK, "SafeArrayAccessData failed %lx\n", hres); ok(!memcmp(data_in, data_out, 4), "Data inside safe array is incorrect\n"); hres = SafeArrayUnaccessData(V_ARRAY(&var)); - ok(hres == S_OK, "SafeArrayUnaccessData failed %x\n", hres); + ok(hres == S_OK, "SafeArrayUnaccessData failed %lx\n", hres); VariantClear(&var); }
@@ -573,18 +573,18 @@ static void test_PropVariantToGUID(void) HRESULT hres;
hres = InitPropVariantFromGUIDAsString(&IID_NULL, &propvar); - ok(hres == S_OK, "InitPropVariantFromGUIDAsString failed %x\n", hres); + ok(hres == S_OK, "InitPropVariantFromGUIDAsString failed %lx\n", hres);
hres = PropVariantToGUID(&propvar, &guid); - ok(hres == S_OK, "PropVariantToGUID failed %x\n", hres); + ok(hres == S_OK, "PropVariantToGUID failed %lx\n", hres); ok(IsEqualGUID(&IID_NULL, &guid), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid)); PropVariantClear(&propvar);
hres = InitPropVariantFromGUIDAsString(&dummy_guid, &propvar); - ok(hres == S_OK, "InitPropVariantFromGUIDAsString failed %x\n", hres); + ok(hres == S_OK, "InitPropVariantFromGUIDAsString failed %lx\n", hres);
hres = PropVariantToGUID(&propvar, &guid); - ok(hres == S_OK, "PropVariantToGUID failed %x\n", hres); + ok(hres == S_OK, "PropVariantToGUID failed %lx\n", hres); ok(IsEqualGUID(&dummy_guid, &guid), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid));
ok(propvar.vt == VT_LPWSTR, "incorrect PROPVARIANT type: %d\n", propvar.vt); @@ -592,48 +592,48 @@ static void test_PropVariantToGUID(void) propvar.pwszVal[2] = 'E'; propvar.pwszVal[3] = 'a'; hres = PropVariantToGUID(&propvar, &guid); - ok(hres == S_OK, "PropVariantToGUID failed %x\n", hres); + ok(hres == S_OK, "PropVariantToGUID failed %lx\n", hres); ok(IsEqualGUID(&dummy_guid, &guid), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid));
propvar.pwszVal[1] = 'z'; hres = PropVariantToGUID(&propvar, &guid); - ok(hres == E_INVALIDARG, "PropVariantToGUID returned %x\n", hres); + ok(hres == E_INVALIDARG, "PropVariantToGUID returned %lx\n", hres); PropVariantClear(&propvar);
hres = InitVariantFromGUIDAsString(&IID_NULL, &var); - ok(hres == S_OK, "InitVariantFromGUIDAsString failed %x\n", hres); + ok(hres == S_OK, "InitVariantFromGUIDAsString failed %lx\n", hres);
hres = VariantToGUID(&var, &guid); - ok(hres == S_OK, "VariantToGUID failed %x\n", hres); + ok(hres == S_OK, "VariantToGUID failed %lx\n", hres); ok(IsEqualGUID(&IID_NULL, &guid), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid)); VariantClear(&var);
hres = InitVariantFromGUIDAsString(&dummy_guid, &var); - ok(hres == S_OK, "InitVariantFromGUIDAsString failed %x\n", hres); + ok(hres == S_OK, "InitVariantFromGUIDAsString failed %lx\n", hres);
hres = VariantToGUID(&var, &guid); - ok(hres == S_OK, "VariantToGUID failed %x\n", hres); + ok(hres == S_OK, "VariantToGUID failed %lx\n", hres); ok(IsEqualGUID(&dummy_guid, &guid), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid));
ok(V_VT(&var) == VT_BSTR, "incorrect VARIANT type: %d\n", V_VT(&var)); V_BSTR(&var)[1] = 'z'; hres = VariantToGUID(&var, &guid); - ok(hres == E_FAIL, "VariantToGUID returned %x\n", hres); + ok(hres == E_FAIL, "VariantToGUID returned %lx\n", hres);
V_BSTR(&var)[1] = 'd'; propvar.vt = V_VT(&var); propvar.bstrVal = V_BSTR(&var); V_VT(&var) = VT_EMPTY; hres = PropVariantToGUID(&propvar, &guid); - ok(hres == S_OK, "PropVariantToGUID failed %x\n", hres); + ok(hres == S_OK, "PropVariantToGUID failed %lx\n", hres); ok(IsEqualGUID(&dummy_guid, &guid), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid)); PropVariantClear(&propvar);
memset(&guid, 0, sizeof(guid)); InitPropVariantFromCLSID(&dummy_guid, &propvar); hres = PropVariantToGUID(&propvar, &guid); - ok(hres == S_OK, "PropVariantToGUID failed %x\n", hres); + ok(hres == S_OK, "PropVariantToGUID failed %lx\n", hres); ok(IsEqualGUID(&dummy_guid, &guid), "incorrect GUID created: %s\n", wine_dbgstr_guid(&guid)); PropVariantClear(&propvar); } @@ -646,7 +646,7 @@ static void test_PropVariantToStringAlloc(void)
prop.vt = VT_NULL; hres = PropVariantToStringAlloc(&prop, &str); - ok(hres == S_OK, "returned %x\n", hres); + ok(hres == S_OK, "returned %lx\n", hres); ok(!lstrcmpW(str, emptyW), "got %s\n", wine_dbgstr_w(str)); CoTaskMemFree(str);
@@ -654,14 +654,14 @@ static void test_PropVariantToStringAlloc(void) prop.pszVal = CoTaskMemAlloc(strlen(topic)+1); strcpy(prop.pszVal, topic); hres = PropVariantToStringAlloc(&prop, &str); - ok(hres == S_OK, "returned %x\n", hres); + ok(hres == S_OK, "returned %lx\n", hres); ok(!lstrcmpW(str, topicW), "got %s\n", wine_dbgstr_w(str)); CoTaskMemFree(str); PropVariantClear(&prop);
prop.vt = VT_EMPTY; hres = PropVariantToStringAlloc(&prop, &str); - ok(hres == S_OK, "returned %x\n", hres); + ok(hres == S_OK, "returned %lx\n", hres); ok(!lstrcmpW(str, emptyW), "got %s\n", wine_dbgstr_w(str)); CoTaskMemFree(str); } @@ -956,101 +956,101 @@ static void test_intconversions(void) propvar.hVal.QuadPart = (ULONGLONG)1 << 63;
hr = PropVariantToInt64(&propvar, &llval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(llval == (ULONGLONG)1 << 63, "got wrong value %s\n", wine_dbgstr_longlong(llval));
hr = PropVariantToUInt64(&propvar, &ullval); - ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%lx\n", hr);
hr = PropVariantToInt32(&propvar, &lval); - ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%lx\n", hr);
hr = PropVariantToUInt32(&propvar, &ulval); - ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%lx\n", hr);
hr = PropVariantToInt16(&propvar, &sval); - ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%lx\n", hr);
hr = PropVariantToUInt16(&propvar, &usval); - ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%lx\n", hr);
propvar.vt = VT_UI8; propvar.uhVal.QuadPart = 5;
hr = PropVariantToInt64(&propvar, &llval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(llval == 5, "got wrong value %s\n", wine_dbgstr_longlong(llval));
hr = PropVariantToUInt64(&propvar, &ullval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(ullval == 5, "got wrong value %s\n", wine_dbgstr_longlong(ullval));
hr = PropVariantToInt32(&propvar, &lval); - ok(hr == S_OK, "hr=%x\n", hr); - ok(lval == 5, "got wrong value %d\n", lval); + ok(hr == S_OK, "hr=%lx\n", hr); + ok(lval == 5, "got wrong value %ld\n", lval);
hr = PropVariantToUInt32(&propvar, &ulval); - ok(hr == S_OK, "hr=%x\n", hr); - ok(ulval == 5, "got wrong value %d\n", ulval); + ok(hr == S_OK, "hr=%lx\n", hr); + ok(ulval == 5, "got wrong value %ld\n", ulval);
hr = PropVariantToInt16(&propvar, &sval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(sval == 5, "got wrong value %d\n", sval);
hr = PropVariantToUInt16(&propvar, &usval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(usval == 5, "got wrong value %d\n", usval);
propvar.vt = VT_I8; propvar.hVal.QuadPart = -5;
hr = PropVariantToInt64(&propvar, &llval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(llval == -5, "got wrong value %s\n", wine_dbgstr_longlong(llval));
hr = PropVariantToUInt64(&propvar, &ullval); - ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%lx\n", hr);
hr = PropVariantToInt32(&propvar, &lval); - ok(hr == S_OK, "hr=%x\n", hr); - ok(lval == -5, "got wrong value %d\n", lval); + ok(hr == S_OK, "hr=%lx\n", hr); + ok(lval == -5, "got wrong value %ld\n", lval);
hr = PropVariantToUInt32(&propvar, &ulval); - ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%lx\n", hr);
hr = PropVariantToInt16(&propvar, &sval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(sval == -5, "got wrong value %d\n", sval);
hr = PropVariantToUInt16(&propvar, &usval); - ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%lx\n", hr);
propvar.vt = VT_UI4; propvar.ulVal = 6;
hr = PropVariantToInt64(&propvar, &llval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(llval == 6, "got wrong value %s\n", wine_dbgstr_longlong(llval));
propvar.vt = VT_I4; propvar.lVal = -6;
hr = PropVariantToInt64(&propvar, &llval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(llval == -6, "got wrong value %s\n", wine_dbgstr_longlong(llval));
propvar.vt = VT_UI2; propvar.uiVal = 7;
hr = PropVariantToInt64(&propvar, &llval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(llval == 7, "got wrong value %s\n", wine_dbgstr_longlong(llval));
propvar.vt = VT_I2; propvar.iVal = -7;
hr = PropVariantToInt64(&propvar, &llval); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(llval == -7, "got wrong value %s\n", wine_dbgstr_longlong(llval)); }
@@ -1076,21 +1076,21 @@ static void test_PropVariantToBoolean(void) propvar.boolVal = VARIANT_FALSE; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_BOOL; propvar.boolVal = 1; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_BOOL; propvar.boolVal = VARIANT_TRUE; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
/* VT_EMPTY */ @@ -1098,7 +1098,7 @@ static void test_PropVariantToBoolean(void) propvar.boolVal = VARIANT_TRUE; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
/* test integer conversion */ @@ -1106,28 +1106,28 @@ static void test_PropVariantToBoolean(void) propvar.lVal = 0; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_I4; propvar.lVal = 1; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_I4; propvar.lVal = 67; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_I4; propvar.lVal = -67; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
/* test string conversion */ @@ -1135,84 +1135,84 @@ static void test_PropVariantToBoolean(void) propvar.pwszVal = str_0; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_1; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_7; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_n7; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_true; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_true_case; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_true2; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_false; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_false2; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_true_space; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#x.\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = str_yes; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#x.\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_LPWSTR; propvar.pwszVal = NULL; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#x.\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
/* VT_LPSTR */ @@ -1220,48 +1220,48 @@ static void test_PropVariantToBoolean(void) propvar.pszVal = (char *)"#TruE#"; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#x.\n", hr); + ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_LPSTR; propvar.pszVal = (char *)"#TRUE#"; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_LPSTR; propvar.pszVal = (char *)"tRUe"; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_LPSTR; propvar.pszVal = (char *)"#FALSE#"; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_LPSTR; propvar.pszVal = (char *)"fALSe"; val = TRUE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == FALSE, "Unexpected value %d\n", val);
propvar.vt = VT_LPSTR; propvar.pszVal = (char *)"1"; val = FALSE; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val);
propvar.vt = VT_LPSTR; propvar.pszVal = (char *)"-1"; hr = PropVariantToBoolean(&propvar, &val); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(val == TRUE, "Unexpected value %d\n", val); }
@@ -1374,7 +1374,7 @@ static void test_PropVariantChangeType_LPWSTR(void)
src.vt = VT_NULL; hr = PropVariantChangeType(&dest, &src, 0, VT_LPWSTR); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(dest.vt == VT_LPWSTR, "got %d\n", dest.vt); ok(!lstrcmpW(dest.pwszVal, emptyW), "got %s\n", wine_dbgstr_w(dest.pwszVal)); PropVariantClear(&dest); @@ -1384,7 +1384,7 @@ static void test_PropVariantChangeType_LPWSTR(void) src.pszVal = CoTaskMemAlloc(strlen(topic)+1); strcpy(src.pszVal, topic); hr = PropVariantChangeType(&dest, &src, 0, VT_LPWSTR); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(dest.vt == VT_LPWSTR, "got %d\n", dest.vt); ok(!lstrcmpW(dest.pwszVal, topicW), "got %s\n", wine_dbgstr_w(dest.pwszVal)); PropVariantClear(&dest); @@ -1394,7 +1394,7 @@ static void test_PropVariantChangeType_LPWSTR(void) src.pwszVal = CoTaskMemAlloc( (lstrlenW(topicW)+1) * sizeof(WCHAR)); lstrcpyW(src.pwszVal, topicW); hr = PropVariantChangeType(&dest, &src, 0, VT_LPWSTR); - ok(hr == S_OK, "hr=%x\n", hr); + ok(hr == S_OK, "hr=%lx\n", hr); ok(dest.vt == VT_LPWSTR, "got %d\n", dest.vt); ok(!lstrcmpW(dest.pwszVal, topicW), "got %s\n", wine_dbgstr_w(dest.pwszVal)); PropVariantClear(&dest); @@ -1413,7 +1413,7 @@ static void test_InitPropVariantFromCLSID(void)
memset(&clsid, 0xcc, sizeof(clsid)); hr = InitPropVariantFromCLSID(&clsid, &propvar); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(propvar.vt == VT_CLSID, "Unexpected type %d.\n", propvar.vt); ok(IsEqualGUID(propvar.puuid, &clsid), "Unexpected puuid value.\n"); PropVariantClear(&propvar); @@ -1429,49 +1429,49 @@ static void test_PropVariantToDouble(void) propvar.vt = VT_R8; propvar.dblVal = 15.0; hr = PropVariantToDouble(&propvar, &value); - ok(hr == S_OK, "PropVariantToDouble failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToDouble failed: 0x%08lx.\n", hr); ok(value == 15.0, "Unexpected value: %f.\n", value);
PropVariantClear(&propvar); propvar.vt = VT_I4; propvar.lVal = 123; hr = PropVariantToDouble(&propvar, &value); - ok(hr == S_OK, "PropVariantToDouble failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToDouble failed: 0x%08lx.\n", hr); ok(value == 123.0, "Unexpected value: %f.\n", value);
PropVariantClear(&propvar); propvar.vt = VT_I4; propvar.lVal = -256; hr = PropVariantToDouble(&propvar, &value); - ok(hr == S_OK, "PropVariantToDouble failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToDouble failed: 0x%08lx.\n", hr); ok(value == -256, "Unexpected value: %f\n", value);
PropVariantClear(&propvar); propvar.vt = VT_I8; propvar.lVal = 65536; hr = PropVariantToDouble(&propvar, &value); - ok(hr == S_OK, "PropVariantToDouble failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToDouble failed: 0x%08lx.\n", hr); ok(value == 65536.0, "Unexpected value: %f.\n", value);
PropVariantClear(&propvar); propvar.vt = VT_I8; propvar.lVal = -321; hr = PropVariantToDouble(&propvar, &value); - ok(hr == S_OK, "PropVariantToDouble failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToDouble failed: 0x%08lx.\n", hr); ok(value == 4294966975.0, "Unexpected value: %f.\n", value);
PropVariantClear(&propvar); propvar.vt = VT_UI4; propvar.ulVal = 6; hr = PropVariantToDouble(&propvar, &value); - ok(hr == S_OK, "PropVariantToDouble failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToDouble failed: 0x%08lx.\n", hr); ok(value == 6.0, "Unexpected value: %f.\n", value);
PropVariantClear(&propvar); propvar.vt = VT_UI8; propvar.uhVal.QuadPart = 8; hr = PropVariantToDouble(&propvar, &value); - ok(hr == S_OK, "PropVariantToDouble failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToDouble failed: 0x%08lx.\n", hr); ok(value == 8.0, "Unexpected value: %f.\n", value); }
@@ -1488,7 +1488,7 @@ static void test_PropVariantToString(void) propvar.pwszVal = stringW; bufferW[0] = 65; hr = PropVariantToString(&propvar, bufferW, 0); - ok(hr == E_INVALIDARG, "PropVariantToString should fail: 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "PropVariantToString should fail: 0x%08lx.\n", hr); ok(!bufferW[0], "got wrong string: "%s".\n", wine_dbgstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW)); PropVariantClear(&propvar); @@ -1498,7 +1498,7 @@ static void test_PropVariantToString(void) propvar.pwszVal = stringW; bufferW[0] = 65; hr = PropVariantToString(&propvar, bufferW, ARRAY_SIZE(bufferW)); - ok(hr == S_OK, "PropVariantToString failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToString failed: 0x%08lx.\n", hr); ok(!bufferW[0], "got wrong string: "%s".\n", wine_dbgstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW)); PropVariantClear(&propvar); @@ -1508,7 +1508,7 @@ static void test_PropVariantToString(void) propvar.pwszVal = stringW; bufferW[0] = 65; hr = PropVariantToString(&propvar, bufferW, ARRAY_SIZE(bufferW)); - ok(hr == S_OK, "PropVariantToString failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToString failed: 0x%08lx.\n", hr); ok(!bufferW[0], "got wrong string: "%s".\n", wine_dbgstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW)); PropVariantClear(&propvar); @@ -1517,7 +1517,7 @@ static void test_PropVariantToString(void) propvar.vt = VT_I4; propvar.lVal = 22; hr = PropVariantToString(&propvar, bufferW, ARRAY_SIZE(bufferW)); - todo_wine ok(hr == S_OK, "PropVariantToString failed: 0x%08x.\n", hr); + todo_wine ok(hr == S_OK, "PropVariantToString failed: 0x%08lx.\n", hr); todo_wine ok(!lstrcmpW(bufferW, L"22"), "got wrong string: "%s".\n", wine_dbgstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW)); PropVariantClear(&propvar); @@ -1526,7 +1526,7 @@ static void test_PropVariantToString(void) propvar.vt = VT_LPWSTR; propvar.pwszVal = stringW; hr = PropVariantToString(&propvar, bufferW, ARRAY_SIZE(bufferW)); - ok(hr == S_OK, "PropVariantToString failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToString failed: 0x%08lx.\n", hr); ok(!lstrcmpW(bufferW, stringW), "got wrong string: "%s".\n", wine_dbgstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW));
@@ -1534,7 +1534,7 @@ static void test_PropVariantToString(void) propvar.vt = VT_LPSTR; propvar.pszVal = string; hr = PropVariantToString(&propvar, bufferW, ARRAY_SIZE(bufferW)); - ok(hr == S_OK, "PropVariantToString failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToString failed: 0x%08lx.\n", hr); ok(!lstrcmpW(bufferW, stringW), "got wrong string: "%s".\n", wine_dbgstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW));
@@ -1542,7 +1542,7 @@ static void test_PropVariantToString(void) propvar.vt = VT_LPWSTR; propvar.pwszVal = stringW; hr = PropVariantToString(&propvar, bufferW, 4); - ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "PropVariantToString returned: 0x%08x.\n", hr); + ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "PropVariantToString returned: 0x%08lx.\n", hr); ok(!memcmp(bufferW, stringW, 4), "got wrong string.\n"); memset(bufferW, 0, sizeof(bufferW));
@@ -1550,7 +1550,7 @@ static void test_PropVariantToString(void) propvar.vt = VT_LPSTR; propvar.pszVal = string; hr = PropVariantToString(&propvar, bufferW, 4); - ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "PropVariantToString returned: 0x%08x.\n", hr); + ok(hr == STRSAFE_E_INSUFFICIENT_BUFFER, "PropVariantToString returned: 0x%08lx.\n", hr); ok(!memcmp(bufferW, stringW, 4), "got wrong string.\n"); memset(bufferW, 0, sizeof(bufferW));
@@ -1558,7 +1558,7 @@ static void test_PropVariantToString(void) propvar.vt = VT_BSTR; propvar.bstrVal = SysAllocString(stringW); hr = PropVariantToString(&propvar, bufferW, ARRAY_SIZE(bufferW)); - ok(hr == S_OK, "PropVariantToString failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToString failed: 0x%08lx.\n", hr); ok(!lstrcmpW(bufferW, stringW), "got wrong string: "%s".\n", wine_dbgstr_w(bufferW)); memset(bufferW, 0, sizeof(bufferW)); SysFreeString(propvar.bstrVal); @@ -1576,32 +1576,32 @@ static void test_PropVariantToBuffer(void) UINT8 buffer[256];
hr = InitPropVariantFromBuffer(data, 10, &propvar); - ok(hr == S_OK, "InitPropVariantFromBuffer failed 0x%08x.\n", hr); + ok(hr == S_OK, "InitPropVariantFromBuffer failed 0x%08lx.\n", hr); hr = PropVariantToBuffer(&propvar, NULL, 0); /* crash when cb isn't zero */ - ok(hr == S_OK, "PropVariantToBuffer failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToBuffer failed: 0x%08lx.\n", hr); PropVariantClear(&propvar);
hr = InitPropVariantFromBuffer(data, 10, &propvar); - ok(hr == S_OK, "InitPropVariantFromBuffer failed 0x%08x.\n", hr); + ok(hr == S_OK, "InitPropVariantFromBuffer failed 0x%08lx.\n", hr); hr = PropVariantToBuffer(&propvar, buffer, 10); - ok(hr == S_OK, "PropVariantToBuffer failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToBuffer failed: 0x%08lx.\n", hr); ok(!memcmp(buffer, data, 10) && !buffer[10], "got wrong buffer.\n"); memset(buffer, 0, sizeof(buffer)); PropVariantClear(&propvar);
hr = InitPropVariantFromBuffer(data, 10, &propvar); - ok(hr == S_OK, "InitPropVariantFromBuffer failed 0x%08x.\n", hr); + ok(hr == S_OK, "InitPropVariantFromBuffer failed 0x%08lx.\n", hr); buffer[0] = 99; hr = PropVariantToBuffer(&propvar, buffer, 11); - ok(hr == E_FAIL, "PropVariantToBuffer returned: 0x%08x.\n", hr); + ok(hr == E_FAIL, "PropVariantToBuffer returned: 0x%08lx.\n", hr); ok(buffer[0] == 99, "got wrong buffer.\n"); memset(buffer, 0, sizeof(buffer)); PropVariantClear(&propvar);
hr = InitPropVariantFromBuffer(data, 10, &propvar); - ok(hr == S_OK, "InitPropVariantFromBuffer failed 0x%08x.\n", hr); + ok(hr == S_OK, "InitPropVariantFromBuffer failed 0x%08lx.\n", hr); hr = PropVariantToBuffer(&propvar, buffer, 9); - ok(hr == S_OK, "PropVariantToBuffer failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PropVariantToBuffer failed: 0x%08lx.\n", hr); ok(!memcmp(buffer, data, 9) && !buffer[9], "got wrong buffer.\n"); memset(buffer, 0, sizeof(buffer)); PropVariantClear(&propvar); @@ -1614,14 +1614,14 @@ static void test_PropVariantToBuffer(void) sa = SafeArrayCreate(VT_UI1, 1, &sabound); ok(sa != NULL, "SafeArrayCreate failed.\n"); hr = SafeArrayAccessData(sa, &pdata); - ok(hr == S_OK, "SafeArrayAccessData failed: 0x%08x.\n", hr); + ok(hr == S_OK, "SafeArrayAccessData failed: 0x%08lx.\n", hr); memcpy(pdata, data, sizeof(data)); hr = SafeArrayUnaccessData(sa); - ok(hr == S_OK, "SafeArrayUnaccessData failed: 0x%08x.\n", hr); + ok(hr == S_OK, "SafeArrayUnaccessData failed: 0x%08lx.\n", hr); propvar.parray = sa; buffer[0] = 99; hr = PropVariantToBuffer(&propvar, buffer, 11); - todo_wine ok(hr == E_FAIL, "PropVariantToBuffer returned: 0x%08x.\n", hr); + todo_wine ok(hr == E_FAIL, "PropVariantToBuffer returned: 0x%08lx.\n", hr); ok(buffer[0] == 99, "got wrong buffer.\n"); memset(buffer, 0, sizeof(buffer)); PropVariantClear(&propvar); @@ -1634,13 +1634,13 @@ static void test_PropVariantToBuffer(void) sa = SafeArrayCreate(VT_UI1, 1, &sabound); ok(sa != NULL, "SafeArrayCreate failed.\n"); hr = SafeArrayAccessData(sa, &pdata); - ok(hr == S_OK, "SafeArrayAccessData failed: 0x%08x.\n", hr); + ok(hr == S_OK, "SafeArrayAccessData failed: 0x%08lx.\n", hr); memcpy(pdata, data, sizeof(data)); hr = SafeArrayUnaccessData(sa); - ok(hr == S_OK, "SafeArrayUnaccessData failed: 0x%08x.\n", hr); + ok(hr == S_OK, "SafeArrayUnaccessData failed: 0x%08lx.\n", hr); propvar.parray = sa; hr = PropVariantToBuffer(&propvar, buffer, sizeof(data)); - todo_wine ok(hr == S_OK, "PropVariantToBuffer failed: 0x%08x.\n", hr); + todo_wine ok(hr == S_OK, "PropVariantToBuffer failed: 0x%08lx.\n", hr); todo_wine ok(!memcmp(buffer, data, 10) && !buffer[10], "got wrong buffer.\n"); memset(buffer, 0, sizeof(buffer)); PropVariantClear(&propvar); @@ -1651,7 +1651,7 @@ static void test_PropVariantToBuffer(void) propvar.caub.cElems = sizeof(data_int8); memcpy(propvar.caub.pElems, data_int8, sizeof(data_int8)); hr = PropVariantToBuffer(&propvar, buffer, sizeof(data_int8)); - ok(hr == E_INVALIDARG, "PropVariantToBuffer failed: 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "PropVariantToBuffer failed: 0x%08lx.\n", hr); PropVariantClear(&propvar);
PropVariantInit(&propvar); @@ -1662,13 +1662,13 @@ static void test_PropVariantToBuffer(void) sa = SafeArrayCreate(VT_I1, 1, &sabound); ok(sa != NULL, "SafeArrayCreate failed.\n"); hr = SafeArrayAccessData(sa, &pdata); - ok(hr == S_OK, "SafeArrayAccessData failed: 0x%08x.\n", hr); + ok(hr == S_OK, "SafeArrayAccessData failed: 0x%08lx.\n", hr); memcpy(pdata, data_int8, sizeof(data_int8)); hr = SafeArrayUnaccessData(sa); - ok(hr == S_OK, "SafeArrayUnaccessData failed: 0x%08x.\n", hr); + ok(hr == S_OK, "SafeArrayUnaccessData failed: 0x%08lx.\n", hr); propvar.parray = sa; hr = PropVariantToBuffer(&propvar, buffer, sizeof(data_int8)); - ok(hr == E_INVALIDARG, "PropVariantToBuffer failed: 0x%08x.\n", hr); + ok(hr == E_INVALIDARG, "PropVariantToBuffer failed: 0x%08lx.\n", hr); PropVariantClear(&propvar); }
@@ -1685,7 +1685,7 @@ static void test_inmemorystore(void)
hr = CoCreateInstance(&CLSID_InMemoryPropertyStore, NULL, CLSCTX_INPROC_SERVER, &IID_IPropertyStoreCache, (void**)&propcache); - ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed, hr=%lx\n", hr);
if (FAILED(hr)) { @@ -1695,20 +1695,20 @@ static void test_inmemorystore(void) }
hr = IPropertyStoreCache_GetCount(propcache, NULL); - ok(hr == E_POINTER, "GetCount failed, hr=%x\n", hr); + ok(hr == E_POINTER, "GetCount failed, hr=%lx\n", hr);
hr = IPropertyStoreCache_GetCount(propcache, &count); - ok(hr == S_OK, "GetCount failed, hr=%x\n", hr); - ok(count == 0, "GetCount returned %i, expected 0\n", count); + ok(hr == S_OK, "GetCount failed, hr=%lx\n", hr); + ok(count == 0, "GetCount returned %li, expected 0\n", count);
hr = IPropertyStoreCache_Commit(propcache); - ok(hr == S_OK, "Commit failed, hr=%x\n", hr); + ok(hr == S_OK, "Commit failed, hr=%lx\n", hr);
hr = IPropertyStoreCache_Commit(propcache); - ok(hr == S_OK, "Commit failed, hr=%x\n", hr); + ok(hr == S_OK, "Commit failed, hr=%lx\n", hr);
hr = IPropertyStoreCache_GetAt(propcache, 0, &pkey); - ok(hr == E_INVALIDARG, "GetAt failed, hr=%x\n", hr); + ok(hr == E_INVALIDARG, "GetAt failed, hr=%lx\n", hr);
pkey.fmtid = PKEY_WineTest; pkey.pid = 4; @@ -1721,25 +1721,25 @@ static void test_inmemorystore(void) { /* Crashes on Windows 7 */ hr = IPropertyStoreCache_SetValue(propcache, NULL, &propvar); - ok(hr == E_POINTER, "SetValue failed, hr=%x\n", hr); + ok(hr == E_POINTER, "SetValue failed, hr=%lx\n", hr);
hr = IPropertyStoreCache_SetValue(propcache, &pkey, NULL); - ok(hr == E_POINTER, "SetValue failed, hr=%x\n", hr); + ok(hr == E_POINTER, "SetValue failed, hr=%lx\n", hr); }
hr = IPropertyStoreCache_SetValue(propcache, &pkey, &propvar); - ok(hr == S_OK, "SetValue failed, hr=%x\n", hr); + ok(hr == S_OK, "SetValue failed, hr=%lx\n", hr);
hr = IPropertyStoreCache_GetCount(propcache, &count); - ok(hr == S_OK, "GetCount failed, hr=%x\n", hr); - ok(count == 1, "GetCount returned %i, expected 0\n", count); + ok(hr == S_OK, "GetCount failed, hr=%lx\n", hr); + ok(count == 1, "GetCount returned %li, expected 0\n", count);
memset(&pkey, 0, sizeof(pkey));
hr = IPropertyStoreCache_GetAt(propcache, 0, &pkey); - ok(hr == S_OK, "GetAt failed, hr=%x\n", hr); + ok(hr == S_OK, "GetAt failed, hr=%lx\n", hr); ok(IsEqualGUID(&pkey.fmtid, &PKEY_WineTest), "got wrong pkey\n"); - ok(pkey.pid == 4, "got pid of %i, expected 4\n", pkey.pid); + ok(pkey.pid == 4, "got pid of %li, expected 4\n", pkey.pid);
pkey.fmtid = PKEY_WineTest; pkey.pid = 4; @@ -1750,16 +1750,16 @@ static void test_inmemorystore(void) { /* Crashes on Windows 7 */ hr = IPropertyStoreCache_GetValue(propcache, NULL, &propvar); - ok(hr == E_POINTER, "GetValue failed, hr=%x\n", hr); + ok(hr == E_POINTER, "GetValue failed, hr=%lx\n", hr); }
hr = IPropertyStoreCache_GetValue(propcache, &pkey, NULL); - ok(hr == E_POINTER, "GetValue failed, hr=%x\n", hr); + ok(hr == E_POINTER, "GetValue failed, hr=%lx\n", hr);
hr = IPropertyStoreCache_GetValue(propcache, &pkey, &propvar); - ok(hr == S_OK, "GetValue failed, hr=%x\n", hr); + ok(hr == S_OK, "GetValue failed, hr=%lx\n", hr); ok(propvar.vt == VT_I4, "expected VT_I4, got %d\n", propvar.vt); - ok(propvar.lVal == 12345, "expected 12345, got %d\n", propvar.lVal); + ok(propvar.lVal == 12345, "expected 12345, got %ld\n", propvar.lVal);
pkey.fmtid = PKEY_WineTest; pkey.pid = 10; @@ -1767,24 +1767,24 @@ static void test_inmemorystore(void) /* Get information for field that isn't set yet */ propvar.vt = VT_I2; hr = IPropertyStoreCache_GetValue(propcache, &pkey, &propvar); - ok(hr == S_OK, "GetValue failed, hr=%x\n", hr); + ok(hr == S_OK, "GetValue failed, hr=%lx\n", hr); ok(propvar.vt == VT_EMPTY, "expected VT_EMPTY, got %d\n", propvar.vt);
state = 0xdeadbeef; hr = IPropertyStoreCache_GetState(propcache, &pkey, &state); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetState failed, hr=%x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetState failed, hr=%lx\n", hr); ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state);
propvar.vt = VT_I2; state = 0xdeadbeef; hr = IPropertyStoreCache_GetValueAndState(propcache, &pkey, &propvar, &state); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetValueAndState failed, hr=%x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "GetValueAndState failed, hr=%lx\n", hr); ok(propvar.vt == VT_EMPTY, "expected VT_EMPTY, got %d\n", propvar.vt); ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state);
/* Set state on an unset field */ hr = IPropertyStoreCache_SetState(propcache, &pkey, PSC_NORMAL); - ok(hr == TYPE_E_ELEMENTNOTFOUND, "SetState failed, hr=%x\n", hr); + ok(hr == TYPE_E_ELEMENTNOTFOUND, "SetState failed, hr=%lx\n", hr);
/* Manipulate state on already set field */ pkey.fmtid = PKEY_WineTest; @@ -1792,26 +1792,26 @@ static void test_inmemorystore(void)
state = 0xdeadbeef; hr = IPropertyStoreCache_GetState(propcache, &pkey, &state); - ok(hr == S_OK, "GetState failed, hr=%x\n", hr); + ok(hr == S_OK, "GetState failed, hr=%lx\n", hr); ok(state == PSC_NORMAL, "expected PSC_NORMAL, got %d\n", state);
hr = IPropertyStoreCache_SetState(propcache, &pkey, 10); - ok(hr == S_OK, "SetState failed, hr=%x\n", hr); + ok(hr == S_OK, "SetState failed, hr=%lx\n", hr);
state = 0xdeadbeef; hr = IPropertyStoreCache_GetState(propcache, &pkey, &state); - ok(hr == S_OK, "GetState failed, hr=%x\n", hr); + ok(hr == S_OK, "GetState failed, hr=%lx\n", hr); ok(state == 10, "expected 10, got %d\n", state);
propvar.vt = VT_I4; propvar.lVal = 12346; hr = IPropertyStoreCache_SetValueAndState(propcache, &pkey, &propvar, 5); - ok(hr == S_OK, "SetValueAndState failed, hr=%x\n", hr); + ok(hr == S_OK, "SetValueAndState failed, hr=%lx\n", hr);
memset(&propvar, 0, sizeof(propvar)); state = 0xdeadbeef; hr = IPropertyStoreCache_GetValueAndState(propcache, &pkey, &propvar, &state); - ok(hr == S_OK, "GetValueAndState failed, hr=%x\n", hr); + ok(hr == S_OK, "GetValueAndState failed, hr=%lx\n", hr); ok(propvar.vt == VT_I4, "expected VT_I4, got %d\n", propvar.vt); ok(propvar.lVal == 12346, "expected 12346, got %d\n", propvar.vt); ok(state == 5, "expected 5, got %d\n", state); @@ -1823,12 +1823,12 @@ static void test_inmemorystore(void) propvar.vt = VT_I4; propvar.lVal = 12347; hr = IPropertyStoreCache_SetValueAndState(propcache, &pkey, &propvar, PSC_DIRTY); - ok(hr == S_OK, "SetValueAndState failed, hr=%x\n", hr); + ok(hr == S_OK, "SetValueAndState failed, hr=%lx\n", hr);
memset(&propvar, 0, sizeof(propvar)); state = 0xdeadbeef; hr = IPropertyStoreCache_GetValueAndState(propcache, &pkey, &propvar, &state); - ok(hr == S_OK, "GetValueAndState failed, hr=%x\n", hr); + ok(hr == S_OK, "GetValueAndState failed, hr=%lx\n", hr); ok(propvar.vt == VT_I4, "expected VT_I4, got %d\n", propvar.vt); ok(propvar.lVal == 12347, "expected 12347, got %d\n", propvar.vt); ok(state == PSC_DIRTY, "expected PSC_DIRTY, got %d\n", state); @@ -1850,11 +1850,11 @@ static void test_persistserialized(void)
hr = CoCreateInstance(&CLSID_InMemoryPropertyStore, NULL, CLSCTX_INPROC_SERVER, &IID_IPropertyStore, (void**)&propstore); - ok(hr == S_OK, "CoCreateInstance failed, hr=%x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed, hr=%lx\n", hr);
hr = IPropertyStore_QueryInterface(propstore, &IID_IPersistSerializedPropStorage, (void**)&serialized); - todo_wine ok(hr == S_OK, "QueryInterface failed, hr=%x\n", hr); + todo_wine ok(hr == S_OK, "QueryInterface failed, hr=%lx\n", hr);
if (FAILED(hr)) { @@ -1865,30 +1865,30 @@ static void test_persistserialized(void) }
hr = IPersistSerializedPropStorage_GetPropertyStorage(serialized, NULL, &result_size); - ok(hr == E_POINTER, "GetPropertyStorage failed, hr=%x\n", hr); + ok(hr == E_POINTER, "GetPropertyStorage failed, hr=%lx\n", hr);
hr = IPersistSerializedPropStorage_GetPropertyStorage(serialized, &result, NULL); - ok(hr == E_POINTER, "GetPropertyStorage failed, hr=%x\n", hr); + ok(hr == E_POINTER, "GetPropertyStorage failed, hr=%lx\n", hr);
hr = IPersistSerializedPropStorage_GetPropertyStorage(serialized, &result, &result_size); - ok(hr == S_OK, "GetPropertyStorage failed, hr=%x\n", hr); + ok(hr == S_OK, "GetPropertyStorage failed, hr=%lx\n", hr);
if (SUCCEEDED(hr)) { - ok(result_size == 0, "expected 0 bytes, got %i\n", result_size); + ok(result_size == 0, "expected 0 bytes, got %li\n", result_size);
CoTaskMemFree(result); }
hr = IPersistSerializedPropStorage_SetPropertyStorage(serialized, NULL, 4); - ok(hr == E_POINTER, "SetPropertyStorage failed, hr=%x\n", hr); + ok(hr == E_POINTER, "SetPropertyStorage failed, hr=%lx\n", hr);
hr = IPersistSerializedPropStorage_SetPropertyStorage(serialized, NULL, 0); - ok(hr == S_OK, "SetPropertyStorage failed, hr=%x\n", hr); + ok(hr == S_OK, "SetPropertyStorage failed, hr=%lx\n", hr);
hr = IPropertyStore_GetCount(propstore, &result_size); - ok(hr == S_OK, "GetCount failed, hr=%x\n", hr); - ok(result_size == 0, "expecting 0, got %d\n", result_size); + ok(hr == S_OK, "GetCount failed, hr=%lx\n", hr); + ok(result_size == 0, "expecting 0, got %ld\n", result_size);
IPropertyStore_Release(propstore); IPersistSerializedPropStorage_Release(serialized); @@ -1906,12 +1906,12 @@ static void test_PSCreateMemoryPropertyStore(void) /* PSCreateMemoryPropertyStore(&IID_IPropertyStore, NULL); crashes */
hr = PSCreateMemoryPropertyStore(&IID_IPropertyStore, (void **)&propstore); - ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08lx.\n", hr); ok(propstore != NULL, "got %p.\n", propstore); EXPECT_REF(propstore, 1);
hr = PSCreateMemoryPropertyStore(&IID_IPersistSerializedPropStorage, (void **)&serialized); - todo_wine ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08x.\n", hr); + todo_wine ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08lx.\n", hr); todo_wine ok(serialized != NULL, "got %p.\n", serialized); EXPECT_REF(propstore, 1); if(serialized) @@ -1921,14 +1921,14 @@ static void test_PSCreateMemoryPropertyStore(void) }
hr = PSCreateMemoryPropertyStore(&IID_IPropertyStoreCache, (void **)&propstorecache); - ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08lx.\n", hr); ok(propstorecache != NULL, "got %p.\n", propstore); ok(propstorecache != (IPropertyStoreCache *)propstore, "pointer are equal: %p, %p.\n", propstorecache, propstore); EXPECT_REF(propstore, 1); EXPECT_REF(propstorecache, 1);
hr = PSCreateMemoryPropertyStore(&IID_IPropertyStore, (void **)&propstore1); - ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08lx.\n", hr); ok(propstore1 != NULL, "got %p.\n", propstore); ok(propstore1 != propstore, "pointer are equal: %p, %p.\n", propstore1, propstore); EXPECT_REF(propstore, 1); @@ -1949,12 +1949,12 @@ static void test_propertystore(void) DWORD count = 0;
hr = PSCreateMemoryPropertyStore(&IID_IPropertyStore, (void **)&propstore); - ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08x.\n", hr); + ok(hr == S_OK, "PSCreateMemoryPropertyStore failed: 0x%08lx.\n", hr); ok(propstore != NULL, "got %p.\n", propstore);
hr = IPropertyStore_GetCount(propstore, &count); - ok(hr == S_OK, "IPropertyStore_GetCount failed: 0x%08x.\n", hr); - ok(!count, "got wrong property count: %d, expected 0.\n", count); + ok(hr == S_OK, "IPropertyStore_GetCount failed: 0x%08lx.\n", hr); + ok(!count, "got wrong property count: %ld, expected 0.\n", count);
PropVariantInit(&propvar); propvar.vt = VT_I4; @@ -1962,18 +1962,18 @@ static void test_propertystore(void) propkey.fmtid = DUMMY_GUID1; propkey.pid = PID_FIRST_USABLE; hr = IPropertyStore_SetValue(propstore, &propkey, &propvar); - ok(hr == S_OK, "IPropertyStore_SetValue failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IPropertyStore_SetValue failed: 0x%08lx.\n", hr); hr = IPropertyStore_Commit(propstore); - ok(hr == S_OK, "IPropertyStore_Commit failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IPropertyStore_Commit failed: 0x%08lx.\n", hr); hr = IPropertyStore_GetCount(propstore, &count); - ok(hr == S_OK, "IPropertyStore_GetCount failed: 0x%08x.\n", hr); - ok(count == 1, "got wrong property count: %d, expected 1.\n", count); + ok(hr == S_OK, "IPropertyStore_GetCount failed: 0x%08lx.\n", hr); + ok(count == 1, "got wrong property count: %ld, expected 1.\n", count); PropVariantInit(&ret_propvar); ret_propvar.vt = VT_I4; hr = IPropertyStore_GetValue(propstore, &propkey, &ret_propvar); - ok(hr == S_OK, "IPropertyStore_GetValue failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IPropertyStore_GetValue failed: 0x%08lx.\n", hr); ok(ret_propvar.vt == VT_I4, "got wrong property type: %x.\n", ret_propvar.vt); - ok(ret_propvar.lVal == 123, "got wrong value: %d, expected 123.\n", ret_propvar.lVal); + ok(ret_propvar.lVal == 123, "got wrong value: %ld, expected 123.\n", ret_propvar.lVal); PropVariantClear(&propvar); PropVariantClear(&ret_propvar);
@@ -1981,17 +1981,17 @@ static void test_propertystore(void) propkey.fmtid = DUMMY_GUID1; propkey.pid = PID_FIRST_USABLE; hr = IPropertyStore_SetValue(propstore, &propkey, &propvar); - ok(hr == S_OK, "IPropertyStore_SetValue failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IPropertyStore_SetValue failed: 0x%08lx.\n", hr); hr = IPropertyStore_Commit(propstore); - ok(hr == S_OK, "IPropertyStore_Commit failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IPropertyStore_Commit failed: 0x%08lx.\n", hr); hr = IPropertyStore_GetCount(propstore, &count); - ok(hr == S_OK, "IPropertyStore_GetCount failed: 0x%08x.\n", hr); - ok(count == 1, "got wrong property count: %d, expected 1.\n", count); + ok(hr == S_OK, "IPropertyStore_GetCount failed: 0x%08lx.\n", hr); + ok(count == 1, "got wrong property count: %ld, expected 1.\n", count); PropVariantInit(&ret_propvar); hr = IPropertyStore_GetValue(propstore, &propkey, &ret_propvar); - ok(hr == S_OK, "IPropertyStore_GetValue failed: 0x%08x.\n", hr); + ok(hr == S_OK, "IPropertyStore_GetValue failed: 0x%08lx.\n", hr); ok(ret_propvar.vt == VT_EMPTY, "got wrong property type: %x.\n", ret_propvar.vt); - ok(!ret_propvar.lVal, "got wrong value: %d, expected 0.\n", ret_propvar.lVal); + ok(!ret_propvar.lVal, "got wrong value: %ld, expected 0.\n", ret_propvar.lVal); PropVariantClear(&propvar); PropVariantClear(&ret_propvar);
@@ -2005,17 +2005,17 @@ static void test_PSCreatePropertyStoreFromObject(void) HRESULT hr;
hr = PSCreateMemoryPropertyStore(&IID_IPropertyStore, (void **)&propstore); - ok(hr == S_OK, "Failed to create property store, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create property store, hr %#lx.\n", hr);
hr = PSCreatePropertyStoreFromObject(NULL, STGM_READWRITE, &IID_IUnknown, (void **)&unk); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = PSCreatePropertyStoreFromObject((IUnknown *)propstore, STGM_READWRITE, &IID_IUnknown, NULL); - ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = PSCreatePropertyStoreFromObject((IUnknown *)propstore, STGM_READWRITE, &IID_IUnknown, (void **)&unk); todo_wine - ok(hr == S_OK, "Failed to create wrapper, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create wrapper, hr %#lx.\n", hr); if (SUCCEEDED(hr)) { ok(unk != (IUnknown *)propstore, "Unexpected object returned.\n"); @@ -2023,7 +2023,7 @@ static void test_PSCreatePropertyStoreFromObject(void) }
hr = PSCreatePropertyStoreFromObject((IUnknown *)propstore, STGM_READWRITE, &IID_IPropertyStore, (void **)&unk); - ok(hr == S_OK, "Failed to create wrapper, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create wrapper, hr %#lx.\n", hr); ok(unk == (IUnknown *)propstore, "Unexpected object returned.\n"); IUnknown_Release(unk);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/psapi/tests/Makefile.in | 1 dlls/psapi/tests/psapi_main.c | 258 +++++++++++++++++++++-------------------- 2 files changed, 129 insertions(+), 130 deletions(-)
diff --git a/dlls/psapi/tests/Makefile.in b/dlls/psapi/tests/Makefile.in index 5351ab507dc..d085953f6ca 100644 --- a/dlls/psapi/tests/Makefile.in +++ b/dlls/psapi/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = psapi.dll IMPORTS = psapi user32
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index 6e3831d8dad..185a4062092 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -64,13 +64,13 @@ static void test_EnumProcesses(void)
SetLastError(0xdeadbeef); ret = EnumProcesses(NULL, 0, &cbUsed); - ok(ret == 1, "failed with %d\n", GetLastError()); - ok(cbUsed == 0, "cbUsed=%d\n", cbUsed); + ok(ret == 1, "failed with %ld\n", GetLastError()); + ok(cbUsed == 0, "cbUsed=%ld\n", cbUsed);
SetLastError(0xdeadbeef); ret = EnumProcesses(&pid, 4, &cbUsed); - ok(ret == 1, "failed with %d\n", GetLastError()); - ok(cbUsed == 4, "cbUsed=%d\n", cbUsed); + ok(ret == 1, "failed with %ld\n", GetLastError()); + ok(cbUsed == 4, "cbUsed=%ld\n", cbUsed); }
static void test_EnumProcessModules(void) @@ -84,45 +84,45 @@ static void test_EnumProcessModules(void)
SetLastError(0xdeadbeef); EnumProcessModules(NULL, NULL, 0, &cbNeeded); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); EnumProcessModules(hpQI, NULL, 0, &cbNeeded); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); hMod = (void *)0xdeadbeef; ret = EnumProcessModules(hpQI, &hMod, sizeof(HMODULE), NULL); ok(!ret, "succeeded\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); hMod = (void *)0xdeadbeef; ret = EnumProcessModules(hpQV, &hMod, sizeof(HMODULE), NULL); ok(!ret, "succeeded\n"); - ok(GetLastError() == ERROR_NOACCESS, "expected error=ERROR_NOACCESS but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_NOACCESS, "expected error=ERROR_NOACCESS but got %ld\n", GetLastError()); ok(hMod == GetModuleHandleA(NULL), "hMod=%p GetModuleHandleA(NULL)=%p\n", hMod, GetModuleHandleA(NULL));
SetLastError(0xdeadbeef); ret = EnumProcessModules(hpQV, NULL, 0, &cbNeeded); - ok(ret == 1, "failed with %d\n", GetLastError()); + ok(ret == 1, "failed with %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = EnumProcessModules(hpQV, NULL, sizeof(HMODULE), &cbNeeded); ok(!ret, "succeeded\n"); - ok(GetLastError() == ERROR_NOACCESS, "expected error=ERROR_NOACCESS but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_NOACCESS, "expected error=ERROR_NOACCESS but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); hMod = (void *)0xdeadbeef; ret = EnumProcessModules(hpQV, &hMod, sizeof(HMODULE), &cbNeeded); - ok(ret == 1, "got %d, failed with %d\n", ret, GetLastError()); + ok(ret == 1, "got %ld, failed with %ld\n", ret, GetLastError()); ok(hMod == GetModuleHandleA(NULL), "hMod=%p GetModuleHandleA(NULL)=%p\n", hMod, GetModuleHandleA(NULL)); - ok(cbNeeded % sizeof(hMod) == 0, "not a multiple of sizeof(HMODULE) cbNeeded=%d\n", cbNeeded); + ok(cbNeeded % sizeof(hMod) == 0, "not a multiple of sizeof(HMODULE) cbNeeded=%ld\n", cbNeeded);
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed: %u\n", GetLastError()); + ok(ret, "CreateProcess failed: %lu\n", GetLastError());
ret = WaitForInputIdle(pi.hProcess, 5000); ok(!ret, "wait timed out\n"); @@ -130,9 +130,9 @@ static void test_EnumProcessModules(void) SetLastError(0xdeadbeef); hMod = NULL; ret = EnumProcessModules(pi.hProcess, &hMod, sizeof(HMODULE), &cbNeeded); - ok(ret == 1, "got %d, error %u\n", ret, GetLastError()); + ok(ret == 1, "got %ld, error %lu\n", ret, GetLastError()); ok(!!hMod, "expected non-NULL module\n"); - ok(cbNeeded % sizeof(hMod) == 0, "got %u\n", cbNeeded); + ok(cbNeeded % sizeof(hMod) == 0, "got %lu\n", cbNeeded);
TerminateProcess(pi.hProcess, 0);
@@ -143,7 +143,7 @@ static void test_EnumProcessModules(void)
strcpy(buffer, "C:\windows\syswow64\notepad.exe"); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); - ok(ret, "CreateProcess failed: %u\n", GetLastError()); + ok(ret, "CreateProcess failed: %lu\n", GetLastError());
ret = WaitForInputIdle(pi.hProcess, 5000); ok(!ret, "wait timed out\n"); @@ -151,20 +151,20 @@ static void test_EnumProcessModules(void) SetLastError(0xdeadbeef); hMod = NULL; ret = EnumProcessModules(pi.hProcess, &hMod, sizeof(HMODULE), &cbNeeded); - ok(ret == 1, "got %d, error %u\n", ret, GetLastError()); + ok(ret == 1, "got %ld, error %lu\n", ret, GetLastError()); ok(!!hMod, "expected non-NULL module\n"); - ok(cbNeeded % sizeof(hMod) == 0, "got %u\n", cbNeeded); + ok(cbNeeded % sizeof(hMod) == 0, "got %lu\n", cbNeeded);
ret = GetModuleBaseNameA(pi.hProcess, hMod, name, sizeof(name)); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(name, "notepad.exe"), "got %s\n", name);
ret = GetModuleFileNameExA(pi.hProcess, hMod, name, sizeof(name)); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(!strcmp(name, buffer), "got %s\n", name);
ret = GetModuleInformation(pi.hProcess, hMod, &info, sizeof(info)); - ok(ret, "got error %u\n", GetLastError()); + ok(ret, "got error %lu\n", GetLastError()); ok(info.lpBaseOfDll == hMod, "expected %p, got %p\n", hMod, info.lpBaseOfDll); ok(info.SizeOfImage, "image size was 0\n"); ok(info.EntryPoint >= info.lpBaseOfDll, "got entry point %p\n", info.EntryPoint); @@ -176,16 +176,16 @@ static void test_EnumProcessModules(void) pWow64DisableWow64FsRedirection(&cookie); ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); pWow64RevertWow64FsRedirection(cookie); - ok(ret, "CreateProcess failed: %u\n", GetLastError()); + ok(ret, "CreateProcess failed: %lu\n", GetLastError());
ret = WaitForInputIdle(pi.hProcess, 5000); ok(!ret, "wait timed out\n");
SetLastError(0xdeadbeef); ret = EnumProcessModules(pi.hProcess, &hMod, sizeof(HMODULE), &cbNeeded); - ok(!ret, "got %d\n", ret); + ok(!ret, "got %ld\n", ret); todo_wine - ok(GetLastError() == ERROR_PARTIAL_COPY, "got error %u\n", GetLastError()); + ok(GetLastError() == ERROR_PARTIAL_COPY, "got error %lu\n", GetLastError());
TerminateProcess(pi.hProcess, 0); } @@ -199,23 +199,23 @@ static void test_GetModuleInformation(void)
SetLastError(0xdeadbeef); GetModuleInformation(NULL, hMod, &info, sizeof(info)); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); GetModuleInformation(hpQI, hMod, &info, sizeof(info)); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); GetModuleInformation(hpQV, hBad, &info, sizeof(info)); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); GetModuleInformation(hpQV, hMod, &info, sizeof(info)-1); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetModuleInformation(hpQV, hMod, &info, sizeof(info)); - ok(ret == 1, "failed with %d\n", GetLastError()); + ok(ret == 1, "failed with %ld\n", GetLastError()); ok(info.lpBaseOfDll == hMod, "lpBaseOfDll=%p hMod=%p\n", info.lpBaseOfDll, hMod); }
@@ -234,7 +234,7 @@ static void test_GetPerformanceInfo(void) SetLastError(0xdeadbeef); ret = GetPerformanceInfo(&info, sizeof(info)-1); ok(!ret, "GetPerformanceInfo unexpectedly succeeded\n"); - ok(GetLastError() == ERROR_BAD_LENGTH, "expected error=ERROR_BAD_LENGTH but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_BAD_LENGTH, "expected error=ERROR_BAD_LENGTH but got %ld\n", GetLastError());
if (!pNtQuerySystemInformation) win_skip("NtQuerySystemInformation not found, skipping tests\n"); @@ -249,57 +249,57 @@ static void test_GetPerformanceInfo(void) /* compare with values from SYSTEM_PERFORMANCE_INFORMATION */ size = 0; status = pNtQuerySystemInformation(SystemPerformanceInformation, sys_performance_info, sizeof(performance_buffer), &size); - ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status); - ok(size >= sizeof(SYSTEM_PERFORMANCE_INFORMATION), "incorrect length %d\n", size); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08lx\n", status); + ok(size >= sizeof(SYSTEM_PERFORMANCE_INFORMATION), "incorrect length %ld\n", size);
SetLastError(0xdeadbeef); ret = GetPerformanceInfo(&info, sizeof(info)); - ok(ret, "GetPerformanceInfo failed with %d\n", GetLastError()); - ok(info.cb == sizeof(PERFORMANCE_INFORMATION), "got %d\n", info.cb); + ok(ret, "GetPerformanceInfo failed with %ld\n", GetLastError()); + ok(info.cb == sizeof(PERFORMANCE_INFORMATION), "got %ld\n", info.cb);
ok(check_with_margin(info.CommitTotal, sys_performance_info->TotalCommittedPages, 2048), - "expected approximately %ld but got %d\n", info.CommitTotal, sys_performance_info->TotalCommittedPages); + "expected approximately %Id but got %ld\n", info.CommitTotal, sys_performance_info->TotalCommittedPages);
ok(check_with_margin(info.CommitLimit, sys_performance_info->TotalCommitLimit, 32), - "expected approximately %ld but got %d\n", info.CommitLimit, sys_performance_info->TotalCommitLimit); + "expected approximately %Id but got %ld\n", info.CommitLimit, sys_performance_info->TotalCommitLimit);
ok(check_with_margin(info.CommitPeak, sys_performance_info->PeakCommitment, 32), - "expected approximately %ld but got %d\n", info.CommitPeak, sys_performance_info->PeakCommitment); + "expected approximately %Id but got %ld\n", info.CommitPeak, sys_performance_info->PeakCommitment);
ok(check_with_margin(info.PhysicalAvailable, sys_performance_info->AvailablePages, 2048), - "expected approximately %ld but got %d\n", info.PhysicalAvailable, sys_performance_info->AvailablePages); + "expected approximately %Id but got %ld\n", info.PhysicalAvailable, sys_performance_info->AvailablePages);
/* TODO: info.SystemCache not checked yet - to which field(s) does this value correspond to? */
ok(check_with_margin(info.KernelTotal, sys_performance_info->PagedPoolUsage + sys_performance_info->NonPagedPoolUsage, 256), - "expected approximately %ld but got %d\n", info.KernelTotal, + "expected approximately %Id but got %ld\n", info.KernelTotal, sys_performance_info->PagedPoolUsage + sys_performance_info->NonPagedPoolUsage);
ok(check_with_margin(info.KernelPaged, sys_performance_info->PagedPoolUsage, 256), - "expected approximately %ld but got %d\n", info.KernelPaged, sys_performance_info->PagedPoolUsage); + "expected approximately %Id but got %ld\n", info.KernelPaged, sys_performance_info->PagedPoolUsage);
ok(check_with_margin(info.KernelNonpaged, sys_performance_info->NonPagedPoolUsage, 16), - "expected approximately %ld but got %d\n", info.KernelNonpaged, sys_performance_info->NonPagedPoolUsage); + "expected approximately %Id but got %ld\n", info.KernelNonpaged, sys_performance_info->NonPagedPoolUsage);
/* compare with values from SYSTEM_BASIC_INFORMATION */ size = 0; status = pNtQuerySystemInformation(SystemBasicInformation, &sys_basic_info, sizeof(sys_basic_info), &size); - ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status); - ok(size >= sizeof(SYSTEM_BASIC_INFORMATION), "incorrect length %d\n", size); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08lx\n", status); + ok(size >= sizeof(SYSTEM_BASIC_INFORMATION), "incorrect length %ld\n", size);
ok(info.PhysicalTotal == sys_basic_info.MmNumberOfPhysicalPages, - "expected info.PhysicalTotal=%u but got %u\n", + "expected info.PhysicalTotal=%lu but got %lu\n", sys_basic_info.MmNumberOfPhysicalPages, (ULONG)info.PhysicalTotal);
ok(info.PageSize == sys_basic_info.PageSize, - "expected info.PageSize=%u but got %u\n", + "expected info.PageSize=%lu but got %lu\n", sys_basic_info.PageSize, (ULONG)info.PageSize);
/* compare with values from SYSTEM_PROCESS_INFORMATION */ size = 0; status = pNtQuerySystemInformation(SystemProcessInformation, NULL, 0, &size); - ok(status == STATUS_INFO_LENGTH_MISMATCH, "expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status); - ok(size > 0, "incorrect length %d\n", size); + ok(status == STATUS_INFO_LENGTH_MISMATCH, "expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status); + ok(size > 0, "incorrect length %ld\n", size); while (status == STATUS_INFO_LENGTH_MISMATCH) { sys_process_info = HeapAlloc(GetProcessHeap(), 0, size); @@ -308,7 +308,7 @@ static void test_GetPerformanceInfo(void) if (status == STATUS_SUCCESS) break; HeapFree(GetProcessHeap(), 0, sys_process_info); } - ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08lx\n", status);
process_count = handle_count = thread_count = 0; for (spi = sys_process_info;; spi = (SYSTEM_PROCESS_INFORMATION *)(((char *)spi) + spi->NextEntryOffset)) @@ -321,13 +321,13 @@ static void test_GetPerformanceInfo(void) HeapFree(GetProcessHeap(), 0, sys_process_info);
ok(check_with_margin(info.HandleCount, handle_count, 512), - "expected approximately %d but got %d\n", info.HandleCount, handle_count); + "expected approximately %ld but got %ld\n", info.HandleCount, handle_count);
ok(check_with_margin(info.ProcessCount, process_count, 4), - "expected approximately %d but got %d\n", info.ProcessCount, process_count); + "expected approximately %ld but got %ld\n", info.ProcessCount, process_count);
ok(check_with_margin(info.ThreadCount, thread_count, 4), - "expected approximately %d but got %d\n", info.ThreadCount, thread_count); + "expected approximately %ld but got %ld\n", info.ThreadCount, thread_count); } }
@@ -340,21 +340,21 @@ static void test_GetProcessMemoryInfo(void) SetLastError(0xdeadbeef); ret = GetProcessMemoryInfo(NULL, &pmc, sizeof(pmc)); ok(!ret, "GetProcessMemoryInfo should fail\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetProcessMemoryInfo(hpSR, &pmc, sizeof(pmc)); ok(!ret, "GetProcessMemoryInfo should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetProcessMemoryInfo(hpQI, &pmc, sizeof(pmc)-1); ok(!ret, "GetProcessMemoryInfo should fail\n"); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetProcessMemoryInfo(hpQI, &pmc, sizeof(pmc)); - ok(ret == 1, "failed with %d\n", GetLastError()); + ok(ret == 1, "failed with %ld\n", GetLastError()); }
static BOOL nt_get_mapped_file_name(HANDLE process, LPVOID addr, LPWSTR name, DWORD len) @@ -371,10 +371,10 @@ static BOOL nt_get_mapped_file_name(HANDLE process, LPVOID addr, LPWSTR name, DW
ret_len = 0xdeadbeef; status = pNtQueryVirtualMemory(process, addr, MemoryMappedFilenameInformation, buf, buf_len, &ret_len); - ok(!status, "NtQueryVirtualMemory error %x\n", status); + ok(!status, "NtQueryVirtualMemory error %lx\n", status);
section_name = (MEMORY_SECTION_NAME *)buf; - ok(ret_len == section_name->SectionFileName.MaximumLength + sizeof(*section_name), "got %lu, %u\n", + ok(ret_len == section_name->SectionFileName.MaximumLength + sizeof(*section_name), "got %Iu, %u\n", ret_len, section_name->SectionFileName.MaximumLength); ok((char *)section_name->SectionFileName.Buffer == (char *)section_name + sizeof(*section_name), "got %p, %p\n", section_name, section_name->SectionFileName.Buffer); @@ -401,20 +401,20 @@ static void test_GetMappedFileName(void) SetLastError(0xdeadbeef); ret = GetMappedFileNameA(NULL, hMod, szMapPath, sizeof(szMapPath)); ok(!ret, "GetMappedFileName should fail\n"); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetMappedFileNameA(hpSR, hMod, szMapPath, sizeof(szMapPath)); ok(!ret, "GetMappedFileName should fail\n"); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %ld\n", GetLastError());
SetLastError( 0xdeadbeef ); ret = GetMappedFileNameA(hpQI, hMod, szMapPath, sizeof(szMapPath)); ok( ret || broken(GetLastError() == ERROR_UNEXP_NET_ERR), /* win2k */ - "GetMappedFileNameA failed with error %u\n", GetLastError() ); + "GetMappedFileNameA failed with error %lu\n", GetLastError() ); if (ret) { - ok(ret == strlen(szMapPath), "szMapPath="%s" ret=%d\n", szMapPath, ret); + ok(ret == strlen(szMapPath), "szMapPath="%s" ret=%ld\n", szMapPath, ret); ok(szMapPath[0] == '\', "szMapPath="%s"\n", szMapPath); szMapBaseName = strrchr(szMapPath, '\'); /* That's close enough for us */ ok(szMapBaseName && *szMapBaseName, "szMapPath="%s"\n", szMapPath); @@ -434,49 +434,49 @@ static void test_GetMappedFileName(void) drive[2] = 0; SetLastError(0xdeadbeef); ret = QueryDosDeviceA(drive, device_name, sizeof(device_name)); - ok(ret, "QueryDosDeviceA error %d\n", GetLastError()); + ok(ret, "QueryDosDeviceA error %ld\n", GetLastError()); trace("%s -> %s\n", drive, device_name);
SetLastError(0xdeadbeef); hfile = CreateFileA(file_name, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(hfile != INVALID_HANDLE_VALUE, "CreateFileA(%s) error %d\n", file_name, GetLastError()); + ok(hfile != INVALID_HANDLE_VALUE, "CreateFileA(%s) error %ld\n", file_name, GetLastError()); SetFilePointer(hfile, 0x4000, NULL, FILE_BEGIN); SetEndOfFile(hfile);
SetLastError(0xdeadbeef); hmap = CreateFileMappingA(hfile, NULL, PAGE_READONLY | SEC_COMMIT, 0, 0, NULL); - ok(hmap != 0, "CreateFileMappingA error %d\n", GetLastError()); + ok(hmap != 0, "CreateFileMappingA error %ld\n", GetLastError());
SetLastError(0xdeadbeef); base = MapViewOfFile(hmap, FILE_MAP_READ, 0, 0, 0); - ok(base != NULL, "MapViewOfFile error %d\n", GetLastError()); + ok(base != NULL, "MapViewOfFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetMappedFileNameA(GetCurrentProcess(), base, map_name, 0); ok(!ret, "GetMappedFileName should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_INSUFFICIENT_BUFFER, - "wrong error %d\n", GetLastError()); + "wrong error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetMappedFileNameA(GetCurrentProcess(), base, 0, sizeof(map_name)); ok(!ret, "GetMappedFileName should fail\n"); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetMappedFileNameA(GetCurrentProcess(), base, map_name, 1); - ok(ret == 1, "GetMappedFileName error %d\n", GetLastError()); + ok(ret == 1, "GetMappedFileName error %ld\n", GetLastError()); ok(!map_name[0] || broken(map_name[0] == device_name[0]) /* before win2k */, "expected 0, got %c\n", map_name[0]);
SetLastError(0xdeadbeef); ret = GetMappedFileNameA(GetCurrentProcess(), base, map_name, sizeof(map_name)); - ok(ret, "GetMappedFileName error %d\n", GetLastError()); + ok(ret, "GetMappedFileName error %ld\n", GetLastError()); ok(ret > strlen(device_name), "map_name should be longer than device_name\n"); todo_wine ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name);
SetLastError(0xdeadbeef); ret = GetMappedFileNameW(GetCurrentProcess(), base, map_nameW, ARRAY_SIZE(map_nameW)); - ok(ret, "GetMappedFileNameW error %d\n", GetLastError()); + ok(ret, "GetMappedFileNameW error %ld\n", GetLastError()); ok(ret > strlen(device_name), "map_name should be longer than device_name\n"); if (nt_get_mapped_file_name(GetCurrentProcess(), base, nt_map_name, ARRAY_SIZE(nt_map_name))) { @@ -488,7 +488,7 @@ static void test_GetMappedFileName(void)
SetLastError(0xdeadbeef); ret = GetMappedFileNameA(GetCurrentProcess(), base + 0x2000, map_name, sizeof(map_name)); - ok(ret, "GetMappedFileName error %d\n", GetLastError()); + ok(ret, "GetMappedFileName error %ld\n", GetLastError()); ok(ret > strlen(device_name), "map_name should be longer than device_name\n"); todo_wine ok(memcmp(map_name, device_name, strlen(device_name)) == 0, "map name does not start with a device name: %s\n", map_name); @@ -496,17 +496,17 @@ static void test_GetMappedFileName(void) SetLastError(0xdeadbeef); ret = GetMappedFileNameA(GetCurrentProcess(), base + 0x4000, map_name, sizeof(map_name)); ok(!ret, "GetMappedFileName should fail\n"); - ok(GetLastError() == ERROR_UNEXP_NET_ERR, "expected ERROR_UNEXP_NET_ERR, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_UNEXP_NET_ERR, "expected ERROR_UNEXP_NET_ERR, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetMappedFileNameA(GetCurrentProcess(), NULL, map_name, sizeof(map_name)); ok(!ret, "GetMappedFileName should fail\n"); - ok(GetLastError() == ERROR_UNEXP_NET_ERR, "expected ERROR_UNEXP_NET_ERR, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_UNEXP_NET_ERR, "expected ERROR_UNEXP_NET_ERR, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetMappedFileNameA(0, base, map_name, sizeof(map_name)); ok(!ret, "GetMappedFileName 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());
UnmapViewOfFile(base); CloseHandle(hmap); @@ -515,16 +515,16 @@ static void test_GetMappedFileName(void)
SetLastError(0xdeadbeef); hmap = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READONLY | SEC_COMMIT, 0, 4096, NULL); - ok(hmap != 0, "CreateFileMappingA error %d\n", GetLastError()); + ok(hmap != 0, "CreateFileMappingA error %ld\n", GetLastError());
SetLastError(0xdeadbeef); base = MapViewOfFile(hmap, FILE_MAP_READ, 0, 0, 0); - ok(base != NULL, "MapViewOfFile error %d\n", GetLastError()); + ok(base != NULL, "MapViewOfFile error %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetMappedFileNameA(GetCurrentProcess(), base, map_name, sizeof(map_name)); ok(!ret, "GetMappedFileName should fail\n"); - 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());
UnmapViewOfFile(base); CloseHandle(hmap); @@ -545,60 +545,60 @@ static void test_GetProcessImageFileName(void) win_skip("GetProcessImageFileName not implemented\n"); return; } - ok(0, "failed with %d\n", GetLastError()); + ok(0, "failed with %ld\n", GetLastError()); }
SetLastError(0xdeadbeef); GetProcessImageFileNameA(NULL, szImgPath, sizeof(szImgPath)); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); GetProcessImageFileNameA(hpSR, szImgPath, sizeof(szImgPath)); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); GetProcessImageFileNameA(hpQI, szImgPath, 0); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %ld\n", GetLastError());
ret = GetProcessImageFileNameA(hpQI, szImgPath, sizeof(szImgPath)); ret1 = GetMappedFileNameA(hpQV, hMod, szMapPath, sizeof(szMapPath)); if(ret && ret1) { /* Windows returns 2*strlen-1 */ - ok(ret >= strlen(szImgPath), "szImgPath="%s" ret=%d\n", szImgPath, ret); + ok(ret >= strlen(szImgPath), "szImgPath="%s" ret=%ld\n", szImgPath, ret); todo_wine ok(!strcmp(szImgPath, szMapPath), "szImgPath="%s" szMapPath="%s"\n", szImgPath, szMapPath); }
SetLastError(0xdeadbeef); GetProcessImageFileNameW(NULL, szImgPathW, ARRAY_SIZE(szImgPathW)); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
/* no information about correct buffer size returned: */ SetLastError(0xdeadbeef); GetProcessImageFileNameW(hpQI, szImgPathW, 0); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); GetProcessImageFileNameW(hpQI, NULL, 0); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %ld\n", GetLastError());
/* correct call */ memset(szImgPathW, 0xff, sizeof(szImgPathW)); ret = GetProcessImageFileNameW(hpQI, szImgPathW, ARRAY_SIZE(szImgPathW)); ok(ret > 0, "GetProcessImageFileNameW should have succeeded.\n"); ok(szImgPathW[0] == '\', "GetProcessImageFileNameW should have returned an NT path.\n"); - ok(lstrlenW(szImgPathW) == ret, "Expected length to be %d, got %d\n", ret, lstrlenW(szImgPathW)); + ok(lstrlenW(szImgPathW) == ret, "Expected length to be %ld, got %d\n", ret, lstrlenW(szImgPathW));
/* boundary values of 'size' */ SetLastError(0xdeadbeef); GetProcessImageFileNameW(hpQI, szImgPathW, ret); - ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %ld\n", GetLastError());
memset(szImgPathW, 0xff, sizeof(szImgPathW)); ret = GetProcessImageFileNameW(hpQI, szImgPathW, ret + 1); ok(ret > 0, "GetProcessImageFileNameW should have succeeded.\n"); ok(szImgPathW[0] == '\', "GetProcessImageFileNameW should have returned an NT path.\n"); - ok(lstrlenW(szImgPathW) == ret, "Expected length to be %d, got %d\n", ret, lstrlenW(szImgPathW)); + ok(lstrlenW(szImgPathW) == ret, "Expected length to be %ld, got %d\n", ret, lstrlenW(szImgPathW)); }
static void test_GetModuleFileNameEx(void) @@ -611,22 +611,22 @@ static void test_GetModuleFileNameEx(void) SetLastError(0xdeadbeef); ret = GetModuleFileNameExA(NULL, hMod, szModExPath, sizeof(szModExPath)); ok( !ret, "GetModuleFileNameExA succeeded\n" ); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetModuleFileNameExA(hpQI, hMod, szModExPath, sizeof(szModExPath)); ok( !ret, "GetModuleFileNameExA succeeded\n" ); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetModuleFileNameExA(hpQV, hBad, szModExPath, sizeof(szModExPath)); ok( !ret, "GetModuleFileNameExA succeeded\n" ); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
ret = GetModuleFileNameExA(hpQV, NULL, szModExPath, sizeof(szModExPath)); if(!ret) return; - ok(ret == strlen(szModExPath), "szModExPath="%s" ret=%d\n", szModExPath, ret); + ok(ret == strlen(szModExPath), "szModExPath="%s" ret=%ld\n", szModExPath, ret); GetModuleFileNameA(NULL, szModPath, sizeof(szModPath)); ok(!strncmp(szModExPath, szModPath, MAX_PATH), "szModExPath="%s" szModPath="%s"\n", szModExPath, szModPath); @@ -634,34 +634,34 @@ static void test_GetModuleFileNameEx(void) SetLastError(0xdeadbeef); memset( szModExPath, 0xcc, sizeof(szModExPath) ); ret = GetModuleFileNameExA(hpQV, NULL, szModExPath, 4 ); - ok( ret == 4 || ret == strlen(szModExPath), "wrong length %u\n", ret ); + ok( ret == 4 || ret == strlen(szModExPath), "wrong length %lu\n", ret ); ok( broken(szModExPath[3]) /*w2kpro*/ || strlen(szModExPath) == 3, - "szModExPath="%s" ret=%d\n", szModExPath, ret ); - ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); + "szModExPath="%s" ret=%ld\n", szModExPath, ret ); + ok(GetLastError() == 0xdeadbeef, "got error %ld\n", GetLastError());
if (0) /* crashes on Windows 10 */ { SetLastError(0xdeadbeef); ret = GetModuleFileNameExA(hpQV, NULL, szModExPath, 0 ); - ok( ret == 0, "wrong length %u\n", ret ); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %d\n", GetLastError()); + ok( ret == 0, "wrong length %lu\n", ret ); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got error %ld\n", GetLastError()); }
SetLastError(0xdeadbeef); memset( buffer, 0xcc, sizeof(buffer) ); ret = GetModuleFileNameExW(hpQV, NULL, buffer, 4 ); - ok( ret == 4 || ret == lstrlenW(buffer), "wrong length %u\n", ret ); + ok( ret == 4 || ret == lstrlenW(buffer), "wrong length %lu\n", ret ); ok( broken(buffer[3]) /*w2kpro*/ || lstrlenW(buffer) == 3, - "buffer=%s ret=%d\n", wine_dbgstr_w(buffer), ret ); - ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); + "buffer=%s ret=%ld\n", wine_dbgstr_w(buffer), ret ); + ok(GetLastError() == 0xdeadbeef, "got error %ld\n", GetLastError());
if (0) /* crashes on Windows 10 */ { SetLastError(0xdeadbeef); buffer[0] = 0xcc; ret = GetModuleFileNameExW(hpQV, NULL, buffer, 0 ); - ok( ret == 0, "wrong length %u\n", ret ); - ok(GetLastError() == 0xdeadbeef, "got error %d\n", GetLastError()); + ok( ret == 0, "wrong length %lu\n", ret ); + ok(GetLastError() == 0xdeadbeef, "got error %ld\n", GetLastError()); ok( buffer[0] == 0xcc, "buffer modified %s\n", wine_dbgstr_w(buffer) ); } } @@ -674,20 +674,20 @@ static void test_GetModuleBaseName(void)
SetLastError(0xdeadbeef); GetModuleBaseNameA(NULL, hMod, szModBaseName, sizeof(szModBaseName)); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); GetModuleBaseNameA(hpQI, hMod, szModBaseName, sizeof(szModBaseName)); - ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); GetModuleBaseNameA(hpQV, hBad, szModBaseName, sizeof(szModBaseName)); - ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
ret = GetModuleBaseNameA(hpQV, NULL, szModBaseName, sizeof(szModBaseName)); if(!ret) return; - ok(ret == strlen(szModBaseName), "szModBaseName="%s" ret=%d\n", szModBaseName, ret); + ok(ret == strlen(szModBaseName), "szModBaseName="%s" ret=%ld\n", szModBaseName, ret); GetModuleFileNameA(NULL, szModPath, sizeof(szModPath)); ok(!strcmp(strrchr(szModPath, '\') + 1, szModBaseName), "szModPath="%s" szModBaseName="%s"\n", szModPath, szModBaseName); @@ -703,19 +703,19 @@ static void test_ws_functions(void)
ws_handle = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_SET_QUOTA | PROCESS_SET_INFORMATION, FALSE, GetCurrentProcessId()); - ok(!!ws_handle, "got error %u\n", GetLastError()); + ok(!!ws_handle, "got error %lu\n", GetLastError());
SetLastError(0xdeadbeef); EmptyWorkingSet(NULL); - todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); EmptyWorkingSet(hpSR); - todo_wine ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError()); + todo_wine ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = EmptyWorkingSet(ws_handle); - ok(ret == 1, "failed with %d\n", GetLastError()); + ok(ret == 1, "failed with %ld\n", GetLastError());
SetLastError( 0xdeadbeef ); ret = InitializeProcessForWsWatch( NULL ); @@ -727,11 +727,11 @@ static void test_ws_functions(void) trace( "InitializeProcessForWsWatch not supported\n" ); return; } - ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %u\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError() ); } SetLastError(0xdeadbeef); ret = InitializeProcessForWsWatch(ws_handle); - ok(ret == 1, "failed with %d\n", GetLastError()); + ok(ret == 1, "failed with %ld\n", GetLastError());
addr = VirtualAlloc(NULL, 1, MEM_COMMIT, PAGE_READWRITE); if(!addr) @@ -740,13 +740,13 @@ static void test_ws_functions(void) *addr = 0; /* make sure it's paged in (needed on wow64) */ if(!VirtualLock(addr, 1)) { - trace("locking failed (error=%d) - skipping test\n", GetLastError()); + trace("locking failed (error=%ld) - skipping test\n", GetLastError()); goto free_page; }
SetLastError(0xdeadbeef); ret = GetWsChanges(hpQI, wswi, sizeof(wswi)); - todo_wine ok(ret == 1, "failed with %d\n", GetLastError()); + todo_wine ok(ret == 1, "failed with %ld\n", GetLastError()); if(ret == 1) { for(i = 0; wswi[i].FaultingVa; i++) @@ -772,14 +772,14 @@ static void check_QueryWorkingSetEx(PVOID addr, const char *desc, DWORD expected memset(&info, 0x41, sizeof(info)); info.VirtualAddress = addr; ret = pQueryWorkingSetEx(GetCurrentProcess(), &info, sizeof(info)); - ok(ret, "QueryWorkingSetEx failed with %d\n", GetLastError()); + ok(ret, "QueryWorkingSetEx failed with %ld\n", GetLastError());
todo_wine_if(todo) - ok(info.VirtualAttributes.Valid == expected_valid, "%s expected Valid=%u but got %u\n", + ok(info.VirtualAttributes.Valid == expected_valid, "%s expected Valid=%lu but got %u\n", desc, expected_valid, info.VirtualAttributes.Valid);
todo_wine_if(todo) - ok(info.VirtualAttributes.Win32Protection == expected_protection, "%s expected Win32Protection=%u but got %u\n", + ok(info.VirtualAttributes.Win32Protection == expected_protection, "%s expected Win32Protection=%lu but got %u\n", desc, expected_protection, info.VirtualAttributes.Win32Protection);
ok(info.VirtualAttributes.Node == 0, "%s expected Node=0 but got %u\n", @@ -788,7 +788,7 @@ static void check_QueryWorkingSetEx(PVOID addr, const char *desc, DWORD expected desc, info.VirtualAttributes.LargePage);
ok(info.VirtualAttributes.Shared == expected_shared || broken(!info.VirtualAttributes.Valid) /* w2003 */, - "%s expected Shared=%u but got %u\n", desc, expected_shared, info.VirtualAttributes.Shared); + "%s expected Shared=%lu but got %u\n", desc, expected_shared, info.VirtualAttributes.Shared); if (info.VirtualAttributes.Valid && info.VirtualAttributes.Shared) ok(info.VirtualAttributes.ShareCount > 0, "%s expected ShareCount > 0 but got %u\n", desc, info.VirtualAttributes.ShareCount); @@ -813,19 +813,19 @@ static void test_QueryWorkingSetEx(void) check_QueryWorkingSetEx(addr, "exe", 1, PAGE_READONLY, 1, FALSE);
ret = VirtualProtect(addr, 0x1000, PAGE_NOACCESS, &prot); - ok(ret, "VirtualProtect failed with %d\n", GetLastError()); + ok(ret, "VirtualProtect failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "exe,noaccess", 0, 0, 1, FALSE);
ret = VirtualProtect(addr, 0x1000, prot, &prot); - ok(ret, "VirtualProtect failed with %d\n", GetLastError()); + ok(ret, "VirtualProtect failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "exe,readonly1", 0, 0, 1, TRUE);
*(volatile char *)addr; - ok(ret, "VirtualProtect failed with %d\n", GetLastError()); + ok(ret, "VirtualProtect failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE);
addr = VirtualAlloc(NULL, 0x1000, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - ok(addr != NULL, "VirtualAlloc failed with %d\n", GetLastError()); + ok(addr != NULL, "VirtualAlloc failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "valloc", 0, 0, 0, FALSE);
*(volatile char *)addr; @@ -835,18 +835,18 @@ static void test_QueryWorkingSetEx(void) check_QueryWorkingSetEx(addr, "valloc,write", 1, PAGE_READWRITE, 0, FALSE);
ret = VirtualProtect(addr, 0x1000, PAGE_NOACCESS, &prot); - ok(ret, "VirtualProtect failed with %d\n", GetLastError()); + ok(ret, "VirtualProtect failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "valloc,noaccess", 0, 0, 0, FALSE);
ret = VirtualProtect(addr, 0x1000, prot, &prot); - ok(ret, "VirtualProtect failed with %d\n", GetLastError()); + ok(ret, "VirtualProtect failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "valloc,readwrite1", 0, 0, 0, TRUE);
*(volatile char *)addr; check_QueryWorkingSetEx(addr, "valloc,readwrite2", 1, PAGE_READWRITE, 0, FALSE);
ret = VirtualFree(addr, 0, MEM_RELEASE); - ok(ret, "VirtualFree failed with %d\n", GetLastError()); + ok(ret, "VirtualFree failed with %ld\n", GetLastError()); check_QueryWorkingSetEx(addr, "valloc,free", FALSE, 0, 0, FALSE); }
@@ -860,13 +860,13 @@ START_TEST(psapi_main) IsWow64Process(GetCurrentProcess(), &wow64);
hpSR = OpenProcess(STANDARD_RIGHTS_REQUIRED, FALSE, pid); - ok(!!hpSR, "got error %u\n", GetLastError()); + ok(!!hpSR, "got error %lu\n", GetLastError()); hpQI = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid); - ok(!!hpQI, "got error %u\n", GetLastError()); + ok(!!hpQI, "got error %lu\n", GetLastError()); hpVR = OpenProcess(PROCESS_VM_READ, FALSE, pid); - ok(!!hpVR, "got error %u\n", GetLastError()); + ok(!!hpVR, "got error %lu\n", GetLastError()); hpQV = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid); - ok(!!hpQV, "got error %u\n", GetLastError()); + ok(!!hpQV, "got error %lu\n", GetLastError());
test_EnumProcesses(); test_EnumProcessModules();
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/pstorec/tests/Makefile.in | 1 - dlls/pstorec/tests/pstorec.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/pstorec/tests/Makefile.in b/dlls/pstorec/tests/Makefile.in index eb6c02a5291..2287f0f4c70 100644 --- a/dlls/pstorec/tests/Makefile.in +++ b/dlls/pstorec/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = pstorec.dll
C_SRCS = \ diff --git a/dlls/pstorec/tests/pstorec.c b/dlls/pstorec/tests/pstorec.c index bc30b193d72..9716ecd63a0 100644 --- a/dlls/pstorec/tests/pstorec.c +++ b/dlls/pstorec/tests/pstorec.c @@ -49,14 +49,14 @@ static void test_PStoreCreateInstance(void) win_skip("PStoreCreateInstance is not implemented on this system\n"); return; } - ok(hr == S_OK, "Unexpected return value %#x.\n", hr); + ok(hr == S_OK, "Unexpected return value %#lx.\n", hr);
hr = IPStore_QueryInterface(store, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Unexpected return value %#x.\n", hr); + ok(hr == S_OK, "Unexpected return value %#lx.\n", hr); IUnknown_Release(unk);
hr = IPStore_QueryInterface(store, &IID_IPStore, (void **)&unk); - ok(hr == S_OK, "Unexpected return value %#x.\n", hr); + ok(hr == S_OK, "Unexpected return value %#lx.\n", hr); IUnknown_Release(unk);
IPStore_Release(store);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/qasf/tests/Makefile.in | 1 dlls/qasf/tests/asfreader.c | 84 +++-- dlls/qasf/tests/dmowrapper.c | 672 +++++++++++++++++++++--------------------- 3 files changed, 378 insertions(+), 379 deletions(-)
diff --git a/dlls/qasf/tests/Makefile.in b/dlls/qasf/tests/Makefile.in index 76cf1d73298..4b8d40671fb 100644 --- a/dlls/qasf/tests/Makefile.in +++ b/dlls/qasf/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = qasf.dll IMPORTS = strmbase dmoguids strmiids uuid msdmo ole32
diff --git a/dlls/qasf/tests/asfreader.c b/dlls/qasf/tests/asfreader.c index 55d2d4404dc..f4f8b9e2e19 100644 --- a/dlls/qasf/tests/asfreader.c +++ b/dlls/qasf/tests/asfreader.c @@ -40,7 +40,7 @@ static IBaseFilter *create_asf_reader(void)
hr = CoCreateInstance(&CLSID_WMAsfReader, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
return filter; } @@ -62,7 +62,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); } @@ -134,53 +134,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_WMAsfReader, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_WMAsfReader, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_filesourcefilter(void) @@ -197,21 +197,21 @@ static void test_filesourcefilter(void) BYTE *ptr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); hr = IBaseFilter_QueryInterface(filter, &IID_IFileSourceFilter, (void **)&filesource); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filesource); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IFileSourceFilter_Load(filesource, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
olepath = (void *)0xdeadbeef; memset(&type, 0x22, sizeof(type)); hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!olepath, "Got %s.\n", wine_dbgstr_w(olepath)); ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", wine_dbgstr_guid(&type.majortype)); @@ -219,25 +219,25 @@ static void test_filesourcefilter(void) wine_dbgstr_guid(&type.subtype)); ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); - ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); + ok(!type.lSampleSize, "Got sample size %lu.\n", type.lSampleSize); ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); - ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); + ok(!type.cbFormat, "Got format size %lu.\n", type.cbFormat); memset(&ptr, 0x22, sizeof(ptr)); ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat);
hr = IFileSourceFilter_Load(filesource, L"nonexistent.wmv", NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFileSourceFilter_GetCurFile(filesource, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IFileSourceFilter_Load(filesource, L"nonexistent2.wmv", NULL); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
olepath = (void *)0xdeadbeef; memset(&type, 0x22, sizeof(type)); hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(olepath, L"nonexistent.wmv"), "Expected path %s, got %s.\n", wine_dbgstr_w(L"nonexistent.wmv"), wine_dbgstr_w(olepath)); ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", @@ -246,34 +246,34 @@ static void test_filesourcefilter(void) wine_dbgstr_guid(&type.subtype)); ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); - ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); + ok(!type.lSampleSize, "Got sample size %lu.\n", type.lSampleSize); ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); - ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); + ok(!type.cbFormat, "Got format size %lu.\n", type.cbFormat); ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); CoTaskMemFree(olepath);
hr = IBaseFilter_EnumPins(filter, &enumpins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enumpins, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); IEnumPins_Release(enumpins);
hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_AddFilter(graph, filter, NULL); todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || broken(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) /* win2008 */, - "Got hr %#x.\n", hr); + "Got hr %#lx.\n", hr);
hr = IFileSourceFilter_Load(filesource, L"nonexistent2.wmv", NULL); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
olepath = (void *)0xdeadbeef; memset(&type, 0x22, sizeof(type)); hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(olepath, L"nonexistent.wmv"), "Expected path %s, got %s.\n", wine_dbgstr_w(L"nonexistent.wmv"), wine_dbgstr_w(olepath)); ok(IsEqualGUID(&type.majortype, &MEDIATYPE_NULL), "Got majortype %s.\n", @@ -282,18 +282,18 @@ static void test_filesourcefilter(void) wine_dbgstr_guid(&type.subtype)); ok(type.bFixedSizeSamples == 0x22222222, "Got fixed size %d.\n", type.bFixedSizeSamples); ok(type.bTemporalCompression == 0x22222222, "Got temporal compression %d.\n", type.bTemporalCompression); - ok(!type.lSampleSize, "Got sample size %u.\n", type.lSampleSize); + ok(!type.lSampleSize, "Got sample size %lu.\n", type.lSampleSize); ok(IsEqualGUID(&type.formattype, &testguid), "Got format type %s.\n", wine_dbgstr_guid(&type.formattype)); ok(!type.pUnk, "Got pUnk %p.\n", type.pUnk); - ok(!type.cbFormat, "Got format size %u.\n", type.cbFormat); + ok(!type.cbFormat, "Got format size %lu.\n", type.cbFormat); ok(type.pbFormat == ptr, "Got format block %p.\n", type.pbFormat); CoTaskMemFree(olepath);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IBaseFilter_Release(filter); ref = IFileSourceFilter_Release(filesource); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(asfreader) diff --git a/dlls/qasf/tests/dmowrapper.c b/dlls/qasf/tests/dmowrapper.c index 9cebbda3af2..9fade2f7f1f 100644 --- a/dlls/qasf/tests/dmowrapper.c +++ b/dlls/qasf/tests/dmowrapper.c @@ -141,21 +141,21 @@ static HRESULT WINAPI dmo_GetStreamCount(IMediaObject *iface, DWORD *input, DWOR
static HRESULT WINAPI dmo_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) { - if (winetest_debug > 1) trace("GetInputStreamInfo(%u)\n", index); + if (winetest_debug > 1) trace("GetInputStreamInfo(%lu)\n", index); *flags = 0; return S_OK; }
static HRESULT WINAPI dmo_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) { - if (winetest_debug > 1) trace("GetOutputStreamInfo(%u)\n", index); + if (winetest_debug > 1) trace("GetOutputStreamInfo(%lu)\n", index); *flags = 0; return S_OK; }
static HRESULT WINAPI dmo_GetInputType(IMediaObject *iface, DWORD index, DWORD type_index, DMO_MEDIA_TYPE *type) { - if (winetest_debug > 1) trace("GetInputType(index %u, type_index %u)\n", index, type_index); + if (winetest_debug > 1) trace("GetInputType(index %lu, type_index %lu)\n", index, type_index); if (!type_index) { memset(type, 0, sizeof(*type)); /* cover up the holes */ @@ -167,7 +167,7 @@ static HRESULT WINAPI dmo_GetInputType(IMediaObject *iface, DWORD index, DWORD t
static HRESULT WINAPI dmo_GetOutputType(IMediaObject *iface, DWORD index, DWORD type_index, DMO_MEDIA_TYPE *type) { - if (winetest_debug > 1) trace("GetOutputType(index %u, type_index %u)\n", index, type_index); + if (winetest_debug > 1) trace("GetOutputType(index %lu, type_index %lu)\n", index, type_index); if (!type_index) { memset(type, 0, sizeof(*type)); /* cover up the holes */ @@ -179,7 +179,7 @@ static HRESULT WINAPI dmo_GetOutputType(IMediaObject *iface, DWORD index, DWORD
static HRESULT WINAPI dmo_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *type, DWORD flags) { - if (winetest_debug > 1) trace("SetInputType(index %u, flags %#x)\n", index, flags); + if (winetest_debug > 1) trace("SetInputType(index %lu, flags %#lx)\n", index, flags); strmbase_dump_media_type((AM_MEDIA_TYPE *)type); if (flags & DMO_SET_TYPEF_TEST_ONLY) return type->lSampleSize == 123 ? S_OK : S_FALSE; @@ -195,7 +195,7 @@ static HRESULT WINAPI dmo_SetInputType(IMediaObject *iface, DWORD index, const D
static HRESULT WINAPI dmo_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *type, DWORD flags) { - if (winetest_debug > 1) trace("SetOutputType(index %u, flags %#x)\n", index, flags); + if (winetest_debug > 1) trace("SetOutputType(index %lu, flags %#lx)\n", index, flags); strmbase_dump_media_type((AM_MEDIA_TYPE *)type); if (flags & DMO_SET_TYPEF_TEST_ONLY) return type->lSampleSize == 321 ? S_OK : S_FALSE; @@ -224,7 +224,7 @@ static HRESULT WINAPI dmo_GetOutputCurrentType(IMediaObject *iface, DWORD index, static HRESULT WINAPI dmo_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *lookahead, DWORD *alignment) { - if (winetest_debug > 1) trace("GetInputSizeInfo(%u)\n", index); + if (winetest_debug > 1) trace("GetInputSizeInfo(%lu)\n", index); *size = 321; *alignment = 64; *lookahead = 0; @@ -233,7 +233,7 @@ static HRESULT WINAPI dmo_GetInputSizeInfo(IMediaObject *iface, DWORD index,
static HRESULT WINAPI dmo_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment) { - if (winetest_debug > 1) trace("GetOutputSizeInfo(%u)\n", index); + if (winetest_debug > 1) trace("GetOutputSizeInfo(%lu)\n", index); *size = testdmo_output_size; *alignment = testdmo_output_alignment; return testdmo_GetOutputSizeInfo_hr; @@ -260,7 +260,7 @@ static HRESULT WINAPI dmo_Flush(IMediaObject *iface)
static HRESULT WINAPI dmo_Discontinuity(IMediaObject *iface, DWORD index) { - if (winetest_debug > 1) trace("Discontinuity(index %u)\n", index); + if (winetest_debug > 1) trace("Discontinuity(index %lu)\n", index); ++got_Discontinuity; return S_OK; } @@ -279,7 +279,7 @@ static HRESULT WINAPI dmo_FreeStreamingResources(IMediaObject *iface)
static HRESULT WINAPI dmo_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags) { - if (winetest_debug > 1) trace("GetInputStatus(index %u)\n", index); + if (winetest_debug > 1) trace("GetInputStatus(index %lu)\n", index); *flags = DMO_INPUT_STATUSF_ACCEPT_DATA; return S_OK; } @@ -291,44 +291,44 @@ static HRESULT WINAPI dmo_ProcessInput(IMediaObject *iface, DWORD index, DWORD len, i; HRESULT hr;
- if (winetest_debug > 1) trace("ProcessInput(index %u, flags %#x, timestamp %I64d, timelength %I64d)\n", + if (winetest_debug > 1) trace("ProcessInput(index %lu, flags %#lx, timestamp %I64d, timelength %I64d)\n", index, flags, timestamp, timelength);
++got_ProcessInput;
hr = IMediaBuffer_GetBufferAndLength(buffer, &data, &len); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(len == 200, "Got length %u.\n", len); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(len == 200, "Got length %lu.\n", len); for (i = 0; i < 200; ++i) expect[i] = i; ok(!memcmp(data, expect, 200), "Data didn't match.\n");
hr = IMediaBuffer_GetMaxLength(buffer, &len); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(len == 256, "Got length %u.\n", len); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(len == 256, "Got length %lu.\n", len);
if (testmode == 0 || testmode == 12) { - ok(!flags, "Got flags %#x.\n", flags); + ok(!flags, "Got flags %#lx.\n", flags); ok(!timestamp, "Got timestamp %s.\n", wine_dbgstr_longlong(timestamp)); ok(!timelength, "Got length %s.\n", wine_dbgstr_longlong(timelength)); } else if (testmode == 1) { - ok(flags == (DMO_INPUT_DATA_BUFFERF_TIME | DMO_INPUT_DATA_BUFFERF_TIMELENGTH), "Got flags %#x.\n", flags); + ok(flags == (DMO_INPUT_DATA_BUFFERF_TIME | DMO_INPUT_DATA_BUFFERF_TIMELENGTH), "Got flags %#lx.\n", flags); ok(timestamp == 20000, "Got timestamp %s.\n", wine_dbgstr_longlong(timestamp)); ok(timelength == 1, "Got length %s.\n", wine_dbgstr_longlong(timelength)); } else if (testmode == 6) { ok(flags == (DMO_INPUT_DATA_BUFFERF_TIME | DMO_INPUT_DATA_BUFFERF_TIMELENGTH - | DMO_INPUT_DATA_BUFFERF_SYNCPOINT), "Got flags %#x.\n", flags); + | DMO_INPUT_DATA_BUFFERF_SYNCPOINT), "Got flags %#lx.\n", flags); ok(timestamp == 20000, "Got timestamp %s.\n", wine_dbgstr_longlong(timestamp)); ok(timelength == 10000, "Got length %s.\n", wine_dbgstr_longlong(timelength)); } else { - ok(flags == (DMO_INPUT_DATA_BUFFERF_TIME | DMO_INPUT_DATA_BUFFERF_TIMELENGTH), "Got flags %#x.\n", flags); + ok(flags == (DMO_INPUT_DATA_BUFFERF_TIME | DMO_INPUT_DATA_BUFFERF_TIMELENGTH), "Got flags %#lx.\n", flags); ok(timestamp == 20000, "Got timestamp %s.\n", wine_dbgstr_longlong(timestamp)); ok(timelength == 10000, "Got length %s.\n", wine_dbgstr_longlong(timelength)); } @@ -346,14 +346,14 @@ static HRESULT WINAPI dmo_ProcessOutput(IMediaObject *iface, DWORD flags, HRESULT hr; BYTE *data;
- if (winetest_debug > 1) trace("ProcessOutput(flags %#x, count %u)\n", flags, count); + if (winetest_debug > 1) trace("ProcessOutput(flags %#lx, count %lu)\n", flags, count);
++got_ProcessOutput;
*status = 0;
- ok(flags == DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER, "Got flags %#x.\n", flags); - ok(count == 2, "Got count %u.\n", count); + ok(flags == DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER, "Got flags %#lx.\n", flags); + ok(count == 2, "Got count %lu.\n", count);
ok(!!buffers[0].pBuffer, "Expected a buffer.\n"); if (testmode == 12) @@ -364,12 +364,12 @@ static HRESULT WINAPI dmo_ProcessOutput(IMediaObject *iface, DWORD flags, buffers[1].dwStatus = DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE;
hr = IMediaBuffer_GetBufferAndLength(buffers[0].pBuffer, &data, &len); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!len, "Got length %u.\n", len); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!len, "Got length %lu.\n", len);
hr = IMediaBuffer_GetMaxLength(buffers[0].pBuffer, &len); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(len == 16384, "Got length %u.\n", len); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(len == 16384, "Got length %lu.\n", len);
buffers[0].dwStatus = DMO_OUTPUT_DATA_BUFFERF_TIME | DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH; buffers[0].rtTimelength = 1000; @@ -381,20 +381,20 @@ static HRESULT WINAPI dmo_ProcessOutput(IMediaObject *iface, DWORD flags, buffers[1].rtTimelength = buffers[0].rtTimelength; buffers[1].rtTimestamp = buffers[0].rtTimestamp; hr = IMediaBuffer_SetLength(buffers[1].pBuffer, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
if (testmode == 3) { hr = IMediaBuffer_SetLength(buffers[0].pBuffer, 16200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); buffers[0].dwStatus |= DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE; return S_OK; } else if (testmode == 5) { hr = IMediaBuffer_SetLength(buffers[0].pBuffer, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaBuffer_Release(testdmo_buffer); return S_FALSE; } @@ -410,7 +410,7 @@ static HRESULT WINAPI dmo_ProcessOutput(IMediaObject *iface, DWORD flags, for (i = 0; i < 300; ++i) data[i] = 111 - i; hr = IMediaBuffer_SetLength(buffers[0].pBuffer, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (testdmo_buffer) IMediaBuffer_Release(testdmo_buffer); testdmo_buffer = NULL; @@ -508,12 +508,12 @@ static IBaseFilter *create_dmo_wrapper(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_DMOWrapperFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IDMOWrapperFilter, (void **)&wrapper); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IDMOWrapperFilter_Init(wrapper, &testdmo_clsid, &DMOCATEGORY_AUDIO_DECODER); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IDMOWrapperFilter_Release(wrapper);
return filter; @@ -529,7 +529,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); } @@ -628,68 +628,68 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_DMOWrapperFilter, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_DMOWrapperFilter, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == filter, "Got unexpected IBaseFilter %p.\n", filter2); IBaseFilter_Release(filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref);
/* Test also aggregation of the inner media object. */
filter = create_dmo_wrapper();
hr = IBaseFilter_QueryInterface(filter, &IID_IMediaObject, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk == (IUnknown *)&testdmo, "Got unexpected object %p.\n", unk); IUnknown_Release(unk);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk == (IUnknown *)&testdmo, "Got unexpected object %p.\n", unk); IUnknown_Release(unk);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); }
static void test_enum_pins(void) @@ -701,135 +701,135 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 4, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 3, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 3, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]); IPin_Release(pins[2]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 4); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -841,35 +841,35 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"in0", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"out0", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"out1", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -884,95 +884,95 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"in0", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"in0"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"in0"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"out0", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"out0"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"out0"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"out1", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"out1"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"out1"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_media_types(void) @@ -987,51 +987,51 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"in0", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &mt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(mt, &mt1), "Media types didn't match.\n"); DeleteMediaType(mt);
hr = IEnumMediaTypes_Next(enummt, 1, &mt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.lSampleSize = 123; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(pin);
IBaseFilter_FindPin(filter, L"out0", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &mt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(mt, &mt2), "Media types didn't match.\n"); DeleteMediaType(mt);
hr = IEnumMediaTypes_Next(enummt, 1, &mt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.lSampleSize = 321; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -1046,64 +1046,64 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"in0", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
@@ -1112,7 +1112,7 @@ static void test_enum_media_types(void) IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -1206,20 +1206,20 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample ++got_Receive;
len = IMediaSample_GetSize(sample); - ok(len == 16384, "Got size %u.\n", len); + ok(len == 16384, "Got size %lu.\n", len); len = IMediaSample_GetActualDataLength(sample); if (testmode == 3) - ok(len == 16200, "Got length %u.\n", len); + ok(len == 16200, "Got length %lu.\n", len); else { BYTE *data, expect[300];
- ok(len == 300, "Got length %u.\n", len); + ok(len == 300, "Got length %lu.\n", len);
if (testmode != 12) { hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < 300; ++i) expect[i] = 111 - i; @@ -1230,27 +1230,27 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample hr = IMediaSample_GetTime(sample, &start, &stop); if (testmode == 8) { - ok(hr == VFW_S_NO_STOP_TIME, "Got hr %#x.\n", hr); + ok(hr == VFW_S_NO_STOP_TIME, "Got hr %#lx.\n", hr); ok(start == 5000, "Got start time %s.\n", wine_dbgstr_longlong(start)); } else if (testmode == 9) - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr); else { - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == 5000, "Got start time %s.\n", wine_dbgstr_longlong(start)); ok(stop == 6000, "Got stop time %s.\n", wine_dbgstr_longlong(stop)); }
hr = IMediaSample_GetMediaTime(sample, &start, &stop); - ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr);
hr = IMediaSample_IsDiscontinuity(sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample_IsPreroll(sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample_IsSyncPoint(sample); - ok(hr == (testmode == 7 ? S_OK : S_FALSE), "Got hr %#x.\n", hr); + ok(hr == (testmode == 7 ? S_OK : S_FALSE), "Got hr %#lx.\n", hr);
if (testmode == 3) testmode = 4; @@ -1320,39 +1320,39 @@ static void test_sink_allocator(IMemInputPin *input) HRESULT hr;
hr = IMemInputPin_GetAllocatorRequirements(input, &props); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
memset(&props, 0xcc, sizeof(props)); testdmo_GetInputSizeInfo_hr = S_OK; hr = IMemInputPin_GetAllocatorRequirements(input, &props); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { - ok(props.cBuffers == 1, "Got %d buffers.\n", props.cBuffers); - ok(props.cbBuffer == 321, "Got size %d.\n", props.cbBuffer); - ok(props.cbAlign == 64, "Got alignment %d.\n", props.cbAlign); - ok(props.cbPrefix == 0xcccccccc, "Got prefix %d.\n", props.cbPrefix); + ok(props.cBuffers == 1, "Got %ld buffers.\n", props.cBuffers); + ok(props.cbBuffer == 321, "Got size %ld.\n", props.cbBuffer); + ok(props.cbAlign == 64, "Got alignment %ld.\n", props.cbAlign); + ok(props.cbPrefix == 0xcccccccc, "Got prefix %ld.\n", props.cbPrefix); }
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IMemAllocator_GetProperties(ret_allocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); - ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); - ok(!props.cbAlign, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.cBuffers, "Got %ld buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %ld.\n", props.cbBuffer); + ok(!props.cbAlign, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(ret_allocator); }
hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&req_allocator); @@ -1362,13 +1362,13 @@ static void test_sink_allocator(IMemInputPin *input) props.cbAlign = 1; props.cbPrefix = 0; hr = IMemAllocator_SetProperties(req_allocator, &props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_allocator == req_allocator, "Allocators didn't match.\n");
IMemAllocator_Release(req_allocator); @@ -1384,31 +1384,31 @@ static void test_source_allocator(IFilterGraph2 *graph, IMediaControl *control, HRESULT hr;
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &mt2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!!testsink->sink.pAllocator, "Expected an allocator.\n"); hr = IMemAllocator_GetProperties(testsink->sink.pAllocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.cBuffers == 1, "Got %d buffers.\n", props.cBuffers); - ok(props.cbBuffer == 16384, "Got size %d.\n", props.cbBuffer); - ok(props.cbAlign == 1, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.cBuffers == 1, "Got %ld buffers.\n", props.cBuffers); + ok(props.cbBuffer == 16384, "Got size %ld.\n", props.cbBuffer); + ok(props.cbAlign == 1, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
hr = IMemAllocator_GetBuffer(testsink->sink.pAllocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(testsink->sink.pAllocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(sample);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(testsink->sink.pAllocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface); @@ -1417,22 +1417,22 @@ static void test_source_allocator(IFilterGraph2 *graph, IMediaControl *control, testdmo_output_size = 20000;
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &mt2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!!testsink->sink.pAllocator, "Expected an allocator.\n"); hr = IMemAllocator_GetProperties(testsink->sink.pAllocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.cBuffers == 1, "Got %d buffers.\n", props.cBuffers); - ok(props.cbBuffer == 20000, "Got size %d.\n", props.cbBuffer); - ok(props.cbAlign == 16, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.cBuffers == 1, "Got %ld buffers.\n", props.cBuffers); + ok(props.cbBuffer == 20000, "Got size %ld.\n", props.cbBuffer); + ok(props.cbAlign == 16, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface);
testdmo_GetOutputSizeInfo_hr = E_NOTIMPL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &mt2); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); testdmo_GetOutputSizeInfo_hr = S_OK;
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, @@ -1440,18 +1440,18 @@ static void test_source_allocator(IFilterGraph2 *graph, IMediaControl *control, testsink->sink.pAllocator = allocator;
hr = IMemAllocator_SetProperties(allocator, &req_props, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &mt2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(testsink->sink.pAllocator == allocator, "Expected an allocator.\n"); hr = IMemAllocator_GetProperties(testsink->sink.pAllocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.cBuffers == 1, "Got %d buffers.\n", props.cBuffers); - ok(props.cbBuffer == 20000, "Got size %d.\n", props.cbBuffer); - ok(props.cbAlign == 16, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.cBuffers == 1, "Got %ld buffers.\n", props.cBuffers); + ok(props.cbBuffer == 20000, "Got size %ld.\n", props.cbBuffer); + ok(props.cbAlign == 16, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface); @@ -1466,56 +1466,56 @@ static void test_filter_state(IMediaControl *control) got_Flush = 0;
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
ok(!got_Flush, "Unexpected IMediaObject::Flush().\n"); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_Flush, "Expected IMediaObject::Flush().\n"); got_Flush = 0;
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
ok(!got_Flush, "Unexpected IMediaObject::Flush().\n"); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_Flush, "Expected IMediaObject::Flush().\n"); got_Flush = 0;
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state); }
static void test_sample_processing(IMediaControl *control, IMemInputPin *input, @@ -1529,42 +1529,42 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input, BYTE *data;
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); size = IMediaSample_GetSize(sample); - ok(size == 256, "Got size %d.\n", size); + ok(size == 256, "Got size %ld.\n", size); for (i = 0; i < 200; ++i) data[i] = i; hr = IMediaSample_SetActualDataLength(sample, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = 10000; stop = 20000; hr = IMediaSample_SetMediaTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetPreroll(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 0; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(got_Receive == 1, "Got %u calls to Receive().\n", got_Receive); @@ -1572,11 +1572,11 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input,
start = 20000; hr = IMediaSample_SetTime(sample, &start, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 1; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(got_Receive == 1, "Got %u calls to Receive().\n", got_Receive); @@ -1584,11 +1584,11 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input,
stop = 30000; hr = IMediaSample_SetTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 2; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(got_Receive == 1, "Got %u calls to Receive().\n", got_Receive); @@ -1596,7 +1596,7 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input,
testmode = 3; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 2, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(got_Receive == 2, "Got %u calls to Receive().\n", got_Receive); @@ -1604,29 +1604,29 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input,
testmode = 5; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(!got_Receive, "Got %u calls to Receive().\n", got_Receive); got_ProcessInput = got_ProcessOutput = got_Receive = 0;
hr = IMediaSample_SetSyncPoint(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 6; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(got_Receive == 1, "Got %u calls to Receive().\n", got_Receive); got_ProcessInput = got_ProcessOutput = got_Receive = 0;
hr = IMediaSample_SetSyncPoint(sample, FALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 7; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(got_Receive == 1, "Got %u calls to Receive().\n", got_Receive); @@ -1634,7 +1634,7 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input,
testmode = 8; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(got_Receive == 1, "Got %u calls to Receive().\n", got_Receive); @@ -1642,19 +1642,19 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input,
testmode = 9; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(got_Receive == 1, "Got %u calls to Receive().\n", got_Receive); got_ProcessInput = got_ProcessOutput = got_Receive = 0;
hr = IMediaSample_SetDiscontinuity(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!got_Discontinuity, "Got %u calls to Discontinuity().\n", got_Discontinuity); testmode = 10; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_ProcessOutput == 2, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); ok(got_Receive == 2, "Got %u calls to Receive().\n", got_Receive); @@ -1662,7 +1662,7 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input, got_ProcessInput = got_ProcessOutput = got_Receive = got_Discontinuity = 0;
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(sample); IMemAllocator_Release(allocator); } @@ -1677,27 +1677,27 @@ static void test_streaming_events(IMediaControl *control, IPin *sink, IMemInputP LONG i;
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
got_Flush = 0;
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 200; ++i) data[i] = i; hr = IMediaSample_SetActualDataLength(sample, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!testsink->got_new_segment, "Got %u calls to IPin::NewSegment().\n", testsink->got_new_segment); ok(!testsink2->got_new_segment, "Got %u calls to IPin::NewSegment().\n", testsink2->got_new_segment); hr = IPin_NewSegment(sink, 10000, 20000, 1.0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_new_segment == 1, "Got %u calls to IPin::NewSegment().\n", testsink->got_new_segment); ok(testsink2->got_new_segment == 1, "Got %u calls to IPin::NewSegment().\n", testsink2->got_new_segment);
@@ -1705,7 +1705,7 @@ static void test_streaming_events(IMediaControl *control, IPin *sink, IMemInputP ok(!testsink2->got_eos, "Got %u calls to IPin::EndOfStream().\n", testsink2->got_eos); testmode = 12; hr = IPin_EndOfStream(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!got_ProcessInput, "Got %u calls to ProcessInput().\n", got_ProcessInput); ok(got_Discontinuity == 1, "Got %u calls to Discontinuity().\n", got_Discontinuity); ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); @@ -1716,44 +1716,44 @@ static void test_streaming_events(IMediaControl *control, IPin *sink, IMemInputP got_ProcessInput = got_ProcessOutput = got_Receive = got_Discontinuity = 0;
hr = IPin_EndOfStream(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(testsink->got_eos == 1, "Got %u calls to IPin::EndOfStream().\n", testsink->got_eos); todo_wine ok(testsink2->got_eos == 1, "Got %u calls to IPin::EndOfStream().\n", testsink2->got_eos);
hr = IMemInputPin_Receive(input, sample); - todo_wine ok(hr == S_FALSE /* 2003 */ || hr == VFW_E_SAMPLE_REJECTED_EOS, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE /* 2003 */ || hr == VFW_E_SAMPLE_REJECTED_EOS, "Got hr %#lx.\n", hr);
got_Flush = 0; ok(!testsink->got_begin_flush, "Got %u calls to IPin::BeginFlush().\n", testsink->got_begin_flush); ok(!testsink2->got_begin_flush, "Got %u calls to IPin::BeginFlush().\n", testsink2->got_begin_flush); hr = IPin_BeginFlush(sink); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_begin_flush == 1, "Got %u calls to IPin::BeginFlush().\n", testsink->got_begin_flush); ok(testsink2->got_begin_flush == 1, "Got %u calls to IPin::BeginFlush().\n", testsink2->got_begin_flush);
hr = IMemInputPin_Receive(input, sample); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(sink); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ok(!testsink->got_end_flush, "Got %u calls to IPin::EndFlush().\n", testsink->got_end_flush); ok(!testsink2->got_end_flush, "Got %u calls to IPin::EndFlush().\n", testsink2->got_end_flush); hr = IPin_EndFlush(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_end_flush == 1, "Got %u calls to IPin::EndFlush().\n", testsink->got_end_flush); ok(testsink2->got_end_flush == 1, "Got %u calls to IPin::EndFlush().\n", testsink2->got_end_flush); ok(got_Flush, "Expected IMediaObject::Flush().\n");
hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(got_ProcessInput == 1, "Got %u calls to ProcessInput().\n", got_ProcessInput); todo_wine ok(got_ProcessOutput == 1, "Got %u calls to ProcessOutput().\n", got_ProcessOutput); todo_wine ok(got_Receive == 2, "Got %u calls to Receive().\n", got_Receive); got_ProcessInput = got_ProcessOutput = got_Receive = 0;
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(sample); IMemAllocator_Release(allocator); } @@ -1794,57 +1794,57 @@ static void test_connect_pin(void) /* Test sink connection. */ peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(sink, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!testdmo_input_mt_set, "Input type should not be set.\n");
req_mt.lSampleSize = 123; hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(sink, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsource.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n");
ok(testdmo_input_mt_set, "Input type should be set.\n"); ok(compare_media_types(&testdmo_input_mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_sink_allocator(meminput);
/* Test source connection. */ peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(source, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
ok(!testdmo_output_mt_set, "Output type should not be set.\n");
@@ -1853,33 +1853,33 @@ static void test_connect_pin(void) req_mt = mt2;
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(source, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsink.sink.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n");
ok(testdmo_output_mt_set, "Output type should be set.\n"); ok(compare_media_types(&testdmo_output_mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_filter_state(control); test_sample_processing(control, meminput, &testsink); @@ -1888,7 +1888,7 @@ static void test_connect_pin(void) * connected. */
hr = IFilterGraph2_ConnectDirect(graph, source2, &testsink2.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_streaming_events(control, sink, meminput, &testsink, &testsink2);
@@ -1896,30 +1896,30 @@ static void test_connect_pin(void) IFilterGraph2_Disconnect(graph, &testsink2.sink.pin.IPin_iface);
hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsink.sink.pin.peer == source, "Got peer %p.\n", testsink.sink.pin.peer); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(source, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
ok(!testdmo_output_mt_set, "Output type should not be set.\n");
req_mt.lSampleSize = 0; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
/* Connection with wildcards. */
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &mt2), "Media types didn't match.\n"); ok(testdmo_output_mt_set, "Output type should be set.\n"); ok(compare_media_types(&testdmo_output_mt, &mt2), "Media types didn't match.\n"); @@ -1928,101 +1928,101 @@ static void test_connect_pin(void)
req_mt.majortype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &mt2), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &mt2), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.formattype = FORMAT_WaveFormatEx; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt = mt2; req_mt.formattype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &mt2), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &mt2), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = MEDIATYPE_Audio; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
mt = req_mt; testsink.sink_mt = &mt; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
mt.lSampleSize = 1; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr); mt.lSampleSize = 321;
mt.majortype = mt.subtype = mt.formattype = GUID_NULL; req_mt = mt; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = mt2.majortype; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr); req_mt.majortype = GUID_NULL;
req_mt.subtype = mt2.subtype; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr); req_mt.subtype = GUID_NULL;
req_mt.formattype = mt2.formattype; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr); req_mt.formattype = GUID_NULL;
testsink.sink_mt = NULL;
hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsource.source.pin.peer == sink, "Got peer %p.\n", testsource.source.pin.peer); IFilterGraph2_Disconnect(graph, &testsource.sink.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(sink, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
ok(!testdmo_input_mt_set, "Input type should not be set.\n");
@@ -2034,15 +2034,15 @@ static void test_connect_pin(void) IMemInputPin_Release(meminput); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsource.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink2.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_uninitialized(void) @@ -2053,13 +2053,13 @@ static void test_uninitialized(void)
hr = CoCreateInstance(&CLSID_DMOWrapperFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_Stop(filter); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(dmowrapper) @@ -2072,14 +2072,14 @@ START_TEST(dmowrapper) hr = DMORegister(L"Wine test DMO", &testdmo_clsid, &DMOCATEGORY_AUDIO_DECODER, 0, 0, NULL, 0, NULL); if (FAILED(hr)) { - skip("Failed to register DMO, hr %#x.\n", hr); + skip("Failed to register DMO, hr %#lx.\n", hr); return; } - ok(hr == S_OK, "Failed to register class, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register class, hr %#lx.\n", hr);
hr = CoRegisterClassObject(&testdmo_clsid, (IUnknown *)&testdmo_cf, CLSCTX_INPROC_SERVER, REGCLS_MULTIPLEUSE, &cookie); - ok(hr == S_OK, "Failed to register class, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to register class, hr %#lx.\n", hr);
test_interfaces(); test_aggregation();
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/qcap/tests/videocapture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/qcap/tests/videocapture.c b/dlls/qcap/tests/videocapture.c index 4e9dca7d837..a96aeb6740c 100644 --- a/dlls/qcap/tests/videocapture.c +++ b/dlls/qcap/tests/videocapture.c @@ -84,11 +84,12 @@ static void test_media_types(IPin *pin) static void test_stream_config(IPin *pin) { VIDEOINFOHEADER *video_info, *video_info2; - LONG depth, compression, count, size, i; IEnumMediaTypes *enum_media_types; AM_MEDIA_TYPE *format, *format2; IAMStreamConfig *stream_config; VIDEO_STREAM_CONFIG_CAPS vscc; + LONG depth, compression; + int count, size, i; HRESULT hr;
hr = IPin_QueryInterface(pin, &IID_IAMStreamConfig, (void **)&stream_config);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/qcap/tests/Makefile.in | 1 dlls/qcap/tests/audiorecord.c | 82 +++--- dlls/qcap/tests/avico.c | 252 ++++++++++---------- dlls/qcap/tests/avimux.c | 364 ++++++++++++++--------------- dlls/qcap/tests/capturegraph.c | 194 ++++++++------- dlls/qcap/tests/filewriter.c | 320 +++++++++++++------------ dlls/qcap/tests/qcap.c | 114 ++++----- dlls/qcap/tests/smartteefilter.c | 482 +++++++++++++++++++------------------- dlls/qcap/tests/videocapture.c | 202 ++++++++-------- 9 files changed, 1005 insertions(+), 1006 deletions(-)
diff --git a/dlls/qcap/tests/Makefile.in b/dlls/qcap/tests/Makefile.in index 3fc00bf05ff..6e2fb2d4d2a 100644 --- a/dlls/qcap/tests/Makefile.in +++ b/dlls/qcap/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = qcap.dll IMPORTS = strmbase strmiids uuid oleaut32 ole32 advapi32 msvfw32
diff --git a/dlls/qcap/tests/audiorecord.c b/dlls/qcap/tests/audiorecord.c index 350ae986b44..5705925a50d 100644 --- a/dlls/qcap/tests/audiorecord.c +++ b/dlls/qcap/tests/audiorecord.c @@ -39,7 +39,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); } @@ -110,53 +110,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_AudioRecord, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_AudioRecord, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static HRESULT WINAPI property_bag_QueryInterface(IPropertyBag *iface, REFIID iid, void **out) @@ -216,27 +216,27 @@ static void test_property_bag(IMoniker *mon) ULONG ref;
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&devenum_bag); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(devenum_bag, L"WaveInId", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ppb_id = V_I4(&var);
hr = CoCreateInstance(&CLSID_AudioRecord, NULL, CLSCTX_INPROC_SERVER, &IID_IPersistPropertyBag, (void **)&ppb); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPersistPropertyBag_InitNew(ppb); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
ppb_got_read = 0; hr = IPersistPropertyBag_Load(ppb, &property_bag, NULL); - ok(hr == S_OK || broken(hr == E_FAIL) /* 8+, intermittent */, "Got hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_FAIL) /* 8+, intermittent */, "Got hr %#lx.\n", hr); ok(ppb_got_read == 1, "Got %u calls to Read().\n", ppb_got_read);
ref = IPersistPropertyBag_Release(ppb); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref);
VariantClear(&var); IPropertyBag_Release(devenum_bag); @@ -248,49 +248,49 @@ static void test_unconnected_filter_state(IBaseFilter *filter) HRESULT hr;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - todo_wine ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - todo_wine ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state); }
@@ -308,7 +308,7 @@ START_TEST(audiorecord)
hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, &IID_ICreateDevEnum, (void **)&devenum); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICreateDevEnum_CreateClassEnumerator(devenum, &CLSID_AudioInputDeviceCategory, &enummon, 0); if (hr == S_FALSE) { @@ -317,27 +317,27 @@ START_TEST(audiorecord) CoUninitialize(); return; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_aggregation();
while (IEnumMoniker_Next(enummon, 1, &mon, NULL) == S_OK) { hr = IMoniker_GetDisplayName(mon, NULL, NULL, &name); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); trace("Testing device %s.\n", wine_dbgstr_w(name)); CoTaskMemFree(name);
test_property_bag(mon);
hr = IMoniker_BindToObject(mon, NULL, NULL, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_interfaces(filter); test_unconnected_filter_state(filter);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMoniker_Release(mon); }
diff --git a/dlls/qcap/tests/avico.c b/dlls/qcap/tests/avico.c index 332ca5a8e7d..7435815f012 100644 --- a/dlls/qcap/tests/avico.c +++ b/dlls/qcap/tests/avico.c @@ -35,7 +35,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); } @@ -138,53 +138,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_AVICo, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_AVICo, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(IBaseFilter *filter) @@ -195,110 +195,110 @@ static void test_enum_pins(IBaseFilter *filter) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 3); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); @@ -312,28 +312,28 @@ static void test_find_pin(IBaseFilter *filter) HRESULT hr;
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins didn't match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins didn't match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"Input", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); hr = IBaseFilter_FindPin(filter, L"Output", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
IEnumPins_Release(enum_pins); } @@ -347,42 +347,42 @@ static void test_pin_info(IBaseFilter *filter) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); todo_wine ok(!lstrcmpW(info.achName, L"Input"), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!lstrcmpW(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); todo_wine ok(!lstrcmpW(info.achName, L"Output"), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!lstrcmpW(id, L"Out"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
@@ -392,7 +392,7 @@ static void test_pin_info(IBaseFilter *filter) static LRESULT CALLBACK driver_proc(DWORD_PTR id, HDRVR driver, UINT msg, LPARAM lparam1, LPARAM lparam2) { - if (winetest_debug > 1) trace("msg %#x, lparam1 %#lx, lparam2 %#lx.\n", msg, lparam1, lparam2); + if (winetest_debug > 1) trace("msg %#x, lparam1 %#Ix, lparam2 %#Ix.\n", msg, lparam1, lparam2);
switch (msg) { @@ -478,27 +478,27 @@ static void test_property_bag(IMoniker *mon) ULONG ref;
hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&devenum_bag); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
VariantInit(&var); hr = IPropertyBag_Read(devenum_bag, L"FccHandler", &var, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ppb_handler = V_BSTR(&var);
hr = CoCreateInstance(&CLSID_AVICo, NULL, CLSCTX_INPROC_SERVER, &IID_IPersistPropertyBag, (void **)&ppb); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPersistPropertyBag_InitNew(ppb); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
ppb_got_read = 0; hr = IPersistPropertyBag_Load(ppb, &property_bag, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ppb_got_read == 1, "Got %u calls to Read().\n", ppb_got_read);
ref = IPersistPropertyBag_Release(ppb); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref);
VariantClear(&var); IPropertyBag_Release(devenum_bag); @@ -520,10 +520,10 @@ static void test_media_types(IBaseFilter *filter) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
@@ -532,11 +532,11 @@ static void test_media_types(IBaseFilter *filter) mt.cbFormat = sizeof(VIDEOINFOHEADER); mt.pbFormat = (BYTE *)&vih; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
vih.bmiHeader.biBitCount = 32; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); vih.bmiHeader.biBitCount = 16;
mt.bFixedSizeSamples = TRUE; @@ -544,22 +544,22 @@ static void test_media_types(IBaseFilter *filter) mt.lSampleSize = 123; mt.subtype = MEDIASUBTYPE_RGB565; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_WAVE; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.formattype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.formattype = FORMAT_None; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.formattype = FORMAT_VideoInfo;
mt.majortype = MEDIATYPE_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Video;
IPin_Release(pin); @@ -567,10 +567,10 @@ static void test_media_types(IBaseFilter *filter) IBaseFilter_FindPin(filter, L"Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin); @@ -587,29 +587,29 @@ static void test_enum_media_types(IBaseFilter *filter) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); @@ -618,29 +618,29 @@ static void test_enum_media_types(IBaseFilter *filter) IBaseFilter_FindPin(filter, L"Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); @@ -653,49 +653,49 @@ static void test_unconnected_filter_state(IBaseFilter *filter) HRESULT hr;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state); }
@@ -719,18 +719,18 @@ START_TEST(avico)
hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, &IID_ICreateDevEnum, (void **)&devenum); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ICreateDevEnum_CreateClassEnumerator(devenum, &CLSID_VideoCompressorCategory, &enummon, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (IEnumMoniker_Next(enummon, 1, &mon, NULL) == S_OK) { hr = IMoniker_GetDisplayName(mon, NULL, NULL, &name); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (!lstrcmpW(name, test_display_name)) { hr = IMoniker_BindToObject(mon, NULL, NULL, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_aggregation(); test_interfaces(filter); @@ -742,7 +742,7 @@ START_TEST(avico) test_unconnected_filter_state(filter);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
if (!memcmp(name, test_display_name, 11 * sizeof(WCHAR))) diff --git a/dlls/qcap/tests/avimux.c b/dlls/qcap/tests/avimux.c index 70575281cee..8d11c5cbf04 100644 --- a/dlls/qcap/tests/avimux.c +++ b/dlls/qcap/tests/avimux.c @@ -30,7 +30,7 @@ static IBaseFilter *create_avi_mux(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_AviDest, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -51,7 +51,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); } @@ -159,53 +159,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_AviDest, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_AviDest, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -217,116 +217,116 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 3); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -338,27 +338,27 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"AVI Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins didn't match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"Input 01", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins didn't match.\n"); IPin_Release(pin); IPin_Release(pin2);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -372,63 +372,63 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"AVI Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); ok(!lstrcmpW(info.achName, L"AVI Out"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!lstrcmpW(id, L"AVI Out"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Input 01", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!lstrcmpW(info.achName, L"Input 01"), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!lstrcmpW(id, L"Input 01"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_media_types(void) @@ -445,53 +445,53 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"AVI Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Stream), "Got major type %s\n", wine_dbgstr_guid(&pmt->majortype)); ok(IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_Avi), "Got subtype %s\n", wine_dbgstr_guid(&pmt->subtype)); ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - ok(pmt->lSampleSize == 1, "Got sample size %u.\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 1, "Got sample size %lu.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &GUID_NULL), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); - ok(!pmt->cbFormat, "Got format size %u.\n", pmt->cbFormat); - ok(!pmt->pbFormat, "Got format block %u.\n", pmt->cbFormat); + ok(!pmt->cbFormat, "Got format size %lu.\n", pmt->cbFormat); + ok(!pmt->pbFormat, "Got format block %lu.\n", pmt->cbFormat);
hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->bFixedSizeSamples = FALSE; pmt->bTemporalCompression = TRUE; pmt->lSampleSize = 123; pmt->formattype = FORMAT_VideoInfo; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->majortype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); pmt->majortype = MEDIATYPE_Video; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->majortype = MEDIATYPE_Stream;
pmt->subtype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_RGB8; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_Avi;
CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin); @@ -499,10 +499,10 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"Input 01", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
@@ -512,46 +512,46 @@ static void test_media_types(void) mt.pbFormat = (BYTE *)&wfx; wfx.nBlockAlign = 1; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.subtype = MEDIASUBTYPE_RGB8; mt.bFixedSizeSamples = TRUE; mt.bTemporalCompression = TRUE; mt.lSampleSize = 123; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.majortype = MEDIATYPE_Video; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Interleaved; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
mt.majortype = MEDIATYPE_Video; mt.formattype = FORMAT_VideoInfo; mt.cbFormat = sizeof(vih); mt.pbFormat = (BYTE *)&vih; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.majortype = MEDIATYPE_Audio; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Interleaved; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -566,61 +566,61 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"AVI Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]);
IEnumMediaTypes_Release(enum1); @@ -630,36 +630,36 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"Input 01", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_seeking(void) @@ -693,109 +693,109 @@ static void test_seeking(void) IBaseFilter_QueryInterface(filter, &IID_IMediaSeeking, (void **)&seeking);
hr = IMediaSeeking_GetCapabilities(seeking, &caps); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(caps == (AM_SEEKING_CanGetCurrentPos | AM_SEEKING_CanGetDuration), "Got caps %#x.\n", caps); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(caps == (AM_SEEKING_CanGetCurrentPos | AM_SEEKING_CanGetDuration), "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(caps == AM_SEEKING_CanGetCurrentPos, "Got caps %#x.\n", caps); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(caps == AM_SEEKING_CanGetCurrentPos, "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(caps == AM_SEEKING_CanGetCurrentPos, "Got caps %#x.\n", caps); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(caps == AM_SEEKING_CanGetCurrentPos, "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanDoSegments; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(!caps, "Got caps %#x.\n", caps); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(!caps, "Got caps %#lx.\n", caps);
for (i = 0; i < ARRAY_SIZE(format_tests); ++i) { hr = IMediaSeeking_IsFormatSupported(seeking, format_tests[i].guid); - todo_wine ok(hr == format_tests[i].hr, "Got hr %#x for format %s.\n", hr, wine_dbgstr_guid(format_tests[i].guid)); + todo_wine ok(hr == format_tests[i].hr, "Got hr %#lx for format %s.\n", hr, wine_dbgstr_guid(format_tests[i].guid)); }
hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_BYTE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_SAMPLE); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_BYTE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_BYTE), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_BYTE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_BYTE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 0x123456789a, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, &TIME_FORMAT_BYTE); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
current = 0x123; stop = 0x321; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_NoPositioning, &stop, AM_SEEKING_NoPositioning); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetPositions(seeking, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IMediaSeeking_GetPositions(seeking, NULL, &stop); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IMediaSeeking_GetPositions(seeking, ¤t, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetDuration(seeking, &time); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) ok(!time, "Got duration %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) ok(!time, "Got duration %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_GetStopPosition(seeking, &time); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IMediaSeeking_Release(seeking); ref = IBaseFilter_Release(filter); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); }
static void test_unconnected_filter_state(void) @@ -806,53 +806,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(avimux) diff --git a/dlls/qcap/tests/capturegraph.c b/dlls/qcap/tests/capturegraph.c index cdd9a27828a..d36aebb13ea 100644 --- a/dlls/qcap/tests/capturegraph.c +++ b/dlls/qcap/tests/capturegraph.c @@ -29,7 +29,7 @@ static ICaptureGraphBuilder2 *create_capture_graph(void) ICaptureGraphBuilder2 *ret; HRESULT hr = CoCreateInstance(&CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC_SERVER, &IID_ICaptureGraphBuilder2, (void **)&ret); - ok(hr == S_OK, "Failed to create capture graph builder, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create capture graph builder, hr %#lx.\n", hr); return ret; }
@@ -149,10 +149,10 @@ static HRESULT WINAPI property_set_Get(IKsPropertySet *iface, REFGUID set, DWORD if (winetest_debug > 1) trace("%s->Get()\n", debugstr_w(pin->pin.pin.name));
ok(IsEqualGUID(set, &ROPSETID_Pin), "Got set %s.\n", debugstr_guid(set)); - ok(id == AMPROPERTY_PIN_CATEGORY, "Got id %#x.\n", id); + ok(id == AMPROPERTY_PIN_CATEGORY, "Got id %#lx.\n", id); ok(!instance_data, "Got instance data %p.\n", instance_data); - ok(!instance_size, "Got instance size %u.\n", instance_size); - ok(property_size == sizeof(GUID), "Got property size %u.\n", property_size); + ok(!instance_size, "Got instance size %lu.\n", instance_size); + ok(property_size == sizeof(GUID), "Got property size %lu.\n", property_size); ok(!!ret_size, "Expected non-NULL return size.\n"); memcpy(property_data, &pin->category, sizeof(GUID)); return S_OK; @@ -368,7 +368,7 @@ static void test_find_interface(void)
CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (void **)&graph); hr = ICaptureGraphBuilder2_SetFiltergraph(capture_graph, graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testfilter_init(&filter1); IGraphBuilder_AddFilter(graph, &filter1.filter.IBaseFilter_iface, L"filter1"); @@ -378,21 +378,21 @@ static void test_find_interface(void) IGraphBuilder_AddFilter(graph, &filter3.filter.IBaseFilter_iface, L"filter3");
hr = IGraphBuilder_ConnectDirect(graph, &filter1.source1.pin.pin.IPin_iface, &filter2.sink1.pin.pin.IPin_iface, &mt1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_ConnectDirect(graph, &filter2.source1.pin.pin.IPin_iface, &filter3.sink1.pin.pin.IPin_iface, &mt2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test search order without any restrictions applied. */
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, NULL, &bogus_majortype, NULL, &testiid, (void **)&unk); - ok(hr == E_POINTER, "got hr %#x.\n", hr); + ok(hr == E_POINTER, "got hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests_from_filter2); ++i) { hr = ICaptureGraphBuilder2_FindInterface(capture_graph, NULL, &bogus_majortype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Test %u: got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: got hr %#lx.\n", i, hr); ok(unk == tests_from_filter2[i].iface, "Test %u: got wrong interface %p.\n", i, unk); IUnknown_Release(unk); *tests_from_filter2[i].expose = FALSE; @@ -400,7 +400,7 @@ static void test_find_interface(void)
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, NULL, &bogus_majortype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
reset_interfaces(&filter1); reset_interfaces(&filter2); @@ -410,7 +410,7 @@ static void test_find_interface(void) { hr = ICaptureGraphBuilder2_FindInterface(capture_graph, NULL, &bogus_majortype, &filter1.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Test %u: got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: got hr %#lx.\n", i, hr); ok(unk == tests_from_filter1[i].iface, "Test %u: got wrong interface %p.\n", i, unk); IUnknown_Release(unk); *tests_from_filter1[i].expose = FALSE; @@ -418,7 +418,7 @@ static void test_find_interface(void)
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, NULL, &bogus_majortype, &filter1.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
/* Test with upstream/downstream flags. */
@@ -430,7 +430,7 @@ static void test_find_interface(void) { hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &LOOK_UPSTREAM_ONLY, &bogus_majortype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Test %u: got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: got hr %#lx.\n", i, hr); ok(unk == look_upstream_tests[i].iface, "Test %u: got wrong interface %p.\n", i, unk); IUnknown_Release(unk); *look_upstream_tests[i].expose = FALSE; @@ -438,7 +438,7 @@ static void test_find_interface(void)
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &LOOK_UPSTREAM_ONLY, &bogus_majortype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
reset_interfaces(&filter1); reset_interfaces(&filter2); @@ -448,7 +448,7 @@ static void test_find_interface(void) { hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &LOOK_DOWNSTREAM_ONLY, &bogus_majortype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Test %u: got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: got hr %#lx.\n", i, hr); ok(unk == look_downstream_tests[i].iface, "Test %u: got wrong interface %p.\n", i, unk); IUnknown_Release(unk); *look_downstream_tests[i].expose = FALSE; @@ -456,7 +456,7 @@ static void test_find_interface(void)
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &LOOK_DOWNSTREAM_ONLY, &bogus_majortype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
/* Test with a category flag. */
@@ -466,20 +466,20 @@ static void test_find_interface(void)
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Got hr %#x\n", hr); + ok(hr == S_OK, "Got hr %#lx\n", hr); ok(unk == (IUnknown *)&filter2.filter.IBaseFilter_iface, "Got wrong interface %p.\n", unk); IUnknown_Release(unk); filter2.filter_has_iface = FALSE;
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
filter2.source1.IKsPropertySet_iface.lpVtbl = &property_set_vtbl; filter2.source1.category = PIN_CATEGORY_CAPTURE; hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk == (IUnknown *)&filter2.source1.pin.pin.IPin_iface, "Got wrong interface %p.\n", unk); IUnknown_Release(unk); filter2.source1.has_iface = FALSE; @@ -492,7 +492,7 @@ static void test_find_interface(void) { hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Test %u: got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: got hr %#lx.\n", i, hr); ok(unk == category_tests[i].iface, "Test %u: got wrong interface %p.\n", i, unk); IUnknown_Release(unk); *category_tests[i].expose = FALSE; @@ -500,7 +500,7 @@ static void test_find_interface(void)
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
/* Test with a media type. */
@@ -512,22 +512,22 @@ static void test_find_interface(void)
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, &bogus_majortype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Got hr %#x\n", hr); + ok(hr == S_OK, "Got hr %#lx\n", hr); ok(unk == (IUnknown *)&filter2.filter.IBaseFilter_iface, "Got wrong interface %p.\n", unk); IUnknown_Release(unk); filter2.filter_has_iface = FALSE;
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, &bogus_majortype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, &mt2.majortype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, &testtype, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk == (IUnknown *)&filter2.source1.pin.pin.IPin_iface, "Got wrong interface %p.\n", unk); IUnknown_Release(unk); filter2.source1.has_iface = FALSE; @@ -538,7 +538,7 @@ static void test_find_interface(void) { hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == S_OK, "Test %u: got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: got hr %#lx.\n", i, hr); ok(unk == category_tests[i].iface, "Test %u: got wrong interface %p.\n", i, unk); IUnknown_Release(unk); *category_tests[i].expose = FALSE; @@ -546,18 +546,18 @@ static void test_find_interface(void)
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, &filter2.filter.IBaseFilter_iface, &testiid, (void **)&unk); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
ref = ICaptureGraphBuilder2_Release(capture_graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&filter1.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&filter2.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&filter3.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -578,7 +578,7 @@ static void test_find_pin(void)
CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (void **)&graph); hr = ICaptureGraphBuilder2_SetFiltergraph(capture_graph, graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testfilter_init(&filter1); testfilter_init(&filter2); @@ -587,51 +587,51 @@ static void test_find_pin(void)
hr = IGraphBuilder_ConnectDirect(graph, &filter1.source1.pin.pin.IPin_iface, &filter2.sink1.pin.pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_INPUT, NULL, NULL, FALSE, 0, &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == &filter1.sink1.pin.pin.IPin_iface, "Got wrong pin.\n"); IPin_Release(pin);
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_INPUT, NULL, NULL, FALSE, 1, &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == &filter1.sink2.pin.pin.IPin_iface, "Got wrong pin.\n"); IPin_Release(pin);
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_INPUT, NULL, NULL, FALSE, 2, &pin); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_OUTPUT, NULL, NULL, FALSE, 0, &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == &filter1.source1.pin.pin.IPin_iface, "Got wrong pin.\n"); IPin_Release(pin);
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_OUTPUT, NULL, NULL, FALSE, 1, &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == &filter1.source2.pin.pin.IPin_iface, "Got wrong pin.\n"); IPin_Release(pin);
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_OUTPUT, NULL, NULL, FALSE, 2, &pin); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
/* Test the unconnected flag. */
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_OUTPUT, NULL, NULL, TRUE, 0, &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == &filter1.source2.pin.pin.IPin_iface, "Got wrong pin.\n"); IPin_Release(pin);
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_OUTPUT, NULL, NULL, TRUE, 1, &pin); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
/* Test categories. */
@@ -640,31 +640,31 @@ static void test_find_pin(void)
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_OUTPUT, &PIN_CATEGORY_CAPTURE, NULL, FALSE, 0, &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == &filter1.source1.pin.pin.IPin_iface, "Got wrong pin.\n"); IPin_Release(pin);
hr = ICaptureGraphBuilder2_FindPin(capture_graph, (IUnknown *)&filter1.filter.IBaseFilter_iface, PINDIR_OUTPUT, &PIN_CATEGORY_CAPTURE, NULL, FALSE, 1, &pin); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
ref = ICaptureGraphBuilder2_Release(capture_graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&filter1.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&filter2.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void disconnect_pins(IGraphBuilder *graph, struct testsource *pin) { HRESULT hr; hr = IGraphBuilder_Disconnect(graph, pin->pin.pin.peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IGraphBuilder_Disconnect(graph, &pin->pin.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void check_smart_tee_pin_(int line, IPin *pin, const WCHAR *name) @@ -694,7 +694,7 @@ static void test_render_stream(void)
CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (void **)&graph); hr = ICaptureGraphBuilder2_SetFiltergraph(capture_graph, graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testfilter_init(&source); testfilter_init(&transform); @@ -711,7 +711,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(!source.source2.pin.pin.peer, "Pin should not be connected.\n"); @@ -719,7 +719,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); todo_wine ok(source.source2.pin.pin.peer == &transform.sink2.pin.pin.IPin_iface, "Got wrong connection.\n"); @@ -727,14 +727,14 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
todo_wine disconnect_pins(graph, &source.source2); todo_wine disconnect_pins(graph, &transform.source2);
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&transform.source2.pin.pin.IPin_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source2.pin.pin.peer == &sink.sink2.pin.pin.IPin_iface, "Got wrong connection.\n"); @@ -742,20 +742,20 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
disconnect_pins(graph, &transform.source2);
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &transform.filter.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); todo_wine ok(source.source2.pin.pin.peer == &transform.sink2.pin.pin.IPin_iface, "Got wrong connection.\n");
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); todo_wine ok(source.source2.pin.pin.peer == &transform.sink2.pin.pin.IPin_iface, "Got wrong connection.\n"); @@ -766,7 +766,7 @@ static void test_render_stream(void) /* Test from a source pin. */ hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.source1.pin.pin.IPin_iface, NULL, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); todo_wine ok(transform.source2.pin.pin.peer == &sink.sink2.pin.pin.IPin_iface, "Got wrong connection.\n"); @@ -777,7 +777,7 @@ static void test_render_stream(void) source.source_type = bad_type; hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#lx.\n", hr); source.source_type = source_type;
disconnect_pins(graph, &transform.source1); @@ -791,7 +791,7 @@ static void test_render_stream(void) hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, &identity.filter.IBaseFilter_iface, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &identity.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(identity.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); @@ -803,7 +803,7 @@ static void test_render_stream(void) hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, &identity.filter.IBaseFilter_iface, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr); ok(!source.source1.pin.pin.peer, "Pin should not be connected.\n"); ok(!identity.source1.pin.pin.peer, "Pin should not be connected.\n"); ok(!transform.source1.pin.pin.peer, "Pin should not be connected.\n"); @@ -813,7 +813,7 @@ static void test_render_stream(void) hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, &identity.filter.IBaseFilter_iface, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &identity.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(identity.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); @@ -825,7 +825,7 @@ static void test_render_stream(void) hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, &identity.filter.IBaseFilter_iface, &sink.filter.IBaseFilter_iface); - ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &identity.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(!identity.source1.pin.pin.peer, "Pin should not be connected.\n"); @@ -836,7 +836,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, &bad_type, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!source.source1.pin.pin.peer, "Pin should not be connected.\n"); ok(!source.source2.pin.pin.peer, "Pin should not be connected.\n"); ok(!sink.sink1.pin.pin.peer, "Pin should not be connected.\n"); @@ -844,7 +844,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, &sink1_type, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!source.source1.pin.pin.peer, "Pin should not be connected.\n"); ok(!source.source2.pin.pin.peer, "Pin should not be connected.\n"); ok(!sink.sink1.pin.pin.peer, "Pin should not be connected.\n"); @@ -855,7 +855,7 @@ static void test_render_stream(void) hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, &sink1_type, (IUnknown *)&source.filter.IBaseFilter_iface, &identity.filter.IBaseFilter_iface, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!source.source1.pin.pin.peer, "Pin should not be connected.\n"); ok(!source.source2.pin.pin.peer, "Pin should not be connected.\n"); ok(!sink.sink1.pin.pin.peer, "Pin should not be connected.\n"); @@ -863,7 +863,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, &source_type, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(!source.source2.pin.pin.peer, "Pin should not be connected.\n"); @@ -871,7 +871,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, NULL, &sink1_type, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source2.pin.pin.peer == &sink.sink2.pin.pin.IPin_iface, "Got wrong connection.\n"); @@ -885,7 +885,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CC, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); ok(!source.source1.pin.pin.peer, "Pin should not be connected.\n"); ok(!source.source2.pin.pin.peer, "Pin should not be connected.\n"); ok(!sink.sink1.pin.pin.peer, "Pin should not be connected.\n"); @@ -894,7 +894,7 @@ static void test_render_stream(void) source.source1.IKsPropertySet_iface.lpVtbl = &property_set_vtbl; hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CC, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); ok(!source.source1.pin.pin.peer, "Pin should not be connected.\n"); ok(!source.source2.pin.pin.peer, "Pin should not be connected.\n"); ok(!sink.sink1.pin.pin.peer, "Pin should not be connected.\n"); @@ -903,7 +903,7 @@ static void test_render_stream(void) source.source1.category = PIN_CATEGORY_CC; hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CC, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(!source.source2.pin.pin.peer, "Pin should not be connected.\n"); @@ -913,7 +913,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CC, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(!transform.source1.pin.pin.peer, "Pin should not be connected.\n");
@@ -921,14 +921,14 @@ static void test_render_stream(void) transform.source1.category = PIN_CATEGORY_CC; hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CC, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); todo_wine ok(!transform.source1.pin.pin.peer, "Pin should not be connected.\n"); todo_wine ok(!sink.sink1.pin.pin.peer, "Pin should not be connected.\n");
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CC, NULL, (IUnknown *)&source.source1.pin.pin.IPin_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
disconnect_pins(graph, &source.source1);
@@ -937,53 +937,53 @@ static void test_render_stream(void) source.source1.IKsPropertySet_iface.lpVtbl = transform.source1.IKsPropertySet_iface.lpVtbl = NULL; hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_PREVIEW, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
source.source1.IKsPropertySet_iface.lpVtbl = &property_set_vtbl; hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_PREVIEW, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
source.source1.category = PIN_CATEGORY_PREVIEW; hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); ok(!source.source1.pin.pin.peer, "Pin should not be connected.\n"); todo_wine ok(!sink.sink1.pin.pin.peer, "Pin should not be connected.\n");
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_PREVIEW, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); disconnect_pins(graph, &transform.source1);
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_PREVIEW, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr); todo_wine disconnect_pins(graph, &source.source1);
source.source1.category = PIN_CATEGORY_CAPTURE; hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_smart_tee_pin(source.source1.pin.pin.peer, L"Input"); check_smart_tee_pin(transform.sink1.pin.pin.peer, L"Capture"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n");
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_PREVIEW, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == VFW_S_NOPREVIEWPIN, "Got hr %#x.\n", hr); + ok(hr == VFW_S_NOPREVIEWPIN, "Got hr %#lx.\n", hr); check_smart_tee_pin(source.source1.pin.pin.peer, L"Input"); check_smart_tee_pin(transform.sink1.pin.pin.peer, L"Capture"); check_smart_tee_pin(transform.sink2.pin.pin.peer, L"Preview"); @@ -996,18 +996,18 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CC, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_PREVIEW, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == VFW_S_NOPREVIEWPIN, "Got hr %#x.\n", hr); + ok(hr == VFW_S_NOPREVIEWPIN, "Got hr %#lx.\n", hr); check_smart_tee_pin(source.source1.pin.pin.peer, L"Input"); check_smart_tee_pin(transform.sink1.pin.pin.peer, L"Preview"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n");
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_PREVIEW, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
disconnect_pins(graph, &source.source1); IGraphBuilder_RemoveFilter(graph, &transform.filter.IBaseFilter_iface); @@ -1018,7 +1018,7 @@ static void test_render_stream(void) source.source1.category = PIN_CATEGORY_CAPTURE; hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, (IUnknown *)&source.source1.pin.pin.IPin_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_smart_tee_pin(source.source1.pin.pin.peer, L"Input"); check_smart_tee_pin(transform.sink1.pin.pin.peer, L"Capture"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); @@ -1033,7 +1033,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source1.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); disconnect_pins(graph, &source.source1); @@ -1041,7 +1041,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_PREVIEW, NULL, (IUnknown *)&source.filter.IBaseFilter_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source.source2.pin.pin.peer == &transform.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); disconnect_pins(graph, &source.source2); @@ -1049,7 +1049,7 @@ static void test_render_stream(void)
hr = ICaptureGraphBuilder2_RenderStream(capture_graph, &PIN_CATEGORY_CAPTURE, NULL, (IUnknown *)&source.source1.pin.pin.IPin_iface, NULL, &sink.filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_smart_tee_pin(source.source1.pin.pin.peer, L"Input"); check_smart_tee_pin(transform.sink1.pin.pin.peer, L"Capture"); ok(transform.source1.pin.pin.peer == &sink.sink1.pin.pin.IPin_iface, "Got wrong connection.\n"); @@ -1057,15 +1057,15 @@ static void test_render_stream(void) disconnect_pins(graph, &transform.source1);
ref = ICaptureGraphBuilder2_Release(capture_graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IGraphBuilder_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&transform.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&sink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(capturegraph) diff --git a/dlls/qcap/tests/filewriter.c b/dlls/qcap/tests/filewriter.c index d6dbc3faded..3713af1a43a 100644 --- a/dlls/qcap/tests/filewriter.c +++ b/dlls/qcap/tests/filewriter.c @@ -28,7 +28,7 @@ static IBaseFilter *create_file_writer(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_FileWriter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -45,7 +45,7 @@ static WCHAR *set_filename(IBaseFilter *filter)
IBaseFilter_QueryInterface(filter, &IID_IFileSinkFilter, (void **)&filesink); hr = IFileSinkFilter_SetFileName(filesink, filename, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IFileSinkFilter_Release(filesink); return filename; } @@ -67,7 +67,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); } @@ -112,7 +112,7 @@ static void test_interfaces(void)
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); }
static const GUID test_iid = {0x33333333}; @@ -160,53 +160,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_FileWriter, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_FileWriter, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -218,85 +218,85 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -308,19 +308,19 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"in", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -334,38 +334,38 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"in", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"in"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"in"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_media_types(void) @@ -381,52 +381,52 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"in", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Audio; mt.subtype = MEDIASUBTYPE_PCM; mt.formattype = FORMAT_WaveFormatEx; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
filename = set_filename(filter);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
memset(&mt, 0, sizeof(AM_MEDIA_TYPE)); hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Video; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Audio; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Stream; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.subtype = MEDIASUBTYPE_PCM; mt.formattype = FORMAT_WaveFormatEx; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ok(GetFileAttributesW(filename) == INVALID_FILE_ATTRIBUTES, "File should not exist.\n"); }
@@ -442,36 +442,36 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"in", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -533,33 +533,33 @@ static void test_allocator(IMemInputPin *input, IMemAllocator *allocator)
memset(&props, 0xcc, sizeof(props)); hr = IMemInputPin_GetAllocatorRequirements(input, &props); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { - ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); - ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); - ok(props.cbAlign == 512, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(!props.cBuffers, "Got %ld buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %ld.\n", props.cbBuffer); + ok(props.cbAlign == 512, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix); }
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
props.cBuffers = 1; props.cbBuffer = 512; props.cbAlign = 512; props.cbPrefix = 0; hr = IMemAllocator_SetProperties(allocator, &props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_NotifyAllocator(input, allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); if (hr == S_OK) IMemAllocator_Release(ret_allocator); } @@ -570,50 +570,50 @@ static void test_filter_state(IMediaControl *control) HRESULT hr;
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state); }
static void test_sample_processing(IMediaControl *control, IMemInputPin *input, @@ -628,53 +628,53 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input, LONG size;
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); size = IMediaSample_GetSize(sample); - ok(size == 512, "Got size %d.\n", size); + ok(size == 512, "Got size %ld.\n", size); memset(data, 0xcc, size); start = 0; stop = 512; hr = IMediaSample_SetTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
strcpy((char *)data, "abcdefghi"); hr = IMediaSample_SetActualDataLength(sample, 9); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(data, 0xcc, size); strcpy((char *)data, "123456"); hr = IMediaSample_SetActualDataLength(sample, 6); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
file = _wfopen(filename, L"rb"); ok(!!file, "Failed to open file: %s.\n", strerror(errno)); size = fread(buffer, 1, sizeof(buffer), file); - ok(size == 512, "Got size %d.\n", size); + ok(size == 512, "Got size %ld.\n", size); ok(!memcmp(buffer, "123456\0\xcc\xcc\xcc", 10), "Got data %s.\n", debugstr_an((char *)buffer, size)); fclose(file);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(sample); }
@@ -689,14 +689,14 @@ static unsigned int check_ec_complete(IMediaEvent *eventsrc, DWORD timeout) { if (code == EC_COMPLETE) { - ok(param1 == S_OK, "Got param1 %#lx.\n", param1); - ok(!param2, "Got param2 %#lx.\n", param2); + ok(param1 == S_OK, "Got param1 %#Ix.\n", param1); + ok(!param2, "Got param2 %#Ix.\n", param2); ret++; } IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); timeout = 0; } - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
return ret; } @@ -710,22 +710,22 @@ static void test_eos(IFilterGraph2 *graph, IMediaControl *control, IPin *pin) IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaEvent_Release(eventsrc); }
@@ -755,47 +755,47 @@ static void test_connect_pin(void) CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&graph); IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); hr = IFilterGraph2_AddFilter(graph, filter, L"filewriter"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, L"source"); IBaseFilter_FindPin(filter, L"in", &pin); IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&meminput);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Stream; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(pin, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &source.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&mt, &req_mt, sizeof(AM_MEDIA_TYPE)), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - todo_wine ok(hr == VFW_E_NO_ALLOCATOR, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NO_ALLOCATOR, "Got hr %#lx.\n", hr);
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&allocator); @@ -806,33 +806,33 @@ static void test_connect_pin(void) test_eos(graph, control, pin);
hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(source.source.pin.peer == pin, "Got peer %p.\n", source.source.pin.peer); IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMemInputPin_Release(meminput); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IMemAllocator_Release(allocator); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_misc_flags(void) @@ -844,11 +844,11 @@ static void test_misc_flags(void) IBaseFilter_QueryInterface(filter, &IID_IAMFilterMiscFlags, (void **)&misc_flags);
flags = IAMFilterMiscFlags_GetMiscFlags(misc_flags); - ok(flags == AM_FILTER_MISC_FLAGS_IS_RENDERER, "Got flags %#x.\n", flags); + ok(flags == AM_FILTER_MISC_FLAGS_IS_RENDERER, "Got flags %#lx.\n", flags);
IAMFilterMiscFlags_Release(misc_flags); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(filewriter) diff --git a/dlls/qcap/tests/qcap.c b/dlls/qcap/tests/qcap.c index d1b2cb810f4..a3f519ffdd5 100644 --- a/dlls/qcap/tests/qcap.c +++ b/dlls/qcap/tests/qcap.c @@ -499,7 +499,7 @@ static HRESULT WINAPI EnumPins_Next(IEnumPins *iface, test_filter *This = impl_from_IEnumPins(iface); check_calls_list("EnumPins_Next", ENUMPINS_NEXT, This->filter_type);
- ok(cPins == 1, "cPins = %d\n", cPins); + ok(cPins == 1, "cPins = %ld\n", cPins); ok(ppPins != NULL, "ppPins == NULL\n"); ok(pcFetched != NULL, "pcFetched == NULL\n");
@@ -601,11 +601,11 @@ static HRESULT WINAPI Pin_ReceiveConnection(IPin *iface, wine_dbgstr_guid(&pmt->subtype)); ok(pmt->bFixedSizeSamples, "bFixedSizeSamples = %x\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "bTemporalCompression = %x\n", pmt->bTemporalCompression); - ok(pmt->lSampleSize == 1, "lSampleSize = %d\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 1, "lSampleSize = %ld\n", pmt->lSampleSize); ok(IsEqualIID(&pmt->formattype, &GUID_NULL), "formattype = %s\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "pUnk = %p\n", pmt->pUnk); - ok(!pmt->cbFormat, "cbFormat = %d\n", pmt->cbFormat); + ok(!pmt->cbFormat, "cbFormat = %ld\n", pmt->cbFormat); ok(!pmt->pbFormat, "pbFormat = %p\n", pmt->pbFormat); return S_OK; } @@ -758,10 +758,10 @@ static HRESULT WINAPI KsPropertySet_Get(IKsPropertySet *iface, REFGUID guidPropS check_calls_list("KsPropertySet_Get", KSPROPERTYSET_GET, This->filter_type);
ok(IsEqualIID(guidPropSet, &ROPSETID_Pin), "guidPropSet = %s\n", wine_dbgstr_guid(guidPropSet)); - ok(dwPropID == 0, "dwPropID = %d\n", dwPropID); + ok(dwPropID == 0, "dwPropID = %ld\n", dwPropID); ok(pInstanceData == NULL, "pInstanceData != NULL\n"); ok(cbInstanceData == 0, "cbInstanceData != 0\n"); - ok(cbPropData == sizeof(GUID), "cbPropData = %d\n", cbPropData); + ok(cbPropData == sizeof(GUID), "cbPropData = %ld\n", cbPropData); *pcbReturned = sizeof(GUID); memcpy(pPropData, &PIN_CATEGORY_EDS, sizeof(GUID)); return S_OK; @@ -829,11 +829,11 @@ static HRESULT WINAPI MemInputPin_NotifyAllocator(IMemInputPin *iface, ok(bReadOnly, "bReadOnly = %x\n", bReadOnly);
hr = IMemAllocator_GetProperties(pAllocator, &ap); - ok(hr == S_OK, "GetProperties returned %x\n", hr); - ok(ap.cBuffers == 32, "cBuffers = %d\n", ap.cBuffers); - ok(ap.cbBuffer == 0, "cbBuffer = %d\n", ap.cbBuffer); - ok(ap.cbAlign == 1, "cbAlign = %d\n", ap.cbAlign); - ok(ap.cbPrefix == 0, "cbPrefix = %d\n", ap.cbPrefix); + ok(hr == S_OK, "GetProperties returned %lx\n", hr); + ok(ap.cBuffers == 32, "cBuffers = %ld\n", ap.cBuffers); + ok(ap.cbBuffer == 0, "cbBuffer = %ld\n", ap.cbBuffer); + ok(ap.cbAlign == 1, "cbAlign = %ld\n", ap.cbAlign); + ok(ap.cbPrefix == 0, "cbPrefix = %ld\n", ap.cbPrefix); return S_OK; }
@@ -852,9 +852,9 @@ static HRESULT WINAPI MemInputPin_Receive(IMemInputPin *iface, IMediaSample *pSa HRESULT hr;
hr = IMediaSample_GetTime(pSample, &off, &tmp); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); hr = IMediaSample_GetPointer(pSample, &data); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); li.QuadPart = off; IStream_Seek(avi_stream, li, STREAM_SEEK_SET, NULL); IStream_Write(avi_stream, data, IMediaSample_GetActualDataLength(pSample), NULL); @@ -1069,7 +1069,7 @@ static HRESULT WINAPI EnumMediaTypes_Next(IEnumMediaTypes *iface, ULONG cMediaTy test_filter *This = impl_from_IEnumMediaTypes(iface); check_calls_list("EnumMediaTypes_Next", ENUMMEDIATYPES_NEXT, This->filter_type);
- ok(cMediaTypes == 1, "cMediaTypes = %d\n", cMediaTypes); + ok(cMediaTypes == 1, "cMediaTypes = %ld\n", cMediaTypes); ok(ppMediaTypes != NULL, "ppMediaTypes == NULL\n"); ok(pcFetched != NULL, "pcFetched == NULL\n");
@@ -1381,30 +1381,30 @@ static void test_AviMux(char *arg)
hr = CoCreateInstance(&CLSID_AviDest, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void**)&avimux); ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), - "couldn't create AVI Mux filter, hr = %08x\n", hr); + "couldn't create AVI Mux filter, hr = %08lx\n", hr); if(hr != S_OK) { win_skip("AVI Mux filter is not registered\n"); return; }
hr = IBaseFilter_EnumPins(avimux, &ep); - ok(hr == S_OK, "EnumPins returned %x\n", hr); + ok(hr == S_OK, "EnumPins returned %lx\n", hr);
hr = IEnumPins_Next(ep, 1, &avimux_out, NULL); - ok(hr == S_OK, "Next returned %x\n", hr); + ok(hr == S_OK, "Next returned %lx\n", hr); hr = IPin_QueryDirection(avimux_out, &dir); - ok(hr == S_OK, "QueryDirection returned %x\n", hr); + ok(hr == S_OK, "QueryDirection returned %lx\n", hr); ok(dir == PINDIR_OUTPUT, "dir = %d\n", dir);
hr = IEnumPins_Next(ep, 1, &avimux_in, NULL); - ok(hr == S_OK, "Next returned %x\n", hr); + ok(hr == S_OK, "Next returned %lx\n", hr); hr = IPin_QueryDirection(avimux_in, &dir); - ok(hr == S_OK, "QueryDirection returned %x\n", hr); + ok(hr == S_OK, "QueryDirection returned %lx\n", hr); ok(dir == PINDIR_INPUT, "dir = %d\n", dir); IEnumPins_Release(ep);
hr = IPin_ReceiveConnection(avimux_in, &source_filter.IPin_iface, NULL); - ok(hr == E_POINTER, "ReceiveConnection returned %x\n", hr); + ok(hr == E_POINTER, "ReceiveConnection returned %lx\n", hr);
current_calls_list = NULL; memset(&source_media_type, 0, sizeof(AM_MEDIA_TYPE)); @@ -1425,100 +1425,100 @@ static void test_AviMux(char *arg) videoinfo.bmiHeader.biSizeImage = 40000; videoinfo.bmiHeader.biClrImportant = 256; hr = IPin_ReceiveConnection(avimux_in, &source_filter.IPin_iface, &source_media_type); - ok(hr == S_OK, "ReceiveConnection returned %x\n", hr); + ok(hr == S_OK, "ReceiveConnection returned %lx\n", hr);
hr = IPin_ConnectedTo(avimux_in, &pin); - ok(hr == S_OK, "ConnectedTo returned %x\n", hr); + ok(hr == S_OK, "ConnectedTo returned %lx\n", hr); ok(pin == &source_filter.IPin_iface, "incorrect pin: %p, expected %p\n", pin, &source_filter.IPin_iface);
hr = IPin_Connect(avimux_out, &source_filter.IPin_iface, NULL); - ok(hr == VFW_E_INVALID_DIRECTION, "Connect returned %x\n", hr); + ok(hr == VFW_E_INVALID_DIRECTION, "Connect returned %lx\n", hr);
hr = IBaseFilter_JoinFilterGraph(avimux, (IFilterGraph*)&GraphBuilder, NULL); - ok(hr == S_OK, "JoinFilterGraph returned %x\n", hr); + ok(hr == S_OK, "JoinFilterGraph returned %lx\n", hr);
SET_EXPECT(ReceiveConnection); SET_EXPECT(GetAllocatorRequirements); SET_EXPECT(NotifyAllocator); SET_EXPECT(Reconnect); hr = IPin_Connect(avimux_out, &sink_filter.IPin_iface, NULL); - ok(hr == S_OK, "Connect returned %x\n", hr); + ok(hr == S_OK, "Connect returned %lx\n", hr); CHECK_CALLED(ReceiveConnection); CHECK_CALLED(GetAllocatorRequirements); CHECK_CALLED(NotifyAllocator); CHECK_CALLED(Reconnect);
hr = IPin_ConnectedTo(avimux_out, &pin); - ok(hr == S_OK, "ConnectedTo returned %x\n", hr); + ok(hr == S_OK, "ConnectedTo returned %lx\n", hr); ok(pin == &sink_filter.IPin_iface, "incorrect pin: %p, expected %p\n", pin, &source_filter.IPin_iface);
hr = IPin_QueryInterface(avimux_in, &IID_IMemInputPin, (void**)&memin); - ok(hr == S_OK, "QueryInterface returned %x\n", hr); + ok(hr == S_OK, "QueryInterface returned %lx\n", hr);
props.cBuffers = 0xdeadbee1; props.cbBuffer = 0xdeadbee2; props.cbAlign = 0xdeadbee3; props.cbPrefix = 0xdeadbee4; hr = IMemInputPin_GetAllocatorRequirements(memin, &props); - ok(hr==S_OK || broken(hr==E_INVALIDARG), "GetAllocatorRequirements returned %x\n", hr); + ok(hr==S_OK || broken(hr==E_INVALIDARG), "GetAllocatorRequirements returned %lx\n", hr); if(hr == S_OK) { - ok(props.cBuffers == 0xdeadbee1, "cBuffers = %d\n", props.cBuffers); - ok(props.cbBuffer == 0xdeadbee2, "cbBuffer = %d\n", props.cbBuffer); - ok(props.cbAlign == 1, "cbAlign = %d\n", props.cbAlign); - ok(props.cbPrefix == 8, "cbPrefix = %d\n", props.cbPrefix); + ok(props.cBuffers == 0xdeadbee1, "cBuffers = %ld\n", props.cBuffers); + ok(props.cbBuffer == 0xdeadbee2, "cbBuffer = %ld\n", props.cbBuffer); + ok(props.cbAlign == 1, "cbAlign = %ld\n", props.cbAlign); + ok(props.cbPrefix == 8, "cbPrefix = %ld\n", props.cbPrefix); }
hr = IMemInputPin_GetAllocator(memin, &memalloc); - ok(hr == S_OK, "GetAllocator returned %x\n", hr); + ok(hr == S_OK, "GetAllocator returned %lx\n", hr);
props.cBuffers = 0xdeadbee1; props.cbBuffer = 0xdeadbee2; props.cbAlign = 0xdeadbee3; props.cbPrefix = 0xdeadbee4; hr = IMemAllocator_GetProperties(memalloc, &props); - ok(hr == S_OK, "GetProperties returned %x\n", hr); - ok(props.cBuffers == 0, "cBuffers = %d\n", props.cBuffers); - ok(props.cbBuffer == 0, "cbBuffer = %d\n", props.cbBuffer); - ok(props.cbAlign == 0, "cbAlign = %d\n", props.cbAlign); - ok(props.cbPrefix == 0, "cbPrefix = %d\n", props.cbPrefix); + ok(hr == S_OK, "GetProperties returned %lx\n", hr); + ok(props.cBuffers == 0, "cBuffers = %ld\n", props.cBuffers); + ok(props.cbBuffer == 0, "cbBuffer = %ld\n", props.cbBuffer); + ok(props.cbAlign == 0, "cbAlign = %ld\n", props.cbAlign); + ok(props.cbPrefix == 0, "cbPrefix = %ld\n", props.cbPrefix); IMemAllocator_Release(memalloc);
hr = IBaseFilter_QueryInterface(avimux, &IID_IConfigInterleaving, (void**)&ci); - ok(hr == S_OK, "QueryInterface(IID_IConfigInterleaving) returned %x\n", hr); + ok(hr == S_OK, "QueryInterface(IID_IConfigInterleaving) returned %lx\n", hr); hr = IConfigInterleaving_put_Mode(ci, 5); - ok(hr == E_INVALIDARG, "put_Mode returned %x\n", hr); + ok(hr == E_INVALIDARG, "put_Mode returned %lx\n", hr); SET_EXPECT(Reconnect); hr = IConfigInterleaving_put_Mode(ci, INTERLEAVE_FULL); - ok(hr == S_OK, "put_Mode returned %x\n", hr); + ok(hr == S_OK, "put_Mode returned %lx\n", hr); CHECK_CALLED(Reconnect); IConfigInterleaving_Release(ci);
hr = IBaseFilter_GetState(avimux, 0, &state); - ok(hr == S_OK, "GetState returned %x\n", hr); + ok(hr == S_OK, "GetState returned %lx\n", hr); ok(state == State_Stopped, "state = %d\n", state);
SET_EXPECT(MemAllocator_GetProperties); hr = IMemInputPin_NotifyAllocator(memin, &MemAllocator, TRUE); - ok(hr == S_OK, "NotifyAllocator returned %x\n", hr); + ok(hr == S_OK, "NotifyAllocator returned %lx\n", hr); CHECK_CALLED(MemAllocator_GetProperties);
hr = IMemInputPin_GetAllocator(memin, &memalloc); - ok(hr == S_OK, "GetAllocator returned %x\n", hr); + ok(hr == S_OK, "GetAllocator returned %lx\n", hr); ok(memalloc != &MemAllocator, "memalloc == &MemAllocator\n"); IMemAllocator_Release(memalloc);
hr = CreateStreamOnHGlobal(NULL, TRUE, &avi_stream); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); SET_EXPECT(MediaSeeking_GetPositions); SET_EXPECT(MemInputPin_QueryInterface_IStream); hr = IBaseFilter_Run(avimux, 0); - ok(hr == S_OK, "Run returned %x\n", hr); + ok(hr == S_OK, "Run returned %lx\n", hr); CHECK_CALLED(MediaSeeking_GetPositions);
hr = IBaseFilter_GetState(avimux, 0, &state); - ok(hr == S_OK, "GetState returned %x\n", hr); + ok(hr == S_OK, "GetState returned %lx\n", hr); ok(state == State_Running, "state = %d\n", state);
SET_EXPECT(MediaSample_QueryInterface_MediaSample2); @@ -1533,7 +1533,7 @@ static void test_AviMux(char *arg) SET_EXPECT(MediaSample_GetMediaTime); start_time = end_time = 0; hr = IMemInputPin_Receive(memin, &MediaSample); - ok(hr == S_OK, "Receive returned %x\n", hr); + ok(hr == S_OK, "Receive returned %lx\n", hr); CHECK_CALLED(MediaSample_QueryInterface_MediaSample2); todo_wine CHECK_CALLED(MediaSample_IsDiscontinuity); todo_wine CHECK_CALLED(MediaSample_IsPreroll); @@ -1556,7 +1556,7 @@ static void test_AviMux(char *arg) SET_EXPECT(MediaSample_GetSize); SET_EXPECT(MediaSample_GetMediaTime); hr = IMemInputPin_Receive(memin, &MediaSample); - ok(hr == S_OK, "Receive returned %x\n", hr); + ok(hr == S_OK, "Receive returned %lx\n", hr); CHECK_CALLED(MediaSample_QueryInterface_MediaSample2); todo_wine CHECK_CALLED(MediaSample_IsDiscontinuity); todo_wine CHECK_CALLED(MediaSample_IsPreroll); @@ -1581,7 +1581,7 @@ static void test_AviMux(char *arg) start_time = 20000000; end_time = 21000000; hr = IMemInputPin_Receive(memin, &MediaSample); - ok(hr == S_OK, "Receive returned %x\n", hr); + ok(hr == S_OK, "Receive returned %lx\n", hr); CHECK_CALLED(MediaSample_QueryInterface_MediaSample2); todo_wine CHECK_CALLED(MediaSample_IsDiscontinuity); todo_wine CHECK_CALLED(MediaSample_IsPreroll); @@ -1595,20 +1595,20 @@ static void test_AviMux(char *arg) IMemInputPin_Release(memin);
hr = IBaseFilter_Stop(avimux); - ok(hr == S_OK, "Stop returned %x\n", hr); + ok(hr == S_OK, "Stop returned %lx\n", hr); CHECK_CALLED(MemInputPin_QueryInterface_IStream);
hr = IBaseFilter_GetState(avimux, 0, &state); - ok(hr == S_OK, "GetState returned %x\n", hr); + ok(hr == S_OK, "GetState returned %lx\n", hr); ok(state == State_Stopped, "state = %d\n", state);
hr = IPin_Disconnect(avimux_out); - ok(hr == S_OK, "Disconnect returned %x\n", hr); + ok(hr == S_OK, "Disconnect returned %lx\n", hr);
IPin_Release(avimux_in); IPin_Release(avimux_out); ref = IBaseFilter_Release(avimux); - ok(ref == 0, "Avi Mux filter was not destroyed (%d)\n", ref); + ok(ref == 0, "Avi Mux filter was not destroyed (%ld)\n", ref);
if(arg && !strcmp(arg, "save")) { LARGE_INTEGER li; @@ -1622,12 +1622,12 @@ static void test_AviMux(char *arg)
li.QuadPart = 0; hr = IStream_Seek(avi_stream, li, STREAM_SEEK_SET, NULL); - ok(hr == S_OK, "IStream_Seek failed: %x\n", hr); + ok(hr == S_OK, "IStream_Seek failed: %lx\n", hr);
while(1) { hr = IStream_Read(avi_stream, buf, sizeof(buf), &read); if(FAILED(hr)) { - ok(0, "IStream_Read failed: %x\n", hr); + ok(0, "IStream_Read failed: %lx\n", hr); break; } if(!read) @@ -1640,7 +1640,7 @@ static void test_AviMux(char *arg) }
ref = IStream_Release(avi_stream); - ok(ref == 0, "IStream was not destroyed (%d)\n", ref); + ok(ref == 0, "IStream was not destroyed (%ld)\n", ref); }
START_TEST(qcap) diff --git a/dlls/qcap/tests/smartteefilter.c b/dlls/qcap/tests/smartteefilter.c index b6ba3ca75c9..a25889d2a4d 100644 --- a/dlls/qcap/tests/smartteefilter.c +++ b/dlls/qcap/tests/smartteefilter.c @@ -30,7 +30,7 @@ static IBaseFilter *create_smart_tee(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_SmartTee, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -57,7 +57,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); } @@ -135,7 +135,7 @@ static void test_interfaces(void) IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); }
static const GUID test_iid = {0x33333333}; @@ -183,53 +183,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_SmartTee, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_SmartTee, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -241,135 +241,135 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 4, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 3, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 3, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]); IPin_Release(pins[2]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 4); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -381,35 +381,35 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"Input", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Capture", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Preview", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -424,95 +424,95 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"Input", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!lstrcmpW(info.achName, L"Input"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!lstrcmpW(id, L"Input"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Capture", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); ok(!lstrcmpW(info.achName, L"Capture"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!lstrcmpW(id, L"Capture"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Preview", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); ok(!lstrcmpW(info.achName, L"Preview"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!lstrcmpW(id, L"Preview"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -527,36 +527,36 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"Input", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_filter_state(void) @@ -567,53 +567,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -688,28 +688,28 @@ static void test_sink_allocator(IPin *pin) IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
hr = IMemInputPin_GetAllocatorRequirements(input, &ret_props); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(ret_allocator);
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&req_allocator);
hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_allocator == req_allocator, "Allocators didn't match.\n"); IMemAllocator_Release(ret_allocator);
hr = IMemAllocator_SetProperties(req_allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMemAllocator_Release(req_allocator); IMemInputPin_Release(input); @@ -726,7 +726,7 @@ static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface
if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt))) { - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); IPin_Release(peer); iface->pin.peer = NULL; FreeMediaType(&iface->pin.mt); @@ -785,12 +785,12 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample HRESULT hr;
size = IMediaSample_GetSize(sample); - ok(size == 256, "Got size %u.\n", size); + ok(size == 256, "Got size %lu.\n", size); size = IMediaSample_GetActualDataLength(sample); - ok(size == 200, "Got valid size %u.\n", size); + ok(size == 200, "Got valid size %lu.\n", size);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < size; ++i) expect[i] = i; ok(!memcmp(data, expect, size), "Data didn't match.\n"); @@ -798,11 +798,11 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample hr = IMediaSample_GetTime(sample, &start, &stop); if (filter->preview) { - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr); } else { - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == 30000, "Got start time %s.\n", wine_dbgstr_longlong(start)); ok(stop == 40000, "Got stop time %s.\n", wine_dbgstr_longlong(stop)); } @@ -810,21 +810,21 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample hr = IMediaSample_GetMediaTime(sample, &start, &stop); if (filter->preview) { - todo_wine ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr); } else { - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == 10000, "Got start time %s.\n", wine_dbgstr_longlong(start)); ok(stop == 20000, "Got stop time %s.\n", wine_dbgstr_longlong(stop)); }
hr = IMediaSample_IsDiscontinuity(sample); - todo_wine_if (filter->preview) ok(hr == filter->preview ? S_FALSE : S_OK, "Got hr %#x.\n", hr); + todo_wine_if (filter->preview) ok(hr == filter->preview ? S_FALSE : S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsPreroll(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsSyncPoint(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
SetEvent(filter->sample_event);
@@ -895,10 +895,10 @@ static void test_source_media_types(AM_MEDIA_TYPE req_mt, const AM_MEDIA_TYPE *s HRESULT hr;
hr = IPin_EnumMediaTypes(source, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumMediaTypes_Next(enummt, 3, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(count == 2, "Got %u types.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + todo_wine ok(count == 2, "Got %lu types.\n", count); ok(compare_media_types(mts[0], &req_mt), "Media types didn't match.\n"); if (count > 1) ok(compare_media_types(mts[1], source_mt), "Media types didn't match.\n"); @@ -908,42 +908,42 @@ static void test_source_media_types(AM_MEDIA_TYPE req_mt, const AM_MEDIA_TYPE *s IEnumMediaTypes_Release(enummt);
hr = IPin_QueryAccept(source, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
req_mt.lSampleSize = 2; req_mt.bFixedSizeSamples = TRUE; hr = IPin_QueryAccept(source, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
req_mt.cbFormat = sizeof(count); req_mt.pbFormat = (BYTE *)&count; hr = IPin_QueryAccept(source, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.cbFormat = 0; req_mt.pbFormat = NULL;
req_mt.majortype = MEDIATYPE_Audio; hr = IPin_QueryAccept(source, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.majortype = GUID_NULL; hr = IPin_QueryAccept(source, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Stream;
req_mt.subtype = MEDIASUBTYPE_PCM; hr = IPin_QueryAccept(source, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.subtype = GUID_NULL; hr = IPin_QueryAccept(source, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_Avi;
req_mt.formattype = FORMAT_WaveFormatEx; hr = IPin_QueryAccept(source, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.formattype = GUID_NULL; hr = IPin_QueryAccept(source, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.formattype = FORMAT_None;
req_mt.majortype = MEDIATYPE_Audio; @@ -953,7 +953,7 @@ static void test_source_media_types(AM_MEDIA_TYPE req_mt, const AM_MEDIA_TYPE *s req_mt.pbFormat = (BYTE *)&count; req_mt.bTemporalCompression = TRUE; hr = IPin_QueryAccept(source, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph, @@ -966,51 +966,51 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph,
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(source, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
/* Exact connection. */
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(source, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsink->sink.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsink->sink.pin.mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsink->sink.pin.peer == source, "Got peer %p.\n", testsink->sink.pin.peer); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); if (hr == S_OK) { IFilterGraph2_Disconnect(graph, source); @@ -1020,7 +1020,7 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph,
req_mt.majortype = MEDIATYPE_Audio; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); if (hr == S_OK) { IFilterGraph2_Disconnect(graph, source); @@ -1030,61 +1030,61 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph, /* Connection with wildcards. */
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink->sink.pin.mt, &sink_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface);
req_mt.majortype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink->sink.pin.mt, &sink_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface);
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink->sink.pin.mt, &sink_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface);
req_mt.formattype = FORMAT_WaveFormatEx; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt = sink_mt; req_mt.formattype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink->sink.pin.mt, &sink_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface);
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink->sink.pin.mt, &sink_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface);
req_mt.majortype = MEDIATYPE_Audio; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
/* Test enumeration of sink media types. */
testsink->sink_mt = &req_mt; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, NULL); - todo_wine ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr); if (hr == S_OK) { IFilterGraph2_Disconnect(graph, source); @@ -1094,7 +1094,7 @@ static void test_source_connection(AM_MEDIA_TYPE req_mt, IFilterGraph2 *graph, req_mt = sink_mt; req_mt.lSampleSize = 3; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink->sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink->sink.pin.mt, &req_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink->sink.pin.IPin_iface); @@ -1138,56 +1138,56 @@ static void test_connect_pin(void) testsource.source_mt.formattype = FORMAT_VideoInfo;
hr = IPin_EnumMediaTypes(sink, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumMediaTypes_Next(enummt, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); IEnumMediaTypes_Release(enummt);
hr = IPin_EnumMediaTypes(capture, &enummt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); hr = IPin_EnumMediaTypes(preview, &enummt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IPin_QueryAccept(sink, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(capture, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(preview, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
/* Test sink connection. */
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(sink, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(sink, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsource.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n");
hr = IPin_EnumMediaTypes(sink, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumMediaTypes_Next(enummt, 1, mts, NULL); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); IEnumMediaTypes_Release(enummt);
test_source_media_types(req_mt, &testsource.source_mt, capture); @@ -1196,39 +1196,39 @@ static void test_connect_pin(void) test_source_connection(req_mt, graph, control, &testsink, preview);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsource.source.pin.peer == sink, "Got peer %p.\n", testsource.source.pin.peer); IFilterGraph2_Disconnect(graph, &testsource.source.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(sink, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
IPin_Release(sink); IPin_Release(capture); IPin_Release(preview); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsource.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_streaming(void) @@ -1270,111 +1270,111 @@ static void test_streaming(void) IBaseFilter_FindPin(filter, L"Preview", &preview);
hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, capture, &testsink1.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, preview, &testsink2.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) { IMemAllocator_Commit(allocator); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); size = IMediaSample_GetSize(sample); - ok(size == 256, "Got size %d.\n", size); + ok(size == 256, "Got size %ld.\n", size); for (i = 0; i < 200; ++i) data[i] = i; hr = IMediaSample_SetActualDataLength(sample, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = 10000; stop = 20000; hr = IMediaSample_SetMediaTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); start = 30000; stop = 40000; hr = IMediaSample_SetTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetDiscontinuity(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetPreroll(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetSyncPoint(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!WaitForSingleObject(testsink1.sample_event, 1000), "Wait timed out.\n"); ok(!WaitForSingleObject(testsink2.sample_event, 1000), "Wait timed out.\n");
hr = IPin_NewSegment(sink, 10000, 20000, 1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!WaitForSingleObject(testsink1.segment_event, 1000), "Wait timed out.\n"); ok(!WaitForSingleObject(testsink2.segment_event, 1000), "Wait timed out.\n");
hr = IPin_EndOfStream(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!WaitForSingleObject(testsink1.eos_event, 1000), "Wait timed out.\n"); ok(!WaitForSingleObject(testsink2.eos_event, 1000), "Wait timed out.\n");
hr = IPin_EndOfStream(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!WaitForSingleObject(testsink1.eos_event, 1000), "Wait timed out.\n"); ok(!WaitForSingleObject(testsink2.eos_event, 1000), "Wait timed out.\n");
ok(!testsink1.got_begin_flush, "Got %u calls to IPin::BeginFlush().\n", testsink1.got_begin_flush); ok(!testsink2.got_begin_flush, "Got %u calls to IPin::BeginFlush().\n", testsink2.got_begin_flush); hr = IPin_BeginFlush(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink1.got_begin_flush == 1, "Got %u calls to IPin::BeginFlush().\n", testsink1.got_begin_flush); ok(testsink2.got_begin_flush == 1, "Got %u calls to IPin::BeginFlush().\n", testsink2.got_begin_flush);
hr = IMemInputPin_Receive(input, sample); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(sink); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); /* No EOS events are sent downstream, however. */
ok(!testsink1.got_end_flush, "Got %u calls to IPin::EndFlush().\n", testsink1.got_end_flush); ok(!testsink2.got_end_flush, "Got %u calls to IPin::EndFlush().\n", testsink2.got_end_flush); hr = IPin_EndFlush(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink1.got_end_flush == 1, "Got %u calls to IPin::EndFlush().\n", testsink1.got_end_flush); ok(testsink2.got_end_flush == 1, "Got %u calls to IPin::EndFlush().\n", testsink2.got_end_flush);
hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!WaitForSingleObject(testsink1.sample_event, 1000), "Wait timed out.\n"); ok(!WaitForSingleObject(testsink2.sample_event, 1000), "Wait timed out.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_Receive(input, sample); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); /* No EOS events are sent downstream, however. */
IMediaSample_Release(sample); @@ -1385,15 +1385,15 @@ static void test_streaming(void) IPin_Release(preview); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsource.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink1.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink2.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(smartteefilter) diff --git a/dlls/qcap/tests/videocapture.c b/dlls/qcap/tests/videocapture.c index a96aeb6740c..3b7a82242b5 100644 --- a/dlls/qcap/tests/videocapture.c +++ b/dlls/qcap/tests/videocapture.c @@ -39,7 +39,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); } @@ -51,34 +51,34 @@ static void test_media_types(IPin *pin) HRESULT hr;
hr = IPin_EnumMediaTypes(pin, &enum_media_types); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (IEnumMediaTypes_Next(enum_media_types, 1, &pmt, NULL) == S_OK) { hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(pmt); } IEnumMediaTypes_Release(enum_media_types);
hr = IPin_QueryAccept(pin, NULL); - todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
memset(&mt, 0, sizeof(mt)); hr = IPin_QueryAccept(pin, &mt); - ok(hr != S_OK, "Got hr %#x.\n", hr); + ok(hr != S_OK, "Got hr %#lx.\n", hr);
mt.majortype = MEDIATYPE_Video; hr = IPin_QueryAccept(pin, &mt); - ok(hr != S_OK, "Got hr %#x.\n", hr); + ok(hr != S_OK, "Got hr %#lx.\n", hr);
mt.formattype = FORMAT_VideoInfo; hr = IPin_QueryAccept(pin, &mt); - ok(hr != S_OK, "Got hr %#x.\n", hr); + ok(hr != S_OK, "Got hr %#lx.\n", hr);
mt.formattype = FORMAT_None; hr = IPin_QueryAccept(pin, &mt); - ok(hr != S_OK, "Got hr %#x.\n", hr); + ok(hr != S_OK, "Got hr %#lx.\n", hr); }
static void test_stream_config(IPin *pin) @@ -93,36 +93,36 @@ static void test_stream_config(IPin *pin) HRESULT hr;
hr = IPin_QueryInterface(pin, &IID_IAMStreamConfig, (void **)&stream_config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMStreamConfig_GetFormat(stream_config, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format->majortype, &MEDIATYPE_Video), "Got wrong majortype: %s.\n", debugstr_guid(&format->majortype));
hr = IAMStreamConfig_SetFormat(stream_config, format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* After setting the format, a single media type is enumerated. * This persists until the filter is released. */ IPin_EnumMediaTypes(pin, &enum_media_types); hr = IEnumMediaTypes_Next(enum_media_types, 1, &format2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); DeleteMediaType(format2); hr = IEnumMediaTypes_Next(enum_media_types, 1, &format2, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); IEnumMediaTypes_Release(enum_media_types);
format->majortype = MEDIATYPE_Audio; hr = IAMStreamConfig_SetFormat(stream_config, format); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
format->majortype = MEDIATYPE_Video; video_info = (VIDEOINFOHEADER *)format->pbFormat; video_info->bmiHeader.biWidth--; video_info->bmiHeader.biHeight--; hr = IAMStreamConfig_SetFormat(stream_config, format); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
depth = video_info->bmiHeader.biBitCount; compression = video_info->bmiHeader.biCompression; @@ -131,23 +131,23 @@ static void test_stream_config(IPin *pin) video_info->bmiHeader.biBitCount = 0; video_info->bmiHeader.biCompression = 0; hr = IAMStreamConfig_SetFormat(stream_config, format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMStreamConfig_GetFormat(stream_config, &format2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format2->majortype, &MEDIATYPE_Video), "Got wrong majortype: %s.\n", debugstr_guid(&format2->majortype)); video_info2 = (VIDEOINFOHEADER *)format2->pbFormat; ok(video_info2->bmiHeader.biBitCount == depth, "Got wrong depth: %d.\n", video_info2->bmiHeader.biBitCount); ok(video_info2->bmiHeader.biCompression == compression, - "Got wrong compression: %d.\n", video_info2->bmiHeader.biCompression); + "Got wrong compression: %ld.\n", video_info2->bmiHeader.biCompression); FreeMediaType(format2);
video_info->bmiHeader.biWidth = 10000000; video_info->bmiHeader.biHeight = 10000000; hr = IAMStreamConfig_SetFormat(stream_config, format); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); FreeMediaType(format);
count = 0xdeadbeef; @@ -156,33 +156,33 @@ static void test_stream_config(IPin *pin) if (0) { hr = IAMStreamConfig_GetNumberOfCapabilities(stream_config, &count, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IAMStreamConfig_GetNumberOfCapabilities(stream_config, NULL, &size); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IAMStreamConfig_GetStreamCaps(stream_config, 0, NULL, (BYTE *)&vscc); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IAMStreamConfig_GetStreamCaps(stream_config, 0, &format, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
hr = IAMStreamConfig_GetNumberOfCapabilities(stream_config, &count, &size); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count != 0xdeadbeef, "Got wrong count: %d.\n", count); ok(size == sizeof(VIDEO_STREAM_CONFIG_CAPS), "Got wrong size: %d.\n", size);
hr = IAMStreamConfig_GetStreamCaps(stream_config, 100000, NULL, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IAMStreamConfig_GetStreamCaps(stream_config, 100000, &format, (BYTE *)&vscc); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
for (i = 0; i < count; ++i) { hr = IAMStreamConfig_GetStreamCaps(stream_config, i, &format, (BYTE *)&vscc); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format->majortype, &MEDIATYPE_Video), "Got wrong majortype: %s.\n", debugstr_guid(&MEDIATYPE_Video)); ok(IsEqualGUID(&vscc.guid, &FORMAT_VideoInfo) @@ -190,17 +190,17 @@ static void test_stream_config(IPin *pin) debugstr_guid(&vscc.guid));
hr = IAMStreamConfig_SetFormat(stream_config, format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMStreamConfig_GetFormat(stream_config, &format2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(format, format2), "Media types didn't match.\n"); DeleteMediaType(format2);
hr = IPin_EnumMediaTypes(pin, &enum_media_types); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumMediaTypes_Next(enum_media_types, 1, &format2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(format, format2), "Media types didn't match.\n"); DeleteMediaType(format2); IEnumMediaTypes_Release(enum_media_types); @@ -241,7 +241,7 @@ static void test_pins(IBaseFilter *filter) HRESULT hr;
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while ((hr = IEnumPins_Next(enum_pins, 1, &pin, NULL)) == S_OK) { @@ -288,11 +288,11 @@ static void test_misc_flags(IBaseFilter *filter) HRESULT hr;
hr = IBaseFilter_QueryInterface(filter, &IID_IAMFilterMiscFlags, (void **)&misc_flags); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
flags = IAMFilterMiscFlags_GetMiscFlags(misc_flags); ok(flags == AM_FILTER_MISC_FLAGS_IS_SOURCE - || broken(!flags) /* win7 */, "Got wrong flags: %#x.\n", flags); + || broken(!flags) /* win7 */, "Got wrong flags: %#lx.\n", flags);
IAMFilterMiscFlags_Release(misc_flags); } @@ -303,49 +303,49 @@ static void test_unconnected_filter_state(IBaseFilter *filter) HRESULT hr;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state); }
@@ -420,81 +420,81 @@ static void test_filter_state(IMediaControl *control, IMemAllocator *allocator) HRESULT hr;
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, AM_GBF_NOWAIT); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(sample);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, AM_GBF_NOWAIT); - todo_wine ok(hr == VFW_E_TIMEOUT, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_TIMEOUT, "Got hr %#lx.\n", hr); if (hr == S_OK) IMediaSample_Release(sample);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
/* Test committing the allocator before the capture filter does. */
hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_Decommit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_connect_pin(IBaseFilter *filter, IPin *source) @@ -516,20 +516,20 @@ static void test_connect_pin(IBaseFilter *filter, IPin *source) IFilterGraph2_AddFilter(graph, &testsink.filter.IBaseFilter_iface, L"sink"); IFilterGraph2_AddFilter(graph, filter, L"source"); hr = IPin_QueryInterface(source, &IID_IAMStreamConfig, (void **)&stream_config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(source, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(source, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumMediaTypes_Next(enummt, 2, mts, &count); - ok(SUCCEEDED(hr), "Got hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); CopyMediaType(&req_mt, mts[count - 1]); CopyMediaType(&default_mt, mts[0]); DeleteMediaType(mts[0]); @@ -538,50 +538,50 @@ static void test_connect_pin(IBaseFilter *filter, IPin *source) IEnumMediaTypes_Release(enummt);
hr = IAMStreamConfig_GetFormat(stream_config, &mts[0]); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(mts[0], &default_mt), "Media types didn't match.\n"); DeleteMediaType(mts[0]);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!!testsink.sink.pAllocator, "Expected to be assigned an allocator.\n");
test_filter_state(control, testsink.sink.pAllocator);
hr = IPin_ConnectedTo(source, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsink.sink.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); FreeMediaType(&mt);
hr = IAMStreamConfig_GetFormat(stream_config, &mts[0]); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(mts[0], &req_mt), "Media types didn't match.\n"); DeleteMediaType(mts[0]);
hr = IPin_EnumMediaTypes(source, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumMediaTypes_Next(enummt, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(mts[0], &default_mt), "Media types didn't match.\n"); DeleteMediaType(mts[0]); IEnumMediaTypes_Release(enummt);
hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsink.sink.pin.peer == source, "Got peer %p.\n", testsink.sink.pin.peer); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
hr = IAMStreamConfig_GetFormat(stream_config, &mts[0]); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(mts[0], &default_mt), "Media types didn't match.\n"); DeleteMediaType(mts[0]);
@@ -590,9 +590,9 @@ static void test_connect_pin(IBaseFilter *filter, IPin *source) IAMStreamConfig_Release(stream_config); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_connection(IMoniker *moniker) @@ -604,10 +604,10 @@ static void test_connection(IMoniker *moniker) IPin *pin;
hr = IMoniker_BindToObject(moniker, NULL, NULL, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (IEnumPins_Next(enum_pins, 1, &pin, NULL) == S_OK) { @@ -622,7 +622,7 @@ static void test_connection(IMoniker *moniker)
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(videocapture) @@ -639,7 +639,7 @@ START_TEST(videocapture)
hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, &IID_ICreateDevEnum, (void **)&dev_enum); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ICreateDevEnum_CreateClassEnumerator(dev_enum, &CLSID_VideoInputDeviceCategory, &class_enum, 0); if (hr == S_FALSE) @@ -649,18 +649,18 @@ START_TEST(videocapture) CoUninitialize(); return; } - ok(hr == S_OK, "Got hr=%#x.\n", hr); + ok(hr == S_OK, "Got hr=%#lx.\n", hr);
while (IEnumMoniker_Next(class_enum, 1, &moniker, NULL) == S_OK) { hr = IMoniker_GetDisplayName(moniker, NULL, NULL, &name); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); trace("Testing device %s.\n", wine_dbgstr_w(name)); CoTaskMemFree(name);
if (FAILED(hr = IMoniker_BindToObject(moniker, NULL, NULL, &IID_IBaseFilter, (void **)&filter))) { - skip("Failed to open device %s, hr %#x.\n", debugstr_w(name), hr); + skip("Failed to open device %s, hr %#lx.\n", debugstr_w(name), hr); IMoniker_Release(moniker); continue; } @@ -671,7 +671,7 @@ START_TEST(videocapture) test_unconnected_filter_state(filter);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
test_connection(moniker);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/qdvd/tests/Makefile.in | 1 - dlls/qdvd/tests/graph.c | 36 ++++++++++++++++++------------------ dlls/qdvd/tests/navigator.c | 36 ++++++++++++++++++------------------ 3 files changed, 36 insertions(+), 37 deletions(-)
diff --git a/dlls/qdvd/tests/Makefile.in b/dlls/qdvd/tests/Makefile.in index c94ea074c07..fdd769b73e0 100644 --- a/dlls/qdvd/tests/Makefile.in +++ b/dlls/qdvd/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = qdvd.dll IMPORTS = strmiids uuid ole32
diff --git a/dlls/qdvd/tests/graph.c b/dlls/qdvd/tests/graph.c index 93dc4e66a99..7322e2375b7 100644 --- a/dlls/qdvd/tests/graph.c +++ b/dlls/qdvd/tests/graph.c @@ -28,7 +28,7 @@ static IDvdGraphBuilder *create_graph_builder(void) IDvdGraphBuilder *graph = NULL; HRESULT hr = CoCreateInstance(&CLSID_DvdGraphBuilder, NULL, CLSCTX_INPROC_SERVER, &IID_IDvdGraphBuilder, (void **)&graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return graph; }
@@ -49,7 +49,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); } @@ -111,53 +111,53 @@ static void test_aggregation(void) graph = (IDvdGraphBuilder *)0xdeadbeef; hr = CoCreateInstance(&CLSID_DvdGraphBuilder, &test_outer, CLSCTX_INPROC_SERVER, &IID_IDvdGraphBuilder, (void **)&graph); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!graph, "Got interface %p.\n", graph);
hr = CoCreateInstance(&CLSID_DvdGraphBuilder, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IDvdGraphBuilder, (void **)&graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDvdGraphBuilder_QueryInterface(graph, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IDvdGraphBuilder_QueryInterface(graph, &IID_IDvdGraphBuilder, (void **)&graph2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph2 == (IDvdGraphBuilder *)0xdeadbeef, "Got unexpected IDvdGraphBuilder %p.\n", graph2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IDvdGraphBuilder_QueryInterface(graph, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IDvdGraphBuilder_Release(graph); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
START_TEST(graph) diff --git a/dlls/qdvd/tests/navigator.c b/dlls/qdvd/tests/navigator.c index 51999065cf5..fcc8fd7c957 100644 --- a/dlls/qdvd/tests/navigator.c +++ b/dlls/qdvd/tests/navigator.c @@ -28,7 +28,7 @@ static IBaseFilter *create_navigator(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_DVDNavigator, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -49,7 +49,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); } @@ -131,53 +131,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_DVDNavigator, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_DVDNavigator, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
START_TEST(navigator)
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/qedit/tests/Makefile.in | 1 dlls/qedit/tests/mediadet.c | 270 +++++++++++----------- dlls/qedit/tests/nullrenderer.c | 370 +++++++++++++++--------------- dlls/qedit/tests/samplegrabber.c | 462 +++++++++++++++++++------------------- dlls/qedit/tests/timeline.c | 74 +++--- 5 files changed, 588 insertions(+), 589 deletions(-)
diff --git a/dlls/qedit/tests/Makefile.in b/dlls/qedit/tests/Makefile.in index 0b028674090..a1020f5052d 100644 --- a/dlls/qedit/tests/Makefile.in +++ b/dlls/qedit/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = qedit.dll IMPORTS = strmbase strmiids uuid oleaut32 ole32
diff --git a/dlls/qedit/tests/mediadet.c b/dlls/qedit/tests/mediadet.c index dc83bb9a0a6..549fc0e4500 100644 --- a/dlls/qedit/tests/mediadet.c +++ b/dlls/qedit/tests/mediadet.c @@ -82,53 +82,53 @@ static void test_aggregation(void) detector = (IMediaDet *)0xdeadbeef; hr = CoCreateInstance(&CLSID_MediaDet, &test_outer, CLSCTX_INPROC_SERVER, &IID_IMediaDet, (void **)&detector); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!detector, "Got interface %p.\n", detector);
hr = CoCreateInstance(&CLSID_MediaDet, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IMediaDet, (void **)&detector); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaDet_QueryInterface(detector, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IMediaDet_QueryInterface(detector, &IID_IMediaDet, (void **)&detector2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(detector2 == (IMediaDet *)0xdeadbeef, "Got unexpected IMediaDet %p.\n", detector2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IMediaDet_QueryInterface(detector, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IMediaDet_Release(detector); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
struct testfilter @@ -466,185 +466,185 @@ static void test_mediadet(void) /* test.avi has one video stream. */ hr = CoCreateInstance(&CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaDet, (LPVOID*)&pM); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with %lx\n", hr); ok(pM != NULL, "pM is NULL\n");
filename = NULL; hr = IMediaDet_get_Filename(pM, &filename); /* Despite what MSDN claims, this returns S_OK. */ - ok(hr == S_OK, "IMediaDet_get_Filename failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_get_Filename failed: %08lx\n", hr); ok(filename == NULL, "IMediaDet_get_Filename\n");
filename = (BSTR) -1; hr = IMediaDet_get_Filename(pM, &filename); /* Despite what MSDN claims, this returns S_OK. */ - ok(hr == S_OK, "IMediaDet_get_Filename failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_get_Filename failed: %08lx\n", hr); ok(filename == NULL, "IMediaDet_get_Filename\n");
nstrms = -1; hr = IMediaDet_get_OutputStreams(pM, &nstrms); - ok(hr == E_INVALIDARG, "IMediaDet_get_OutputStreams failed: %08x\n", hr); - ok(nstrms == -1, "IMediaDet_get_OutputStreams: nstrms is %i\n", nstrms); + ok(hr == E_INVALIDARG, "IMediaDet_get_OutputStreams failed: %08lx\n", hr); + ok(nstrms == -1, "IMediaDet_get_OutputStreams: nstrms is %li\n", nstrms);
strm = -1; /* The stream defaults to 0, even without a file! */ hr = IMediaDet_get_CurrentStream(pM, &strm); - ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08x\n", hr); - ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %i\n", strm); + ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08lx\n", hr); + ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %li\n", strm);
hr = IMediaDet_get_CurrentStream(pM, NULL); - ok(hr == E_POINTER, "IMediaDet_get_CurrentStream failed: %08x\n", hr); + ok(hr == E_POINTER, "IMediaDet_get_CurrentStream failed: %08lx\n", hr);
/* But put_CurrentStream doesn't. */ hr = IMediaDet_put_CurrentStream(pM, 0); - ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08lx\n", hr);
hr = IMediaDet_put_CurrentStream(pM, -1); - ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08lx\n", hr);
hr = IMediaDet_get_StreamMediaType(pM, &mt); - ok(hr == E_INVALIDARG, "IMediaDet_get_StreamMediaType failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "IMediaDet_get_StreamMediaType failed: %08lx\n", hr);
hr = IMediaDet_get_StreamMediaType(pM, NULL); - ok(hr == E_POINTER, "IMediaDet_get_StreamMediaType failed: %08x\n", hr); + ok(hr == E_POINTER, "IMediaDet_get_StreamMediaType failed: %08lx\n", hr);
hr = IMediaDet_get_StreamType(pM, &guid); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IMediaDet_get_StreamType(pM, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IMediaDet_get_StreamTypeB(pM, &bstr); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IMediaDet_get_StreamTypeB(pM, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IMediaDet_get_Filter(pM, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
unk = (IUnknown*)0xdeadbeef; hr = IMediaDet_get_Filter(pM, &unk); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(!unk, "Got filter %p.\n", unk);
filename = SysAllocString(test_avi_filename); hr = IMediaDet_put_Filename(pM, filename); - ok(hr == S_OK, "IMediaDet_put_Filename failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_put_Filename failed: %08lx\n", hr); SysFreeString(filename);
strm = -1; /* The stream defaults to 0. */ hr = IMediaDet_get_CurrentStream(pM, &strm); - ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08x\n", hr); - ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %i\n", strm); + ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08lx\n", hr); + ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %li\n", strm);
ZeroMemory(&mt, sizeof mt); hr = IMediaDet_get_StreamMediaType(pM, &mt); - ok(hr == S_OK, "IMediaDet_get_StreamMediaType failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_get_StreamMediaType failed: %08lx\n", hr); CoTaskMemFree(mt.pbFormat);
hr = IMediaDet_get_StreamType(pM, &guid); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&guid));
hr = IMediaDet_get_StreamTypeB(pM, &bstr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(bstr, L"{73646976-0000-0010-8000-00AA00389B71}"), "Got major type %s.\n", debugstr_w(bstr)); SysFreeString(bstr);
/* Even before get_OutputStreams. */ hr = IMediaDet_put_CurrentStream(pM, 1); - ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08lx\n", hr);
hr = IMediaDet_get_OutputStreams(pM, &nstrms); - ok(hr == S_OK, "IMediaDet_get_OutputStreams failed: %08x\n", hr); - ok(nstrms == 1, "IMediaDet_get_OutputStreams: nstrms is %i\n", nstrms); + ok(hr == S_OK, "IMediaDet_get_OutputStreams failed: %08lx\n", hr); + ok(nstrms == 1, "IMediaDet_get_OutputStreams: nstrms is %li\n", nstrms);
filename = NULL; hr = IMediaDet_get_Filename(pM, &filename); - ok(hr == S_OK, "IMediaDet_get_Filename failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_get_Filename failed: %08lx\n", hr); ok(!wcscmp(filename, test_avi_filename), "Expected filename %s, got %s.\n", debugstr_w(test_avi_filename), debugstr_w(filename)); SysFreeString(filename);
hr = IMediaDet_get_Filename(pM, NULL); - ok(hr == E_POINTER, "IMediaDet_get_Filename failed: %08x\n", hr); + ok(hr == E_POINTER, "IMediaDet_get_Filename failed: %08lx\n", hr);
strm = -1; hr = IMediaDet_get_CurrentStream(pM, &strm); - ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08x\n", hr); - ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %i\n", strm); + ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08lx\n", hr); + ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %li\n", strm);
hr = IMediaDet_get_CurrentStream(pM, NULL); - ok(hr == E_POINTER, "IMediaDet_get_CurrentStream failed: %08x\n", hr); + ok(hr == E_POINTER, "IMediaDet_get_CurrentStream failed: %08lx\n", hr);
hr = IMediaDet_put_CurrentStream(pM, -1); - ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08lx\n", hr);
hr = IMediaDet_put_CurrentStream(pM, 1); - ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08lx\n", hr);
/* Try again. */ strm = -1; hr = IMediaDet_get_CurrentStream(pM, &strm); - ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08x\n", hr); - ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %i\n", strm); + ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08lx\n", hr); + ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %li\n", strm);
hr = IMediaDet_put_CurrentStream(pM, 0); - ok(hr == S_OK, "IMediaDet_put_CurrentStream failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_put_CurrentStream failed: %08lx\n", hr);
strm = -1; hr = IMediaDet_get_CurrentStream(pM, &strm); - ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08x\n", hr); - ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %i\n", strm); + ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08lx\n", hr); + ok(strm == 0, "IMediaDet_get_CurrentStream: strm is %li\n", strm);
ZeroMemory(&mt, sizeof mt); hr = IMediaDet_get_StreamMediaType(pM, &mt); - ok(hr == S_OK, "IMediaDet_get_StreamMediaType failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_get_StreamMediaType failed: %08lx\n", hr); ok(IsEqualGUID(&mt.majortype, &MEDIATYPE_Video), "IMediaDet_get_StreamMediaType\n"); CoTaskMemFree(mt.pbFormat);
hr = IMediaDet_get_StreamType(pM, &guid); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MEDIATYPE_Video), "Got major type %s.\n", debugstr_guid(&guid));
hr = IMediaDet_get_StreamTypeB(pM, &bstr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(bstr, L"{73646976-0000-0010-8000-00AA00389B71}"), "Got major type %s.\n", debugstr_w(bstr)); SysFreeString(bstr);
hr = IMediaDet_get_FrameRate(pM, NULL); - ok(hr == E_POINTER, "IMediaDet_get_FrameRate failed: %08x\n", hr); + ok(hr == E_POINTER, "IMediaDet_get_FrameRate failed: %08lx\n", hr);
hr = IMediaDet_get_FrameRate(pM, &fps); - ok(hr == S_OK, "IMediaDet_get_FrameRate failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_get_FrameRate failed: %08lx\n", hr); ok(fps == 10.0, "IMediaDet_get_FrameRate: fps is %f\n", fps);
hr = IMediaDet_Release(pM); - ok(hr == 0, "IMediaDet_Release returned: %x\n", hr); + ok(hr == 0, "IMediaDet_Release returned: %lx\n", hr);
/* test_sound.avi has one video stream and one audio stream. */ hr = CoCreateInstance(&CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaDet, (LPVOID*)&pM); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with %lx\n", hr); ok(pM != NULL, "pM is NULL\n");
filename = SysAllocString(test_sound_avi_filename); hr = IMediaDet_put_Filename(pM, filename); - ok(hr == S_OK, "IMediaDet_put_Filename failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_put_Filename failed: %08lx\n", hr); SysFreeString(filename);
hr = IMediaDet_get_OutputStreams(pM, &nstrms); - ok(hr == S_OK, "IMediaDet_get_OutputStreams failed: %08x\n", hr); - ok(nstrms == 2, "IMediaDet_get_OutputStreams: nstrms is %i\n", nstrms); + ok(hr == S_OK, "IMediaDet_get_OutputStreams failed: %08lx\n", hr); + ok(nstrms == 2, "IMediaDet_get_OutputStreams: nstrms is %li\n", nstrms);
filename = NULL; hr = IMediaDet_get_Filename(pM, &filename); - ok(hr == S_OK, "IMediaDet_get_Filename failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_get_Filename failed: %08lx\n", hr); ok(!wcscmp(filename, test_sound_avi_filename), "Expected filename %s, got %s.\n", debugstr_w(test_sound_avi_filename), debugstr_w(filename)); SysFreeString(filename); @@ -656,16 +656,16 @@ static void test_mediadet(void) for (i = 0; i < 2; ++i) { hr = IMediaDet_put_CurrentStream(pM, i); - ok(hr == S_OK, "IMediaDet_put_CurrentStream failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_put_CurrentStream failed: %08lx\n", hr);
strm = -1; hr = IMediaDet_get_CurrentStream(pM, &strm); - ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08x\n", hr); - ok(strm == i, "IMediaDet_get_CurrentStream: strm is %i\n", strm); + ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08lx\n", hr); + ok(strm == i, "IMediaDet_get_CurrentStream: strm is %li\n", strm);
ZeroMemory(&mt, sizeof mt); hr = IMediaDet_get_StreamMediaType(pM, &mt); - ok(hr == S_OK, "IMediaDet_get_StreamMediaType failed: %08x\n", hr); + ok(hr == S_OK, "IMediaDet_get_StreamMediaType failed: %08lx\n", hr); flags += (IsEqualGUID(&mt.majortype, &MEDIATYPE_Video) ? 1 : (IsEqualGUID(&mt.majortype, &MEDIATYPE_Audio) @@ -675,17 +675,17 @@ static void test_mediadet(void) if (IsEqualGUID(&mt.majortype, &MEDIATYPE_Audio)) { hr = IMediaDet_get_StreamType(pM, &guid); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&guid, &MEDIATYPE_Audio), "Got major type %s.\n", debugstr_guid(&guid));
hr = IMediaDet_get_StreamTypeB(pM, &bstr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(bstr, L"{73647561-0000-0010-8000-00AA00389B71}"), "Got major type %s.\n", debugstr_w(bstr)); SysFreeString(bstr);
hr = IMediaDet_get_FrameRate(pM, &fps); - ok(hr == VFW_E_INVALIDMEDIATYPE, "IMediaDet_get_FrameRate failed: %08x\n", hr); + ok(hr == VFW_E_INVALIDMEDIATYPE, "IMediaDet_get_FrameRate failed: %08lx\n", hr); }
CoTaskMemFree(mt.pbFormat); @@ -693,29 +693,29 @@ static void test_mediadet(void) ok(flags == 3, "IMediaDet_get_StreamMediaType: flags are %i\n", flags);
hr = IMediaDet_put_CurrentStream(pM, 2); - ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08x\n", hr); + ok(hr == E_INVALIDARG, "IMediaDet_put_CurrentStream failed: %08lx\n", hr);
strm = -1; hr = IMediaDet_get_CurrentStream(pM, &strm); - ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08x\n", hr); - ok(strm == 1, "IMediaDet_get_CurrentStream: strm is %i\n", strm); + ok(hr == S_OK, "IMediaDet_get_CurrentStream failed: %08lx\n", hr); + ok(strm == 1, "IMediaDet_get_CurrentStream: strm is %li\n", strm);
unk = NULL; hr = IMediaDet_get_Filter(pM, &unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!unk, "Expected a non-NULL filter.\n"); hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void**)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IUnknown_Release(unk);
hr = IBaseFilter_EnumPins(filter, &enumpins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enumpins, 1, &pin, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EnumMediaTypes(pin, &type); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumMediaTypes_Next(type, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Stream), "Got major type %s.\n", debugstr_guid(&pmt->majortype)); IEnumMediaTypes_Release(type); @@ -724,17 +724,17 @@ static void test_mediadet(void) IPin_Release(pin);
hr = IEnumPins_Next(enumpins, 1, &pin, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); IEnumPins_Release(enumpins);
hr = IBaseFilter_QueryFilterInfo(filter, &filter_info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(filter_info.achName, L"Source"), "Got name %s.\n", debugstr_w(filter_info.achName)); IFilterGraph_Release(filter_info.pGraph); IBaseFilter_Release(filter);
hr = IMediaDet_Release(pM); - ok(hr == 0, "IMediaDet_Release returned: %x\n", hr); + ok(hr == 0, "IMediaDet_Release returned: %lx\n", hr); }
static void test_put_filter(void) @@ -753,29 +753,29 @@ static void test_put_filter(void)
hr = CoCreateInstance(&CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaDet, (void **)&detector); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaDet_put_Filter(detector, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IMediaDet_get_Filter(detector, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IMediaDet_get_StreamLength(detector, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IMediaDet_get_StreamLength(detector, &duration); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
testfilter_init(&testfilter); hr = IMediaDet_put_Filter(detector, &testfilter.filter.IUnknown_inner); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaDet_get_Filter(detector, &unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!unk, "Expected a non-NULL interface.\n"); hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter == &testfilter.filter.IBaseFilter_iface, "Expected the same filter.\n"); IBaseFilter_Release(filter); IUnknown_Release(unk); @@ -787,13 +787,13 @@ static void test_put_filter(void)
testfilter_init(&testfilter2); hr = IMediaDet_put_Filter(detector, &testfilter2.filter.IUnknown_inner); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaDet_get_Filter(detector, &unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!unk, "Expected a non-NULL interface.\n"); hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter == &testfilter2.filter.IBaseFilter_iface, "Expected the same filter.\n"); IBaseFilter_Release(filter); IUnknown_Release(unk); @@ -801,70 +801,70 @@ static void test_put_filter(void) ok(testfilter2.filter.graph != graph, "Expected a different graph.\n");
ref = IFilterGraph_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testfilter.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
count = 0xdeadbeef; hr = IMediaDet_get_OutputStreams(detector, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got %d streams.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got %ld streams.\n", count);
index = 0xdeadbeef; hr = IMediaDet_get_CurrentStream(detector, &index); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(index == 0, "Got stream %d.\n", index); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(index == 0, "Got stream %ld.\n", index);
filename = (BSTR)0xdeadbeef; hr = IMediaDet_get_Filename(detector, &filename); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!filename, "Got filename %s.\n", debugstr_w(filename));
hr = IMediaDet_get_StreamLength(detector, &duration); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(duration == 4.2, "Got duration %.16e.\n", duration);
ref = IMediaDet_Release(detector); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testfilter2.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = CoCreateInstance(&CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaDet, (void **)&detector); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
filename = SysAllocString(test_sound_avi_filename); hr = IMediaDet_put_Filename(detector, filename); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SysFreeString(filename);
hr = IMediaDet_get_StreamMediaType(detector, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); FreeMediaType(&mt);
hr = IMediaDet_get_Filter(detector, &unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaDet_put_Filter(detector, unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IUnknown_Release(unk);
filename = (BSTR)0xdeadbeef; hr = IMediaDet_get_Filename(detector, &filename); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!filename, "Got filename %s.\n", debugstr_w(filename));
count = 0xdeadbeef; hr = IMediaDet_get_OutputStreams(detector, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got %d streams.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got %ld streams.\n", count);
index = 0xdeadbeef; hr = IMediaDet_get_CurrentStream(detector, &index); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(index == 0, "Got stream %d.\n", index); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(index == 0, "Got stream %ld.\n", index);
ref = IMediaDet_Release(detector); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static HRESULT WINAPI ms_QueryInterface(IMediaSample *iface, REFIID riid, @@ -1048,35 +1048,35 @@ static void test_samplegrabber(void) /* Invalid RIID */ hr = CoCreateInstance(&CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory, (void**)&sg); - ok(hr == E_NOINTERFACE, "SampleGrabber create failed: %08x, expected E_NOINTERFACE\n", hr); + ok(hr == E_NOINTERFACE, "SampleGrabber create failed: %08lx, expected E_NOINTERFACE\n", hr);
hr = CoCreateInstance(&CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, &IID_ISampleGrabber, (void**)&sg); - ok(hr == S_OK, "SampleGrabber create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "SampleGrabber create failed: %08lx, expected S_OK\n", hr);
hr = ISampleGrabber_QueryInterface(sg, &IID_IBaseFilter, (void**)&bf); - ok(hr == S_OK, "QueryInterface for IID_IBaseFilter failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IBaseFilter failed: %08lx\n", hr);
hr = ISampleGrabber_SetCallback(sg, &my_sg_cb, 0); - ok(hr == S_OK, "SetCallback failed: %08x\n", hr); + ok(hr == S_OK, "SetCallback failed: %08lx\n", hr);
hr = IBaseFilter_GetState(bf, 100, &fstate); - ok(hr == S_OK, "Failed to get filter state: %08x\n", hr); + ok(hr == S_OK, "Failed to get filter state: %08lx\n", hr); ok(fstate == State_Stopped, "Got wrong filter state: %u\n", fstate);
hr = IBaseFilter_EnumPins(bf, &pins); - ok(hr == S_OK, "EnumPins create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "EnumPins create failed: %08lx, expected S_OK\n", hr);
hr = IEnumPins_Next(pins, 1, &pin, NULL); - ok(hr == S_OK, "Next failed: %08x\n", hr); + ok(hr == S_OK, "Next failed: %08lx\n", hr);
IEnumPins_Release(pins);
hr = IPin_QueryInterface(pin, &IID_IMemInputPin, (void**)&inpin); - ok(hr == S_OK, "QueryInterface(IMemInputPin) failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface(IMemInputPin) failed: %08lx\n", hr);
hr = IMemInputPin_Receive(inpin, &my_sample); - ok(hr == S_OK, "Receive failed: %08x\n", hr); + ok(hr == S_OK, "Receive failed: %08lx\n", hr); ok(samplecb_called == TRUE, "SampleCB should have been called\n");
IMemInputPin_Release(inpin); @@ -1095,22 +1095,22 @@ static void test_COM_sg_enumpins(void)
hr = CoCreateInstance(&CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void**)&bf); - ok(hr == S_OK, "SampleGrabber create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "SampleGrabber create failed: %08lx, expected S_OK\n", hr); hr = IBaseFilter_EnumPins(bf, &pins); - ok(hr == S_OK, "EnumPins create failed: %08x, expected S_OK\n", hr); + ok(hr == S_OK, "EnumPins create failed: %08lx, expected S_OK\n", hr);
/* Same refcount for all EnumPins interfaces */ refcount = IEnumPins_AddRef(pins); - ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + ok(refcount == 2, "refcount == %lu, expected 2\n", refcount); hr = IEnumPins_QueryInterface(pins, &IID_IEnumPins, (void**)&pins2); - ok(hr == S_OK, "QueryInterface for IID_IEnumPins failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IEnumPins failed: %08lx\n", hr); ok(pins == pins2, "QueryInterface for self failed (%p != %p)\n", pins, pins2); IEnumPins_Release(pins2);
hr = IEnumPins_QueryInterface(pins, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08lx\n", hr); refcount = IUnknown_AddRef(unk); - ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + ok(refcount == 4, "refcount == %lu, expected 4\n", refcount); refcount = IUnknown_Release(unk);
while (IEnumPins_Release(pins)); @@ -1135,7 +1135,7 @@ START_TEST(mediadet) &IID_IMediaDet, (void **)&detector))) { /* qedit.dll does not exist on 2003. */ - win_skip("Failed to create media detector object, hr %#x.\n", hr); + win_skip("Failed to create media detector object, hr %#lx.\n", hr); return; } IMediaDet_Release(detector); @@ -1147,9 +1147,9 @@ START_TEST(mediadet) test_COM_sg_enumpins();
ret = DeleteFileW(test_avi_filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); ret = DeleteFileW(test_sound_avi_filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError());
CoUninitialize(); } diff --git a/dlls/qedit/tests/nullrenderer.c b/dlls/qedit/tests/nullrenderer.c index cfbf1d37c2f..6d345dce77b 100644 --- a/dlls/qedit/tests/nullrenderer.c +++ b/dlls/qedit/tests/nullrenderer.c @@ -28,7 +28,7 @@ static IBaseFilter *create_null_renderer(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_NullRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -37,7 +37,7 @@ static IFilterGraph2 *create_graph(void) IFilterGraph2 *ret; HRESULT hr; hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&ret); - ok(hr == S_OK, "Failed to create FilterGraph: %#x\n", hr); + ok(hr == S_OK, "Failed to create FilterGraph: %#lx\n", hr); return ret; }
@@ -58,7 +58,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); } @@ -100,7 +100,7 @@ static void test_interfaces(void)
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); }
static void test_enum_pins(void) @@ -112,85 +112,85 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -202,22 +202,22 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -231,38 +231,38 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"In"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static const GUID test_iid = {0x33333333}; @@ -310,53 +310,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_NullRenderer, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_NullRenderer, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_media_types(void) @@ -371,19 +371,19 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -398,36 +398,36 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -488,36 +488,36 @@ static void test_allocator(IMemInputPin *input) HRESULT hr;
hr = IMemInputPin_GetAllocatorRequirements(input, &props); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IMemAllocator_GetProperties(ret_allocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); - ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); - ok(!props.cbAlign, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.cBuffers, "Got %ld buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %ld.\n", props.cbBuffer); + ok(!props.cbAlign, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(ret_allocator); }
hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&req_allocator);
hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_allocator == req_allocator, "Allocators didn't match.\n");
IMemAllocator_Release(req_allocator); @@ -535,9 +535,9 @@ static DWORD WINAPI frame_thread(void *arg) struct frame_thread_params *params = arg; HRESULT hr;
- if (winetest_debug > 1) trace("%04x: Sending frame.\n", GetCurrentThreadId()); + if (winetest_debug > 1) trace("%04lx: Sending frame.\n", GetCurrentThreadId()); hr = IMemInputPin_Receive(params->sink, params->sample); - if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); + if (winetest_debug > 1) trace("%04lx: Returned %#lx.\n", GetCurrentThreadId(), hr); IMediaSample_Release(params->sample); free(params); return hr; @@ -554,22 +554,22 @@ static HANDLE send_frame_time(IMemInputPin *sink, REFERENCE_TIME start_time, uns BYTE *data;
hr = IMemInputPin_GetAllocator(sink, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); memset(data, color, 32 * 16 * 2);
hr = IMediaSample_SetActualDataLength(sample, 32 * 16 * 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time *= 10000000; end_time = start_time + 10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
params->sink = sink; params->sample = sample; @@ -607,132 +607,132 @@ static void test_filter_state(IMemInputPin *input, IFilterGraph2 *graph)
thread = send_frame(input); hr = join_thread(thread); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
/* The renderer is not fully paused until it receives a sample. The thread * sending the sample blocks in IMemInputPin_Receive() until the filter is * stopped or run. */
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* The sink will decommit our allocator for us when stopping, and recommit * it when pausing. */ hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr); if (hr == S_OK) IMediaSample_Release(sample);
hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); thread = send_frame(input); hr = join_thread(thread); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMediaControl_Run(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMemAllocator_Release(allocator); IMediaControl_Release(control); @@ -748,54 +748,54 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IFilterGraph2 *graph) IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
thread = send_frame(input); ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* We dropped the sample we were holding, so now we need a new one... */
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input); ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame(input)); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaControl_Release(control); } @@ -811,14 +811,14 @@ static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG { if (code == expected_code) { - ok(param1 == expected1, "Got param1 %#lx.\n", param1); - ok(param2 == expected2, "Got param2 %#lx.\n", param2); + ok(param1 == expected1, "Got param1 %#Ix.\n", param1); + ok(param2 == expected2, "Got param2 %#Ix.\n", param2); ret++; } IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); timeout = 0; } - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
return ret; } @@ -860,81 +860,81 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(pin, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &source.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&mt, &req_mt, sizeof(AM_MEDIA_TYPE)), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
test_allocator(input);
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator);
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_filter_state(input, graph); test_flushing(pin, input, graph);
hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(source.source.pin.peer == pin, "Got peer %p.\n", peer); IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
IMemInputPin_Release(input); IPin_Release(pin); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_eos(void) @@ -948,49 +948,49 @@ static void test_unconnected_eos(void) ULONG ref;
hr = IFilterGraph2_AddFilter(graph, filter, L"renderer"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret); @@ -998,9 +998,9 @@ static void test_unconnected_eos(void) IMediaControl_Release(control); IMediaEvent_Release(eventsrc); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(nullrenderer) @@ -1014,7 +1014,7 @@ START_TEST(nullrenderer) &IID_IBaseFilter, (void **)&filter))) { /* qedit.dll does not exist on 2003. */ - win_skip("Failed to create null renderer filter, hr %#x.\n", hr); + win_skip("Failed to create null renderer filter, hr %#lx.\n", hr); return; } IBaseFilter_Release(filter); diff --git a/dlls/qedit/tests/samplegrabber.c b/dlls/qedit/tests/samplegrabber.c index 13ec04cdc1c..32fcfc1eb2b 100644 --- a/dlls/qedit/tests/samplegrabber.c +++ b/dlls/qedit/tests/samplegrabber.c @@ -29,7 +29,7 @@ static IBaseFilter *create_sample_grabber(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -59,13 +59,13 @@ static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOO expect_ref = get_refcount(iface);
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)) { ref = get_refcount(iface); - ok_(__FILE__, line)(ref == expect_ref + 1, "Expected %u references, got %u.\n", expect_ref + 1, ref); + ok_(__FILE__, line)(ref == expect_ref + 1, "Expected %lu references, got %lu.\n", expect_ref + 1, ref); ref = get_refcount(unk); - ok_(__FILE__, line)(ref == expect_ref + 1, "Expected %u references, got %u.\n", expect_ref + 1, ref); + ok_(__FILE__, line)(ref == expect_ref + 1, "Expected %lu references, got %lu.\n", expect_ref + 1, ref); IUnknown_Release(unk); } } @@ -117,10 +117,10 @@ static void test_interfaces(void) /* Queries for IMediaPosition or IMediaSeeking do not seem to increase the * reference count. */ hr = IPin_QueryInterface(pin, &IID_IMediaPosition, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IUnknown_Release(unk); hr = IPin_QueryInterface(pin, &IID_IMediaSeeking, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IUnknown_Release(unk); check_interface(pin, &IID_IPin, TRUE); todo_wine check_interface(pin, &IID_IQualityControl, TRUE); @@ -133,7 +133,7 @@ static void test_interfaces(void) IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); }
static void test_enum_pins(void) @@ -145,116 +145,116 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 3); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -266,32 +266,32 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_FindPin(filter, L"Input", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); hr = IBaseFilter_FindPin(filter, L"Output", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin2 == pin, "Expected pin %p, got %p.\n", pin, pin2); IPin_Release(pin2); IPin_Release(pin);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -306,55 +306,55 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); todo_wine ok(!wcscmp(info.achName, L"Input"), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); todo_wine ok(!wcscmp(info.achName, L"Output"), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"Out"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static const GUID test_iid = {0x33333333}; @@ -402,53 +402,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_SampleGrabber, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_SampleGrabber, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_media_types(void) @@ -482,94 +482,94 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"Out", &source);
hr = IPin_EnumMediaTypes(sink, &enummt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(source, &enummt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ISampleGrabber_SetMediaType(grabber, &match_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(sink, &enummt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(source, &enummt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
match_mt.majortype = MEDIATYPE_Video; match_mt.subtype = GUID_NULL; hr = ISampleGrabber_SetMediaType(grabber, &match_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
mt.majortype = GUID_NULL; hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = match_mt.majortype; hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
match_mt.subtype = MEDIASUBTYPE_RGB8; match_mt.formattype = GUID_NULL; hr = ISampleGrabber_SetMediaType(grabber, &match_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
mt.subtype = GUID_NULL; hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.subtype = match_mt.subtype; hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
match_mt.formattype = FORMAT_None; hr = ISampleGrabber_SetMediaType(grabber, &match_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
mt.formattype = GUID_NULL; hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.formattype = match_mt.formattype; hr = IPin_QueryAccept(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(sink); IPin_Release(source); ISampleGrabber_Release(grabber); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -637,18 +637,18 @@ static void test_sink_allocator(IPin *pin) IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); - todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocatorRequirements(input, &ret_props); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(ret_allocator); }
@@ -656,15 +656,15 @@ static void test_sink_allocator(IPin *pin) &IID_IMemAllocator, (void **)&req_allocator);
hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_allocator == req_allocator, "Allocators didn't match.\n"); IMemAllocator_Release(ret_allocator);
hr = IMemAllocator_SetProperties(req_allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMemAllocator_Release(req_allocator); IMemInputPin_Release(input); @@ -681,7 +681,7 @@ static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface
if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt))) { - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); IPin_Release(peer); iface->pin.peer = NULL; FreeMediaType(&iface->pin.mt); @@ -740,32 +740,32 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample HRESULT hr;
size = IMediaSample_GetSize(sample); - ok(size == 256, "Got size %u.\n", size); + ok(size == 256, "Got size %lu.\n", size); size = IMediaSample_GetActualDataLength(sample); - ok(size == 200, "Got valid size %u.\n", size); + ok(size == 200, "Got valid size %lu.\n", size);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < size; ++i) expect[i] = i; ok(!memcmp(data, expect, size), "Data didn't match.\n");
hr = IMediaSample_GetTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == 30000, "Got start time %s.\n", wine_dbgstr_longlong(start)); ok(stop == 40000, "Got stop time %s.\n", wine_dbgstr_longlong(stop));
hr = IMediaSample_GetMediaTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == 10000, "Got start time %s.\n", wine_dbgstr_longlong(start)); ok(stop == 20000, "Got stop time %s.\n", wine_dbgstr_longlong(stop));
hr = IMediaSample_IsDiscontinuity(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsPreroll(sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample_IsSyncPoint(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
++filter->got_sample;
@@ -835,58 +835,58 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input, BYTE *data;
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) { IMemAllocator_Commit(allocator); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); size = IMediaSample_GetSize(sample); - ok(size == 256, "Got size %d.\n", size); + ok(size == 256, "Got size %ld.\n", size); for (i = 0; i < 200; ++i) data[i] = i; hr = IMediaSample_SetActualDataLength(sample, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = 10000; stop = 20000; hr = IMediaSample_SetMediaTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); start = 30000; stop = 40000; hr = IMediaSample_SetTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetDiscontinuity(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetSyncPoint(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(sink->got_sample == 1, "Got %u calls to Receive().\n", sink->got_sample); sink->got_sample = 0;
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_Receive(input, sample); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
IMediaSample_Release(sample); IMemAllocator_Release(allocator); @@ -903,80 +903,80 @@ static void test_streaming_events(IMediaControl *control, IPin *sink, LONG i;
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 200; ++i) data[i] = i; hr = IMediaSample_SetActualDataLength(sample, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); start = 10000; stop = 20000; hr = IMediaSample_SetMediaTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); start = 30000; stop = 40000; hr = IMediaSample_SetTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetDiscontinuity(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetSyncPoint(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!testsink->got_new_segment, "Got %u calls to IPin::NewSegment().\n", testsink->got_new_segment); hr = IPin_NewSegment(sink, 10000, 20000, 1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_new_segment == 1, "Got %u calls to IPin::NewSegment().\n", testsink->got_new_segment);
ok(!testsink->got_eos, "Got %u calls to IPin::EndOfStream().\n", testsink->got_eos); hr = IPin_EndOfStream(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!testsink->got_sample, "Got %u calls to Receive().\n", testsink->got_sample); ok(testsink->got_eos == 1, "Got %u calls to IPin::EndOfStream().\n", testsink->got_eos); testsink->got_eos = 0;
hr = IPin_EndOfStream(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_eos == 1, "Got %u calls to IPin::EndOfStream().\n", testsink->got_eos); testsink->got_eos = 0;
hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(testsink->got_sample == 1, "Got %u calls to Receive().\n", testsink->got_sample); testsink->got_sample = 0;
ok(!testsink->got_begin_flush, "Got %u calls to IPin::BeginFlush().\n", testsink->got_begin_flush); hr = IPin_BeginFlush(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_begin_flush == 1, "Got %u calls to IPin::BeginFlush().\n", testsink->got_begin_flush);
hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_sample == 1, "Got %u calls to Receive().\n", testsink->got_sample); testsink->got_sample = 0;
hr = IPin_EndOfStream(sink); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(testsink->got_eos == 1, "Got %u calls to IPin::EndOfStream().\n", testsink->got_eos); testsink->got_eos = 0;
ok(!testsink->got_end_flush, "Got %u calls to IPin::EndFlush().\n", testsink->got_end_flush); hr = IPin_EndFlush(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_end_flush == 1, "Got %u calls to IPin::EndFlush().\n", testsink->got_end_flush);
hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_sample == 1, "Got %u calls to Receive().\n", testsink->got_sample); testsink->got_sample = 0;
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(sample); IMemAllocator_Release(allocator); } @@ -1019,57 +1019,57 @@ static void test_connect_pin(void) testsource.source_mt.formattype = FORMAT_VideoInfo;
hr = ISampleGrabber_GetConnectedMediaType(grabber, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
/* Test sink connection. */
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(sink, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(sink, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsource.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ISampleGrabber_GetConnectedMediaType(grabber, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = ISampleGrabber_GetConnectedMediaType(grabber, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n");
hr = IPin_EnumMediaTypes(sink, &enummt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); hr = IPin_EnumMediaTypes(source, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(pmt, &testsource.source_mt), "Media types didn't match.\n"); IEnumMediaTypes_Release(enummt);
@@ -1077,68 +1077,68 @@ static void test_connect_pin(void) req_mt.subtype = MEDIASUBTYPE_RGB8; req_mt.formattype = FORMAT_VideoInfo; hr = IPin_QueryAccept(sink, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_QueryAccept(source, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.bTemporalCompression = TRUE; hr = IPin_QueryAccept(source, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&mt, 0, sizeof(AM_MEDIA_TYPE)); mt.majortype = MEDIATYPE_Midi; hr = ISampleGrabber_SetMediaType(grabber, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryAccept(source, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Midi; req_mt.bTemporalCompression = FALSE; hr = IPin_QueryAccept(source, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
req_mt.bTemporalCompression = TRUE; hr = IPin_QueryAccept(source, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&mt, 0, sizeof(AM_MEDIA_TYPE)); hr = ISampleGrabber_SetMediaType(grabber, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test source connection. */
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(source, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
/* Exact connection. */
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
req_mt.bTemporalCompression = FALSE; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
req_mt.bTemporalCompression = TRUE; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(source, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsink.sink.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n"); @@ -1147,27 +1147,27 @@ static void test_connect_pin(void) test_streaming_events(control, sink, input, &testsink);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsink.sink.pin.peer == source, "Got peer %p.\n", testsink.sink.pin.peer); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
/* Connection with wildcards. */
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
testsource.source_mt.bTemporalCompression = TRUE; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &testsource.source_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); @@ -1176,7 +1176,7 @@ static void test_connect_pin(void) req_mt.majortype = GUID_NULL; req_mt.bTemporalCompression = FALSE; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &testsource.source_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); @@ -1184,11 +1184,11 @@ static void test_connect_pin(void)
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &testsource.source_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); @@ -1196,13 +1196,13 @@ static void test_connect_pin(void)
req_mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Video; req_mt.subtype = MEDIASUBTYPE_RGB8; req_mt.formattype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &testsource.source_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); @@ -1210,11 +1210,11 @@ static void test_connect_pin(void)
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &testsource.source_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); @@ -1222,12 +1222,12 @@ static void test_connect_pin(void)
req_mt.majortype = MEDIATYPE_Audio; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
testsource.source_mt.majortype = testsource.source_mt.subtype = testsource.source_mt.formattype = GUID_NULL; req_mt.majortype = req_mt.subtype = req_mt.formattype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &testsource.source_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); @@ -1235,17 +1235,17 @@ static void test_connect_pin(void)
req_mt.majortype = MEDIATYPE_Video; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr); req_mt.majortype = GUID_NULL;
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr); req_mt.subtype = GUID_NULL;
req_mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr); req_mt.formattype = GUID_NULL;
/* Test enumeration of sink media types. */ @@ -1253,20 +1253,20 @@ static void test_connect_pin(void) testsink.sink_mt = &req_mt; req_mt.majortype = MEDIATYPE_Audio; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr); req_mt.majortype = GUID_NULL;
req_mt.bTemporalCompression = TRUE; req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &testsink.sink.pin.mt), "Media types didn't match.\n");
hr = IPin_EnumMediaTypes(sink, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(pmt, testsink.sink_mt), "Media types didn't match.\n"); IEnumMediaTypes_Release(enummt);
@@ -1274,33 +1274,33 @@ static void test_connect_pin(void) IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsource.source.pin.peer == sink, "Got peer %p.\n", testsource.source.pin.peer); IFilterGraph2_Disconnect(graph, &testsource.source.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(sink, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
IMemInputPin_Release(input); IPin_Release(sink); IPin_Release(source); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ISampleGrabber_Release(grabber); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsource.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(samplegrabber) @@ -1314,7 +1314,7 @@ START_TEST(samplegrabber) &IID_IBaseFilter, (void **)&filter))) { /* qedit.dll does not exist on 2003. */ - win_skip("Failed to create sample grabber filter, hr %#x.\n", hr); + win_skip("Failed to create sample grabber filter, hr %#lx.\n", hr); return; } IBaseFilter_Release(filter); diff --git a/dlls/qedit/tests/timeline.c b/dlls/qedit/tests/timeline.c index 0d01d519fd9..8678df2236c 100644 --- a/dlls/qedit/tests/timeline.c +++ b/dlls/qedit/tests/timeline.c @@ -74,53 +74,53 @@ static void test_aggregation(void) timeline = (IAMTimeline *)0xdeadbeef; hr = CoCreateInstance(&CLSID_AMTimeline, &test_outer, CLSCTX_INPROC_SERVER, &IID_IAMTimeline, (void **)&timeline); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!timeline, "Got interface %p.\n", timeline);
hr = CoCreateInstance(&CLSID_AMTimeline, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IAMTimeline, (void **)&timeline); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAMTimeline_QueryInterface(timeline, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimeline, (void **)&timeline2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(timeline2 == (IAMTimeline *)0xdeadbeef, "Got unexpected IAMTimeline %p.\n", timeline2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IAMTimeline_QueryInterface(timeline, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IAMTimeline_Release(timeline); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_timeline(void) @@ -133,21 +133,21 @@ static void test_timeline(void) TIMELINE_MAJOR_TYPE type;
hr = CoCreateInstance(&CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER, &IID_IAMTimeline, (void **)&timeline); - ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "CoCreateInstance failed: %08x\n", hr); + ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "CoCreateInstance failed: %08lx\n", hr); if (!timeline) return;
hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimelineObj, NULL); - ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER got %08lx\n", hr);
hr = IAMTimeline_QueryInterface(timeline, &IID_IAMTimelineObj, (void **)&obj); - ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr); + ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08lx\n", hr); ok(!obj, "Expected NULL got %p\n", obj);
hr = IAMTimeline_CreateEmptyNode(timeline, NULL, 0); - ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER got %08lx\n", hr);
hr = IAMTimeline_CreateEmptyNode(timeline, NULL, TIMELINE_MAJOR_TYPE_COMPOSITE); - ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER got %08lx\n", hr);
for (type = 0; type < 256; type++) { @@ -161,49 +161,49 @@ static void test_timeline(void) case TIMELINE_MAJOR_TYPE_TRANSITION: case TIMELINE_MAJOR_TYPE_EFFECT: case TIMELINE_MAJOR_TYPE_GROUP: - ok(hr == S_OK, "CreateEmptyNode failed: %08x\n", hr); + ok(hr == S_OK, "CreateEmptyNode failed: %08lx\n", hr); if (obj != &obj_iface) IAMTimelineObj_Release(obj); break; default: - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG got %08lx\n", hr); ok(obj == &obj_iface, "Expected %p got %p\n", &obj_iface, obj); } }
obj = NULL; hr = IAMTimeline_CreateEmptyNode(timeline, &obj, TIMELINE_MAJOR_TYPE_COMPOSITE); - ok(hr == S_OK, "CreateEmptyNode failed: %08x\n", hr); + ok(hr == S_OK, "CreateEmptyNode failed: %08lx\n", hr); if (!obj) return;
hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimeline, NULL); - ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER got %08lx\n", hr);
hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimeline, (void **)&timeline2); - ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr); + ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08lx\n", hr); ok(!timeline2, "Expected NULL got %p\n", timeline2);
hr = IAMTimelineObj_GetTimelineType(obj, NULL); - ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER got %08lx\n", hr);
hr = IAMTimelineObj_GetTimelineType(obj, &type); - ok(hr == S_OK, "GetTimelineType failed: %08x\n", hr); + ok(hr == S_OK, "GetTimelineType failed: %08lx\n", hr); ok(type == TIMELINE_MAJOR_TYPE_COMPOSITE, "Expected TIMELINE_MAJOR_TYPE_COMPOSITE got %d\n", type);
for (type = 0; type < 256; type++) { hr = IAMTimelineObj_SetTimelineType(obj, type); if (type == TIMELINE_MAJOR_TYPE_COMPOSITE) - ok(hr == S_OK, "SetTimelineType failed: %08x\n", hr); + ok(hr == S_OK, "SetTimelineType failed: %08lx\n", hr); else - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG got %08x\n", hr); + ok(hr == E_INVALIDARG, "Expected E_INVALIDARG got %08lx\n", hr); }
hr = IAMTimelineObj_GetTimelineNoRef(obj, NULL); - ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr); + ok(hr == E_POINTER, "Expected E_POINTER got %08lx\n", hr);
timeline2 = (IAMTimeline *)0xdeadbeef; hr = IAMTimelineObj_GetTimelineNoRef(obj, &timeline2); - ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr); + ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08lx\n", hr); ok(!timeline2, "Expected NULL got %p\n", timeline2);
IAMTimelineObj_Release(obj); @@ -217,22 +217,22 @@ static void test_timelineobj_interfaces(void) IAMTimelineObj *obj;
hr = CoCreateInstance(&CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER, &IID_IAMTimeline, (void **)&timeline); - ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "CoCreateInstance failed: %08x\n", hr); + ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "CoCreateInstance failed: %08lx\n", hr); if (!timeline) return;
hr = IAMTimeline_CreateEmptyNode(timeline, &obj, TIMELINE_MAJOR_TYPE_GROUP); - ok(hr == S_OK, "CreateEmptyNode failed: %08x\n", hr); + ok(hr == S_OK, "CreateEmptyNode failed: %08lx\n", hr); if(hr == S_OK) { IAMTimelineGroup *group; IAMTimelineObj *obj2;
hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimelineGroup, (void **)&group); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr);
hr = IAMTimelineGroup_QueryInterface(group, &IID_IAMTimelineObj, (void **)&obj2); - ok(hr == S_OK, "got %08x\n", hr); + ok(hr == S_OK, "got %08lx\n", hr); ok(obj == obj2, "Different pointers\n"); IAMTimelineObj_Release(obj2);
@@ -255,7 +255,7 @@ START_TEST(timeline) &IID_IAMTimeline, (void **)&timeline))) { /* qedit.dll does not exist on 2003. */ - win_skip("Failed to create timeline object, hr %#x.\n", hr); + win_skip("Failed to create timeline object, hr %#lx.\n", hr); return; } IAMTimeline_Release(timeline);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/qmgr/tests/Makefile.in | 1 dlls/qmgr/tests/enum_files.c | 32 +++++------ dlls/qmgr/tests/enum_jobs.c | 34 ++++++----- dlls/qmgr/tests/file.c | 6 +- dlls/qmgr/tests/job.c | 128 +++++++++++++++++++++--------------------- dlls/qmgr/tests/qmgr.c | 20 +++---- 6 files changed, 110 insertions(+), 111 deletions(-)
diff --git a/dlls/qmgr/tests/Makefile.in b/dlls/qmgr/tests/Makefile.in index 19dcab624aa..2bf92a94019 100644 --- a/dlls/qmgr/tests/Makefile.in +++ b/dlls/qmgr/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = qmgr.dll IMPORTS = uuid ole32 shlwapi user32
diff --git a/dlls/qmgr/tests/enum_files.c b/dlls/qmgr/tests/enum_files.c index 9e1a665ac53..1ca0fcd8448 100644 --- a/dlls/qmgr/tests/enum_files.c +++ b/dlls/qmgr/tests/enum_files.c @@ -135,7 +135,7 @@ static void test_GetCount(void) ULONG fileCount;
hres = IEnumBackgroundCopyFiles_GetCount(test_enumFiles, &fileCount); - ok(hres == S_OK, "GetCount failed: %08x\n", hres); + ok(hres == S_OK, "GetCount failed: %08lx\n", hres); ok(fileCount == test_fileCount, "Got incorrect count\n"); }
@@ -150,13 +150,13 @@ static void test_Next_walkListNull(void) for (i = 0; i < test_fileCount; i++) { hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, NULL); - ok(hres == S_OK, "Next failed: %08x\n", hres); + ok(hres == S_OK, "Next failed: %08lx\n", hres); IBackgroundCopyFile_Release(file); }
/* Attempt to fetch one more than the number of available files */ hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, NULL); - ok(hres == S_FALSE, "Next off end of available files failed: %08x\n", hres); + ok(hres == S_FALSE, "Next off end of available files failed: %08lx\n", hres); }
/* Test Next by requesting one file at a time */ @@ -173,8 +173,8 @@ static void test_Next_walkList_1(void) file = NULL; fetched = 0; hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, &fetched); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetched == 1, "Next returned the incorrect number of files: %08x\n", hres); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(fetched == 1, "Next returned the incorrect number of files: %08lx\n", hres); ok(file != NULL, "Next returned NULL\n"); if (file) IBackgroundCopyFile_Release(file); @@ -183,8 +183,8 @@ static void test_Next_walkList_1(void) /* Attempt to fetch one more than the number of available files */ fetched = 0; hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 1, &file, &fetched); - ok(hres == S_FALSE, "Next off end of available files failed: %08x\n", hres); - ok(fetched == 0, "Next returned the incorrect number of files: %08x\n", hres); + ok(hres == S_FALSE, "Next off end of available files failed: %08lx\n", hres); + ok(fetched == 0, "Next returned the incorrect number of files: %08lx\n", hres); }
/* Test Next by requesting multiple files at a time */ @@ -200,8 +200,8 @@ static void test_Next_walkList_2(void)
fetched = 0; hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, test_fileCount, files, &fetched); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetched == test_fileCount, "Next returned the incorrect number of files: %08x\n", hres); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(fetched == test_fileCount, "Next returned the incorrect number of files: %08lx\n", hres);
for (i = 0; i < test_fileCount; i++) { @@ -219,7 +219,7 @@ static void test_Next_errors(void)
/* E_INVALIDARG: pceltFetched can ONLY be NULL if celt is 1 */ hres = IEnumBackgroundCopyFiles_Next(test_enumFiles, 2, files, NULL); - ok(hres == E_INVALIDARG, "Invalid call to Next succeeded: %08x\n", hres); + ok(hres == E_INVALIDARG, "Invalid call to Next succeeded: %08lx\n", hres); }
/* Test skipping through the files in a list */ @@ -231,11 +231,11 @@ static void test_Skip_walkList(void) for (i = 0; i < test_fileCount; i++) { hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, 1); - ok(hres == S_OK, "Skip failed: %08x\n", hres); + ok(hres == S_OK, "Skip failed: %08lx\n", hres); }
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, 1); - ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres); + ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres); }
/* Test skipping off the end of the list */ @@ -244,7 +244,7 @@ static void test_Skip_offEnd(void) HRESULT hres;
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount + 1); - ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres); + ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres); }
/* Test resetting the file enumerator */ @@ -253,11 +253,11 @@ static void test_Reset(void) HRESULT hres;
hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount); - ok(hres == S_OK, "Skip failed: %08x\n", hres); + ok(hres == S_OK, "Skip failed: %08lx\n", hres); hres = IEnumBackgroundCopyFiles_Reset(test_enumFiles); - ok(hres == S_OK, "Reset failed: %08x\n", hres); + ok(hres == S_OK, "Reset failed: %08lx\n", hres); hres = IEnumBackgroundCopyFiles_Skip(test_enumFiles, test_fileCount); - ok(hres == S_OK, "Reset failed: %08x\n", hres); + ok(hres == S_OK, "Reset failed: %08lx\n", hres); }
typedef void (*test_t)(void); diff --git a/dlls/qmgr/tests/enum_jobs.c b/dlls/qmgr/tests/enum_jobs.c index 81df72e2e69..152e0382348 100644 --- a/dlls/qmgr/tests/enum_jobs.c +++ b/dlls/qmgr/tests/enum_jobs.c @@ -108,10 +108,10 @@ static void test_GetCount(void) ULONG jobCountA, jobCountB;
hres = IEnumBackgroundCopyJobs_GetCount(test_enumJobsA, &jobCountA); - ok(hres == S_OK, "GetCount failed: %08x\n", hres); + ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
hres = IEnumBackgroundCopyJobs_GetCount(test_enumJobsB, &jobCountB); - ok(hres == S_OK, "GetCount failed: %08x\n", hres); + ok(hres == S_OK, "GetCount failed: %08lx\n", hres);
ok(jobCountB == jobCountA + 1, "Got incorrect count\n"); } @@ -127,13 +127,13 @@ static void test_Next_walkListNull(void) for (i = 0; i < test_jobCountB; i++) { hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, NULL); - ok(hres == S_OK, "Next failed: %08x\n", hres); + ok(hres == S_OK, "Next failed: %08lx\n", hres); IBackgroundCopyJob_Release(job); }
/* Attempt to fetch one more than the number of available jobs */ hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, NULL); - ok(hres == S_FALSE, "Next off end of available jobs failed: %08x\n", hres); + ok(hres == S_FALSE, "Next off end of available jobs failed: %08lx\n", hres); }
/* Test Next */ @@ -149,16 +149,16 @@ static void test_Next_walkList_1(void) { fetched = 0; hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, &fetched); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetched == 1, "Next returned the incorrect number of jobs: %08x\n", hres); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(fetched == 1, "Next returned the incorrect number of jobs: %08lx\n", hres); IBackgroundCopyJob_Release(job); }
/* Attempt to fetch one more than the number of available jobs */ fetched = 0; hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 1, &job, &fetched); - ok(hres == S_FALSE, "Next off end of available jobs failed: %08x\n", hres); - ok(fetched == 0, "Next returned the incorrect number of jobs: %08x\n", hres); + ok(hres == S_FALSE, "Next off end of available jobs failed: %08lx\n", hres); + ok(fetched == 0, "Next returned the incorrect number of jobs: %08lx\n", hres); }
/* Test Next by requesting multiple files at a time */ @@ -175,8 +175,8 @@ static void test_Next_walkList_2(void)
fetched = 0; hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, test_jobCountB, jobs, &fetched); - ok(hres == S_OK, "Next failed: %08x\n", hres); - ok(fetched == test_jobCountB, "Next returned the incorrect number of jobs: %08x\n", hres); + ok(hres == S_OK, "Next failed: %08lx\n", hres); + ok(fetched == test_jobCountB, "Next returned the incorrect number of jobs: %08lx\n", hres);
for (i = 0; i < test_jobCountB; i++) { @@ -196,7 +196,7 @@ static void test_Next_errors(void)
/* E_INVALIDARG: pceltFetched can ONLY be NULL if celt is 1 */ hres = IEnumBackgroundCopyJobs_Next(test_enumJobsB, 2, jobs, NULL); - ok(hres != S_OK, "Invalid call to Next succeeded: %08x\n", hres); + ok(hres != S_OK, "Invalid call to Next succeeded: %08lx\n", hres); }
/* Test skipping through the jobs in a list */ @@ -208,11 +208,11 @@ static void test_Skip_walkList(void) for (i = 0; i < test_jobCountB; i++) { hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, 1); - ok(hres == S_OK, "Skip failed: %08x\n", hres); + ok(hres == S_OK, "Skip failed: %08lx\n", hres); }
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, 1); - ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres); + ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres); }
/* Test skipping off the end of the list */ @@ -221,7 +221,7 @@ static void test_Skip_offEnd(void) HRESULT hres;
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB + 1); - ok(hres == S_FALSE, "Skip expected end of list: %08x\n", hres); + ok(hres == S_FALSE, "Skip expected end of list: %08lx\n", hres); }
/* Test reset */ @@ -230,13 +230,13 @@ static void test_Reset(void) HRESULT hres;
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB); - ok(hres == S_OK, "Skip failed: %08x\n", hres); + ok(hres == S_OK, "Skip failed: %08lx\n", hres);
hres = IEnumBackgroundCopyJobs_Reset(test_enumJobsB); - ok(hres == S_OK, "Reset failed: %08x\n", hres); + ok(hres == S_OK, "Reset failed: %08lx\n", hres);
hres = IEnumBackgroundCopyJobs_Skip(test_enumJobsB, test_jobCountB); - ok(hres == S_OK, "Reset failed: %08x\n", hres); + ok(hres == S_OK, "Reset failed: %08lx\n", hres); }
typedef void (*test_t)(void); diff --git a/dlls/qmgr/tests/file.c b/dlls/qmgr/tests/file.c index cb5ba5fbe37..501fddc8d7a 100644 --- a/dlls/qmgr/tests/file.c +++ b/dlls/qmgr/tests/file.c @@ -147,7 +147,7 @@ static void test_GetRemoteName(void) LPWSTR name;
hres = IBackgroundCopyFile_GetRemoteName(test_file, &name); - ok(hres == S_OK, "GetRemoteName failed: %08x\n", hres); + ok(hres == S_OK, "GetRemoteName failed: %08lx\n", hres); ok(lstrcmpW(name, test_remoteUrl) == 0, "Got incorrect remote name\n"); CoTaskMemFree(name); } @@ -159,7 +159,7 @@ static void test_GetLocalName(void) LPWSTR name;
hres = IBackgroundCopyFile_GetLocalName(test_file, &name); - ok(hres == S_OK, "GetLocalName failed: %08x\n", hres); + ok(hres == S_OK, "GetLocalName failed: %08lx\n", hres); ok(lstrcmpW(name, test_localFile) == 0, "Got incorrect local name\n"); CoTaskMemFree(name); } @@ -171,7 +171,7 @@ static void test_GetProgress_PreTransfer(void) BG_FILE_PROGRESS progress;
hres = IBackgroundCopyFile_GetProgress(test_file, &progress); - ok(hres == S_OK, "GetProgress failed: %08x\n", hres); + ok(hres == S_OK, "GetProgress failed: %08lx\n", hres); ok(progress.BytesTotal == BG_SIZE_UNKNOWN, "Got incorrect total size: %s\n", wine_dbgstr_longlong(progress.BytesTotal)); ok(progress.BytesTransferred == 0, "Got incorrect number of transferred bytes: %s\n", diff --git a/dlls/qmgr/tests/job.c b/dlls/qmgr/tests/job.c index edf1ef7e592..c106014bcfe 100644 --- a/dlls/qmgr/tests/job.c +++ b/dlls/qmgr/tests/job.c @@ -80,7 +80,7 @@ static ULONG WINAPI IBackgroundCopyCallback2Impl_AddRef(IBackgroundCopyCallback2 IBackgroundCopyCallback2Impl *This = impl_from_IBackgroundCopyCallback2(iface); ULONG ref = InterlockedIncrement(&This->ref);
- trace("IBackgroundCopyCallback2Impl_AddRef called (%p, ref = %d)\n", This, ref); + trace("IBackgroundCopyCallback2Impl_AddRef called (%p, ref = %ld)\n", This, ref); return ref; }
@@ -89,7 +89,7 @@ static ULONG WINAPI IBackgroundCopyCallback2Impl_Release(IBackgroundCopyCallback IBackgroundCopyCallback2Impl *This = impl_from_IBackgroundCopyCallback2(iface); ULONG ref = InterlockedDecrement(&This->ref);
- trace("IBackgroundCopyCallback2Impl_Release called (%p, ref = %d)\n", This, ref); + trace("IBackgroundCopyCallback2Impl_Release called (%p, ref = %ld)\n", This, ref);
if (ref == 0) { @@ -230,7 +230,7 @@ static BOOL setup(void) workaround is only applied on Windows 10, so it's fine if this fails. */ if (SUCCEEDED(hres)) { hres = IBackgroundCopyJob5_SetProperty(test_job_5, BITS_JOB_PROPERTY_ID_COST_FLAGS, prop_val); - ok(hres == S_OK, "Failed to set the cost flags: %08x\n", hres); + ok(hres == S_OK, "Failed to set the cost flags: %08lx\n", hres); IBackgroundCopyJob5_Release(test_job_5); }
@@ -317,7 +317,7 @@ static void test_GetId(void) GUID tmpId;
hres = IBackgroundCopyJob_GetId(test_job, &tmpId); - ok(hres == S_OK, "GetId failed: %08x\n", hres); + ok(hres == S_OK, "GetId failed: %08lx\n", hres); ok(memcmp(&tmpId, &test_jobId, sizeof tmpId) == 0, "Got incorrect GUID\n"); }
@@ -328,7 +328,7 @@ static void test_GetType(void) BG_JOB_TYPE type;
hres = IBackgroundCopyJob_GetType(test_job, &type); - ok(hres == S_OK, "GetType failed: %08x\n", hres); + ok(hres == S_OK, "GetType failed: %08lx\n", hres); ok(type == test_type, "Got incorrect type\n"); }
@@ -339,7 +339,7 @@ static void test_GetName(void) LPWSTR displayName;
hres = IBackgroundCopyJob_GetDisplayName(test_job, &displayName); - ok(hres == S_OK, "GetName failed: %08x\n", hres); + ok(hres == S_OK, "GetName failed: %08lx\n", hres); ok(lstrcmpW(displayName, L"Test") == 0, "Got incorrect type\n"); CoTaskMemFree(displayName); } @@ -351,11 +351,11 @@ static void test_AddFile(void)
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA, test_localPathA); - ok(hres == S_OK, "First call to AddFile failed: 0x%08x\n", hres); + ok(hres == S_OK, "First call to AddFile failed: 0x%08lx\n", hres);
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathB, test_localPathB); - ok(hres == S_OK, "Second call to AddFile failed: 0x%08x\n", hres); + ok(hres == S_OK, "Second call to AddFile failed: 0x%08lx\n", hres); }
/* Test adding a set of files */ @@ -368,7 +368,7 @@ static void test_AddFileSet(void) {test_remotePathB, test_localPathB} }; hres = IBackgroundCopyJob_AddFileSet(test_job, 2, files); - ok(hres == S_OK, "AddFileSet failed: 0x%08x\n", hres); + ok(hres == S_OK, "AddFileSet failed: 0x%08lx\n", hres); }
/* Test creation of a job enumerator */ @@ -380,13 +380,13 @@ static void test_EnumFiles(void)
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA, test_localPathA); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_EnumFiles(test_job, &enumFiles); - ok(hres == S_OK, "EnumFiles failed: 0x%08x\n", hres); + ok(hres == S_OK, "EnumFiles failed: 0x%08lx\n", hres);
res = IEnumBackgroundCopyFiles_Release(enumFiles); - ok(res == 0, "Bad ref count on release: %u\n", res); + ok(res == 0, "Bad ref count on release: %lu\n", res); }
/* Test getting job progress */ @@ -396,14 +396,14 @@ static void test_GetProgress_preTransfer(void) BG_JOB_PROGRESS progress;
hres = IBackgroundCopyJob_GetProgress(test_job, &progress); - ok(hres == S_OK, "GetProgress failed: 0x%08x\n", hres); + ok(hres == S_OK, "GetProgress failed: 0x%08lx\n", hres);
ok(progress.BytesTotal == 0, "Incorrect BytesTotal: %s\n", wine_dbgstr_longlong(progress.BytesTotal)); ok(progress.BytesTransferred == 0, "Incorrect BytesTransferred: %s\n", wine_dbgstr_longlong(progress.BytesTransferred)); - ok(progress.FilesTotal == 0, "Incorrect FilesTotal: %u\n", progress.FilesTotal); - ok(progress.FilesTransferred == 0, "Incorrect FilesTransferred %u\n", progress.FilesTransferred); + ok(progress.FilesTotal == 0, "Incorrect FilesTotal: %lu\n", progress.FilesTotal); + ok(progress.FilesTransferred == 0, "Incorrect FilesTransferred %lu\n", progress.FilesTransferred); }
/* Test getting job state */ @@ -414,7 +414,7 @@ static void test_GetState(void)
state = BG_JOB_STATE_ERROR; hres = IBackgroundCopyJob_GetState(test_job, &state); - ok(hres == S_OK, "GetState failed: 0x%08x\n", hres); + ok(hres == S_OK, "GetState failed: 0x%08lx\n", hres); ok(state == BG_JOB_STATE_SUSPENDED, "Incorrect job state: %d\n", state); }
@@ -425,11 +425,11 @@ static void test_ResumeEmpty(void) BG_JOB_STATE state;
hres = IBackgroundCopyJob_Resume(test_job); - ok(hres == BG_E_EMPTY, "Resume failed to return BG_E_EMPTY error: 0x%08x\n", hres); + ok(hres == BG_E_EMPTY, "Resume failed to return BG_E_EMPTY error: 0x%08lx\n", hres);
state = BG_JOB_STATE_ERROR; hres = IBackgroundCopyJob_GetState(test_job, &state); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres); ok(state == BG_JOB_STATE_SUSPENDED, "Incorrect job state: %d\n", state); }
@@ -486,26 +486,26 @@ static void handle_job_err(void) if (SUCCEEDED(hres)) { hres = IBackgroundCopyError_GetError(err, &errContext, &errCode); if (SUCCEEDED(hres)) { - ok(0, "Got context: %d code: %d\n", errContext, errCode); + ok(0, "Got context: %d code: %ld\n", errContext, errCode); } else { - ok(0, "Failed to get error info: 0x%08x\n", hres); + ok(0, "Failed to get error info: 0x%08lx\n", hres); }
hres = IBackgroundCopyError_GetErrorContextDescription(err, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), &contextDesc); if (SUCCEEDED(hres)) { ok(0, "Got context desc: %s\n", wine_dbgstr_w(contextDesc)); } else { - ok(0, "Failed to get context desc: 0x%08x\n", hres); + ok(0, "Failed to get context desc: 0x%08lx\n", hres); }
hres = IBackgroundCopyError_GetErrorDescription(err, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), &errDesc); if (SUCCEEDED(hres)) { ok(0, "Got error desc: %s\n", wine_dbgstr_w(errDesc)); } else { - ok(0, "Failed to get error desc: 0x%08x\n", hres); + ok(0, "Failed to get error desc: 0x%08lx\n", hres); } } else { - ok(0, "Failed to get error: 0x%08x\n", hres); + ok(0, "Failed to get error: 0x%08lx\n", hres); } }
@@ -524,11 +524,11 @@ static void test_CompleteLocal(void)
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathA, test_localPathA); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_AddFile(test_job, test_remotePathB, test_localPathB); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_Resume(test_job); ok(hres == S_OK, "IBackgroundCopyJob_Resume\n"); @@ -603,10 +603,10 @@ static void test_CompleteLocalURL(void) lstrcatW(urlB, test_remotePathB);
hres = IBackgroundCopyJob_AddFile(test_job, urlA, test_localPathA); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_AddFile(test_job, urlB, test_localPathB); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyJob_Resume(test_job); ok(hres == S_OK, "IBackgroundCopyJob_Resume\n"); @@ -661,8 +661,8 @@ static void test_NotifyFlags(void) /* check default flags */ flags = 0; hr = IBackgroundCopyJob_GetNotifyFlags(test_job, &flags); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(flags == (BG_NOTIFY_JOB_ERROR | BG_NOTIFY_JOB_TRANSFERRED), "flags 0x%08x\n", flags); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(flags == (BG_NOTIFY_JOB_ERROR | BG_NOTIFY_JOB_TRANSFERRED), "flags 0x%08lx\n", flags); }
static void test_NotifyInterface(void) @@ -672,7 +672,7 @@ static void test_NotifyInterface(void)
unk = (IUnknown*)0xdeadbeef; hr = IBackgroundCopyJob_GetNotifyInterface(test_job, &unk); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(unk == NULL, "got %p\n", unk); }
@@ -683,19 +683,19 @@ static void test_Cancel(void)
state = BG_JOB_STATE_ERROR; hr = IBackgroundCopyJob_GetState(test_job, &state); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(state != BG_JOB_STATE_CANCELLED, "got %u\n", state);
hr = IBackgroundCopyJob_Cancel(test_job); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
state = BG_JOB_STATE_ERROR; hr = IBackgroundCopyJob_GetState(test_job, &state); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(state == BG_JOB_STATE_CANCELLED, "got %u\n", state);
hr = IBackgroundCopyJob_Cancel(test_job); - ok(hr == BG_E_INVALID_STATE, "got 0x%08x\n", hr); + ok(hr == BG_E_INVALID_STATE, "got 0x%08lx\n", hr); }
static void test_HttpOptions(void) @@ -715,35 +715,35 @@ static void test_HttpOptions(void) ok(create_background_copy_callback2(©Callback) == TRUE, "create_background_copy_callback2 failed\n");
hr = IBackgroundCopyCallback2_QueryInterface(copyCallback, &IID_IUnknown, (LPVOID*)©CallbackUnknown); - ok(hr == S_OK,"IBackgroundCopyCallback_QueryInterface(IID_IUnknown) failed: %08x\n", hr); + ok(hr == S_OK,"IBackgroundCopyCallback_QueryInterface(IID_IUnknown) failed: %08lx\n", hr);
hr = IBackgroundCopyJob_SetNotifyInterface(test_job, copyCallbackUnknown); - ok(hr == S_OK,"IBackgroundCopyCallback_SetNotifyInterface failed: %08x\n", hr); + ok(hr == S_OK,"IBackgroundCopyCallback_SetNotifyInterface failed: %08lx\n", hr);
hr = IBackgroundCopyJob_SetNotifyFlags(test_job, BG_NOTIFY_JOB_TRANSFERRED | BG_NOTIFY_JOB_ERROR | BG_NOTIFY_DISABLE | BG_NOTIFY_JOB_MODIFICATION | BG_NOTIFY_FILE_TRANSFERRED); - ok(hr == S_OK,"IBackgroundCopyCallback_SetNotifyFlags failed: %08x\n", hr); + ok(hr == S_OK,"IBackgroundCopyCallback_SetNotifyFlags failed: %08lx\n", hr);
DeleteFileW(test_localPathA); hr = IBackgroundCopyJob_AddFile(test_job, L"http://test.winehq.org/", test_localPathA); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IBackgroundCopyJob_QueryInterface(test_job, &IID_IBackgroundCopyJobHttpOptions, (void **)&options); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
if (options) { headers = (WCHAR *)0xdeadbeef; hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); ok(headers == NULL, "got %p\n", headers);
hr = IBackgroundCopyJobHttpOptions_SetCustomHeaders(options, winetestW); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
headers = (WCHAR *)0xdeadbeef; hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); if (hr == S_OK) { ok(!lstrcmpW(headers, winetestW), "got %s\n", wine_dbgstr_w(headers)); @@ -751,34 +751,34 @@ static void test_HttpOptions(void) }
hr = IBackgroundCopyJobHttpOptions_SetCustomHeaders(options, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
headers = (WCHAR *)0xdeadbeef; hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); ok(headers == NULL, "got %p\n", headers);
orig_flags = 0xdeadbeef; hr = IBackgroundCopyJobHttpOptions_GetSecurityFlags(options, &orig_flags); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(!orig_flags, "got 0x%08x\n", orig_flags); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(!orig_flags, "got 0x%08lx\n", orig_flags);
hr = IBackgroundCopyJobHttpOptions_SetSecurityFlags(options, 0); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
flags = 0xdeadbeef; hr = IBackgroundCopyJobHttpOptions_GetSecurityFlags(options, &flags); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(!flags, "got 0x%08x\n", flags); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(!flags, "got 0x%08lx\n", flags); }
hr = IBackgroundCopyJob_Resume(test_job); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
for (i = 0; i < timeout; i++) { hr = IBackgroundCopyJob_GetState(test_job, &state); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
ok(state == BG_JOB_STATE_QUEUED || state == BG_JOB_STATE_CONNECTING || @@ -803,47 +803,47 @@ static void test_HttpOptions(void) if (i < timeout) { hr = IBackgroundCopyJob_GetError(test_job, &error); - ok(hr == BG_E_ERROR_INFORMATION_UNAVAILABLE, "got 0x%08x\n", hr); + ok(hr == BG_E_ERROR_INFORMATION_UNAVAILABLE, "got 0x%08lx\n", hr); }
if (options) { headers = (WCHAR *)0xdeadbeef; hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr); ok(headers == NULL, "got %p\n", headers);
hr = IBackgroundCopyJobHttpOptions_SetCustomHeaders(options, NULL); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IBackgroundCopyJobHttpOptions_GetCustomHeaders(options, &headers); - ok(hr == S_FALSE, "got 0x%08x\n", hr); + ok(hr == S_FALSE, "got 0x%08lx\n", hr);
flags = 0xdeadbeef; hr = IBackgroundCopyJobHttpOptions_GetSecurityFlags(options, &flags); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(!flags, "got 0x%08x\n", flags); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(!flags, "got 0x%08lx\n", flags);
hr = IBackgroundCopyJobHttpOptions_SetSecurityFlags(options, orig_flags); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
IBackgroundCopyJobHttpOptions_Release(options); }
hr = IBackgroundCopyJob_Complete(test_job); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IBackgroundCopyJob_GetState(test_job, &state); - ok(hr == S_OK, "got 0x%08x\n", hr); + ok(hr == S_OK, "got 0x%08lx\n", hr); ok(state == BG_JOB_STATE_ACKNOWLEDGED, "unexpected state: %u\n", state);
hr = IBackgroundCopyJob_Complete(test_job); - ok(hr == BG_E_INVALID_STATE, "got 0x%08x\n", hr); + ok(hr == BG_E_INVALID_STATE, "got 0x%08lx\n", hr);
DeleteFileW(test_localPathA);
hr = IBackgroundCopyJob_SetNotifyInterface(test_job, NULL); - ok(hr == BG_E_INVALID_STATE, "got 0x%08x\n", hr); + ok(hr == BG_E_INVALID_STATE, "got 0x%08lx\n", hr);
IUnknown_Release(copyCallbackUnknown); IBackgroundCopyCallback2_Release(copyCallback); @@ -888,7 +888,7 @@ START_TEST(job) */ hres = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); if (FAILED(hres)) { - ok(0, "CoInitializeEx failed: %0x\n", hres); + ok(0, "CoInitializeEx failed: %0lx\n", hres); return; }
@@ -897,7 +897,7 @@ START_TEST(job) RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, 0); if (FAILED(hres)) { - ok(0, "CoInitializeSecurity failed: %0x\n", hres); + ok(0, "CoInitializeSecurity failed: %0lx\n", hres); return; }
diff --git a/dlls/qmgr/tests/qmgr.c b/dlls/qmgr/tests/qmgr.c index bb238150aca..f032f577781 100644 --- a/dlls/qmgr/tests/qmgr.c +++ b/dlls/qmgr/tests/qmgr.c @@ -60,14 +60,14 @@ static void test_CreateJob(void) hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, (void **) &manager); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
/* Create bits job */ hres = IBackgroundCopyManager_CreateJob(manager, L"Test", BG_JOB_TYPE_DOWNLOAD, &tmpId, &job); - ok(hres == S_OK, "CreateJob failed: %08x\n", hres); + ok(hres == S_OK, "CreateJob failed: %08lx\n", hres);
res = IBackgroundCopyJob_Release(job); - ok(res == 0, "Bad ref count on release: %u\n", res); + ok(res == 0, "Bad ref count on release: %lu\n", res); IBackgroundCopyManager_Release(manager); }
@@ -84,13 +84,13 @@ static void test_EnumJobs(void) hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, (void **) &manager); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyManager_CreateJob(manager, L"Test", BG_JOB_TYPE_DOWNLOAD, &tmpId, &job); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IBackgroundCopyManager_EnumJobs(manager, 0, &enumJobs); - ok(hres == S_OK, "EnumJobs failed: %08x\n", hres); + ok(hres == S_OK, "EnumJobs failed: %08lx\n", hres); IEnumBackgroundCopyJobs_Release(enumJobs);
/* Tear down */ @@ -124,7 +124,7 @@ static void do_child(const char *secretA) hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, (void **) &manager); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
MultiByteToWideChar(CP_ACP, 0, secretA, -1, secretW, MAX_PATH); hres = IBackgroundCopyManager_CreateJob(manager, secretW, @@ -143,13 +143,13 @@ static void test_globalness(void) hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, (void **) &manager); - ok(hres == S_OK, "got 0x%08x\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
wsprintfW(secretName, L"test_%u", GetTickCount()); run_child(secretName);
hres = IBackgroundCopyManager_EnumJobs(manager, 0, &enumJobs); - ok(hres == S_OK, "EnumJobs failed: %08x\n", hres); + ok(hres == S_OK, "EnumJobs failed: %08lx\n", hres); if(hres != S_OK) skip("Unable to create job enumerator.\n"); else @@ -159,7 +159,7 @@ static void test_globalness(void) BOOL found = FALSE;
hres = IEnumBackgroundCopyJobs_GetCount(enumJobs, &n); - ok(hres == S_OK, "GetCount failed: %08x\n", hres); + ok(hres == S_OK, "GetCount failed: %08lx\n", hres); for (i = 0; i < n && !found; ++i) { LPWSTR name;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/quartz/tests/dsoundrender.c | 3 ++- dlls/quartz/tests/filtergraph.c | 2 +- dlls/quartz/tests/vmr9.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c index 03e6b8413d5..0e5c15bea14 100644 --- a/dlls/quartz/tests/dsoundrender.c +++ b/dlls/quartz/tests/dsoundrender.c @@ -451,7 +451,8 @@ static void test_basic_audio(void) ITypeInfo *typeinfo; IBasicAudio *audio; TYPEATTR *typeattr; - ULONG ref, count; + ULONG ref; + UINT count; HRESULT hr;
hr = IBaseFilter_QueryInterface(filter, &IID_IBasicAudio, (void **)&audio); diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 98f7b30717d..9cc08ce8577 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -2828,7 +2828,7 @@ static void test_control_delegation(void) IBasicVideo2 *video; ITypeInfo *typeinfo; TYPEATTR *typeattr; - ULONG count; + UINT count; HRESULT hr; LONG val;
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index a0ccb4898a9..45ec3313813 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -3975,11 +3975,11 @@ static void test_windowless_size(void) IVMRAspectRatioControl9 *aspect_ratio_control; IVMRWindowlessControl9 *windowless_control; IFilterGraph2 *graph = create_graph(); - VMR9AspectRatioMode aspect_mode; struct testfilter source; IMemAllocator *allocator; RECT src, dst, expect; IMemInputPin *input; + DWORD aspect_mode; HWND window; HRESULT hr; ULONG ref;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/quartz/tests/Makefile.in | 1 dlls/quartz/tests/acmwrapper.c | 196 ++-- dlls/quartz/tests/avidec.c | 506 +++++------ dlls/quartz/tests/avisplit.c | 576 ++++++------ dlls/quartz/tests/dsoundrender.c | 500 +++++------ dlls/quartz/tests/filesource.c | 496 +++++----- dlls/quartz/tests/filtergraph.c | 1752 +++++++++++++++++++------------------ dlls/quartz/tests/filtermapper.c | 120 +-- dlls/quartz/tests/memallocator.c | 358 ++++---- dlls/quartz/tests/mpegsplit.c | 626 +++++++------ dlls/quartz/tests/passthrough.c | 32 - dlls/quartz/tests/systemclock.c | 88 +- dlls/quartz/tests/videorenderer.c | 1216 +++++++++++++------------- dlls/quartz/tests/vmr7.c | 1314 ++++++++++++++-------------- dlls/quartz/tests/vmr9.c | 1688 ++++++++++++++++++------------------ dlls/quartz/tests/waveparser.c | 388 ++++---- 16 files changed, 4928 insertions(+), 4929 deletions(-)
diff --git a/dlls/quartz/tests/Makefile.in b/dlls/quartz/tests/Makefile.in index a47eec8bfd2..423abc78ef6 100644 --- a/dlls/quartz/tests/Makefile.in +++ b/dlls/quartz/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = quartz.dll IMPORTS = strmbase advapi32 d3d9 dsound msdmo msvfw32 ole32 oleaut32 user32 uuid winmm
diff --git a/dlls/quartz/tests/acmwrapper.c b/dlls/quartz/tests/acmwrapper.c index 8b9a472c0f3..564daa3a6f9 100644 --- a/dlls/quartz/tests/acmwrapper.c +++ b/dlls/quartz/tests/acmwrapper.c @@ -27,7 +27,7 @@ static IBaseFilter *create_acm_wrapper(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_ACMWrapper, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -48,7 +48,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); } @@ -148,53 +148,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_ACMWrapper, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_ACMWrapper, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -206,116 +206,116 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 3); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -327,36 +327,36 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins didn't match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins didn't match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"Input", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); hr = IBaseFilter_FindPin(filter, L"Output", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); hr = IBaseFilter_FindPin(filter, L"output pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -370,66 +370,66 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); todo_wine ok(!wcscmp(info.achName, L"Input"), "Got name %s.\n", debugstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(pin, &IID_IPin, TRUE); check_interface(pin, &IID_IMediaSeeking, TRUE);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); todo_wine ok(!wcscmp(info.achName, L"Output"), "Got name %s.\n", debugstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"Out"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_filter_state(void) @@ -440,53 +440,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(acmwrapper) diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index ac1078bf59b..12d8daf3872 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -35,7 +35,7 @@ static IBaseFilter *create_avi_dec(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_AVIDec, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -60,7 +60,7 @@ static LRESULT CALLBACK vfw_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg, static int in_begin;
if (winetest_debug > 1) - trace("id %#lx, driver %p, msg %#x, lparam1 %#lx, lparam2 %#lx.\n", + trace("id %#Ix, driver %p, msg %#x, lparam1 %#Ix, lparam2 %#Ix.\n", id, driver, msg, lparam1, lparam2);
switch (msg) @@ -143,18 +143,18 @@ static LRESULT CALLBACK vfw_driver_proc(DWORD_PTR id, HDRVR driver, UINT msg, ok(lparam2 == sizeof(ICDECOMPRESS), "Got size %Iu.\n", lparam2);
if (testmode == 5 || testmode == 6) - ok(params->dwFlags == ICDECOMPRESS_NOTKEYFRAME, "Got flags %#x.\n", params->dwFlags); + ok(params->dwFlags == ICDECOMPRESS_NOTKEYFRAME, "Got flags %#lx.\n", params->dwFlags); else if (testmode == 3) - ok(params->dwFlags == ICDECOMPRESS_PREROLL, "Got flags %#x.\n", params->dwFlags); + ok(params->dwFlags == ICDECOMPRESS_PREROLL, "Got flags %#lx.\n", params->dwFlags); else - ok(params->dwFlags == 0, "Got flags %#x.\n", params->dwFlags); + ok(params->dwFlags == 0, "Got flags %#lx.\n", params->dwFlags);
expect_sink_format.biSizeImage = 200; ok(!memcmp(params->lpbiInput, &expect_sink_format, sizeof(BITMAPINFOHEADER)), "Input types didn't match.\n"); ok(!memcmp(params->lpbiOutput, &source_bitmap_info, sizeof(BITMAPINFOHEADER)), "Output types didn't match.\n"); - ok(!params->ckid, "Got chunk id %#x.\n", params->ckid); + ok(!params->ckid, "Got chunk id %#lx.\n", params->ckid);
for (i = 0; i < 200; ++i) expect[i] = i; @@ -189,7 +189,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); } @@ -289,53 +289,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_AVIDec, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_AVIDec, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -347,116 +347,116 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 3); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -468,36 +468,36 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins didn't match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins didn't match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"XForm In", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); hr = IBaseFilter_FindPin(filter, L"XForm Out", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); hr = IBaseFilter_FindPin(filter, L"output pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -511,66 +511,66 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); todo_wine ok(!wcscmp(info.achName, L"XForm In"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Out", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(pin, &IID_IPin, TRUE); check_interface(pin, &IID_IMediaSeeking, TRUE);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); todo_wine ok(!wcscmp(info.achName, L"XForm Out"), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"Out"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_media_types(void) @@ -586,10 +586,10 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
@@ -604,35 +604,35 @@ static void test_media_types(void) vih.bmiHeader.biHeight = 24; vih.bmiHeader.biBitCount = 16; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
vih.bmiHeader.biBitCount = 32; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); vih.bmiHeader.biBitCount = 16;
mt.bFixedSizeSamples = TRUE; mt.bTemporalCompression = TRUE; mt.lSampleSize = 123; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Some versions of quartz check the major type; some do not. */
mt.subtype = MEDIASUBTYPE_NULL; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_RGB24; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.subtype = test_subtype;
mt.formattype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.formattype = FORMAT_None; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.formattype = FORMAT_VideoInfo;
IPin_Release(pin); @@ -640,23 +640,23 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
mt.subtype = MEDIASUBTYPE_RGB24; vih.bmiHeader.biCompression = BI_RGB; vih.bmiHeader.biBitCount = 24; vih.bmiHeader.biSizeImage= 32 * 24 * 3; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -671,29 +671,29 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); @@ -702,36 +702,36 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"Out", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_filter_state(void) @@ -742,53 +742,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -884,12 +884,12 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample ++filter->got_sample;
size = IMediaSample_GetSize(sample); - ok(size == 32 * 24 * 12 / 8, "Got size %u.\n", size); + ok(size == 32 * 24 * 12 / 8, "Got size %lu.\n", size); size = IMediaSample_GetActualDataLength(sample); - ok(size == 32 * 24 * 12 / 8, "Got valid size %u.\n", size); + ok(size == 32 * 24 * 12 / 8, "Got valid size %lu.\n", size);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < size; ++i) expect[i] = 111 - i; ok(!memcmp(data, expect, size), "Data didn't match.\n"); @@ -897,28 +897,28 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample hr = IMediaSample_GetTime(sample, &start, &stop); if (testmode == 0) { - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr); } else if (testmode == 1) { - ok(hr == VFW_S_NO_STOP_TIME, "Got hr %#x.\n", hr); + ok(hr == VFW_S_NO_STOP_TIME, "Got hr %#lx.\n", hr); ok(start == 20000, "Got start time %s.\n", wine_dbgstr_longlong(start)); } else { - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == 20000, "Got start time %s.\n", wine_dbgstr_longlong(start)); ok(stop == 30000, "Got stop time %s.\n", wine_dbgstr_longlong(stop)); }
hr = IMediaSample_GetMediaTime(sample, &start, &stop); - ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr); hr = IMediaSample_IsDiscontinuity(sample); - todo_wine_if (testmode == 5) ok(hr == (testmode == 4) ? S_OK : S_FALSE, "Got hr %#x.\n", hr); + todo_wine_if (testmode == 5) ok(hr == (testmode == 4) ? S_OK : S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample_IsPreroll(sample); - todo_wine_if (testmode == 3) ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine_if (testmode == 3) ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample_IsSyncPoint(sample); - todo_wine_if (testmode == 5 || testmode == 6) ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine_if (testmode == 5 || testmode == 6) ok(hr == S_OK, "Got hr %#lx.\n", hr);
return S_OK; } @@ -983,27 +983,27 @@ static void test_sink_allocator(IMemInputPin *input) HRESULT hr;
hr = IMemInputPin_GetAllocatorRequirements(input, &props); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IMemAllocator_GetProperties(ret_allocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); - ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); - ok(!props.cbAlign, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.cBuffers, "Got %ld buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %ld.\n", props.cbBuffer); + ok(!props.cbAlign, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(ret_allocator); }
hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&req_allocator); @@ -1013,13 +1013,13 @@ static void test_sink_allocator(IMemInputPin *input) props.cbAlign = 1; props.cbPrefix = 0; hr = IMemAllocator_SetProperties(req_allocator, &props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_allocator == req_allocator, "Allocators didn't match.\n");
IMemAllocator_Release(req_allocator); @@ -1036,104 +1036,104 @@ static void test_sample_processing(IMediaControl *control, IMemInputPin *input, BYTE *data;
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); size = IMediaSample_GetSize(sample); - ok(size == 256, "Got size %d.\n", size); + ok(size == 256, "Got size %ld.\n", size); for (i = 0; i < 200; ++i) data[i] = i; hr = IMediaSample_SetActualDataLength(sample, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = 10000; stop = 20000; hr = IMediaSample_SetMediaTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetSyncPoint(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 0; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(sink->got_sample == 1, "Got %u calls to Receive().\n", sink->got_sample); sink->got_sample = 0;
start = 20000; hr = IMediaSample_SetTime(sample, &start, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 1; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(sink->got_sample == 1, "Got %u calls to Receive().\n", sink->got_sample); sink->got_sample = 0;
stop = 30000; hr = IMediaSample_SetTime(sample, &start, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 2; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(sink->got_sample == 1, "Got %u calls to Receive().\n", sink->got_sample); sink->got_sample = 0;
hr = IMediaSample_SetPreroll(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 3; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!sink->got_sample, "Got %u calls to Receive().\n", sink->got_sample);
hr = IMediaSample_SetPreroll(sample, FALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetDiscontinuity(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 4; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(sink->got_sample == 1, "Got %u calls to Receive().\n", sink->got_sample); sink->got_sample = 0;
hr = IMediaSample_SetSyncPoint(sample, FALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 5; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!sink->got_sample, "Got %u calls to Receive().\n", sink->got_sample);
hr = IMediaSample_SetDiscontinuity(sample, FALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testmode = 6; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!sink->got_sample, "Got %u calls to Receive().\n", sink->got_sample);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_Receive(input, sample); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
IMediaSample_Release(sample); IMemAllocator_Release(allocator); @@ -1149,68 +1149,68 @@ static void test_streaming_events(IMediaControl *control, IPin *sink, LONG i;
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 200; ++i) data[i] = i; hr = IMediaSample_SetActualDataLength(sample, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetSyncPoint(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!testsink->got_new_segment, "Got %u calls to IPin::NewSegment().\n", testsink->got_new_segment); hr = IPin_NewSegment(sink, 10000, 20000, 1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_new_segment == 1, "Got %u calls to IPin::NewSegment().\n", testsink->got_new_segment);
ok(!testsink->got_eos, "Got %u calls to IPin::EndOfStream().\n", testsink->got_eos); hr = IPin_EndOfStream(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!testsink->got_sample, "Got %u calls to Receive().\n", testsink->got_sample); ok(testsink->got_eos == 1, "Got %u calls to IPin::EndOfStream().\n", testsink->got_eos); testsink->got_eos = 0;
hr = IPin_EndOfStream(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_eos == 1, "Got %u calls to IPin::EndOfStream().\n", testsink->got_eos);
testmode = 0; hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(testsink->got_sample == 1, "Got %u calls to Receive().\n", testsink->got_sample); testsink->got_sample = 0;
ok(!testsink->got_begin_flush, "Got %u calls to IPin::BeginFlush().\n", testsink->got_begin_flush); hr = IPin_BeginFlush(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_begin_flush == 1, "Got %u calls to IPin::BeginFlush().\n", testsink->got_begin_flush);
hr = IMemInputPin_Receive(input, sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(sink); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ok(!testsink->got_end_flush, "Got %u calls to IPin::EndFlush().\n", testsink->got_end_flush); hr = IPin_EndFlush(sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_end_flush == 1, "Got %u calls to IPin::EndFlush().\n", testsink->got_end_flush);
hr = IMemInputPin_Receive(input, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(testsink->got_sample == 1, "Got %u calls to Receive().\n", testsink->got_sample); testsink->got_sample = 0;
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(sample); IMemAllocator_Release(allocator); } @@ -1262,49 +1262,49 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(sink, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
req_mt.subtype = MEDIASUBTYPE_RGB24; hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = test_subtype;
hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(sink, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsource.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &req_mt), "Media types didn't match.\n"); FreeMediaType(&mt);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
sink_bitmap_info = req_format.bmiHeader;
hr = IPin_EnumMediaTypes(source, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < 9; ++i) { @@ -1349,7 +1349,7 @@ static void test_connect_pin(void) };
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(pmt, &expect_mt, offsetof(AM_MEDIA_TYPE, cbFormat)), "%u: Media types didn't match.\n", i); ok(!memcmp(pmt->pbFormat, &expect_format, sizeof(VIDEOINFOHEADER)), @@ -1358,14 +1358,14 @@ static void test_connect_pin(void) { const VIDEOINFO *format = (VIDEOINFO *)pmt->pbFormat;
- ok(pmt->cbFormat == offsetof(VIDEOINFO, dwBitMasks[3]), "Got format size %u.\n", pmt->cbFormat); - ok(format->dwBitMasks[iRED] == 0xf800, "Got red bit mask %#x.\n", format->dwBitMasks[iRED]); - ok(format->dwBitMasks[iGREEN] == 0x07e0, "Got green bit mask %#x.\n", format->dwBitMasks[iGREEN]); - ok(format->dwBitMasks[iBLUE] == 0x001f, "Got blue bit mask %#x.\n", format->dwBitMasks[iBLUE]); + ok(pmt->cbFormat == offsetof(VIDEOINFO, dwBitMasks[3]), "Got format size %lu.\n", pmt->cbFormat); + ok(format->dwBitMasks[iRED] == 0xf800, "Got red bit mask %#lx.\n", format->dwBitMasks[iRED]); + ok(format->dwBitMasks[iGREEN] == 0x07e0, "Got green bit mask %#lx.\n", format->dwBitMasks[iGREEN]); + ok(format->dwBitMasks[iBLUE] == 0x001f, "Got blue bit mask %#lx.\n", format->dwBitMasks[iBLUE]); }
hr = IPin_QueryAccept(source, pmt); - ok(hr == (i == 8 ? S_OK : S_FALSE), "Got hr %#x.\n", hr); + ok(hr == (i == 8 ? S_OK : S_FALSE), "Got hr %#lx.\n", hr);
if (i == 8) CopyMediaType(&source_mt, pmt); @@ -1374,7 +1374,7 @@ static void test_connect_pin(void) }
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
@@ -1384,33 +1384,33 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(source, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
/* Exact connection. */
CopyMediaType(&req_mt, &source_mt);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(source, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsink.sink.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); FreeMediaType(&mt); @@ -1418,88 +1418,88 @@ static void test_connect_pin(void) source_bitmap_info = ((VIDEOINFOHEADER *)req_mt.pbFormat)->bmiHeader;
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_sample_processing(control, meminput, &testsink); test_streaming_events(control, sink, meminput, &testsink);
hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsink.sink.pin.peer == source, "Got peer %p.\n", testsink.sink.pin.peer); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.lSampleSize = 999; req_mt.bTemporalCompression = req_mt.bFixedSizeSamples = TRUE; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.formattype = FORMAT_VideoInfo;
/* Connection with wildcards. */
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Video; req_mt.subtype = MEDIASUBTYPE_I420; req_mt.formattype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = MEDIATYPE_Audio; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
/* Test enumeration of sink media types. */
@@ -1508,20 +1508,20 @@ static void test_connect_pin(void) testsink.mt = &req_mt; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); ok(hr == VFW_E_NO_ACCEPTABLE_TYPES - || broken(hr == VFW_E_INVALIDMEDIATYPE) /* Win8+ */, "Got hr %#x.\n", hr); + || broken(hr == VFW_E_INVALIDMEDIATYPE) /* Win8+ */, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Video; req_mt.subtype = MEDIASUBTYPE_I420; req_mt.formattype = FORMAT_VideoInfo; req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n");
hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsource.source.pin.peer == sink, "Got peer %p.\n", testsource.source.pin.peer); IFilterGraph2_Disconnect(graph, &testsource.source.pin.IPin_iface);
@@ -1530,13 +1530,13 @@ static void test_connect_pin(void) IPin_Release(source); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsource.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(avidec) diff --git a/dlls/quartz/tests/avisplit.c b/dlls/quartz/tests/avisplit.c index 0665fad3ad8..8b7e8a222b0 100644 --- a/dlls/quartz/tests/avisplit.c +++ b/dlls/quartz/tests/avisplit.c @@ -32,7 +32,7 @@ static IBaseFilter *create_avi_splitter(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_AviSplitter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -54,11 +54,11 @@ static WCHAR *load_resource(const WCHAR *name) wcscat(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n", + ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %lu.\n", wine_dbgstr_w(pathW), GetLastError());
res = FindResourceW(NULL, name, (LPCWSTR)RT_RCDATA); - ok(!!res, "Failed to load resource, error %u.\n", GetLastError()); + ok(!!res, "Failed to load resource, error %lu.\n", GetLastError()); ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res)); WriteFile(file, ptr, SizeofResource( GetModuleHandleA(NULL), res), &written, NULL); ok(written == SizeofResource(GetModuleHandleA(NULL), res), "Failed to write resource.\n"); @@ -96,7 +96,7 @@ static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename IBaseFilter_FindPin(reader, L"Output", &source);
hr = IFilterGraph2_ConnectDirect(graph, source, sink, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(source); IPin_Release(sink); @@ -115,7 +115,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); } @@ -220,53 +220,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_AviSplitter, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_AviSplitter, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -281,79 +281,79 @@ static void test_enum_pins(void) BOOL ret;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); @@ -361,46 +361,46 @@ static void test_enum_pins(void) graph = connect_input(filter, filename);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
IEnumPins_Release(enum1); IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_find_pin(void) @@ -415,34 +415,34 @@ static void test_find_pin(void) BOOL ret;
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Stream 00", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"Input", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
graph = connect_input(filter, filename);
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"Stream 00", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin); IPin_Release(pin); IPin_Release(pin2);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin); IPin_Release(pin); IPin_Release(pin2); @@ -450,9 +450,9 @@ static void test_find_pin(void) IEnumPins_Release(enum_pins); IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_pin_info(void) @@ -471,52 +471,52 @@ static void test_pin_info(void) graph = connect_input(filter, filename);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); expect_ref = get_refcount(filter); ref = get_refcount(pin); - ok(ref == expect_ref, "Got unexpected refcount %d.\n", ref); + ok(ref == expect_ref, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"input pin"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref); + ok(ref == expect_ref + 1, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref); + ok(ref == expect_ref + 1, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"input pin"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Stream 00", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(pin, &IID_IPin, TRUE); check_interface(pin, &IID_IMediaSeeking, TRUE);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"Stream 00"), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"Stream 00"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
@@ -524,9 +524,9 @@ static void test_pin_info(void)
IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_media_types(void) @@ -557,42 +557,42 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"input pin", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
mt.majortype = MEDIATYPE_Stream; mt.subtype = MEDIASUBTYPE_Avi; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.bFixedSizeSamples = TRUE; mt.bTemporalCompression = TRUE; mt.lSampleSize = 123; mt.formattype = FORMAT_WaveFormatEx; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.majortype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Stream;
mt.subtype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_Avi;
graph = connect_input(filter, filename);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin); @@ -600,86 +600,86 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"Stream 00", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Video), "Got major type %s\n", wine_dbgstr_guid(&pmt->majortype)); ok(IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_I420), "Got subtype %s\n", wine_dbgstr_guid(&pmt->subtype)); ok(!pmt->bFixedSizeSamples, "Got fixed size %d.\n", pmt->bFixedSizeSamples); todo_wine ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - ok(pmt->lSampleSize == 1, "Got sample size %u.\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 1, "Got sample size %lu.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &FORMAT_VideoInfo), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); - ok(pmt->cbFormat == sizeof(VIDEOINFOHEADER), "Got format size %u.\n", pmt->cbFormat); + ok(pmt->cbFormat == sizeof(VIDEOINFOHEADER), "Got format size %lu.\n", pmt->cbFormat); ok(!memcmp(pmt->pbFormat, &expect_vih, sizeof(VIDEOINFOHEADER)), "Format blocks didn't match.\n");
hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->bFixedSizeSamples = TRUE; pmt->bTemporalCompression = TRUE; pmt->lSampleSize = 123; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->majortype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->majortype = MEDIATYPE_Video;
pmt->subtype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_I420;
pmt->formattype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->formattype = FORMAT_None; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->formattype = FORMAT_VideoInfo;
vih = (VIDEOINFOHEADER *)pmt->pbFormat;
vih->AvgTimePerFrame = 10000; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); vih->AvgTimePerFrame = 1000 * 10000;
vih->dwBitRate = 1000000; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); vih->dwBitRate = 0;
SetRect(&vih->rcSource, 0, 0, 32, 24); hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); SetRect(&vih->rcSource, 0, 0, 0, 0);
vih->bmiHeader.biCompression = BI_RGB; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); vih->bmiHeader.biCompression = mmioFOURCC('I','4','2','0');
CoTaskMemFree(pmt->pbFormat); CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin);
IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_enum_media_types(void) @@ -697,29 +697,29 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"input pin", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); @@ -728,64 +728,64 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"Stream 00", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
@@ -795,9 +795,9 @@ static void test_enum_media_types(void)
IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
struct testfilter @@ -877,7 +877,7 @@ static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface
if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt))) { - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); IPin_Release(peer); iface->pin.peer = NULL; FreeMediaType(&iface->pin.mt); @@ -924,12 +924,12 @@ static HRESULT testsink_connect(struct strmbase_sink *iface, IPin *peer, const A HRESULT hr;
hr = IPin_ConnectedTo(peer, &peer2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer2 == &iface->pin.IPin_iface, "Peer didn't match.\n"); IPin_Release(peer2);
hr = IPin_ConnectionMediaType(peer, &mt2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(mt, &mt2), "Media types didn't match.\n"); FreeMediaType(&mt2);
@@ -946,16 +946,16 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample HRESULT hr;
hr = IMediaSample_GetTime(sample, &start, &end); - todo_wine_if (hr == VFW_S_NO_STOP_TIME) ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine_if (hr == VFW_S_NO_STOP_TIME) ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (winetest_debug > 1) - trace("%04x: Got sample with timestamps %I64d-%I64d.\n", GetCurrentThreadId(), start, end); + trace("%04lx: Got sample with timestamps %I64d-%I64d.\n", GetCurrentThreadId(), start, end);
ok(filter->new_segment_count, "Expected NewSegment() before Receive().\n");
IPin_QueryInterface(iface->pin.peer, &IID_IMediaSeeking, (void **)&seeking); hr = IMediaSeeking_GetPositions(seeking, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == filter->seek_start, "Expected start position %I64u, got %I64u.\n", filter->seek_start, start); ok(end == filter->seek_end, "Expected end position %I64u, got %I64u.\n", filter->seek_end, end); IMediaSeeking_Release(seeking); @@ -970,7 +970,7 @@ static HRESULT testsink_eos(struct strmbase_sink *iface) struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter);
if (winetest_debug > 1) - trace("%04x: Got EOS.\n", GetCurrentThreadId()); + trace("%04lx: Got EOS.\n", GetCurrentThreadId());
ok(!filter->eos_count, "Got %u EOS events.\n", filter->eos_count + 1); ++filter->eos_count; @@ -986,13 +986,13 @@ static HRESULT testsink_new_segment(struct strmbase_sink *iface, HRESULT hr;
if (winetest_debug > 1) - trace("%04x: Got segment with timestamps %I64d-%I64d.\n", GetCurrentThreadId(), start, end); + trace("%04lx: Got segment with timestamps %I64d-%I64d.\n", GetCurrentThreadId(), start, end);
++filter->new_segment_count;
IPin_QueryInterface(iface->pin.peer, &IID_IMediaSeeking, (void **)&seeking); hr = IMediaSeeking_GetPositions(seeking, &filter->seek_start, &filter->seek_end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSeeking_Release(seeking);
ok(start == filter->segment_start, "Expected start %I64d, got %I64d.\n", filter->segment_start, start); @@ -1107,50 +1107,50 @@ static void test_filter_state(IMediaControl *control) HRESULT hr;
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state); }
static void test_connect_pin(void) @@ -1198,48 +1198,48 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(sink, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Video; hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Stream;
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_Avi;
hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(sink, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsource.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test source connection. */
@@ -1247,11 +1247,11 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(source, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
/* Exact connection. */
@@ -1261,135 +1261,135 @@ static void test_connect_pin(void) CopyMediaType(&req_mt, source_mt);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_filter_state(control);
hr = IPin_ConnectedTo(source, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsink.sink.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsink.sink.pin.peer == source, "Got peer %p.\n", testsink.sink.pin.peer); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.lSampleSize = 999; req_mt.bTemporalCompression = req_mt.bFixedSizeSamples = TRUE; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = MEDIATYPE_Stream; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Video;
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_I420;
/* Connection with wildcards. */
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Video; req_mt.subtype = MEDIASUBTYPE_I420; req_mt.formattype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.subtype = MEDIASUBTYPE_RGB32; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = MEDIATYPE_Audio; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
/* Test enumeration of sink media types. */
testsink.mt = &req_mt; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Video; req_mt.subtype = MEDIASUBTYPE_I420; req_mt.formattype = FORMAT_VideoInfo; req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n");
IPin_Release(source); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsource.source.pin.peer == sink, "Got peer %p.\n", testsource.source.pin.peer); IFilterGraph2_Disconnect(graph, &testsource.source.pin.IPin_iface);
@@ -1401,17 +1401,17 @@ static void test_connect_pin(void) IPin_Release(sink); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(reader); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsource.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_unconnected_filter_state(void) @@ -1422,53 +1422,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_seeking(void) @@ -1508,137 +1508,137 @@ static void test_seeking(void) IPin_QueryInterface(pin, &IID_IMediaSeeking, (void **)&seeking);
hr = IMediaSeeking_GetCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(caps == (AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards | AM_SEEKING_CanSeekBackwards | AM_SEEKING_CanGetStopPos - | AM_SEEKING_CanGetDuration), "Got caps %#x.\n", caps); + | AM_SEEKING_CanGetDuration), "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(caps == (AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards), "Got caps %#x.\n", caps); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(caps == (AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards), "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(caps == AM_SEEKING_CanSeekAbsolute, "Got caps %#x.\n", caps); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(caps == AM_SEEKING_CanSeekAbsolute, "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(!caps, "Got caps %#x.\n", caps); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(!caps, "Got caps %#lx.\n", caps);
caps = 0; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(!caps, "Got caps %#x.\n", caps); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(!caps, "Got caps %#lx.\n", caps);
for (i = 0; i < ARRAY_SIZE(format_tests); ++i) { hr = IMediaSeeking_IsFormatSupported(seeking, format_tests[i].guid); - todo_wine_if(i == 1) ok(hr == format_tests[i].hr, "Got hr %#x for format %s.\n", + todo_wine_if(i == 1) ok(hr == format_tests[i].hr, "Got hr %#lx for format %s.\n", hr, wine_dbgstr_guid(format_tests[i].guid)); }
hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_FRAME); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_SAMPLE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_FRAME); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_FRAME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_FRAME); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
duration = 0; hr = IMediaSeeking_GetDuration(seeking, &duration); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(duration == 50000000, "Got duration %I64d.\n", duration);
stop = current = 0xdeadbeef; hr = IMediaSeeking_GetStopPosition(seeking, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(stop == duration, "Expected time %s, got %s.\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop)); hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); stop = current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == duration, "Expected time %s, got %s.\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop));
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time)); time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time)); time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 123, &TIME_FORMAT_FRAME); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(time == 123 * 10000000, "Got time %s.\n", wine_dbgstr_longlong(time));
earliest = latest = 0xdeadbeef; hr = IMediaSeeking_GetAvailable(seeking, &earliest, &latest); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!earliest, "Got time %s.\n", wine_dbgstr_longlong(earliest)); ok(latest == duration, "Expected time %s, got %s.\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(latest));
rate = 0; hr = IMediaSeeking_GetRate(seeking, &rate); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(rate == 1.0, "Got rate %.16e.\n", rate);
hr = IMediaSeeking_SetRate(seeking, 200.0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); rate = 0; hr = IMediaSeeking_GetRate(seeking, &rate); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(rate == 200.0, "Got rate %.16e.\n", rate);
hr = IMediaSeeking_SetRate(seeking, -1.0); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetPreroll(seeking, &time); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
current = 1500 * 10000; stop = 3500 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 1500 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 3500 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
stop = current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); /* Native snaps to the nearest frame. */ ok(current > 0 && current < duration, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop > 0 && stop < duration && stop > current, "Got time %s.\n", wine_dbgstr_longlong(stop)); @@ -1647,21 +1647,21 @@ static void test_seeking(void) stop = 3500 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime, &stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current > 0 && current < duration, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop > 0 && stop < duration && stop > current, "Got time %s.\n", wine_dbgstr_longlong(stop));
hr = IMediaSeeking_GetStopPosition(seeking, &prev_stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
current = 0; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
stop = current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == prev_stop, "Expected time %s, got %s.\n", wine_dbgstr_longlong(prev_stop), wine_dbgstr_longlong(stop)); @@ -1670,9 +1670,9 @@ static void test_seeking(void) IPin_Release(pin); IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_streaming(void) @@ -1696,21 +1696,21 @@ static void test_streaming(void) IPin_QueryInterface(source, &IID_IMediaSeeking, (void **)&seeking);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Expected timeout.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(testsink.eos_event, 1000), "Did not receive EOS.\n"); ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Got more than one EOS.\n"); ok(testsink.sample_count, "Expected at least one sample.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(testsink.eos_event, 1000), "Did not receive EOS.\n"); ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Got more than one EOS.\n"); @@ -1721,7 +1721,7 @@ static void test_streaming(void) testsink.segment_end = 3500 * 10000; hr = IMediaSeeking_SetPositions(seeking, &testsink.segment_start, AM_SEEKING_AbsolutePositioning, &testsink.segment_end, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(testsink.eos_event, 1000), "Did not receive EOS.\n"); ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Got more than one EOS.\n"); @@ -1729,14 +1729,14 @@ static void test_streaming(void)
start = end = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == testsink.seek_start, "Expected start position %I64u, got %I64u.\n", testsink.seek_start, start); ok(end == testsink.seek_end, "Expected end position %I64u, got %I64u.\n", testsink.seek_end, end);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(testsink.eos_event, 1000), "Did not receive EOS.\n"); ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Got more than one EOS.\n"); @@ -1744,7 +1744,7 @@ static void test_streaming(void)
start = end = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == testsink.seek_start, "Expected start position %I64u, got %I64u.\n", testsink.seek_start, start); ok(end == testsink.seek_end, "Expected end position %I64u, got %I64u.\n", testsink.seek_end, end);
@@ -1752,13 +1752,13 @@ static void test_streaming(void) IPin_Release(source); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
START_TEST(avisplit) diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c index 0e5c15bea14..1c9fc1f4457 100644 --- a/dlls/quartz/tests/dsoundrender.c +++ b/dlls/quartz/tests/dsoundrender.c @@ -36,7 +36,7 @@ static IBaseFilter *create_dsound_render(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_DSoundRender, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -45,7 +45,7 @@ static IFilterGraph2 *create_graph(void) IFilterGraph2 *ret; HRESULT hr; hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&ret); - ok(hr == S_OK, "Failed to create FilterGraph: %#x\n", hr); + ok(hr == S_OK, "Failed to create FilterGraph: %#lx\n", hr); return ret; }
@@ -115,17 +115,17 @@ static void test_property_bag(void)
hr = CoCreateInstance(&CLSID_DSoundRender, NULL, CLSCTX_INPROC_SERVER, &IID_IPersistPropertyBag, (void **)&ppb); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) return;
hr = IPersistPropertyBag_InitNew(ppb); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPersistPropertyBag_Load(ppb, &property_bag, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IPersistPropertyBag_Release(ppb); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); }
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c) @@ -138,7 +138,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); } @@ -229,53 +229,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_DSoundRender, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_DSoundRender, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -287,85 +287,85 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -377,26 +377,26 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, sink_id, &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin); IPin_Release(pin); IPin_Release(pin2);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -410,38 +410,38 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, sink_id, &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_basic_audio(void) @@ -456,50 +456,50 @@ static void test_basic_audio(void) HRESULT hr;
hr = IBaseFilter_QueryInterface(filter, &IID_IBasicAudio, (void **)&audio); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicAudio_get_Balance(audio, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicAudio_get_Balance(audio, &balance); if (hr != VFW_E_MONO_AUDIO_HW) { - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(balance == 0, "Got balance %d.\n", balance); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(balance == 0, "Got balance %ld.\n", balance);
hr = IBasicAudio_put_Balance(audio, DSBPAN_LEFT - 1); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IBasicAudio_put_Balance(audio, DSBPAN_LEFT); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicAudio_get_Balance(audio, &balance); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(balance == DSBPAN_LEFT, "Got balance %d.\n", balance); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(balance == DSBPAN_LEFT, "Got balance %ld.\n", balance); }
hr = IBasicAudio_get_Volume(audio, &volume); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(volume == 0, "Got volume %d.\n", volume); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(volume == 0, "Got volume %ld.\n", volume);
hr = IBasicAudio_put_Volume(audio, DSBVOLUME_MIN - 1); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IBasicAudio_put_Volume(audio, DSBVOLUME_MIN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicAudio_get_Volume(audio, &volume); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(volume == DSBVOLUME_MIN, "Got volume %d.\n", volume); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(volume == DSBVOLUME_MIN, "Got volume %ld.\n", volume);
hr = IBasicAudio_GetTypeInfoCount(audio, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count == 1, "Got count %u.\n", count);
hr = IBasicAudio_GetTypeInfo(audio, 0, 0, &typeinfo); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(typeattr->typekind == TKIND_DISPATCH, "Got kind %u.\n", typeattr->typekind); ok(IsEqualGUID(&typeattr->guid, &IID_IBasicAudio), "Got IID %s.\n", wine_dbgstr_guid(&typeattr->guid)); ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); @@ -507,7 +507,7 @@ static void test_basic_audio(void)
IBasicAudio_Release(audio); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -522,64 +522,64 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) CoTaskMemFree(mts[0]->pbFormat); if (hr == S_OK) CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(count == 1, "Got count %u.\n", count); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(count == 1, "Got count %lu.\n", count); if (hr == S_OK) CoTaskMemFree(mts[0]->pbFormat); if (hr == S_OK) CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + todo_wine ok(count == 1, "Got count %lu.\n", count); if (count > 0) CoTaskMemFree(mts[0]->pbFormat); if (count > 0) CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) CoTaskMemFree(mts[0]->pbFormat); if (hr == S_OK) CoTaskMemFree(mts[0]);
@@ -588,7 +588,7 @@ static void test_enum_media_types(void) IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -656,36 +656,36 @@ static void test_allocator(IMemInputPin *input) HRESULT hr;
hr = IMemInputPin_GetAllocatorRequirements(input, &props); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IMemAllocator_GetProperties(ret_allocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); - ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); - ok(!props.cbAlign, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.cBuffers, "Got %ld buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %ld.\n", props.cbBuffer); + ok(!props.cbAlign, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(ret_allocator); }
hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&req_allocator);
hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_allocator == req_allocator, "Allocators didn't match.\n");
IMemAllocator_Release(req_allocator); @@ -703,9 +703,9 @@ static DWORD WINAPI frame_thread(void *arg) struct frame_thread_params *params = arg; HRESULT hr;
- if (winetest_debug > 1) trace("%04x: Sending frame.\n", GetCurrentThreadId()); + if (winetest_debug > 1) trace("%04lx: Sending frame.\n", GetCurrentThreadId()); hr = IMemInputPin_Receive(params->sink, params->sample); - if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); + if (winetest_debug > 1) trace("%04lx: Returned %#lx.\n", GetCurrentThreadId(), hr); IMediaSample_Release(params->sample); free(params); return hr; @@ -725,24 +725,24 @@ static HRESULT send_frame(IMemInputPin *sink) DWORD ret;
hr = IMemInputPin_GetAllocator(sink, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); words = (unsigned short *)data; for (i = 0; i < 44100 * 2; i += 2) words[i] = words[i+1] = sinf(i / 20.0f) * 0x7fff;
hr = IMediaSample_SetActualDataLength(sample, 44100 * 4); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time = 0; end_time = start_time + 10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
params->sink = sink; params->sample = sample; @@ -762,7 +762,7 @@ static void test_filter_state(IMemInputPin *input, IMediaControl *control) HRESULT hr;
hr = send_frame(input); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
/* The renderer is not fully paused until it receives a sample. The * DirectSound renderer never blocks in Receive(), despite returning S_OK @@ -771,71 +771,71 @@ static void test_filter_state(IMemInputPin *input, IMediaControl *control) * than it's worth to emulate, so for now, we'll ignore this behaviour. */
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
/* It's possible to queue multiple samples while paused. The number of * samples that can be queued depends on the length of each sample, but * it's not particularly clear how. */
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
hr = send_frame(input); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = send_frame(input); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
hr = send_frame(input); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = send_frame(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = send_frame(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* The DirectSound renderer will silently refuse to transition to running * if it hasn't finished pausing yet. Once it does it reports itself as @@ -848,43 +848,43 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control HRESULT hr;
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = send_frame(input); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = send_frame(input); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = send_frame(input); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = send_frame(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static unsigned int check_ec_complete(IMediaEvent *eventsrc, DWORD timeout) @@ -898,14 +898,14 @@ static unsigned int check_ec_complete(IMediaEvent *eventsrc, DWORD timeout) { if (code == EC_COMPLETE) { - ok(param1 == S_OK, "Got param1 %#lx.\n", param1); - ok(!param2, "Got param2 %#lx.\n", param2); + ok(param1 == S_OK, "Got param1 %#Ix.\n", param1); + ok(!param2, "Got param2 %#Ix.\n", param2); ret++; } IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); timeout = 0; } - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
return ret; } @@ -920,28 +920,28 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) IMediaControl_QueryInterface(control, &IID_IMediaEvent, (void **)&eventsrc);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = send_frame(input); - todo_wine ok(hr == VFW_E_SAMPLE_REJECTED_EOS, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_SAMPLE_REJECTED_EOS, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
@@ -949,79 +949,79 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) * done rendering. */
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = send_frame(input); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); ret = check_ec_complete(eventsrc, 2000); todo_wine ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
/* Test sending EOS while flushing. */
hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = send_frame(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndOfStream(pin); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
/* Test sending EOS and then flushing or stopping. */
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = send_frame(input); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = send_frame(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
@@ -1070,37 +1070,37 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(pin, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &source.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
@@ -1108,48 +1108,48 @@ static void test_connect_pin(void)
hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemInputPin_NotifyAllocator(input, allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_filter_state(input, control); test_flushing(pin, input, control); test_eos(pin, input, control);
hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(source.source.pin.peer == pin, "Got peer %p.\n", source.source.pin.peer); IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
ref = IMemAllocator_Release(allocator); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMemInputPin_Release(input); IPin_Release(pin); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_filter_state(void) @@ -1160,53 +1160,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static HRESULT does_dsound_support_format(WAVEFORMATEX *format) @@ -1222,7 +1222,7 @@ static HRESULT does_dsound_support_format(WAVEFORMATEX *format) HRESULT hr;
hr = DirectSoundCreate(NULL, &dsound, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirectSound_CreateSoundBuffer(dsound, &desc, &buffer, NULL); if (hr == S_OK) @@ -1263,30 +1263,30 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, sink_id, &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &mt, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { ok(IsEqualGUID(&mt->majortype, &MEDIATYPE_Audio), "Got major type %s.\n", wine_dbgstr_guid(&mt->majortype)); ok(IsEqualGUID(&mt->subtype, &GUID_NULL), "Got subtype %s.\n", wine_dbgstr_guid(&mt->subtype)); ok(mt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", mt->bFixedSizeSamples); ok(!mt->bTemporalCompression, "Got temporal compression %d.\n", mt->bTemporalCompression); - ok(mt->lSampleSize == 1, "Got sample size %u.\n", mt->lSampleSize); + ok(mt->lSampleSize == 1, "Got sample size %lu.\n", mt->lSampleSize); ok(IsEqualGUID(&mt->formattype, &GUID_NULL), "Got format type %s.\n", wine_dbgstr_guid(&mt->formattype)); ok(!mt->pUnk, "Got pUnk %p.\n", mt->pUnk); - ok(!mt->cbFormat, "Got format size %u.\n", mt->cbFormat); + ok(!mt->cbFormat, "Got format size %lu.\n", mt->cbFormat); ok(!mt->pbFormat, "Got unexpected format block.\n");
hr = IPin_QueryAccept(pin, mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
CoTaskMemFree(mt); }
hr = IEnumMediaTypes_Next(enummt, 1, &mt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Audio; req_mt.formattype = FORMAT_WaveFormatEx; @@ -1312,7 +1312,7 @@ static void test_media_types(void) expect_hr = does_dsound_support_format(&wfx);
hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == expect_hr, "Expected hr %#x, got %#x, for %d channels, %d-bit %s, %d Hz.\n", + ok(hr == expect_hr, "Expected hr %#lx, got %#lx, for %d channels, %d-bit %s, %ld Hz.\n", expect_hr, hr, channels, formats[i].depth, formats[i].tag == WAVE_FORMAT_PCM ? "integer" : "float", sample_rates[j]); } @@ -1321,7 +1321,7 @@ static void test_media_types(void)
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_eos(void) @@ -1335,49 +1335,49 @@ static void test_unconnected_eos(void) ULONG ref;
hr = IFilterGraph2_AddFilter(graph, filter, L"renderer"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret); @@ -1385,9 +1385,9 @@ static void test_unconnected_eos(void) IMediaControl_Release(control); IMediaEvent_Release(eventsrc); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(dsoundrender) @@ -1405,7 +1405,7 @@ START_TEST(dsoundrender) CoUninitialize(); return; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IBaseFilter_Release(filter);
test_property_bag(); diff --git a/dlls/quartz/tests/filesource.c b/dlls/quartz/tests/filesource.c index 4162e248937..cec4bade206 100644 --- a/dlls/quartz/tests/filesource.c +++ b/dlls/quartz/tests/filesource.c @@ -29,7 +29,7 @@ static IBaseFilter *create_file_source(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_AsyncReader, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -51,11 +51,11 @@ static WCHAR *load_resource(const WCHAR *name) wcscat(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n", + ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %lu.\n", wine_dbgstr_w(pathW), GetLastError());
res = FindResourceW(NULL, name, (LPCWSTR)RT_RCDATA); - ok(!!res, "Failed to load resource, error %u.\n", GetLastError()); + ok(!!res, "Failed to load resource, error %lu.\n", GetLastError()); ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res)); WriteFile(file, ptr, SizeofResource( GetModuleHandleA(NULL), res), &written, NULL); ok(written == SizeofResource(GetModuleHandleA(NULL), res), "Failed to write resource.\n"); @@ -70,9 +70,9 @@ static void load_file(IBaseFilter *filter, const WCHAR *filename) HRESULT hr;
hr = IBaseFilter_QueryInterface(filter, &IID_IFileSourceFilter, (void **)&filesource); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFileSourceFilter_Load(filesource, filename, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IFileSourceFilter_Release(filesource); }
@@ -93,7 +93,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); } @@ -181,53 +181,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_AsyncReader, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_AsyncReader, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_file_source_filter(void) @@ -306,9 +306,9 @@ static void test_file_source_filter(void) trace("Running test for %s.\n", tests[i].label);
file = CreateFileW(path, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); - ok(file != INVALID_HANDLE_VALUE, "Failed to create file, error %u.\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Failed to create file, error %lu.\n", GetLastError()); ret = WriteFile(file, tests[i].data, tests[i].size, &written, NULL); - ok(ret, "Failed to write file, error %u.\n", GetLastError()); + ok(ret, "Failed to write file, error %lu.\n", GetLastError()); CloseHandle(file);
filter = create_file_source(); @@ -316,27 +316,27 @@ static void test_file_source_filter(void)
olepath = (void *)0xdeadbeef; hr = IFileSourceFilter_GetCurFile(filesource, &olepath, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!olepath, "Got path %s.\n", wine_dbgstr_w(olepath));
hr = IFileSourceFilter_Load(filesource, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IFileSourceFilter_Load(filesource, path, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFileSourceFilter_GetCurFile(filesource, NULL, &mt); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
olepath = NULL; hr = IFileSourceFilter_GetCurFile(filesource, &olepath, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(olepath);
olepath = NULL; memset(&file_mt, 0x11, sizeof(file_mt)); hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &file_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(olepath, path), "Expected path %s, got %s.\n", wine_dbgstr_w(path), wine_dbgstr_w(olepath)); ok(IsEqualGUID(&file_mt.majortype, &MEDIATYPE_Stream), "Got major type %s.\n", @@ -348,40 +348,40 @@ static void test_file_source_filter(void) ok(file_mt.bFixedSizeSamples == TRUE, "Got fixed size %d.\n", file_mt.bFixedSizeSamples); ok(file_mt.bTemporalCompression == FALSE, "Got temporal compression %d.\n", file_mt.bTemporalCompression); - ok(file_mt.lSampleSize == 1, "Got sample size %u.\n", file_mt.lSampleSize); + ok(file_mt.lSampleSize == 1, "Got sample size %lu.\n", file_mt.lSampleSize); ok(IsEqualGUID(&file_mt.formattype, &GUID_NULL), "Got format type %s.\n", wine_dbgstr_guid(&file_mt.formattype)); ok(!file_mt.pUnk, "Got pUnk %p.\n", file_mt.pUnk); - ok(!file_mt.cbFormat, "Got format size %#x.\n", file_mt.cbFormat); + ok(!file_mt.cbFormat, "Got format size %#lx.\n", file_mt.cbFormat); ok(!file_mt.pbFormat, "Got format %p.\n", file_mt.pbFormat); CoTaskMemFree(olepath);
hr = IBaseFilter_FindPin(filter, L"Output", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(pin, &enum_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum_mt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(pmt, &file_mt, sizeof(*pmt)), "Media types did not match.\n"); CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enum_mt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); mt = file_mt; mt.subtype = GUID_NULL; ok(!memcmp(pmt, &mt, sizeof(*pmt)), "Media types did not match.\n"); CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enum_mt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum_mt);
mt = file_mt; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.bFixedSizeSamples = FALSE; mt.bTemporalCompression = TRUE; @@ -389,33 +389,33 @@ static void test_file_source_filter(void) mt.formattype = FORMAT_VideoInfo; mt.subtype = MEDIASUBTYPE_RGB32; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.majortype = MEDIATYPE_Video; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Stream;
if (!IsEqualGUID(tests[i].subtype, &GUID_NULL)) { mt.subtype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); }
IPin_Release(pin); IFileSourceFilter_Release(filesource); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
ret = DeleteFileW(path); - ok(ret, "Failed to delete file, error %u\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu\n", GetLastError()); }
/* test prescribed format */ filter = create_file_source(); hr = IBaseFilter_QueryInterface(filter, &IID_IFileSourceFilter, (void **)&filesource); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.majortype = MEDIATYPE_Video; mt.subtype = MEDIASUBTYPE_RGB8; @@ -428,73 +428,73 @@ static void test_file_source_filter(void) mt.pbFormat = NULL; filename = load_resource(L"test.avi"); hr = IFileSourceFilter_Load(filesource, filename, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFileSourceFilter_GetCurFile(filesource, &olepath, &file_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&file_mt, &mt, sizeof(mt)), "Media types did not match.\n"); CoTaskMemFree(olepath);
hr = IBaseFilter_FindPin(filter, L"Output", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EnumMediaTypes(pin, &enum_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum_mt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(pmt, &file_mt, sizeof(*pmt)), "Media types did not match.\n"); CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enum_mt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Stream), "Got major type %s.\n", wine_dbgstr_guid(&pmt->majortype)); ok(IsEqualGUID(&pmt->subtype, &GUID_NULL), "Got subtype %s.\n", wine_dbgstr_guid(&pmt->subtype)); ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - ok(pmt->lSampleSize == 1, "Got sample size %u.\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 1, "Got sample size %lu.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &GUID_NULL), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); - ok(!pmt->cbFormat, "Got format size %#x.\n", pmt->cbFormat); + ok(!pmt->cbFormat, "Got format size %#lx.\n", pmt->cbFormat); ok(!pmt->pbFormat, "Got format %p.\n", pmt->pbFormat);
hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enum_mt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum_mt);
hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.bFixedSizeSamples = TRUE; mt.bTemporalCompression = FALSE; mt.lSampleSize = 456; mt.formattype = FORMAT_VideoInfo; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.majortype = MEDIATYPE_Stream; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Video;
mt.subtype = MEDIASUBTYPE_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IPin_Release(pin); IFileSourceFilter_Release(filesource); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_enum_pins(void) @@ -509,102 +509,102 @@ static void test_enum_pins(void) BOOL ret;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
load_file(filter, filename);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_find_pin(void) @@ -618,31 +618,31 @@ static void test_find_pin(void) BOOL ret;
hr = IBaseFilter_FindPin(filter, L"Output", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
load_file(filter, filename);
hr = IBaseFilter_FindPin(filter, L"Output", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, &enumpins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enumpins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Expected pin %p, got %p.\n", pin, pin2);
IPin_Release(pin2); IPin_Release(pin); IEnumPins_Release(enumpins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_pin_info(void) @@ -660,37 +660,37 @@ static void test_pin_info(void) load_file(filter, filename);
hr = IBaseFilter_FindPin(filter, L"Output", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"Output"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"Output"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_unconnected_filter_state(void) @@ -701,53 +701,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_sync_read_aligned(IAsyncReader *reader, IMemAllocator *allocator) @@ -765,13 +765,13 @@ static void test_sync_read_aligned(IAsyncReader *reader, IMemAllocator *allocato start_time = 0; end_time = 512 * (LONGLONG)10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_SyncReadAligned(reader, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
len = IMediaSample_GetActualDataLength(sample); - ok(len == 512, "Got length %d.\n", len); + ok(len == 512, "Got length %ld.\n", len);
for (i = 0; i < 512; i++) ok(data[i] == i % 111, "Got wrong byte %02x at %u.\n", data[i], i); @@ -779,13 +779,13 @@ static void test_sync_read_aligned(IAsyncReader *reader, IMemAllocator *allocato start_time = 512 * (LONGLONG)10000000; end_time = 1024 * (LONGLONG)10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_SyncReadAligned(reader, sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
len = IMediaSample_GetActualDataLength(sample); - ok(len == 88, "Got length %d.\n", len); + ok(len == 88, "Got length %ld.\n", len);
for (i = 0; i < 88; i++) ok(data[i] == (512 + i) % 111, "Got wrong byte %02x at %u.\n", data[i], i); @@ -793,13 +793,13 @@ static void test_sync_read_aligned(IAsyncReader *reader, IMemAllocator *allocato start_time = 1024 * (LONGLONG)10000000; end_time = 1536 * (LONGLONG)10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_SyncReadAligned(reader, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
len = IMediaSample_GetActualDataLength(sample); - ok(len == 0, "Got length %d.\n", len); + ok(len == 0, "Got length %ld.\n", len);
IMediaSample_Release(sample); } @@ -814,7 +814,7 @@ static DWORD CALLBACK request_thread(void *arg) { struct request_thread_params *params = arg; HRESULT hr = IAsyncReader_Request(params->reader, params->sample, 123); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return 0; }
@@ -836,23 +836,23 @@ static void test_request(IAsyncReader *reader, IMemAllocator *allocator) IMediaSample_GetPointer(sample2, &data2);
hr = IAsyncReader_WaitForNext(reader, 0, &ret_sample, &cookie); - ok(hr == VFW_E_TIMEOUT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TIMEOUT, "Got hr %#lx.\n", hr);
start_time = 0; end_time = 512 * (LONGLONG)10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_Request(reader, sample, 123); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_WaitForNext(reader, 1000, &ret_sample, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_sample == sample, "Expected sample %p, got %p.\n", sample, ret_sample); - ok(cookie == 123, "Got cookie %lu.\n", cookie); + ok(cookie == 123, "Got cookie %Iu.\n", cookie);
len = IMediaSample_GetActualDataLength(sample); - ok(len == 512, "Got length %d.\n", hr); + ok(len == 512, "Got length %ld.\n", hr);
for (i = 0; i < 512; i++) ok(data[i] == i % 111, "Got wrong byte %02x at %u.\n", data[i], i); @@ -860,47 +860,47 @@ static void test_request(IAsyncReader *reader, IMemAllocator *allocator) start_time = 1024 * (LONGLONG)10000000; end_time = 1536 * (LONGLONG)10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_Request(reader, sample, 123); - ok(hr == HRESULT_FROM_WIN32(ERROR_HANDLE_EOF), "Got hr %#x.\n", hr); + ok(hr == HRESULT_FROM_WIN32(ERROR_HANDLE_EOF), "Got hr %#lx.\n", hr);
start_time = 0; end_time = 512 * (LONGLONG)10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_Request(reader, sample, 123); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time = 512 * (LONGLONG)10000000; end_time = 1024 * (LONGLONG)10000000; hr = IMediaSample_SetTime(sample2, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_Request(reader, sample2, 456); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_WaitForNext(reader, 1000, &ret_sample, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (cookie == 123) { ok(ret_sample == sample, "Expected sample %p, got %p.\n", sample, ret_sample);
hr = IAsyncReader_WaitForNext(reader, 1000, &ret_sample, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_sample == sample2, "Expected sample %p, got %p.\n", sample2, ret_sample); - ok(cookie == 456, "Got cookie %lu.\n", cookie); + ok(cookie == 456, "Got cookie %Iu.\n", cookie); } else { - ok(cookie == 456, "Got cookie %lu.\n", cookie); + ok(cookie == 456, "Got cookie %Iu.\n", cookie); ok(ret_sample == sample2, "Expected sample %p, got %p.\n", sample2, ret_sample);
hr = IAsyncReader_WaitForNext(reader, 1000, &ret_sample, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_sample == sample, "Expected sample %p, got %p.\n", sample, ret_sample); - ok(cookie == 123, "Got cookie %lu.\n", cookie); + ok(cookie == 123, "Got cookie %Iu.\n", cookie); }
for (i = 0; i < 512; i++) @@ -916,9 +916,9 @@ static void test_request(IAsyncReader *reader, IMemAllocator *allocator) CloseHandle(thread);
hr = IAsyncReader_WaitForNext(reader, 1000, &ret_sample, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_sample == sample, "Samples didn't match.\n"); - ok(cookie == 123, "Got cookie %lu.\n", cookie); + ok(cookie == 123, "Got cookie %Iu.\n", cookie);
IMediaSample_Release(sample); IMediaSample_Release(sample2); @@ -930,7 +930,7 @@ static DWORD CALLBACK wait_thread(void *arg) IMediaSample *sample; DWORD_PTR cookie; HRESULT hr = IAsyncReader_WaitForNext(reader, 2000, &sample, &cookie); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr); return 0; }
@@ -950,44 +950,44 @@ static void test_flush(IAsyncReader *reader, IMemAllocator *allocator) start_time = 0; end_time = 512 * (LONGLONG)10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_BeginFlush(reader); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_SyncRead(reader, 0, 20, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 20; i++) ok(buffer[i] == i % 111, "Got wrong byte %02x at %u.\n", buffer[i], i);
start_time = 0; end_time = 512 * (LONGLONG)10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_SyncReadAligned(reader, sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 512; i++) ok(data[i] == i % 111, "Got wrong byte %02x at %u.\n", data[i], i);
hr = IAsyncReader_Request(reader, sample, 456); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IAsyncReader_EndFlush(reader); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_WaitForNext(reader, 0, &ret_sample, &cookie); - ok(hr == VFW_E_TIMEOUT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TIMEOUT, "Got hr %#lx.\n", hr);
start_time = 0; end_time = 512 * (LONGLONG)10000000; hr = IAsyncReader_Request(reader, sample, 123); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_WaitForNext(reader, 1000, &ret_sample, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_sample == sample, "Expected sample %p, got %p.\n", sample, ret_sample); - ok(cookie == 123, "Got cookie %lu.\n", cookie); + ok(cookie == 123, "Got cookie %Iu.\n", cookie);
for (i = 0; i < 512; i++) ok(data[i] == i % 111, "Got wrong byte %02x at %u.\n", data[i], i); @@ -996,12 +996,12 @@ static void test_flush(IAsyncReader *reader, IMemAllocator *allocator) ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Expected timeout.\n");
hr = IAsyncReader_BeginFlush(reader); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!WaitForSingleObject(thread, 1000), "Wait timed out.\n"); CloseHandle(thread);
hr = IAsyncReader_EndFlush(reader); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaSample_Release(sample); } @@ -1027,7 +1027,7 @@ static void test_async_reader(void) GetTempPathW(ARRAY_SIZE(filename), filename); wcscat(filename, L"test.avi"); file = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "Failed to create file, error %u.\n", GetLastError()); + ok(file != INVALID_HANDLE_VALUE, "Failed to create file, error %lu.\n", GetLastError()); for (i = 0; i < 600; i++) { BYTE b = i % 111; @@ -1040,31 +1040,31 @@ static void test_async_reader(void) IBaseFilter_FindPin(filter, L"Output", &pin);
hr = IPin_QueryInterface(pin, &IID_IAsyncReader, (void **)&reader); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IAsyncReader_Length(reader, &length, &available); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(length == 600, "Got length %s.\n", wine_dbgstr_longlong(length)); ok(available == 600, "Got available length %s.\n", wine_dbgstr_longlong(available));
memset(buffer, 0xcc, sizeof(buffer)); hr = IAsyncReader_SyncRead(reader, 0, 10, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 10; i++) ok(buffer[i] == i % 111, "Got wrong byte %02x at %u.\n", buffer[i], i);
hr = IAsyncReader_SyncRead(reader, 0, 10, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 10; i++) ok(buffer[i] == i % 111, "Got wrong byte %02x at %u.\n", buffer[i], i);
hr = IAsyncReader_SyncRead(reader, 10, 10, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < 10; i++) ok(buffer[i] == (10 + i) % 111, "Got wrong byte %02x at %u.\n", buffer[i], i);
hr = IAsyncReader_SyncRead(reader, 590, 20, buffer); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); for (i = 0; i < 10; i++) ok(buffer[i] == (590 + i) % 111, "Got wrong byte %02x at %u.\n", buffer[i], i); for (; i < 20; i++) @@ -1072,16 +1072,16 @@ static void test_async_reader(void)
memset(buffer, 0xcc, sizeof(buffer)); hr = IAsyncReader_SyncRead(reader, 600, 10, buffer); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(buffer[0] == 0xcc, "Got wrong byte %02x.\n", buffer[0]);
ret_props = req_props; hr = IAsyncReader_RequestAllocator(reader, NULL, &ret_props, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(ret_props.cBuffers == 100, "Got %d buffers.\n", ret_props.cBuffers); - ok(ret_props.cbBuffer == 1024, "Got size %d.\n", ret_props.cbBuffer); - ok(ret_props.cbAlign == 512, "Got alignment %d.\n", ret_props.cbAlign); - ok(ret_props.cbPrefix == 0, "Got prefix %d.\n", ret_props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(ret_props.cBuffers == 100, "Got %ld buffers.\n", ret_props.cBuffers); + ok(ret_props.cbBuffer == 1024, "Got size %ld.\n", ret_props.cbBuffer); + ok(ret_props.cbAlign == 512, "Got alignment %ld.\n", ret_props.cbAlign); + ok(ret_props.cbPrefix == 0, "Got prefix %ld.\n", ret_props.cbPrefix);
IMemAllocator_Commit(allocator);
@@ -1094,9 +1094,9 @@ static void test_async_reader(void) IPin_Release(pin); IFileSourceFilter_Release(filesource); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_enum_media_types(void) @@ -1115,84 +1115,84 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"Output", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); CoTaskMemFree(mts[0]); CoTaskMemFree(mts[1]);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 3, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); CoTaskMemFree(mts[0]); CoTaskMemFree(mts[1]);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 3); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]);
IEnumMediaTypes_Release(enum1); @@ -1200,9 +1200,9 @@ static void test_enum_media_types(void) IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
struct testsink @@ -1319,52 +1319,52 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(source, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
/* Test exact connection. */
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(source, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsink.pin.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsink.pin.pin.mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsink.pin.pin.peer == source, "Got peer %p.\n", testsink.pin.pin.peer); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface);
req_mt.pbFormat = &my_format; req_mt.cbFormat = sizeof(my_format); hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.pin.pin.mt, &req_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface); @@ -1373,31 +1373,31 @@ static void test_connect_pin(void)
req_mt.majortype = MEDIATYPE_Video; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Stream;
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.pin.pin.mt, &req_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface); req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_Avi;
/* Test connection with wildcards. */
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.pin.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface);
req_mt.formattype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.pin.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface); @@ -1405,22 +1405,22 @@ static void test_connect_pin(void) req_mt.formattype = FORMAT_None; req_mt.majortype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.formattype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.pin.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface);
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.pin.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface); @@ -1428,24 +1428,24 @@ static void test_connect_pin(void) req_mt.majortype = MEDIATYPE_Stream; req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.pin.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface);
req_mt.majortype = MEDIATYPE_Video; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
/* The second type (i.e. whose subtype is GUID_NULL) is not tried. This is * consistent with its being rejected by IPin::QueryAccept(). */ testsink.reject_avi = TRUE; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, NULL); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
/* But any types we expose are tried. */ testsink.mt = &mt; @@ -1454,11 +1454,11 @@ static void test_connect_pin(void) mt.subtype = MEDIASUBTYPE_RGB8; mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, NULL); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
mt.majortype = MEDIATYPE_Stream; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.pin.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.pin.pin.mt, &mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.pin.pin.IPin_iface); @@ -1467,13 +1467,13 @@ static void test_connect_pin(void) IPin_Release(source); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
START_TEST(filesource) diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index 9cc08ce8577..f644a6ae2c7 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -42,10 +42,10 @@ static WCHAR *create_file(const WCHAR *name, const char *data, DWORD size) GetTempPathW(ARRAY_SIZE(pathW), pathW); wcscat(pathW, name); file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n", + ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %lu.\n", wine_dbgstr_w(pathW), GetLastError()); WriteFile(file, data, size, &written, NULL); - ok(written = size, "Failed to write file data, error %u.\n", GetLastError()); + ok(written = size, "Failed to write file data, error %lu.\n", GetLastError()); CloseHandle(file);
return pathW; @@ -57,7 +57,7 @@ static WCHAR *load_resource(const WCHAR *name) void *ptr;
res = FindResourceW(NULL, name, (const WCHAR *)RT_RCDATA); - ok(!!res, "Failed to find resource %s, error %u.\n", wine_dbgstr_w(name), GetLastError()); + ok(!!res, "Failed to find resource %s, error %lu.\n", wine_dbgstr_w(name), GetLastError()); ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res)); return create_file(name, ptr, SizeofResource(GetModuleHandleA(NULL), res)); } @@ -67,7 +67,7 @@ static IFilterGraph2 *create_graph(void) IFilterGraph2 *ret; HRESULT hr; hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&ret); - ok(hr == S_OK, "Failed to create FilterGraph: %#x\n", hr); + ok(hr == S_OK, "Failed to create FilterGraph: %#lx\n", hr); return ret; }
@@ -88,7 +88,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); } @@ -134,202 +134,202 @@ static void test_basic_video(IFilterGraph2 *graph) HRESULT hr;
hr = IFilterGraph2_QueryInterface(graph, &IID_IBasicVideo, (void **)&pbv); - ok(hr==S_OK, "Cannot get IBasicVideo interface returned: %x\n", hr); + ok(hr==S_OK, "Cannot get IBasicVideo interface returned: %lx\n", hr);
/* test get video size */ hr = IBasicVideo_GetVideoSize(pbv, NULL, NULL); - ok(hr==E_POINTER, "IBasicVideo_GetVideoSize returned: %x\n", hr); + ok(hr==E_POINTER, "IBasicVideo_GetVideoSize returned: %lx\n", hr); hr = IBasicVideo_GetVideoSize(pbv, &video_width, NULL); - ok(hr==E_POINTER, "IBasicVideo_GetVideoSize returned: %x\n", hr); + ok(hr==E_POINTER, "IBasicVideo_GetVideoSize returned: %lx\n", hr); hr = IBasicVideo_GetVideoSize(pbv, NULL, &video_height); - ok(hr==E_POINTER, "IBasicVideo_GetVideoSize returned: %x\n", hr); + ok(hr==E_POINTER, "IBasicVideo_GetVideoSize returned: %lx\n", hr); hr = IBasicVideo_GetVideoSize(pbv, &video_width, &video_height); - ok(hr==S_OK, "Cannot get video size returned: %x\n", hr); + ok(hr==S_OK, "Cannot get video size returned: %lx\n", hr);
/* test source position */ hr = IBasicVideo_GetSourcePosition(pbv, NULL, NULL, NULL, NULL); - ok(hr == E_POINTER, "IBasicVideo_GetSourcePosition returned: %x\n", hr); + ok(hr == E_POINTER, "IBasicVideo_GetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_GetSourcePosition(pbv, &left, &top, NULL, NULL); - ok(hr == E_POINTER, "IBasicVideo_GetSourcePosition returned: %x\n", hr); + ok(hr == E_POINTER, "IBasicVideo_GetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_GetSourcePosition(pbv, NULL, NULL, &width, &height); - ok(hr == E_POINTER, "IBasicVideo_GetSourcePosition returned: %x\n", hr); + ok(hr == E_POINTER, "IBasicVideo_GetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_GetSourcePosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); - ok(left == 0, "expected 0, got %d\n", left); - ok(top == 0, "expected 0, got %d\n", top); - ok(width == video_width, "expected %d, got %d\n", video_width, width); - ok(height == video_height, "expected %d, got %d\n", video_height, height); + ok(hr == S_OK, "Cannot get source position returned: %lx\n", hr); + ok(left == 0, "expected 0, got %ld\n", left); + ok(top == 0, "expected 0, got %ld\n", top); + ok(width == video_width, "expected %ld, got %ld\n", video_width, width); + ok(height == video_height, "expected %ld, got %ld\n", video_height, height);
hr = IBasicVideo_SetSourcePosition(pbv, 0, 0, 0, 0); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_SetSourcePosition(pbv, 0, 0, video_width*2, video_height*2); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_put_SourceTop(pbv, -1); - ok(hr==E_INVALIDARG, "IBasicVideo_put_SourceTop returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_put_SourceTop returned: %lx\n", hr); hr = IBasicVideo_put_SourceTop(pbv, 0); - ok(hr==S_OK, "Cannot put source top returned: %x\n", hr); + ok(hr==S_OK, "Cannot put source top returned: %lx\n", hr); hr = IBasicVideo_put_SourceTop(pbv, 1); - ok(hr==E_INVALIDARG, "IBasicVideo_put_SourceTop returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_put_SourceTop returned: %lx\n", hr);
hr = IBasicVideo_SetSourcePosition(pbv, video_width, 0, video_width, video_height); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_SetSourcePosition(pbv, 0, video_height, video_width, video_height); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_SetSourcePosition(pbv, -1, 0, video_width, video_height); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_SetSourcePosition(pbv, 0, -1, video_width, video_height); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_SetSourcePosition(pbv, video_width/2, video_height/2, video_width, video_height); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_SetSourcePosition(pbv, video_width/2, video_height/2, video_width, video_height); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr);
hr = IBasicVideo_SetSourcePosition(pbv, 0, 0, video_width, video_height+1); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr); hr = IBasicVideo_SetSourcePosition(pbv, 0, 0, video_width+1, video_height); - ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetSourcePosition returned: %lx\n", hr);
hr = IBasicVideo_SetSourcePosition(pbv, video_width/2, video_height/2, video_width/3+1, video_height/3+1); - ok(hr==S_OK, "Cannot set source position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set source position returned: %lx\n", hr);
hr = IBasicVideo_get_SourceLeft(pbv, &left); - ok(hr==S_OK, "Cannot get source left returned: %x\n", hr); - ok(left==video_width/2, "expected %d, got %d\n", video_width/2, left); + ok(hr==S_OK, "Cannot get source left returned: %lx\n", hr); + ok(left==video_width/2, "expected %ld, got %ld\n", video_width/2, left); hr = IBasicVideo_get_SourceTop(pbv, &top); - ok(hr==S_OK, "Cannot get source top returned: %x\n", hr); - ok(top==video_height/2, "expected %d, got %d\n", video_height/2, top); + ok(hr==S_OK, "Cannot get source top returned: %lx\n", hr); + ok(top==video_height/2, "expected %ld, got %ld\n", video_height/2, top); hr = IBasicVideo_get_SourceWidth(pbv, &width); - ok(hr==S_OK, "Cannot get source width returned: %x\n", hr); - ok(width==video_width/3+1, "expected %d, got %d\n", video_width/3+1, width); + ok(hr==S_OK, "Cannot get source width returned: %lx\n", hr); + ok(width==video_width/3+1, "expected %ld, got %ld\n", video_width/3+1, width); hr = IBasicVideo_get_SourceHeight(pbv, &height); - ok(hr==S_OK, "Cannot get source height returned: %x\n", hr); - ok(height==video_height/3+1, "expected %d, got %d\n", video_height/3+1, height); + ok(hr==S_OK, "Cannot get source height returned: %lx\n", hr); + ok(height==video_height/3+1, "expected %ld, got %ld\n", video_height/3+1, height);
hr = IBasicVideo_put_SourceLeft(pbv, video_width/3); - ok(hr==S_OK, "Cannot put source left returned: %x\n", hr); + ok(hr==S_OK, "Cannot put source left returned: %lx\n", hr); hr = IBasicVideo_GetSourcePosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); - ok(left == video_width/3, "expected %d, got %d\n", video_width/3, left); - ok(width == video_width/3+1, "expected %d, got %d\n", video_width/3+1, width); + ok(hr == S_OK, "Cannot get source position returned: %lx\n", hr); + ok(left == video_width/3, "expected %ld, got %ld\n", video_width/3, left); + ok(width == video_width/3+1, "expected %ld, got %ld\n", video_width/3+1, width);
hr = IBasicVideo_put_SourceTop(pbv, video_height/3); - ok(hr==S_OK, "Cannot put source top returned: %x\n", hr); + ok(hr==S_OK, "Cannot put source top returned: %lx\n", hr); hr = IBasicVideo_GetSourcePosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); - ok(top == video_height/3, "expected %d, got %d\n", video_height/3, top); - ok(height == video_height/3+1, "expected %d, got %d\n", video_height/3+1, height); + ok(hr == S_OK, "Cannot get source position returned: %lx\n", hr); + ok(top == video_height/3, "expected %ld, got %ld\n", video_height/3, top); + ok(height == video_height/3+1, "expected %ld, got %ld\n", video_height/3+1, height);
hr = IBasicVideo_put_SourceWidth(pbv, video_width/4+1); - ok(hr==S_OK, "Cannot put source width returned: %x\n", hr); + ok(hr==S_OK, "Cannot put source width returned: %lx\n", hr); hr = IBasicVideo_GetSourcePosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); - ok(left == video_width/3, "expected %d, got %d\n", video_width/3, left); - ok(width == video_width/4+1, "expected %d, got %d\n", video_width/4+1, width); + ok(hr == S_OK, "Cannot get source position returned: %lx\n", hr); + ok(left == video_width/3, "expected %ld, got %ld\n", video_width/3, left); + ok(width == video_width/4+1, "expected %ld, got %ld\n", video_width/4+1, width);
hr = IBasicVideo_put_SourceHeight(pbv, video_height/4+1); - ok(hr==S_OK, "Cannot put source height returned: %x\n", hr); + ok(hr==S_OK, "Cannot put source height returned: %lx\n", hr); hr = IBasicVideo_GetSourcePosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); - ok(top == video_height/3, "expected %d, got %d\n", video_height/3, top); - ok(height == video_height/4+1, "expected %d, got %d\n", video_height/4+1, height); + ok(hr == S_OK, "Cannot get source position returned: %lx\n", hr); + ok(top == video_height/3, "expected %ld, got %ld\n", video_height/3, top); + ok(height == video_height/4+1, "expected %ld, got %ld\n", video_height/4+1, height);
/* test destination rectangle */ window_width = max(video_width, GetSystemMetrics(SM_CXMIN) - 2 * GetSystemMetrics(SM_CXFRAME));
hr = IBasicVideo_GetDestinationPosition(pbv, NULL, NULL, NULL, NULL); - ok(hr == E_POINTER, "IBasicVideo_GetDestinationPosition returned: %x\n", hr); + ok(hr == E_POINTER, "IBasicVideo_GetDestinationPosition returned: %lx\n", hr); hr = IBasicVideo_GetDestinationPosition(pbv, &left, &top, NULL, NULL); - ok(hr == E_POINTER, "IBasicVideo_GetDestinationPosition returned: %x\n", hr); + ok(hr == E_POINTER, "IBasicVideo_GetDestinationPosition returned: %lx\n", hr); hr = IBasicVideo_GetDestinationPosition(pbv, NULL, NULL, &width, &height); - ok(hr == E_POINTER, "IBasicVideo_GetDestinationPosition returned: %x\n", hr); + ok(hr == E_POINTER, "IBasicVideo_GetDestinationPosition returned: %lx\n", hr); hr = IBasicVideo_GetDestinationPosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get destination position returned: %x\n", hr); - ok(left == 0, "expected 0, got %d\n", left); - ok(top == 0, "expected 0, got %d\n", top); - ok(width == window_width, "expected %d, got %d\n", window_width, width); - ok(height == video_height, "expected %d, got %d\n", video_height, height); + ok(hr == S_OK, "Cannot get destination position returned: %lx\n", hr); + ok(left == 0, "expected 0, got %ld\n", left); + ok(top == 0, "expected 0, got %ld\n", top); + ok(width == window_width, "expected %ld, got %ld\n", window_width, width); + ok(height == video_height, "expected %ld, got %ld\n", video_height, height);
hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, 0, 0); - ok(hr==E_INVALIDARG, "IBasicVideo_SetDestinationPosition returned: %x\n", hr); + ok(hr==E_INVALIDARG, "IBasicVideo_SetDestinationPosition returned: %lx\n", hr); hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, video_width*2, video_height*2); - ok(hr==S_OK, "Cannot put destination position returned: %x\n", hr); + ok(hr==S_OK, "Cannot put destination position returned: %lx\n", hr);
hr = IBasicVideo_put_DestinationLeft(pbv, -1); - ok(hr==S_OK, "Cannot put destination left returned: %x\n", hr); + ok(hr==S_OK, "Cannot put destination left returned: %lx\n", hr); hr = IBasicVideo_put_DestinationLeft(pbv, 0); - ok(hr==S_OK, "Cannot put destination left returned: %x\n", hr); + ok(hr==S_OK, "Cannot put destination left returned: %lx\n", hr); hr = IBasicVideo_put_DestinationLeft(pbv, 1); - ok(hr==S_OK, "Cannot put destination left returned: %x\n", hr); + ok(hr==S_OK, "Cannot put destination left returned: %lx\n", hr);
hr = IBasicVideo_SetDestinationPosition(pbv, video_width, 0, video_width, video_height); - ok(hr==S_OK, "Cannot set destinaiton position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destinaiton position returned: %lx\n", hr); hr = IBasicVideo_SetDestinationPosition(pbv, 0, video_height, video_width, video_height); - ok(hr==S_OK, "Cannot set destinaiton position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destinaiton position returned: %lx\n", hr); hr = IBasicVideo_SetDestinationPosition(pbv, -1, 0, video_width, video_height); - ok(hr==S_OK, "Cannot set destination position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destination position returned: %lx\n", hr); hr = IBasicVideo_SetDestinationPosition(pbv, 0, -1, video_width, video_height); - ok(hr==S_OK, "Cannot set destination position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destination position returned: %lx\n", hr); hr = IBasicVideo_SetDestinationPosition(pbv, video_width/2, video_height/2, video_width, video_height); - ok(hr==S_OK, "Cannot set destination position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destination position returned: %lx\n", hr); hr = IBasicVideo_SetDestinationPosition(pbv, video_width/2, video_height/2, video_width, video_height); - ok(hr==S_OK, "Cannot set destination position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destination position returned: %lx\n", hr);
hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, video_width, video_height+1); - ok(hr==S_OK, "Cannot set destination position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destination position returned: %lx\n", hr); hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, video_width+1, video_height); - ok(hr==S_OK, "Cannot set destination position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destination position returned: %lx\n", hr);
hr = IBasicVideo_SetDestinationPosition(pbv, video_width/2, video_height/2, video_width/3+1, video_height/3+1); - ok(hr==S_OK, "Cannot set destination position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destination position returned: %lx\n", hr);
hr = IBasicVideo_get_DestinationLeft(pbv, &left); - ok(hr==S_OK, "Cannot get destination left returned: %x\n", hr); - ok(left==video_width/2, "expected %d, got %d\n", video_width/2, left); + ok(hr==S_OK, "Cannot get destination left returned: %lx\n", hr); + ok(left==video_width/2, "expected %ld, got %ld\n", video_width/2, left); hr = IBasicVideo_get_DestinationTop(pbv, &top); - ok(hr==S_OK, "Cannot get destination top returned: %x\n", hr); - ok(top==video_height/2, "expected %d, got %d\n", video_height/2, top); + ok(hr==S_OK, "Cannot get destination top returned: %lx\n", hr); + ok(top==video_height/2, "expected %ld, got %ld\n", video_height/2, top); hr = IBasicVideo_get_DestinationWidth(pbv, &width); - ok(hr==S_OK, "Cannot get destination width returned: %x\n", hr); - ok(width==video_width/3+1, "expected %d, got %d\n", video_width/3+1, width); + ok(hr==S_OK, "Cannot get destination width returned: %lx\n", hr); + ok(width==video_width/3+1, "expected %ld, got %ld\n", video_width/3+1, width); hr = IBasicVideo_get_DestinationHeight(pbv, &height); - ok(hr==S_OK, "Cannot get destination height returned: %x\n", hr); - ok(height==video_height/3+1, "expected %d, got %d\n", video_height/3+1, height); + ok(hr==S_OK, "Cannot get destination height returned: %lx\n", hr); + ok(height==video_height/3+1, "expected %ld, got %ld\n", video_height/3+1, height);
hr = IBasicVideo_put_DestinationLeft(pbv, video_width/3); - ok(hr==S_OK, "Cannot put destination left returned: %x\n", hr); + ok(hr==S_OK, "Cannot put destination left returned: %lx\n", hr); hr = IBasicVideo_GetDestinationPosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); - ok(left == video_width/3, "expected %d, got %d\n", video_width/3, left); - ok(width == video_width/3+1, "expected %d, got %d\n", video_width/3+1, width); + ok(hr == S_OK, "Cannot get source position returned: %lx\n", hr); + ok(left == video_width/3, "expected %ld, got %ld\n", video_width/3, left); + ok(width == video_width/3+1, "expected %ld, got %ld\n", video_width/3+1, width);
hr = IBasicVideo_put_DestinationTop(pbv, video_height/3); - ok(hr==S_OK, "Cannot put destination top returned: %x\n", hr); + ok(hr==S_OK, "Cannot put destination top returned: %lx\n", hr); hr = IBasicVideo_GetDestinationPosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); - ok(top == video_height/3, "expected %d, got %d\n", video_height/3, top); - ok(height == video_height/3+1, "expected %d, got %d\n", video_height/3+1, height); + ok(hr == S_OK, "Cannot get source position returned: %lx\n", hr); + ok(top == video_height/3, "expected %ld, got %ld\n", video_height/3, top); + ok(height == video_height/3+1, "expected %ld, got %ld\n", video_height/3+1, height);
hr = IBasicVideo_put_DestinationWidth(pbv, video_width/4+1); - ok(hr==S_OK, "Cannot put destination width returned: %x\n", hr); + ok(hr==S_OK, "Cannot put destination width returned: %lx\n", hr); hr = IBasicVideo_GetDestinationPosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); - ok(left == video_width/3, "expected %d, got %d\n", video_width/3, left); - ok(width == video_width/4+1, "expected %d, got %d\n", video_width/4+1, width); + ok(hr == S_OK, "Cannot get source position returned: %lx\n", hr); + ok(left == video_width/3, "expected %ld, got %ld\n", video_width/3, left); + ok(width == video_width/4+1, "expected %ld, got %ld\n", video_width/4+1, width);
hr = IBasicVideo_put_DestinationHeight(pbv, video_height/4+1); - ok(hr==S_OK, "Cannot put destination height returned: %x\n", hr); + ok(hr==S_OK, "Cannot put destination height returned: %lx\n", hr); hr = IBasicVideo_GetDestinationPosition(pbv, &left, &top, &width, &height); - ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); - ok(top == video_height/3, "expected %d, got %d\n", video_height/3, top); - ok(height == video_height/4+1, "expected %d, got %d\n", video_height/4+1, height); + ok(hr == S_OK, "Cannot get source position returned: %lx\n", hr); + ok(top == video_height/3, "expected %ld, got %ld\n", video_height/3, top); + ok(height == video_height/4+1, "expected %ld, got %ld\n", video_height/4+1, height);
/* reset source rectangle */ hr = IBasicVideo_SetDefaultSourcePosition(pbv); - ok(hr==S_OK, "IBasicVideo_SetDefaultSourcePosition returned: %x\n", hr); + ok(hr==S_OK, "IBasicVideo_SetDefaultSourcePosition returned: %lx\n", hr);
/* reset destination position */ hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, video_width, video_height); - ok(hr==S_OK, "Cannot set destination position returned: %x\n", hr); + ok(hr==S_OK, "Cannot set destination position returned: %lx\n", hr);
IBasicVideo_Release(pbv); } @@ -344,57 +344,57 @@ static void test_media_seeking(IFilterGraph2 *graph)
IFilterGraph2_SetDefaultSyncSource(graph); hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaSeeking, (void **)&seeking); - ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %08lx\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter); - ok(hr == S_OK, "QueryInterface(IMediaFilter) failed: %08x\n", hr); + ok(hr == S_OK, "QueryInterface(IMediaFilter) failed: %08lx\n", hr);
format = GUID_NULL; hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "GetTimeFormat failed: %#x\n", hr); + ok(hr == S_OK, "GetTimeFormat failed: %#lx\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "got %s\n", wine_dbgstr_guid(&format));
pos = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, NULL, 0x123456789a, NULL); - ok(hr == S_OK, "ConvertTimeFormat failed: %#x\n", hr); + ok(hr == S_OK, "ConvertTimeFormat failed: %#lx\n", hr); ok(pos == 0x123456789a, "got %s\n", wine_dbgstr_longlong(pos));
pos = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, NULL); - ok(hr == S_OK, "ConvertTimeFormat failed: %#x\n", hr); + ok(hr == S_OK, "ConvertTimeFormat failed: %#lx\n", hr); ok(pos == 0x123456789a, "got %s\n", wine_dbgstr_longlong(pos));
pos = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &pos, NULL, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "ConvertTimeFormat failed: %#x\n", hr); + ok(hr == S_OK, "ConvertTimeFormat failed: %#lx\n", hr); ok(pos == 0x123456789a, "got %s\n", wine_dbgstr_longlong(pos));
hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); - ok(hr == S_OK, "GetCurrentPosition failed: %#x\n", hr); + ok(hr == S_OK, "GetCurrentPosition failed: %#lx\n", hr); ok(pos == 0, "got %s\n", wine_dbgstr_longlong(pos));
hr = IMediaSeeking_GetDuration(seeking, &duration); - ok(hr == S_OK, "GetDuration failed: %#x\n", hr); + ok(hr == S_OK, "GetDuration failed: %#lx\n", hr); ok(duration > 0, "got %s\n", wine_dbgstr_longlong(duration));
hr = IMediaSeeking_GetStopPosition(seeking, &stop); - ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); + ok(hr == S_OK, "GetCurrentPosition failed: %08lx\n", hr); ok(stop == duration || stop == duration + 1, "expected %s, got %s\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop));
hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_ReturnTime, NULL, AM_SEEKING_NoPositioning); - ok(hr == S_OK, "SetPositions failed: %#x\n", hr); + ok(hr == S_OK, "SetPositions failed: %#lx\n", hr); hr = IMediaSeeking_SetPositions(seeking, NULL, AM_SEEKING_NoPositioning, NULL, AM_SEEKING_ReturnTime); - ok(hr == S_OK, "SetPositions failed: %#x\n", hr); + ok(hr == S_OK, "SetPositions failed: %#lx\n", hr);
pos = 0; hr = IMediaSeeking_SetPositions(seeking, &pos, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); - ok(hr == S_OK, "SetPositions failed: %08x\n", hr); + ok(hr == S_OK, "SetPositions failed: %08lx\n", hr);
IMediaFilter_SetSyncSource(filter, NULL); pos = 0xdeadbeef; hr = IMediaSeeking_GetCurrentPosition(seeking, &pos); - ok(hr == S_OK, "GetCurrentPosition failed: %08x\n", hr); + ok(hr == S_OK, "GetCurrentPosition failed: %08lx\n", hr); ok(pos == 0, "Position != 0 (%s)\n", wine_dbgstr_longlong(pos)); IFilterGraph2_SetDefaultSyncSource(graph);
@@ -409,47 +409,47 @@ static void test_state_change(IFilterGraph2 *graph) HRESULT hr;
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); - ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %x\n", hr); + ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %lx\n", hr);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "GetState() failed: %x\n", hr); - ok(state == State_Stopped, "wrong state %d\n", state); + ok(hr == S_OK, "GetState() failed: %lx\n", hr); + ok(state == State_Stopped, "wrong state %ld\n", state);
hr = IMediaControl_Run(control); - ok(SUCCEEDED(hr), "Run() failed: %x\n", hr); + ok(SUCCEEDED(hr), "Run() failed: %lx\n", hr); hr = IMediaControl_GetState(control, INFINITE, &state); - ok(SUCCEEDED(hr), "GetState() failed: %x\n", hr); - ok(state == State_Running, "wrong state %d\n", state); + ok(SUCCEEDED(hr), "GetState() failed: %lx\n", hr); + ok(state == State_Running, "wrong state %ld\n", state);
hr = IMediaControl_Stop(control); - ok(SUCCEEDED(hr), "Stop() failed: %x\n", hr); + ok(SUCCEEDED(hr), "Stop() failed: %lx\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "GetState() failed: %x\n", hr); - ok(state == State_Stopped, "wrong state %d\n", state); + ok(hr == S_OK, "GetState() failed: %lx\n", hr); + ok(state == State_Stopped, "wrong state %ld\n", state);
hr = IMediaControl_Pause(control); - ok(SUCCEEDED(hr), "Pause() failed: %x\n", hr); + ok(SUCCEEDED(hr), "Pause() failed: %lx\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "GetState() failed: %x\n", hr); - ok(state == State_Paused, "wrong state %d\n", state); + ok(hr == S_OK, "GetState() failed: %lx\n", hr); + ok(state == State_Paused, "wrong state %ld\n", state);
hr = IMediaControl_Run(control); - ok(SUCCEEDED(hr), "Run() failed: %x\n", hr); + ok(SUCCEEDED(hr), "Run() failed: %lx\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "GetState() failed: %x\n", hr); - ok(state == State_Running, "wrong state %d\n", state); + ok(hr == S_OK, "GetState() failed: %lx\n", hr); + ok(state == State_Running, "wrong state %ld\n", state);
hr = IMediaControl_Pause(control); - ok(SUCCEEDED(hr), "Pause() failed: %x\n", hr); + ok(SUCCEEDED(hr), "Pause() failed: %lx\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "GetState() failed: %x\n", hr); - ok(state == State_Paused, "wrong state %d\n", state); + ok(hr == S_OK, "GetState() failed: %lx\n", hr); + ok(state == State_Paused, "wrong state %ld\n", state);
hr = IMediaControl_Stop(control); - ok(SUCCEEDED(hr), "Stop() failed: %x\n", hr); + ok(SUCCEEDED(hr), "Stop() failed: %lx\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "GetState() failed: %x\n", hr); - ok(state == State_Stopped, "wrong state %d\n", state); + ok(hr == S_OK, "GetState() failed: %lx\n", hr); + ok(state == State_Stopped, "wrong state %ld\n", state);
IMediaControl_Release(control); } @@ -469,33 +469,33 @@ static void test_media_event(IFilterGraph2 *graph) LONG code;
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter); - ok(hr == S_OK, "QueryInterface(IMediaFilter) failed: %#x\n", hr); + ok(hr == S_OK, "QueryInterface(IMediaFilter) failed: %#lx\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); - ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %#x\n", hr); + ok(hr == S_OK, "QueryInterface(IMediaControl) failed: %#lx\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&media_event); - ok(hr == S_OK, "QueryInterface(IMediaEvent) failed: %#x\n", hr); + ok(hr == S_OK, "QueryInterface(IMediaEvent) failed: %#lx\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaSeeking, (void **)&seeking); - ok(hr == S_OK, "QueryInterface(IMediaEvent) failed: %#x\n", hr); + ok(hr == S_OK, "QueryInterface(IMediaEvent) failed: %#lx\n", hr);
hr = IMediaControl_Stop(control); - ok(SUCCEEDED(hr), "Stop() failed: %#x\n", hr); + ok(SUCCEEDED(hr), "Stop() failed: %#lx\n", hr); hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "GetState() timed out\n");
hr = IMediaSeeking_GetDuration(seeking, &stop); - ok(hr == S_OK, "GetDuration() failed: %#x\n", hr); + ok(hr == S_OK, "GetDuration() failed: %#lx\n", hr); current = 0; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "SetPositions() failed: %#x\n", hr); + ok(hr == S_OK, "SetPositions() failed: %#lx\n", hr);
hr = IMediaFilter_SetSyncSource(filter, NULL); - ok(hr == S_OK, "SetSyncSource() failed: %#x\n", hr); + ok(hr == S_OK, "SetSyncSource() failed: %#lx\n", hr);
hr = IMediaEvent_GetEventHandle(media_event, (OAEVENT *)&event); - ok(hr == S_OK, "GetEventHandle() failed: %#x\n", hr); + ok(hr == S_OK, "GetEventHandle() failed: %#lx\n", hr);
/* flush existing events */ while ((hr = IMediaEvent_GetEvent(media_event, &code, &lparam1, &lparam2, 0)) == S_OK); @@ -503,7 +503,7 @@ static void test_media_event(IFilterGraph2 *graph) ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "event should not be signaled\n");
hr = IMediaControl_Run(control); - ok(SUCCEEDED(hr), "Run() failed: %#x\n", hr); + ok(SUCCEEDED(hr), "Run() failed: %#lx\n", hr);
while (!got_eos) { @@ -522,16 +522,16 @@ static void test_media_event(IFilterGraph2 *graph) ok(got_eos, "didn't get EOS\n");
hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); - ok(hr == S_OK, "GetCurrentPosition() failed: %#x\n", hr); + ok(hr == S_OK, "GetCurrentPosition() failed: %#lx\n", hr); ok(current == stop, "expected %s, got %s\n", wine_dbgstr_longlong(stop), wine_dbgstr_longlong(current));
hr = IMediaControl_Stop(control); - ok(SUCCEEDED(hr), "Run() failed: %#x\n", hr); + ok(SUCCEEDED(hr), "Run() failed: %#lx\n", hr); hr = IMediaControl_GetState(control, 1000, &state); ok(hr == S_OK, "GetState() timed out\n");
hr = IFilterGraph2_SetDefaultSyncSource(graph); - ok(hr == S_OK, "SetDefaultSinkSource() failed: %#x\n", hr); + ok(hr == S_OK, "SetDefaultSinkSource() failed: %#lx\n", hr);
IMediaSeeking_Release(seeking); IMediaEvent_Release(media_event); @@ -564,7 +564,7 @@ static HRESULT test_graph_builder_connect_file(WCHAR *filename, BOOL audio, BOOL &IID_IBaseFilter, (void **)&renderer); if (hr == VFW_E_NO_AUDIO_HARDWARE) return VFW_E_CANNOT_CONNECT; - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph = create_graph();
@@ -573,13 +573,13 @@ static HRESULT test_graph_builder_connect_file(WCHAR *filename, BOOL audio, BOOL IEnumPins_Release(enumpins);
hr = IFilterGraph2_AddSourceFilter(graph, filename, NULL, &source_filter); - ok(hr == S_OK, "AddSourceFilter failed: %#x\n", hr); + ok(hr == S_OK, "AddSourceFilter failed: %#lx\n", hr);
hr = IFilterGraph2_AddFilter(graph, renderer, NULL); - ok(hr == S_OK, "AddFilter failed: %#x\n", hr); + ok(hr == S_OK, "AddFilter failed: %#lx\n", hr);
hr = IBaseFilter_FindPin(source_filter, L"Output", &pin_out); - ok(hr == S_OK, "FindPin failed: %#x\n", hr); + ok(hr == S_OK, "FindPin failed: %#lx\n", hr); hr = IFilterGraph2_Connect(graph, pin_out, pin_in);
if (SUCCEEDED(hr)) @@ -620,32 +620,32 @@ static void test_render_run(const WCHAR *file, BOOL audio, BOOL video) skip("%s: codec not supported; skipping test\n", wine_dbgstr_w(file));
refs = IFilterGraph2_Release(graph); - ok(!refs, "Graph has %u references\n", refs); + ok(!refs, "Graph has %lu references\n", refs);
hr = test_graph_builder_connect_file(filename, audio, video); - ok(hr == VFW_E_CANNOT_CONNECT, "got %#x\n", hr); + ok(hr == VFW_E_CANNOT_CONNECT, "got %#lx\n", hr); } else { if (audio) - ok(hr == S_OK || hr == VFW_S_AUDIO_NOT_RENDERED, "Got hr %#x.\n", hr); + ok(hr == S_OK || hr == VFW_S_AUDIO_NOT_RENDERED, "Got hr %#lx.\n", hr); else - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); rungraph(graph, video);
refs = IFilterGraph2_Release(graph); - ok(!refs, "Graph has %u references\n", refs); + ok(!refs, "Graph has %lu references\n", refs);
hr = test_graph_builder_connect_file(filename, audio, video); if (audio && video) - todo_wine ok(hr == VFW_S_PARTIAL_RENDER, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_PARTIAL_RENDER, "Got hr %#lx.\n", hr); else - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
/* check reference leaks */ h = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL); - ok(h != INVALID_HANDLE_VALUE, "CreateFile failed: err=%d\n", GetLastError()); + ok(h != INVALID_HANDLE_VALUE, "CreateFile failed: err=%ld\n", GetLastError()); CloseHandle(h);
DeleteFileW(filename); @@ -665,74 +665,74 @@ static void test_enum_filters(void) &IID_IBaseFilter, (void **)&filter2);
hr = IFilterGraph2_EnumFilters(graph, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Next(enum1, 1, filters, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum1, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum1, 1); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
IFilterGraph2_AddFilter(graph, filter1, NULL); IFilterGraph2_AddFilter(graph, filter2, NULL);
hr = IEnumFilters_Next(enum1, 1, filters, NULL); - ok(hr == VFW_E_ENUM_OUT_OF_SYNC, "Got hr %#x.\n", hr); + ok(hr == VFW_E_ENUM_OUT_OF_SYNC, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum1, 1); - ok(hr == VFW_E_ENUM_OUT_OF_SYNC, "Got hr %#x.\n", hr); + ok(hr == VFW_E_ENUM_OUT_OF_SYNC, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum1, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum1, 1); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum1, 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum1, 1); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Next(enum1, 1, filters, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filters[0] == filter2, "Got filter %p.\n", filters[0]); IBaseFilter_Release(filters[0]);
hr = IEnumFilters_Next(enum1, 1, filters, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); ok(filters[0] == filter1, "Got filter %p.\n", filters[0]); IBaseFilter_Release(filters[0]);
hr = IEnumFilters_Next(enum1, 1, filters, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 0, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 0, "Got count %lu.\n", count);
hr = IEnumFilters_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Next(enum1, 2, filters, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); ok(filters[0] == filter2, "Got filter %p.\n", filters[0]); ok(filters[1] == filter1, "Got filter %p.\n", filters[1]); IBaseFilter_Release(filters[0]); @@ -742,41 +742,41 @@ static void test_enum_filters(void) IFilterGraph2_AddFilter(graph, filter1, NULL);
hr = IEnumFilters_Next(enum1, 2, filters, &count); - ok(hr == VFW_E_ENUM_OUT_OF_SYNC, "Got hr %#x.\n", hr); + ok(hr == VFW_E_ENUM_OUT_OF_SYNC, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Next(enum1, 2, filters, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); ok(filters[0] == filter1, "Got filter %p.\n", filters[0]); ok(filters[1] == filter2, "Got filter %p.\n", filters[1]); IBaseFilter_Release(filters[0]); IBaseFilter_Release(filters[1]);
hr = IEnumFilters_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Skip(enum2, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Next(enum2, 2, filters, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); ok(filters[0] == filter2, "Got filter %p.\n", filters[0]); IBaseFilter_Release(filters[0]);
hr = IEnumFilters_Skip(enum1, 3); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumFilters_Release(enum2); IEnumFilters_Release(enum1); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static DWORD WINAPI call_RenderFile_multithread(LPVOID lParam) @@ -786,7 +786,7 @@ static DWORD WINAPI call_RenderFile_multithread(LPVOID lParam) HRESULT hr;
hr = IFilterGraph2_RenderFile(graph, filename, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
rungraph(graph, TRUE);
@@ -1434,7 +1434,7 @@ static HRESULT WINAPI testfilter_Run(IBaseFilter *iface, REFERENCE_TIME start) static HRESULT WINAPI testfilter_GetState(IBaseFilter *iface, DWORD timeout, FILTER_STATE *state) { struct testfilter *filter = impl_from_IBaseFilter(iface); - if (winetest_debug > 1) trace("%p->GetState(%u)\n", filter, timeout); + if (winetest_debug > 1) trace("%p->GetState(%lu)\n", filter, timeout);
*state = filter->state; return filter->GetState_hr; @@ -1679,7 +1679,7 @@ static HRESULT WINAPI testseek_SetPositions(IMediaSeeking *iface, LONGLONG *curr DWORD current_flags, LONGLONG *stop, DWORD stop_flags ) { struct testfilter *filter = impl_from_IMediaSeeking(iface); - if (winetest_debug > 1) trace("%p->SetPositions(%s, %#x, %s, %#x)\n", + if (winetest_debug > 1) trace("%p->SetPositions(%s, %#lx, %s, %#lx)\n", iface, wine_dbgstr_longlong(*current), current_flags, wine_dbgstr_longlong(*stop), stop_flags); ok(filter->state != State_Running, "Filter should be paused or stopped while seeking.\n"); filter->seek_current = *current; @@ -2093,7 +2093,7 @@ static void test_graph_builder_render(void) IFilterGraph2_AddFilter(graph, &sink2.IBaseFilter_iface, NULL);
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink2_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); @@ -2102,7 +2102,7 @@ static void test_graph_builder_render(void) IFilterGraph2_AddFilter(graph, &sink1.IBaseFilter_iface, NULL);
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink1_pin.IPin_iface, "Got peer %p.\n", source_pin.peer);
IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); @@ -2113,7 +2113,7 @@ static void test_graph_builder_render(void) IFilterGraph2_AddFilter(graph, &parser.IBaseFilter_iface, NULL);
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(parser_pins[1].peer == &sink1_pin.IPin_iface, "Got peer %p.\n", parser_pins[1].peer); IFilterGraph2_Disconnect(graph, source_pin.peer); @@ -2125,7 +2125,7 @@ static void test_graph_builder_render(void) IFilterGraph2_AddFilter(graph, &sink1.IBaseFilter_iface, NULL);
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink1_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); @@ -2138,7 +2138,7 @@ static void test_graph_builder_render(void)
parser_pins[1].name[0] = '~'; hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!parser_pins[1].peer, "Got peer %p.\n", parser_pins[1].peer); ok(!sink1_pin.peer, "Got peer %p.\n", sink1_pin.peer); @@ -2148,14 +2148,14 @@ static void test_graph_builder_render(void) parser_pins[1].name[0] = 0; parser_pins[1].id[0] = '~'; hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(parser_pins[1].peer == &sink1_pin.IPin_iface, "Got peer %p.\n", parser_pins[1].peer); IFilterGraph2_Disconnect(graph, source_pin.peer); IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Test enumeration of filters from the registry. */
@@ -2183,7 +2183,7 @@ static void test_graph_builder_render(void) skip("Not enough permission to register filters.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph = create_graph(); IFilterGraph2_AddFilter(graph, &source.IBaseFilter_iface, NULL); @@ -2192,12 +2192,12 @@ static void test_graph_builder_render(void) IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, L"test", NULL, NULL, NULL, ®filter);
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink2_pin.IPin_iface || source_pin.peer == &sink1_pin.IPin_iface, "Got peer %p.\n", source_pin.peer);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Preference is given to filters already in the graph. */
@@ -2206,11 +2206,11 @@ static void test_graph_builder_render(void) IFilterGraph2_AddFilter(graph, &sink2.IBaseFilter_iface, NULL);
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink2_pin.IPin_iface, "Got peer %p.\n", source_pin.peer);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* No preference is given to renderer filters. */
@@ -2225,12 +2225,12 @@ static void test_graph_builder_render(void) IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, L"test", NULL, NULL, NULL, ®filter);
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink2_pin.IPin_iface || source_pin.peer == &sink1_pin.IPin_iface, "Got peer %p.\n", source_pin.peer);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Preference is given to filters with higher merit. */
@@ -2246,11 +2246,11 @@ static void test_graph_builder_render(void) IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, L"test", NULL, NULL, NULL, ®filter);
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink2_pin.IPin_iface, "Got peer %p.\n", source_pin.peer);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
graph = create_graph(); IFilterGraph2_AddFilter(graph, &source.IBaseFilter_iface, NULL); @@ -2264,11 +2264,11 @@ static void test_graph_builder_render(void) IFilterMapper2_RegisterFilter(mapper, &sink2_clsid, L"test", NULL, NULL, NULL, ®filter);
hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink1_pin.IPin_iface, "Got peer %p.\n", source_pin.peer);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Test AM_RENDEREX_RENDERTOEXISTINGRENDERERS. */
@@ -2276,16 +2276,16 @@ static void test_graph_builder_render(void) IFilterGraph2_AddFilter(graph, &source.IBaseFilter_iface, NULL);
hr = IFilterGraph2_RenderEx(graph, &source_pin.IPin_iface, AM_RENDEREX_RENDERTOEXISTINGRENDERERS, NULL); - ok(hr == VFW_E_CANNOT_RENDER, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CANNOT_RENDER, "Got hr %#lx.\n", hr);
IFilterGraph2_AddFilter(graph, &sink1.IBaseFilter_iface, NULL);
hr = IFilterGraph2_RenderEx(graph, &source_pin.IPin_iface, AM_RENDEREX_RENDERTOEXISTINGRENDERERS, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink1_pin.IPin_iface, "Got peer %p.\n", source_pin.peer);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &sink1_clsid); IFilterMapper2_UnregisterFilter(mapper, NULL, NULL, &sink2_clsid); @@ -2294,15 +2294,15 @@ out: CoRevokeClassObject(cookie1); CoRevokeClassObject(cookie2); IFilterMapper2_Release(mapper); - ok(source.ref == 1, "Got outstanding refcount %d.\n", source.ref); - ok(source_pin.ref == 1, "Got outstanding refcount %d.\n", source_pin.ref); - ok(sink1.ref == 1, "Got outstanding refcount %d.\n", sink1.ref); - ok(sink1_pin.ref == 1, "Got outstanding refcount %d.\n", sink1_pin.ref); - ok(sink2.ref == 1, "Got outstanding refcount %d.\n", sink2.ref); - ok(sink2_pin.ref == 1, "Got outstanding refcount %d.\n", sink2_pin.ref); - ok(parser.ref == 1, "Got outstanding refcount %d.\n", parser.ref); - ok(parser_pins[0].ref == 1, "Got outstanding refcount %d.\n", parser_pins[0].ref); - ok(parser_pins[1].ref == 1, "Got outstanding refcount %d.\n", parser_pins[1].ref); + ok(source.ref == 1, "Got outstanding refcount %ld.\n", source.ref); + ok(source_pin.ref == 1, "Got outstanding refcount %ld.\n", source_pin.ref); + ok(sink1.ref == 1, "Got outstanding refcount %ld.\n", sink1.ref); + ok(sink1_pin.ref == 1, "Got outstanding refcount %ld.\n", sink1_pin.ref); + ok(sink2.ref == 1, "Got outstanding refcount %ld.\n", sink2.ref); + ok(sink2_pin.ref == 1, "Got outstanding refcount %ld.\n", sink2_pin.ref); + ok(parser.ref == 1, "Got outstanding refcount %ld.\n", parser.ref); + ok(parser_pins[0].ref == 1, "Got outstanding refcount %ld.\n", parser_pins[0].ref); + ok(parser_pins[1].ref == 1, "Got outstanding refcount %ld.\n", parser_pins[1].ref); }
static void test_graph_builder_connect(void) @@ -2357,7 +2357,7 @@ static void test_graph_builder_connect(void) IFilterGraph2_AddFilter(graph, &sink.IBaseFilter_iface, NULL);
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); @@ -2366,7 +2366,7 @@ static void test_graph_builder_connect(void) ++source_pin.Connect_hr) { hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == source_pin.Connect_hr, "Got hr %#x for Connect() hr %#x.\n", + ok(hr == source_pin.Connect_hr, "Got hr %#lx for Connect() hr %#lx.\n", hr, source_pin.Connect_hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); @@ -2376,7 +2376,7 @@ static void test_graph_builder_connect(void)
sink_pin.accept_mt = &sink_type; hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#lx.\n", hr); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer);
for (source_pin.Connect_hr = 0x80040200; source_pin.Connect_hr <= 0x800402ff; @@ -2385,10 +2385,10 @@ static void test_graph_builder_connect(void) hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); if (source_pin.Connect_hr == VFW_E_NOT_CONNECTED || source_pin.Connect_hr == VFW_E_NO_AUDIO_HARDWARE) - ok(hr == source_pin.Connect_hr, "Got hr %#x for Connect() hr %#x.\n", + ok(hr == source_pin.Connect_hr, "Got hr %#lx for Connect() hr %#lx.\n", hr, source_pin.Connect_hr); else - ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x for Connect() hr %#x.\n", + ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#lx for Connect() hr %#lx.\n", hr, source_pin.Connect_hr); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer); @@ -2399,7 +2399,7 @@ static void test_graph_builder_connect(void) ++source_pin.EnumMediaTypes_hr) { hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == source_pin.EnumMediaTypes_hr, "Got hr %#x for EnumMediaTypes() hr %#x.\n", + ok(hr == source_pin.EnumMediaTypes_hr, "Got hr %#lx for EnumMediaTypes() hr %#lx.\n", hr, source_pin.EnumMediaTypes_hr); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer); @@ -2414,14 +2414,14 @@ static void test_graph_builder_connect(void)
sink_pin.accept_mt = NULL; hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface);
sink_pin.accept_mt = &sink_type; hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser2_pins[1].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser2_pins[0].IPin_iface, "Got peer %p.\n", sink_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); @@ -2433,7 +2433,7 @@ static void test_graph_builder_connect(void) ++source_pin.Connect_hr) { hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x for Connect() hr %#x.\n", hr, source_pin.Connect_hr); + ok(hr == S_OK, "Got hr %#lx for Connect() hr %#lx.\n", hr, source_pin.Connect_hr); ok(source_pin.peer == &parser2_pins[1].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser2_pins[0].IPin_iface, "Got peer %p.\n", sink_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); @@ -2447,7 +2447,7 @@ static void test_graph_builder_connect(void) IFilterGraph2_AddFilter(graph, &parser1.IBaseFilter_iface, NULL);
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser1_pins[1].IPin_iface, "Got peer %p.\n", sink_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); @@ -2459,7 +2459,7 @@ static void test_graph_builder_connect(void)
IFilterGraph2_AddFilter(graph, &parser3.IBaseFilter_iface, NULL); hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser3_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(parser3_pins[1].peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", parser3_pins[1].peer); ok(sink_pin.peer == &parser1_pins[1].IPin_iface, "Got peer %p.\n", sink_pin.peer); @@ -2481,7 +2481,7 @@ static void test_graph_builder_connect(void) IFilterGraph2_AddFilter(graph, &sink2.IBaseFilter_iface, NULL);
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - todo_wine ok(hr == VFW_S_PARTIAL_RENDER, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_PARTIAL_RENDER, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser1_pins[1].IPin_iface, "Got peer %p.\n", sink_pin.peer); ok(!parser1_pins[2].peer, "Got peer %p.\n", parser1_pins[2].peer); @@ -2495,7 +2495,7 @@ static void test_graph_builder_connect(void)
parser1_pins[1].QueryInternalConnections_hr = S_OK; hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser1_pins[1].IPin_iface, "Got peer %p.\n", sink_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); @@ -2508,12 +2508,12 @@ static void test_graph_builder_connect(void)
parser1_pins[1].name[0] = '~'; hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#lx.\n", hr); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer);
parser1.pin_count = 3; hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser1_pins[2].IPin_iface, "Got peer %p.\n", sink_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); @@ -2525,7 +2525,7 @@ static void test_graph_builder_connect(void) parser1_pins[1].name[0] = 0; parser1_pins[1].id[0] = '~'; hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser1_pins[1].IPin_iface, "Got peer %p.\n", sink_pin.peer); IFilterGraph2_Disconnect(graph, source_pin.peer); @@ -2534,15 +2534,15 @@ static void test_graph_builder_connect(void) IFilterGraph2_Disconnect(graph, &sink_pin.IPin_iface);
hr = IFilterGraph2_Connect(graph, &parser1_pins[1].IPin_iface, &parser1_pins[0].IPin_iface); - ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#lx.\n", hr);
parser1_pins[0].QueryInternalConnections_hr = S_OK; hr = IFilterGraph2_Connect(graph, &parser1_pins[1].IPin_iface, &parser1_pins[0].IPin_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); parser1_pins[0].QueryInternalConnections_hr = E_NOTIMPL;
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* The graph connects from source to sink, not from sink to source. */
@@ -2554,7 +2554,7 @@ static void test_graph_builder_connect(void) parser1_pins[0].require_connected_pin = &parser1_pins[1];
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CANNOT_CONNECT, "Got hr %#lx.\n", hr); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
@@ -2562,14 +2562,14 @@ static void test_graph_builder_connect(void) parser1_pins[1].require_connected_pin = &parser1_pins[0];
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser1_pins[1].IPin_iface, "Got peer %p.\n", sink_pin.peer);
parser1_pins[1].require_connected_pin = NULL;
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Test enumeration of filters from the registry. */
@@ -2605,19 +2605,19 @@ static void test_graph_builder_connect(void) skip("Not enough permission to register filters.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IFilterMapper2_RegisterFilter(mapper, &parser2_clsid, L"test", NULL, NULL, NULL, ®filter);
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser1_pins[0].IPin_iface || source_pin.peer == &parser2_pins[1].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser1_pins[1].IPin_iface || sink_pin.peer == &parser2_pins[0].IPin_iface, "Got peer %p.\n", sink_pin.peer);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Preference is given to filters already in the graph. */
@@ -2627,12 +2627,12 @@ static void test_graph_builder_connect(void) IFilterGraph2_AddFilter(graph, &parser1.IBaseFilter_iface, NULL);
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser1_pins[1].IPin_iface, "Got peer %p.\n", sink_pin.peer);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
/* Preference is given to filters with higher merit. */
@@ -2649,12 +2649,12 @@ static void test_graph_builder_connect(void) IFilterMapper2_RegisterFilter(mapper, &parser2_clsid, L"test", NULL, NULL, NULL, ®filter);
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser2_pins[1].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser2_pins[0].IPin_iface, "Got peer %p.\n", sink_pin.peer);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
graph = create_graph(); IFilterGraph2_AddFilter(graph, &source.IBaseFilter_iface, NULL); @@ -2669,7 +2669,7 @@ static void test_graph_builder_connect(void) IFilterMapper2_RegisterFilter(mapper, &parser2_clsid, L"test", NULL, NULL, NULL, ®filter);
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &parser1_pins[1].IPin_iface, "Got peer %p.\n", sink_pin.peer);
@@ -2681,21 +2681,21 @@ out: CoRevokeClassObject(cookie2); IFilterMapper2_Release(mapper); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); - ok(source.ref == 1, "Got outstanding refcount %d.\n", source.ref); - ok(source_pin.ref == 1, "Got outstanding refcount %d.\n", source_pin.ref); - ok(sink.ref == 1, "Got outstanding refcount %d.\n", sink.ref); - ok(sink_pin.ref == 1, "Got outstanding refcount %d.\n", sink_pin.ref); - ok(parser1.ref == 1, "Got outstanding refcount %d.\n", parser1.ref); - ok(parser1_pins[0].ref == 1, "Got outstanding refcount %d.\n", parser1_pins[0].ref); - ok(parser1_pins[1].ref == 1, "Got outstanding refcount %d.\n", parser1_pins[1].ref); - ok(parser1_pins[2].ref == 1, "Got outstanding refcount %d.\n", parser1_pins[2].ref); - ok(parser2.ref == 1, "Got outstanding refcount %d.\n", parser2.ref); - ok(parser2_pins[0].ref == 1, "Got outstanding refcount %d.\n", parser2_pins[0].ref); - ok(parser2_pins[1].ref == 1, "Got outstanding refcount %d.\n", parser2_pins[1].ref); - ok(parser3.ref == 1, "Got outstanding refcount %d.\n", parser3.ref); - ok(parser3_pins[0].ref == 1, "Got outstanding refcount %d.\n", parser3_pins[0].ref); - ok(parser3_pins[1].ref == 1, "Got outstanding refcount %d.\n", parser3_pins[1].ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ok(source.ref == 1, "Got outstanding refcount %ld.\n", source.ref); + ok(source_pin.ref == 1, "Got outstanding refcount %ld.\n", source_pin.ref); + ok(sink.ref == 1, "Got outstanding refcount %ld.\n", sink.ref); + ok(sink_pin.ref == 1, "Got outstanding refcount %ld.\n", sink_pin.ref); + ok(parser1.ref == 1, "Got outstanding refcount %ld.\n", parser1.ref); + ok(parser1_pins[0].ref == 1, "Got outstanding refcount %ld.\n", parser1_pins[0].ref); + ok(parser1_pins[1].ref == 1, "Got outstanding refcount %ld.\n", parser1_pins[1].ref); + ok(parser1_pins[2].ref == 1, "Got outstanding refcount %ld.\n", parser1_pins[2].ref); + ok(parser2.ref == 1, "Got outstanding refcount %ld.\n", parser2.ref); + ok(parser2_pins[0].ref == 1, "Got outstanding refcount %ld.\n", parser2_pins[0].ref); + ok(parser2_pins[1].ref == 1, "Got outstanding refcount %ld.\n", parser2_pins[1].ref); + ok(parser3.ref == 1, "Got outstanding refcount %ld.\n", parser3.ref); + ok(parser3_pins[0].ref == 1, "Got outstanding refcount %ld.\n", parser3_pins[0].ref); + ok(parser3_pins[1].ref == 1, "Got outstanding refcount %ld.\n", parser3_pins[1].ref); }
static const GUID test_iid = {0x33333333}; @@ -2744,77 +2744,77 @@ static void test_aggregation(void) graph = (IFilterGraph2 *)0xdeadbeef; hr = CoCreateInstance(&CLSID_FilterGraph, &test_outer, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&graph); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!graph, "Got interface %p.\n", graph);
hr = CoCreateInstance(&CLSID_FilterGraph, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IFilterGraph2, (void **)&graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IFilterGraph2_QueryInterface(graph, &IID_IFilterGraph2, (void **)&graph2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph2 == (IFilterGraph2 *)0xdeadbeef, "Got unexpected IFilterGraph2 %p.\n", graph2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IFilterGraph2_QueryInterface(graph, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IFilterGraph2_Release(graph); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
/* Test the aggregated filter mapper. */
graph = create_graph();
ref = get_refcount(graph); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IFilterGraph2_QueryInterface(graph, &IID_IFilterMapper2, (void **)&mapper); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = get_refcount(graph); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(mapper); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IFilterMapper2_QueryInterface(mapper, &IID_IFilterGraph2, (void **)&graph2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(graph2 == graph, "Got unexpected IFilterGraph2 %p.\n", graph2); IFilterGraph2_Release(graph2);
IFilterMapper2_Release(mapper); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got unexpected refcount %d.\n", ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); }
/* Test how methods from "control" interfaces (IBasicAudio, IBasicVideo, @@ -2835,115 +2835,115 @@ static void test_control_delegation(void) /* IBasicAudio */
hr = IFilterGraph2_QueryInterface(graph, &IID_IBasicAudio, (void **)&audio); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IBasicAudio_GetTypeInfoCount(audio, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count == 1, "Got count %u.\n", count);
hr = IBasicAudio_put_Volume(audio, -10); - ok(hr == E_NOTIMPL, "got %#x\n", hr); + ok(hr == E_NOTIMPL, "got %#lx\n", hr); hr = IBasicAudio_get_Volume(audio, &val); - ok(hr == E_NOTIMPL, "got %#x\n", hr); + ok(hr == E_NOTIMPL, "got %#lx\n", hr); hr = IBasicAudio_put_Balance(audio, 10); - ok(hr == E_NOTIMPL, "got %#x\n", hr); + ok(hr == E_NOTIMPL, "got %#lx\n", hr); hr = IBasicAudio_get_Balance(audio, &val); - ok(hr == E_NOTIMPL, "got %#x\n", hr); + ok(hr == E_NOTIMPL, "got %#lx\n", hr);
hr = CoCreateInstance(&CLSID_DSoundRender, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&renderer); if (hr != VFW_E_NO_AUDIO_HARDWARE) { - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IFilterGraph2_AddFilter(graph, renderer, NULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IBasicAudio_put_Volume(audio, -10); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); hr = IBasicAudio_get_Volume(audio, &val); - ok(hr == S_OK, "got %#x\n", hr); - ok(val == -10, "got %d\n", val); + ok(hr == S_OK, "got %#lx\n", hr); + ok(val == -10, "got %ld\n", val); hr = IBasicAudio_put_Balance(audio, 10); - ok(hr == S_OK || hr == VFW_E_MONO_AUDIO_HW, "got %#x\n", hr); + ok(hr == S_OK || hr == VFW_E_MONO_AUDIO_HW, "got %#lx\n", hr); hr = IBasicAudio_get_Balance(audio, &val); - ok(hr == S_OK || hr == VFW_E_MONO_AUDIO_HW, "got %#x\n", hr); + ok(hr == S_OK || hr == VFW_E_MONO_AUDIO_HW, "got %#lx\n", hr); if (hr == S_OK) - ok(val == 10, "got balance %d\n", val); + ok(val == 10, "got balance %ld\n", val);
hr = IBaseFilter_QueryInterface(renderer, &IID_IBasicAudio, (void **)&filter_audio); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IBasicAudio_get_Volume(filter_audio, &val); - ok(hr == S_OK, "got %#x\n", hr); - ok(val == -10, "got volume %d\n", val); + ok(hr == S_OK, "got %#lx\n", hr); + ok(val == -10, "got volume %ld\n", val);
hr = IFilterGraph2_RemoveFilter(graph, renderer); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
IBaseFilter_Release(renderer); IBasicAudio_Release(filter_audio); }
hr = IBasicAudio_put_Volume(audio, -10); - ok(hr == E_NOTIMPL, "got %#x\n", hr); + ok(hr == E_NOTIMPL, "got %#lx\n", hr); hr = IBasicAudio_get_Volume(audio, &val); - ok(hr == E_NOTIMPL, "got %#x\n", hr); + ok(hr == E_NOTIMPL, "got %#lx\n", hr); hr = IBasicAudio_put_Balance(audio, 10); - ok(hr == E_NOTIMPL, "got %#x\n", hr); + ok(hr == E_NOTIMPL, "got %#lx\n", hr); hr = IBasicAudio_get_Balance(audio, &val); - ok(hr == E_NOTIMPL, "got %#x\n", hr); + ok(hr == E_NOTIMPL, "got %#lx\n", hr);
IBasicAudio_Release(audio);
/* IBasicVideo and IVideoWindow */
hr = IFilterGraph2_QueryInterface(graph, &IID_IBasicVideo2, (void **)&video); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); hr = IFilterGraph2_QueryInterface(graph, &IID_IVideoWindow, (void **)&window); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
/* Unlike IBasicAudio, these return E_NOINTERFACE. */ hr = IBasicVideo2_get_BitRate(video, &val); - ok(hr == E_NOINTERFACE, "got %#x\n", hr); + ok(hr == E_NOINTERFACE, "got %#lx\n", hr);
hr = IBasicVideo2_GetTypeInfoCount(video, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count == 1, "Got count %u.\n", count);
hr = IBasicVideo2_GetTypeInfo(video, 0, 0, &typeinfo); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(typeattr->typekind == TKIND_DISPATCH, "Got kind %u.\n", typeattr->typekind); ok(IsEqualGUID(&typeattr->guid, &IID_IBasicVideo), "Got IID %s.\n", wine_dbgstr_guid(&typeattr->guid)); ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); ITypeInfo_Release(typeinfo);
hr = IVideoWindow_SetWindowForeground(window, OAFALSE); - ok(hr == E_NOINTERFACE, "got %#x\n", hr); + ok(hr == E_NOINTERFACE, "got %#lx\n", hr);
hr = IVideoWindow_GetTypeInfoCount(window, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count == 1, "Got count %u.\n", count);
hr = CoCreateInstance(&CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&renderer); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IFilterGraph2_AddFilter(graph, renderer, NULL); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IBasicVideo2_get_BitRate(video, &val); - ok(hr == VFW_E_NOT_CONNECTED, "got %#x\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "got %#lx\n", hr); hr = IVideoWindow_SetWindowForeground(window, OAFALSE); - ok(hr == VFW_E_NOT_CONNECTED, "got %#x\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "got %#lx\n", hr);
hr = IFilterGraph2_RemoveFilter(graph, renderer); - ok(hr == S_OK, "got %#x\n", hr); + ok(hr == S_OK, "got %#lx\n", hr);
hr = IBasicVideo2_get_BitRate(video, &val); - ok(hr == E_NOINTERFACE, "got %#x\n", hr); + ok(hr == E_NOINTERFACE, "got %#lx\n", hr); hr = IVideoWindow_SetWindowForeground(window, OAFALSE); - ok(hr == E_NOINTERFACE, "got %#x\n", hr); + ok(hr == E_NOINTERFACE, "got %#lx\n", hr);
IBaseFilter_Release(renderer); IBasicVideo2_Release(video); @@ -2962,47 +2962,47 @@ static void test_add_remove_filter(void) testfilter_init(&filter, NULL, 0);
hr = IFilterGraph2_FindFilterByName(graph, L"testid", &ret_filter); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); ok(!ret_filter, "Got filter %p.\n", ret_filter);
hr = IFilterGraph2_AddFilter(graph, &filter.IBaseFilter_iface, L"testid"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter.graph == (IFilterGraph *)graph, "Got graph %p.\n", filter.graph); ok(!wcscmp(filter.name, L"testid"), "Got name %s.\n", wine_dbgstr_w(filter.name));
hr = IFilterGraph2_FindFilterByName(graph, L"testid", &ret_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_filter == &filter.IBaseFilter_iface, "Got filter %p.\n", ret_filter); IBaseFilter_Release(ret_filter);
hr = IFilterGraph2_RemoveFilter(graph, &filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!filter.graph, "Got graph %p.\n", filter.graph); ok(!filter.name, "Got name %s.\n", wine_dbgstr_w(filter.name)); ok(!filter.clock, "Got clock %p,\n", filter.clock); - ok(filter.ref == 1, "Got outstanding refcount %d.\n", filter.ref); + ok(filter.ref == 1, "Got outstanding refcount %ld.\n", filter.ref);
hr = IFilterGraph2_FindFilterByName(graph, L"testid", &ret_filter); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); ok(!ret_filter, "Got filter %p.\n", ret_filter);
hr = IFilterGraph2_AddFilter(graph, &filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter.graph == (IFilterGraph *)graph, "Got graph %p.\n", filter.graph); ok(!wcscmp(filter.name, L"0001"), "Got name %s.\n", wine_dbgstr_w(filter.name));
hr = IFilterGraph2_FindFilterByName(graph, L"0001", &ret_filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_filter == &filter.IBaseFilter_iface, "Got filter %p.\n", ret_filter); IBaseFilter_Release(ret_filter);
/* test releasing the filter graph while filters are still connected */ hr = IFilterGraph2_Release(graph); - ok(!hr, "Got outstanding refcount %d.\n", hr); + ok(!hr, "Got outstanding refcount %ld.\n", hr); ok(!filter.graph, "Got graph %p.\n", filter.graph); ok(!filter.name, "Got name %s.\n", wine_dbgstr_w(filter.name)); ok(!filter.clock, "Got clock %p.\n", filter.clock); - ok(filter.ref == 1, "Got outstanding refcount %d.\n", filter.ref); + ok(filter.ref == 1, "Got outstanding refcount %ld.\n", filter.ref); }
static HRESULT WINAPI test_connect_direct_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYPE *mt) @@ -3065,75 +3065,75 @@ static void test_connect_direct(void) testfilter_init(&parser2, parser2_pins, 2);
hr = IFilterGraph2_AddFilter(graph, &source.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_AddFilter(graph, &sink.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* The filter graph does not prevent connection while it is running; only * individual filters do. */ IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!source_pin.mt, "Got mt %p.\n", source_pin.mt); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
hr = IFilterGraph2_Disconnect(graph, &sink_pin.IPin_iface); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
hr = IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
hr = IFilterGraph2_Connect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!source_pin.mt, "Got mt %p.\n", source_pin.mt); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
hr = IFilterGraph2_Disconnect(graph, &sink_pin.IPin_iface); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
hr = IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
/* Swap the pins when connecting. */ hr = IFilterGraph2_ConnectDirect(graph, &sink_pin.IPin_iface, &source_pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(sink_pin.peer == &source_pin.IPin_iface, "Got peer %p.\n", sink_pin.peer); ok(!sink_pin.mt, "Got mt %p.\n", sink_pin.mt); todo_wine ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer);
hr = IFilterGraph2_Disconnect(graph, &sink_pin.IPin_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
hr = IFilterGraph2_Connect(graph, &sink_pin.IPin_iface, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(sink_pin.peer == &source_pin.IPin_iface, "Got peer %p.\n", sink_pin.peer); ok(!sink_pin.mt, "Got mt %p.\n", sink_pin.mt); todo_wine ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer);
hr = IFilterGraph2_Disconnect(graph, &sink_pin.IPin_iface); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
/* Disconnect() does not disconnect the peer. */ hr = IFilterGraph2_ConnectDirect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!source_pin.mt, "Got mt %p.\n", source_pin.mt); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer); @@ -3142,146 +3142,146 @@ static void test_connect_direct(void) IPin_AddRef(sink_pin.peer);
hr = IFilterGraph2_Disconnect(graph, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
hr = IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
/* Test specifying the media type. */ hr = IFilterGraph2_ConnectDirect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(source_pin.mt == &mt, "Got mt %p.\n", source_pin.mt); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer); hr = IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test Reconnect[Ex](). */
hr = IFilterGraph2_Reconnect(graph, &source_pin.IPin_iface); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Reconnect(graph, &sink_pin.IPin_iface); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_Reconnect(graph, &source_pin.IPin_iface); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Reconnect(graph, &sink_pin.IPin_iface); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Reconnect(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!source_pin.mt, "Got mt %p.\n", source_pin.mt); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer); hr = IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); sink_pin.peer = &source_pin.IPin_iface; IPin_AddRef(sink_pin.peer); hr = IFilterGraph2_Reconnect(graph, &sink_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!source_pin.mt, "Got mt %p.\n", source_pin.mt); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer); hr = IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ReconnectEx(graph, &source_pin.IPin_iface, NULL); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ReconnectEx(graph, &sink_pin.IPin_iface, NULL); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ReconnectEx(graph, &source_pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!source_pin.mt, "Got mt %p.\n", source_pin.mt); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer); hr = IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ReconnectEx(graph, &source_pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(source_pin.mt == &mt, "Got mt %p.\n", source_pin.mt); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer); hr = IFilterGraph2_Disconnect(graph, &source_pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* ConnectDirect() protects against cyclical connections. */ hr = IFilterGraph2_AddFilter(graph, &parser1.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_AddFilter(graph, &parser2.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &parser1_pins[1].IPin_iface, &parser1_pins[0].IPin_iface, NULL); - ok(hr == VFW_E_CIRCULAR_GRAPH, "Got hr %#x.\n", hr); + ok(hr == VFW_E_CIRCULAR_GRAPH, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &parser1_pins[1].IPin_iface, &parser2_pins[0].IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &parser2_pins[1].IPin_iface, &parser1_pins[0].IPin_iface, NULL); - todo_wine ok(hr == VFW_E_CIRCULAR_GRAPH, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_CIRCULAR_GRAPH, "Got hr %#lx.\n", hr); IFilterGraph2_Disconnect(graph, &parser1_pins[1].IPin_iface); IFilterGraph2_Disconnect(graph, &parser2_pins[0].IPin_iface);
parser1_pins[0].QueryInternalConnections_hr = S_OK; hr = IFilterGraph2_ConnectDirect(graph, &parser1_pins[1].IPin_iface, &parser1_pins[0].IPin_iface, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!parser1_pins[0].peer, "Got peer %p.\n", parser1_pins[0].peer); todo_wine ok(parser1_pins[1].peer == &parser1_pins[0].IPin_iface, "Got peer %p.\n", parser1_pins[1].peer); IFilterGraph2_Disconnect(graph, &parser1_pins[0].IPin_iface); IFilterGraph2_Disconnect(graph, &parser1_pins[1].IPin_iface);
hr = IFilterGraph2_ConnectDirect(graph, &parser1_pins[1].IPin_iface, &parser2_pins[0].IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &parser2_pins[1].IPin_iface, &parser1_pins[0].IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IFilterGraph2_Disconnect(graph, &parser1_pins[1].IPin_iface); IFilterGraph2_Disconnect(graph, &parser2_pins[0].IPin_iface);
hr = IFilterGraph2_RemoveFilter(graph, &parser1.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_RemoveFilter(graph, &parser2.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Both pins are disconnected when a filter is removed. */ hr = IFilterGraph2_ConnectDirect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); sink_pin.peer = &source_pin.IPin_iface; IPin_AddRef(sink_pin.peer); hr = IFilterGraph2_RemoveFilter(graph, &source.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
/* If the filter cannot be disconnected, then RemoveFilter() fails. */
hr = IFilterGraph2_AddFilter(graph, &source.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &source_pin.IPin_iface, &sink_pin.IPin_iface, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); sink_pin.peer = &source_pin.IPin_iface; IPin_AddRef(sink_pin.peer); hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
source_pin.require_stopped_disconnect = TRUE; hr = IFilterGraph2_RemoveFilter(graph, &source.IBaseFilter_iface); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer);
@@ -3290,7 +3290,7 @@ static void test_connect_direct(void) source_pin.require_stopped_disconnect = FALSE; sink_pin.require_stopped_disconnect = TRUE; hr = IFilterGraph2_RemoveFilter(graph, &source.IBaseFilter_iface); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); ok(source_pin.peer == &sink_pin.IPin_iface, "Got peer %p.\n", source_pin.peer); ok(sink_pin.peer == &source_pin.IPin_iface, "Got peer %p.\n", sink_pin.peer);
@@ -3298,11 +3298,11 @@ static void test_connect_direct(void)
IMediaControl_Release(control); hr = IFilterGraph2_Release(graph); - ok(!hr, "Got outstanding refcount %d.\n", hr); - ok(source.ref == 1, "Got outstanding refcount %d.\n", source.ref); - ok(sink.ref == 1, "Got outstanding refcount %d.\n", sink.ref); - ok(source_pin.ref == 1, "Got outstanding refcount %d.\n", source_pin.ref); - todo_wine ok(sink_pin.ref == 1, "Got outstanding refcount %d.\n", sink_pin.ref); + ok(!hr, "Got outstanding refcount %ld.\n", hr); + ok(source.ref == 1, "Got outstanding refcount %ld.\n", source.ref); + ok(sink.ref == 1, "Got outstanding refcount %ld.\n", sink.ref); + ok(source_pin.ref == 1, "Got outstanding refcount %ld.\n", source_pin.ref); + todo_wine ok(sink_pin.ref == 1, "Got outstanding refcount %ld.\n", sink_pin.ref); ok(!source_pin.peer, "Got peer %p.\n", source_pin.peer); ok(!sink_pin.peer, "Got peer %p.\n", sink_pin.peer); } @@ -3332,30 +3332,30 @@ static void test_sync_source(void) &IID_IReferenceClock, (void **)&systemclock);
hr = IMediaFilter_SetSyncSource(filter, systemclock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter1.clock == systemclock, "Got clock %p.\n", filter1.clock); ok(filter2.clock == systemclock, "Got clock %p.\n", filter2.clock);
hr = IMediaFilter_GetSyncSource(filter, &clock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(clock == systemclock, "Got clock %p.\n", clock); IReferenceClock_Release(clock);
hr = IMediaFilter_SetSyncSource(filter, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!filter1.clock, "Got clock %p.\n", filter1.clock); ok(!filter2.clock, "Got clock %p.\n", filter2.clock);
hr = IMediaFilter_GetSyncSource(filter, &clock); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(!clock, "Got clock %p.\n", clock);
IReferenceClock_Release(systemclock); IMediaFilter_Release(filter); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d\n", ref); - ok(filter1.ref == 1, "Got outstanding refcount %d.\n", filter1.ref); - ok(filter2.ref == 1, "Got outstanding refcount %d.\n", filter2.ref); + ok(!ref, "Got outstanding refcount %ld\n", ref); + ok(filter1.ref == 1, "Got outstanding refcount %ld.\n", filter1.ref); + ok(filter2.ref == 1, "Got outstanding refcount %ld.\n", filter2.ref); }
#define check_filter_state(a, b) check_filter_state_(__LINE__, a, b) @@ -3371,13 +3371,13 @@ static void check_filter_state_(unsigned int line, IFilterGraph2 *graph, FILTER_
IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&mediafilter); hr = IMediaFilter_GetState(mediafilter, 1000, &state); - ok_(__FILE__, line)(hr == S_OK, "IMediaFilter_GetState() returned %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "IMediaFilter_GetState() returned %#lx.\n", hr); ok_(__FILE__, line)(state == expect, "Expected state %u, got %u.\n", expect, state); IMediaFilter_Release(mediafilter);
IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); hr = IMediaControl_GetState(control, 1000, &oastate); - ok_(__FILE__, line)(hr == S_OK, "IMediaControl_GetState() returned %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "IMediaControl_GetState() returned %#lx.\n", hr); ok_(__FILE__, line)(state == expect, "Expected state %u, got %u.\n", expect, state); IMediaControl_Release(control);
@@ -3385,7 +3385,7 @@ static void check_filter_state_(unsigned int line, IFilterGraph2 *graph, FILTER_ while (IEnumFilters_Next(filterenum, 1, &filter, NULL) == S_OK) { hr = IBaseFilter_GetState(filter, 1000, &state); - ok_(__FILE__, line)(hr == S_OK, "IBaseFilter_GetState() returned %#x.\n", hr); + ok_(__FILE__, line)(hr == S_OK, "IBaseFilter_GetState() returned %#lx.\n", hr); ok_(__FILE__, line)(state == expect, "Expected state %u, got %u.\n", expect, state); IBaseFilter_Release(filter); } @@ -3429,21 +3429,21 @@ static void test_filter_state(void) check_filter_state(graph, State_Stopped);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Paused);
/* Pausing sets the default sync source, if it's not already set. */
hr = IMediaFilter_GetSyncSource(filter, &clock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!clock, "Reference clock not set.\n"); ok(source.clock == clock, "Expected %p, got %p.\n", clock, source.clock); ok(sink.clock == clock, "Expected %p, got %p.\n", clock, sink.clock);
hr = IReferenceClock_GetTime(clock, &start_time); - ok(SUCCEEDED(hr), "Got hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(source.start_time >= start_time && source.start_time < start_time + 500 * 10000, @@ -3453,84 +3453,84 @@ static void test_filter_state(void) wine_dbgstr_longlong(source.start_time), wine_dbgstr_longlong(sink.start_time));
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Paused);
sink.state = State_Stopped; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
sink.state = State_Running; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
sink.state = State_Paused; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Stopped);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running);
sink.state = State_Stopped; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
sink.state = State_Paused; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
sink.state = State_Running; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Stopped);
sink.state = State_Running; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
sink.state = State_Paused; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
sink.state = State_Stopped; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Paused);
hr = IMediaControl_StopWhenReady(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Stopped);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running);
hr = IMediaControl_StopWhenReady(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Stopped);
hr = IMediaControl_StopWhenReady(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Stopped);
IReferenceClock_Release(clock); @@ -3553,44 +3553,44 @@ static void test_filter_state(void) IPin_Connect(&source_pin.IPin_iface, &sink_pin.IPin_iface, NULL);
hr = IMediaFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Paused);
hr = IMediaFilter_GetSyncSource(filter, &clock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!clock, "Reference clock not set.\n"); ok(source.clock == clock, "Expected %p, got %p.\n", clock, source.clock); ok(sink.clock == clock, "Expected %p, got %p.\n", clock, sink.clock);
hr = IMediaFilter_Run(filter, 0xdeadbeef); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running); ok(source.start_time == 0xdeadbeef, "Got time %s.\n", wine_dbgstr_longlong(source.start_time)); ok(sink.start_time == 0xdeadbeef, "Got time %s.\n", wine_dbgstr_longlong(sink.start_time));
hr = IMediaFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Paused);
hr = IMediaFilter_Run(filter, 0xdeadf00d); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running); ok(source.start_time == 0xdeadf00d, "Got time %s.\n", wine_dbgstr_longlong(source.start_time)); ok(sink.start_time == 0xdeadf00d, "Got time %s.\n", wine_dbgstr_longlong(sink.start_time));
hr = IMediaFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Paused);
hr = IMediaFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Stopped);
source.expect_run_prev = sink.expect_run_prev = State_Stopped; hr = IReferenceClock_GetTime(clock, &start_time); - ok(SUCCEEDED(hr), "Got hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); hr = IMediaFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(source.start_time >= start_time && source.start_time < start_time + 500 * 10000, @@ -3601,12 +3601,12 @@ static void test_filter_state(void)
Sleep(600); hr = IMediaFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Paused);
source.expect_run_prev = sink.expect_run_prev = State_Paused; hr = IMediaFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(source.start_time >= start_time && source.start_time < start_time + 500 * 10000, @@ -3616,13 +3616,13 @@ static void test_filter_state(void) wine_dbgstr_longlong(source.start_time), wine_dbgstr_longlong(sink.start_time));
hr = IMediaFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Paused); Sleep(600);
start_time += 550 * 10000; hr = IMediaFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(source.start_time >= start_time && source.start_time < start_time + 500 * 10000, @@ -3632,7 +3632,7 @@ static void test_filter_state(void) wine_dbgstr_longlong(source.start_time), wine_dbgstr_longlong(sink.start_time));
hr = IMediaFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Stopped);
/* Test removing the sync source. */ @@ -3641,7 +3641,7 @@ static void test_filter_state(void) IMediaFilter_SetSyncSource(filter, NULL);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running); todo_wine ok(source.start_time > 0 && source.start_time < 500 * 10000, "Got time %s.\n", wine_dbgstr_longlong(source.start_time)); @@ -3649,7 +3649,7 @@ static void test_filter_state(void) wine_dbgstr_longlong(source.start_time), wine_dbgstr_longlong(sink.start_time));
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Stopped);
/* Test asynchronous state change. */ @@ -3657,30 +3657,30 @@ static void test_filter_state(void) sink.state_hr = S_FALSE; sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
sink.state_hr = sink.GetState_hr = S_OK; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
sink.state_hr = S_FALSE; sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; hr = IMediaControl_Stop(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
sink.state_hr = sink.GetState_hr = S_OK; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
/* Renderers are expected to block completing a state change into paused * until they receive a sample. Because the graph can transition from @@ -3696,11 +3696,11 @@ static void test_filter_state(void) sink.state_hr = S_FALSE; sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state); ok(sink.state == State_Paused, "Got state %u.\n", sink.state); ok(source.state == State_Paused, "Got state %u.\n", source.state);
@@ -3709,14 +3709,14 @@ static void test_filter_state(void) time = 0; hr = IMediaSeeking_SetPositions(seeking, &time, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state); ok(sink.state == State_Paused, "Got state %u.\n", sink.state); ok(source.state == State_Paused, "Got state %u.\n", source.state);
@@ -3724,13 +3724,13 @@ static void test_filter_state(void)
while ((hr = IMediaControl_GetState(control, INFINITE, &state)) == VFW_S_STATE_INTERMEDIATE) { - ok(state == State_Running, "Got state %u.\n", state); + ok(state == State_Running, "Got state %lu.\n", state); ok(sink.state == State_Paused, "Got state %u.\n", sink.state); ok(source.state == State_Paused, "Got state %u.\n", source.state); Sleep(10); } - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state); ok(sink.state == State_Running, "Got state %u.\n", sink.state); ok(source.state == State_Running, "Got state %u.\n", source.state);
@@ -3742,21 +3742,21 @@ static void test_filter_state(void) sink.state_hr = S_FALSE; sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; hr = IMediaControl_Stop(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(sink.state == State_Stopped, "Got state %u.\n", sink.state); ok(source.state == State_Stopped, "Got state %u.\n", source.state);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
sink.state_hr = sink.GetState_hr = S_OK; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state);
/* Try an asynchronous stopped->paused->running transition, but pause or * stop the graph before our filter is completely paused. */ @@ -3764,35 +3764,35 @@ static void test_filter_state(void) sink.state_hr = S_FALSE; sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
sink.state_hr = sink.GetState_hr = S_OK; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state); ok(sink.state == State_Paused, "Got state %u.\n", sink.state); ok(source.state == State_Paused, "Got state %u.\n", source.state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
sink.state_hr = S_FALSE; sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(sink.state == State_Stopped, "Got state %u.\n", sink.state); ok(source.state == State_Stopped, "Got state %u.\n", source.state);
sink.state_hr = sink.GetState_hr = S_OK; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Stopped, "Got state %u.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Stopped, "Got state %lu.\n", state); ok(sink.state == State_Stopped, "Got state %u.\n", sink.state); ok(source.state == State_Stopped, "Got state %u.\n", source.state);
@@ -3801,13 +3801,13 @@ static void test_filter_state(void) sink.state_hr = S_FALSE; sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IMediaFilter_Release(filter); IMediaControl_Release(control); IMediaSeeking_Release(seeking); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
graph = create_graph(); IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter); @@ -3823,23 +3823,23 @@ static void test_filter_state(void) sink.state_hr = S_FALSE; sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; hr = IMediaFilter_Run(filter, 0); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaFilter_GetState(filter, 0, &mf_state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); ok(mf_state == State_Running, "Got state %u.\n", mf_state); ok(sink.state == State_Running, "Got state %u.\n", sink.state); ok(source.state == State_Running, "Got state %u.\n", source.state);
sink.state_hr = sink.GetState_hr = S_OK; hr = IMediaFilter_GetState(filter, 0, &mf_state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(mf_state == State_Running, "Got state %u.\n", mf_state); ok(sink.state == State_Running, "Got state %u.\n", sink.state); ok(source.state == State_Running, "Got state %u.\n", source.state);
hr = IMediaFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(sink.state == State_Stopped, "Got state %u.\n", sink.state); ok(source.state == State_Stopped, "Got state %u.\n", source.state);
@@ -3849,79 +3849,79 @@ static void test_filter_state(void)
sink.GetState_hr = VFW_S_CANT_CUE; hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; source.GetState_hr = VFW_S_CANT_CUE; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
sink.GetState_hr = VFW_S_CANT_CUE; source.GetState_hr = VFW_S_STATE_INTERMEDIATE; hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %u.\n", state); + ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %lu.\n", state);
sink.GetState_hr = source.GetState_hr = S_OK;
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
sink.state_hr = S_FALSE; sink.GetState_hr = VFW_S_STATE_INTERMEDIATE; source.GetState_hr = VFW_S_CANT_CUE; hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(sink.state == State_Running, "Got state %u.\n", sink.state); ok(source.state == State_Running, "Got state %u.\n", source.state);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_CANT_CUE, "Got hr %#x.\n", hr); - ok(state == State_Running, "Got state %u.\n", state); + ok(hr == VFW_S_CANT_CUE, "Got hr %#lx.\n", hr); + ok(state == State_Running, "Got state %lu.\n", state); ok(sink.state == State_Running, "Got state %u.\n", sink.state); ok(source.state == State_Running, "Got state %u.\n", source.state);
sink.state_hr = sink.GetState_hr = source.GetState_hr = S_OK;
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Add and remove a filter while the graph is running. */
hr = IFilterGraph2_AddFilter(graph, &dummy.IBaseFilter_iface, L"dummy"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dummy.state == State_Stopped, "Got state %#x.\n", dummy.state);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Paused); ok(dummy.state == State_Paused, "Got state %#x.\n", dummy.state);
hr = IFilterGraph2_RemoveFilter(graph, &dummy.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dummy.state == State_Paused, "Got state %#x.\n", dummy.state);
hr = IFilterGraph2_AddFilter(graph, &dummy.IBaseFilter_iface, L"dummy"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dummy.state == State_Paused, "Got state %#x.\n", dummy.state);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Stopped);
hr = IFilterGraph2_RemoveFilter(graph, &dummy.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dummy.state == State_Stopped, "Got state %#x.\n", dummy.state);
/* Destroying the graph while it's running stops all filters. */
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_filter_state(graph, State_Running);
source.expect_stop_prev = sink.expect_stop_prev = State_Running; @@ -3929,11 +3929,11 @@ static void test_filter_state(void) IMediaControl_Release(control); IMediaSeeking_Release(seeking); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); - ok(source.ref == 1, "Got outstanding refcount %d.\n", source.ref); - ok(sink.ref == 1, "Got outstanding refcount %d.\n", sink.ref); - ok(source_pin.ref == 1, "Got outstanding refcount %d.\n", source_pin.ref); - ok(sink_pin.ref == 1, "Got outstanding refcount %d.\n", sink_pin.ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ok(source.ref == 1, "Got outstanding refcount %ld.\n", source.ref); + ok(sink.ref == 1, "Got outstanding refcount %ld.\n", sink.ref); + ok(source_pin.ref == 1, "Got outstanding refcount %ld.\n", source_pin.ref); + ok(sink_pin.ref == 1, "Got outstanding refcount %ld.\n", sink_pin.ref); ok(source.state == State_Stopped, "Got state %u.\n", source.state); ok(sink.state == State_Stopped, "Got state %u.\n", sink.state); } @@ -3956,22 +3956,22 @@ static HRESULT check_ec_complete(IFilterGraph2 *graph, IBaseFilter *filter) IMediaControl_Run(control);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 0); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret_hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 0); if (ret_hr == S_OK) { - ok(code == EC_COMPLETE, "Got code %#x.\n", code); - ok(param1 == S_OK, "Got param1 %#lx.\n", param1); - ok(!param2, "Got param2 %#lx.\n", param2); + ok(code == EC_COMPLETE, "Got code %#lx.\n", code); + ok(param1 == S_OK, "Got param1 %#Ix.\n", param1); + ok(!param2, "Got param2 %#Ix.\n", param2); hr = IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 0); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr); }
IMediaControl_Stop(control); @@ -4026,33 +4026,33 @@ static void test_ec_complete(void) ok(code != EC_COMPLETE, "Got unexpected EC_COMPLETE.\n"); IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); } - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter1.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter2.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(code == EC_COMPLETE, "Got code %#x.\n", code); - ok(param1 == S_OK, "Got param1 %#lx.\n", param1); - ok(!param2, "Got param2 %#lx.\n", param2); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(code == EC_COMPLETE, "Got code %#lx.\n", code); + ok(param1 == S_OK, "Got param1 %#Ix.\n", param1); + ok(!param2, "Got param2 %#Ix.\n", param2); hr = IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter3.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
IMediaControl_Stop(control);
@@ -4061,42 +4061,42 @@ static void test_ec_complete(void) IMediaControl_Run(control);
hr = IMediaEvent_CancelDefaultHandling(eventsrc, EC_COMPLETE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter1.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(code == EC_COMPLETE, "Got code %#x.\n", code); - ok(param1 == S_OK, "Got param1 %#lx.\n", param1); - ok(param2 == (LONG_PTR)&filter1.IBaseFilter_iface, "Got param2 %#lx.\n", param2); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(code == EC_COMPLETE, "Got code %#lx.\n", code); + ok(param1 == S_OK, "Got param1 %#Ix.\n", param1); + ok(param2 == (LONG_PTR)&filter1.IBaseFilter_iface, "Got param2 %#Ix.\n", param2); hr = IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter3.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(code == EC_COMPLETE, "Got code %#x.\n", code); - ok(param1 == S_OK, "Got param1 %#lx.\n", param1); - ok(param2 == (LONG_PTR)&filter3.IBaseFilter_iface, "Got param2 %#lx.\n", param2); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(code == EC_COMPLETE, "Got code %#lx.\n", code); + ok(param1 == S_OK, "Got param1 %#Ix.\n", param1); + ok(param2 == (LONG_PTR)&filter3.IBaseFilter_iface, "Got param2 %#Ix.\n", param2); hr = IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEvent_GetEvent(eventsrc, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
IMediaControl_Stop(control); hr = IMediaEvent_RestoreDefaultHandling(eventsrc, EC_COMPLETE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* A filter counts as a renderer if it (1) exposes IAMFilterMiscFlags and * reports itself as a renderer, or (2) exposes IMediaSeeking or @@ -4110,7 +4110,7 @@ static void test_ec_complete(void) IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL);
hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface); filter1_pin.dir = PINDIR_INPUT; @@ -4119,37 +4119,37 @@ static void test_ec_complete(void) IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL);
hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
- ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); + ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref); IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface); - ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); + ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref);
filter1_pin.dir = PINDIR_OUTPUT; IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL);
hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
- ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); + ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref); IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface); - ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); + ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref);
filter1_pin.dir = PINDIR_INPUT; filter1.support_media_time = FALSE; IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL);
hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
- ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); + ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref); IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface);
filter1.IMediaPosition_iface.lpVtbl = &testpos_vtbl; IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL);
hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface);
@@ -4161,7 +4161,7 @@ static void test_ec_complete(void) IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL);
hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface);
@@ -4169,16 +4169,16 @@ static void test_ec_complete(void) IFilterGraph2_AddFilter(graph, &filter1.IBaseFilter_iface, NULL);
hr = check_ec_complete(graph, &filter1.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaControl_Release(control); IMediaEvent_Release(eventsrc); IMediaEventSink_Release(eventsink); hr = IFilterGraph2_Release(graph); - ok(!hr, "Got outstanding refcount %d.\n", hr); - ok(filter1.ref == 1, "Got outstanding refcount %d.\n", filter1.ref); - ok(filter2.ref == 1, "Got outstanding refcount %d.\n", filter2.ref); - ok(filter3.ref == 1, "Got outstanding refcount %d.\n", filter3.ref); + ok(!hr, "Got outstanding refcount %ld.\n", hr); + ok(filter1.ref == 1, "Got outstanding refcount %ld.\n", filter1.ref); + ok(filter2.ref == 1, "Got outstanding refcount %ld.\n", filter2.ref); + ok(filter3.ref == 1, "Got outstanding refcount %ld.\n", filter3.ref); }
static void test_renderfile_failure(void) @@ -4200,28 +4200,28 @@ static void test_renderfile_failure(void) graph = create_graph(); testfilter_init(&testfilter, NULL, 0); hr = IFilterGraph2_AddFilter(graph, &testfilter.IBaseFilter_iface, L"dummy"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
filename = create_file(L"test.nonsense", bogus_data, sizeof(bogus_data)); hr = IFilterGraph2_RenderFile(graph, filename, NULL); - todo_wine ok(hr == VFW_E_UNSUPPORTED_STREAM, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_UNSUPPORTED_STREAM, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_EnumFilters(graph, &filterenum); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumFilters_Next(filterenum, 1, &filter, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter == &testfilter.IBaseFilter_iface, "Got unexpected filter %p.\n", filter);
hr = IEnumFilters_Next(filterenum, 1, &filter, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumFilters_Release(filterenum);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete %s, error %u.\n", debugstr_w(filename), GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", debugstr_w(filename), GetLastError()); }
/* Remove and re-add the filter, to flush the graph's internal @@ -4282,156 +4282,156 @@ static void test_graph_seeking(void) IFilterGraph2_QueryInterface(graph, &IID_IMediaEventSink, (void **)&eventsink);
hr = IMediaSeeking_GetCapabilities(seeking, &caps); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(!caps, "Got caps %#x.\n", caps); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(!caps, "Got caps %#lx.\n", caps);
caps = 0; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(!caps, "Got caps %#x.\n", caps); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(!caps, "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanSeekAbsolute; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); - todo_wine ok(!caps, "Got caps %#x.\n", caps); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + todo_wine ok(!caps, "Got caps %#lx.\n", caps);
hr = IMediaSeeking_IsFormatSupported(seeking, NULL); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(all_formats); ++i) { hr = IMediaSeeking_IsFormatSupported(seeking, all_formats[i]); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x for format %s.\n", hr, wine_dbgstr_guid(all_formats[i])); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx for format %s.\n", hr, wine_dbgstr_guid(all_formats[i])); }
hr = IMediaSeeking_QueryPreferredFormat(seeking, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_GetTimeFormat(seeking, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_NONE); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_NONE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_NONE); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(unsupported_formats); ++i) { hr = IMediaSeeking_SetTimeFormat(seeking, unsupported_formats[i]); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x for format %s.\n", hr, wine_dbgstr_guid(unsupported_formats[i])); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx for format %s.\n", hr, wine_dbgstr_guid(unsupported_formats[i])); }
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 0x123456789a, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time));
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time));
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time));
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_NONE, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_NONE, 0x123456789a, NULL); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, &TIME_FORMAT_NONE); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 0x123456789a, &TIME_FORMAT_NONE); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_NONE, 0x123456789a, &TIME_FORMAT_NONE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time));
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &testguid, 0x123456789a, &testguid); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_GetDuration(seeking, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IMediaSeeking_GetDuration(seeking, &time); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetStopPosition(seeking, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IMediaSeeking_GetStopPosition(seeking, &time); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetPositions(seeking, ¤t, 0, &stop, 0); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetPositions(seeking, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_GetPositions(seeking, NULL, &stop); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_GetCurrentPosition(seeking, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); current = 0xdeadbeef; hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_GetAvailable(seeking, &earliest, &latest); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetRate(seeking, 1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_SetRate(seeking, 2.0); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetRate(seeking, &rate); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(rate == 1.0, "Got rate %.16e.\n", rate);
hr = IMediaSeeking_GetPreroll(seeking, &time); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
/* Try with filters added. Note that a filter need only expose * IMediaSeeking—no other heuristics are used to determine if it is a @@ -4443,10 +4443,10 @@ static void test_graph_seeking(void) filter1.support_testguid = TRUE;
hr = IMediaSeeking_GetDuration(seeking, &time); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &testguid); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IFilterGraph2_RemoveFilter(graph, &filter1.IBaseFilter_iface); filter1.support_media_time = TRUE; @@ -4460,91 +4460,91 @@ static void test_graph_seeking(void) filter1.seek_caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos; filter2.seek_caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetDuration; hr = IMediaSeeking_GetCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); - ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); - ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter2.seeking_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#lx.\n", caps); + ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref); + ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter2.seeking_ref);
flush_cached_seeking(graph, &filter1); flush_cached_seeking(graph, &filter2);
caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanDoSegments; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(!caps, "Got caps %#x.\n", caps); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(!caps, "Got caps %#lx.\n", caps);
flush_cached_seeking(graph, &filter1); flush_cached_seeking(graph, &filter2);
hr = IMediaSeeking_IsFormatSupported(seeking, &testguid); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
filter1.support_testguid = TRUE; hr = IMediaSeeking_IsFormatSupported(seeking, &testguid); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
filter1.support_testguid = FALSE; filter2.support_testguid = TRUE; hr = IMediaSeeking_IsFormatSupported(seeking, &testguid); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Filters are not consulted about preferred formats. */ hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
filter2.support_testguid = FALSE; hr = IMediaSeeking_SetTimeFormat(seeking, &testguid); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
filter1.support_testguid = TRUE; hr = IMediaSeeking_SetTimeFormat(seeking, &testguid); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&filter1.time_format, &testguid), "Got format %s.\n", debugstr_guid(&filter1.time_format)); ok(IsEqualGUID(&filter2.time_format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", debugstr_guid(&filter2.time_format));
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&format, &testguid), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &testguid); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); - ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); - ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter2.seeking_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#lx.\n", caps); + ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref); + ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter2.seeking_ref);
filter2.support_testguid = TRUE; hr = IMediaSeeking_SetTimeFormat(seeking, &testguid); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&filter1.time_format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", debugstr_guid(&filter1.time_format)); todo_wine ok(IsEqualGUID(&filter2.time_format, &testguid), @@ -4554,43 +4554,43 @@ static void test_graph_seeking(void) flush_cached_seeking(graph, &filter1);
hr = IMediaSeeking_GetCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(caps == (AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetDuration), "Got caps %#x.\n", caps); - ok(!filter1.seeking_ref, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); - ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter2.seeking_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(caps == (AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetDuration), "Got caps %#lx.\n", caps); + ok(!filter1.seeking_ref, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref); + ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter2.seeking_ref);
filter1.support_media_time = TRUE; filter1.support_testguid = FALSE; flush_cached_seeking(graph, &filter1);
hr = IMediaSeeking_GetCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps); - ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); - ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter2.seeking_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#lx.\n", caps); + ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref); + ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter2.seeking_ref);
ok(IsEqualGUID(&filter1.time_format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", debugstr_guid(&filter1.time_format)); todo_wine ok(IsEqualGUID(&filter2.time_format, &testguid), "Got format %s.\n", debugstr_guid(&filter2.time_format)); hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&format, &testguid), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_NONE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &testguid, 0x123456789a, &testguid); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &testguid, 0x123456789a, &TIME_FORMAT_NONE); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
flush_cached_seeking(graph, &filter1); flush_cached_seeking(graph, &filter2); @@ -4598,33 +4598,33 @@ static void test_graph_seeking(void) filter1.seek_duration = 0x12345; filter2.seek_duration = 0x23456; hr = IMediaSeeking_GetDuration(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time));
filter2.seek_duration = 0x12345; filter1.seek_duration = 0x23456; hr = IMediaSeeking_GetDuration(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time));
filter1.seek_hr = filter2.seek_hr = 0xbeef; hr = IMediaSeeking_GetDuration(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time));
filter1.seek_hr = E_NOTIMPL; filter2.seek_hr = S_OK; hr = IMediaSeeking_GetDuration(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x12345, "Got time %s.\n", wine_dbgstr_longlong(time));
filter1.seek_hr = 0xdeadbeef; hr = IMediaSeeking_GetDuration(seeking, &time); - ok(hr == 0xdeadbeef, "Got hr %#x.\n", hr); + ok(hr == 0xdeadbeef, "Got hr %#lx.\n", hr);
filter1.seek_hr = filter2.seek_hr = E_NOTIMPL; hr = IMediaSeeking_GetDuration(seeking, &time); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); filter1.seek_hr = filter2.seek_hr = S_OK;
flush_cached_seeking(graph, &filter1); @@ -4633,40 +4633,40 @@ static void test_graph_seeking(void) filter1.seek_stop = 0x54321; filter2.seek_stop = 0x65432; hr = IMediaSeeking_GetStopPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(time));
filter2.seek_stop = 0x54321; filter1.seek_stop = 0x65432; hr = IMediaSeeking_GetStopPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(time));
filter1.seek_hr = filter2.seek_hr = 0xbeef; hr = IMediaSeeking_GetStopPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(time));
filter1.seek_hr = E_NOTIMPL; filter2.seek_hr = S_OK; hr = IMediaSeeking_GetStopPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x54321, "Got time %s.\n", wine_dbgstr_longlong(time));
filter1.seek_hr = 0xdeadbeef; hr = IMediaSeeking_GetStopPosition(seeking, &time); - ok(hr == 0xdeadbeef, "Got hr %#x.\n", hr); + ok(hr == 0xdeadbeef, "Got hr %#lx.\n", hr);
filter1.seek_hr = filter2.seek_hr = E_NOTIMPL; hr = IMediaSeeking_GetStopPosition(seeking, &time); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); filter1.seek_hr = filter2.seek_hr = S_OK;
flush_cached_seeking(graph, &filter1); flush_cached_seeking(graph, &filter2);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!time, "Got time %s.\n", wine_dbgstr_longlong(time));
flush_cached_seeking(graph, &filter1); @@ -4674,7 +4674,7 @@ static void test_graph_seeking(void)
current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(stop));
@@ -4685,7 +4685,7 @@ static void test_graph_seeking(void) stop = 0x321; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop)); ok(filter1.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current)); @@ -4696,32 +4696,32 @@ static void test_graph_seeking(void) filter1.seek_hr = filter2.seek_hr = 0xbeef; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
filter1.seek_hr = E_NOTIMPL; filter2.seek_hr = S_OK; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
filter1.seek_hr = 0xdeadbeef; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == 0xdeadbeef, "Got hr %#x.\n", hr); + ok(hr == 0xdeadbeef, "Got hr %#lx.\n", hr);
filter1.seek_hr = filter2.seek_hr = E_NOTIMPL; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); filter1.seek_hr = filter2.seek_hr = S_OK;
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 12340000, "Got time %s.\n", wine_dbgstr_longlong(time));
current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 12340000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop));
@@ -4729,7 +4729,7 @@ static void test_graph_seeking(void) stop = 0x321; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 12340000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop)); ok(filter1.seek_current == 12340000, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current)); @@ -4741,7 +4741,7 @@ static void test_graph_seeking(void) stop = 0x321; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 43210000, "Got time %s.\n", wine_dbgstr_longlong(stop)); ok(filter1.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current)); @@ -4753,17 +4753,17 @@ static void test_graph_seeking(void) flush_cached_seeking(graph, &filter2);
hr = IMediaSeeking_SetRate(seeking, 2.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(filter1.seek_rate == 2.0, "Got rate %.16e.\n", filter1.seek_rate); todo_wine ok(filter2.seek_rate == 2.0, "Got rate %.16e.\n", filter2.seek_rate);
hr = IMediaSeeking_SetRate(seeking, 1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(filter1.seek_rate == 1.0, "Got rate %.16e.\n", filter1.seek_rate); todo_wine ok(filter2.seek_rate == 1.0, "Got rate %.16e.\n", filter2.seek_rate);
hr = IMediaSeeking_SetRate(seeking, -1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(filter1.seek_rate == -1.0, "Got rate %.16e.\n", filter1.seek_rate); todo_wine ok(filter2.seek_rate == -1.0, "Got rate %.16e.\n", filter2.seek_rate);
@@ -4771,34 +4771,34 @@ static void test_graph_seeking(void) flush_cached_seeking(graph, &filter2);
hr = IMediaSeeking_GetRate(seeking, &rate); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(rate == -1.0, "Got rate %.16e.\n", rate);
hr = IMediaSeeking_SetRate(seeking, 1.0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test how retrieving the current position behaves while the graph is * running. Apparently the graph caches the last position returned by * SetPositions() and then adds the clock offset to the stream start. */
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Note that if the graph is running, it is paused while seeking. */ current = 0; stop = 9000 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(compare_time(time, 1234 * 10000, 40 * 10000), "Expected about 1234ms, got %s.\n", wine_dbgstr_longlong(time)); current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(compare_time(current, 1234 * 10000, 40 * 10000), "Expected about 1234ms, got %s.\n", wine_dbgstr_longlong(current)); @@ -4810,144 +4810,144 @@ static void test_graph_seeking(void) hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning | AM_SEEKING_NoFlush, &stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_NoFlush); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
Sleep(100);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(compare_time(time, 1334 * 10000, 80 * 10000), "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(time)); current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(compare_time(current, 1334 * 10000, 80 * 10000), "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current)); ok(stop == 8000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
Sleep(100); hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(compare_time(time, 1334 * 10000, 80 * 10000), "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(time)); current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (winetest_interactive) /* Timing problems make this test too liable to fail. */ ok(compare_time(current, 1334 * 10000, 80 * 10000), "Expected about 1334ms, got %s.\n", wine_dbgstr_longlong(current)); ok(stop == 8000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 12340000, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaFilter_SetSyncSource(filter, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
Sleep(100); hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!time, "Got time %s.\n", wine_dbgstr_longlong(time)); current = stop = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(!stop, "Got time %s.\n", wine_dbgstr_longlong(stop));
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* GetCurrentPositions() will return the stop position once all renderers * report EC_COMPLETE. Atelier Sophie depends on this behaviour. */
hr = IFilterGraph2_SetDefaultSyncSource(graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
filter1.seek_stop = 5000 * 10000; filter2.seek_stop = 6000 * 10000;
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time < 5000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter1.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time < 5000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter2.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 6000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
filter1.seek_hr = filter2.seek_hr = E_NOTIMPL; filter1.seek_stop = filter2.seek_stop = 0xdeadbeef;
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time < 5000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter1.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(eventsink, EC_COMPLETE, S_OK, (LONG_PTR)&filter2.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 6000 * 10000, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_NONE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaFilter_Release(filter); IMediaControl_Release(control); IMediaSeeking_Release(seeking); IMediaEventSink_Release(eventsink);
- ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); - ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %d.\n", filter2.seeking_ref); + ok(filter1.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref); + ok(filter2.seeking_ref > 0, "Unexpected seeking refcount %ld.\n", filter2.seeking_ref);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", hr); - ok(filter1.ref == 1, "Got outstanding refcount %d.\n", filter1.ref); - ok(filter2.ref == 1, "Got outstanding refcount %d.\n", filter2.ref); - ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %d.\n", filter1.seeking_ref); - ok(filter2.seeking_ref == 0, "Unexpected seeking refcount %d.\n", filter2.seeking_ref); + ok(!ref, "Got outstanding refcount %ld.\n", hr); + ok(filter1.ref == 1, "Got outstanding refcount %ld.\n", filter1.ref); + ok(filter2.ref == 1, "Got outstanding refcount %ld.\n", filter2.ref); + ok(filter1.seeking_ref == 0, "Unexpected seeking refcount %ld.\n", filter1.seeking_ref); + ok(filter2.seeking_ref == 0, "Unexpected seeking refcount %ld.\n", filter2.seeking_ref); }
static void test_default_sync_source(void) @@ -4976,20 +4976,20 @@ static void test_default_sync_source(void) IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (void **)&filter);
hr = IFilterGraph2_SetDefaultSyncSource(graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaFilter_GetSyncSource(filter, &clock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!!clock, "Reference clock not set.\n"); IReferenceClock_Release(clock);
source.IReferenceClock_iface.lpVtbl = &testclock_vtbl;
hr = IFilterGraph2_SetDefaultSyncSource(graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaFilter_GetSyncSource(filter, &clock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(clock == &source.IReferenceClock_iface, "Got unexpected clock.\n"); IReferenceClock_Release(clock);
@@ -4999,29 +4999,29 @@ static void test_default_sync_source(void) sink2.IReferenceClock_iface.lpVtbl = &testclock_vtbl;
hr = IFilterGraph2_SetDefaultSyncSource(graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaFilter_GetSyncSource(filter, &clock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(clock == &sink2.IReferenceClock_iface, "Got unexpected clock.\n"); IReferenceClock_Release(clock);
sink1.IReferenceClock_iface.lpVtbl = &testclock_vtbl;
hr = IFilterGraph2_SetDefaultSyncSource(graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaFilter_GetSyncSource(filter, &clock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(clock == &sink1.IReferenceClock_iface, "Got unexpected clock.\n"); IReferenceClock_Release(clock);
IMediaFilter_Release(filter); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); - ok(sink1.ref == 1, "Got outstanding refcount %d.\n", sink1.ref); - ok(sink2.ref == 1, "Got outstanding refcount %d.\n", sink2.ref); - ok(source.ref == 1, "Got outstanding refcount %d.\n", source.ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ok(sink1.ref == 1, "Got outstanding refcount %ld.\n", sink1.ref); + ok(sink2.ref == 1, "Got outstanding refcount %ld.\n", sink2.ref); + ok(source.ref == 1, "Got outstanding refcount %ld.\n", source.ref); }
static void test_add_source_filter(void) @@ -5046,20 +5046,20 @@ static void test_add_source_filter(void)
filename = create_file(L"test.mp3", midi_data, sizeof(midi_data)); hr = IFilterGraph2_AddSourceFilter(graph, filename, L"test", &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetClassID(filter, &clsid); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&clsid, &CLSID_AsyncReader), "Got filter %s.\n", wine_dbgstr_guid(&clsid)); hr = IBaseFilter_QueryFilterInfo(filter, &filter_info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(filter_info.achName, L"test"), "Got unexpected name %s.\n", wine_dbgstr_w(filter_info.achName)); IFilterGraph_Release(filter_info.pGraph);
hr = IBaseFilter_QueryInterface(filter, &IID_IFileSourceFilter, (void **)&filesource); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFileSourceFilter_GetCurFile(filesource, &ret_filename, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(ret_filename, filename), "Expected filename %s, got %s.\n", wine_dbgstr_w(filename), wine_dbgstr_w(ret_filename)); ok(IsEqualGUID(&mt.majortype, &MEDIATYPE_Stream), "Got major type %s.\n", wine_dbgstr_guid(&mt.majortype)); @@ -5067,38 +5067,38 @@ static void test_add_source_filter(void) IFileSourceFilter_Release(filesource);
hr = IFilterGraph2_AddSourceFilter(graph, filename, L"test", &filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 != filter, "Filters shouldn't match.\n"); hr = IFilterGraph2_RemoveFilter(graph, filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IBaseFilter_Release(filter2); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = IFilterGraph2_RemoveFilter(graph, filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete %s, error %u.\n", wine_dbgstr_w(filename), GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", wine_dbgstr_w(filename), GetLastError());
/* Test a file which should be registered by signature. */
filename = create_file(L"test.avi", midi_data, sizeof(midi_data)); hr = IFilterGraph2_AddSourceFilter(graph, filename, NULL, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetClassID(filter, &clsid); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&clsid, &CLSID_AsyncReader), "Got filter %s.\n", wine_dbgstr_guid(&clsid)); hr = IBaseFilter_QueryFilterInfo(filter, &filter_info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(!wcscmp(filter_info.achName, filename), "Got unexpected name %s.\n", wine_dbgstr_w(filter_info.achName)); IFilterGraph_Release(filter_info.pGraph);
hr = IBaseFilter_QueryInterface(filter, &IID_IFileSourceFilter, (void **)&filesource); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFileSourceFilter_GetCurFile(filesource, &ret_filename, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(ret_filename, filename), "Expected filename %s, got %s.\n", wine_dbgstr_w(filename), wine_dbgstr_w(ret_filename)); ok(IsEqualGUID(&mt.majortype, &MEDIATYPE_Stream), "Got major type %s.\n", wine_dbgstr_guid(&mt.majortype)); @@ -5106,11 +5106,11 @@ static void test_add_source_filter(void) IFileSourceFilter_Release(filesource);
hr = IFilterGraph2_RemoveFilter(graph, filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete %s, error %u.\n", wine_dbgstr_w(filename), GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", wine_dbgstr_w(filename), GetLastError());
if (!RegCreateKeyA(HKEY_CLASSES_ROOT, "Media Type\{abbccdde-0000-0000-0000-000000000000}" "\{bccddeef-0000-0000-0000-000000000000}", &key)) @@ -5132,16 +5132,16 @@ static void test_add_source_filter(void)
filename = create_file(L"test.avi", bogus_data, sizeof(bogus_data)); hr = IFilterGraph2_AddSourceFilter(graph, filename, NULL, &filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter == &testfilter.IBaseFilter_iface, "Got unexpected filter %p.\n", filter);
hr = IFilterGraph2_RemoveFilter(graph, filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IBaseFilter_Release(filter); ref = IBaseFilter_Release(&testfilter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete %s, error %u.\n", wine_dbgstr_w(filename), GetLastError()); + ok(ret, "Failed to delete %s, error %lu.\n", wine_dbgstr_w(filename), GetLastError()); RegDeleteKeyA(HKEY_CLASSES_ROOT, "Media Type\{abbccdde-0000-0000-0000-000000000000}" "\{bccddeef-0000-0000-0000-000000000000}"); RegDeleteKeyA(HKEY_CLASSES_ROOT, "Media Type\{abbccdde-0000-0000-0000-000000000000}"); @@ -5151,7 +5151,7 @@ static void test_add_source_filter(void) skip("Not enough permission to register media types.\n");
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static HWND get_renderer_hwnd(IFilterGraph2 *graph) @@ -5165,20 +5165,20 @@ static HWND get_renderer_hwnd(IFilterGraph2 *graph) IPin *pin;
hr = IFilterGraph2_EnumFilters(graph, &enum_filters); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (IEnumFilters_Next(enum_filters, 1, &filter, NULL) == S_OK) { hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IEnumPins_Release(enum_pins);
if (SUCCEEDED(IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay))) { hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IOverlay_Release(overlay); }
@@ -5224,12 +5224,12 @@ static void test_window_threading(void) hr = IFilterGraph2_RenderFile(graph, filename, NULL); if (FAILED(hr)) { - skip("Cannot render test file, hr %#x.\n", hr); + skip("Cannot render test file, hr %#lx.\n", hr); IFilterGraph2_Release(graph); DeleteFileW(filename); return; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
if ((hwnd = get_renderer_hwnd(graph))) { @@ -5243,9 +5243,9 @@ static void test_window_threading(void) * while the video window is released. In particular, we must not send * WM_PARENTNOTIFY. This is not achieved through window styles. */ hr = IFilterGraph2_QueryInterface(graph, &IID_IVideoWindow, (void **)&window); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_Owner(window, (OAHWND)parent); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IVideoWindow_Release(window); ok(!(GetWindowLongW(hwnd, GWL_EXSTYLE) & WS_EX_NOPARENTNOTIFY), "Window has WS_EX_NOPARENTNOTIFY.\n"); } @@ -5255,7 +5255,7 @@ static void test_window_threading(void) SetActiveWindow(parent); expect_parent_message = FALSE; ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); expect_parent_message = TRUE;
hwnd = GetActiveWindow(); @@ -5263,10 +5263,10 @@ static void test_window_threading(void)
hr = CoCreateInstance(&CLSID_FilterGraphNoThread, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&graph); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_RenderFile(graph, filename, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
if ((hwnd = get_renderer_hwnd(graph))) { @@ -5277,12 +5277,12 @@ static void test_window_threading(void) skip("Could not find renderer window.\n");
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
DestroyWindow(parent); UnregisterClassA("quartz_test_parent", GetModuleHandleA(NULL)); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
/* Hyperdevotion Noire needs to be able to Render() from UYVY. */ @@ -5321,12 +5321,12 @@ static void test_autoplug_uyvy(void) * failure to decode up to missing audio hardware, even though we're not * trying to render audio. */ hr = IFilterGraph2_Render(graph, &source_pin.IPin_iface); - todo_wine ok(hr == S_OK || hr == VFW_E_NO_AUDIO_HARDWARE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK || hr == VFW_E_NO_AUDIO_HARDWARE, "Got hr %#lx.\n", hr);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); - ok(source.ref == 1, "Got outstanding refcount %d.\n", source.ref); - ok(source_pin.ref == 1, "Got outstanding refcount %d.\n", source_pin.ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ok(source.ref == 1, "Got outstanding refcount %ld.\n", source.ref); + ok(source_pin.ref == 1, "Got outstanding refcount %ld.\n", source_pin.ref); }
static void test_set_notify_flags(void) @@ -5351,129 +5351,129 @@ static void test_set_notify_flags(void) status = SysAllocString(L"status");
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEventEx, (void **)&media_event); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEventSink, (void **)&media_event_sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testfilter_init(&filter, NULL, 0); filter.IAMFilterMiscFlags_iface.lpVtbl = &testmiscflags_vtbl; filter.misc_flags = AM_FILTER_MISC_FLAGS_IS_RENDERER;
hr = IFilterGraph2_AddFilter(graph, &filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEventEx_GetEventHandle(media_event, (OAEVENT *)&event); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEventEx_SetNotifyWindow(media_event, (OAHWND)window, WM_USER, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
while (PeekMessageA(&msg, window, WM_USER, WM_USER, PM_REMOVE));
hr = IMediaEventEx_SetNotifyFlags(media_event, 2); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IMediaEventEx_GetNotifyFlags(media_event, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
flags = 0xdeadbeef; hr = IMediaEventEx_GetNotifyFlags(media_event, &flags); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!flags, "Got flags %#x\n", flags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!flags, "Got flags %#lx\n", flags);
hr = IMediaEventEx_SetNotifyFlags(media_event, AM_MEDIAEVENT_NONOTIFY); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
flags = 0xdeadbeef; hr = IMediaEventEx_GetNotifyFlags(media_event, &flags); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(flags == AM_MEDIAEVENT_NONOTIFY, "Got flags %#x\n", flags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(flags == AM_MEDIAEVENT_NONOTIFY, "Got flags %#lx\n", flags);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IMediaEventEx_GetEvent(media_event, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
ok(!PeekMessageA(&msg, window, WM_USER, WM_USER, PM_REMOVE), "Window should not be notified.\n");
hr = IMediaEventEx_GetEvent(media_event, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK, (LONG_PTR)&filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IMediaControl_Pause(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK, (LONG_PTR)&filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IMediaEventEx_GetEvent(media_event, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IMediaEventEx_SetNotifyFlags(media_event, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
flags = 0xdeadbeef; hr = IMediaEventEx_GetNotifyFlags(media_event, &flags); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!flags, "Got flags %#x\n", flags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!flags, "Got flags %#lx\n", flags);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK, (LONG_PTR)&filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEventEx_SetNotifyFlags(media_event, AM_MEDIAEVENT_NONOTIFY); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaControl_Release(media_control); IMediaEventEx_Release(media_event); IMediaEventSink_Release(media_event_sink); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); - ok(filter.ref == 1, "Got outstanding refcount %d.\n", filter.ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ok(filter.ref == 1, "Got outstanding refcount %ld.\n", filter.ref);
SysFreeString(status); DestroyWindow(window); @@ -5498,9 +5498,9 @@ static void check_events_(unsigned int line, IMediaEventEx *media_event, if (code == EC_STATUS) ++ec_status_count; hr = IMediaEventEx_FreeEventParams(media_event, code, param1, param2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); } - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr); ok_(__FILE__, line)(ec_complete_count == expected_ec_complete_count, "Expected %d EC_COMPLETE events.\n", expected_ec_complete_count); ok_(__FILE__, line)(ec_status_count == expected_ec_status_count, @@ -5524,58 +5524,58 @@ static void test_events(void) status = SysAllocString(L"status");
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEventEx, (void **)&media_event); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEventSink, (void **)&media_event_sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
testfilter_init(&filter, NULL, 0); filter.IAMFilterMiscFlags_iface.lpVtbl = &testmiscflags_vtbl; filter.misc_flags = AM_FILTER_MISC_FLAGS_IS_RENDERER;
hr = IFilterGraph2_AddFilter(graph, &filter.IBaseFilter_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEventEx_GetEventHandle(media_event, (OAEVENT *)&event); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
code = 0xdeadbeef; param1 = 0xdeadbeef; param2 = 0xdeadbeef; hr = IMediaEventEx_GetEvent(media_event, &code, ¶m1, ¶m2, 0); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); - ok(!code, "Got code %#x.\n", code); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr); + ok(!code, "Got code %#lx.\n", code); todo_wine ok(!param1, "Got param1 %#Ix.\n", param1); todo_wine ok(!param2, "Got param2 %#Ix.\n", param2);
/* EC_COMPLETE is ignored while in stopped or paused state. */
hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK, (LONG_PTR)&filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_events(media_event, 0, 2);
hr = IMediaControl_Pause(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK, (LONG_PTR)&filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_events(media_event, 0, 2);
hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_events(media_event, 0, 0);
@@ -5583,68 +5583,68 @@ static void test_events(void) * This remains true even with default handling canceled. */
hr = IMediaEventEx_CancelDefaultHandling(media_event, EC_COMPLETE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK, (LONG_PTR)&filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_events(media_event, 1, 2);
hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK, (LONG_PTR)&filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_events(media_event, 0, 2);
hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK, (LONG_PTR)&filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Pause(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_events(media_event, 1, 2);
hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_COMPLETE, S_OK, (LONG_PTR)&filter.IBaseFilter_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaEventSink_Notify(media_event_sink, EC_STATUS, (LONG_PTR)status, (LONG_PTR)status); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Run(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_events(media_event, 0, 2);
@@ -5653,19 +5653,19 @@ static void test_events(void) SetEvent(event);
hr = IMediaEventEx_GetEvent(media_event, &code, ¶m1, ¶m2, 50); - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
hr = IMediaControl_Stop(media_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaControl_Release(media_control); IMediaEventEx_Release(media_event); IMediaEventSink_Release(media_event_sink); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); - ok(filter.ref == 1, "Got outstanding refcount %d.\n", filter.ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ok(filter.ref == 1, "Got outstanding refcount %ld.\n", filter.ref);
SysFreeString(status); } @@ -5687,13 +5687,13 @@ static void test_event_dispatch(void) IMediaEventEx_Release(event_ex);
hr = IMediaEvent_GetTypeInfoCount(event, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count == 1, "Got count %u.\n", count);
hr = IMediaEvent_GetTypeInfo(event, 0, 0, &typeinfo); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(typeattr->typekind == TKIND_DISPATCH, "Got kind %u.\n", typeattr->typekind); ok(IsEqualGUID(&typeattr->guid, &IID_IMediaEvent), "Got IID %s.\n", debugstr_guid(&typeattr->guid)); ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); @@ -5701,7 +5701,7 @@ static void test_event_dispatch(void)
IMediaEvent_Release(event); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(filtergraph) diff --git a/dlls/quartz/tests/filtermapper.c b/dlls/quartz/tests/filtermapper.c index f1a942b1d25..bcdf2c15d6c 100644 --- a/dlls/quartz/tests/filtermapper.c +++ b/dlls/quartz/tests/filtermapper.c @@ -35,7 +35,7 @@ static IFilterMapper3 *create_mapper(void) IFilterMapper3 *ret; HRESULT hr; hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper3, (void **)&ret); - ok(hr == S_OK, "Failed to create filter mapper, hr %#x.\n", hr); + ok(hr == S_OK, "Failed to create filter mapper, hr %#lx.\n", hr); return ret; }
@@ -56,7 +56,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); } @@ -92,10 +92,10 @@ static BOOL enum_find_filter(const WCHAR *wszFilterName, IEnumMoniker *pEnum) VariantInit(&var);
hr = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&pPropBagCat); - ok(SUCCEEDED(hr), "IMoniker_BindToStorage failed with %x\n", hr); + ok(SUCCEEDED(hr), "IMoniker_BindToStorage failed with %lx\n", hr);
hr = IPropertyBag_Read(pPropBagCat, L"FriendlyName", &var, NULL); - ok(SUCCEEDED(hr), "IPropertyBag_Read failed with %x\n", hr); + ok(SUCCEEDED(hr), "IPropertyBag_Read failed with %lx\n", hr);
if (!wcscmp(V_BSTR(&var), wszFilterName)) found = TRUE; @@ -128,13 +128,13 @@ static void test_fm2_enummatchingfilters(void)
hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&pMapper); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with %lx\n", hr); if (FAILED(hr)) goto out;
hr = CoCreateGuid(&clsidFilter1); - ok(hr == S_OK, "CoCreateGuid failed with %x\n", hr); + ok(hr == S_OK, "CoCreateGuid failed with %lx\n", hr); hr = CoCreateGuid(&clsidFilter2); - ok(hr == S_OK, "CoCreateGuid failed with %x\n", hr); + ok(hr == S_OK, "CoCreateGuid failed with %lx\n", hr);
/* Test that a test renderer filter is returned when enumerating filters with bRender=FALSE */ rgf2.dwVersion = 2; @@ -162,7 +162,7 @@ static void test_fm2_enummatchingfilters(void) } else { - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %lx\n", hr);
rgPins2[0].dwFlags = 0;
@@ -178,11 +178,11 @@ static void test_fm2_enummatchingfilters(void)
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter2, L"Testfilter2", NULL, &CLSID_LegacyAmFilterCategory, NULL, &rgf2); - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %lx\n", hr);
hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE, 0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %lx\n", hr); if (SUCCEEDED(hr) && pEnum) { found = enum_find_filter(L"Testfilter1", pEnum); @@ -194,7 +194,7 @@ static void test_fm2_enummatchingfilters(void)
hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE, 0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %lx\n", hr); if (SUCCEEDED(hr) && pEnum) { found = enum_find_filter(L"Testfilter2", pEnum); @@ -208,7 +208,7 @@ static void test_fm2_enummatchingfilters(void)
hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE, 0, NULL, NULL, &GUID_NULL, TRUE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %lx\n", hr);
if (SUCCEEDED(hr) && pEnum) { @@ -217,12 +217,12 @@ static void test_fm2_enummatchingfilters(void) }
hr = IFilterMapper2_QueryInterface(pMapper, &IID_IFilterMapper, (void **)&mapper); - ok(hr == S_OK, "QueryInterface(IFilterMapper) failed: %#x\n", hr); + ok(hr == S_OK, "QueryInterface(IFilterMapper) failed: %#lx\n", hr);
found = FALSE; hr = IFilterMapper_EnumMatchingFilters(mapper, &enum_reg, MERIT_UNLIKELY, FALSE, GUID_NULL, GUID_NULL, FALSE, FALSE, GUID_NULL, GUID_NULL); - ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed: %#x\n", hr); + ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed: %#lx\n", hr); while (!found && IEnumRegFilters_Next(enum_reg, 1, ®filter, &count) == S_OK) { if (!wcscmp(regfilter->Name, L"Testfilter1") && IsEqualGUID(&clsidFilter1, ®filter->Clsid)) @@ -239,7 +239,7 @@ static void test_fm2_enummatchingfilters(void)
hr = IFilterMapper2_EnumMatchingFilters(pMapper, &pEnum, 0, TRUE, MERIT_UNLIKELY, TRUE, 0, NULL, NULL, &GUID_NULL, TRUE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed with %lx\n", hr);
if (SUCCEEDED(hr) && pEnum) { @@ -251,18 +251,18 @@ static void test_fm2_enummatchingfilters(void) { hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, &clsidFilter1); - ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr); + ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %lx\n", hr);
hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, &clsidFilter2); - ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr); + ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %lx\n", hr); }
out:
if (pEnum) IEnumMoniker_Release(pEnum); ref = IFilterMapper2_Release(pMapper); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_legacy_filter_registration(void) @@ -298,34 +298,34 @@ static void test_legacy_filter_registration(void) * registers in this way. Filters so registered must then be accessible through both IFilterMapper_EnumMatchingFilters * and IFilterMapper2_EnumMatchingFilters. */ hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (void **)&mapper2); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with %lx\n", hr);
hr = IFilterMapper2_QueryInterface(mapper2, &IID_IFilterMapper, (void **)&mapper); - ok(hr == S_OK, "IFilterMapper2_QueryInterface failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_QueryInterface failed with %lx\n", hr);
/* Set default value - this is interpreted as "friendly name" later. */ RegSetValueExW(hkey, NULL, 0, REG_SZ, (const BYTE *)L"Testfilter", sizeof(L"Testfilter")); RegCloseKey(hkey);
hr = IFilterMapper_RegisterFilter(mapper, clsid, L"Testfilter", MERIT_UNLIKELY); - ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr); + ok(hr == S_OK, "RegisterFilter failed: %#lx\n", hr);
hr = IFilterMapper_RegisterPin(mapper, clsid, L"Pin1", TRUE, FALSE, FALSE, FALSE, GUID_NULL, NULL); - ok(hr == S_OK, "RegisterPin failed: %#x\n", hr); + ok(hr == S_OK, "RegisterPin failed: %#lx\n", hr);
hr = IFilterMapper_RegisterPinType(mapper, clsid, L"Pin1", GUID_NULL, GUID_NULL); - ok(hr == S_OK, "RegisterPinType failed: %#x\n", hr); + ok(hr == S_OK, "RegisterPinType failed: %#lx\n", hr);
hr = IFilterMapper2_EnumMatchingFilters(mapper2, &enum_mon, 0, TRUE, MERIT_UNLIKELY, TRUE, 0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed: %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed: %lx\n", hr); ok(enum_find_filter(L"Testfilter", enum_mon), "IFilterMapper2 didn't find filter\n"); IEnumMoniker_Release(enum_mon);
found = FALSE; hr = IFilterMapper_EnumMatchingFilters(mapper, &enum_reg, MERIT_UNLIKELY, TRUE, GUID_NULL, GUID_NULL, FALSE, FALSE, GUID_NULL, GUID_NULL); - ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed with %lx\n", hr); while(!found && IEnumRegFilters_Next(enum_reg, 1, ®filter, &count) == S_OK) { if (!wcscmp(regfilter->Name, L"Testfilter") && IsEqualGUID(&clsid, ®filter->Clsid)) @@ -335,18 +335,18 @@ static void test_legacy_filter_registration(void) ok(found, "IFilterMapper didn't find filter\n");
hr = IFilterMapper_UnregisterFilter(mapper, clsid); - ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %x\n", hr); + ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %lx\n", hr);
hr = IFilterMapper2_EnumMatchingFilters(mapper2, &enum_mon, 0, TRUE, MERIT_UNLIKELY, TRUE, 0, NULL, NULL, &GUID_NULL, FALSE, FALSE, 0, NULL, NULL, &GUID_NULL); - ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed: %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_EnumMatchingFilters failed: %lx\n", hr); ok(!enum_find_filter(L"Testfilter", enum_mon), "IFilterMapper2 shouldn't find filter\n"); IEnumMoniker_Release(enum_mon);
found = FALSE; hr = IFilterMapper_EnumMatchingFilters(mapper, &enum_reg, MERIT_UNLIKELY, TRUE, GUID_NULL, GUID_NULL, FALSE, FALSE, GUID_NULL, GUID_NULL); - ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper_EnumMatchingFilters failed with %lx\n", hr); while(!found && IEnumRegFilters_Next(enum_reg, 1, ®filter, &count) == S_OK) { if (!wcscmp(regfilter->Name, L"Testfilter") && IsEqualGUID(&clsid, ®filter->Clsid)) @@ -356,13 +356,13 @@ static void test_legacy_filter_registration(void) ok(!found, "IFilterMapper shouldn't find filter\n");
ret = RegDeleteKeyW(HKEY_CLASSES_ROOT, key_name); - ok(!ret, "RegDeleteKeyA failed: %lu\n", ret); + ok(!ret, "RegDeleteKeyA failed: %Iu\n", ret);
hr = IFilterMapper_RegisterFilter(mapper, clsid, L"Testfilter", MERIT_UNLIKELY); - ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr); + ok(hr == S_OK, "RegisterFilter failed: %#lx\n", hr);
hr = IFilterMapper_UnregisterFilter(mapper, clsid); - ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %x\n", hr); + ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %lx\n", hr);
IFilterMapper_Release(mapper); IFilterMapper2_Release(mapper2); @@ -382,13 +382,13 @@ static void test_register_filter_with_null_clsMinorType(void)
hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&pMapper); - ok(hr == S_OK, "CoCreateInstance failed with %x\n", hr); + ok(hr == S_OK, "CoCreateInstance failed with %lx\n", hr); if (FAILED(hr)) goto out;
hr = CoCreateGuid(&clsidFilter1); - ok(hr == S_OK, "CoCreateGuid failed with %x\n", hr); + ok(hr == S_OK, "CoCreateGuid failed with %lx\n", hr); hr = CoCreateGuid(&clsidFilter2); - ok(hr == S_OK, "CoCreateGuid failed with %x\n", hr); + ok(hr == S_OK, "CoCreateGuid failed with %lx\n", hr);
rgPinType.clsMajorType = &GUID_NULL; /* Make sure quartz accepts it without crashing */ @@ -418,10 +418,10 @@ static void test_register_filter_with_null_clsMinorType(void) skip("Not authorized to register filters\n"); goto out; } - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %lx\n", hr);
hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, &clsidFilter1); - ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %x\n", hr); + ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %lx\n", hr);
/* Test with pin descript version 2 */ ZeroMemory(&rgf2, sizeof(rgf2)); @@ -440,10 +440,10 @@ static void test_register_filter_with_null_clsMinorType(void)
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter2, L"Testfilter2", NULL, &CLSID_LegacyAmFilterCategory, NULL, &rgf2); - ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr); + ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %lx\n", hr);
hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL, &clsidFilter2); - ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %x\n", hr); + ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %lx\n", hr);
out:
@@ -473,7 +473,7 @@ static void test_parse_filter_data(void)
hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&pMapper); - ok((hr == S_OK || broken(hr != S_OK)), "CoCreateInstance failed with %x\n", hr); + ok((hr == S_OK || broken(hr != S_OK)), "CoCreateInstance failed with %lx\n", hr); if (FAILED(hr)) goto out;
hr = IFilterMapper2_QueryInterface(pMapper, &IID_IAMFilterData, (LPVOID*)&pData); @@ -559,53 +559,53 @@ static void test_aggregation(void) mapper = (IFilterMapper3 *)0xdeadbeef; hr = CoCreateInstance(&CLSID_FilterMapper2, &test_outer, CLSCTX_INPROC_SERVER, &IID_IFilterMapper3, (void **)&mapper); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!mapper, "Got interface %p.\n", mapper);
hr = CoCreateInstance(&CLSID_FilterMapper2, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IFilterMapper3, (void **)&mapper); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterMapper3_QueryInterface(mapper, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IFilterMapper3_QueryInterface(mapper, &IID_IFilterMapper3, (void **)&mapper2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(mapper2 == (IFilterMapper3 *)0xdeadbeef, "Got unexpected IFilterMapper3 %p.\n", mapper2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IFilterMapper3_QueryInterface(mapper, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IFilterMapper3_Release(mapper); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_dmo(void) @@ -625,19 +625,19 @@ static void test_dmo(void) skip("Not enough permissions to register DMOs.\n"); return; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mapper = create_mapper();
hr = IFilterMapper3_EnumMatchingFilters(mapper, &enumerator, 0, FALSE, 0, FALSE, 0, NULL, NULL, NULL, FALSE, FALSE, 0, NULL, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
found = FALSE; while (IEnumMoniker_Next(enumerator, 1, &moniker, NULL) == S_OK) { hr = IMoniker_GetDisplayName(moniker, NULL, NULL, &name); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (!wcscmp(name, L"@device:dmo:{77777777-0000-0000-0000-000000000000}{57F2DB8B-E6BB-4513-9D43-DCD2A6593125}")) found = TRUE; @@ -651,10 +651,10 @@ static void test_dmo(void) /* DMOs are enumerated by IFilterMapper in Windows 7 and higher. */
ref = IFilterMapper3_Release(mapper); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = DMOUnregister(&testclsid, &DMOCATEGORY_AUDIO_DECODER); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
START_TEST(filtermapper) diff --git a/dlls/quartz/tests/memallocator.c b/dlls/quartz/tests/memallocator.c index 164f3af47f4..37df9a24bd2 100644 --- a/dlls/quartz/tests/memallocator.c +++ b/dlls/quartz/tests/memallocator.c @@ -27,7 +27,7 @@ static IMemAllocator *create_allocator(void) IMemAllocator *allocator = NULL; HRESULT hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return allocator; }
@@ -63,59 +63,59 @@ static void test_properties(void)
memset(&ret_props, 0xcc, sizeof(ret_props)); hr = IMemAllocator_GetProperties(allocator, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!ret_props.cBuffers, "Got %d buffers.\n", ret_props.cBuffers); - ok(!ret_props.cbBuffer, "Got size %d.\n", ret_props.cbBuffer); - ok(!ret_props.cbAlign, "Got align %d.\n", ret_props.cbAlign); - ok(!ret_props.cbPrefix, "Got prefix %d.\n", ret_props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!ret_props.cBuffers, "Got %ld buffers.\n", ret_props.cBuffers); + ok(!ret_props.cbBuffer, "Got size %ld.\n", ret_props.cbBuffer); + ok(!ret_props.cbAlign, "Got align %ld.\n", ret_props.cbAlign); + ok(!ret_props.cbPrefix, "Got prefix %ld.\n", ret_props.cbPrefix);
hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == VFW_E_BADALIGN, "Got hr %#x.\n", hr); + ok(hr == VFW_E_BADALIGN, "Got hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); i++) { req_props = tests[i]; hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr); ok(!memcmp(&req_props, &tests[i], sizeof(req_props)), "Test %u: Requested props should not be changed.\n", i); - ok(ret_props.cBuffers == req_props.cBuffers, "Test %u: Got %d buffers.\n", i, ret_props.cBuffers); - ok(ret_props.cbBuffer >= req_props.cbBuffer, "Test %u: Got size %d.\n", i, ret_props.cbBuffer); - ok(ret_props.cbAlign == req_props.cbAlign, "Test %u: Got alignment %d.\n", i, ret_props.cbAlign); - ok(ret_props.cbPrefix == req_props.cbPrefix, "Test %u: Got prefix %d.\n", i, ret_props.cbPrefix); + ok(ret_props.cBuffers == req_props.cBuffers, "Test %u: Got %ld buffers.\n", i, ret_props.cBuffers); + ok(ret_props.cbBuffer >= req_props.cbBuffer, "Test %u: Got size %ld.\n", i, ret_props.cbBuffer); + ok(ret_props.cbAlign == req_props.cbAlign, "Test %u: Got alignment %ld.\n", i, ret_props.cbAlign); + ok(ret_props.cbPrefix == req_props.cbPrefix, "Test %u: Got prefix %ld.\n", i, ret_props.cbPrefix); ret_size = ret_props.cbBuffer;
hr = IMemAllocator_GetProperties(allocator, &ret_props); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); - ok(ret_props.cBuffers == req_props.cBuffers, "Test %u: Got %d buffers.\n", i, ret_props.cBuffers); - ok(ret_props.cbBuffer == ret_size, "Test %u: Got size %d.\n", i, ret_props.cbBuffer); - ok(ret_props.cbAlign == req_props.cbAlign, "Test %u: Got alignment %d.\n", i, ret_props.cbAlign); - ok(ret_props.cbPrefix == req_props.cbPrefix, "Test %u: Got prefix %d.\n", i, ret_props.cbPrefix); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr); + ok(ret_props.cBuffers == req_props.cBuffers, "Test %u: Got %ld buffers.\n", i, ret_props.cBuffers); + ok(ret_props.cbBuffer == ret_size, "Test %u: Got size %ld.\n", i, ret_props.cbBuffer); + ok(ret_props.cbAlign == req_props.cbAlign, "Test %u: Got alignment %ld.\n", i, ret_props.cbAlign); + ok(ret_props.cbPrefix == req_props.cbPrefix, "Test %u: Got prefix %ld.\n", i, ret_props.cbPrefix);
hr = IMemAllocator_Commit(allocator); if (!req_props.cbBuffer) { - ok(hr == VFW_E_SIZENOTSET, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == VFW_E_SIZENOTSET, "Test %u: Got hr %#lx.\n", i, hr); continue; } - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == VFW_E_ALREADY_COMMITTED, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == VFW_E_ALREADY_COMMITTED, "Test %u: Got hr %#lx.\n", i, hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
size = IMediaSample_GetSize(sample); - ok(size == ret_size, "Test %u: Got size %d.\n", i, size); + ok(size == ret_size, "Test %u: Got size %ld.\n", i, size);
hr = IMemAllocator_Decommit(allocator); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == VFW_E_BUFFERS_OUTSTANDING, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == VFW_E_BUFFERS_OUTSTANDING, "Test %u: Got hr %#lx.\n", i, hr);
hr = IMediaSample_Release(sample); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr); }
IMemAllocator_Release(allocator); @@ -130,42 +130,42 @@ static void test_commit(void) BYTE *data;
hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSample_Release(sample);
hr = IMemAllocator_Decommit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Decommit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Extant samples remain valid even after Decommit() is called. */ hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_Decommit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(data, 0xcc, 65536);
hr = IMemAllocator_GetBuffer(allocator, &sample2, NULL, NULL, 0); - ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr);
IMediaSample_Release(sample); IMemAllocator_Release(allocator); @@ -182,132 +182,132 @@ static void test_sample_time(void) HRESULT hr;
hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_QueryInterface(sample, &IID_IMediaSample2, (void **)&sample2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = 0xdeadbeef; end = 0xdeadf00d; hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr); ok(start == 0xdeadbeef, "Got start %s.\n", wine_dbgstr_longlong(start)); ok(end == 0xdeadf00d, "Got end %s.\n", wine_dbgstr_longlong(end));
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags);
hr = IMediaSample_SetTime(sample, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags);
start = 0x123; hr = IMediaSample_SetTime(sample, &start, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = end = 0; hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == VFW_S_NO_STOP_TIME, "Got hr %#x.\n", hr); + ok(hr == VFW_S_NO_STOP_TIME, "Got hr %#lx.\n", hr); ok(start == 0x123, "Got start %s.\n", wine_dbgstr_longlong(start)); ok(end == 0x124, "Got end %s.\n", wine_dbgstr_longlong(end));
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.dwSampleFlags == AM_SAMPLE_TIMEVALID, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.dwSampleFlags == AM_SAMPLE_TIMEVALID, "Got flags %#lx.\n", props.dwSampleFlags); ok(props.tStart == 0x123, "Got start %s.\n", wine_dbgstr_longlong(props.tStart));
hr = IMediaSample_SetTime(sample, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags);
end = 0x321; hr = IMediaSample_SetTime(sample, NULL, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags);
start = 0x123; end = 0x321; hr = IMediaSample_SetTime(sample, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = end = 0; hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == 0x123, "Got start %s.\n", wine_dbgstr_longlong(start)); ok(end == 0x321, "Got end %s.\n", wine_dbgstr_longlong(end));
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(props.dwSampleFlags == (AM_SAMPLE_TIMEVALID | AM_SAMPLE_STOPVALID), - "Got flags %#x.\n", props.dwSampleFlags); + "Got flags %#lx.\n", props.dwSampleFlags); ok(props.tStart == 0x123, "Got start %s.\n", wine_dbgstr_longlong(props.tStart)); ok(props.tStop == 0x321, "Got end %s.\n", wine_dbgstr_longlong(props.tStop));
props.dwSampleFlags = 0; hr = IMediaSample2_SetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags);
props.dwSampleFlags = AM_SAMPLE_TIMEVALID; props.tStart = 0x123; hr = IMediaSample2_SetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = end = 0; hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == VFW_S_NO_STOP_TIME, "Got hr %#x.\n", hr); + ok(hr == VFW_S_NO_STOP_TIME, "Got hr %#lx.\n", hr); ok(start == 0x123, "Got start %s.\n", wine_dbgstr_longlong(start)); ok(end == 0x124, "Got end %s.\n", wine_dbgstr_longlong(end));
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.dwSampleFlags == AM_SAMPLE_TIMEVALID, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.dwSampleFlags == AM_SAMPLE_TIMEVALID, "Got flags %#lx.\n", props.dwSampleFlags); ok(props.tStart == 0x123, "Got start %s.\n", wine_dbgstr_longlong(props.tStart));
props.dwSampleFlags = AM_SAMPLE_TIMEVALID | AM_SAMPLE_STOPVALID; props.tStart = 0x1234; props.tStop = 0x4321; hr = IMediaSample2_SetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = end = 0; hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == 0x1234, "Got start %s.\n", wine_dbgstr_longlong(start)); ok(end == 0x4321, "Got end %s.\n", wine_dbgstr_longlong(end));
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(props.dwSampleFlags == (AM_SAMPLE_TIMEVALID | AM_SAMPLE_STOPVALID), - "Got flags %#x.\n", props.dwSampleFlags); + "Got flags %#lx.\n", props.dwSampleFlags); ok(props.tStart == 0x1234, "Got start %s.\n", wine_dbgstr_longlong(props.tStart)); ok(props.tStop == 0x4321, "Got end %s.\n", wine_dbgstr_longlong(props.tStop));
@@ -317,28 +317,28 @@ static void test_sample_time(void) start = 0x123; end = 0x321; hr = IMemAllocator_GetBuffer(allocator, &sample, &start, &end, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_QueryInterface(sample, &IID_IMediaSample2, (void **)&sample2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = 0xdeadbeef; end = 0xdeadf00d; hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr); ok(start == 0xdeadbeef, "Got start %s.\n", wine_dbgstr_longlong(start)); ok(end == 0xdeadf00d, "Got end %s.\n", wine_dbgstr_longlong(end));
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags);
start = 0x123; end = 0x321; hr = IMediaSample_SetMediaTime(sample, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetTime(sample, &start, &end); - ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_SAMPLE_TIME_NOT_SET, "Got hr %#lx.\n", hr);
IMediaSample2_Release(sample2); IMediaSample_Release(sample); @@ -355,48 +355,48 @@ static void test_media_time(void) HRESULT hr;
hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = 0xdeadbeef; end = 0xdeadf00d; hr = IMediaSample_GetMediaTime(sample, &start, &end); - ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr); ok(start == 0xdeadbeef, "Got start %s.\n", wine_dbgstr_longlong(start)); ok(end == 0xdeadf00d, "Got end %s.\n", wine_dbgstr_longlong(end));
hr = IMediaSample_SetMediaTime(sample, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetMediaTime(sample, &start, &end); - ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr);
/* This crashes on quartz.dll < 6.6. */ if (0) { start = 0x123; hr = IMediaSample_SetMediaTime(sample, &start, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
end = 0x321; hr = IMediaSample_SetMediaTime(sample, NULL, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetMediaTime(sample, &start, &end); - ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr);
start = 0x123; end = 0x321; hr = IMediaSample_SetMediaTime(sample, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = end = 0; hr = IMediaSample_GetMediaTime(sample, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == 0x123, "Got start %s.\n", wine_dbgstr_longlong(start)); ok(end == 0x321, "Got end %s.\n", wine_dbgstr_longlong(end));
@@ -405,35 +405,35 @@ static void test_media_time(void) start = 0x123; end = 0x321; hr = IMemAllocator_GetBuffer(allocator, &sample, &start, &end, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start = 0xdeadbeef; end = 0xdeadf00d; hr = IMediaSample_GetMediaTime(sample, &start, &end); - ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr); ok(start == 0xdeadbeef, "Got start %s.\n", wine_dbgstr_longlong(start)); ok(end == 0xdeadf00d, "Got end %s.\n", wine_dbgstr_longlong(end));
start = 0x123; end = 0x321; hr = IMediaSample_SetTime(sample, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetMediaTime(sample, &start, &end); - ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr);
start = 0x123; end = 0x321; hr = IMediaSample_SetMediaTime(sample, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaSample_Release(sample);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetMediaTime(sample, &start, &end); - ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#x.\n", hr); + ok(hr == VFW_E_MEDIA_TIME_NOT_SET, "Got hr %#lx.\n", hr);
IMediaSample_Release(sample); IMemAllocator_Release(allocator); @@ -457,193 +457,193 @@ static void test_sample_properties(void) expect_mt.pbFormat = NULL;
hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_QueryInterface(sample, &IID_IMediaSample2, (void **)&sample2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwTypeSpecificFlags, "Got type-specific flags %#x.\n", props.dwTypeSpecificFlags); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); - ok(props.lActual == 65536, "Got actual length %d.\n", props.lActual); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwTypeSpecificFlags, "Got type-specific flags %#lx.\n", props.dwTypeSpecificFlags); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags); + ok(props.lActual == 65536, "Got actual length %ld.\n", props.lActual); ok(!props.tStart, "Got sample start %s.\n", wine_dbgstr_longlong(props.tStart)); - ok(!props.dwStreamId, "Got stream ID %#x.\n", props.dwStreamId); + ok(!props.dwStreamId, "Got stream ID %#lx.\n", props.dwStreamId); ok(!props.pMediaType, "Got media type %p.\n", props.pMediaType); ok(props.pbBuffer == data, "Expected pointer %p, got %p.\n", data, props.pbBuffer); - ok(props.cbBuffer == 65536, "Got buffer length %d.\n", props.cbBuffer); + ok(props.cbBuffer == 65536, "Got buffer length %ld.\n", props.cbBuffer);
/* media type */
mt = (AM_MEDIA_TYPE *)0xdeadbeef; hr = IMediaSample_GetMediaType(sample, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(!mt, "Got media type %p.\n", mt);
hr = IMediaSample_SetMediaType(sample, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt = (AM_MEDIA_TYPE *)0xdeadbeef; hr = IMediaSample_GetMediaType(sample, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(!mt, "Got media type %p.\n", mt);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags); ok(!props.pMediaType, "Got media type %p.\n", props.pMediaType);
hr = IMediaSample_SetMediaType(sample, &expect_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetMediaType(sample, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(mt, &expect_mt, sizeof(AM_MEDIA_TYPE)), "Media types didn't match.\n"); CoTaskMemFree(mt);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.dwSampleFlags == AM_SAMPLE_TYPECHANGED, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.dwSampleFlags == AM_SAMPLE_TYPECHANGED, "Got flags %#lx.\n", props.dwSampleFlags); ok(!memcmp(props.pMediaType, &expect_mt, sizeof(AM_MEDIA_TYPE)), "Media types didn't match.\n");
hr = IMediaSample_SetMediaType(sample, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt = (AM_MEDIA_TYPE *)0xdeadbeef; hr = IMediaSample_GetMediaType(sample, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(!mt, "Got media type %p.\n", mt);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags); ok(!props.pMediaType, "Got media type %p.\n", props.pMediaType);
/* actual length */
len = IMediaSample_GetActualDataLength(sample); - ok(len == 65536, "Got length %d.\n", len); + ok(len == 65536, "Got length %ld.\n", len);
hr = IMediaSample_SetActualDataLength(sample, 65537); - ok(hr == VFW_E_BUFFER_OVERFLOW, "Got hr %#x.\n", hr); + ok(hr == VFW_E_BUFFER_OVERFLOW, "Got hr %#lx.\n", hr); hr = IMediaSample_SetActualDataLength(sample, -1); - ok(hr == VFW_E_BUFFER_OVERFLOW || broken(hr == S_OK), "Got hr %#x.\n", hr); + ok(hr == VFW_E_BUFFER_OVERFLOW || broken(hr == S_OK), "Got hr %#lx.\n", hr); hr = IMediaSample_SetActualDataLength(sample, 65536); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_SetActualDataLength(sample, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
len = IMediaSample_GetActualDataLength(sample); - ok(len == 0, "Got length %d.\n", len); + ok(len == 0, "Got length %ld.\n", len);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.lActual == 0, "Got actual length %d.\n", props.lActual); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.lActual == 0, "Got actual length %ld.\n", props.lActual);
props.lActual = 123; hr = IMediaSample2_SetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.lActual == 123, "Got actual length %d.\n", props.lActual); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.lActual == 123, "Got actual length %ld.\n", props.lActual);
len = IMediaSample_GetActualDataLength(sample); - ok(len == 123, "Got length %d.\n", len); + ok(len == 123, "Got length %ld.\n", len);
/* boolean flags */
hr = IMediaSample_IsPreroll(sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample_SetPreroll(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsPreroll(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.dwSampleFlags == AM_SAMPLE_PREROLL, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.dwSampleFlags == AM_SAMPLE_PREROLL, "Got flags %#lx.\n", props.dwSampleFlags); hr = IMediaSample_SetPreroll(sample, FALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsPreroll(sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags);
hr = IMediaSample_IsDiscontinuity(sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample_SetDiscontinuity(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsDiscontinuity(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.dwSampleFlags == AM_SAMPLE_DATADISCONTINUITY, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.dwSampleFlags == AM_SAMPLE_DATADISCONTINUITY, "Got flags %#lx.\n", props.dwSampleFlags); hr = IMediaSample_SetDiscontinuity(sample, FALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsDiscontinuity(sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags);
hr = IMediaSample_IsSyncPoint(sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample_SetSyncPoint(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsSyncPoint(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.dwSampleFlags == AM_SAMPLE_SPLICEPOINT, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.dwSampleFlags == AM_SAMPLE_SPLICEPOINT, "Got flags %#lx.\n", props.dwSampleFlags); hr = IMediaSample_SetSyncPoint(sample, FALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsSyncPoint(sample); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags);
props.dwSampleFlags = (AM_SAMPLE_PREROLL | AM_SAMPLE_DATADISCONTINUITY | AM_SAMPLE_SPLICEPOINT); hr = IMediaSample2_SetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsPreroll(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsDiscontinuity(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_IsSyncPoint(sample); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(props.dwSampleFlags == (AM_SAMPLE_PREROLL | AM_SAMPLE_DATADISCONTINUITY | AM_SAMPLE_SPLICEPOINT), - "Got flags %#x.\n", props.dwSampleFlags); + "Got flags %#lx.\n", props.dwSampleFlags);
hr = IMediaSample_SetMediaType(sample, &expect_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaSample2_Release(sample2); IMediaSample_Release(sample);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSample_QueryInterface(sample, &IID_IMediaSample2, (void **)&sample2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample2_GetProperties(sample2, sizeof(props), (BYTE *)&props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.dwTypeSpecificFlags, "Got type-specific flags %#x.\n", props.dwTypeSpecificFlags); - ok(!props.dwSampleFlags, "Got flags %#x.\n", props.dwSampleFlags); - ok(props.lActual == 123, "Got actual length %d.\n", props.lActual); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.dwTypeSpecificFlags, "Got type-specific flags %#lx.\n", props.dwTypeSpecificFlags); + ok(!props.dwSampleFlags, "Got flags %#lx.\n", props.dwSampleFlags); + ok(props.lActual == 123, "Got actual length %ld.\n", props.lActual); ok(!props.tStart, "Got sample start %s.\n", wine_dbgstr_longlong(props.tStart)); - ok(!props.dwStreamId, "Got stream ID %#x.\n", props.dwStreamId); + ok(!props.dwStreamId, "Got stream ID %#lx.\n", props.dwStreamId); ok(!props.pMediaType, "Got media type %p.\n", props.pMediaType); - ok(props.cbBuffer == 65536, "Got buffer length %d.\n", props.cbBuffer); + ok(props.cbBuffer == 65536, "Got buffer length %ld.\n", props.cbBuffer);
IMediaSample2_Release(sample2); IMediaSample_Release(sample); diff --git a/dlls/quartz/tests/mpegsplit.c b/dlls/quartz/tests/mpegsplit.c index 5aae09b596d..b2cced84c68 100644 --- a/dlls/quartz/tests/mpegsplit.c +++ b/dlls/quartz/tests/mpegsplit.c @@ -32,7 +32,7 @@ static IBaseFilter *create_mpeg_splitter(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_MPEG1Splitter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -54,11 +54,11 @@ static WCHAR *load_resource(const WCHAR *name) wcscat(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n", + ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %lu.\n", wine_dbgstr_w(pathW), GetLastError());
res = FindResourceW(NULL, name, (LPCWSTR)RT_RCDATA); - ok(!!res, "Failed to load resource, error %u.\n", GetLastError()); + ok(!!res, "Failed to load resource, error %lu.\n", GetLastError()); ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res)); WriteFile(file, ptr, SizeofResource( GetModuleHandleA(NULL), res), &written, NULL); ok(written == SizeofResource(GetModuleHandleA(NULL), res), "Failed to write resource.\n"); @@ -96,7 +96,7 @@ static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename IBaseFilter_FindPin(reader, L"Output", &source);
hr = IFilterGraph2_ConnectDirect(graph, source, sink, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(source); IPin_Release(sink); @@ -115,7 +115,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); } @@ -222,53 +222,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_MPEG1Splitter, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_MPEG1Splitter, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -283,71 +283,71 @@ static void test_enum_pins(void) BOOL ret;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); @@ -355,46 +355,46 @@ static void test_enum_pins(void) graph = connect_input(filter, filename);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
IEnumPins_Release(enum1); IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_find_pin(void) @@ -409,34 +409,34 @@ static void test_find_pin(void) BOOL ret;
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"Input", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Audio", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
graph = connect_input(filter, filename);
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"Input", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin); IPin_Release(pin); IPin_Release(pin2);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"Audio", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin); IPin_Release(pin); IPin_Release(pin2); @@ -444,9 +444,9 @@ static void test_find_pin(void) IEnumPins_Release(enum_pins); IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_pin_info(void) @@ -465,49 +465,49 @@ static void test_pin_info(void) graph = connect_input(filter, filename);
hr = IBaseFilter_FindPin(filter, L"Input", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); expect_ref = get_refcount(filter); ref = get_refcount(pin); - ok(ref == expect_ref, "Got unexpected refcount %d.\n", ref); + ok(ref == expect_ref, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"Input"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref); + ok(ref == expect_ref + 1, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref); + ok(ref == expect_ref + 1, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"Input"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"Audio", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"Audio"), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"Audio"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
@@ -515,9 +515,9 @@ static void test_pin_info(void)
IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_media_types(void) @@ -548,7 +548,7 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"Input", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
expect_mt.majortype = MEDIATYPE_Stream; expect_mt.bFixedSizeSamples = TRUE; @@ -556,7 +556,7 @@ static void test_media_types(void) expect_mt.lSampleSize = 1;
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); expect_mt.subtype = MEDIASUBTYPE_MPEG1System; if (hr == S_OK) { @@ -565,7 +565,7 @@ static void test_media_types(void) }
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); expect_mt.subtype = MEDIASUBTYPE_MPEG1VideoCD; if (hr == S_OK) { @@ -574,7 +574,7 @@ static void test_media_types(void) }
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); expect_mt.subtype = MEDIASUBTYPE_MPEG1Video; if (hr == S_OK) { @@ -583,7 +583,7 @@ static void test_media_types(void) }
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); expect_mt.subtype = MEDIASUBTYPE_MPEG1Audio; if (hr == S_OK) { @@ -592,70 +592,70 @@ static void test_media_types(void) }
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
mt.majortype = MEDIATYPE_Stream; mt.subtype = MEDIASUBTYPE_MPEG1Audio; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.subtype = MEDIASUBTYPE_MPEG1Video; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_MPEG1VideoCD; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_MPEG1System; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_MPEG1AudioPayload; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_MPEG1Payload; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_MPEG1Packet; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.subtype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_MPEG1Audio;
mt.majortype = MEDIATYPE_Audio; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Stream;
mt.formattype = FORMAT_None; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.formattype = FORMAT_VideoInfo; hr = IPin_QueryAccept(pin, &mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.formattype = FORMAT_WaveFormatEx; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.bFixedSizeSamples = TRUE; mt.bTemporalCompression = TRUE; mt.lSampleSize = 123; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
graph = connect_input(filter, filename);
/* Connecting input doesn't change the reported media types. */ hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); expect_mt.subtype = MEDIASUBTYPE_MPEG1System; if (hr == S_OK) { @@ -669,21 +669,21 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"Audio", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Audio), "Got major type %s.\n", wine_dbgstr_guid(&pmt->majortype)); todo_wine ok(IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_MPEG1AudioPayload), "Got subtype %s.\n", wine_dbgstr_guid(&pmt->subtype)); todo_wine ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - todo_wine ok(pmt->lSampleSize == 1, "Got sample size %u.\n", pmt->lSampleSize); + todo_wine ok(pmt->lSampleSize == 1, "Got sample size %lu.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &FORMAT_WaveFormatEx), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); - todo_wine ok(pmt->cbFormat == sizeof(MPEG1WAVEFORMAT), "Got format size %u.\n", pmt->cbFormat); + todo_wine ok(pmt->cbFormat == sizeof(MPEG1WAVEFORMAT), "Got format size %lu.\n", pmt->cbFormat); if (pmt->cbFormat == sizeof(MPEG1WAVEFORMAT)) { /* Native will sometimes leave junk in the joint stereo flags. */ @@ -692,58 +692,58 @@ static void test_media_types(void) }
hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->bFixedSizeSamples = FALSE; pmt->bTemporalCompression = TRUE; pmt->lSampleSize = 123; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->majortype = MEDIATYPE_Video; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->majortype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->majortype = MEDIATYPE_Audio;
pmt->subtype = MEDIASUBTYPE_MPEG1Audio; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_MPEG1Packet; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_MPEG1Video; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_MPEG1AudioPayload;
pmt->formattype = FORMAT_None; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->formattype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->formattype = FORMAT_WaveFormatEx;
wfx = (MPEG1WAVEFORMAT *)pmt->pbFormat;
wfx->fwHeadLayer = ACM_MPEG_LAYER2; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); wfx->fwHeadLayer = ACM_MPEG_LAYER3;
wfx->wfx.wFormatTag = WAVE_FORMAT_MPEGLAYER3; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); wfx->wfx.wFormatTag = WAVE_FORMAT_MPEG;
CoTaskMemFree(pmt->pbFormat); CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr != S_OK) goto done; ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Audio), "Got major type %s.\n", @@ -752,80 +752,80 @@ static void test_media_types(void) wine_dbgstr_guid(&pmt->subtype)); ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - ok(pmt->lSampleSize == 1, "Got sample size %u.\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 1, "Got sample size %lu.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &FORMAT_WaveFormatEx), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); - ok(pmt->cbFormat == sizeof(MPEG1WAVEFORMAT), "Got format size %u.\n", pmt->cbFormat); + ok(pmt->cbFormat == sizeof(MPEG1WAVEFORMAT), "Got format size %lu.\n", pmt->cbFormat); /* Native will sometimes leave junk in the joint stereo flags. */ expect_wfx.fwHeadModeExt = ((MPEG1WAVEFORMAT *)pmt->pbFormat)->fwHeadModeExt; ok(!memcmp(pmt->pbFormat, &expect_wfx, sizeof(MPEG1WAVEFORMAT)), "Format blocks didn't match.\n");
hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
CoTaskMemFree(pmt->pbFormat); CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Audio), "Got major type %s.\n", wine_dbgstr_guid(&pmt->majortype)); ok(IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_mp3), "Got subtype %s.\n", wine_dbgstr_guid(&pmt->subtype)); ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - ok(pmt->lSampleSize == 1, "Got sample size %u.\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 1, "Got sample size %lu.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &FORMAT_WaveFormatEx), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); - ok(pmt->cbFormat == sizeof(MPEGLAYER3WAVEFORMAT), "Got format size %u.\n", pmt->cbFormat); + ok(pmt->cbFormat == sizeof(MPEGLAYER3WAVEFORMAT), "Got format size %lu.\n", pmt->cbFormat); ok(!memcmp(pmt->pbFormat, &expect_mp3_wfx, sizeof(MPEGLAYER3WAVEFORMAT)), "Format blocks didn't match.\n");
hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->bFixedSizeSamples = FALSE; pmt->bTemporalCompression = TRUE; pmt->lSampleSize = 123; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->majortype = MEDIATYPE_Video; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->majortype = MEDIATYPE_Audio;
pmt->subtype = MEDIASUBTYPE_MPEG1Audio; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_MPEG1Packet; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_MPEG1Video; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_MPEG1AudioPayload;
pmt->formattype = FORMAT_None; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->formattype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->formattype = FORMAT_WaveFormatEx;
mp3wfx = (MPEGLAYER3WAVEFORMAT *)pmt->pbFormat;
mp3wfx->fdwFlags = MPEGLAYER3_FLAG_PADDING_OFF; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mp3wfx->fdwFlags = MPEGLAYER3_FLAG_PADDING_ISO;
mp3wfx->wfx.wFormatTag = WAVE_FORMAT_MPEG; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mp3wfx->wfx.wFormatTag = WAVE_FORMAT_MPEGLAYER3;
CoTaskMemFree(pmt->pbFormat); @@ -833,16 +833,16 @@ static void test_media_types(void)
done: hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin);
IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_enum_media_types(void) @@ -861,78 +861,78 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"Input", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < 4; ++i) { hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) CoTaskMemFree(mts[0]); }
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < 4; ++i) { hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(count == 1, "Got count %u.\n", count); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(count == 1, "Got count %lu.\n", count); if (hr == S_OK) CoTaskMemFree(mts[0]); }
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(count == 2, "Got count %u.\n", count); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(count == 2, "Got count %lu.\n", count); if (count > 0) CoTaskMemFree(mts[0]); if (count > 1) CoTaskMemFree(mts[1]);
hr = IEnumMediaTypes_Next(enum1, 3, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + todo_wine ok(count == 2, "Got count %lu.\n", count); if (count > 0) CoTaskMemFree(mts[0]); if (count > 1) CoTaskMemFree(mts[1]);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 5); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 4); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) CoTaskMemFree(mts[0]);
IEnumMediaTypes_Release(enum1); @@ -942,82 +942,82 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"Audio", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < 3; ++i) { hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - todo_wine_if(i) ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine_if(i) ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) CoTaskMemFree(mts[0]->pbFormat); if (hr == S_OK) CoTaskMemFree(mts[0]); }
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < 3; ++i) { hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - todo_wine_if(i) ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine_if(i) ok(count == 1, "Got count %u.\n", count); + todo_wine_if(i) ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine_if(i) ok(count == 1, "Got count %lu.\n", count); if (hr == S_OK) CoTaskMemFree(mts[0]->pbFormat); if (hr == S_OK) CoTaskMemFree(mts[0]); }
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(count == 2, "Got count %u.\n", count); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(count == 2, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]); if (count > 1) CoTaskMemFree(mts[1]->pbFormat); if (count > 1) CoTaskMemFree(mts[1]);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + todo_wine ok(count == 1, "Got count %lu.\n", count); if (count) CoTaskMemFree(mts[0]->pbFormat); if (count) CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 4); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 3); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
@@ -1027,9 +1027,9 @@ static void test_enum_media_types(void)
IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_unconnected_filter_state(void) @@ -1040,53 +1040,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -1166,7 +1166,7 @@ static HRESULT WINAPI testsource_AttemptConnection(struct strmbase_source *iface
if (FAILED(hr = IPin_ReceiveConnection(peer, &iface->pin.IPin_iface, mt))) { - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); IPin_Release(peer); iface->pin.peer = NULL; FreeMediaType(&iface->pin.mt); @@ -1221,16 +1221,16 @@ static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample HRESULT hr;
hr = IMediaSample_GetTime(sample, &start, &end); - todo_wine_if (hr == VFW_S_NO_STOP_TIME) ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine_if (hr == VFW_S_NO_STOP_TIME) ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (winetest_debug > 1) - trace("%04x: Got sample with timestamps %I64d-%I64d.\n", GetCurrentThreadId(), start, end); + trace("%04lx: Got sample with timestamps %I64d-%I64d.\n", GetCurrentThreadId(), start, end);
ok(filter->new_segment_count, "Expected NewSegment() before Receive().\n");
IPin_QueryInterface(iface->pin.peer, &IID_IMediaSeeking, (void **)&seeking); hr = IMediaSeeking_GetPositions(seeking, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == filter->seek_start, "Expected start position %I64u, got %I64u.\n", filter->seek_start, start); ok(end == filter->seek_end, "Expected end position %I64u, got %I64u.\n", filter->seek_end, end); IMediaSeeking_Release(seeking); @@ -1245,7 +1245,7 @@ static HRESULT testsink_eos(struct strmbase_sink *iface) struct testfilter *filter = impl_from_strmbase_filter(iface->pin.filter);
if (winetest_debug > 1) - trace("%04x: Got EOS.\n", GetCurrentThreadId()); + trace("%04lx: Got EOS.\n", GetCurrentThreadId());
ok(!filter->eos_count, "Got %u EOS events.\n", filter->eos_count + 1); ++filter->eos_count; @@ -1261,13 +1261,13 @@ static HRESULT testsink_new_segment(struct strmbase_sink *iface, HRESULT hr;
if (winetest_debug > 1) - trace("%04x: Got segment with timestamps %I64d-%I64d.\n", GetCurrentThreadId(), start, end); + trace("%04lx: Got segment with timestamps %I64d-%I64d.\n", GetCurrentThreadId(), start, end);
++filter->new_segment_count;
IPin_QueryInterface(iface->pin.peer, &IID_IMediaSeeking, (void **)&seeking); hr = IMediaSeeking_GetPositions(seeking, &filter->seek_start, &filter->seek_end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMediaSeeking_Release(seeking);
ok(start == filter->segment_start, "Expected start %I64d, got %I64d.\n", filter->segment_start, start); @@ -1421,48 +1421,48 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(sink, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Video; hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Stream;
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_MPEG1Audio;
hr = IFilterGraph2_ConnectDirect(graph, &testsource.source.pin.IPin_iface, sink, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(sink, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsource.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(sink, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsource.source.pin.mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Test source connection. */
@@ -1470,11 +1470,11 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(source, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
/* Exact connection. */
@@ -1484,71 +1484,71 @@ static void test_connect_pin(void) CopyMediaType(&req_mt, source_mt);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(source, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &testsink.sink.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(source, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n"); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, source); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsink.sink.pin.peer == source, "Got peer %p.\n", testsink.sink.pin.peer); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.lSampleSize = 999; req_mt.bTemporalCompression = req_mt.bFixedSizeSamples = TRUE; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = MEDIATYPE_Stream; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Audio;
req_mt.subtype = MEDIASUBTYPE_PCM; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_MPEG1AudioPayload;
/* Connection with wildcards. */
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); @@ -1556,24 +1556,24 @@ static void test_connect_pin(void)
req_mt.subtype = MEDIASUBTYPE_PCM; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Audio; req_mt.subtype = MEDIASUBTYPE_MPEG1AudioPayload; req_mt.formattype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); @@ -1581,38 +1581,38 @@ static void test_connect_pin(void)
req_mt.subtype = MEDIASUBTYPE_PCM; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.subtype = GUID_NULL; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&testsink.sink.pin.mt, source_mt), "Media types didn't match.\n"); IFilterGraph2_Disconnect(graph, source); IFilterGraph2_Disconnect(graph, &testsink.sink.pin.IPin_iface);
req_mt.majortype = MEDIATYPE_Stream; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, &req_mt); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
/* Test enumeration of sink media types. */
testsink.mt = &req_mt; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NO_ACCEPTABLE_TYPES, "Got hr %#lx.\n", hr);
req_mt.majortype = MEDIATYPE_Audio; req_mt.subtype = MEDIASUBTYPE_MPEG1AudioPayload; req_mt.formattype = FORMAT_WaveFormatEx; req_mt.lSampleSize = 444; hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(compare_media_types(&testsink.sink.pin.mt, &req_mt), "Media types didn't match.\n");
IPin_Release(source); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, sink); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(testsource.source.pin.peer == sink, "Got peer %p.\n", testsource.source.pin.peer); IFilterGraph2_Disconnect(graph, &testsource.source.pin.IPin_iface);
@@ -1624,17 +1624,17 @@ static void test_connect_pin(void) IPin_Release(sink); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(reader); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsource.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_seeking(void) @@ -1674,121 +1674,121 @@ static void test_seeking(void) IPin_QueryInterface(pin, &IID_IMediaSeeking, (void **)&seeking);
hr = IMediaSeeking_GetCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(caps == (AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards | AM_SEEKING_CanSeekBackwards | AM_SEEKING_CanGetStopPos - | AM_SEEKING_CanGetDuration), "Got caps %#x.\n", caps); + | AM_SEEKING_CanGetDuration), "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(caps == (AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards), "Got caps %#x.\n", caps); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(caps == (AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards), "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(caps == AM_SEEKING_CanSeekAbsolute, "Got caps %#x.\n", caps); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(caps == AM_SEEKING_CanSeekAbsolute, "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(!caps, "Got caps %#x.\n", caps); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(!caps, "Got caps %#lx.\n", caps);
caps = 0; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(!caps, "Got caps %#x.\n", caps); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(!caps, "Got caps %#lx.\n", caps);
for (i = 0; i < ARRAY_SIZE(format_tests); ++i) { hr = IMediaSeeking_IsFormatSupported(seeking, format_tests[i].guid); - ok(hr == format_tests[i].hr, "Got hr %#x for format %s.\n", + ok(hr == format_tests[i].hr, "Got hr %#lx for format %s.\n", hr, wine_dbgstr_guid(format_tests[i].guid)); }
hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_SAMPLE); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_FRAME); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
duration = 0; hr = IMediaSeeking_GetDuration(seeking, &duration); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(duration == 5392500, "Got duration %I64d.\n", duration);
stop = current = 0xdeadbeef; hr = IMediaSeeking_GetStopPosition(seeking, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(stop == duration, "Expected time %s, got %s.\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop)); hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); stop = current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == duration, "Expected time %s, got %s.\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop));
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time)); time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time));
earliest = latest = 0xdeadbeef; hr = IMediaSeeking_GetAvailable(seeking, &earliest, &latest); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!earliest, "Got time %s.\n", wine_dbgstr_longlong(earliest)); ok(latest == duration, "Expected time %s, got %s.\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(latest));
rate = 0; hr = IMediaSeeking_GetRate(seeking, &rate); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(rate == 1.0, "Got rate %.16e.\n", rate);
hr = IMediaSeeking_SetRate(seeking, 200.0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); rate = 0; hr = IMediaSeeking_GetRate(seeking, &rate); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(rate == 200.0, "Got rate %.16e.\n", rate);
hr = IMediaSeeking_SetRate(seeking, -1.0); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetPreroll(seeking, &time); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
current = 200 * 10000; stop = 400 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 400 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
stop = current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 400 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
@@ -1796,7 +1796,7 @@ static void test_seeking(void) stop = 400 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime, &stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 400 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
@@ -1804,18 +1804,18 @@ static void test_seeking(void) stop = 200 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime, &stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 100 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
current = 50 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
stop = current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 50 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
@@ -1823,9 +1823,9 @@ static void test_seeking(void) IPin_Release(pin); IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_streaming(void) @@ -1849,21 +1849,21 @@ static void test_streaming(void) IPin_QueryInterface(source, &IID_IMediaSeeking, (void **)&seeking);
hr = IFilterGraph2_ConnectDirect(graph, source, &testsink.sink.pin.IPin_iface, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Expected timeout.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(testsink.eos_event, 1000), "Did not receive EOS.\n"); ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Got more than one EOS.\n"); ok(testsink.sample_count, "Expected at least one sample.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(testsink.eos_event, 1000), "Did not receive EOS.\n"); ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Got more than one EOS.\n"); @@ -1874,7 +1874,7 @@ static void test_streaming(void) testsink.segment_end = 300 * 10000; hr = IMediaSeeking_SetPositions(seeking, &testsink.segment_start, AM_SEEKING_AbsolutePositioning, &testsink.segment_end, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(testsink.eos_event, 1000), "Did not receive EOS.\n"); ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Got more than one EOS.\n"); @@ -1882,14 +1882,14 @@ static void test_streaming(void)
start = end = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == testsink.seek_start, "Expected start position %I64u, got %I64u.\n", testsink.seek_start, start); ok(end == testsink.seek_end, "Expected end position %I64u, got %I64u.\n", testsink.seek_end, end);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(!WaitForSingleObject(testsink.eos_event, 1000), "Did not receive EOS.\n"); ok(WaitForSingleObject(testsink.eos_event, 100) == WAIT_TIMEOUT, "Got more than one EOS.\n"); @@ -1897,7 +1897,7 @@ static void test_streaming(void)
start = end = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, &start, &end); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(start == testsink.seek_start, "Expected start position %I64u, got %I64u.\n", testsink.seek_start, start); ok(end == testsink.seek_end, "Expected end position %I64u, got %I64u.\n", testsink.seek_end, end);
@@ -1905,13 +1905,13 @@ static void test_streaming(void) IPin_Release(source); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&testsink.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_large_file(void) @@ -1949,17 +1949,17 @@ static void test_large_file(void)
duration = 0xdeadbeef; hr = IMediaSeeking_GetDuration(seeking, &duration); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(duration == 2400 * 10000000ull, "Got duration %I64d.\n", duration);
IMediaSeeking_Release(seeking); IPin_Release(source); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(path); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
START_TEST(mpegsplit) diff --git a/dlls/quartz/tests/passthrough.c b/dlls/quartz/tests/passthrough.c index ce7365928e5..0e542d1733a 100644 --- a/dlls/quartz/tests/passthrough.c +++ b/dlls/quartz/tests/passthrough.c @@ -74,53 +74,53 @@ static void test_aggregation(void) passthrough = (ISeekingPassThru *)0xdeadbeef; hr = CoCreateInstance(&CLSID_SeekingPassThru, &test_outer, CLSCTX_INPROC_SERVER, &IID_ISeekingPassThru, (void **)&passthrough); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!passthrough, "Got interface %p.\n", passthrough);
hr = CoCreateInstance(&CLSID_SeekingPassThru, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_ISeekingPassThru, (void **)&passthrough); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ISeekingPassThru_QueryInterface(passthrough, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = ISeekingPassThru_QueryInterface(passthrough, &IID_ISeekingPassThru, (void **)&passthrough2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(passthrough2 == (ISeekingPassThru *)0xdeadbeef, "Got unexpected ISeekingPassThru %p.\n", passthrough2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = ISeekingPassThru_QueryInterface(passthrough, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
ISeekingPassThru_Release(passthrough); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
START_TEST(passthrough) diff --git a/dlls/quartz/tests/systemclock.c b/dlls/quartz/tests/systemclock.c index 3b39d2aadb4..65bc406f35f 100644 --- a/dlls/quartz/tests/systemclock.c +++ b/dlls/quartz/tests/systemclock.c @@ -27,7 +27,7 @@ static IReferenceClock *create_system_clock(void) IReferenceClock *clock = NULL; HRESULT hr = CoCreateInstance(&CLSID_SystemClock, NULL, CLSCTX_INPROC_SERVER, &IID_IReferenceClock, (void **)&clock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return clock; }
@@ -48,7 +48,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); } @@ -64,7 +64,7 @@ static void test_interfaces(void) check_interface(clock, &IID_IDirectDraw, FALSE);
ref = IReferenceClock_Release(clock); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static const GUID test_iid = {0x33333333}; @@ -112,53 +112,53 @@ static void test_aggregation(void) clock = (IReferenceClock *)0xdeadbeef; hr = CoCreateInstance(&CLSID_SystemClock, &test_outer, CLSCTX_INPROC_SERVER, &IID_IReferenceClock, (void **)&clock); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!clock, "Got interface %p.\n", clock);
hr = CoCreateInstance(&CLSID_SystemClock, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IReferenceClock, (void **)&clock); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IReferenceClock_QueryInterface(clock, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IReferenceClock_QueryInterface(clock, &IID_IReferenceClock, (void **)&clock2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(clock2 == (IReferenceClock *)0xdeadbeef, "Got unexpected IReferenceClock %p.\n", clock2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IReferenceClock_QueryInterface(clock, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IReferenceClock_Release(clock); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_get_time(void) @@ -169,17 +169,17 @@ static void test_get_time(void) ULONG ref;
hr = IReferenceClock_GetTime(clock, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IReferenceClock_GetTime(clock, &time1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time1 % 10000 == 0, "Expected no less than 1ms coarseness, but got time %s.\n", wine_dbgstr_longlong(time1));
ticks = (REFERENCE_TIME)timeGetTime() * 10000;
hr = IReferenceClock_GetTime(clock, &time2); - ok(hr == (time2 == time1 ? S_FALSE : S_OK), "Got hr %#x.\n", hr); + ok(hr == (time2 == time1 ? S_FALSE : S_OK), "Got hr %#lx.\n", hr); ok(time2 % 10000 == 0, "Expected no less than 1ms coarseness, but got time %s.\n", wine_dbgstr_longlong(time1));
@@ -187,12 +187,12 @@ static void test_get_time(void)
Sleep(100); hr = IReferenceClock_GetTime(clock, &time2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time2 - time1 > 80 * 10000, "Expected about %s, but got %s.\n", wine_dbgstr_longlong(time1 + 80 * 10000), wine_dbgstr_longlong(time2));
ref = IReferenceClock_Release(clock); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_advise(void) @@ -209,72 +209,72 @@ static void test_advise(void) semaphore = CreateSemaphoreA(NULL, 0, 10, NULL);
hr = IReferenceClock_GetTime(clock, ¤t); - ok(SUCCEEDED(hr), "Got hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdviseTime(clock, current, 500 * 10000, (HEVENT)event, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdviseTime(clock, -1000 * 10000, 500 * 10000, (HEVENT)event, &cookie); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdviseTime(clock, current, 500 * 10000, (HEVENT)event, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(WaitForSingleObject(event, 460) == WAIT_TIMEOUT, "Event should not be signaled.\n"); ok(!WaitForSingleObject(event, 80), "Event should be signaled.\n");
hr = IReferenceClock_Unadvise(clock, cookie); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
ResetEvent(event); hr = IReferenceClock_GetTime(clock, ¤t); - ok(SUCCEEDED(hr), "Got hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); hr = IReferenceClock_AdviseTime(clock, current, 500 * 10000, (HEVENT)event, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IReferenceClock_Unadvise(clock, cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(WaitForSingleObject(event, 540) == WAIT_TIMEOUT, "Event should not be signaled.\n");
ResetEvent(event); hr = IReferenceClock_GetTime(clock, ¤t); - ok(SUCCEEDED(hr), "Got hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); hr = IReferenceClock_AdviseTime(clock, current + 500 * 10000, 0, (HEVENT)event, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(WaitForSingleObject(event, 460) == WAIT_TIMEOUT, "Event should not be signaled.\n"); ok(!WaitForSingleObject(event, 80), "Event should be signaled.\n");
hr = IReferenceClock_GetTime(clock, ¤t); - ok(SUCCEEDED(hr), "Got hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdvisePeriodic(clock, current, 500 * 10000, (HSEMAPHORE)semaphore, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdvisePeriodic(clock, current, 0, (HSEMAPHORE)semaphore, &cookie); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdvisePeriodic(clock, current, -500 * 10000, (HSEMAPHORE)semaphore, &cookie); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdvisePeriodic(clock, -500 * 10000, 1000 * 10000, (HSEMAPHORE)semaphore, &cookie); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IReferenceClock_AdvisePeriodic(clock, current, 100 * 10000, (HSEMAPHORE)semaphore, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!WaitForSingleObject(semaphore, 50), "Semaphore should be signaled.\n"); for (i = 0; i < 5; ++i) ok(!WaitForSingleObject(semaphore, 500), "Semaphore should be signaled.\n");
hr = IReferenceClock_Unadvise(clock, cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(WaitForSingleObject(semaphore, 200) == WAIT_TIMEOUT, "Semaphore should not be signaled.\n");
ResetEvent(event); hr = IReferenceClock_GetTime(clock, ¤t); - ok(SUCCEEDED(hr), "Got hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr); hr = IReferenceClock_AdviseTime(clock, current, 500 * 10000, (HEVENT)event, &cookie); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IReferenceClock_Release(clock); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
ok(WaitForSingleObject(event, 0) == WAIT_TIMEOUT, "Event should not be signaled.\n");
diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index ec212f1b5d6..3d192cca264 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -28,7 +28,7 @@ static IBaseFilter *create_video_renderer(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_VideoRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -43,7 +43,7 @@ static IFilterGraph2 *create_graph(void) IFilterGraph2 *ret; HRESULT hr; hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&ret); - ok(hr == S_OK, "Failed to create FilterGraph: %#x\n", hr); + ok(hr == S_OK, "Failed to create FilterGraph: %#lx\n", hr); return ret; }
@@ -64,7 +64,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); } @@ -158,53 +158,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_VideoRenderer, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_VideoRenderer, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -217,85 +217,85 @@ static void test_enum_pins(void) ULONG ref;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -307,23 +307,23 @@ static void test_find_pin(void) ULONG ref;
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin); IPin_Release(pin); IPin_Release(pin2);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -337,38 +337,38 @@ static void test_pin_info(void) IPin *pin;
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); todo_wine ok(!wcscmp(info.achName, L"Input"), "Got name %s.\n", debugstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"In"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, NULL); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_media_types(void) @@ -397,10 +397,10 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &mt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
@@ -413,30 +413,30 @@ static void test_media_types(void) { req_mt.subtype = *subtype_tests[i]; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_OK, "Got hr %#x for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i])); + ok(hr == S_OK, "Got hr %#lx for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i])); }
req_mt.subtype = MEDIASUBTYPE_NULL; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_RGB24;
req_mt.majortype = MEDIATYPE_NULL; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Video;
req_mt.formattype = FORMAT_None; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
req_mt.formattype = GUID_NULL; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -451,36 +451,36 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -712,36 +712,36 @@ static void test_allocator(IMemInputPin *input) HRESULT hr;
hr = IMemInputPin_GetAllocatorRequirements(input, &props); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IMemAllocator_GetProperties(ret_allocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); - ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); - ok(!props.cbAlign, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.cBuffers, "Got %ld buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %ld.\n", props.cbBuffer); + ok(!props.cbAlign, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(ret_allocator); }
hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&req_allocator);
hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(ret_allocator == req_allocator, "Allocators didn't match.\n");
IMemAllocator_Release(req_allocator); @@ -759,9 +759,9 @@ static DWORD WINAPI frame_thread(void *arg) struct frame_thread_params *params = arg; HRESULT hr;
- if (winetest_debug > 1) trace("%04x: Sending frame.\n", GetCurrentThreadId()); + if (winetest_debug > 1) trace("%04lx: Sending frame.\n", GetCurrentThreadId()); hr = IMemInputPin_Receive(params->sink, params->sample); - if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); + if (winetest_debug > 1) trace("%04lx: Returned %#lx.\n", GetCurrentThreadId(), hr); IMediaSample_Release(params->sample); free(params); return hr; @@ -778,25 +778,25 @@ static HANDLE send_frame_time(IMemInputPin *sink, REFERENCE_TIME start_time, uns BYTE *data;
hr = IMemInputPin_GetAllocator(sink, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); memset(data, color, 32 * 16 * 2);
hr = IMediaSample_SetActualDataLength(sample, 32 * 16 * 2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time *= 10000000; end_time = start_time + 10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_SetPreroll(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
params->sink = sink; params->sample = sample; @@ -831,129 +831,129 @@ static void test_filter_state(IMemInputPin *input, IMediaControl *control)
thread = send_frame(input); hr = join_thread(thread); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
/* The renderer is not fully paused until it receives a sample. The thread * sending the sample blocks in IMemInputPin_Receive() until the filter is * stopped or run. */
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* The sink will decommit our allocator for us when stopping, and recommit * it when pausing. */ hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr); if (hr == S_OK) IMediaSample_Release(sample);
hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); thread = send_frame(input); hr = join_thread(thread); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMemAllocator_Release(allocator); } @@ -965,54 +965,54 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control HRESULT hr;
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
thread = send_frame(input); ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* We dropped the sample we were holding, so now we need a new one... */
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input); ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame(input)); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_sample_time(IBaseFilter *filter, IPin *pin, IMemInputPin *input, IMediaControl *control) @@ -1026,32 +1026,32 @@ static void test_sample_time(IBaseFilter *filter, IPin *pin, IMemInputPin *input IBaseFilter_QueryInterface(filter, &IID_IMediaSeeking, (void **)&seeking);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == 0xdeadbeef, "Got hr %#x.\n", hr); + ok(hr == 0xdeadbeef, "Got hr %#lx.\n", hr);
thread = send_frame_time(input, 1, 0x11); /* dark blue */
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetCurrentPosition(seeking, &time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 10000000, "Got time %s.\n", wine_dbgstr_longlong(time));
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 500) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Sample time is relative to the time passed to Run(). Thus a sample * stamped at or earlier than 1s will now be displayed immediately, because @@ -1063,38 +1063,38 @@ static void test_sample_time(IBaseFilter *filter, IPin *pin, IMemInputPin *input * are marked as discontinuous. */
hr = join_thread(send_frame_time(input, 1, 0x22)); /* dark green */ - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame_time(input, 0, 0x33)); /* light green */ - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame_time(input, -2, 0x44)); /* dark red */ - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame_time(input, 2, 0x66); /* orange */ ok(WaitForSingleObject(thread, 500) == WAIT_TIMEOUT, "Thread should block in Receive().\n"); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame_time(input, 1000000, 0xff); /* white */ ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = join_thread(thread); /* If the frame makes it to Receive() in time to be rendered, we get S_OK. */ - ok(hr == S_OK || hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == S_OK || hr == E_FAIL, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame_time(input, 1000000, 0xff); ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = join_thread(thread); /* If the frame makes it to Receive() in time to be rendered, we get S_OK. */ - ok(hr == S_OK || hr == E_FAIL, "Got hr %#x.\n", hr); + ok(hr == S_OK || hr == E_FAIL, "Got hr %#lx.\n", hr);
IMediaSeeking_Release(seeking); } @@ -1110,14 +1110,14 @@ static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG { if (code == expected_code) { - ok(param1 == expected1, "Got param1 %#lx.\n", param1); - ok(param2 == expected2, "Got param2 %#lx.\n", param2); + ok(param1 == expected1, "Got param1 %#Ix.\n", param1); + ok(param2 == expected2, "Got param2 %#Ix.\n", param2); ret++; } IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); timeout = 0; } - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
return ret; } @@ -1137,28 +1137,28 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) IMediaControl_QueryInterface(control, &IID_IMediaEvent, (void **)&eventsrc);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = join_thread(send_frame(input)); - todo_wine ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
@@ -1166,73 +1166,73 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control) * done rendering. */
hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); ret = check_ec_complete(eventsrc, 1600); todo_wine ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
/* Test sending EOS while flushing. */
hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndOfStream(pin); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
/* Test sending EOS and then flushing or stopping. */
hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
@@ -1254,43 +1254,43 @@ static void test_current_image(IBaseFilter *filter, IMemInputPin *input, IBaseFilter_QueryInterface(filter, &IID_IBasicVideo, (void **)&video);
hr = IBasicVideo_GetCurrentImage(video, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetCurrentImage(video, NULL, buffer); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
size = 0xdeadbeef; hr = IBasicVideo_GetCurrentImage(video, &size, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 2, "Got size %d.\n", size); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 2, "Got size %ld.\n", size);
size = 0xdeadbeef; hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == VFW_E_NOT_PAUSED, "Got hr %#x.\n", hr); - ok(size == 0xdeadbeef, "Got size %d.\n", size); + ok(hr == VFW_E_NOT_PAUSED, "Got hr %#lx.\n", hr); + ok(size == 0xdeadbeef, "Got size %ld.\n", size);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
size = 0xdeadbeef; hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); - ok(size == 0xdeadbeef, "Got size %d.\n", size); + ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr); + ok(size == 0xdeadbeef, "Got size %ld.\n", size);
thread = send_frame(input); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
size = sizeof(BITMAPINFOHEADER) + 32 * 16 * 2 - 1; hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == E_OUTOFMEMORY, "Got hr %#x.\n", hr); - ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 2 - 1, "Got size %d.\n", size); + ok(hr == E_OUTOFMEMORY, "Got hr %#lx.\n", hr); + ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 2 - 1, "Got size %ld.\n", size);
size = sizeof(BITMAPINFOHEADER) + 32 * 16 * 2; memset(buffer, 0xcc, sizeof(buffer)); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 2, "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 2, "Got size %ld.\n", size); ok(!memcmp(bih, expect_bih, sizeof(BITMAPINFOHEADER)), "Bitmap headers didn't match.\n"); for (i = 0; i < 32 * 16 * 2; ++i) { @@ -1299,14 +1299,14 @@ static void test_current_image(IBaseFilter *filter, IMemInputPin *input, }
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); join_thread(thread);
hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == VFW_E_NOT_PAUSED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_PAUSED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IBasicVideo_Release(video); } @@ -1330,18 +1330,18 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay);
hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IOverlay_Release(overlay);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
SendMessageW(hwnd, WM_CLOSE, 0, 0);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(ret == 1, "Expected EC_USERABORT.\n");
@@ -1354,28 +1354,28 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con if (ret == WAIT_OBJECT_0) { GetExitCodeThread(thread, (DWORD *)&hr); - ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); + ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr); } CloseHandle(thread);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
/* We receive an EC_USERABORT notification immediately. */
hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
@@ -1388,7 +1388,7 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con ok(!IsWindowVisible(hwnd), "Window should be visible.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
@@ -1446,52 +1446,52 @@ static void test_connect_pin(void) { req_mt.subtype = *subtype_tests[i]; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i])); + ok(hr == S_OK, "Got hr %#lx for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i]));
hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
req_mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.formattype = FORMAT_VideoInfo;
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(pin, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &source.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n");
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
@@ -1499,17 +1499,17 @@ static void test_connect_pin(void)
hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemInputPin_NotifyAllocator(input, allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_filter_state(input, control); test_flushing(pin, input, control); @@ -1519,31 +1519,31 @@ static void test_connect_pin(void) test_window_close(pin, input, control);
hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(source.source.pin.peer == pin, "Got peer %p.\n", peer); IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
ref = IMemAllocator_Release(allocator); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMemInputPin_Release(input); IPin_Release(pin); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_filter_state(void) @@ -1554,53 +1554,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_overlay(void) @@ -1615,17 +1615,17 @@ static void test_overlay(void) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hwnd = (HWND)0xdeadbeef; hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hwnd && hwnd != (HWND)0xdeadbeef, "Got invalid window %p.\n", hwnd);
IOverlay_Release(overlay); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
/* try to make sure pending X events have been processed before continuing */ @@ -1649,7 +1649,7 @@ static void flush_events(void) static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { if (winetest_debug > 1) - trace("hwnd %p, msg %#x, wparam %#lx, lparam %#lx.\n", hwnd, msg, wparam, lparam); + trace("hwnd %p, msg %#x, wparam %#Ix, lparam %#Ix.\n", hwnd, msg, wparam, lparam);
if (wparam == 0xdeadbeef) return 0; @@ -1664,7 +1664,7 @@ static void test_video_window_caption(IVideoWindow *window, HWND hwnd) HRESULT hr;
hr = IVideoWindow_get_Caption(window, &caption); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(caption, L"ActiveMovie Window"), "Got caption %s.\n", wine_dbgstr_w(caption)); SysFreeString(caption);
@@ -1673,11 +1673,11 @@ static void test_video_window_caption(IVideoWindow *window, HWND hwnd)
caption = SysAllocString(L"foo"); hr = IVideoWindow_put_Caption(window, caption); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SysFreeString(caption);
hr = IVideoWindow_get_Caption(window, &caption); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(caption, L"foo"), "Got caption %s.\n", wine_dbgstr_w(caption)); SysFreeString(caption);
@@ -1691,53 +1691,53 @@ static void test_video_window_style(IVideoWindow *window, HWND hwnd, HWND our_hw LONG style;
hr = IVideoWindow_get_WindowStyle(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(style == (WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW), - "Got style %#x.\n", style); + "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); ok(style == (WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW), - "Got style %#x.\n", style); + "Got style %#lx.\n", style);
hr = IVideoWindow_put_WindowStyle(window, style | WS_DISABLED); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_HSCROLL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_VSCROLL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_MAXIMIZE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_MINIMIZE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_WindowStyle(window, style & ~WS_CLIPCHILDREN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyle(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#x.\n", style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#x.\n", style); + ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_get_WindowStyleEx(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(style == WS_EX_WINDOWEDGE, "Got style %#x.\n", style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == WS_EX_WINDOWEDGE, "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(style == WS_EX_WINDOWEDGE, "Got style %#x.\n", style); + ok(style == WS_EX_WINDOWEDGE, "Got style %#lx.\n", style);
hr = IVideoWindow_put_WindowStyleEx(window, style | WS_EX_TRANSPARENT); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyleEx(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#x.\n", style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#x.\n", style); + ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#lx.\n", style); }
static BOOL CALLBACK top_window_cb(HWND hwnd, LPARAM ctx) @@ -1768,25 +1768,25 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_HIDE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_HIDE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(state == OAFALSE, "Got state %ld.\n", state);
ok(!IsWindowVisible(hwnd), "Window should not be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); ok(!IsZoomed(hwnd), "Window should not be maximized.\n");
hr = IVideoWindow_put_WindowState(window, SW_SHOWNA); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_SHOW, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_SHOW, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1796,14 +1796,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(top == hwnd, "Got top window %p.\n", top);
hr = IVideoWindow_put_WindowState(window, SW_MINIMIZE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_MINIMIZE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_MINIMIZE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(IsIconic(hwnd), "Window should be minimized.\n"); @@ -1811,14 +1811,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_RESTORE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_SHOW, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_SHOW, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1826,14 +1826,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_MAXIMIZE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_MAXIMIZE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_MAXIMIZE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should be minimized.\n"); @@ -1841,17 +1841,17 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_RESTORE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_WindowState(window, SW_HIDE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_HIDE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_HIDE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(state == OAFALSE, "Got state %ld.\n", state);
ok(!IsWindowVisible(hwnd), "Window should not be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1859,14 +1859,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_Visible(window, OATRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_SHOW, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_SHOW, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1874,14 +1874,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_Visible(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_HIDE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_HIDE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(state == OAFALSE, "Got state %ld.\n", state);
ok(!IsWindowVisible(hwnd), "Window should not be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1889,14 +1889,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_SHOWNA); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_SetWindowForeground(window, TRUE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); hr = IVideoWindow_SetWindowForeground(window, OATRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); ok(GetFocus() == hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == hwnd, "Got foreground window %p.\n", GetForegroundWindow()); @@ -1904,7 +1904,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(top == hwnd, "Got top window %p.\n", top);
hr = IVideoWindow_SetWindowForeground(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); ok(GetFocus() == hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == hwnd, "Got foreground window %p.\n", GetForegroundWindow()); @@ -1913,7 +1913,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); hr = IVideoWindow_SetWindowForeground(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); ok(GetFocus() == our_hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == our_hwnd, "Got foreground window %p.\n", GetForegroundWindow()); @@ -1935,114 +1935,114 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our expect_height = rect.bottom - rect.top;
hr = IVideoWindow_put_Left(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_Top(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 0, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 0, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 0, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 0, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == expect_width, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == expect_width, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == expect_height, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 0, "Got left %d.\n", left); - ok(top == 0, "Got top %d.\n", top); - ok(width == expect_width, "Got width %d.\n", width); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 0, "Got left %ld.\n", left); + ok(top == 0, "Got top %ld.\n", top); + ok(width == expect_width, "Got width %ld.\n", width); + ok(height == expect_height, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 0, "Got window left %d.\n", rect.left); - ok(rect.top == 0, "Got window top %d.\n", rect.top); - ok(rect.right == expect_width, "Got window right %d.\n", rect.right); - ok(rect.bottom == expect_height, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 0, "Got window left %ld.\n", rect.left); + ok(rect.top == 0, "Got window top %ld.\n", rect.top); + ok(rect.right == expect_width, "Got window right %ld.\n", rect.right); + ok(rect.bottom == expect_height, "Got window bottom %ld.\n", rect.bottom);
hr = IVideoWindow_put_Left(window, 10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 0, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 0, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == expect_width, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == expect_width, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == expect_height, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); - ok(top == 0, "Got top %d.\n", top); - ok(width == expect_width, "Got width %d.\n", width); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); + ok(top == 0, "Got top %ld.\n", top); + ok(width == expect_width, "Got width %ld.\n", width); + ok(height == expect_height, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 10, "Got window left %d.\n", rect.left); - ok(rect.top == 0, "Got window top %d.\n", rect.top); - ok(rect.right == 10 + expect_width, "Got window right %d.\n", rect.right); - ok(rect.bottom == expect_height, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 10, "Got window left %ld.\n", rect.left); + ok(rect.top == 0, "Got window top %ld.\n", rect.top); + ok(rect.right == 10 + expect_width, "Got window right %ld.\n", rect.right); + ok(rect.bottom == expect_height, "Got window bottom %ld.\n", rect.bottom);
hr = IVideoWindow_put_Height(window, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 0, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 0, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == expect_width, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == expect_width, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == 200, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == 200, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); - ok(top == 0, "Got top %d.\n", top); - ok(width == expect_width, "Got width %d.\n", width); - ok(height == 200, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); + ok(top == 0, "Got top %ld.\n", top); + ok(width == expect_width, "Got width %ld.\n", width); + ok(height == 200, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 10, "Got window left %d.\n", rect.left); - ok(rect.top == 0, "Got window top %d.\n", rect.top); - ok(rect.right == 10 + expect_width, "Got window right %d.\n", rect.right); - ok(rect.bottom == 200, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 10, "Got window left %ld.\n", rect.left); + ok(rect.top == 0, "Got window top %ld.\n", rect.top); + ok(rect.right == 10 + expect_width, "Got window right %ld.\n", rect.right); + ok(rect.bottom == 200, "Got window bottom %ld.\n", rect.bottom);
hr = IVideoWindow_SetWindowPosition(window, 100, 200, 300, 400); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 100, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 100, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 200, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 200, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 300, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 300, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == 400, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == 400, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 100, "Got left %d.\n", left); - ok(top == 200, "Got top %d.\n", top); - ok(width == 300, "Got width %d.\n", width); - ok(height == 400, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 100, "Got left %ld.\n", left); + ok(top == 200, "Got top %ld.\n", top); + ok(width == 300, "Got width %ld.\n", width); + ok(height == 400, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 100, "Got window left %d.\n", rect.left); - ok(rect.top == 200, "Got window top %d.\n", rect.top); - ok(rect.right == 400, "Got window right %d.\n", rect.right); - ok(rect.bottom == 600, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 100, "Got window left %ld.\n", rect.left); + ok(rect.top == 200, "Got window top %ld.\n", rect.top); + ok(rect.right == 400, "Got window right %ld.\n", rect.right); + ok(rect.bottom == 600, "Got window bottom %ld.\n", rect.bottom);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); @@ -2059,25 +2059,25 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hr = IVideoWindow_get_Owner(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!oahwnd, "Got owner %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!oahwnd, "Got owner %#Ix.\n", oahwnd);
parent = GetAncestor(hwnd, GA_PARENT); ok(parent == GetDesktopWindow(), "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & WS_CHILD), "Got style %#x.\n", style); + ok(!(style & WS_CHILD), "Got style %#lx.\n", style);
hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Owner(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(oahwnd == (OAHWND)our_hwnd, "Got owner %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(oahwnd == (OAHWND)our_hwnd, "Got owner %#Ix.\n", oahwnd);
parent = GetAncestor(hwnd, GA_PARENT); ok(parent == our_hwnd, "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & WS_CHILD), "Got style %#x.\n", style); + ok((style & WS_CHILD), "Got style %#lx.\n", style);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); @@ -2086,31 +2086,31 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw ShowWindow(our_hwnd, SW_HIDE);
hr = IVideoWindow_put_Visible(window, OATRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == OAFALSE, "Got state %ld.\n", state);
hr = IVideoWindow_put_Owner(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Owner(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!oahwnd, "Got owner %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!oahwnd, "Got owner %#Ix.\n", oahwnd);
parent = GetAncestor(hwnd, GA_PARENT); ok(parent == GetDesktopWindow(), "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & WS_CHILD), "Got style %#x.\n", style); + ok(!(style & WS_CHILD), "Got style %#lx.\n", style);
ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); ok(top_hwnd == hwnd, "Got top window %p.\n", top_hwnd);
hr = IVideoWindow_get_Visible(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == OATRUE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == OATRUE, "Got state %ld.\n", state); }
struct notify_message_params @@ -2124,7 +2124,7 @@ static DWORD CALLBACK notify_message_proc(void *arg) { const struct notify_message_params *params = arg; HRESULT hr = IVideoWindow_NotifyOwnerMessage(params->window, (OAHWND)params->hwnd, params->message, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return 0; }
@@ -2167,15 +2167,15 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our flush_events();
hr = IVideoWindow_get_MessageDrain(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!oahwnd, "Got window %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!oahwnd, "Got window %#Ix.\n", oahwnd);
hr = IVideoWindow_put_MessageDrain(window, (OAHWND)our_hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_MessageDrain(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(oahwnd == (OAHWND)our_hwnd, "Got window %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(oahwnd == (OAHWND)our_hwnd, "Got window %#Ix.\n", oahwnd);
for (i = 0; i < ARRAY_SIZE(drain_tests); ++i) { @@ -2184,8 +2184,8 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our ok(ret, "Expected a message.\n"); ok(msg.hwnd == our_hwnd, "Got hwnd %p.\n", msg.hwnd); ok(msg.message == drain_tests[i], "Got message %#x.\n", msg.message); - ok(msg.wParam == 0xdeadbeef, "Got wparam %#lx.\n", msg.wParam); - ok(!msg.lParam, "Got lparam %#lx.\n", msg.lParam); + ok(msg.wParam == 0xdeadbeef, "Got wparam %#Ix.\n", msg.wParam); + ok(!msg.lParam, "Got lparam %#Ix.\n", msg.lParam); DispatchMessageA(&msg);
ret = PeekMessageA(&msg, 0, drain_tests[i], drain_tests[i], PM_REMOVE); @@ -2193,10 +2193,10 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our }
hr = IVideoWindow_put_MessageDrain(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
flush_events();
@@ -2205,7 +2205,7 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our * posted all messages. */
hr = IVideoWindow_NotifyOwnerMessage(window, (OAHWND)our_hwnd, WM_SYSCOLORCHANGE, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) { @@ -2214,7 +2214,7 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our }
hr = IVideoWindow_NotifyOwnerMessage(window, (OAHWND)our_hwnd, WM_FONTCHANGE, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) { @@ -2251,7 +2251,7 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our }
hr = IVideoWindow_put_Owner(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *graph, HWND hwnd) @@ -2263,41 +2263,41 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
hr = IVideoWindow_get_AutoShow(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OATRUE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OATRUE, "Got %ld.\n", l);
hr = IVideoWindow_put_Visible(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OATRUE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OATRUE, "Got %ld.\n", l);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OATRUE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OATRUE, "Got %ld.\n", l);
hr = IVideoWindow_put_AutoShow(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_Visible(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OAFALSE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OAFALSE, "Got %ld.\n", l);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaControl_Release(control); } @@ -2351,36 +2351,36 @@ static void test_video_window(void) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (winetest_debug > 1) trace("ours %p, theirs %p\n", our_hwnd, hwnd); GetWindowRect(hwnd, &rect);
tid = GetWindowThreadProcessId(hwnd, NULL); - ok(tid == GetCurrentThreadId(), "Expected tid %#x, got %#x.\n", GetCurrentThreadId(), tid); + ok(tid == GetCurrentThreadId(), "Expected tid %#lx, got %#lx.\n", GetCurrentThreadId(), tid);
hr = IBaseFilter_QueryInterface(filter, &IID_IVideoWindow, (void **)&window); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Caption(window, &caption); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyle(window, &l); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_AutoShow(window, &l); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); IFilterGraph2_AddFilter(graph, filter, NULL); hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
@@ -2393,29 +2393,29 @@ static void test_video_window(void) test_video_window_messages(window, hwnd, our_hwnd);
hr = IVideoWindow_put_FullScreenMode(window, OATRUE); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_FullScreenMode(window, &l); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IVideoWindow_GetMinIdealImageSize(window, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 640, "Got width %d.\n", width); - ok(height == 480, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 640, "Got width %ld.\n", width); + ok(height == 480, "Got height %ld.\n", height);
hr = IVideoWindow_GetMaxIdealImageSize(window, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 640, "Got width %d.\n", width); - ok(height == 480, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 640, "Got width %ld.\n", width); + ok(height == 480, "Got height %ld.\n", height);
IFilterGraph2_Release(graph); IVideoWindow_Release(window); IOverlay_Release(overlay); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); DestroyWindow(our_hwnd); }
@@ -2427,31 +2427,31 @@ static void check_source_position_(int line, IBasicVideo *video,
left = top = width = height = 0xdeadbeef; hr = IBasicVideo_GetSourcePosition(video, &left, &top, &width, &height); - ok_(__FILE__,line)(hr == S_OK, "Got hr %#x.\n", hr); - ok_(__FILE__,line)(left == expect_left, "Got left %d.\n", left); - ok_(__FILE__,line)(top == expect_top, "Got top %d.\n", top); - ok_(__FILE__,line)(width == expect_width, "Got width %d.\n", width); - ok_(__FILE__,line)(height == expect_height, "Got height %d.\n", height); + ok_(__FILE__,line)(hr == S_OK, "Got hr %#lx.\n", hr); + ok_(__FILE__,line)(left == expect_left, "Got left %ld.\n", left); + ok_(__FILE__,line)(top == expect_top, "Got top %ld.\n", top); + ok_(__FILE__,line)(width == expect_width, "Got width %ld.\n", width); + ok_(__FILE__,line)(height == expect_height, "Got height %ld.\n", height);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceLeft(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#x.\n", hr); - ok_(__FILE__,line)(l == left, "Got left %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == left, "Got left %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceTop(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#x.\n", hr); - ok_(__FILE__,line)(l == top, "Got top %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == top, "Got top %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceWidth(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#x.\n", hr); - ok_(__FILE__,line)(l == width, "Got width %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == width, "Got width %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceHeight(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#x.\n", hr); - ok_(__FILE__,line)(l == height, "Got height %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == height, "Got height %ld.\n", l); } #define check_source_position(a,b,c,d,e) check_source_position_(__LINE__,a,b,c,d,e)
@@ -2461,77 +2461,77 @@ static void test_basic_video_source(IBasicVideo *video)
check_source_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceLeft(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceLeft(video, 10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceTop(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceTop(video, 10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceWidth(video, -500); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceWidth(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceWidth(video, 700); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceWidth(video, 500); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 500, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceHeight(video, -300); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceHeight(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceHeight(video, 600); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceHeight(video, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 500, 300); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceLeft(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceLeft(video, 10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 10, 0, 500, 300); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceTop(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceTop(video, 20); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 10, 20, 500, 300); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetSourcePosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 4, 5, 60, 40); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetSourcePosition(video, 0, 0, 600, 400); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetSourcePosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IBasicVideo_SetDefaultSourcePosition(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void check_destination_position_(int line, IBasicVideo *video, @@ -2542,31 +2542,31 @@ static void check_destination_position_(int line, IBasicVideo *video,
left = top = width = height = 0xdeadbeef; hr = IBasicVideo_GetDestinationPosition(video, &left, &top, &width, &height); - ok_(__FILE__,line)(hr == S_OK, "Failed to get position, hr %#x.\n", hr); - ok_(__FILE__,line)(left == expect_left, "Got left %d.\n", left); - ok_(__FILE__,line)(top == expect_top, "Got top %d.\n", top); - ok_(__FILE__,line)(width == expect_width, "Got width %d.\n", width); - ok_(__FILE__,line)(height == expect_height, "Got height %d.\n", height); + ok_(__FILE__,line)(hr == S_OK, "Failed to get position, hr %#lx.\n", hr); + ok_(__FILE__,line)(left == expect_left, "Got left %ld.\n", left); + ok_(__FILE__,line)(top == expect_top, "Got top %ld.\n", top); + ok_(__FILE__,line)(width == expect_width, "Got width %ld.\n", width); + ok_(__FILE__,line)(height == expect_height, "Got height %ld.\n", height);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationLeft(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#x.\n", hr); - ok_(__FILE__,line)(l == left, "Got left %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == left, "Got left %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationTop(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#x.\n", hr); - ok_(__FILE__,line)(l == top, "Got top %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == top, "Got top %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationWidth(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#x.\n", hr); - ok_(__FILE__,line)(l == width, "Got width %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == width, "Got width %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationHeight(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#x.\n", hr); - ok_(__FILE__,line)(l == height, "Got height %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == height, "Got height %ld.\n", l); } #define check_destination_position(a,b,c,d,e) check_destination_position_(__LINE__,a,b,c,d,e)
@@ -2580,107 +2580,107 @@ static void test_basic_video_destination(IBasicVideo *video)
check_destination_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationLeft(video, -10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, -10, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationLeft(video, 10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationTop(video, -20); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, -20, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationTop(video, 20); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationWidth(video, -700); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationWidth(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationWidth(video, 700); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 700, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationWidth(video, 500); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 500, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationHeight(video, -500); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationHeight(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationHeight(video, 500); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 500, 500); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationHeight(video, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 500, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 4, 5, 60, 40); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 0, 0, 600, 400); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IBasicVideo_SetDefaultDestinationPosition(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
SetRect(&rect, 100, 200, 500, 500); AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); hr = IVideoWindow_SetWindowPosition(window, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 400, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 0, 0, 400, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 400, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
SetRect(&rect, 100, 200, 600, 600); AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); hr = IVideoWindow_SetWindowPosition(window, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 400, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IVideoWindow_Release(window); } @@ -2725,127 +2725,127 @@ static void test_basic_video(void) IBaseFilter_FindPin(filter, L"In", &pin);
hr = IBasicVideo_GetTypeInfoCount(video, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count == 1, "Got count %u.\n", count);
hr = IBasicVideo_GetTypeInfo(video, 0, 0, &typeinfo); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(typeattr->typekind == TKIND_DISPATCH, "Got kind %u.\n", typeattr->typekind); ok(IsEqualGUID(&typeattr->guid, &IID_IBasicVideo), "Got IID %s.\n", wine_dbgstr_guid(&typeattr->guid)); ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); ITypeInfo_Release(typeinfo);
hr = IBasicVideo_get_AvgTimePerFrame(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_BitRate(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_BitRate(video, &l); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_BitErrorRate(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_BitErrorRate(video, &l); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_VideoWidth(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_VideoHeight(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_SourceLeft(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_SourceWidth(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_SourceTop(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_SourceHeight(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_DestinationLeft(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_DestinationWidth(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_DestinationTop(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_DestinationHeight(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetSourcePosition(video, NULL, &top, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetSourcePosition(video, &left, NULL, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetSourcePosition(video, &left, &top, NULL, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetSourcePosition(video, &left, &top, &width, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetDestinationPosition(video, NULL, &top, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetDestinationPosition(video, &left, NULL, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetDestinationPosition(video, &left, &top, NULL, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetDestinationPosition(video, &left, &top, &width, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetVideoSize(video, &width, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetVideoSize(video, NULL, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, NULL, &l); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, &l, NULL); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, L"vmr9"); IFilterGraph2_AddFilter(graph, filter, L"source"); hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
reftime = 0.0; hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(reftime == 0.02, "Got frame rate %.16e.\n", reftime);
l = 0xdeadbeef; hr = IBasicVideo_get_BitRate(video, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!l, "Got bit rate %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!l, "Got bit rate %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_BitErrorRate(video, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!l, "Got bit rate %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!l, "Got bit rate %ld.\n", l);
hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, &l, NULL); - todo_wine ok(hr == VFW_E_NO_PALETTE_AVAILABLE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NO_PALETTE_AVAILABLE, "Got hr %#lx.\n", hr);
width = height = 0xdeadbeef; hr = IBasicVideo_GetVideoSize(video, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 600, "Got width %d.\n", width); - ok(height == 400, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 600, "Got width %ld.\n", width); + ok(height == 400, "Got height %ld.\n", height);
test_basic_video_source(video); test_basic_video_destination(video);
hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
vih.bmiHeader.biWidth = 16; vih.bmiHeader.biHeight = 16; vih.bmiHeader.biSizeImage = 0; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_source_position(video, 0, 0, 16, 16);
@@ -2855,13 +2855,13 @@ static void test_basic_video(void) max(16, GetSystemMetrics(SM_CYMIN) - (rect.bottom - rect.top)));
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IBasicVideo_Release(video); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_eos(void) @@ -2875,49 +2875,49 @@ static void test_unconnected_eos(void) ULONG ref;
hr = IFilterGraph2_AddFilter(graph, filter, L"renderer"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret); @@ -2925,9 +2925,9 @@ static void test_unconnected_eos(void) IMediaControl_Release(control); IMediaEvent_Release(eventsrc); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(videorenderer) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index efc876a845c..321d90264ac 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -32,13 +32,13 @@ static IBaseFilter *create_vmr7(DWORD mode) IVMRFilterConfig *config; HRESULT hr = CoCreateInstance(&CLSID_VideoMixingRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (mode) { hr = IBaseFilter_QueryInterface(filter, &IID_IVMRFilterConfig, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IVMRFilterConfig_SetRenderingMode(config, mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IVMRFilterConfig_Release(config); } return filter; @@ -50,10 +50,10 @@ static HRESULT set_mixing_mode(IBaseFilter *filter) HRESULT hr;
hr = IBaseFilter_QueryInterface(filter, &IID_IVMRFilterConfig, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_SetNumberOfStreams(config, 2); - todo_wine ok(hr == VFW_E_DDRAW_CAPS_NOT_SUITABLE || hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_DDRAW_CAPS_NOT_SUITABLE || hr == S_OK, "Got hr %#lx.\n", hr);
IVMRFilterConfig_Release(config); return hr; @@ -87,7 +87,7 @@ static IFilterGraph2 *create_graph(void) IFilterGraph2 *ret; HRESULT hr; hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&ret); - ok(hr == S_OK, "Failed to create FilterGraph: %#x\n", hr); + ok(hr == S_OK, "Failed to create FilterGraph: %#lx\n", hr); return ret; }
@@ -107,101 +107,101 @@ static void test_filter_config(void)
hr = CoCreateInstance(&CLSID_VideoMixingRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IVMRFilterConfig, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMRMode_Windowed, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMRMode_Windowed, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowed); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMRMode_Windowed, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMRMode_Windowed, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowed); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
ref = IVMRFilterConfig_Release(config); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = CoCreateInstance(&CLSID_VideoMixingRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IVMRFilterConfig, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowless); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMRMode_Windowless, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMRMode_Windowless, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowed); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
ref = IVMRFilterConfig_Release(config); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = CoCreateInstance(&CLSID_VideoMixingRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IVMRFilterConfig, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Renderless); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMRMode_Renderless, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMRMode_Renderless, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowless); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
ref = IVMRFilterConfig_Release(config); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = CoCreateInstance(&CLSID_VideoMixingRenderer, NULL, CLSCTX_INPROC_SERVER, &IID_IVMRFilterConfig, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_GetNumberOfStreams(config, &count); - todo_wine ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_SetNumberOfStreams(config, 3); if (hr != VFW_E_DDRAW_CAPS_NOT_SUITABLE) { - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_GetNumberOfStreams(config, &count); todo_wine { - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 3, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 3, "Got count %lu.\n", count); }
hr = IVMRFilterConfig_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMRMode_Windowed, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMRMode_Windowed, "Got mode %#lx.\n", mode);
/* Despite MSDN, you can still change the rendering mode after setting the * stream count. */ hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowless); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMRMode_Windowless, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMRMode_Windowless, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig_GetNumberOfStreams(config, &count); todo_wine { - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 3, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 3, "Got count %lu.\n", count); } } else skip("Mixing mode is not supported.\n");
ref = IVMRFilterConfig_Release(config); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c) @@ -214,7 +214,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); } @@ -336,7 +336,7 @@ static void test_interfaces(void) IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static const GUID test_iid = {0x33333333}; @@ -384,53 +384,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_VideoMixingRenderer, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_VideoMixingRenderer, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -442,79 +442,79 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); @@ -522,37 +522,37 @@ static void test_enum_pins(void) if (SUCCEEDED(set_mixing_mode(filter))) { hr = IEnumPins_Next(enum1, 1, pins, NULL); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]); } @@ -561,7 +561,7 @@ static void test_enum_pins(void)
IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -575,51 +575,51 @@ static void test_find_pin(void) IBaseFilter_EnumPins(filter, &enum_pins);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"VMR Input0", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins did not match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"VMR input1", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
if (SUCCEEDED(set_mixing_mode(filter))) { IEnumPins_Reset(enum_pins);
hr = IBaseFilter_FindPin(filter, L"VMR Input0", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins did not match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"VMR Input1", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins did not match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"VMR Input2", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr); } else skip("Mixing mode is not supported.\n");
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -640,16 +640,16 @@ static void test_pin_info(void) IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"VMR Input0"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
@@ -663,16 +663,16 @@ static void test_pin_info(void) IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"VMR Input1"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin); } @@ -680,7 +680,7 @@ static void test_pin_info(void) skip("Mixing mode is not supported.\n");
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_media_types(void) @@ -709,10 +709,10 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &mt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
@@ -725,30 +725,30 @@ static void test_media_types(void) { req_mt.subtype = *subtype_tests[i]; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_OK, "Got hr %#x for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i])); + ok(hr == S_OK, "Got hr %#lx for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i])); }
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IPin_QueryAccept(pin, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_RGB24;
req_mt.majortype = MEDIATYPE_NULL; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Video;
req_mt.formattype = FORMAT_None; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
req_mt.formattype = GUID_NULL; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -763,36 +763,36 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_filter_state(void) @@ -803,53 +803,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -910,45 +910,45 @@ static void test_allocator(IMemInputPin *input) HRESULT hr;
hr = IMemInputPin_GetAllocatorRequirements(input, &props); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IMemAllocator_GetProperties(ret_allocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); - ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); - ok(!props.cbAlign, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.cBuffers, "Got %ld buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %ld.\n", props.cbBuffer); + ok(!props.cbAlign, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
req_props.cBuffers = 1; req_props.cbBuffer = 32 * 16 * 4; req_props.cbAlign = 1; req_props.cbPrefix = 0; hr = IMemAllocator_SetProperties(ret_allocator, &req_props, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.cBuffers == 1, "Got %d buffers.\n", props.cBuffers); - ok(props.cbBuffer == 32 * 16 * 4, "Got size %d.\n", props.cbBuffer); - ok(props.cbAlign == 1, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.cBuffers == 1, "Got %ld buffers.\n", props.cBuffers); + ok(props.cbBuffer == 32 * 16 * 4, "Got size %ld.\n", props.cbBuffer); + ok(props.cbAlign == 1, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
IMemAllocator_Release(ret_allocator); }
hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&req_allocator);
hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
IMemAllocator_Release(req_allocator); } @@ -964,9 +964,9 @@ static DWORD WINAPI frame_thread(void *arg) struct frame_thread_params *params = arg; HRESULT hr;
- if (winetest_debug > 1) trace("%04x: Sending frame.\n", GetCurrentThreadId()); + if (winetest_debug > 1) trace("%04lx: Sending frame.\n", GetCurrentThreadId()); hr = IMemInputPin_Receive(params->sink, params->sample); - if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); + if (winetest_debug > 1) trace("%04lx: Returned %#lx.\n", GetCurrentThreadId(), hr); IMediaSample_Release(params->sample); free(params); return hr; @@ -983,25 +983,25 @@ static HANDLE send_frame(IMemInputPin *sink) BYTE *data;
hr = IMemInputPin_GetAllocator(sink, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); memset(data, 0x55, IMediaSample_GetSize(sample));
hr = IMediaSample_SetActualDataLength(sample, IMediaSample_GetSize(sample)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time = 0; end_time = start_time + 10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_SetPreroll(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
params->sink = sink; params->sample = sample; @@ -1027,9 +1027,9 @@ static void commit_allocator(IMemInputPin *input) HRESULT hr;
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator); }
@@ -1043,130 +1043,130 @@ static void test_filter_state(IMemInputPin *input, IMediaControl *control)
thread = send_frame(input); hr = join_thread(thread); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
/* The renderer is not fully paused until it receives a sample. The thread * sending the sample blocks in IMemInputPin_Receive() until the filter is * stopped or run. */
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* The sink will decommit our allocator for us when stopping, however it * will not recommit it when pausing. */ hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr); if (hr == S_OK) IMediaSample_Release(sample);
hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); thread = send_frame(input); hr = join_thread(thread); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMemAllocator_Release(allocator); } @@ -1179,61 +1179,61 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
thread = send_frame(input); ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* We dropped the sample we were holding, so now we need a new one... */
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %#x.\n", state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %#lx.\n", state);
thread = send_frame(input); ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %#x.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %#lx.\n", state);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG expected_code, LONG_PTR expected1, LONG_PTR expected2) @@ -1247,14 +1247,14 @@ static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG { if (code == expected_code) { - ok(param1 == expected1, "Got param1 %#lx.\n", param1); - ok(param2 == expected2, "Got param2 %#lx.\n", param2); + ok(param1 == expected1, "Got param1 %#Ix.\n", param1); + ok(param2 == expected2, "Got param2 %#Ix.\n", param2); ret++; } IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); timeout = 0; } - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
return ret; } @@ -1286,68 +1286,68 @@ static void test_current_image(IBaseFilter *filter, IMemInputPin *input, IBaseFilter_QueryInterface(filter, &IID_IBasicVideo, (void **)&video);
hr = IBasicVideo_GetCurrentImage(video, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetCurrentImage(video, NULL, buffer); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
size = 0xdeadbeef; hr = IBasicVideo_GetCurrentImage(video, &size, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 4, "Got size %d.\n", size); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 4, "Got size %ld.\n", size);
size = sizeof(buffer); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == sizeof(buffer), "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(buffer), "Got size %ld.\n", size); ok(!memcmp(bih, &expect_bih, sizeof(BITMAPINFOHEADER)), "Bitmap headers didn't match.\n"); /* The contents seem to reflect the last frame rendered. */
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
size = sizeof(buffer); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == sizeof(buffer), "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(buffer), "Got size %ld.\n", size); ok(!memcmp(bih, &expect_bih, sizeof(BITMAPINFOHEADER)), "Bitmap headers didn't match.\n"); /* The contents seem to reflect the last frame rendered. */
thread = send_frame(input); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
size = 1; memset(buffer, 0xcc, sizeof(buffer)); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == 1, "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == 1, "Got size %ld.\n", size);
size = sizeof(buffer); memset(buffer, 0xcc, sizeof(buffer)); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == sizeof(buffer), "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(buffer), "Got size %ld.\n", size); ok(!memcmp(bih, &expect_bih, sizeof(BITMAPINFOHEADER)), "Bitmap headers didn't match.\n"); for (i = 0; i < 32 * 16; ++i) - ok((data[i] & 0xffffff) == 0x555555, "Got unexpected color %08x at %u.\n", data[i], i); + ok((data[i] & 0xffffff) == 0x555555, "Got unexpected color %08lx at %u.\n", data[i], i);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); join_thread(thread);
size = sizeof(buffer); memset(buffer, 0xcc, sizeof(buffer)); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == sizeof(buffer), "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(buffer), "Got size %ld.\n", size); ok(!memcmp(bih, &expect_bih, sizeof(BITMAPINFOHEADER)), "Bitmap headers didn't match.\n"); for (i = 0; i < 32 * 16; ++i) - ok((data[i] & 0xffffff) == 0x555555, "Got unexpected color %08x at %u.\n", data[i], i); + ok((data[i] & 0xffffff) == 0x555555, "Got unexpected color %08lx at %u.\n", data[i], i);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IBasicVideo_Release(video); } @@ -1363,14 +1363,14 @@ static unsigned int check_ec_userabort(IMediaEvent *eventsrc, DWORD timeout) { if (code == EC_USERABORT) { - ok(!param1, "Got param1 %#lx.\n", param1); - ok(!param2, "Got param2 %#lx.\n", param2); + ok(!param1, "Got param1 %#Ix.\n", param1); + ok(!param2, "Got param2 %#Ix.\n", param2); ret++; } IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); timeout = 0; } - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
return ret; } @@ -1389,19 +1389,19 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay);
hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IOverlay_Release(overlay);
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
SendMessageW(hwnd, WM_CLOSE, 0, 0);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(ret == 1, "Expected EC_USERABORT.\n");
@@ -1414,17 +1414,17 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con if (ret == WAIT_OBJECT_0) { GetExitCodeThread(thread, (DWORD *)&hr); - ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); + ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr); } CloseHandle(thread);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
@@ -1432,11 +1432,11 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con
commit_allocator(input); hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
@@ -1449,7 +1449,7 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con ok(!IsWindowVisible(hwnd), "Window should be visible.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
@@ -1505,7 +1505,7 @@ static void test_connect_pin(void)
vih.bmiHeader.biBitCount = 16; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr);
vih.bmiHeader.biBitCount = 32; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); @@ -1518,32 +1518,32 @@ static void test_connect_pin(void) * the actual samples only have a size of 32 * 16 * 3. */ req_props.cbBuffer = 32 * 16 * 3; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(subtype_tests); ++i) { req_mt.subtype = *subtype_tests[i]; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i])); + ok(hr == S_OK, "Got hr %#lx for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i]));
hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
req_mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.formattype = FORMAT_VideoInfo;
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); if (hr == S_OK) { IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); @@ -1553,29 +1553,29 @@ static void test_connect_pin(void)
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(pin, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &source.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n");
/* Disconnecting while not stopped is broken: it returns S_OK, but @@ -1586,16 +1586,16 @@ static void test_connect_pin(void) test_allocator(input);
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator);
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_filter_state(input, control); test_flushing(pin, input, control); @@ -1603,29 +1603,29 @@ static void test_connect_pin(void) test_window_close(pin, input, control);
hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(source.source.pin.peer == pin, "Got peer %p.\n", peer); IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
IMemInputPin_Release(input); IPin_Release(pin); IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_overlay(void) @@ -1640,17 +1640,17 @@ static void test_overlay(void) IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hwnd = (HWND)0xdeadbeef; hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hwnd && hwnd != (HWND)0xdeadbeef, "Got invalid window %p.\n", hwnd);
IOverlay_Release(overlay); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
/* try to make sure pending X events have been processed before continuing */ @@ -1674,7 +1674,7 @@ static void flush_events(void) static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { if (winetest_debug > 1) - trace("hwnd %p, msg %#x, wparam %#lx, lparam %#lx.\n", hwnd, msg, wparam, lparam); + trace("hwnd %p, msg %#x, wparam %#Ix, lparam %#Ix.\n", hwnd, msg, wparam, lparam);
if (wparam == 0xdeadbeef) return 0; @@ -1689,7 +1689,7 @@ static void test_video_window_caption(IVideoWindow *window, HWND hwnd) HRESULT hr;
hr = IVideoWindow_get_Caption(window, &caption); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(caption, L"ActiveMovie Window"), "Got caption %s.\n", wine_dbgstr_w(caption)); SysFreeString(caption);
@@ -1698,11 +1698,11 @@ static void test_video_window_caption(IVideoWindow *window, HWND hwnd)
caption = SysAllocString(L"foo"); hr = IVideoWindow_put_Caption(window, caption); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SysFreeString(caption);
hr = IVideoWindow_get_Caption(window, &caption); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(caption, L"foo"), "Got caption %s.\n", wine_dbgstr_w(caption)); SysFreeString(caption);
@@ -1716,53 +1716,53 @@ static void test_video_window_style(IVideoWindow *window, HWND hwnd, HWND our_hw LONG style;
hr = IVideoWindow_get_WindowStyle(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(style == (WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW), - "Got style %#x.\n", style); + "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); ok(style == (WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW), - "Got style %#x.\n", style); + "Got style %#lx.\n", style);
hr = IVideoWindow_put_WindowStyle(window, style | WS_DISABLED); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_HSCROLL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_VSCROLL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_MAXIMIZE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_MINIMIZE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_WindowStyle(window, style & ~WS_CLIPCHILDREN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyle(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#x.\n", style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#x.\n", style); + ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_get_WindowStyleEx(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(style == WS_EX_WINDOWEDGE, "Got style %#x.\n", style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == WS_EX_WINDOWEDGE, "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(style == WS_EX_WINDOWEDGE, "Got style %#x.\n", style); + ok(style == WS_EX_WINDOWEDGE, "Got style %#lx.\n", style);
hr = IVideoWindow_put_WindowStyleEx(window, style | WS_EX_TRANSPARENT); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyleEx(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#x.\n", style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#x.\n", style); + ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#lx.\n", style); }
static BOOL CALLBACK top_window_cb(HWND hwnd, LPARAM ctx) @@ -1793,25 +1793,25 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_HIDE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_HIDE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(state == OAFALSE, "Got state %ld.\n", state);
ok(!IsWindowVisible(hwnd), "Window should not be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); ok(!IsZoomed(hwnd), "Window should not be maximized.\n");
hr = IVideoWindow_put_WindowState(window, SW_SHOWNA); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_SHOW, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_SHOW, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1821,14 +1821,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(top == hwnd, "Got top window %p.\n", top);
hr = IVideoWindow_put_WindowState(window, SW_MINIMIZE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_MINIMIZE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_MINIMIZE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(IsIconic(hwnd), "Window should be minimized.\n"); @@ -1836,14 +1836,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_RESTORE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_SHOW, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_SHOW, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1851,14 +1851,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_MAXIMIZE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_MAXIMIZE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_MAXIMIZE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should be minimized.\n"); @@ -1866,17 +1866,17 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_RESTORE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_WindowState(window, SW_HIDE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_HIDE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_HIDE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(state == OAFALSE, "Got state %ld.\n", state);
ok(!IsWindowVisible(hwnd), "Window should not be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1884,14 +1884,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_Visible(window, OATRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_SHOW, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_SHOW, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1899,14 +1899,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_Visible(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_HIDE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_HIDE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(state == OAFALSE, "Got state %ld.\n", state);
ok(!IsWindowVisible(hwnd), "Window should not be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -1914,14 +1914,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_SHOWNA); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_SetWindowForeground(window, TRUE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); hr = IVideoWindow_SetWindowForeground(window, OATRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); ok(GetFocus() == hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == hwnd, "Got foreground window %p.\n", GetForegroundWindow()); @@ -1929,7 +1929,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(top == hwnd, "Got top window %p.\n", top);
hr = IVideoWindow_SetWindowForeground(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); ok(GetFocus() == hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == hwnd, "Got foreground window %p.\n", GetForegroundWindow()); @@ -1938,7 +1938,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); hr = IVideoWindow_SetWindowForeground(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); ok(GetFocus() == our_hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == our_hwnd, "Got foreground window %p.\n", GetForegroundWindow()); @@ -1960,114 +1960,114 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our expect_height = rect.bottom - rect.top;
hr = IVideoWindow_put_Left(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_Top(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 0, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 0, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 0, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 0, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == expect_width, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == expect_width, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == expect_height, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 0, "Got left %d.\n", left); - ok(top == 0, "Got top %d.\n", top); - ok(width == expect_width, "Got width %d.\n", width); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 0, "Got left %ld.\n", left); + ok(top == 0, "Got top %ld.\n", top); + ok(width == expect_width, "Got width %ld.\n", width); + ok(height == expect_height, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 0, "Got window left %d.\n", rect.left); - ok(rect.top == 0, "Got window top %d.\n", rect.top); - ok(rect.right == expect_width, "Got window right %d.\n", rect.right); - ok(rect.bottom == expect_height, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 0, "Got window left %ld.\n", rect.left); + ok(rect.top == 0, "Got window top %ld.\n", rect.top); + ok(rect.right == expect_width, "Got window right %ld.\n", rect.right); + ok(rect.bottom == expect_height, "Got window bottom %ld.\n", rect.bottom);
hr = IVideoWindow_put_Left(window, 10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 0, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 0, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == expect_width, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == expect_width, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == expect_height, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); - ok(top == 0, "Got top %d.\n", top); - ok(width == expect_width, "Got width %d.\n", width); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); + ok(top == 0, "Got top %ld.\n", top); + ok(width == expect_width, "Got width %ld.\n", width); + ok(height == expect_height, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 10, "Got window left %d.\n", rect.left); - ok(rect.top == 0, "Got window top %d.\n", rect.top); - ok(rect.right == 10 + expect_width, "Got window right %d.\n", rect.right); - ok(rect.bottom == expect_height, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 10, "Got window left %ld.\n", rect.left); + ok(rect.top == 0, "Got window top %ld.\n", rect.top); + ok(rect.right == 10 + expect_width, "Got window right %ld.\n", rect.right); + ok(rect.bottom == expect_height, "Got window bottom %ld.\n", rect.bottom);
hr = IVideoWindow_put_Height(window, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 0, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 0, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == expect_width, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == expect_width, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == 200, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == 200, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); - ok(top == 0, "Got top %d.\n", top); - ok(width == expect_width, "Got width %d.\n", width); - ok(height == 200, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); + ok(top == 0, "Got top %ld.\n", top); + ok(width == expect_width, "Got width %ld.\n", width); + ok(height == 200, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 10, "Got window left %d.\n", rect.left); - ok(rect.top == 0, "Got window top %d.\n", rect.top); - ok(rect.right == 10 + expect_width, "Got window right %d.\n", rect.right); - ok(rect.bottom == 200, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 10, "Got window left %ld.\n", rect.left); + ok(rect.top == 0, "Got window top %ld.\n", rect.top); + ok(rect.right == 10 + expect_width, "Got window right %ld.\n", rect.right); + ok(rect.bottom == 200, "Got window bottom %ld.\n", rect.bottom);
hr = IVideoWindow_SetWindowPosition(window, 100, 200, 300, 400); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 100, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 100, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 200, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 200, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 300, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 300, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == 400, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == 400, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 100, "Got left %d.\n", left); - ok(top == 200, "Got top %d.\n", top); - ok(width == 300, "Got width %d.\n", width); - ok(height == 400, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 100, "Got left %ld.\n", left); + ok(top == 200, "Got top %ld.\n", top); + ok(width == 300, "Got width %ld.\n", width); + ok(height == 400, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 100, "Got window left %d.\n", rect.left); - ok(rect.top == 200, "Got window top %d.\n", rect.top); - ok(rect.right == 400, "Got window right %d.\n", rect.right); - ok(rect.bottom == 600, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 100, "Got window left %ld.\n", rect.left); + ok(rect.top == 200, "Got window top %ld.\n", rect.top); + ok(rect.right == 400, "Got window right %ld.\n", rect.right); + ok(rect.bottom == 600, "Got window bottom %ld.\n", rect.bottom);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); @@ -2084,25 +2084,25 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hr = IVideoWindow_get_Owner(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!oahwnd, "Got owner %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!oahwnd, "Got owner %#Ix.\n", oahwnd);
parent = GetAncestor(hwnd, GA_PARENT); ok(parent == GetDesktopWindow(), "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & WS_CHILD), "Got style %#x.\n", style); + ok(!(style & WS_CHILD), "Got style %#lx.\n", style);
hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Owner(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(oahwnd == (OAHWND)our_hwnd, "Got owner %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(oahwnd == (OAHWND)our_hwnd, "Got owner %#Ix.\n", oahwnd);
parent = GetAncestor(hwnd, GA_PARENT); ok(parent == our_hwnd, "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & WS_CHILD), "Got style %#x.\n", style); + ok((style & WS_CHILD), "Got style %#lx.\n", style);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); @@ -2111,31 +2111,31 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw ShowWindow(our_hwnd, SW_HIDE);
hr = IVideoWindow_put_Visible(window, OATRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == OAFALSE, "Got state %ld.\n", state);
hr = IVideoWindow_put_Owner(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Owner(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!oahwnd, "Got owner %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!oahwnd, "Got owner %#Ix.\n", oahwnd);
parent = GetAncestor(hwnd, GA_PARENT); ok(parent == GetDesktopWindow(), "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & WS_CHILD), "Got style %#x.\n", style); + ok(!(style & WS_CHILD), "Got style %#lx.\n", style);
ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); ok(top_hwnd == hwnd, "Got top window %p.\n", top_hwnd);
hr = IVideoWindow_get_Visible(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == OATRUE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == OATRUE, "Got state %ld.\n", state); }
struct notify_message_params @@ -2149,7 +2149,7 @@ static DWORD CALLBACK notify_message_proc(void *arg) { const struct notify_message_params *params = arg; HRESULT hr = IVideoWindow_NotifyOwnerMessage(params->window, (OAHWND)params->hwnd, params->message, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return 0; }
@@ -2192,15 +2192,15 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our flush_events();
hr = IVideoWindow_get_MessageDrain(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!oahwnd, "Got window %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!oahwnd, "Got window %#Ix.\n", oahwnd);
hr = IVideoWindow_put_MessageDrain(window, (OAHWND)our_hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_MessageDrain(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(oahwnd == (OAHWND)our_hwnd, "Got window %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(oahwnd == (OAHWND)our_hwnd, "Got window %#Ix.\n", oahwnd);
for (i = 0; i < ARRAY_SIZE(drain_tests); ++i) { @@ -2209,8 +2209,8 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our ok(ret, "Expected a message.\n"); ok(msg.hwnd == our_hwnd, "Got hwnd %p.\n", msg.hwnd); ok(msg.message == drain_tests[i], "Got message %#x.\n", msg.message); - ok(msg.wParam == 0xdeadbeef, "Got wparam %#lx.\n", msg.wParam); - ok(!msg.lParam, "Got lparam %#lx.\n", msg.lParam); + ok(msg.wParam == 0xdeadbeef, "Got wparam %#Ix.\n", msg.wParam); + ok(!msg.lParam, "Got lparam %#Ix.\n", msg.lParam); DispatchMessageA(&msg);
ret = PeekMessageA(&msg, 0, drain_tests[i], drain_tests[i], PM_REMOVE); @@ -2218,10 +2218,10 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our }
hr = IVideoWindow_put_MessageDrain(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
flush_events();
@@ -2230,7 +2230,7 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our * posted all messages. */
hr = IVideoWindow_NotifyOwnerMessage(window, (OAHWND)our_hwnd, WM_SYSCOLORCHANGE, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) { @@ -2239,7 +2239,7 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our }
hr = IVideoWindow_NotifyOwnerMessage(window, (OAHWND)our_hwnd, WM_FONTCHANGE, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) { @@ -2276,7 +2276,7 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our }
hr = IVideoWindow_put_Owner(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *graph, HWND hwnd) @@ -2288,41 +2288,41 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
hr = IVideoWindow_get_AutoShow(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OATRUE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OATRUE, "Got %ld.\n", l);
hr = IVideoWindow_put_Visible(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OATRUE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OATRUE, "Got %ld.\n", l);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OATRUE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OATRUE, "Got %ld.\n", l);
hr = IVideoWindow_put_AutoShow(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_Visible(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OAFALSE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OAFALSE, "Got %ld.\n", l);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaControl_Release(control); } @@ -2380,27 +2380,27 @@ static void test_video_window(void) IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (winetest_debug > 1) trace("ours %p, theirs %p\n", our_hwnd, hwnd); GetWindowRect(hwnd, &rect);
tid = GetWindowThreadProcessId(hwnd, NULL); - ok(tid == GetCurrentThreadId(), "Expected tid %#x, got %#x.\n", GetCurrentThreadId(), tid); + ok(tid == GetCurrentThreadId(), "Expected tid %#lx, got %#lx.\n", GetCurrentThreadId(), tid);
hr = IBaseFilter_QueryInterface(filter, &IID_IVideoWindow, (void **)&window); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Caption(window, &caption); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyle(window, &l); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_AutoShow(window, &l); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); @@ -2413,17 +2413,17 @@ static void test_video_window(void) req_props.cbBuffer = 32 * 16 * 3; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator); }
@@ -2438,14 +2438,14 @@ static void test_video_window(void) test_video_window_messages(window, hwnd, our_hwnd);
hr = IVideoWindow_put_FullScreenMode(window, OATRUE); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IVideoWindow_get_FullScreenMode(window, &l); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IVideoWindow_GetMinIdealImageSize(window, &width, &height); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr); hr = IVideoWindow_GetMaxIdealImageSize(window, &width, &height); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
IFilterGraph2_Release(graph); IVideoWindow_Release(window); @@ -2453,9 +2453,9 @@ static void test_video_window(void) IMemInputPin_Release(input); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); DestroyWindow(our_hwnd); }
@@ -2467,31 +2467,31 @@ static void check_source_position_(int line, IBasicVideo *video,
left = top = width = height = 0xdeadbeef; hr = IBasicVideo_GetSourcePosition(video, &left, &top, &width, &height); - ok_(__FILE__,line)(hr == S_OK, "Got hr %#x.\n", hr); - ok_(__FILE__,line)(left == expect_left, "Got left %d.\n", left); - ok_(__FILE__,line)(top == expect_top, "Got top %d.\n", top); - ok_(__FILE__,line)(width == expect_width, "Got width %d.\n", width); - ok_(__FILE__,line)(height == expect_height, "Got height %d.\n", height); + ok_(__FILE__,line)(hr == S_OK, "Got hr %#lx.\n", hr); + ok_(__FILE__,line)(left == expect_left, "Got left %ld.\n", left); + ok_(__FILE__,line)(top == expect_top, "Got top %ld.\n", top); + ok_(__FILE__,line)(width == expect_width, "Got width %ld.\n", width); + ok_(__FILE__,line)(height == expect_height, "Got height %ld.\n", height);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceLeft(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#x.\n", hr); - ok_(__FILE__,line)(l == left, "Got left %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == left, "Got left %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceTop(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#x.\n", hr); - ok_(__FILE__,line)(l == top, "Got top %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == top, "Got top %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceWidth(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#x.\n", hr); - ok_(__FILE__,line)(l == width, "Got width %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == width, "Got width %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceHeight(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#x.\n", hr); - ok_(__FILE__,line)(l == height, "Got height %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == height, "Got height %ld.\n", l); } #define check_source_position(a,b,c,d,e) check_source_position_(__LINE__,a,b,c,d,e)
@@ -2501,77 +2501,77 @@ static void test_basic_video_source(IBasicVideo *video)
check_source_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceLeft(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceLeft(video, 10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceTop(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceTop(video, 10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceWidth(video, -500); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceWidth(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceWidth(video, 700); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceWidth(video, 500); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 500, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceHeight(video, -300); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceHeight(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceHeight(video, 600); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceHeight(video, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 500, 300); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceLeft(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceLeft(video, 10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 10, 0, 500, 300); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceTop(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceTop(video, 20); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 10, 20, 500, 300); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetSourcePosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 4, 5, 60, 40); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetSourcePosition(video, 0, 0, 600, 400); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetSourcePosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IBasicVideo_SetDefaultSourcePosition(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void check_destination_position_(int line, IBasicVideo *video, @@ -2582,31 +2582,31 @@ static void check_destination_position_(int line, IBasicVideo *video,
left = top = width = height = 0xdeadbeef; hr = IBasicVideo_GetDestinationPosition(video, &left, &top, &width, &height); - ok_(__FILE__,line)(hr == S_OK, "Failed to get position, hr %#x.\n", hr); - ok_(__FILE__,line)(left == expect_left, "Got left %d.\n", left); - ok_(__FILE__,line)(top == expect_top, "Got top %d.\n", top); - ok_(__FILE__,line)(width == expect_width, "Got width %d.\n", width); - ok_(__FILE__,line)(height == expect_height, "Got height %d.\n", height); + ok_(__FILE__,line)(hr == S_OK, "Failed to get position, hr %#lx.\n", hr); + ok_(__FILE__,line)(left == expect_left, "Got left %ld.\n", left); + ok_(__FILE__,line)(top == expect_top, "Got top %ld.\n", top); + ok_(__FILE__,line)(width == expect_width, "Got width %ld.\n", width); + ok_(__FILE__,line)(height == expect_height, "Got height %ld.\n", height);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationLeft(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#x.\n", hr); - ok_(__FILE__,line)(l == left, "Got left %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == left, "Got left %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationTop(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#x.\n", hr); - ok_(__FILE__,line)(l == top, "Got top %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == top, "Got top %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationWidth(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#x.\n", hr); - ok_(__FILE__,line)(l == width, "Got width %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == width, "Got width %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationHeight(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#x.\n", hr); - ok_(__FILE__,line)(l == height, "Got height %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == height, "Got height %ld.\n", l); } #define check_destination_position(a,b,c,d,e) check_destination_position_(__LINE__,a,b,c,d,e)
@@ -2620,107 +2620,107 @@ static void test_basic_video_destination(IBasicVideo *video)
check_destination_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationLeft(video, -10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, -10, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationLeft(video, 10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationTop(video, -20); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, -20, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationTop(video, 20); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationWidth(video, -700); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationWidth(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationWidth(video, 700); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 700, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationWidth(video, 500); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 500, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationHeight(video, -500); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationHeight(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationHeight(video, 500); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 500, 500); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationHeight(video, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 500, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 4, 5, 60, 40); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 0, 0, 600, 400); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IBasicVideo_SetDefaultDestinationPosition(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
SetRect(&rect, 100, 200, 500, 500); AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); hr = IVideoWindow_SetWindowPosition(window, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 400, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 0, 0, 400, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 400, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
SetRect(&rect, 100, 200, 600, 600); AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); hr = IVideoWindow_SetWindowPosition(window, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 400, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IVideoWindow_Release(window); } @@ -2769,83 +2769,83 @@ static void test_basic_video(void) IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
hr = IBasicVideo_GetTypeInfoCount(video, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count == 1, "Got count %u.\n", count);
hr = IBasicVideo_GetTypeInfo(video, 0, 0, &typeinfo); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(typeattr->typekind == TKIND_DISPATCH, "Got kind %u.\n", typeattr->typekind); ok(IsEqualGUID(&typeattr->guid, &IID_IBasicVideo), "Got IID %s.\n", wine_dbgstr_guid(&typeattr->guid)); ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); ITypeInfo_Release(typeinfo);
hr = IBasicVideo_get_AvgTimePerFrame(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_BitRate(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_BitRate(video, &l); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_BitErrorRate(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_BitErrorRate(video, &l); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_VideoWidth(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_VideoHeight(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_SourceLeft(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_SourceWidth(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_SourceTop(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_SourceHeight(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_DestinationLeft(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_DestinationWidth(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_DestinationTop(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_DestinationHeight(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetSourcePosition(video, NULL, &top, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetSourcePosition(video, &left, NULL, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetSourcePosition(video, &left, &top, NULL, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetSourcePosition(video, &left, &top, &width, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetDestinationPosition(video, NULL, &top, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetDestinationPosition(video, &left, NULL, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetDestinationPosition(video, &left, &top, NULL, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetDestinationPosition(video, &left, &top, &width, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetVideoSize(video, &width, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetVideoSize(video, NULL, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, NULL, &l); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, &l, NULL); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, L"vmr9"); @@ -2856,66 +2856,66 @@ static void test_basic_video(void) skip("Got E_FAIL when connecting.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator); }
reftime = 0.0; hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_double(reftime, 0.02, 1 << 28), "Got frame rate %.16e.\n", reftime);
l = 0xdeadbeef; hr = IBasicVideo_get_BitRate(video, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!l, "Got bit rate %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!l, "Got bit rate %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_BitErrorRate(video, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!l, "Got bit rate %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!l, "Got bit rate %ld.\n", l);
hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, &l, NULL); - todo_wine ok(hr == VFW_E_NO_PALETTE_AVAILABLE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NO_PALETTE_AVAILABLE, "Got hr %#lx.\n", hr);
width = height = 0xdeadbeef; hr = IBasicVideo_GetVideoSize(video, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 600, "Got width %d.\n", width); - ok(height == 400, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 600, "Got width %ld.\n", width); + ok(height == 400, "Got height %ld.\n", height);
test_basic_video_source(video); test_basic_video_destination(video);
hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
vih.bmiHeader.biWidth = 16; vih.bmiHeader.biHeight = 16; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator); }
@@ -2928,14 +2928,14 @@ static void test_basic_video(void)
out: ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IBasicVideo_Release(video); IMemInputPin_Release(input); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_windowless_size(void) @@ -2980,12 +2980,12 @@ static void test_windowless_size(void) ok(!!window, "Failed to create a window.\n");
hr = IVMRWindowlessControl_SetVideoClippingWindow(windowless_control, window); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_GetAllocator(input, &allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); @@ -2995,47 +2995,47 @@ static void test_windowless_size(void) skip("Got E_FAIL when setting allocator properties.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); }
hr = IVMRWindowlessControl_GetNativeVideoSize(windowless_control, NULL, &height, &aspect_width, &aspect_height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IVMRWindowlessControl_GetNativeVideoSize(windowless_control, &width, NULL, &aspect_width, &aspect_height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
width = height = 0xdeadbeef; hr = IVMRWindowlessControl_GetNativeVideoSize(windowless_control, &width, &height, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 32, "Got width %d.\n", width); - ok(height == 16, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 32, "Got width %ld.\n", width); + ok(height == 16, "Got height %ld.\n", height);
aspect_width = aspect_height = 0xdeadbeef; hr = IVMRWindowlessControl_GetNativeVideoSize(windowless_control, &width, &height, &aspect_width, &aspect_height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(aspect_width == 32, "Got width %d.\n", aspect_width); - ok(aspect_height == 16, "Got height %d.\n", aspect_height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(aspect_width == 32, "Got width %ld.\n", aspect_width); + ok(aspect_height == 16, "Got height %ld.\n", aspect_height);
memset(&src, 0xcc, sizeof(src)); hr = IVMRWindowlessControl_GetVideoPosition(windowless_control, &src, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 0, 0, 32, 16); ok(EqualRect(&src, &expect), "Got source rect %s.\n", wine_dbgstr_rect(&src));
memset(&dst, 0xcc, sizeof(dst)); hr = IVMRWindowlessControl_GetVideoPosition(windowless_control, NULL, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 0, 0, 0, 0); ok(EqualRect(&dst, &expect), "Got dest rect %s.\n", wine_dbgstr_rect(&dst));
SetRect(&src, 4, 6, 16, 12); hr = IVMRWindowlessControl_SetVideoPosition(windowless_control, &src, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&src, 0xcc, sizeof(src)); memset(&dst, 0xcc, sizeof(dst)); hr = IVMRWindowlessControl_GetVideoPosition(windowless_control, &src, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 4, 6, 16, 12); ok(EqualRect(&src, &expect), "Got source rect %s.\n", wine_dbgstr_rect(&src)); SetRect(&expect, 0, 0, 0, 0); @@ -3043,12 +3043,12 @@ static void test_windowless_size(void)
SetRect(&dst, 40, 60, 120, 160); hr = IVMRWindowlessControl_SetVideoPosition(windowless_control, NULL, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&src, 0xcc, sizeof(src)); memset(&dst, 0xcc, sizeof(dst)); hr = IVMRWindowlessControl_GetVideoPosition(windowless_control, &src, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 4, 6, 16, 12); ok(EqualRect(&src, &expect), "Got source rect %s.\n", wine_dbgstr_rect(&src)); SetRect(&expect, 40, 60, 120, 160); @@ -3060,12 +3060,12 @@ static void test_windowless_size(void)
out: ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMemInputPin_Release(input); IPin_Release(pin); IVMRWindowlessControl_Release(windowless_control); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); DestroyWindow(window); }
@@ -3080,49 +3080,49 @@ static void test_unconnected_eos(void) ULONG ref;
hr = IFilterGraph2_AddFilter(graph, filter, L"renderer"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret); @@ -3130,9 +3130,9 @@ static void test_unconnected_eos(void) IMediaControl_Release(control); IMediaEvent_Release(eventsrc); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(vmr7) diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 45ec3313813..1e64ab05e88 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -37,13 +37,13 @@ static IBaseFilter *create_vmr9(DWORD mode) IVMRFilterConfig9 *config; HRESULT hr = CoCreateInstance(&CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (mode) { hr = IBaseFilter_QueryInterface(filter, &IID_IVMRFilterConfig9, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IVMRFilterConfig9_SetRenderingMode(config, mode); - ok(hr == S_OK || broken(hr == E_FAIL), "Got hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_FAIL), "Got hr %#lx.\n", hr); IVMRFilterConfig9_Release(config); } return filter; @@ -55,10 +55,10 @@ static HRESULT set_mixing_mode(IBaseFilter *filter, DWORD count) HRESULT hr;
hr = IBaseFilter_QueryInterface(filter, &IID_IVMRFilterConfig9, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_SetNumberOfStreams(config, count); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IVMRFilterConfig9_Release(config); return hr; @@ -92,7 +92,7 @@ static IFilterGraph2 *create_graph(void) IFilterGraph2 *ret; HRESULT hr; hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterGraph2, (void **)&ret); - ok(hr == S_OK, "Failed to create FilterGraph: %#x\n", hr); + ok(hr == S_OK, "Failed to create FilterGraph: %#lx\n", hr); return ret; }
@@ -112,92 +112,92 @@ static void test_filter_config(void)
hr = CoCreateInstance(&CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC_SERVER, &IID_IVMRFilterConfig9, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMRMode_Windowed, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMRMode_Windowed, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig9_SetRenderingMode(config, VMR9Mode_Windowed); - ok(hr == S_OK || broken(hr == E_FAIL), "Got hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_FAIL), "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMR9Mode_Windowed, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMR9Mode_Windowed, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig9_SetRenderingMode(config, VMR9Mode_Windowed); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
ref = IVMRFilterConfig9_Release(config); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = CoCreateInstance(&CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC_SERVER, &IID_IVMRFilterConfig9, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_SetRenderingMode(config, VMR9Mode_Windowless); - ok(hr == S_OK || broken(hr == E_FAIL), "Got hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_FAIL), "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMR9Mode_Windowless, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMR9Mode_Windowless, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig9_SetRenderingMode(config, VMR9Mode_Windowed); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
ref = IVMRFilterConfig9_Release(config); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = CoCreateInstance(&CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC_SERVER, &IID_IVMRFilterConfig9, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_SetRenderingMode(config, VMR9Mode_Renderless); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMR9Mode_Renderless, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMR9Mode_Renderless, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig9_SetRenderingMode(config, VMR9Mode_Windowless); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
ref = IVMRFilterConfig9_Release(config); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
hr = CoCreateInstance(&CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC_SERVER, &IID_IVMRFilterConfig9, (void **)&config); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &count); - ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_SetNumberOfStreams(config, 3); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 3, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 3, "Got count %lu.\n", count);
hr = IVMRFilterConfig9_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMR9Mode_Windowed, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMR9Mode_Windowed, "Got mode %#lx.\n", mode);
/* Despite MSDN, you can still change the rendering mode after setting the * stream count. */ hr = IVMRFilterConfig9_SetRenderingMode(config, VMR9Mode_Windowless); - ok(hr == S_OK || broken(hr == E_FAIL), "Got hr %#x.\n", hr); + ok(hr == S_OK || broken(hr == E_FAIL), "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetRenderingMode(config, &mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(mode == VMR9Mode_Windowless, "Got mode %#x.\n", mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(mode == VMR9Mode_Windowless, "Got mode %#lx.\n", mode);
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 3, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 3, "Got count %lu.\n", count);
ref = IVMRFilterConfig9_Release(config); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
#define check_interface_broken(a, b, c) check_interface_(__LINE__, a, b, c, TRUE) @@ -220,7 +220,7 @@ static HRESULT check_interface_(unsigned int line, void *iface, REFIID riid, BOO
hr = IUnknown_QueryInterface(unknown, riid, (void **)&out); ok_(__FILE__, line)(hr == expected_hr || broken(is_broken && hr == broken_hr), - "Got hr %#x, expected %#x.\n", hr, expected_hr); + "Got hr %#lx, expected %#lx.\n", hr, expected_hr); if (SUCCEEDED(hr)) IUnknown_Release(out); return hr; @@ -294,7 +294,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
filter = create_vmr9(VMR9Mode_Windowless); test_common_interfaces(filter); @@ -311,7 +311,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IVMRSurfaceAllocatorNotify9, FALSE);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
filter = create_vmr9(VMR9Mode_Renderless); test_common_interfaces(filter); @@ -325,7 +325,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
filter = create_vmr9(VMR9Mode_Windowed); set_mixing_mode(filter, 1); @@ -343,7 +343,7 @@ static void test_interfaces(void) check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static const GUID test_iid = {0x33333333}; @@ -391,53 +391,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_VideoMixingRenderer9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_VideoMixingRenderer9, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -449,79 +449,79 @@ static void test_enum_pins(void) HRESULT hr;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); @@ -529,43 +529,43 @@ static void test_enum_pins(void) set_mixing_mode(filter, 2);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(count == 2, "Got count %u.\n", count); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); if (count > 1) IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - todo_wine ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + todo_wine ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); if (count > 1) IPin_Release(pins[1]);
IEnumPins_Release(enum1); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_find_pin(void) @@ -579,51 +579,51 @@ static void test_find_pin(void) IBaseFilter_EnumPins(filter, &enum_pins);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"In", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"VMR Input0", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins did not match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"VMR Input1", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
set_mixing_mode(filter, 2);
IEnumPins_Reset(enum_pins);
hr = IBaseFilter_FindPin(filter, L"VMR Input0", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins did not match.\n"); IPin_Release(pin); IPin_Release(pin2);
hr = IBaseFilter_FindPin(filter, L"VMR Input1", &pin); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Pins did not match.\n"); IPin_Release(pin); IPin_Release(pin2); }
hr = IBaseFilter_FindPin(filter, L"VMR Input2", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
IEnumPins_Release(enum_pins); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_pin_info(void) @@ -644,23 +644,23 @@ static void test_pin_info(void) IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"VMR Input0"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin);
set_mixing_mode(filter, 2);
hr = IBaseFilter_FindPin(filter, L"VMR Input1", &pin); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IPin_QueryPinInfo(pin, &info); @@ -670,22 +670,22 @@ static void test_pin_info(void) IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"VMR Input1"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
hr = IPin_QueryInternalConnections(pin, NULL, &count); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
IPin_Release(pin); }
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_media_types(void) @@ -713,10 +713,10 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &mt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
@@ -729,33 +729,33 @@ static void test_media_types(void) { req_mt.subtype = *subtype_tests[i]; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_OK, "Got hr %#x for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i])); + ok(hr == S_OK, "Got hr %#lx for subtype %s.\n", hr, wine_dbgstr_guid(subtype_tests[i])); }
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IPin_QueryAccept(pin, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_NULL; hr = IPin_QueryAccept(pin, &req_mt); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_RGB24;
req_mt.majortype = MEDIATYPE_NULL; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); req_mt.majortype = MEDIATYPE_Video;
req_mt.formattype = FORMAT_None; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
req_mt.formattype = GUID_NULL; hr = IPin_QueryAccept(pin, &req_mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_enum_media_types(void) @@ -770,36 +770,36 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); IPin_Release(pin);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_filter_state(void) @@ -810,53 +810,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
struct testfilter @@ -917,45 +917,45 @@ static void test_allocator(IMemInputPin *input) HRESULT hr;
hr = IMemInputPin_GetAllocatorRequirements(input, &props); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &ret_allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (hr == S_OK) { hr = IMemAllocator_GetProperties(ret_allocator, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!props.cBuffers, "Got %d buffers.\n", props.cBuffers); - ok(!props.cbBuffer, "Got size %d.\n", props.cbBuffer); - ok(!props.cbAlign, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!props.cBuffers, "Got %ld buffers.\n", props.cBuffers); + ok(!props.cbBuffer, "Got size %ld.\n", props.cbBuffer); + ok(!props.cbAlign, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
hr = IMemInputPin_NotifyAllocator(input, ret_allocator, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
req_props.cBuffers = 1; req_props.cbBuffer = 32 * 16 * 4; req_props.cbAlign = 1; req_props.cbPrefix = 0; hr = IMemAllocator_SetProperties(ret_allocator, &req_props, &props); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(props.cBuffers == 1, "Got %d buffers.\n", props.cBuffers); - ok(props.cbBuffer == 32 * 16 * 4, "Got size %d.\n", props.cbBuffer); - ok(props.cbAlign == 1, "Got alignment %d.\n", props.cbAlign); - ok(!props.cbPrefix, "Got prefix %d.\n", props.cbPrefix); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(props.cBuffers == 1, "Got %ld buffers.\n", props.cBuffers); + ok(props.cbBuffer == 32 * 16 * 4, "Got size %ld.\n", props.cbBuffer); + ok(props.cbAlign == 1, "Got alignment %ld.\n", props.cbAlign); + ok(!props.cbPrefix, "Got prefix %ld.\n", props.cbPrefix);
IMemAllocator_Release(ret_allocator); }
hr = IMemInputPin_NotifyAllocator(input, NULL, TRUE); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&req_allocator);
hr = IMemInputPin_NotifyAllocator(input, req_allocator, TRUE); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
IMemAllocator_Release(req_allocator); } @@ -971,9 +971,9 @@ static DWORD WINAPI frame_thread(void *arg) struct frame_thread_params *params = arg; HRESULT hr;
- if (winetest_debug > 1) trace("%04x: Sending frame.\n", GetCurrentThreadId()); + if (winetest_debug > 1) trace("%04lx: Sending frame.\n", GetCurrentThreadId()); hr = IMemInputPin_Receive(params->sink, params->sample); - if (winetest_debug > 1) trace("%04x: Returned %#x.\n", GetCurrentThreadId(), hr); + if (winetest_debug > 1) trace("%04lx: Returned %#lx.\n", GetCurrentThreadId(), hr); IMediaSample_Release(params->sample); free(params); return hr; @@ -991,27 +991,27 @@ static HANDLE send_frame_time(IMemInputPin *sink, REFERENCE_TIME start_time, DWO BYTE *data;
hr = IMemInputPin_GetAllocator(sink, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
size = IMediaSample_GetSize(sample); hr = IMediaSample_GetPointer(sample, &data); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); for (i = 0; i < size / sizeof(DWORD); ++i) ((DWORD *)data)[i] = color;
hr = IMediaSample_SetActualDataLength(sample, size); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
start_time *= 10000000; end_time = start_time + 10000000; hr = IMediaSample_SetTime(sample, &start_time, &end_time); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSample_SetPreroll(sample, TRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
params->sink = sink; params->sample = sample; @@ -1042,9 +1042,9 @@ static void commit_allocator(IMemInputPin *input) HRESULT hr;
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator); }
@@ -1058,130 +1058,130 @@ static void test_filter_state(IMemInputPin *input, IMediaControl *control)
thread = send_frame(input); hr = join_thread(thread); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
/* The renderer is not fully paused until it receives a sample. The thread * sending the sample blocks in IMemInputPin_Receive() until the filter is * stopped or run. */
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* The sink will decommit our allocator for us when stopping, however it * will not recommit it when pausing. */ hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_GetBuffer(allocator, &sample, NULL, NULL, 0); - todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_COMMITTED, "Got hr %#lx.\n", hr); if (hr == S_OK) IMediaSample_Release(sample);
hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); thread = send_frame(input); hr = join_thread(thread); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMemAllocator_Release(allocator); } @@ -1194,61 +1194,61 @@ static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
thread = send_frame(input); ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* We dropped the sample we were holding, so now we need a new one... */
hr = IMediaControl_GetState(control, 0, &state); - todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %#x.\n", state); + todo_wine ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %#lx.\n", state);
thread = send_frame(input); ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == State_Paused, "Got state %#x.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == State_Paused, "Got state %#lx.\n", state);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame(input); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG expected_code, LONG_PTR expected1, LONG_PTR expected2) @@ -1262,14 +1262,14 @@ static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG { if (code == expected_code) { - ok(param1 == expected1, "Got param1 %#lx.\n", param1); - ok(param2 == expected2, "Got param2 %#lx.\n", param2); + ok(param1 == expected1, "Got param1 %#Ix.\n", param1); + ok(param2 == expected2, "Got param2 %#Ix.\n", param2); ret++; } IMediaEvent_FreeEventParams(eventsrc, code, param1, param2); timeout = 0; } - ok(hr == E_ABORT, "Got hr %#x.\n", hr); + ok(hr == E_ABORT, "Got hr %#lx.\n", hr);
return ret; } @@ -1290,28 +1290,28 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control)
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = join_thread(send_frame(input)); - todo_wine ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
@@ -1320,23 +1320,23 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control)
commit_allocator(input); hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n"); ret = check_ec_complete(eventsrc, 1600); todo_wine ok(ret == 1, "Expected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
@@ -1344,19 +1344,19 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control)
commit_allocator(input); hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndOfStream(pin); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
@@ -1364,31 +1364,31 @@ static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control)
commit_allocator(input); hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); todo_wine ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IPin_EndOfStream(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got unexpected EC_COMPLETE.\n");
@@ -1403,25 +1403,25 @@ static void test_sample_time(IPin *pin, IMemInputPin *input, IMediaControl *cont
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaControl_GetState(control, 0, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr);
thread = send_frame_time(input, 1, 0x000000ff); /* blue */
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ok(WaitForSingleObject(thread, 500) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Sample time is relative to the time passed to Run(). Thus a sample * stamped at or earlier than 1s will now be displayed immediately, because @@ -1433,33 +1433,33 @@ static void test_sample_time(IPin *pin, IMemInputPin *input, IMediaControl *cont * discontinuous. */
hr = join_thread(send_frame_time(input, 1, 0x0000ffff)); /* cyan */ - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame_time(input, 0, 0x0000ff00)); /* green */ - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = join_thread(send_frame_time(input, -2, 0x00ff0000)); /* red */ - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame_time(input, 1000000, 0x00ffffff); /* white */ ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IPin_BeginFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = join_thread(thread); /* If the frame makes it to Receive() in time to be rendered, we get S_OK. */ - ok(hr == S_OK || hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_OK || hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IPin_EndFlush(pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
thread = send_frame_time(input, 1000000, 0x00ffff00); /* yellow */ ok(WaitForSingleObject(thread, 100) == WAIT_TIMEOUT, "Thread should block in Receive().\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = join_thread(thread); /* If the frame makes it to Receive() in time to be rendered, we get S_OK. */ - ok(hr == S_OK || hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == S_OK || hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr); }
static void test_current_image(IBaseFilter *filter, IMemInputPin *input, @@ -1481,68 +1481,68 @@ static void test_current_image(IBaseFilter *filter, IMemInputPin *input, IBaseFilter_QueryInterface(filter, &IID_IBasicVideo, (void **)&video);
hr = IBasicVideo_GetCurrentImage(video, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetCurrentImage(video, NULL, buffer); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
size = 0xdeadbeef; hr = IBasicVideo_GetCurrentImage(video, &size, NULL); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 4, "Got size %d.\n", size); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(size == sizeof(BITMAPINFOHEADER) + 32 * 16 * 4, "Got size %ld.\n", size);
size = sizeof(buffer); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == sizeof(buffer), "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(buffer), "Got size %ld.\n", size); ok(!memcmp(bih, &expect_bih, sizeof(BITMAPINFOHEADER)), "Bitmap headers didn't match.\n"); /* The contents seem to reflect the last frame rendered. */
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
size = sizeof(buffer); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == sizeof(buffer), "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(buffer), "Got size %ld.\n", size); ok(!memcmp(bih, &expect_bih, sizeof(BITMAPINFOHEADER)), "Bitmap headers didn't match.\n"); /* The contents seem to reflect the last frame rendered. */
thread = send_frame(input); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
size = 1; memset(buffer, 0xcc, sizeof(buffer)); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == 1, "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == 1, "Got size %ld.\n", size);
size = sizeof(buffer); memset(buffer, 0xcc, sizeof(buffer)); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == sizeof(buffer), "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(buffer), "Got size %ld.\n", size); ok(!memcmp(bih, &expect_bih, sizeof(BITMAPINFOHEADER)), "Bitmap headers didn't match.\n"); for (i = 0; i < 32 * 16; ++i) - ok((data[i] & 0xffffff) == 0x7f007f, "Got unexpected color %08x at %u.\n", data[i], i); + ok((data[i] & 0xffffff) == 0x7f007f, "Got unexpected color %08lx at %u.\n", data[i], i);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); join_thread(thread);
size = sizeof(buffer); memset(buffer, 0xcc, sizeof(buffer)); hr = IBasicVideo_GetCurrentImage(video, &size, buffer); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(size == sizeof(buffer), "Got size %d.\n", size); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(buffer), "Got size %ld.\n", size); ok(!memcmp(bih, &expect_bih, sizeof(BITMAPINFOHEADER)), "Bitmap headers didn't match.\n"); for (i = 0; i < 32 * 16; ++i) - ok((data[i] & 0xffffff) == 0x7f007f, "Got unexpected color %08x at %u.\n", data[i], i); + ok((data[i] & 0xffffff) == 0x7f007f, "Got unexpected color %08lx at %u.\n", data[i], i);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IBasicVideo_Release(video); } @@ -1566,19 +1566,19 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay);
hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IOverlay_Release(overlay);
commit_allocator(input); hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
SendMessageW(hwnd, WM_CLOSE, 0, 0);
hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#x.\n", hr); + ok(hr == VFW_S_STATE_INTERMEDIATE, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(ret == 1, "Expected EC_USERABORT.\n");
@@ -1591,17 +1591,17 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con if (ret == WAIT_OBJECT_0) { GetExitCodeThread(thread, (DWORD *)&hr); - ok(hr == E_UNEXPECTED, "Got hr %#x.\n", hr); + ok(hr == E_UNEXPECTED, "Got hr %#lx.\n", hr); } CloseHandle(thread);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
@@ -1609,11 +1609,11 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con
commit_allocator(input); hr = IMediaControl_Run(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = join_thread(send_frame(input)); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
@@ -1626,7 +1626,7 @@ static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *con ok(!IsWindowVisible(hwnd), "Window should be visible.\n");
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ret = check_ec_userabort(eventsrc, 0); ok(!ret, "Got unexpected EC_USERABORT.\n");
@@ -1696,54 +1696,54 @@ static void test_connect_pin(void) skip("Got E_FAIL when connecting.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x for subtype %s and bpp %u.\n", hr, + ok(hr == S_OK, "Got hr %#lx for subtype %s and bpp %u.\n", hr, wine_dbgstr_guid(subtype_tests[i]), bpp_tests[j]);
hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); } }
req_mt.formattype = FORMAT_None; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.formattype = FORMAT_VideoInfo;
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_WAVE; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#lx.\n", hr); req_mt.subtype = MEDIASUBTYPE_RGB32;
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == VFW_E_NOT_STOPPED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_STOPPED, "Got hr %#lx.\n", hr); hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IPin_ConnectedTo(pin, &peer); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(peer == &source.source.pin.IPin_iface, "Got peer %p.\n", peer); IPin_Release(peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_media_types(&mt, &req_mt), "Media types didn't match.\n");
/* Disconnecting while not stopped is broken: it returns S_OK, but @@ -1752,16 +1752,16 @@ static void test_connect_pin(void) test_allocator(input);
hr = IMemInputPin_GetAllocator(input, &allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator);
hr = IMemInputPin_ReceiveCanBlock(input); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
test_filter_state(input, control); test_flushing(pin, input, control); @@ -1771,30 +1771,30 @@ static void test_connect_pin(void) test_window_close(pin, input, control);
hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); ok(source.source.pin.peer == pin, "Got peer %p.\n", source.source.pin.peer); IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface);
peer = (IPin *)0xdeadbeef; hr = IPin_ConnectedTo(pin, &peer); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr); ok(!peer, "Got peer %p.\n", peer);
hr = IPin_ConnectionMediaType(pin, &mt); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
out: IMediaControl_Release(control); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMemInputPin_Release(input); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_overlay(void) @@ -1809,49 +1809,49 @@ static void test_overlay(void) IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hwnd = (HWND)0xdeadbeef; hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(hwnd && hwnd != (HWND)0xdeadbeef, "Got invalid window %p.\n", hwnd);
IOverlay_Release(overlay); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
filter = create_vmr9(VMR9Mode_Windowless); IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hwnd = (HWND)0xdeadbeef; hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr); ok(hwnd == (HWND)0xdeadbeef, "Got window %p.\n", hwnd);
IOverlay_Release(overlay); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref);
filter = create_vmr9(VMR9Mode_Renderless); IBaseFilter_FindPin(filter, L"VMR Input0", &pin);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hwnd = (HWND)0xdeadbeef; hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr); ok(hwnd == (HWND)0xdeadbeef, "Got window %p.\n", hwnd);
IOverlay_Release(overlay); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
/* try to make sure pending X events have been processed before continuing */ @@ -1875,7 +1875,7 @@ static void flush_events(void) static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { if (winetest_debug > 1) - trace("hwnd %p, msg %#x, wparam %#lx, lparam %#lx.\n", hwnd, msg, wparam, lparam); + trace("hwnd %p, msg %#x, wparam %#Ix, lparam %#Ix.\n", hwnd, msg, wparam, lparam);
if (wparam == 0xdeadbeef) return 0; @@ -1890,7 +1890,7 @@ static void test_video_window_caption(IVideoWindow *window, HWND hwnd) HRESULT hr;
hr = IVideoWindow_get_Caption(window, &caption); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(caption, L"ActiveMovie Window"), "Got caption %s.\n", wine_dbgstr_w(caption)); SysFreeString(caption);
@@ -1899,11 +1899,11 @@ static void test_video_window_caption(IVideoWindow *window, HWND hwnd)
caption = SysAllocString(L"foo"); hr = IVideoWindow_put_Caption(window, caption); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SysFreeString(caption);
hr = IVideoWindow_get_Caption(window, &caption); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(caption, L"foo"), "Got caption %s.\n", wine_dbgstr_w(caption)); SysFreeString(caption);
@@ -1917,53 +1917,53 @@ static void test_video_window_style(IVideoWindow *window, HWND hwnd, HWND our_hw LONG style;
hr = IVideoWindow_get_WindowStyle(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(style == (WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW), - "Got style %#x.\n", style); + "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); ok(style == (WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW), - "Got style %#x.\n", style); + "Got style %#lx.\n", style);
hr = IVideoWindow_put_WindowStyle(window, style | WS_DISABLED); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_HSCROLL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_VSCROLL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_MAXIMIZE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_WindowStyle(window, style | WS_MINIMIZE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_WindowStyle(window, style & ~WS_CLIPCHILDREN); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyle(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#x.\n", style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_STYLE); - ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#x.\n", style); + ok(style == (WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW), "Got style %#lx.\n", style);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_get_WindowStyleEx(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(style == WS_EX_WINDOWEDGE, "Got style %#x.\n", style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == WS_EX_WINDOWEDGE, "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(style == WS_EX_WINDOWEDGE, "Got style %#x.\n", style); + ok(style == WS_EX_WINDOWEDGE, "Got style %#lx.\n", style);
hr = IVideoWindow_put_WindowStyleEx(window, style | WS_EX_TRANSPARENT); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyleEx(window, &style); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#x.\n", style); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#lx.\n", style);
style = GetWindowLongA(hwnd, GWL_EXSTYLE); - ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#x.\n", style); + ok(style == (WS_EX_WINDOWEDGE | WS_EX_TRANSPARENT), "Got style %#lx.\n", style); }
static BOOL CALLBACK top_window_cb(HWND hwnd, LPARAM ctx) @@ -1994,25 +1994,25 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_HIDE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_HIDE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(state == OAFALSE, "Got state %ld.\n", state);
ok(!IsWindowVisible(hwnd), "Window should not be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); ok(!IsZoomed(hwnd), "Window should not be maximized.\n");
hr = IVideoWindow_put_WindowState(window, SW_SHOWNA); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_SHOW, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_SHOW, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -2022,14 +2022,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(top == hwnd, "Got top window %p.\n", top);
hr = IVideoWindow_put_WindowState(window, SW_MINIMIZE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_MINIMIZE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_MINIMIZE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(IsIconic(hwnd), "Window should be minimized.\n"); @@ -2037,14 +2037,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_RESTORE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_SHOW, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_SHOW, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -2052,14 +2052,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_MAXIMIZE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_MAXIMIZE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_MAXIMIZE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should be minimized.\n"); @@ -2067,17 +2067,17 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_RESTORE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_WindowState(window, SW_HIDE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_HIDE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_HIDE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(state == OAFALSE, "Got state %ld.\n", state);
ok(!IsWindowVisible(hwnd), "Window should not be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -2085,14 +2085,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_Visible(window, OATRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_SHOW, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_SHOW, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OATRUE, "Got state %d.\n", state); + ok(state == OATRUE, "Got state %ld.\n", state);
ok(IsWindowVisible(hwnd), "Window should be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -2100,14 +2100,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_Visible(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowState(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == SW_HIDE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == SW_HIDE, "Got state %ld.\n", state);
hr = IVideoWindow_get_Visible(window, &state); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(state == OAFALSE, "Got state %ld.\n", state);
ok(!IsWindowVisible(hwnd), "Window should not be visible.\n"); ok(!IsIconic(hwnd), "Window should not be minimized.\n"); @@ -2115,14 +2115,14 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow());
hr = IVideoWindow_put_WindowState(window, SW_SHOWNA); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_SetWindowForeground(window, TRUE); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); hr = IVideoWindow_SetWindowForeground(window, OATRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); ok(GetFocus() == hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == hwnd, "Got foreground window %p.\n", GetForegroundWindow()); @@ -2130,7 +2130,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw ok(top == hwnd, "Got top window %p.\n", top);
hr = IVideoWindow_SetWindowForeground(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); ok(GetFocus() == hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == hwnd, "Got foreground window %p.\n", GetForegroundWindow()); @@ -2139,7 +2139,7 @@ static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hw
SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); hr = IVideoWindow_SetWindowForeground(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); ok(GetFocus() == our_hwnd, "Got focus window %p.\n", GetFocus()); ok(GetForegroundWindow() == our_hwnd, "Got foreground window %p.\n", GetForegroundWindow()); @@ -2161,114 +2161,114 @@ static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our expect_height = rect.bottom - rect.top;
hr = IVideoWindow_put_Left(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IVideoWindow_put_Top(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 0, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 0, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 0, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 0, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == expect_width, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == expect_width, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == expect_height, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 0, "Got left %d.\n", left); - ok(top == 0, "Got top %d.\n", top); - ok(width == expect_width, "Got width %d.\n", width); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 0, "Got left %ld.\n", left); + ok(top == 0, "Got top %ld.\n", top); + ok(width == expect_width, "Got width %ld.\n", width); + ok(height == expect_height, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 0, "Got window left %d.\n", rect.left); - ok(rect.top == 0, "Got window top %d.\n", rect.top); - ok(rect.right == expect_width, "Got window right %d.\n", rect.right); - ok(rect.bottom == expect_height, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 0, "Got window left %ld.\n", rect.left); + ok(rect.top == 0, "Got window top %ld.\n", rect.top); + ok(rect.right == expect_width, "Got window right %ld.\n", rect.right); + ok(rect.bottom == expect_height, "Got window bottom %ld.\n", rect.bottom);
hr = IVideoWindow_put_Left(window, 10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 0, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 0, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == expect_width, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == expect_width, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == expect_height, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); - ok(top == 0, "Got top %d.\n", top); - ok(width == expect_width, "Got width %d.\n", width); - ok(height == expect_height, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); + ok(top == 0, "Got top %ld.\n", top); + ok(width == expect_width, "Got width %ld.\n", width); + ok(height == expect_height, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 10, "Got window left %d.\n", rect.left); - ok(rect.top == 0, "Got window top %d.\n", rect.top); - ok(rect.right == 10 + expect_width, "Got window right %d.\n", rect.right); - ok(rect.bottom == expect_height, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 10, "Got window left %ld.\n", rect.left); + ok(rect.top == 0, "Got window top %ld.\n", rect.top); + ok(rect.right == 10 + expect_width, "Got window right %ld.\n", rect.right); + ok(rect.bottom == expect_height, "Got window bottom %ld.\n", rect.bottom);
hr = IVideoWindow_put_Height(window, 200); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 0, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 0, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == expect_width, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == expect_width, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == 200, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == 200, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 10, "Got left %d.\n", left); - ok(top == 0, "Got top %d.\n", top); - ok(width == expect_width, "Got width %d.\n", width); - ok(height == 200, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 10, "Got left %ld.\n", left); + ok(top == 0, "Got top %ld.\n", top); + ok(width == expect_width, "Got width %ld.\n", width); + ok(height == 200, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 10, "Got window left %d.\n", rect.left); - ok(rect.top == 0, "Got window top %d.\n", rect.top); - ok(rect.right == 10 + expect_width, "Got window right %d.\n", rect.right); - ok(rect.bottom == 200, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 10, "Got window left %ld.\n", rect.left); + ok(rect.top == 0, "Got window top %ld.\n", rect.top); + ok(rect.right == 10 + expect_width, "Got window right %ld.\n", rect.right); + ok(rect.bottom == 200, "Got window bottom %ld.\n", rect.bottom);
hr = IVideoWindow_SetWindowPosition(window, 100, 200, 300, 400); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Left(window, &left); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 100, "Got left %d.\n", left); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 100, "Got left %ld.\n", left); hr = IVideoWindow_get_Top(window, &top); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(top == 200, "Got top %d.\n", top); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(top == 200, "Got top %ld.\n", top); hr = IVideoWindow_get_Width(window, &width); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 300, "Got width %d.\n", width); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 300, "Got width %ld.\n", width); hr = IVideoWindow_get_Height(window, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(height == 400, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(height == 400, "Got height %ld.\n", height); hr = IVideoWindow_GetWindowPosition(window, &left, &top, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(left == 100, "Got left %d.\n", left); - ok(top == 200, "Got top %d.\n", top); - ok(width == 300, "Got width %d.\n", width); - ok(height == 400, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(left == 100, "Got left %ld.\n", left); + ok(top == 200, "Got top %ld.\n", top); + ok(width == 300, "Got width %ld.\n", width); + ok(height == 400, "Got height %ld.\n", height); GetWindowRect(hwnd, &rect); - ok(rect.left == 100, "Got window left %d.\n", rect.left); - ok(rect.top == 200, "Got window top %d.\n", rect.top); - ok(rect.right == 400, "Got window right %d.\n", rect.right); - ok(rect.bottom == 600, "Got window bottom %d.\n", rect.bottom); + ok(rect.left == 100, "Got window left %ld.\n", rect.left); + ok(rect.top == 200, "Got window top %ld.\n", rect.top); + ok(rect.right == 400, "Got window right %ld.\n", rect.right); + ok(rect.bottom == 600, "Got window bottom %ld.\n", rect.bottom);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); @@ -2285,25 +2285,25 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw SetWindowPos(our_hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
hr = IVideoWindow_get_Owner(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!oahwnd, "Got owner %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!oahwnd, "Got owner %#Ix.\n", oahwnd);
parent = GetAncestor(hwnd, GA_PARENT); ok(parent == GetDesktopWindow(), "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & WS_CHILD), "Got style %#x.\n", style); + ok(!(style & WS_CHILD), "Got style %#lx.\n", style);
hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Owner(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(oahwnd == (OAHWND)our_hwnd, "Got owner %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(oahwnd == (OAHWND)our_hwnd, "Got owner %#Ix.\n", oahwnd);
parent = GetAncestor(hwnd, GA_PARENT); ok(parent == our_hwnd, "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok((style & WS_CHILD), "Got style %#x.\n", style); + ok((style & WS_CHILD), "Got style %#lx.\n", style);
ok(GetActiveWindow() == our_hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); @@ -2312,31 +2312,31 @@ static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hw ShowWindow(our_hwnd, SW_HIDE);
hr = IVideoWindow_put_Visible(window, OATRUE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == OAFALSE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == OAFALSE, "Got state %ld.\n", state);
hr = IVideoWindow_put_Owner(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Owner(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!oahwnd, "Got owner %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!oahwnd, "Got owner %#Ix.\n", oahwnd);
parent = GetAncestor(hwnd, GA_PARENT); ok(parent == GetDesktopWindow(), "Got parent %p.\n", parent); style = GetWindowLongA(hwnd, GWL_STYLE); - ok(!(style & WS_CHILD), "Got style %#x.\n", style); + ok(!(style & WS_CHILD), "Got style %#lx.\n", style);
ok(GetActiveWindow() == hwnd, "Got active window %p.\n", GetActiveWindow()); top_hwnd = get_top_window(); ok(top_hwnd == hwnd, "Got top window %p.\n", top_hwnd);
hr = IVideoWindow_get_Visible(window, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(state == OATRUE, "Got state %d.\n", state); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(state == OATRUE, "Got state %ld.\n", state); }
struct notify_message_params @@ -2350,7 +2350,7 @@ static DWORD CALLBACK notify_message_proc(void *arg) { const struct notify_message_params *params = arg; HRESULT hr = IVideoWindow_NotifyOwnerMessage(params->window, (OAHWND)params->hwnd, params->message, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return 0; }
@@ -2393,15 +2393,15 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our flush_events();
hr = IVideoWindow_get_MessageDrain(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!oahwnd, "Got window %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!oahwnd, "Got window %#Ix.\n", oahwnd);
hr = IVideoWindow_put_MessageDrain(window, (OAHWND)our_hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_MessageDrain(window, &oahwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(oahwnd == (OAHWND)our_hwnd, "Got window %#lx.\n", oahwnd); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(oahwnd == (OAHWND)our_hwnd, "Got window %#Ix.\n", oahwnd);
for (i = 0; i < ARRAY_SIZE(drain_tests); ++i) { @@ -2410,8 +2410,8 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our ok(ret, "Expected a message.\n"); ok(msg.hwnd == our_hwnd, "Got hwnd %p.\n", msg.hwnd); ok(msg.message == drain_tests[i], "Got message %#x.\n", msg.message); - ok(msg.wParam == 0xdeadbeef, "Got wparam %#lx.\n", msg.wParam); - ok(!msg.lParam, "Got lparam %#lx.\n", msg.lParam); + ok(msg.wParam == 0xdeadbeef, "Got wparam %#Ix.\n", msg.wParam); + ok(!msg.lParam, "Got lparam %#Ix.\n", msg.lParam); DispatchMessageA(&msg);
ret = PeekMessageA(&msg, 0, drain_tests[i], drain_tests[i], PM_REMOVE); @@ -2419,10 +2419,10 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our }
hr = IVideoWindow_put_MessageDrain(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_Owner(window, (OAHWND)our_hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
flush_events();
@@ -2431,7 +2431,7 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our * posted all messages. */
hr = IVideoWindow_NotifyOwnerMessage(window, (OAHWND)our_hwnd, WM_SYSCOLORCHANGE, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) { @@ -2440,7 +2440,7 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our }
hr = IVideoWindow_NotifyOwnerMessage(window, (OAHWND)our_hwnd, WM_FONTCHANGE, 0, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) { @@ -2477,7 +2477,7 @@ static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our }
hr = IVideoWindow_put_Owner(window, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *graph, HWND hwnd) @@ -2489,41 +2489,41 @@ static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *grap IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control);
hr = IVideoWindow_get_AutoShow(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OATRUE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OATRUE, "Got %ld.\n", l);
hr = IVideoWindow_put_Visible(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OATRUE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OATRUE, "Got %ld.\n", l);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OATRUE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OATRUE, "Got %ld.\n", l);
hr = IVideoWindow_put_AutoShow(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_put_Visible(window, OAFALSE); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Visible(window, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(l == OAFALSE, "Got %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(l == OAFALSE, "Got %ld.\n", l);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaControl_Release(control); } @@ -2583,27 +2583,27 @@ static void test_video_window(void) IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
hr = IPin_QueryInterface(pin, &IID_IOverlay, (void **)&overlay); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IOverlay_GetWindowHandle(overlay, &hwnd); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); if (winetest_debug > 1) trace("ours %p, theirs %p\n", our_hwnd, hwnd); GetWindowRect(hwnd, &rect);
tid = GetWindowThreadProcessId(hwnd, NULL); - ok(tid == GetCurrentThreadId(), "Expected tid %#x, got %#x.\n", GetCurrentThreadId(), tid); + ok(tid == GetCurrentThreadId(), "Expected tid %#lx, got %#lx.\n", GetCurrentThreadId(), tid);
hr = IBaseFilter_QueryInterface(filter, &IID_IVideoWindow, (void **)&window); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_Caption(window, &caption); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_WindowStyle(window, &l); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IVideoWindow_get_AutoShow(window, &l); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, NULL); @@ -2615,17 +2615,17 @@ static void test_video_window(void) skip("Got E_FAIL when connecting.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator); }
@@ -2640,34 +2640,34 @@ static void test_video_window(void) test_video_window_messages(window, hwnd, our_hwnd);
hr = IVideoWindow_put_FullScreenMode(window, OATRUE); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IVideoWindow_get_FullScreenMode(window, &l); - ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IVideoWindow_GetMinIdealImageSize(window, &width, &height); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr); hr = IVideoWindow_GetMaxIdealImageSize(window, &width, &height); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
monitorinfo.cbSize = sizeof(monitorinfo); GetMonitorInfoW(MonitorFromWindow(hwnd, MONITOR_DEFAULTTOPRIMARY), &monitorinfo);
hr = IVideoWindow_GetMinIdealImageSize(window, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(width == 1, "Got width %d.\n", width); - todo_wine ok(height == 1, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(width == 1, "Got width %ld.\n", width); + todo_wine ok(height == 1, "Got height %ld.\n", height); hr = IVideoWindow_GetMaxIdealImageSize(window, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(width == monitorinfo.rcMonitor.right + 1, "Expected width %d, got %d.\n", + ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(width == monitorinfo.rcMonitor.right + 1, "Expected width %ld, got %ld.\n", monitorinfo.rcMonitor.right + 1, width); - todo_wine ok(height == monitorinfo.rcMonitor.bottom + 1, "Expected height %d, got %d.\n", + todo_wine ok(height == monitorinfo.rcMonitor.bottom + 1, "Expected height %ld, got %ld.\n", monitorinfo.rcMonitor.bottom + 1, height);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
out: IMediaControl_Release(control); @@ -2677,9 +2677,9 @@ out: IMemInputPin_Release(input); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); DestroyWindow(our_hwnd); }
@@ -2706,7 +2706,7 @@ static IDirect3DDevice9 *create_device(HWND window) IDirect3D9_Release(d3d); if (FAILED(hr)) { - skip("Failed to create a 3D device, hr %#x.\n", hr); + skip("Failed to create a 3D device, hr %#lx.\n", hr); return NULL; } return device; @@ -2751,7 +2751,7 @@ static void test_allocate_surface_helper(void)
count = 2; hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, surfaces); - todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_FAIL, "Got hr %#lx.\n", hr);
hr = IVMRSurfaceAllocatorNotify9_SetD3DDevice(notify, device, MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY)); if (hr == E_NOINTERFACE) @@ -2759,42 +2759,42 @@ static void test_allocate_surface_helper(void) win_skip("Direct3D does not support video rendering.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (0) /* crashes on Windows */ { hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, NULL, &count, surfaces); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, NULL, surfaces); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); }
hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, surfaces); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); ok(!!surfaces[0], "Surface 0 was not allocated.\n"); ok(!!surfaces[1], "Surface 1 was not allocated.\n");
hr = IDirect3DSurface9_GetDevice(surfaces[0], &device2); - ok(hr == D3D_OK, "Got hr %#x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ok(device2 == device, "Devices did not match.\n"); IDirect3DDevice9_Release(device2);
hr = IDirect3DSurface9_GetContainer(surfaces[0], &IID_IDirect3DTexture9, (void **)&container); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
hr = IDirect3DSurface9_GetDesc(surfaces[0], &desc); - ok(hr == D3D_OK, "Got hr %#x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ok(desc.Format == info.Format, "Got format %#x.\n", desc.Format); ok(desc.Type == D3DRTYPE_SURFACE, "Got type %u.\n", desc.Type); - ok(!desc.Usage, "Got usage %#x.\n", desc.Usage); + ok(!desc.Usage, "Got usage %#lx.\n", desc.Usage); ok(desc.Pool == D3DPOOL_DEFAULT, "Got pool %u.\n", desc.Pool); ok(desc.MultiSampleType == D3DMULTISAMPLE_NONE, "Got multisample type %u.\n", desc.MultiSampleType); - ok(!desc.MultiSampleQuality, "Got multisample quality %u.\n", desc.MultiSampleQuality); + ok(!desc.MultiSampleQuality, "Got multisample quality %lu.\n", desc.MultiSampleQuality); ok(desc.Width == 32, "Got width %u.\n", desc.Width); ok(desc.Height == 16, "Got height %u.\n", desc.Height);
@@ -2804,16 +2804,16 @@ static void test_allocate_surface_helper(void) surfaces[0] = surfaces[1] = NULL; count = 1; hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, surfaces); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(!count, "Got count %u.\n", count); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); + todo_wine ok(!count, "Got count %lu.\n", count); ok(!surfaces[0], "Surface 0 was allocated.\n"); ok(!surfaces[1], "Surface 1 was allocated.\n");
count = 2; info.MinBuffers = 1; hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, surfaces); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); ok(!!surfaces[0], "Surface 0 was not allocated.\n"); ok(!!surfaces[1], "Surface 1 was not allocated.\n"); IDirect3DSurface9_Release(surfaces[0]); @@ -2823,28 +2823,28 @@ static void test_allocate_surface_helper(void) info.dwFlags = VMR9AllocFlag_TextureSurface; surfaces[0] = surfaces[1] = NULL; hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, surfaces); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); ok(!!surfaces[0], "Surface 0 was not allocated.\n"); ok(!!surfaces[1], "Surface 1 was not allocated.\n");
hr = IDirect3DSurface9_GetDevice(surfaces[0], &device2); - ok(hr == D3D_OK, "Got hr %#x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ok(device2 == device, "Devices did not match.\n"); IDirect3DDevice9_Release(device2);
hr = IDirect3DSurface9_GetContainer(surfaces[0], &IID_IDirect3DTexture9, (void **)&container); - ok(hr == D3D_OK, "Got hr %#x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); IDirect3DTexture9_Release(container);
hr = IDirect3DSurface9_GetDesc(surfaces[1], &desc); - ok(hr == D3D_OK, "Got hr %#x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ok(desc.Format == info.Format, "Got format %#x.\n", desc.Format); ok(desc.Type == D3DRTYPE_SURFACE, "Got type %u.\n", desc.Type); - ok(desc.Usage == D3DUSAGE_DYNAMIC, "Got usage %#x.\n", desc.Usage); + ok(desc.Usage == D3DUSAGE_DYNAMIC, "Got usage %#lx.\n", desc.Usage); ok(desc.Pool == D3DPOOL_DEFAULT, "Got pool %u.\n", desc.Pool); ok(desc.MultiSampleType == D3DMULTISAMPLE_NONE, "Got multisample type %u.\n", desc.MultiSampleType); - ok(!desc.MultiSampleQuality, "Got multisample quality %u.\n", desc.MultiSampleQuality); + ok(!desc.MultiSampleQuality, "Got multisample quality %lu.\n", desc.MultiSampleQuality); ok(desc.Width == 32, "Got width %u.\n", desc.Width); ok(desc.Height == 16, "Got height %u.\n", desc.Height);
@@ -2854,8 +2854,8 @@ static void test_allocate_surface_helper(void) info.Format = D3DFMT_R8G8B8; surfaces[0] = surfaces[1] = NULL; hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, surfaces); - ok(hr == D3DERR_INVALIDCALL, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == D3DERR_INVALIDCALL, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count); ok(!surfaces[0], "Surface 0 was allocated.\n"); ok(!surfaces[1], "Surface 1 was allocated.\n");
@@ -2863,19 +2863,19 @@ static void test_allocate_surface_helper(void) info.dwFlags = VMR9AllocFlag_3DRenderTarget; count = 1; hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, surfaces); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); ok(!!surfaces[0], "Surface 0 was not allocated.\n"); ok(info.Format != 0, "Expected a format.\n");
hr = IDirect3DSurface9_GetDesc(surfaces[0], &desc); - ok(hr == D3D_OK, "Got hr %#x.\n", hr); + ok(hr == D3D_OK, "Got hr %#lx.\n", hr); ok(desc.Format == info.Format, "Expected format %#x, got %#x.\n", info.Format, desc.Format); ok(desc.Type == D3DRTYPE_SURFACE, "Got type %u.\n", desc.Type); - ok(desc.Usage == D3DUSAGE_RENDERTARGET, "Got usage %#x.\n", desc.Usage); + ok(desc.Usage == D3DUSAGE_RENDERTARGET, "Got usage %#lx.\n", desc.Usage); ok(desc.Pool == D3DPOOL_DEFAULT, "Got pool %u.\n", desc.Pool); ok(desc.MultiSampleType == D3DMULTISAMPLE_NONE, "Got multisample type %u.\n", desc.MultiSampleType); - ok(!desc.MultiSampleQuality, "Got multisample quality %u.\n", desc.MultiSampleQuality); + ok(!desc.MultiSampleQuality, "Got multisample quality %lu.\n", desc.MultiSampleQuality); ok(desc.Width == 32, "Got width %u.\n", desc.Width); ok(desc.Height == 16, "Got height %u.\n", desc.Height);
@@ -2885,15 +2885,15 @@ static void test_allocate_surface_helper(void) info.dwFlags = VMR9AllocFlag_OffscreenSurface | VMR9AllocFlag_TextureSurface; count = 1; hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(notify, &info, &count, surfaces); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count);
out: IVMRSurfaceAllocatorNotify9_Release(notify); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IDirect3DDevice9_Release(device); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); DestroyWindow(window); }
@@ -2936,14 +2936,14 @@ static ULONG WINAPI presenter_Release(IVMRImagePresenter9 *iface) static HRESULT WINAPI presenter_StartPresenting(IVMRImagePresenter9 *iface, DWORD_PTR cookie) { if (winetest_debug > 1) trace("StartPresenting()\n"); - ok(cookie == 0xabacab, "Got cookie %#lx.\n", cookie); + ok(cookie == 0xabacab, "Got cookie %#Ix.\n", cookie); return E_NOTIMPL; }
static HRESULT WINAPI presenter_StopPresenting(IVMRImagePresenter9 *iface, DWORD_PTR cookie) { if (winetest_debug > 1) trace("StopPresenting()\n"); - ok(cookie == 0xabacab, "Got cookie %#lx.\n", cookie); + ok(cookie == 0xabacab, "Got cookie %#Ix.\n", cookie); return E_NOTIMPL; }
@@ -2953,16 +2953,16 @@ static HRESULT WINAPI presenter_PresentImage(IVMRImagePresenter9 *iface, DWORD_P static const RECT rect;
if (winetest_debug > 1) trace("PresentImage()\n"); - ok(cookie == 0xabacab, "Got cookie %#lx.\n", cookie); - todo_wine ok(info->dwFlags == VMR9Sample_TimeValid, "Got flags %#x.\n", info->dwFlags); + ok(cookie == 0xabacab, "Got cookie %#Ix.\n", cookie); + todo_wine ok(info->dwFlags == VMR9Sample_TimeValid, "Got flags %#lx.\n", info->dwFlags); ok(!info->rtStart, "Got start time %s.\n", wine_dbgstr_longlong(info->rtStart)); ok(info->rtEnd == 10000000, "Got end time %s.\n", wine_dbgstr_longlong(info->rtEnd)); - todo_wine ok(info->szAspectRatio.cx == 120, "Got aspect ratio width %d.\n", info->szAspectRatio.cx); - todo_wine ok(info->szAspectRatio.cy == 60, "Got aspect ratio height %d.\n", info->szAspectRatio.cy); + todo_wine ok(info->szAspectRatio.cx == 120, "Got aspect ratio width %ld.\n", info->szAspectRatio.cx); + todo_wine ok(info->szAspectRatio.cy == 60, "Got aspect ratio height %ld.\n", info->szAspectRatio.cy); ok(EqualRect(&info->rcSrc, &rect), "Got source rect %s.\n", wine_dbgstr_rect(&info->rcSrc)); ok(EqualRect(&info->rcDst, &rect), "Got dest rect %s.\n", wine_dbgstr_rect(&info->rcDst)); - ok(!info->dwReserved1, "Got dwReserved1 %#x.\n", info->dwReserved1); - ok(!info->dwReserved2, "Got dwReserved2 %#x.\n", info->dwReserved2); + ok(!info->dwReserved1, "Got dwReserved1 %#lx.\n", info->dwReserved1); + ok(!info->dwReserved2, "Got dwReserved2 %#lx.\n", info->dwReserved2);
++presenter->got_PresentImage; return S_OK; @@ -3017,18 +3017,18 @@ static HRESULT WINAPI allocator_InitializeDevice(IVMRSurfaceAllocator9 *iface, { struct presenter *presenter = impl_from_IVMRSurfaceAllocator9(iface);
- if (winetest_debug > 1) trace("InitializeDevice(flags %#x, format %u)\n", + if (winetest_debug > 1) trace("InitializeDevice(flags %#lx, format %u)\n", info->dwFlags, info->Format); - ok(cookie == 0xabacab, "Got cookie %#lx.\n", cookie); - ok(info->dwWidth == 32, "Got width %u.\n", info->dwWidth); - ok(info->dwHeight == 16, "Got height %u.\n", info->dwHeight); - todo_wine ok(info->MinBuffers == 5, "Got buffer count %u.\n", info->MinBuffers); + ok(cookie == 0xabacab, "Got cookie %#Ix.\n", cookie); + ok(info->dwWidth == 32, "Got width %lu.\n", info->dwWidth); + ok(info->dwHeight == 16, "Got height %lu.\n", info->dwHeight); + todo_wine ok(info->MinBuffers == 5, "Got buffer count %lu.\n", info->MinBuffers); ok(info->Pool == D3DPOOL_DEFAULT, "Got pool %u\n", info->Pool); - todo_wine ok(info->szAspectRatio.cx == 120, "Got aspect ratio width %d.\n", info->szAspectRatio.cx); - todo_wine ok(info->szAspectRatio.cy == 60, "Got aspect ratio height %d.\n", info->szAspectRatio.cy); - ok(info->szNativeSize.cx == 32, "Got native width %d.\n", info->szNativeSize.cx); - ok(info->szNativeSize.cy == 16, "Got native height %d.\n", info->szNativeSize.cy); - todo_wine ok(*buffer_count == 5, "Got buffer count %u.\n", *buffer_count); + todo_wine ok(info->szAspectRatio.cx == 120, "Got aspect ratio width %ld.\n", info->szAspectRatio.cx); + todo_wine ok(info->szAspectRatio.cy == 60, "Got aspect ratio height %ld.\n", info->szAspectRatio.cy); + ok(info->szNativeSize.cx == 32, "Got native width %ld.\n", info->szNativeSize.cx); + ok(info->szNativeSize.cy == 16, "Got native height %ld.\n", info->szNativeSize.cy); + todo_wine ok(*buffer_count == 5, "Got buffer count %lu.\n", *buffer_count);
presenter->format = info->Format;
@@ -3043,7 +3043,7 @@ static HRESULT WINAPI allocator_TerminateDevice(IVMRSurfaceAllocator9 *iface, DW struct presenter *presenter = impl_from_IVMRSurfaceAllocator9(iface);
if (winetest_debug > 1) trace("TerminateDevice()\n"); - ok(cookie == 0xabacab, "Got cookie %#lx.\n", cookie); + ok(cookie == 0xabacab, "Got cookie %#Ix.\n", cookie); /* Don't dereference the surfaces here, to mimic How to Survive. */ ++presenter->got_TerminateDevice; return E_NOTIMPL; @@ -3054,10 +3054,10 @@ static HRESULT WINAPI allocator_GetSurface(IVMRSurfaceAllocator9 *iface, { struct presenter *presenter = impl_from_IVMRSurfaceAllocator9(iface);
- if (winetest_debug > 1) trace("GetSurface(index %u)\n", index); - ok(cookie == 0xabacab, "Got cookie %#lx.\n", cookie); - ok(!flags, "Got flags %#x.\n", flags); - ok(index < 5, "Got index %u.\n", index); + if (winetest_debug > 1) trace("GetSurface(index %lu)\n", index); + ok(cookie == 0xabacab, "Got cookie %#Ix.\n", cookie); + ok(!flags, "Got flags %#lx.\n", flags); + ok(index < 5, "Got index %lu.\n", index);
/* Don't reference the surface here, to mimic How to Survive. */ *surface = presenter->surfaces[index]; @@ -3094,10 +3094,10 @@ static void test_renderless_present(struct presenter *presenter, presenter->got_PresentImage = 0;
hr = IMediaControl_Pause(control); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); thread = send_frame(input); hr = IMediaControl_GetState(control, 1000, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); /* Atelier Sophie uses the VMR in renderless mode, calls * IMediaControl::Run() from a stopped state and expects that * IMediaControl::GetState() returns S_OK only after PresentImage() has @@ -3105,13 +3105,13 @@ static void test_renderless_present(struct presenter *presenter, ok(presenter->got_PresentImage == 1, "Got %u calls to PresentImage().\n", presenter->got_PresentImage);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = join_thread(thread); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(presenter->got_PresentImage == 1, "Got %u calls to PresentImage().\n", presenter->got_PresentImage);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IMediaControl_Release(control); } @@ -3200,11 +3200,11 @@ static void test_renderless_formats(void) win_skip("Direct3D does not support video rendering.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRSurfaceAllocatorNotify9_AdviseSurfaceAllocator(notify, 0xabacab, &presenter.IVMRSurfaceAllocator9_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
presenter.notify = notify;
@@ -3226,14 +3226,14 @@ static void test_renderless_formats(void) * IMemAllocator::SetProperties(), so let that fail here for now. */ if (hr != S_OK) { - skip("Format %u (%#x), flags %#x are not supported, hr %#x.\n", + skip("Format %u (%#x), flags %#lx are not supported, hr %#lx.\n", tests[i].format, tests[i].format, tests[i].flags, hr); continue; } - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - todo_wine ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + todo_wine ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr); if (hr != S_OK) { test_allocator(input); @@ -3243,22 +3243,22 @@ static void test_renderless_formats(void) hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); if (hr != S_OK) { - skip("Format %u (%#x), flags %#x are not supported, hr %#x.\n", + skip("Format %u (%#x), flags %#lx are not supported, hr %#lx.\n", tests[i].format, tests[i].format, tests[i].flags, hr); IMemAllocator_Release(allocator); hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr); continue; } ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr);
hr = IVMRSurfaceAllocatorNotify9_AdviseSurfaceAllocator(notify, 0xabacab, &presenter2.IVMRSurfaceAllocator9_iface); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
ok(presenter.format == tests[i].format, "Test %u: Got format %u (%#x).\n", i, presenter.format, presenter.format); @@ -3266,31 +3266,31 @@ static void test_renderless_formats(void) test_renderless_present(&presenter, graph, input);
hr = IMemAllocator_Decommit(allocator); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr); IMemAllocator_Release(allocator);
hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Test %u: Got hr %#x.\n", i, hr); + ok(hr == S_OK, "Test %u: Got hr %#lx.\n", i, hr); }
hr = IVMRSurfaceAllocatorNotify9_AdviseSurfaceAllocator(notify, 0xabacab, &presenter2.IVMRSurfaceAllocator9_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMemInputPin_Release(input); IPin_Release(pin);
out: IVMRSurfaceAllocatorNotify9_Release(notify); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); - ok(presenter.refcount == 1, "Got outstanding refcount %d.\n", presenter.refcount); - ok(presenter2.refcount == 1, "Got outstanding refcount %d.\n", presenter2.refcount); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ok(presenter.refcount == 1, "Got outstanding refcount %ld.\n", presenter.refcount); + ok(presenter2.refcount == 1, "Got outstanding refcount %ld.\n", presenter2.refcount); ref = IDirect3DDevice9_Release(device); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); DestroyWindow(window); }
@@ -3320,32 +3320,32 @@ static void test_mixing_mode(void) IBaseFilter_QueryInterface(filter, &IID_IVMRFilterConfig9, (void **)&config);
hr = IBaseFilter_QueryInterface(filter, &IID_IVMRMixerControl9, (void **)&mixer_control); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count); - ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_VMR_NOT_IN_MIXER_MODE, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_SetNumberOfStreams(config, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(stream_count == 1, "Got %u streams.\n", stream_count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(stream_count == 1, "Got %lu streams.\n", stream_count);
hr = IBaseFilter_QueryInterface(filter, &IID_IVMRMixerControl9, (void **)&mixer_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IVMRMixerControl9_Release(mixer_control);
hr = IVMRFilterConfig9_SetNumberOfStreams(config, 2); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(stream_count == 1, "Got %u streams.\n", stream_count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(stream_count == 1, "Got %lu streams.\n", stream_count);
IVMRFilterConfig9_Release(config); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
filter = create_vmr9(VMR9Mode_Windowless); @@ -3355,27 +3355,27 @@ static void test_mixing_mode(void) window = CreateWindowA("static", "quartz_test", WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0); ok(!!window, "Failed to create a window.\n"); hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control, window); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(stream_count == 4, "Got %u streams.\n", stream_count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(stream_count == 4, "Got %lu streams.\n", stream_count);
hr = IBaseFilter_QueryInterface(filter, &IID_IVMRMixerControl9, (void **)&mixer_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IVMRMixerControl9_Release(mixer_control);
hr = IVMRFilterConfig9_SetNumberOfStreams(config, 2); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IVMRFilterConfig9_GetNumberOfStreams(config, &stream_count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(stream_count == 4, "Got %u streams.\n", stream_count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(stream_count == 4, "Got %lu streams.\n", stream_count);
IVMRWindowlessControl9_Release(windowless_control); IVMRFilterConfig9_Release(config); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); DestroyWindow(window); }
@@ -3414,30 +3414,30 @@ static void test_clipping_window(void) ok(!!window, "Failed to create a window.\n");
hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control, (HWND)0xdeadbeef); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control, window); - ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control, window); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IPin_Release(pin); IVMRWindowlessControl9_Release(windowless_control); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); DestroyWindow(window); }
@@ -3460,16 +3460,16 @@ static void test_surface_allocator_notify_refcount(void)
hr = IVMRSurfaceAllocatorNotify9_AdviseSurfaceAllocator(notify, 0xabacab, &presenter.IVMRSurfaceAllocator9_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ok(presenter.got_TerminateDevice == 1, "Got %u calls to TerminateDevice().\n", presenter.got_TerminateDevice); - ok(presenter.refcount == 1, "Got outstanding refcount %d.\n", presenter.refcount); + ok(presenter.refcount == 1, "Got outstanding refcount %ld.\n", presenter.refcount);
ref = IVMRSurfaceAllocatorNotify9_Release(notify); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void check_source_position_(int line, IBasicVideo *video, @@ -3480,31 +3480,31 @@ static void check_source_position_(int line, IBasicVideo *video,
left = top = width = height = 0xdeadbeef; hr = IBasicVideo_GetSourcePosition(video, &left, &top, &width, &height); - ok_(__FILE__,line)(hr == S_OK, "Got hr %#x.\n", hr); - ok_(__FILE__,line)(left == expect_left, "Got left %d.\n", left); - ok_(__FILE__,line)(top == expect_top, "Got top %d.\n", top); - ok_(__FILE__,line)(width == expect_width, "Got width %d.\n", width); - ok_(__FILE__,line)(height == expect_height, "Got height %d.\n", height); + ok_(__FILE__,line)(hr == S_OK, "Got hr %#lx.\n", hr); + ok_(__FILE__,line)(left == expect_left, "Got left %ld.\n", left); + ok_(__FILE__,line)(top == expect_top, "Got top %ld.\n", top); + ok_(__FILE__,line)(width == expect_width, "Got width %ld.\n", width); + ok_(__FILE__,line)(height == expect_height, "Got height %ld.\n", height);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceLeft(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#x.\n", hr); - ok_(__FILE__,line)(l == left, "Got left %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == left, "Got left %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceTop(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#x.\n", hr); - ok_(__FILE__,line)(l == top, "Got top %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == top, "Got top %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceWidth(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#x.\n", hr); - ok_(__FILE__,line)(l == width, "Got width %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == width, "Got width %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_SourceHeight(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#x.\n", hr); - ok_(__FILE__,line)(l == height, "Got height %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == height, "Got height %ld.\n", l); } #define check_source_position(a,b,c,d,e) check_source_position_(__LINE__,a,b,c,d,e)
@@ -3514,77 +3514,77 @@ static void test_basic_video_source(IBasicVideo *video)
check_source_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceLeft(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceLeft(video, 10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceTop(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceTop(video, 10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceWidth(video, -500); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceWidth(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceWidth(video, 700); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceWidth(video, 500); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 500, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceHeight(video, -300); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceHeight(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceHeight(video, 600); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceHeight(video, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 500, 300); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceLeft(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceLeft(video, 10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 10, 0, 500, 300); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_SourceTop(video, -10); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_SourceTop(video, 20); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 10, 20, 500, 300); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetSourcePosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 4, 5, 60, 40); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetSourcePosition(video, 0, 0, 600, 400); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetSourcePosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IBasicVideo_SetDefaultSourcePosition(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_source_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultSource(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); }
static void check_destination_position_(int line, IBasicVideo *video, @@ -3595,31 +3595,31 @@ static void check_destination_position_(int line, IBasicVideo *video,
left = top = width = height = 0xdeadbeef; hr = IBasicVideo_GetDestinationPosition(video, &left, &top, &width, &height); - ok_(__FILE__,line)(hr == S_OK, "Failed to get position, hr %#x.\n", hr); - ok_(__FILE__,line)(left == expect_left, "Got left %d.\n", left); - ok_(__FILE__,line)(top == expect_top, "Got top %d.\n", top); - ok_(__FILE__,line)(width == expect_width, "Got width %d.\n", width); - ok_(__FILE__,line)(height == expect_height, "Got height %d.\n", height); + ok_(__FILE__,line)(hr == S_OK, "Failed to get position, hr %#lx.\n", hr); + ok_(__FILE__,line)(left == expect_left, "Got left %ld.\n", left); + ok_(__FILE__,line)(top == expect_top, "Got top %ld.\n", top); + ok_(__FILE__,line)(width == expect_width, "Got width %ld.\n", width); + ok_(__FILE__,line)(height == expect_height, "Got height %ld.\n", height);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationLeft(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#x.\n", hr); - ok_(__FILE__,line)(l == left, "Got left %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get left, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == left, "Got left %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationTop(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#x.\n", hr); - ok_(__FILE__,line)(l == top, "Got top %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get top, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == top, "Got top %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationWidth(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#x.\n", hr); - ok_(__FILE__,line)(l == width, "Got width %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get width, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == width, "Got width %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_DestinationHeight(video, &l); - ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#x.\n", hr); - ok_(__FILE__,line)(l == height, "Got height %d.\n", l); + ok_(__FILE__,line)(hr == S_OK, "Failed to get height, hr %#lx.\n", hr); + ok_(__FILE__,line)(l == height, "Got height %ld.\n", l); } #define check_destination_position(a,b,c,d,e) check_destination_position_(__LINE__,a,b,c,d,e)
@@ -3633,107 +3633,107 @@ static void test_basic_video_destination(IBasicVideo *video)
check_destination_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationLeft(video, -10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, -10, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationLeft(video, 10); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationTop(video, -20); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, -20, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationTop(video, 20); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationWidth(video, -700); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationWidth(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationWidth(video, 700); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 700, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationWidth(video, 500); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 500, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationHeight(video, -500); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationHeight(video, 0); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IBasicVideo_put_DestinationHeight(video, 500); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 500, 500); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_put_DestinationHeight(video, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 10, 20, 500, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 4, 5, 60, 40); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 0, 0, 600, 400); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 4, 5, 60, 40); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IBasicVideo_SetDefaultDestinationPosition(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 600, 400); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
SetRect(&rect, 100, 200, 500, 500); AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); hr = IVideoWindow_SetWindowPosition(window, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 400, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBasicVideo_SetDestinationPosition(video, 0, 0, 400, 300); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 400, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
SetRect(&rect, 100, 200, 600, 600); AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE); hr = IVideoWindow_SetWindowPosition(window, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); check_destination_position(video, 0, 0, 400, 300); hr = IBasicVideo_IsUsingDefaultDestination(video); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IVideoWindow_Release(window); } @@ -3782,83 +3782,83 @@ static void test_basic_video(void) IPin_QueryInterface(pin, &IID_IMemInputPin, (void **)&input);
hr = IBasicVideo_GetTypeInfoCount(video, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(count == 1, "Got count %u.\n", count);
hr = IBasicVideo_GetTypeInfo(video, 0, 0, &typeinfo); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = ITypeInfo_GetTypeAttr(typeinfo, &typeattr); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(typeattr->typekind == TKIND_DISPATCH, "Got kind %u.\n", typeattr->typekind); ok(IsEqualGUID(&typeattr->guid, &IID_IBasicVideo), "Got IID %s.\n", wine_dbgstr_guid(&typeattr->guid)); ITypeInfo_ReleaseTypeAttr(typeinfo, typeattr); ITypeInfo_Release(typeinfo);
hr = IBasicVideo_get_AvgTimePerFrame(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_BitRate(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_BitRate(video, &l); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_BitErrorRate(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_BitErrorRate(video, &l); - ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_VideoWidth(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_VideoHeight(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_SourceLeft(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_SourceWidth(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_SourceTop(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_SourceHeight(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_get_DestinationLeft(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_DestinationWidth(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_DestinationTop(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_get_DestinationHeight(video, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetSourcePosition(video, NULL, &top, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetSourcePosition(video, &left, NULL, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetSourcePosition(video, &left, &top, NULL, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetSourcePosition(video, &left, &top, &width, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetDestinationPosition(video, NULL, &top, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetDestinationPosition(video, &left, NULL, &width, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetDestinationPosition(video, &left, &top, NULL, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetDestinationPosition(video, &left, &top, &width, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetVideoSize(video, &width, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetVideoSize(video, NULL, &height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, NULL, &l); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, &l, NULL); - todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#lx.\n", hr);
testfilter_init(&source); IFilterGraph2_AddFilter(graph, &source.filter.IBaseFilter_iface, L"vmr9"); @@ -3869,66 +3869,66 @@ static void test_basic_video(void) skip("Got E_FAIL when connecting.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator); }
reftime = 0.0; hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(compare_double(reftime, 0.02, 1 << 28), "Got frame rate %.16e.\n", reftime);
l = 0xdeadbeef; hr = IBasicVideo_get_BitRate(video, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!l, "Got bit rate %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!l, "Got bit rate %ld.\n", l);
l = 0xdeadbeef; hr = IBasicVideo_get_BitErrorRate(video, &l); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(!l, "Got bit rate %d.\n", l); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(!l, "Got bit rate %ld.\n", l);
hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, &l, NULL); - todo_wine ok(hr == VFW_E_NO_PALETTE_AVAILABLE, "Got hr %#x.\n", hr); + todo_wine ok(hr == VFW_E_NO_PALETTE_AVAILABLE, "Got hr %#lx.\n", hr);
width = height = 0xdeadbeef; hr = IBasicVideo_GetVideoSize(video, &width, &height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 600, "Got width %d.\n", width); - ok(height == 400, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 600, "Got width %ld.\n", width); + ok(height == 400, "Got height %ld.\n", height);
test_basic_video_source(video); test_basic_video_destination(video);
hr = IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IFilterGraph2_Disconnect(graph, pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
vih.bmiHeader.biWidth = 16; vih.bmiHeader.biHeight = 16; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMemInputPin_GetAllocator(input, &allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); hr = IMemAllocator_Commit(allocator); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IMemAllocator_Release(allocator); }
@@ -3941,14 +3941,14 @@ static void test_basic_video(void)
out: ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IBasicVideo_Release(video); IMemInputPin_Release(input); IPin_Release(pin); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(&source.filter.IBaseFilter_iface); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_windowless_size(void) @@ -3996,12 +3996,12 @@ static void test_windowless_size(void) ok(!!window, "Failed to create a window.\n");
hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control, window); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMemInputPin_GetAllocator(input, &allocator); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); if (hr == S_OK) { hr = IMemAllocator_SetProperties(allocator, &req_props, &ret_props); @@ -4011,57 +4011,57 @@ static void test_windowless_size(void) skip("Got E_FAIL when setting allocator properties.\n"); goto out; } - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!memcmp(&ret_props, &req_props, sizeof(req_props)), "Properties did not match.\n"); }
hr = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control, NULL, &height, &aspect_width, &aspect_height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control, &width, NULL, &aspect_width, &aspect_height); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
aspect_mode = 0xdeadbeef; hr = IVMRWindowlessControl9_GetAspectRatioMode(windowless_control, &aspect_mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(aspect_mode == VMR9ARMode_None, "Got mode %u.\n", aspect_mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(aspect_mode == VMR9ARMode_None, "Got mode %lu.\n", aspect_mode);
aspect_mode = 0xdeadbeef; hr = IVMRAspectRatioControl9_GetAspectRatioMode(aspect_ratio_control, &aspect_mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(aspect_mode == VMR9ARMode_None, "Got mode %u.\n", aspect_mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(aspect_mode == VMR9ARMode_None, "Got mode %lu.\n", aspect_mode);
width = height = 0xdeadbeef; hr = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control, &width, &height, NULL, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(width == 32, "Got width %d.\n", width); - ok(height == 16, "Got height %d.\n", height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(width == 32, "Got width %ld.\n", width); + ok(height == 16, "Got height %ld.\n", height);
aspect_width = aspect_height = 0xdeadbeef; hr = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control, &width, &height, &aspect_width, &aspect_height); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(aspect_width == 32, "Got width %d.\n", aspect_width); - ok(aspect_height == 16, "Got height %d.\n", aspect_height); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(aspect_width == 32, "Got width %ld.\n", aspect_width); + ok(aspect_height == 16, "Got height %ld.\n", aspect_height);
memset(&src, 0xcc, sizeof(src)); hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &src, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 0, 0, 32, 16); ok(EqualRect(&src, &expect), "Got source rect %s.\n", wine_dbgstr_rect(&src));
memset(&dst, 0xcc, sizeof(dst)); hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, NULL, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 0, 0, 0, 0); ok(EqualRect(&dst, &expect), "Got dest rect %s.\n", wine_dbgstr_rect(&dst));
SetRect(&src, 4, 6, 16, 12); hr = IVMRWindowlessControl9_SetVideoPosition(windowless_control, &src, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&src, 0xcc, sizeof(src)); memset(&dst, 0xcc, sizeof(dst)); hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &src, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 4, 6, 16, 12); ok(EqualRect(&src, &expect), "Got source rect %s.\n", wine_dbgstr_rect(&src)); SetRect(&expect, 0, 0, 0, 0); @@ -4069,12 +4069,12 @@ static void test_windowless_size(void)
SetRect(&dst, 40, 60, 120, 160); hr = IVMRWindowlessControl9_SetVideoPosition(windowless_control, NULL, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&src, 0xcc, sizeof(src)); memset(&dst, 0xcc, sizeof(dst)); hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &src, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 4, 6, 16, 12); ok(EqualRect(&src, &expect), "Got source rect %s.\n", wine_dbgstr_rect(&src)); SetRect(&expect, 40, 60, 120, 160); @@ -4085,28 +4085,28 @@ static void test_windowless_size(void) ok(EqualRect(&src, &expect), "Got window rect %s.\n", wine_dbgstr_rect(&src));
hr = IVMRAspectRatioControl9_SetAspectRatioMode(aspect_ratio_control, VMR9ARMode_LetterBox); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
aspect_mode = 0xdeadbeef; hr = IVMRWindowlessControl9_GetAspectRatioMode(windowless_control, &aspect_mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(aspect_mode == VMR9ARMode_LetterBox, "Got mode %u.\n", aspect_mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(aspect_mode == VMR9ARMode_LetterBox, "Got mode %lu.\n", aspect_mode);
hr = IVMRWindowlessControl9_SetAspectRatioMode(windowless_control, VMR9ARMode_None); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
aspect_mode = 0xdeadbeef; hr = IVMRAspectRatioControl9_GetAspectRatioMode(aspect_ratio_control, &aspect_mode); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(aspect_mode == VMR9ARMode_None, "Got mode %u.\n", aspect_mode); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(aspect_mode == VMR9ARMode_None, "Got mode %lu.\n", aspect_mode);
hr = IVMRWindowlessControl9_SetAspectRatioMode(windowless_control, VMR9ARMode_LetterBox); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&src, 0xcc, sizeof(src)); memset(&dst, 0xcc, sizeof(dst)); hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &src, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 4, 6, 16, 12); ok(EqualRect(&src, &expect), "Got source rect %s.\n", wine_dbgstr_rect(&src)); SetRect(&expect, 40, 60, 120, 160); @@ -4115,12 +4115,12 @@ static void test_windowless_size(void) SetRect(&src, 0, 0, 32, 16); SetRect(&dst, 0, 0, 640, 480); hr = IVMRWindowlessControl9_SetVideoPosition(windowless_control, &src, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
memset(&src, 0xcc, sizeof(src)); memset(&dst, 0xcc, sizeof(dst)); hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &src, &dst); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); SetRect(&expect, 0, 0, 32, 16); ok(EqualRect(&src, &expect), "Got source rect %s.\n", wine_dbgstr_rect(&src)); SetRect(&expect, 0, 0, 640, 480); @@ -4128,13 +4128,13 @@ static void test_windowless_size(void)
out: ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); IMemInputPin_Release(input); IPin_Release(pin); IVMRWindowlessControl9_Release(windowless_control); IVMRAspectRatioControl9_Release(aspect_ratio_control); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); DestroyWindow(window); }
@@ -4149,25 +4149,25 @@ static void test_mixing_prefs(void) set_mixing_mode(filter, 1);
hr = IBaseFilter_QueryInterface(filter, &IID_IVMRMixerControl9, (void **)&mixer_control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRMixerControl9_GetMixingPrefs(mixer_control, &flags); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(flags == (MixerPref9_NoDecimation | MixerPref9_ARAdjustXorY | MixerPref9_BiLinearFiltering - | MixerPref9_RenderTargetRGB), "Got flags %#x.\n", flags); + | MixerPref9_RenderTargetRGB), "Got flags %#lx.\n", flags);
hr = IVMRMixerControl9_SetMixingPrefs(mixer_control, MixerPref9_NoDecimation | MixerPref9_ARAdjustXorY | MixerPref9_PointFiltering | MixerPref9_RenderTargetRGB); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IVMRMixerControl9_GetMixingPrefs(mixer_control, &flags); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(flags == (MixerPref9_NoDecimation | MixerPref9_ARAdjustXorY | MixerPref9_PointFiltering - | MixerPref9_RenderTargetRGB), "Got flags %#x.\n", flags); + | MixerPref9_RenderTargetRGB), "Got flags %#lx.\n", flags);
IVMRMixerControl9_Release(mixer_control); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_unconnected_eos(void) @@ -4181,49 +4181,49 @@ static void test_unconnected_eos(void) ULONG ref;
hr = IFilterGraph2_AddFilter(graph, filter, L"renderer"); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (void **)&control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Pause(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Stop(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(!ret, "Got %u EC_COMPLETE events.\n", ret);
hr = IMediaControl_Run(control); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
ret = check_ec_complete(eventsrc, 0); ok(ret == 1, "Got %u EC_COMPLETE events.\n", ret); @@ -4231,9 +4231,9 @@ static void test_unconnected_eos(void) IMediaControl_Release(control); IMediaEvent_Release(eventsrc); ref = IFilterGraph2_Release(graph); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
START_TEST(vmr9) @@ -4246,7 +4246,7 @@ START_TEST(vmr9) if (FAILED(hr = CoCreateInstance(&CLSID_VideoMixingRenderer9, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter))) { - skip("Failed to create VMR9, hr %#x.\n", hr); + skip("Failed to create VMR9, hr %#lx.\n", hr); return; } IBaseFilter_Release(filter); diff --git a/dlls/quartz/tests/waveparser.c b/dlls/quartz/tests/waveparser.c index fee93b33f5f..1c86a39c730 100644 --- a/dlls/quartz/tests/waveparser.c +++ b/dlls/quartz/tests/waveparser.c @@ -30,7 +30,7 @@ static IBaseFilter *create_wave_parser(void) IBaseFilter *filter = NULL; HRESULT hr = CoCreateInstance(&CLSID_WAVEParser, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); return filter; }
@@ -46,11 +46,11 @@ static WCHAR *load_resource(const WCHAR *name) wcscat(pathW, name);
file = CreateFileW(pathW, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); - ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %u.\n", + ok(file != INVALID_HANDLE_VALUE, "Failed to create file %s, error %lu.\n", wine_dbgstr_w(pathW), GetLastError());
res = FindResourceW(NULL, name, (LPCWSTR)RT_RCDATA); - ok(!!res, "Failed to load resource, error %u.\n", GetLastError()); + ok(!!res, "Failed to load resource, error %lu.\n", GetLastError()); ptr = LockResource(LoadResource(GetModuleHandleA(NULL), res)); WriteFile(file, ptr, SizeofResource( GetModuleHandleA(NULL), res), &written, NULL); ok(written == SizeofResource(GetModuleHandleA(NULL), res), "Failed to write resource.\n"); @@ -88,7 +88,7 @@ static IFilterGraph2 *connect_input(IBaseFilter *splitter, const WCHAR *filename IBaseFilter_FindPin(reader, L"Output", &source);
hr = IFilterGraph2_ConnectDirect(graph, source, sink, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
IPin_Release(source); IPin_Release(sink); @@ -107,7 +107,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); } @@ -212,53 +212,53 @@ static void test_aggregation(void) filter = (IBaseFilter *)0xdeadbeef; hr = CoCreateInstance(&CLSID_WAVEParser, &test_outer, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (void **)&filter); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!filter, "Got interface %p.\n", filter);
hr = CoCreateInstance(&CLSID_WAVEParser, &test_outer, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); ok(unk != &test_outer, "Returned IUnknown should not be outer IUnknown.\n"); ref = get_refcount(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
ref = IUnknown_AddRef(unk); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
ref = IUnknown_Release(unk); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref);
hr = IUnknown_QueryInterface(unk, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == unk, "Got unexpected IUnknown %p.\n", unk2); IUnknown_Release(unk2);
hr = IUnknown_QueryInterface(unk, &IID_IBaseFilter, (void **)&filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_QueryInterface(filter, &IID_IUnknown, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &IID_IBaseFilter, (void **)&filter2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(filter2 == (IBaseFilter *)0xdeadbeef, "Got unexpected IBaseFilter %p.\n", filter2);
hr = IUnknown_QueryInterface(unk, &test_iid, (void **)&unk2); - ok(hr == E_NOINTERFACE, "Got hr %#x.\n", hr); + ok(hr == E_NOINTERFACE, "Got hr %#lx.\n", hr); ok(!unk2, "Got unexpected IUnknown %p.\n", unk2);
hr = IBaseFilter_QueryInterface(filter, &test_iid, (void **)&unk2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(unk2 == (IUnknown *)0xdeadbeef, "Got unexpected IUnknown %p.\n", unk2);
IBaseFilter_Release(filter); ref = IUnknown_Release(unk); - ok(!ref, "Got unexpected refcount %d.\n", ref); - ok(outer_ref == 1, "Got unexpected refcount %d.\n", outer_ref); + ok(!ref, "Got unexpected refcount %ld.\n", ref); + ok(outer_ref == 1, "Got unexpected refcount %ld.\n", outer_ref); }
static void test_enum_pins(void) @@ -273,79 +273,79 @@ static void test_enum_pins(void) BOOL ret;
ref = get_refcount(filter); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IBaseFilter_EnumPins(filter, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IBaseFilter_EnumPins(filter, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, NULL, NULL); - ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pins[0]); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(enum1); - ok(ref == 1, "Got unexpected refcount %d.\n", ref); + ok(ref == 1, "Got unexpected refcount %ld.\n", ref); IPin_Release(pins[0]); ref = get_refcount(filter); - ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ok(ref == 2, "Got unexpected refcount %ld.\n", ref);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, NULL); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); IPin_Release(pins[0]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum2, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
IEnumPins_Release(enum2); @@ -353,46 +353,46 @@ static void test_enum_pins(void) graph = connect_input(filter, filename);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pins[0]);
hr = IEnumPins_Next(enum1, 1, pins, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 2, pins, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
hr = IEnumPins_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum1, 3, pins, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 2, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 2, "Got count %lu.\n", count); IPin_Release(pins[0]); IPin_Release(pins[1]);
IEnumPins_Release(enum1); IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_find_pin(void) @@ -407,31 +407,31 @@ static void test_find_pin(void) BOOL ret;
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"output", &pin); - ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#lx.\n", hr);
graph = connect_input(filter, filename);
hr = IBaseFilter_EnumPins(filter, &enum_pins); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"output", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin); IPin_Release(pin); IPin_Release(pin2);
hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(pin == pin2, "Expected pin %p, got %p.\n", pin2, pin); IPin_Release(pin); IPin_Release(pin2); @@ -439,9 +439,9 @@ static void test_find_pin(void) IEnumPins_Release(enum_pins); IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_pin_info(void) @@ -460,52 +460,52 @@ static void test_pin_info(void) graph = connect_input(filter, filename);
hr = IBaseFilter_FindPin(filter, L"input pin", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); expect_ref = get_refcount(filter); ref = get_refcount(pin); - ok(ref == expect_ref, "Got unexpected refcount %d.\n", ref); + ok(ref == expect_ref, "Got unexpected refcount %ld.\n", ref);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"input pin"), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref); + ok(ref == expect_ref + 1, "Got unexpected refcount %ld.\n", ref); ref = get_refcount(pin); - ok(ref == expect_ref + 1, "Got unexpected refcount %d.\n", ref); + ok(ref == expect_ref + 1, "Got unexpected refcount %ld.\n", ref); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"input pin"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
IPin_Release(pin);
hr = IBaseFilter_FindPin(filter, L"output", &pin); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_interface(pin, &IID_IPin, TRUE); check_interface(pin, &IID_IMediaSeeking, TRUE);
hr = IPin_QueryPinInfo(pin, &info); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); ok(!wcscmp(info.achName, L"output"), "Got name %s.\n", wine_dbgstr_w(info.achName)); IBaseFilter_Release(info.pFilter);
hr = IPin_QueryDirection(pin, &dir); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir);
hr = IPin_QueryId(pin, &id); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!wcscmp(id, L"output"), "Got id %s.\n", wine_dbgstr_w(id)); CoTaskMemFree(id);
@@ -513,9 +513,9 @@ static void test_pin_info(void)
IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_media_types(void) @@ -536,42 +536,42 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"input pin", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt);
mt.majortype = MEDIATYPE_Stream; mt.subtype = MEDIASUBTYPE_WAVE; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.bFixedSizeSamples = TRUE; mt.bTemporalCompression = TRUE; mt.lSampleSize = 123; mt.formattype = FORMAT_VideoInfo; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
mt.majortype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.majortype = MEDIATYPE_Stream;
mt.subtype = GUID_NULL; hr = IPin_QueryAccept(pin, &mt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); mt.subtype = MEDIASUBTYPE_WAVE;
graph = connect_input(filter, filename);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin); @@ -579,48 +579,48 @@ static void test_media_types(void) IBaseFilter_FindPin(filter, L"output", &pin);
hr = IPin_EnumMediaTypes(pin, &enummt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&pmt->majortype, &MEDIATYPE_Audio), "Got major type %s.\n", wine_dbgstr_guid(&pmt->majortype)); ok(IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_PCM), "Got subtype %s\n", wine_dbgstr_guid(&pmt->subtype)); ok(pmt->bFixedSizeSamples == TRUE, "Got fixed size %d.\n", pmt->bFixedSizeSamples); ok(!pmt->bTemporalCompression, "Got temporal compression %d.\n", pmt->bTemporalCompression); - ok(pmt->lSampleSize == 1, "Got sample size %u.\n", pmt->lSampleSize); + ok(pmt->lSampleSize == 1, "Got sample size %lu.\n", pmt->lSampleSize); ok(IsEqualGUID(&pmt->formattype, &FORMAT_WaveFormatEx), "Got format type %s.\n", wine_dbgstr_guid(&pmt->formattype)); ok(!pmt->pUnk, "Got pUnk %p.\n", pmt->pUnk); - ok(pmt->cbFormat == sizeof(WAVEFORMATEX), "Got format size %u.\n", pmt->cbFormat); + ok(pmt->cbFormat == sizeof(WAVEFORMATEX), "Got format size %lu.\n", pmt->cbFormat); ok(!memcmp(pmt->pbFormat, &expect_wfx, sizeof(WAVEFORMATEX)), "Format blocks didn't match.\n");
hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->bFixedSizeSamples = FALSE; pmt->bTemporalCompression = TRUE; pmt->lSampleSize = 123; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
pmt->majortype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->majortype = MEDIATYPE_Audio;
pmt->subtype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->subtype = MEDIASUBTYPE_WAVE;
pmt->formattype = GUID_NULL; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); pmt->formattype = FORMAT_None; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
wfx = (WAVEFORMATEX *)pmt->pbFormat;
@@ -628,28 +628,28 @@ static void test_media_types(void) wfx->nAvgBytesPerSec = 44100 * 2; wfx->nBlockAlign = 2; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); *wfx = expect_wfx;
wfx->wFormatTag = WAVE_FORMAT_IMA_ADPCM; hr = IPin_QueryAccept(pin, pmt); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); *wfx = expect_wfx;
CoTaskMemFree(pmt->pbFormat); CoTaskMemFree(pmt);
hr = IEnumMediaTypes_Next(enummt, 1, &pmt, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enummt); IPin_Release(pin);
IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_enum_media_types(void) @@ -667,29 +667,29 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"input pin", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
IEnumMediaTypes_Release(enum1); IEnumMediaTypes_Release(enum2); @@ -698,64 +698,64 @@ static void test_enum_media_types(void) IBaseFilter_FindPin(filter, L"output", &pin);
hr = IPin_EnumMediaTypes(pin, &enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Next(enum1, 1, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(!count, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(!count, "Got count %lu.\n", count);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 2, mts, &count); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(count == 1, "Got count %u.\n", count); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(count == 1, "Got count %lu.\n", count); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Clone(enum1, &enum2); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 2); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Reset(enum1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Skip(enum1, 1); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum1, 1, mts, NULL); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IEnumMediaTypes_Next(enum2, 1, mts, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); CoTaskMemFree(mts[0]->pbFormat); CoTaskMemFree(mts[0]);
@@ -765,9 +765,9 @@ static void test_enum_media_types(void)
IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
static void test_unconnected_filter_state(void) @@ -778,53 +778,53 @@ static void test_unconnected_filter_state(void) ULONG ref;
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Pause(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Paused, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
hr = IBaseFilter_Run(filter, 0); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Running, "Got state %u.\n", state);
hr = IBaseFilter_Stop(filter); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IBaseFilter_GetState(filter, 0, &state); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(state == State_Stopped, "Got state %u.\n", state);
ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); }
static void test_seeking(void) @@ -864,137 +864,137 @@ static void test_seeking(void) IPin_QueryInterface(pin, &IID_IMediaSeeking, (void **)&seeking);
hr = IMediaSeeking_GetCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(caps == (AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards | AM_SEEKING_CanSeekBackwards | AM_SEEKING_CanGetStopPos - | AM_SEEKING_CanGetDuration | AM_SEEKING_CanDoSegments), "Got caps %#x.\n", caps); + | AM_SEEKING_CanGetDuration | AM_SEEKING_CanDoSegments), "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == S_OK, "Got hr %#x.\n", hr); - ok(caps == (AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards), "Got caps %#x.\n", caps); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(caps == (AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanSeekForwards), "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanSeekAbsolute | AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); - ok(caps == AM_SEEKING_CanSeekAbsolute, "Got caps %#x.\n", caps); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr); + ok(caps == AM_SEEKING_CanSeekAbsolute, "Got caps %#lx.\n", caps);
caps = AM_SEEKING_CanGetCurrentPos; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(!caps, "Got caps %#x.\n", caps); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(!caps, "Got caps %#lx.\n", caps);
caps = 0; hr = IMediaSeeking_CheckCapabilities(seeking, &caps); - ok(hr == E_FAIL, "Got hr %#x.\n", hr); - ok(!caps, "Got caps %#x.\n", caps); + ok(hr == E_FAIL, "Got hr %#lx.\n", hr); + ok(!caps, "Got caps %#lx.\n", caps);
for (i = 0; i < ARRAY_SIZE(format_tests); ++i) { hr = IMediaSeeking_IsFormatSupported(seeking, format_tests[i].guid); - todo_wine_if(i == 1) ok(hr == format_tests[i].hr, "Got hr %#x for format %s.\n", + todo_wine_if(i == 1) ok(hr == format_tests[i].hr, "Got hr %#lx for format %s.\n", hr, wine_dbgstr_guid(format_tests[i].guid)); }
hr = IMediaSeeking_QueryPreferredFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(IsEqualGUID(&format, &TIME_FORMAT_MEDIA_TIME), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_SAMPLE); - ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(hr == S_FALSE, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_FRAME); - ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_SAMPLE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetTimeFormat(seeking, &format); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(IsEqualGUID(&format, &TIME_FORMAT_SAMPLE), "Got format %s.\n", wine_dbgstr_guid(&format));
hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_FALSE, "Got hr %#lx.\n", hr); hr = IMediaSeeking_IsUsingTimeFormat(seeking, &TIME_FORMAT_SAMPLE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_SetTimeFormat(seeking, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
duration = 0xdeadbeef; hr = IMediaSeeking_GetDuration(seeking, &duration); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(duration == 1000000, "Got duration %I64d.\n", duration);
stop = current = 0xdeadbeef; hr = IMediaSeeking_GetStopPosition(seeking, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(stop == duration, "Expected time %s, got %s.\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop)); hr = IMediaSeeking_GetCurrentPosition(seeking, ¤t); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); stop = current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == duration, "Expected time %s, got %s.\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(stop));
time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, &TIME_FORMAT_MEDIA_TIME, 0x123456789a, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time)); time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 0x123456789a, &TIME_FORMAT_MEDIA_TIME); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(time == 0x123456789a, "Got time %s.\n", wine_dbgstr_longlong(time)); time = 0xdeadbeef; hr = IMediaSeeking_ConvertTimeFormat(seeking, &time, NULL, 441, &TIME_FORMAT_SAMPLE); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(time == 100000, "Got time %s.\n", wine_dbgstr_longlong(time));
earliest = latest = 0xdeadbeef; hr = IMediaSeeking_GetAvailable(seeking, &earliest, &latest); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(!earliest, "Got time %s.\n", wine_dbgstr_longlong(earliest)); ok(latest == duration, "Expected time %s, got %s.\n", wine_dbgstr_longlong(duration), wine_dbgstr_longlong(latest));
rate = 0; hr = IMediaSeeking_GetRate(seeking, &rate); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(rate == 1.0, "Got rate %.16e.\n", rate);
hr = IMediaSeeking_SetRate(seeking, 200.0); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); rate = 0; hr = IMediaSeeking_GetRate(seeking, &rate); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); todo_wine ok(rate == 200.0, "Got rate %.16e.\n", rate);
hr = IMediaSeeking_SetRate(seeking, -1.0); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IMediaSeeking_GetPreroll(seeking, &time); - todo_wine ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + todo_wine ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
current = 200 * 10000; stop = 400 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, &stop, AM_SEEKING_AbsolutePositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 400 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
stop = current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 400 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
@@ -1002,7 +1002,7 @@ static void test_seeking(void) stop = 400 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime, &stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 400 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
@@ -1010,18 +1010,18 @@ static void test_seeking(void) stop = 200 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime, &stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 100 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
current = 50 * 10000; hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr);
stop = current = 0xdeadbeef; hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop); - ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#lx.\n", hr); ok(current == 50 * 10000, "Got time %s.\n", wine_dbgstr_longlong(current)); ok(stop == 200 * 10000, "Got time %s.\n", wine_dbgstr_longlong(stop));
@@ -1029,9 +1029,9 @@ static void test_seeking(void) IPin_Release(pin); IFilterGraph2_Release(graph); ref = IBaseFilter_Release(filter); - ok(!ref, "Got outstanding refcount %d.\n", ref); + ok(!ref, "Got outstanding refcount %ld.\n", ref); ret = DeleteFileW(filename); - ok(ret, "Failed to delete file, error %u.\n", GetLastError()); + ok(ret, "Failed to delete file, error %lu.\n", GetLastError()); }
START_TEST(waveparser)
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=109672
Your paranoid android.
=== w1064_tsign (32 bit report) ===
quartz: videorenderer.c:1075: Test failed: Thread should block in Receive().
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/qwave/tests/Makefile.in | 1 - dlls/qwave/tests/qos.c | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/qwave/tests/Makefile.in b/dlls/qwave/tests/Makefile.in index 999c26f693f..713909ba191 100644 --- a/dlls/qwave/tests/Makefile.in +++ b/dlls/qwave/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = qwave.dll IMPORTS = qwave
diff --git a/dlls/qwave/tests/qos.c b/dlls/qwave/tests/qos.c index 10a32f7495b..7e8fddf64c4 100644 --- a/dlls/qwave/tests/qos.c +++ b/dlls/qwave/tests/qos.c @@ -30,19 +30,19 @@ static void test_QOSCreateHandle(void) SetLastError(0xdeadbeef); ret = QOSCreateHandle(NULL, NULL); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ret = QOSCreateHandle(&ver, NULL); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ver.MajorVersion = 0; ver.MinorVersion = 0; ret = QOSCreateHandle(&ver, &h); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ver.MajorVersion = 1; ver.MinorVersion = 0; @@ -54,14 +54,14 @@ static void test_QOSCreateHandle(void) ver.MinorVersion = 5; ret = QOSCreateHandle(&ver, &h); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
SetLastError(0xdeadbeef); ver.MajorVersion = 2; ver.MinorVersion = 0; ret = QOSCreateHandle(&ver, &h); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); - ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError()); }
START_TEST(qos)
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=109653
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
kernel32: debugger.c:1028: Test failed: ole32.dll was not reported
=== w7u_adm (32 bit report) ===
kernel32: debugger.c:1028: Test failed: ole32.dll was not reported
=== w7u_el (32 bit report) ===
kernel32: debugger.c:1028: Test failed: ole32.dll was not reported
=== w1064_tsign (32 bit report) ===
kernel32: debugger.c:156: Test failed: unable to open 'C:\Users\winetest\AppData\Local\Temp\wt61F6.tmp' debugger.c:156: Test failed: failed to open: C:\Users\winetest\AppData\Local\Temp\wt61F6.tmp debugger.c:677: Test failed: the child and debugged pids don't match: 572 != 544
=== w10pro64 (32 bit report) ===
kernel32: debugger.c:682: Test failed: debugger reported 7 failures
=== w1064_tsign (64 bit report) ===
kernel32: debugger.c:156: Test failed: unable to open 'C:\Users\winetest\AppData\Local\Temp\wt5D62.tmp' debugger.c:156: Test failed: failed to open: C:\Users\winetest\AppData\Local\Temp\wt5D62.tmp debugger.c:677: Test failed: the child and debugged pids don't match: 4124 != 876 debugger.c:1520: Test failed: dwDebugEventCode = 6 expected 2 debugger.c:1521: Test failed: dwDebugEventCode = 2 expected 1 debugger.c:1521: Test failed: ExceptionCode = 3a0 expected 80000003 debugger.c:1522: Test failed: dwDebugEventCode = 1 expected 4 debugger.c:1554: Test failed: dwDebugEventCode = 4 debugger.c:1570: Test failed: dwDebugEventCode = 2 debugger.c:1574: Test failed: dwThreadId differs: 1cc0 (was 1cbc) debugger.c:1660: Test failed: dwThreadId differs: 1cc0 (was 1cc4) debugger.c:1682: Test failed: dwThreadId differs: 1cc4 (was 1cc0)