mscoree: Add more stubs for functions that are called during COR detection (3/4)

Paul Chitescu paulc at voip.null.ro
Mon Nov 13 19:41:55 CST 2006


Changelog: mscoree: Add more stubs for functions that are called during COR 
detection (3/4)

Requires patches 1-2 applied.
-------------- next part --------------
--- ./dlls/mscoree/mscoree_main.c.orig	2006-11-14 02:19:11.000000000 +0200
+++ ./dlls/mscoree/mscoree_main.c	2006-11-14 02:19:05.000000000 +0200
@@ -169,6 +169,26 @@
     return copyToWBuffer(currentCORversion, pBuffer, cchBuffer, dwLength);
 }
 
+HRESULT WINAPI GetCORRequiredVersion(LPWSTR pBuffer, DWORD cchBuffer, LPDWORD dwLength)
+{
+    WARN("(%p, %d, %p): semi-stub\n", pBuffer, cchBuffer, dwLength);
+    if (!initCORemulation())
+	return E_FAIL;
+    return copyToWBuffer(currentCORversion, pBuffer, cchBuffer, dwLength);
+}
+
+HRESULT WINAPI GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, LPDWORD dwLength)
+{
+    FIXME("(%p, %d, %p): stub\n", pbuffer, cchBuffer, dwLength);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+HRESULT WINAPI GetFileVersion(LPCWSTR szFileName, LPWSTR pbuffer, DWORD cchBuffer, LPDWORD dwLength)
+{
+    FIXME("(%s, %p, %d, %p): stub\n", debugstr_w(szFileName), pbuffer, cchBuffer, dwLength);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
 HRESULT WINAPI LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE * phModDll)
 {
     if (!initCORemulation())
@@ -184,8 +204,56 @@
     return initCORemulation() ? S_OK : E_FAIL;
 }
 
+HRESULT WINAPI CoInitializeEE(DWORD fFlags)
+{
+    WARN("(0x%08x): semi-stub\n", fFlags);
+    if (isCORinitialized > 0)
+	return S_FALSE;
+    return initCORemulation() ? S_OK : E_FAIL;
+}
+
 HRESULT WINAPI GetAssemblyMDImport(LPCWSTR szFileName, REFIID riid, IUnknown **ppIUnk)
 {
     FIXME("(%s, %p, %p): stub\n", debugstr_w(szFileName), riid, *ppIUnk);
     return ERROR_CALL_NOT_IMPLEMENTED;
 }
+
+HRESULT WINAPI GetRequestedRuntimeInfo(LPCWSTR pExe, LPCWSTR pVersion, LPCWSTR pConfig,
+    DWORD startupFlags, DWORD runtimeInfoFlags, LPWSTR pDir, DWORD dwDir, LPDWORD pDirLen,
+    LPWSTR pBuffer, DWORD dwBuffer, LPDWORD pBufLen)
+{
+    FIXME("(%s, %s, %s, ...): stub\n", debugstr_w(pExe), debugstr_w(pVersion), debugstr_w(pConfig));
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+HRESULT WINAPI GetRequestedRuntimeVersion(LPCWSTR pExe, LPWSTR pBuffer, DWORD dwBuffer, LPDWORD pBufLen)
+{
+    FIXME("(%s, %p, %u, %p): stub\n", debugstr_w(pExe), pBuffer, dwBuffer, pBufLen);
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+HRESULT WINAPI LoadStringRCEx(LCID culture, UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet, int* pBufLen)
+{
+    HRESULT res = S_OK;
+    if (!initCORemulation())
+	return E_FAIL;
+    if ((iBufLen <= 0) || !pBuffer)
+	return E_INVALIDARG;
+    pBuffer[0] = 0;
+    if (resId) {
+	WARN("(%d, %x, %p, %d, %d, %p): stub\n", culture, resId, pBuffer, iBufLen, bQuiet, pBufLen);
+	res = ERROR_CALL_NOT_IMPLEMENTED;
+    }
+    else {
+	/* we do like "they" do */
+	res = E_FAIL;
+    }
+    if (pBufLen)
+	*pBufLen = lstrlenW(pBuffer);
+    return res;
+}
+
+HRESULT WINAPI LoadStringRC(UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet)
+{
+    return LoadStringRCEx(-1, resId, pBuffer, iBufLen, bQuiet, NULL);
+}
--- ./dlls/mscoree/mscoree.spec.orig	2006-11-13 22:31:57.000000000 +0200
+++ ./dlls/mscoree/mscoree.spec	2006-11-09 19:27:22.000000000 +0200
@@ -2,7 +2,7 @@
 18 stub PostError
 19 stub InitSSAutoEnterThread
 20 stub UpdateError
-22 stub LoadStringRC
+22 stdcall LoadStringRC(long wstr long long)
 23 stub ReOpenMetaDataWithMemory
 
 @ stub CallFunctionShim
@@ -10,7 +10,7 @@
 @ stub ClrCreateManagedInstance
 @ stub CoEEShutDownCOM
 @ stdcall CoInitializeCor(long)
-@ stub CoInitializeEE
+@ stdcall CoInitializeEE(long)
 @ stub CoUninitializeCor
 @ stub CoUninitializeEE
 @ stub CollectCtrs
@@ -37,12 +37,12 @@
 @ stub EEDllRegisterServer
 @ stub EEDllUnregisterServer
 @ stdcall GetAssemblyMDImport(ptr ptr ptr)
-@ stub GetCORRequiredVersion
+@ stdcall GetCORRequiredVersion(wstr long ptr)
 @ stub GetCORRootDirectory
-@ stub GetCORSystemDirectory
+@ stdcall GetCORSystemDirectory(wstr long ptr)
 @ stdcall GetCORVersion(wstr long ptr)
 @ stub GetCompileInfo
-@ stub GetFileVersion
+@ stdcall GetFileVersion(wstr wstr long ptr)
 @ stub GetHashFromAssemblyFile
 @ stub GetHashFromAssemblyFileW
 @ stub GetHashFromBlob
@@ -57,8 +57,8 @@
 @ stub GetPrivateContextsPerfCounters
 @ stub GetProcessExecutableHeap
 @ stub GetRealProcAddress
-@ stub GetRequestedRuntimeInfo
-@ stub GetRequestedRuntimeVersion
+@ stdcall GetRequestedRuntimeInfo(ptr ptr ptr long long ptr long ptr ptr long ptr)
+@ stdcall GetRequestedRuntimeVersion(ptr ptr long ptr)
 @ stub GetRequestedRuntimeVersionForCLSID
 @ stub GetStartupFlags
 @ stub GetTargetForVTableEntry
@@ -69,7 +69,7 @@
 @ stub GetXMLObject
 @ stdcall LoadLibraryShim(ptr ptr ptr ptr)
 @ stub LoadLibraryWithPolicyShim
-@ stub LoadStringRCEx
+@ stdcall LoadStringRCEx(long long wstr long long ptr)
 @ stub LockClrVersion
 @ stub MetaDataGetDispenser
 @ stub OpenCtrs


More information about the wine-patches mailing list