home *** CD-ROM | disk | FTP | other *** search
/ PC go! 2008 April / PCgo 2008-04 (DVD).iso / interface / contents / demoversionen_3846 / 13664 / files / Data1.cab / sdkdemo.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-16  |  2.5 KB  |  90 lines

  1. /******************************************************************/
  2. /*                                                                */
  3. /*                      TurboCAD for Windows                      */
  4. /*                   Copyright (c) 1993 - 2001                    */
  5. /*             International Microcomputer Software, Inc.         */
  6. /*                            (IMSI)                              */
  7. /*                      All rights reserved.                      */
  8. /*                                                                */
  9. /******************************************************************/
  10.  
  11. // SDKDemo.cpp : Implementation of CSDKDemoApp and DLL registration.
  12.  
  13. #include "stdafx.h"
  14. #include "SDKDemo.h"
  15.  
  16. #ifdef _DEBUG
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22.  
  23. CSDKDemoApp NEAR theApp;
  24.  
  25. const GUID CDECL BASED_CODE _tlid =
  26.         { 0xa63e6661, 0xc85f, 0x11d0, { 0x9b, 0x3b, 0x44, 0x45, 0x53, 0x54, 0, 0 } };
  27. const WORD _wVerMajor = 1;
  28. const WORD _wVerMinor = 0;
  29.  
  30.  
  31. ////////////////////////////////////////////////////////////////////////////
  32. // CSDKDemoApp::InitInstance - DLL initialization
  33.  
  34. BOOL CSDKDemoApp::InitInstance()
  35. {
  36.     BOOL bInit = COleControlModule::InitInstance();
  37.  
  38.     if (bInit)
  39.     {
  40.         // TODO: Add your own module initialization code here.
  41.     }
  42.  
  43.     return bInit;
  44. }
  45.  
  46.  
  47. ////////////////////////////////////////////////////////////////////////////
  48. // CSDKDemoApp::ExitInstance - DLL termination
  49.  
  50. int CSDKDemoApp::ExitInstance()
  51. {
  52.     // TODO: Add your own module termination code here.
  53.  
  54.     return COleControlModule::ExitInstance();
  55. }
  56.  
  57.  
  58. /////////////////////////////////////////////////////////////////////////////
  59. // DllRegisterServer - Adds entries to the system registry
  60.  
  61. STDAPI DllRegisterServer(void)
  62. {
  63.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  64.  
  65.     if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
  66.         return ResultFromScode(SELFREG_E_TYPELIB);
  67.  
  68.     if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
  69.         return ResultFromScode(SELFREG_E_CLASS);
  70.  
  71.     return NOERROR;
  72. }
  73.  
  74.  
  75. /////////////////////////////////////////////////////////////////////////////
  76. // DllUnregisterServer - Removes entries from the system registry
  77.  
  78. STDAPI DllUnregisterServer(void)
  79. {
  80.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  81.  
  82.     if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
  83.         return ResultFromScode(SELFREG_E_TYPELIB);
  84.  
  85.     if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
  86.         return ResultFromScode(SELFREG_E_CLASS);
  87.  
  88.     return NOERROR;
  89. }
  90.