Leaked source code of windows server 2003
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.

68 lines
1.9 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. CCtvApp NEAR theApp;
  14. const GUID CDECL BASED_CODE _tlid =
  15. { 0xcd6c7865, 0x5864, 0x11d0, { 0xab, 0xf0, 0, 0x20, 0xaf, 0x6b, 0xb, 0x7a } };
  16. const WORD _wVerMajor = 1;
  17. const WORD _wVerMinor = 0;
  18. ////////////////////////////////////////////////////////////////////////////
  19. // CCtvApp::InitInstance - DLL initialization
  20. BOOL CCtvApp::InitInstance()
  21. {
  22. BOOL bInit = COleControlModule::InitInstance();
  23. return bInit;
  24. }
  25. ////////////////////////////////////////////////////////////////////////////
  26. // CCtvApp::ExitInstance - DLL termination
  27. int CCtvApp::ExitInstance()
  28. {
  29. return COleControlModule::ExitInstance();
  30. }
  31. /////////////////////////////////////////////////////////////////////////////
  32. // DllRegisterServer - Adds entries to the system registry
  33. STDAPI DllRegisterServer(void)
  34. {
  35. AFX_MANAGE_STATE(_afxModuleAddrThis);
  36. if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
  37. return ResultFromScode(SELFREG_E_TYPELIB);
  38. if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
  39. return ResultFromScode(SELFREG_E_CLASS);
  40. return NOERROR;
  41. }
  42. /////////////////////////////////////////////////////////////////////////////
  43. // DllUnregisterServer - Removes entries from the system registry
  44. STDAPI DllUnregisterServer(void)
  45. {
  46. AFX_MANAGE_STATE(_afxModuleAddrThis);
  47. if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
  48. return ResultFromScode(SELFREG_E_TYPELIB);
  49. if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
  50. return ResultFromScode(SELFREG_E_CLASS);
  51. return NOERROR;
  52. }