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.

89 lines
2.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: ctv.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. // ctv.cpp : Implementation of CCtvApp and DLL registration.
  11. #include "stdafx.h"
  12. #include "ctv.h"
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. CCtvApp NEAR theApp;
  19. const GUID CDECL BASED_CODE _tlid =
  20. { 0xcd6c7865, 0x5864, 0x11d0, { 0xab, 0xf0, 0, 0x20, 0xaf, 0x6b, 0xb, 0x7a } };
  21. const WORD _wVerMajor = 1;
  22. const WORD _wVerMinor = 0;
  23. ////////////////////////////////////////////////////////////////////////////
  24. // CCtvApp::InitInstance - DLL initialization
  25. BOOL CCtvApp::InitInstance()
  26. {
  27. BOOL bInit = COleControlModule::InitInstance();
  28. if (bInit)
  29. {
  30. // TODO: Add your own module initialization code here.
  31. }
  32. return bInit;
  33. }
  34. ////////////////////////////////////////////////////////////////////////////
  35. // CCtvApp::ExitInstance - DLL termination
  36. int CCtvApp::ExitInstance()
  37. {
  38. // TODO: Add your own module termination code here.
  39. return COleControlModule::ExitInstance();
  40. }
  41. /////////////////////////////////////////////////////////////////////////////
  42. // DllRegisterServer - Adds entries to the system registry
  43. STDAPI DllRegisterServer(void)
  44. {
  45. AFX_MANAGE_STATE(_afxModuleAddrThis);
  46. if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
  47. return ResultFromScode(SELFREG_E_TYPELIB);
  48. if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
  49. return ResultFromScode(SELFREG_E_CLASS);
  50. return NOERROR;
  51. }
  52. /////////////////////////////////////////////////////////////////////////////
  53. // DllUnregisterServer - Removes entries from the system registry
  54. STDAPI DllUnregisterServer(void)
  55. {
  56. AFX_MANAGE_STATE(_afxModuleAddrThis);
  57. if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
  58. return ResultFromScode(SELFREG_E_TYPELIB);
  59. if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
  60. return ResultFromScode(SELFREG_E_CLASS);
  61. return NOERROR;
  62. }