home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / C_C++ / BisonFlexWizard / data1.cab / Src / Wizard / Parser.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-16  |  971 b   |  41 lines

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