home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / appwiz / logowiz / logowiz.cpp < prev    next >
C/C++ Source or Header  |  1998-03-05  |  1KB  |  50 lines

  1. // logowiz.cpp : Defines the initialization routines for the DLL.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "stdafx.h"
  14. #include <afxdllx.h>
  15. #include "logowiz.h"
  16. #include "logowaw.h"
  17.  
  18. #ifdef _PSEUDO_DEBUG
  19. #undef THIS_FILE
  20. static char THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23. static AFX_EXTENSION_MODULE logowizDLL = { NULL, NULL };
  24.  
  25. extern "C" int APIENTRY
  26. DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  27. {
  28.     if (dwReason == DLL_PROCESS_ATTACH)
  29.     {
  30.         TRACE0("LOGOWIZ.AWX Initializing!\n");
  31.  
  32.         // Extension DLL one-time initialization
  33.         AfxInitExtensionModule(logowizDLL, hInstance);
  34.  
  35.         // Insert this DLL into the resource chain
  36.         new CDynLinkLibrary(logowizDLL);
  37.  
  38.         // Register this custom AppWizard with MFCAPWZ.DLL
  39.         SetCustomAppWizClass(&logowizaw);
  40.     }
  41.     else if (dwReason == DLL_PROCESS_DETACH)
  42.     {
  43.         TRACE0("LOGOWIZ.AWX Terminating!\n");
  44.  
  45.         // Terminate the library before destructors are called
  46.         AfxTermExtensionModule(logowizDLL);
  47.     }
  48.     return 1;   // ok
  49. }
  50.