Team Fortress 2 Source Code as on 22/4/2020
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.

47 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. // valvelib.cpp : Defines the initialization routines for the DLL.
  9. //
  10. #include "stdafx.h"
  11. #include <afxdllx.h>
  12. #include "valvelib.h"
  13. #include "valvelibaw.h"
  14. #ifdef _PSEUDO_DEBUG
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. static AFX_EXTENSION_MODULE ValvelibDLL = { NULL, NULL };
  19. extern "C" int APIENTRY
  20. DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  21. {
  22. if (dwReason == DLL_PROCESS_ATTACH)
  23. {
  24. TRACE0("VALVELIB.AWX Initializing!\n");
  25. // Extension DLL one-time initialization
  26. AfxInitExtensionModule(ValvelibDLL, hInstance);
  27. // Insert this DLL into the resource chain
  28. new CDynLinkLibrary(ValvelibDLL);
  29. // Register this custom AppWizard with MFCAPWZ.DLL
  30. SetCustomAppWizClass(&Valvelibaw);
  31. }
  32. else if (dwReason == DLL_PROCESS_DETACH)
  33. {
  34. TRACE0("VALVELIB.AWX Terminating!\n");
  35. // Terminate the library before destructors are called
  36. AfxTermExtensionModule(ValvelibDLL);
  37. }
  38. return 1; // ok
  39. }