[build] Skips RemoteExecuted bases tests on monodroid
[mono-project.git] / mono / mini / mini-windows-dllmain.c
blob2a8200500b02fa7bb53b9ae9562eabfda6b0d0ba
1 /**
2 * \file
3 * DllMain entry point.
5 * (C) 2002-2003 Ximian, Inc.
6 * (C) 2003-2006 Novell, Inc.
7 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
8 */
10 #include <mono/metadata/coree.h>
11 #include <mono/metadata/gc-internals.h>
12 #include <mono/metadata/domain-internals.h>
13 #include <mono/utils/mono-threads.h>
14 #include "mini.h"
15 #include "mini-runtime.h"
17 #ifdef HOST_WIN32
18 #include <windows.h>
20 BOOL APIENTRY DllMain (HMODULE module_handle, DWORD reason, LPVOID reserved)
22 if (!mono_gc_dllmain (module_handle, reason, reserved))
23 return FALSE;
25 switch (reason)
27 case DLL_PROCESS_ATTACH:
28 mono_install_runtime_load (mini_init);
29 break;
30 case DLL_PROCESS_DETACH:
31 if (coree_module_handle)
32 FreeLibrary (coree_module_handle);
33 break;
34 case DLL_THREAD_DETACH:
35 mono_thread_info_detach ();
36 break;
39 return TRUE;
41 #endif