• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

E:/PROJECTS/cvsed/mixed/VIRTUA~1/kdclient/dllmain.cpp

Go to the documentation of this file.
00001 
00007 #include "stdafx.h"
00008 
00009 bool HookVmware(HINSTANCE hThisDLL);
00010 void UnhookVmware();
00011 
00012 HMODULE g_hThisDll = 0;
00013 
00014 BOOL APIENTRY DllMain( HMODULE hModule,
00015                        DWORD  ul_reason_for_call,
00016                        LPVOID lpReserved
00017                                          )
00018 {
00019         switch (ul_reason_for_call)
00020         {
00021         case DLL_PROCESS_ATTACH:
00022                 g_hThisDll = hModule;
00023                 if (!HookVmware((HINSTANCE)hModule))
00024                         return FALSE;
00025                 break;
00026         case DLL_THREAD_ATTACH:
00027         case DLL_THREAD_DETACH:
00028                 break;
00029         case DLL_PROCESS_DETACH:
00030                 UnhookVmware();
00031                 break;
00032         }
00033         return TRUE;
00034 }
00035