v3: removed a test and make last remaining test succeed
This function can be called in case of a broken .NET installation. See also https://bugs.winehq.org/show_bug.cgi?id=31688 Hopefully this stub will reduce amount of invalid bugreports in bugzilla about this issue
Signed-off-by: Louis Lenders xerox.xerox2000x@gmail.com --- dlls/mscoree/mscoree.spec | 2 +- dlls/mscoree/mscoree_main.c | 10 ++++++++++ dlls/mscoree/tests/mscoree.c | 7 ++++++- 3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/mscoree/mscoree.spec b/dlls/mscoree/mscoree.spec index 3715b7c79d..ec4668bc3c 100644 --- a/dlls/mscoree/mscoree.spec +++ b/dlls/mscoree/mscoree.spec @@ -25,7 +25,7 @@ @ stub CorDllMainWorker @ stdcall CorExitProcess(long) @ stub CorGetSvc -@ stub CorIsLatestSvc +@ stdcall CorIsLatestSvc(ptr ptr) @ stub CorMarkThreadInThreadPool @ stub CorTickleSvc @ stdcall CreateConfigStream(wstr ptr) diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c index 9561405608..f3ea417f9e 100644 --- a/dlls/mscoree/mscoree_main.c +++ b/dlls/mscoree/mscoree_main.c @@ -309,6 +309,16 @@ HRESULT WINAPI GetCORVersion(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength) return ret; }
+HRESULT WINAPI CorIsLatestSvc(int *unk1, int *unk2) +{ + FIXME("%p, %p stub: If this function is called, it is likely the result of a broken .NET installation!\n", unk1, unk2); + + if (!unk1 || !unk2) + return E_POINTER; + + return S_OK; +} + HRESULT WINAPI GetRequestedRuntimeInfo(LPCWSTR pExe, LPCWSTR pwszVersion, LPCWSTR pConfigurationFile, DWORD startupFlags, DWORD runtimeInfoFlags, LPWSTR pDirectory, DWORD dwDirectory, DWORD *dwDirectoryLength, LPWSTR pVersion, DWORD cchBuffer, DWORD *dwlength) diff --git a/dlls/mscoree/tests/mscoree.c b/dlls/mscoree/tests/mscoree.c index 63517dc79b..dd4724dc76 100644 --- a/dlls/mscoree/tests/mscoree.c +++ b/dlls/mscoree/tests/mscoree.c @@ -35,6 +35,7 @@ static const WCHAR v4_0[] = {'v','4','.','0','.','3','0','3','1','9',0}; static HMODULE hmscoree;
static HRESULT (WINAPI *pGetCORVersion)(LPWSTR, DWORD, DWORD*); +static HRESULT (WINAPI *pCorIsLatestSvc)(INT*, INT*); static HRESULT (WINAPI *pGetCORSystemDirectory)(LPWSTR, DWORD, DWORD*); static HRESULT (WINAPI *pGetRequestedRuntimeInfo)(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, DWORD, LPWSTR, DWORD, DWORD*, LPWSTR, DWORD, DWORD*); static HRESULT (WINAPI *pLoadLibraryShim)(LPCWSTR, LPCWSTR, LPVOID, HMODULE*); @@ -55,6 +56,7 @@ static BOOL init_functionpointers(void) }
pGetCORVersion = (void *)GetProcAddress(hmscoree, "GetCORVersion"); + pCorIsLatestSvc = (void *)GetProcAddress(hmscoree, "CorIsLatestSvc"); pGetCORSystemDirectory = (void *)GetProcAddress(hmscoree, "GetCORSystemDirectory"); pGetRequestedRuntimeInfo = (void *)GetProcAddress(hmscoree, "GetRequestedRuntimeInfo"); pLoadLibraryShim = (void *)GetProcAddress(hmscoree, "LoadLibraryShim"); @@ -63,7 +65,7 @@ static BOOL init_functionpointers(void) pCLRCreateInstance = (void *)GetProcAddress(hmscoree, "CLRCreateInstance");
if (!pGetCORVersion || !pGetCORSystemDirectory || !pGetRequestedRuntimeInfo || !pLoadLibraryShim || - !pCreateInterface || !pCLRCreateInstance + !pCreateInterface || !pCLRCreateInstance || !pCorIsLatestSvc ) { win_skip("functions not available\n"); @@ -289,6 +291,9 @@ static void test_versioninfo(void) hr = pGetRequestedRuntimeInfo( NULL, v2_0_0, NULL, 0, RUNTIME_INFO_UPGRADE_VERSION, path, MAX_PATH, &path_len, version, MAX_PATH, NULL); ok(hr == S_OK, "GetRequestedRuntimeInfo returned %08x\n", hr); ok(!winetest_strcmpW(version, v2_0), "version is %s , expected %s\n", wine_dbgstr_w(version), wine_dbgstr_w(v2_0)); + + hr = pCorIsLatestSvc(NULL, NULL); + ok(hr == E_POINTER, "CorIsLatestSvc returned %08x\n", hr); }
static void test_loadlibraryshim(void)