home *** CD-ROM | disk | FTP | other *** search
- /*
- Module : DTIME.cpp
- Purpose: Defines the initialization routines for the DLL.
- Created: PJN / DATE/1 / 22-02-1996
- History: None
-
- Copyright (c) 1995 by PJ Naughter.
- All rights reserved.
-
- */
-
- ///////////////////////////////// Includes //////////////////////////////////
- #include "stdafx.h"
- #include <memory.h>
- #include "dtime.h"
- #include <afxdllx.h>
-
-
-
- ///////////////////////////////// Locals //////////////////////////////////////
- #ifdef _WINDOWS
- static AFX_EXTENSION_MODULE DtimeDLL = { NULL, NULL };
- #endif
-
-
- ///////////////////////////////// Macros ////////////////////////////////////
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
-
-
- /////////////////////////////// Implementation ////////////////////////////////
- extern "C" int APIENTRY DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
- {
- if (dwReason == DLL_PROCESS_ATTACH)
- {
- TRACE0("DTIME Extension DLL Initializing\n");
-
- // Extension DLL one-time initialization
- AfxInitExtensionModule(DtimeDLL, hInstance);
-
- // Insert this DLL into the resource chain
- new CDynLinkLibrary(DtimeDLL);
-
- //Display some TRACE statements about the version of the DTime dll
- WORD wDTimeVer = ::GetDTimeVersion();
- CString sVer;
- sVer.Format(CString("%d.%02d"), HIBYTE(wDTimeVer), LOBYTE(wDTimeVer));
-
- #ifdef _UNICODE
- TRACE1("(32 bit Unicode Debug Build) Version: %s (C) PJ Naughter 1996\n", sVer);
- #else
- TRACE1("(32 bit Ascii Debug Build) Version: %s (C) PJ Naughter 1996\n", sVer);
- #endif
- }
- else if (dwReason == DLL_PROCESS_DETACH)
- TRACE0("DTIME Extension DLL Terminating\n");
-
- return 1; // ok
- }
-
- WORD GetDTimeVersion()
- {
- return 0x0200; //v1.0 Original Release
-
- //v1.1 Port to Win16, Dos
-
- //v1.11 Minor tweaks, Translation to German
-
- //v2.0 UI Enhancements, Close Integration with Win32 NLSAPI,
- // Dropped support for DOS, Win16 and Win32s,
- // Numerous bug fixes to underlying classes
- }
-
- void AboutDTime()
- {
- CDTimeReminderDlg dlg;
- dlg.DoModal();
- }
-
-
-