diff --git a/src/corehost/cli/coreclr.cpp b/src/corehost/cli/coreclr.cpp index 780b7ca4e..c8aafc2fe 100644 --- a/src/corehost/cli/coreclr.cpp +++ b/src/corehost/cli/coreclr.cpp @@ -9,7 +9,7 @@ static pal::dll_t g_coreclr = nullptr; // Prototype of the coreclr_initialize function from coreclr.dll -typedef pal::hresult_t(__stdcall *coreclr_initialize_fn)( +typedef pal::hresult_t(STDMETHODCALLTYPE *coreclr_initialize_fn)( const char* exePath, const char* appDomainFriendlyName, int propertyCount, @@ -19,12 +19,12 @@ typedef pal::hresult_t(__stdcall *coreclr_initialize_fn)( unsigned int* domainId); // Prototype of the coreclr_shutdown function from coreclr.dll -typedef pal::hresult_t(__stdcall *coreclr_shutdown_fn)( +typedef pal::hresult_t(STDMETHODCALLTYPE *coreclr_shutdown_fn)( coreclr::host_handle_t hostHandle, unsigned int domainId); // Prototype of the coreclr_execute_assembly function from coreclr.dll -typedef pal::hresult_t(__stdcall *coreclr_execute_assembly_fn)( +typedef pal::hresult_t(STDMETHODCALLTYPE *coreclr_execute_assembly_fn)( coreclr::host_handle_t hostHandle, unsigned int domainId, int argc, diff --git a/src/corehost/common/pal.h b/src/corehost/common/pal.h index 826f26426..dd4deab7a 100644 --- a/src/corehost/common/pal.h +++ b/src/corehost/common/pal.h @@ -77,6 +77,8 @@ namespace pal #define SHARED_API #endif + #define STDMETHODCALLTYPE __stdcall + typedef wchar_t char_t; typedef std::wstring string_t; typedef std::wstringstream stringstream_t; @@ -107,6 +109,11 @@ namespace pal #define SHARED_API #endif + #define __cdecl /* nothing */ + #define __stdcall /* nothing */ + #define __fastcall /* nothing */ + #define STDMETHODCALLTYPE __stdcall + typedef char char_t; typedef std::string string_t; typedef std::stringstream stringstream_t;