Commit 816395e8 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

mscoree/tests: Enable compilation with long types.

parent b83e327a
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = mscoree.dll TESTDLL = mscoree.dll
IMPORTS = ole32 shlwapi uuid shell32 advapi32 IMPORTS = ole32 shlwapi uuid shell32 advapi32
......
...@@ -92,7 +92,7 @@ static BOOL compile_cs_to_dll(char *source_path, char *dest_path) ...@@ -92,7 +92,7 @@ static BOOL compile_cs_to_dll(char *source_path, char *dest_path)
si.cb = sizeof(si); si.cb = sizeof(si);
ret = CreateProcessA(path_csc, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); ret = CreateProcessA(path_csc, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
ok(ret, "Could not create process: %u\n", GetLastError()); ok(ret, "Could not create process: %lu\n", GetLastError());
WaitForSingleObject(pi.hProcess, 5000); WaitForSingleObject(pi.hProcess, 5000);
CloseHandle(pi.hThread); CloseHandle(pi.hThread);
...@@ -117,13 +117,13 @@ static void run_test(BOOL expect_success) ...@@ -117,13 +117,13 @@ static void run_test(BOOL expect_success)
hr = CoCreateInstance(&CLSID_Test, NULL, CLSCTX_INPROC_SERVER, &IID_ITest, (void**)&test); hr = CoCreateInstance(&CLSID_Test, NULL, CLSCTX_INPROC_SERVER, &IID_ITest, (void**)&test);
todo_wine_if(!expect_success) todo_wine_if(!expect_success)
ok(hr == result_expected, "Expected %x, got %x\n", result_expected, hr); ok(hr == result_expected, "Expected %lx, got %lx\n", result_expected, hr);
if (hr == S_OK) if (hr == S_OK)
{ {
int i = 0; int i = 0;
hr = ITest_Func(test, &i); hr = ITest_Func(test, &i);
ok(hr == S_OK, "Got %x\n", hr); ok(hr == S_OK, "Got %lx\n", hr);
ok(i == 42, "Expected 42, got %d\n", i); ok(i == 42, "Expected 42, got %d\n", i);
ITest_Release(test); ITest_Release(test);
} }
...@@ -131,20 +131,20 @@ static void run_test(BOOL expect_success) ...@@ -131,20 +131,20 @@ static void run_test(BOOL expect_success)
getClassObject = (_DllGetClassObject)GetProcAddress(hmscoree, "DllGetClassObject"); getClassObject = (_DllGetClassObject)GetProcAddress(hmscoree, "DllGetClassObject");
hr = getClassObject(&CLSID_Test, &IID_IClassFactory, (void **)&classFactory); hr = getClassObject(&CLSID_Test, &IID_IClassFactory, (void **)&classFactory);
todo_wine_if(!expect_success) todo_wine_if(!expect_success)
ok(hr == result_expected, "Expected %x, got %x\n", result_expected, hr); ok(hr == result_expected, "Expected %lx, got %lx\n", result_expected, hr);
if (hr == S_OK) if (hr == S_OK)
{ {
ITest *test2 = NULL; ITest *test2 = NULL;
hr = IClassFactory_CreateInstance(classFactory, NULL, &IID_ITest, (void **)&test2); hr = IClassFactory_CreateInstance(classFactory, NULL, &IID_ITest, (void **)&test2);
todo_wine_if(!expect_success) todo_wine_if(!expect_success)
ok(hr == S_OK, "Got %x\n", hr); ok(hr == S_OK, "Got %lx\n", hr);
if (hr == S_OK) if (hr == S_OK)
{ {
int i = 0; int i = 0;
hr = ITest_Func(test2, &i); hr = ITest_Func(test2, &i);
ok(hr == S_OK, "Got %x\n", hr); ok(hr == S_OK, "Got %lx\n", hr);
ok(i == 42, "Expected 42, got %d\n", i); ok(i == 42, "Expected 42, got %d\n", i);
ITest_Release(test2); ITest_Release(test2);
} }
...@@ -174,28 +174,28 @@ static void run_registry_test(run_type run) ...@@ -174,28 +174,28 @@ static void run_registry_test(run_type run)
RegCloseKey(hkey); RegCloseKey(hkey);
return; return;
} }
ok(ret == ERROR_SUCCESS, "RegCreateKeyA returned %x\n", ret); ok(ret == ERROR_SUCCESS, "RegCreateKeyA returned %lx\n", ret);
ret = RegSetKeyValueA(hkey, "InprocServer32", NULL, REG_SZ, "mscoree.dll", 11); ret = RegSetKeyValueA(hkey, "InprocServer32", NULL, REG_SZ, "mscoree.dll", 11);
ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %x\n", ret); ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %lx\n", ret);
ret = RegSetKeyValueA(hkey, "InprocServer32", "Assembly", REG_SZ, "comtest, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 74); ret = RegSetKeyValueA(hkey, "InprocServer32", "Assembly", REG_SZ, "comtest, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 74);
ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %x\n", ret); ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %lx\n", ret);
ret = RegSetKeyValueA(hkey, "InprocServer32", "Class", REG_SZ, "DLL.Test", 8); ret = RegSetKeyValueA(hkey, "InprocServer32", "Class", REG_SZ, "DLL.Test", 8);
ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %x\n", ret); ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %lx\n", ret);
ret = RegSetKeyValueA(hkey, "InprocServer32", "CodeBase", REG_SZ, "file:///U:/invalid/path/to/comtest.dll", 41); ret = RegSetKeyValueA(hkey, "InprocServer32", "CodeBase", REG_SZ, "file:///U:/invalid/path/to/comtest.dll", 41);
ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %x\n", ret); ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %lx\n", ret);
hr = CoCreateInstance(&CLSID_Test, NULL, CLSCTX_INPROC_SERVER, &IID_ITest, (void**)&test); hr = CoCreateInstance(&CLSID_Test, NULL, CLSCTX_INPROC_SERVER, &IID_ITest, (void**)&test);
todo_wine_if(result_expected != S_OK) todo_wine_if(result_expected != S_OK)
ok(hr == result_expected, "Expected %x, got %x\n", result_expected, hr); ok(hr == result_expected, "Expected %lx, got %lx\n", result_expected, hr);
if (hr == S_OK) if (hr == S_OK)
{ {
hr = ITest_Func(test, &i); hr = ITest_Func(test, &i);
ok(hr == S_OK, "Got %x\n", hr); ok(hr == S_OK, "Got %lx\n", hr);
ok(i == 42, "Expected 42, got %d\n", i); ok(i == 42, "Expected 42, got %d\n", i);
hr = ITest_QueryInterface(test, &IID_ITest2, (void**)&unk); hr = ITest_QueryInterface(test, &IID_ITest2, (void**)&unk);
ok(hr == S_OK, "ITest_QueryInterface returned %x\n", hr); ok(hr == S_OK, "ITest_QueryInterface returned %lx\n", hr);
if (hr == S_OK) IUnknown_Release(unk); if (hr == S_OK) IUnknown_Release(unk);
ITest_Release(test); ITest_Release(test);
} }
...@@ -290,7 +290,7 @@ static void prepare_and_run_test(const char *dll_source, run_type run) ...@@ -290,7 +290,7 @@ static void prepare_and_run_test(const char *dll_source, run_type run)
context.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID; context.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID;
handle_context = CreateActCtxA(&context); handle_context = CreateActCtxA(&context);
ok(handle_context != NULL && handle_context != INVALID_HANDLE_VALUE, "run: %d, CreateActCtxA failed: %d\n", run, GetLastError()); ok(handle_context != NULL && handle_context != INVALID_HANDLE_VALUE, "run: %d, CreateActCtxA failed: %ld\n", run, GetLastError());
if (handle_context == NULL || handle_context == INVALID_HANDLE_VALUE) if (handle_context == NULL || handle_context == INVALID_HANDLE_VALUE)
{ {
...@@ -299,7 +299,7 @@ static void prepare_and_run_test(const char *dll_source, run_type run) ...@@ -299,7 +299,7 @@ static void prepare_and_run_test(const char *dll_source, run_type run)
} }
success = ActivateActCtx(handle_context, &cookie); success = ActivateActCtx(handle_context, &cookie);
ok(success, "run: %d, ActivateActCtx failed: %d\n", run, GetLastError()); ok(success, "run: %d, ActivateActCtx failed: %ld\n", run, GetLastError());
if (run == run_type_current_working_directory) if (run == run_type_current_working_directory)
SetCurrentDirectoryA(path_tmp); SetCurrentDirectoryA(path_tmp);
...@@ -311,23 +311,23 @@ cleanup: ...@@ -311,23 +311,23 @@ cleanup:
if (handle_context != NULL && handle_context != INVALID_HANDLE_VALUE) if (handle_context != NULL && handle_context != INVALID_HANDLE_VALUE)
{ {
success = DeactivateActCtx(0, cookie); success = DeactivateActCtx(0, cookie);
ok(success, "run: %d, DeactivateActCtx failed: %d\n", run, GetLastError()); ok(success, "run: %d, DeactivateActCtx failed: %ld\n", run, GetLastError());
ReleaseActCtx(handle_context); ReleaseActCtx(handle_context);
} }
if (*path_manifest_exe) if (*path_manifest_exe)
{ {
success = DeleteFileA(path_manifest_exe); success = DeleteFileA(path_manifest_exe);
ok(success, "run: %d, DeleteFileA failed: %d\n", run, GetLastError()); ok(success, "run: %d, DeleteFileA failed: %ld\n", run, GetLastError());
} }
if(*path_manifest_dll) if(*path_manifest_dll)
{ {
success = DeleteFileA(path_manifest_dll); success = DeleteFileA(path_manifest_dll);
ok(success, "run: %d, DeleteFileA failed: %d\n", run, GetLastError()); ok(success, "run: %d, DeleteFileA failed: %ld\n", run, GetLastError());
} }
if(*path_dll_source) if(*path_dll_source)
{ {
success = DeleteFileA(path_dll_source); success = DeleteFileA(path_dll_source);
ok(success, "run: %d, DeleteFileA failed: %d\n", run, GetLastError()); ok(success, "run: %d, DeleteFileA failed: %ld\n", run, GetLastError());
} }
RemoveDirectoryA(path_tmp_manifest); RemoveDirectoryA(path_tmp_manifest);
/* dll cleanup is handled by the parent, because it might still be used by the child */ /* dll cleanup is handled by the parent, because it might still be used by the child */
...@@ -350,7 +350,7 @@ static void cleanup_test(run_type run) ...@@ -350,7 +350,7 @@ static void cleanup_test(run_type run)
Sleep(500); Sleep(500);
success = DeleteFileA(path_dll); success = DeleteFileA(path_dll);
} }
ok(success, "DeleteFileA failed: %d\n", GetLastError()); ok(success, "DeleteFileA failed: %ld\n", GetLastError());
} }
static void run_child_process(const char *dll_source, run_type run) static void run_child_process(const char *dll_source, run_type run)
...@@ -372,7 +372,7 @@ static void run_child_process(const char *dll_source, run_type run) ...@@ -372,7 +372,7 @@ static void run_child_process(const char *dll_source, run_type run)
si.cb = sizeof(si); si.cb = sizeof(si);
ret = CreateProcessA(exe, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); ret = CreateProcessA(exe, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
ok(ret, "Could not create process: %u\n", GetLastError()); ok(ret, "Could not create process: %lu\n", GetLastError());
wait_child_process(pi.hProcess); wait_child_process(pi.hProcess);
......
...@@ -410,17 +410,17 @@ static void _check_process_enum(unsigned line, ICorDebug *pCorDebug, ULONG nExpe ...@@ -410,17 +410,17 @@ static void _check_process_enum(unsigned line, ICorDebug *pCorDebug, ULONG nExpe
ICorDebugProcessEnum *pProcessEnum = NULL; ICorDebugProcessEnum *pProcessEnum = NULL;
hr = ICorDebug_EnumerateProcesses(pCorDebug, NULL); hr = ICorDebug_EnumerateProcesses(pCorDebug, NULL);
ok_(__FILE__,line) (hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr); ok_(__FILE__,line) (hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr);
hr = ICorDebug_EnumerateProcesses(pCorDebug, &pProcessEnum); hr = ICorDebug_EnumerateProcesses(pCorDebug, &pProcessEnum);
ok_(__FILE__,line) (hr == S_OK, "expected S_OK got %08x\n", hr); ok_(__FILE__,line) (hr == S_OK, "expected S_OK got %08lx\n", hr);
if(hr == S_OK) if(hr == S_OK)
{ {
ULONG cnt; ULONG cnt;
hr = ICorDebugProcessEnum_GetCount(pProcessEnum, &cnt); hr = ICorDebugProcessEnum_GetCount(pProcessEnum, &cnt);
ok_(__FILE__,line) (hr == S_OK, "expected S_OK got %08x\n", hr); ok_(__FILE__,line) (hr == S_OK, "expected S_OK got %08lx\n", hr);
ok_(__FILE__,line) (cnt == nExpected, "expected %d got %d\n", nExpected, cnt); ok_(__FILE__,line) (cnt == nExpected, "expected %ld got %ld\n", nExpected, cnt);
ICorDebugProcessEnum_Release(pProcessEnum); ICorDebugProcessEnum_Release(pProcessEnum);
} }
...@@ -433,36 +433,36 @@ static void test_createDebugger(void) ...@@ -433,36 +433,36 @@ static void test_createDebugger(void)
ICorDebug *pCorDebug; ICorDebug *pCorDebug;
hr = pCreateDebuggingInterfaceFromVersion(0, v2_0, &pUnk); hr = pCreateDebuggingInterfaceFromVersion(0, v2_0, &pUnk);
ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08x\n", hr); ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08lx\n", hr);
hr = pCreateDebuggingInterfaceFromVersion(1, v2_0, &pUnk); hr = pCreateDebuggingInterfaceFromVersion(1, v2_0, &pUnk);
ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08x\n", hr); ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08lx\n", hr);
hr = pCreateDebuggingInterfaceFromVersion(2, v2_0, &pUnk); hr = pCreateDebuggingInterfaceFromVersion(2, v2_0, &pUnk);
ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08x\n", hr); ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08lx\n", hr);
hr = pCreateDebuggingInterfaceFromVersion(4, v2_0, &pUnk); hr = pCreateDebuggingInterfaceFromVersion(4, v2_0, &pUnk);
ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08x\n", hr); ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08lx\n", hr);
hr = pCreateDebuggingInterfaceFromVersion(3, v2_0, NULL); hr = pCreateDebuggingInterfaceFromVersion(3, v2_0, NULL);
ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08x\n", hr); ok(hr == E_INVALIDARG, "CreateDebuggingInterfaceFromVersion returned %08lx\n", hr);
hr = pCreateDebuggingInterfaceFromVersion(3, v2_0, &pUnk); hr = pCreateDebuggingInterfaceFromVersion(3, v2_0, &pUnk);
if(hr == S_OK) if(hr == S_OK)
{ {
hr = IUnknown_QueryInterface(pUnk, &IID_ICorDebug, (void**)&pCorDebug); hr = IUnknown_QueryInterface(pUnk, &IID_ICorDebug, (void**)&pCorDebug);
ok(hr == S_OK, "expected S_OK got %08x\n", hr); ok(hr == S_OK, "expected S_OK got %08lx\n", hr);
if(hr == S_OK) if(hr == S_OK)
{ {
hr = ICorDebug_Initialize(pCorDebug); hr = ICorDebug_Initialize(pCorDebug);
ok(hr == S_OK, "expected S_OK got %08x\n", hr); ok(hr == S_OK, "expected S_OK got %08lx\n", hr);
if(hr == S_OK) if(hr == S_OK)
{ {
hr = ICorDebug_SetManagedHandler(pCorDebug, NULL); hr = ICorDebug_SetManagedHandler(pCorDebug, NULL);
ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %08x\n", hr); ok(hr == E_INVALIDARG, "expected E_INVALIDARG got %08lx\n", hr);
hr = ICorDebug_SetManagedHandler(pCorDebug, &ManagedCallback); hr = ICorDebug_SetManagedHandler(pCorDebug, &ManagedCallback);
ok(hr == S_OK, "expected S_OK got %08x\n", hr); ok(hr == S_OK, "expected S_OK got %08lx\n", hr);
/* We should have no processes */ /* We should have no processes */
check_process_enum(pCorDebug, 0); check_process_enum(pCorDebug, 0);
......
...@@ -84,16 +84,16 @@ static void test_getruntime(WCHAR *version) ...@@ -84,16 +84,16 @@ static void test_getruntime(WCHAR *version)
WCHAR buf[MAX_PATH]; WCHAR buf[MAX_PATH];
hr = ICLRMetaHost_GetRuntime(metahost, NULL, &IID_ICLRRuntimeInfo, (void**)&info); hr = ICLRMetaHost_GetRuntime(metahost, NULL, &IID_ICLRRuntimeInfo, (void**)&info);
ok(hr == E_POINTER, "GetVersion failed, hr=%x\n", hr); ok(hr == E_POINTER, "GetVersion failed, hr=%lx\n", hr);
hr = ICLRMetaHost_GetRuntime(metahost, version, &IID_ICLRRuntimeInfo, (void**)&info); hr = ICLRMetaHost_GetRuntime(metahost, version, &IID_ICLRRuntimeInfo, (void**)&info);
ok(hr == S_OK, "GetVersion failed, hr=%x\n", hr); ok(hr == S_OK, "GetVersion failed, hr=%lx\n", hr);
if (hr != S_OK) return; if (hr != S_OK) return;
count = MAX_PATH; count = MAX_PATH;
hr = ICLRRuntimeInfo_GetVersionString(info, buf, &count); hr = ICLRRuntimeInfo_GetVersionString(info, buf, &count);
ok(hr == S_OK, "GetVersionString returned %x\n", hr); ok(hr == S_OK, "GetVersionString returned %lx\n", hr);
ok(count == lstrlenW(buf)+1, "GetVersionString returned count %u but string of length %u\n", count, lstrlenW(buf)+1); ok(count == lstrlenW(buf)+1, "GetVersionString returned count %lu but string of length %u\n", count, lstrlenW(buf)+1);
ok(lstrcmpW(buf, version) == 0, "got unexpected version %s\n", wine_dbgstr_w(buf)); ok(lstrcmpW(buf, version) == 0, "got unexpected version %s\n", wine_dbgstr_w(buf));
ICLRRuntimeInfo_Release(info); ICLRRuntimeInfo_Release(info);
...@@ -102,7 +102,7 @@ static void test_getruntime(WCHAR *version) ...@@ -102,7 +102,7 @@ static void test_getruntime(WCHAR *version)
dot = wcsrchr(version, '.'); dot = wcsrchr(version, '.');
lstrcpyW(dot, dotzero); lstrcpyW(dot, dotzero);
hr = ICLRMetaHost_GetRuntime(metahost, version, &IID_ICLRRuntimeInfo, (void**)&info); hr = ICLRMetaHost_GetRuntime(metahost, version, &IID_ICLRRuntimeInfo, (void**)&info);
ok(hr == CLR_E_SHIM_RUNTIME, "GetVersion failed, hr=%x\n", hr); ok(hr == CLR_E_SHIM_RUNTIME, "GetVersion failed, hr=%lx\n", hr);
} }
static void test_enumruntimes(void) static void test_enumruntimes(void)
...@@ -115,28 +115,28 @@ static void test_enumruntimes(void) ...@@ -115,28 +115,28 @@ static void test_enumruntimes(void)
WCHAR buf[MAX_PATH]; WCHAR buf[MAX_PATH];
hr = ICLRMetaHost_EnumerateInstalledRuntimes(metahost, &runtime_enum); hr = ICLRMetaHost_EnumerateInstalledRuntimes(metahost, &runtime_enum);
ok(hr == S_OK, "EnumerateInstalledRuntimes returned %x\n", hr); ok(hr == S_OK, "EnumerateInstalledRuntimes returned %lx\n", hr);
if (FAILED(hr)) return; if (FAILED(hr)) return;
while ((hr = IEnumUnknown_Next(runtime_enum, 1, &unk, &count)) == S_OK) while ((hr = IEnumUnknown_Next(runtime_enum, 1, &unk, &count)) == S_OK)
{ {
hr = IUnknown_QueryInterface(unk, &IID_ICLRRuntimeInfo, (void**)&runtime_info); hr = IUnknown_QueryInterface(unk, &IID_ICLRRuntimeInfo, (void**)&runtime_info);
ok(hr == S_OK, "QueryInterface returned %x\n", hr); ok(hr == S_OK, "QueryInterface returned %lx\n", hr);
count = 1; count = 1;
hr = ICLRRuntimeInfo_GetVersionString(runtime_info, buf, &count); hr = ICLRRuntimeInfo_GetVersionString(runtime_info, buf, &count);
ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetVersionString returned %x\n", hr); ok(hr == E_NOT_SUFFICIENT_BUFFER, "GetVersionString returned %lx\n", hr);
ok(count > 1, "GetVersionString returned count %u\n", count); ok(count > 1, "GetVersionString returned count %lu\n", count);
count = 0xdeadbeef; count = 0xdeadbeef;
hr = ICLRRuntimeInfo_GetVersionString(runtime_info, NULL, &count); hr = ICLRRuntimeInfo_GetVersionString(runtime_info, NULL, &count);
ok(hr == S_OK, "GetVersionString returned %x\n", hr); ok(hr == S_OK, "GetVersionString returned %lx\n", hr);
ok(count > 1 && count != 0xdeadbeef, "GetVersionString returned count %u\n", count); ok(count > 1 && count != 0xdeadbeef, "GetVersionString returned count %lu\n", count);
count = MAX_PATH; count = MAX_PATH;
hr = ICLRRuntimeInfo_GetVersionString(runtime_info, buf, &count); hr = ICLRRuntimeInfo_GetVersionString(runtime_info, buf, &count);
ok(hr == S_OK, "GetVersionString returned %x\n", hr); ok(hr == S_OK, "GetVersionString returned %lx\n", hr);
ok(count > 1, "GetVersionString returned count %u\n", count); ok(count > 1, "GetVersionString returned count %lu\n", count);
trace("runtime found: %s\n", wine_dbgstr_w(buf)); trace("runtime found: %s\n", wine_dbgstr_w(buf));
...@@ -146,7 +146,7 @@ static void test_enumruntimes(void) ...@@ -146,7 +146,7 @@ static void test_enumruntimes(void)
test_getruntime(buf); test_getruntime(buf);
} }
ok(hr == S_FALSE, "IEnumUnknown_Next returned %x\n", hr); ok(hr == S_FALSE, "IEnumUnknown_Next returned %lx\n", hr);
IEnumUnknown_Release(runtime_enum); IEnumUnknown_Release(runtime_enum);
} }
...@@ -169,19 +169,19 @@ static void WINAPI notification_callback(ICLRRuntimeInfo *pRuntimeInfo, Callback ...@@ -169,19 +169,19 @@ static void WINAPI notification_callback(ICLRRuntimeInfo *pRuntimeInfo, Callback
if (expect_runtime_tid != 0) if (expect_runtime_tid != 0)
{ {
ok(GetCurrentThreadId() == expect_runtime_tid, ok(GetCurrentThreadId() == expect_runtime_tid,
"expected call on thread %04x, got thread %04x\n", expect_runtime_tid, GetCurrentThreadId()); "expected call on thread %04lx, got thread %04lx\n", expect_runtime_tid, GetCurrentThreadId());
expect_runtime_tid = 0; expect_runtime_tid = 0;
} }
hr = ICLRRuntimeInfo_GetVersionString(pRuntimeInfo, buf, &buf_size); hr = ICLRRuntimeInfo_GetVersionString(pRuntimeInfo, buf, &buf_size);
ok(hr == S_OK, "GetVersion returned %x\n", hr); ok(hr == S_OK, "GetVersion returned %lx\n", hr);
ok(lstrcmpW(buf, v4_0) == 0, "GetVersion returned %s\n", wine_dbgstr_w(buf)); ok(lstrcmpW(buf, v4_0) == 0, "GetVersion returned %s\n", wine_dbgstr_w(buf));
hr = pfnCallbackThreadSet(); hr = pfnCallbackThreadSet();
ok(hr == S_OK, "pfnCallbackThreadSet returned %x\n", hr); ok(hr == S_OK, "pfnCallbackThreadSet returned %lx\n", hr);
hr = pfnCallbackThreadUnset(); hr = pfnCallbackThreadUnset();
ok(hr == S_OK, "pfnCallbackThreadUnset returned %x\n", hr); ok(hr == S_OK, "pfnCallbackThreadUnset returned %lx\n", hr);
} }
static void test_notification(void) static void test_notification(void)
...@@ -189,13 +189,13 @@ static void test_notification(void) ...@@ -189,13 +189,13 @@ static void test_notification(void)
HRESULT hr; HRESULT hr;
hr = ICLRMetaHost_RequestRuntimeLoadedNotification(metahost, NULL); hr = ICLRMetaHost_RequestRuntimeLoadedNotification(metahost, NULL);
ok(hr == E_POINTER, "RequestRuntimeLoadedNotification returned %x\n", hr); ok(hr == E_POINTER, "RequestRuntimeLoadedNotification returned %lx\n", hr);
hr = ICLRMetaHost_RequestRuntimeLoadedNotification(metahost,notification_callback); hr = ICLRMetaHost_RequestRuntimeLoadedNotification(metahost,notification_callback);
ok(hr == S_OK, "RequestRuntimeLoadedNotification failed, hr=%x\n", hr); ok(hr == S_OK, "RequestRuntimeLoadedNotification failed, hr=%lx\n", hr);
hr = ICLRMetaHost_RequestRuntimeLoadedNotification(metahost,notification_dummy_callback); hr = ICLRMetaHost_RequestRuntimeLoadedNotification(metahost,notification_dummy_callback);
ok(hr == HOST_E_INVALIDOPERATION, "RequestRuntimeLoadedNotification returned %x\n", hr); ok(hr == HOST_E_INVALIDOPERATION, "RequestRuntimeLoadedNotification returned %lx\n", hr);
} }
static void test_notification_cb(void) static void test_notification_cb(void)
...@@ -205,12 +205,12 @@ static void test_notification_cb(void) ...@@ -205,12 +205,12 @@ static void test_notification_cb(void)
ICLRRuntimeHost *host; ICLRRuntimeHost *host;
hr = ICLRMetaHost_GetRuntime(metahost, v4_0, &IID_ICLRRuntimeInfo, (void**)&info); hr = ICLRMetaHost_GetRuntime(metahost, v4_0, &IID_ICLRRuntimeInfo, (void**)&info);
ok(hr == S_OK, "GetRuntime returned %x\n", hr); ok(hr == S_OK, "GetRuntime returned %lx\n", hr);
expect_runtime_tid = GetCurrentThreadId(); expect_runtime_tid = GetCurrentThreadId();
hr = ICLRRuntimeInfo_GetInterface(info, &CLSID_CLRRuntimeHost, &IID_ICLRRuntimeHost, (void**)&host); hr = ICLRRuntimeInfo_GetInterface(info, &CLSID_CLRRuntimeHost, &IID_ICLRRuntimeHost, (void**)&host);
todo_wine_if(!has_mono) ok(hr == S_OK, "GetInterface returned %x\n", hr); todo_wine_if(!has_mono) ok(hr == S_OK, "GetInterface returned %lx\n", hr);
todo_wine if(!has_mono) ok(expect_runtime_tid == 0, "notification_callback was not called\n"); todo_wine if(!has_mono) ok(expect_runtime_tid == 0, "notification_callback was not called\n");
if(has_mono) if(has_mono)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment