[DEVMGR]
authorGed Murphy <gedmurphy@reactos.org>
Mon, 19 Oct 2015 07:04:17 +0000 (07:04 +0000)
committerGed Murphy <gedmurphy@reactos.org>
Mon, 19 Oct 2015 07:04:17 +0000 (07:04 +0000)
- Explicitly state that we want to build DllMain without name mangling
See issue 10347 for more details.

svn path=/trunk/; revision=69612

reactos/dll/win32/devmgr/api.cpp

index b053bce..1404d0a 100644 (file)
@@ -784,24 +784,6 @@ DeviceManagerPrintW(LPCWSTR lpMachineName,
     return FALSE;
 }
 
-
-BOOL
-WINAPI
-DllMain(IN HINSTANCE hinstDLL,
-IN DWORD dwReason,
-IN LPVOID lpvReserved)
-{
-    switch (dwReason)
-    {
-        case DLL_PROCESS_ATTACH:
-            DisableThreadLibraryCalls(hinstDLL);
-            hDllInstance = hinstDLL;
-            break;
-    }
-
-    return TRUE;
-}
-
 class CDevMgrUIModule : public CComModule
 {
 public:
@@ -827,4 +809,24 @@ STDAPI DllRegisterServer()
 STDAPI DllUnregisterServer()
 {
     return gModule.DllUnregisterServer(FALSE);
+}
+
+extern "C" {
+
+BOOL
+WINAPI
+DllMain(_In_ HINSTANCE hinstDLL,
+        _In_ DWORD dwReason,
+        _In_ LPVOID lpvReserved)
+{
+    switch (dwReason)
+    {
+        case DLL_PROCESS_ATTACH:
+            DisableThreadLibraryCalls(hinstDLL);
+            hDllInstance = hinstDLL;
+            break;
+    }
+
+    return TRUE;
+}
 }
\ No newline at end of file