Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.8 KiB

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