From: Bruce Forstall Date: Tue, 8 Aug 2017 00:28:22 +0000 (-0700) Subject: Fix SuperPMI x86 desktop build X-Git-Tag: accepted/tizen/base/20180629.140029~670^2~392^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd7ed6d94c34d88e267d0fddaea4056f66efef4a;p=platform%2Fupstream%2Fcoreclr.git Fix SuperPMI x86 desktop build --- diff --git a/src/ToolBox/superpmi/superpmi-shared/coreclrcommoncallbacks.h b/src/ToolBox/superpmi/superpmi-shared/coreclrcommoncallbacks.h index ca542fb..254981c 100644 --- a/src/ToolBox/superpmi/superpmi-shared/coreclrcommoncallbacks.h +++ b/src/ToolBox/superpmi/superpmi-shared/coreclrcommoncallbacks.h @@ -8,13 +8,13 @@ #include "runtimedetails.h" -IExecutionEngine* IEE_t(); -HRESULT GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, DWORD* pdwlength); -LPVOID EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes); -BOOL EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem); -void* GetCLRFunction(LPCSTR functionName); +IExecutionEngine* STDMETHODCALLTYPE IEE_t(); +HRESULT STDMETHODCALLTYPE GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, DWORD* pdwlength); +LPVOID STDMETHODCALLTYPE EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes); +BOOL STDMETHODCALLTYPE EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem); +void* STDMETHODCALLTYPE GetCLRFunction(LPCSTR functionName); -typedef LPVOID (*pfnEEHeapAllocInProcessHeap)(DWORD dwFlags, SIZE_T dwBytes); -typedef BOOL (*pfnEEHeapFreeInProcessHeap)(DWORD dwFlags, LPVOID lpMem); +typedef LPVOID (STDMETHODCALLTYPE *pfnEEHeapAllocInProcessHeap)(DWORD dwFlags, SIZE_T dwBytes); +typedef BOOL (STDMETHODCALLTYPE *pfnEEHeapFreeInProcessHeap)(DWORD dwFlags, LPVOID lpMem); #endif diff --git a/src/ToolBox/superpmi/superpmi-shim-collector/coreclrcallbacks.cpp b/src/ToolBox/superpmi/superpmi-shim-collector/coreclrcallbacks.cpp index 14a55b5..f0bc271 100644 --- a/src/ToolBox/superpmi/superpmi-shim-collector/coreclrcallbacks.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-collector/coreclrcallbacks.cpp @@ -11,7 +11,7 @@ CoreClrCallbacks* original_CoreClrCallbacks = nullptr; pfnEEHeapAllocInProcessHeap original_EEHeapAllocInProcessHeap = nullptr; pfnEEHeapFreeInProcessHeap original_EEHeapFreeInProcessHeap = nullptr; -IExecutionEngine* IEE_t() +IExecutionEngine* STDMETHODCALLTYPE IEE_t() { interceptor_IEE* iee = new interceptor_IEE(); iee->original_IEE = original_CoreClrCallbacks->m_pfnIEE(); @@ -26,21 +26,21 @@ HRESULT STDMETHODCALLTYPE GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, } */ -LPVOID EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes) +LPVOID STDMETHODCALLTYPE EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes) { if (original_EEHeapAllocInProcessHeap == nullptr) __debugbreak(); return original_EEHeapAllocInProcessHeap(dwFlags, dwBytes); } -BOOL EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem) +BOOL STDMETHODCALLTYPE EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem) { if (original_EEHeapFreeInProcessHeap == nullptr) __debugbreak(); return original_EEHeapFreeInProcessHeap(dwFlags, lpMem); } -void* GetCLRFunction(LPCSTR functionName) +void* STDMETHODCALLTYPE GetCLRFunction(LPCSTR functionName) { if (strcmp(functionName, "EEHeapAllocInProcessHeap") == 0) { diff --git a/src/ToolBox/superpmi/superpmi-shim-counter/coreclrcallbacks.cpp b/src/ToolBox/superpmi/superpmi-shim-counter/coreclrcallbacks.cpp index 14a55b5..f0bc271 100644 --- a/src/ToolBox/superpmi/superpmi-shim-counter/coreclrcallbacks.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-counter/coreclrcallbacks.cpp @@ -11,7 +11,7 @@ CoreClrCallbacks* original_CoreClrCallbacks = nullptr; pfnEEHeapAllocInProcessHeap original_EEHeapAllocInProcessHeap = nullptr; pfnEEHeapFreeInProcessHeap original_EEHeapFreeInProcessHeap = nullptr; -IExecutionEngine* IEE_t() +IExecutionEngine* STDMETHODCALLTYPE IEE_t() { interceptor_IEE* iee = new interceptor_IEE(); iee->original_IEE = original_CoreClrCallbacks->m_pfnIEE(); @@ -26,21 +26,21 @@ HRESULT STDMETHODCALLTYPE GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, } */ -LPVOID EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes) +LPVOID STDMETHODCALLTYPE EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes) { if (original_EEHeapAllocInProcessHeap == nullptr) __debugbreak(); return original_EEHeapAllocInProcessHeap(dwFlags, dwBytes); } -BOOL EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem) +BOOL STDMETHODCALLTYPE EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem) { if (original_EEHeapFreeInProcessHeap == nullptr) __debugbreak(); return original_EEHeapFreeInProcessHeap(dwFlags, lpMem); } -void* GetCLRFunction(LPCSTR functionName) +void* STDMETHODCALLTYPE GetCLRFunction(LPCSTR functionName) { if (strcmp(functionName, "EEHeapAllocInProcessHeap") == 0) { diff --git a/src/ToolBox/superpmi/superpmi-shim-simple/coreclrcallbacks.cpp b/src/ToolBox/superpmi/superpmi-shim-simple/coreclrcallbacks.cpp index 85ceaa2..149fe06 100644 --- a/src/ToolBox/superpmi/superpmi-shim-simple/coreclrcallbacks.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-simple/coreclrcallbacks.cpp @@ -11,7 +11,7 @@ CoreClrCallbacks* original_CoreClrCallbacks = nullptr; pfnEEHeapAllocInProcessHeap original_EEHeapAllocInProcessHeap = nullptr; pfnEEHeapFreeInProcessHeap original_EEHeapFreeInProcessHeap = nullptr; -IExecutionEngine* IEE_t() +IExecutionEngine* STDMETHODCALLTYPE IEE_t() { interceptor_IEE* iee = new interceptor_IEE(); iee->original_IEE = original_CoreClrCallbacks->m_pfnIEE(); @@ -26,17 +26,17 @@ HRESULT STDMETHODCALLTYPE GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, } */ -LPVOID EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes) +LPVOID STDMETHODCALLTYPE EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes) { return original_EEHeapAllocInProcessHeap(dwFlags, dwBytes); } -BOOL EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem) +BOOL STDMETHODCALLTYPE EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem) { return original_EEHeapFreeInProcessHeap(dwFlags, lpMem); } -void* GetCLRFunction(LPCSTR functionName) +void* STDMETHODCALLTYPE GetCLRFunction(LPCSTR functionName) { if (strcmp(functionName, "EEHeapAllocInProcessHeap") == 0) { diff --git a/src/ToolBox/superpmi/superpmi/coreclrcallbacks.cpp b/src/ToolBox/superpmi/superpmi/coreclrcallbacks.cpp index 98fbe69..d96e2be7 100644 --- a/src/ToolBox/superpmi/superpmi/coreclrcallbacks.cpp +++ b/src/ToolBox/superpmi/superpmi/coreclrcallbacks.cpp @@ -8,7 +8,7 @@ #include "coreclrcallbacks.h" #include "iexecutionengine.h" -IExecutionEngine* IEE_t() +IExecutionEngine* STDMETHODCALLTYPE IEE_t() { MyIEE* iee = InitIExecutionEngine(); return iee; @@ -24,7 +24,7 @@ HRESULT STDMETHODCALLTYPE GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, HANDLE ourHeap = nullptr; -LPVOID EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes) +LPVOID STDMETHODCALLTYPE EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes) { if (ourHeap == nullptr) ourHeap = HeapCreate(0, 4096, 0); @@ -39,13 +39,13 @@ LPVOID EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes) return result; } -BOOL EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem) +BOOL STDMETHODCALLTYPE EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem) { // return true; return HeapFree(ourHeap, dwFlags, lpMem); } -void* GetCLRFunction(LPCSTR functionName) +void* STDMETHODCALLTYPE GetCLRFunction(LPCSTR functionName) { if (strcmp(functionName, "EEHeapAllocInProcessHeap") == 0) return (void*)EEHeapAllocInProcessHeap;