gui_dialogs.cpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:2k
源码类别:

生物技术

开发平台:

C/C++

  1. /*
  2.  * ===========================================================================
  3.  * PRODUCTION $Log: gui_dialogs.cpp,v $
  4.  * PRODUCTION Revision 1000.0  2003/10/28 19:20:47  gouriano
  5.  * PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.1
  6.  * PRODUCTION
  7.  * ===========================================================================
  8.  */
  9. // gui_dialogs.cpp : Defines the initialization routines for the DLL.
  10. //
  11. #include "stdafx.h"
  12. #include <afxdllx.h>
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. static AFX_EXTENSION_MODULE Gui_dialogsDLL = { NULL, NULL };
  19. extern "C" int APIENTRY
  20. DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  21. {
  22. // Remove this if you use lpReserved
  23. UNREFERENCED_PARAMETER(lpReserved);
  24. if (dwReason == DLL_PROCESS_ATTACH)
  25. {
  26. TRACE0("GUI_DIALOGS.DLL Initializing!n");
  27. // Extension DLL one-time initialization
  28. if (!AfxInitExtensionModule(Gui_dialogsDLL, hInstance))
  29. return 0;
  30. // Insert this DLL into the resource chain
  31. // NOTE: If this Extension DLL is being implicitly linked to by
  32. //  an MFC Regular DLL (such as an ActiveX Control)
  33. //  instead of an MFC application, then you will want to
  34. //  remove this line from DllMain and put it in a separate
  35. //  function exported from this Extension DLL.  The Regular DLL
  36. //  that uses this Extension DLL should then explicitly call that
  37. //  function to initialize this Extension DLL.  Otherwise,
  38. //  the CDynLinkLibrary object will not be attached to the
  39. //  Regular DLL's resource chain, and serious problems will
  40. //  result.
  41. new CDynLinkLibrary(Gui_dialogsDLL);
  42. }
  43. else if (dwReason == DLL_PROCESS_DETACH)
  44. {
  45. TRACE0("GUI_DIALOGS.DLL Terminating!n");
  46. // Terminate the library before destructors are called
  47. AfxTermExtensionModule(Gui_dialogsDLL);
  48. }
  49. return 1;   // ok
  50. }