Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
755 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: returns the module handle of the game dll
  4. // this is in its own file to protect it from tier0 PROTECTED_THINGS
  5. //=============================================================================//
  6. #if defined(_WIN32)
  7. #include "winlite.h"
  8. extern HMODULE win32DLLHandle;
  9. #elif defined(POSIX)
  10. #include <stdio.h>
  11. #include "tier0/dbg.h"
  12. #endif
  13. // memdbgon must be the last include file in a .cpp file!!!
  14. #include "tier0/memdbgon.h"
  15. void *GetGameModuleHandle()
  16. {
  17. #if defined(_WIN32)
  18. return (void *)win32DLLHandle;
  19. #elif defined(POSIX)
  20. Assert(0);
  21. return NULL; // NOT implemented
  22. #else
  23. #error "GetGameModuleHandle() needs to be implemented"
  24. #endif
  25. }