ArMaX.cpp
Upload User: kairuinn
Upload Date: 2009-02-07
Package Size: 2922k
Code Size: 2k
Category:

Graph program

Development Platform:

Visual C++

  1. // ArMaX.cpp : Implementation of CArMaXApp and DLL registration.
  2. #include "stdafx.h"
  3. #include "ArMaX.h"
  4. #ifdef _DEBUG
  5. #define new DEBUG_NEW
  6. #endif
  7. CArMaXApp NEAR theApp;
  8. const GUID CDECL BASED_CODE _tlid =
  9. { 0xFBB21704, 0xA554, 0x42C7, { 0xAA, 0xCB, 0xFE, 0xAE, 0x92, 0xE, 0x8D, 0xAC } };
  10. const WORD _wVerMajor = 1;
  11. const WORD _wVerMinor = 0;
  12. // CArMaXApp::InitInstance - DLL initialization
  13. BOOL CArMaXApp::InitInstance()
  14. {
  15. BOOL bInit = COleControlModule::InitInstance();
  16. if (bInit)
  17. {
  18. // TODO: Add your own module initialization code here.
  19. }
  20. return bInit;
  21. }
  22. // CArMaXApp::ExitInstance - DLL termination
  23. int CArMaXApp::ExitInstance()
  24. {
  25. // TODO: Add your own module termination code here.
  26. return COleControlModule::ExitInstance();
  27. }
  28. // DllRegisterServer - Adds entries to the system registry
  29. STDAPI DllRegisterServer(void)
  30. {
  31. AFX_MANAGE_STATE(_afxModuleAddrThis);
  32. if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
  33. return ResultFromScode(SELFREG_E_TYPELIB);
  34. if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
  35. return ResultFromScode(SELFREG_E_CLASS);
  36. return NOERROR;
  37. }
  38. // DllUnregisterServer - Removes entries from the system registry
  39. STDAPI DllUnregisterServer(void)
  40. {
  41. AFX_MANAGE_STATE(_afxModuleAddrThis);
  42. if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
  43. return ResultFromScode(SELFREG_E_TYPELIB);
  44. if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
  45. return ResultFromScode(SELFREG_E_CLASS);
  46. return NOERROR;
  47. }