reshuffling of dlls
[reactos.git] / reactos / dll / win32 / imagehlp / imagehlp_main.c
1 /*
2 * IMAGEHLP library
3 *
4 * Copyright 1998 Patrik Stridvall
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21
22 /* INCLUDES ******************************************************************/
23
24 #include "precomp.h"
25
26 //#define NDEBUG
27 #include <debug.h>
28
29 /* DATA **********************************************************************/
30
31 HANDLE IMAGEHLP_hHeap = NULL;
32
33 /* FUNCTIONS *****************************************************************/
34
35 BOOL
36 IMAGEAPI
37 DllMain(HINSTANCE hinstDLL,
38 DWORD fdwReason,
39 LPVOID lpvReserved)
40 {
41 switch(fdwReason)
42 {
43 case DLL_PROCESS_ATTACH:
44 DisableThreadLibraryCalls(hinstDLL);
45 IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
46 break;
47 case DLL_PROCESS_DETACH:
48 HeapDestroy(IMAGEHLP_hHeap);
49 IMAGEHLP_hHeap = NULL;
50 break;
51 default:
52 break;
53 }
54
55 return TRUE;
56 }