HoursSelector.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // HoursSelector.cpp : Implementation of CHoursSelectorApp and DLL registration.
  2. #include "stdafx.h"
  3. #include "HoursSelector.h"
  4. #ifdef _DEBUG
  5. #define new DEBUG_NEW
  6. #undef THIS_FILE
  7. static char THIS_FILE[] = __FILE__;
  8. #endif
  9. CHoursSelectorApp NEAR theApp;
  10. const GUID CDECL BASED_CODE _tlid =
  11. { 0x446b2f9b, 0xbd68, 0x11d3, { 0xad, 0x63, 0, 0x20, 0xaf, 0xe3, 0, 0x95 } };
  12. const WORD _wVerMajor = 1;
  13. const WORD _wVerMinor = 0;
  14. ////////////////////////////////////////////////////////////////////////////
  15. // CHoursSelectorApp::InitInstance - DLL initialization
  16. BOOL CHoursSelectorApp::InitInstance()
  17. {
  18. BOOL bInit = COleControlModule::InitInstance();
  19. if (bInit)
  20. {
  21. // TODO: Add your own module initialization code here.
  22. }
  23. return bInit;
  24. }
  25. ////////////////////////////////////////////////////////////////////////////
  26. // CHoursSelectorApp::ExitInstance - DLL termination
  27. int CHoursSelectorApp::ExitInstance()
  28. {
  29. // TODO: Add your own module termination code here.
  30. return COleControlModule::ExitInstance();
  31. }
  32. /////////////////////////////////////////////////////////////////////////////
  33. // DllRegisterServer - Adds entries to the system registry
  34. STDAPI DllRegisterServer(void)
  35. {
  36. AFX_MANAGE_STATE(_afxModuleAddrThis);
  37. if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
  38. return ResultFromScode(SELFREG_E_TYPELIB);
  39. if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
  40. return ResultFromScode(SELFREG_E_CLASS);
  41. return NOERROR;
  42. }
  43. /////////////////////////////////////////////////////////////////////////////
  44. // DllUnregisterServer - Removes entries from the system registry
  45. STDAPI DllUnregisterServer(void)
  46. {
  47. AFX_MANAGE_STATE(_afxModuleAddrThis);
  48. if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
  49. return ResultFromScode(SELFREG_E_TYPELIB);
  50. if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
  51. return ResultFromScode(SELFREG_E_CLASS);
  52. return NOERROR;
  53. }