usermode/library/malloc-original/src/dllmain.cpp

00001 #define WIN32_LEAN_AND_MEAN
00002 #include <windows.h>
00003 
00004 #include "config.h"
00005 
00006 extern "C" 
00007 {
00008         // this global data item is used by the app-linked obj to reference libhoard.dll
00009         // asap in the executable - we want libhoard.dll's DllMain to run first...
00010         __declspec(dllexport) int ReferenceMe;
00011 
00012         /*---------------------------------------------------------------------------
00013         **      This is actually the entry point for this Win32 module - specified in the
00014         **      makefile using a linker option: /entry:LibHoardMain. Do NOT link with the
00015         **      CRT to create this DLL. 
00016         */
00017         BOOL WINAPI LibHoardMain(HANDLE hinstDLL, DWORD fdwReason, LPVOID lpreserved)
00018         {
00019                 switch (fdwReason)
00020                 {
00021                         case DLL_PROCESS_ATTACH:
00022                                 //DisableThreadLibraryCalls((HMODULE)hinstDLL);
00023                                 return TRUE;
00024                                 //return PatchMeIn();
00025 
00026                         case DLL_PROCESS_DETACH:
00027                                 //PatchMeOut();
00028                                 return TRUE;
00029                 }
00030                 return FALSE;
00031         }
00032 }       // extern "C"

Generated on Sat Apr 23 11:43:35 2011 for Mnemosyne by  doxygen 1.4.7