const char* Name;
};
-extern "C" void GC_VersionInfo(
+extern "C" void LOCALGC_CALLCONV GC_VersionInfo(
/* Out */ VersionInfo*
);
```
GC. It does so by loading (via `GetProcAddress`) and executing a function with this signature:
```c++
-extern "C" HRESULT GC_Initialize(
+extern "C" HRESULT LOCALGC_CALLCONV GC_Initialize(
/* In */ IGCToCLR*,
/* Out */ IGCHeap**.
/* Out */ IGCHandleManager**,
const char* Name;
};
-typedef void (*GC_VersionInfoFunction)(
+#ifdef TARGET_X86
+#define LOCALGC_CALLCONV __cdecl
+#else
+#define LOCALGC_CALLCONV
+#endif
+
+typedef void (LOCALGC_CALLCONV *GC_VersionInfoFunction)(
/* Out */ VersionInfo*
);
-typedef HRESULT (*GC_InitializeFunction)(
+typedef HRESULT (LOCALGC_CALLCONV *GC_InitializeFunction)(
/* In */ IGCToCLR*,
/* Out */ IGCHeap**,
/* Out */ IGCHandleManager**,
extern void PopulateHandleTableDacVars(GcDacVars* dacVars);
GC_EXPORT
-void
+void LOCALGC_CALLCONV
GC_VersionInfo(/* InOut */ VersionInfo* info)
{
#ifdef BUILD_AS_STANDALONE
}
GC_EXPORT
-HRESULT
+HRESULT LOCALGC_CALLCONV
GC_Initialize(
/* In */ IGCToCLR* clrToGC,
/* Out */ IGCHeap** gcHeap,
#include "gcdesc.h"
+#ifdef TARGET_X86
+#define LOCALGC_CALLCONV __cdecl
+#else
+#define LOCALGC_CALLCONV
+#endif
+
//
// The fast paths for object allocation and write barriers is performance critical. They are often
// hand written in assembly code, etc.
ErectWriteBarrier(dst, ref);
}
-extern "C" HRESULT GC_Initialize(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleManager** gcHandleManager, GcDacVars* gcDacVars);
+extern "C" HRESULT LOCALGC_CALLCONV GC_Initialize(IGCToCLR* clrToGC, IGCHeap** gcHeap, IGCHandleManager** gcHandleManager, GcDacVars* gcDacVars);
int __cdecl main(int argc, char* argv[])
{
// GC entrypoints for the linked-in GC. These symbols are invoked
// directly if we are not using a standalone GC.
-extern "C" void GC_VersionInfo(/* Out */ VersionInfo* info);
-extern "C" HRESULT GC_Initialize(
+extern "C" void LOCALGC_CALLCONV GC_VersionInfo(/* Out */ VersionInfo* info);
+extern "C" HRESULT LOCALGC_CALLCONV GC_Initialize(
/* In */ IGCToCLR* clrToGC,
/* Out */ IGCHeap** gcHeap,
/* Out */ IGCHandleManager** gcHandleManager,