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.
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>
15 #include "mini-runtime.h"
20 BOOL APIENTRY
DllMain (HMODULE module_handle
, DWORD reason
, LPVOID reserved
)
22 if (!mono_gc_dllmain (module_handle
, reason
, reserved
))
27 case DLL_PROCESS_ATTACH
:
28 mono_install_runtime_load (mini_init
);
30 case DLL_PROCESS_DETACH
:
31 if (coree_module_handle
)
32 FreeLibrary (coree_module_handle
);
34 case DLL_THREAD_DETACH
:
35 mono_thread_info_detach ();