BarCode.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // BarCode.cpp : Implementation of CBarCodeApp and DLL registration.
  2. #include "stdafx.h"
  3. #include "BarCode.h"
  4. #ifdef _DEBUG
  5. #define new DEBUG_NEW
  6. #endif
  7. CBarCodeApp NEAR theApp;
  8. const GUID CDECL BASED_CODE _tlid =
  9. { 0x4475DDA7, 0xAF22, 0x4CD3, { 0x9E, 0x43, 0xAC, 0xA4, 0xFC, 0xD4, 0xF4, 0xCC } };
  10. const WORD _wVerMajor = 1;
  11. const WORD _wVerMinor = 0;
  12. // CBarCodeApp::InitInstance - DLL initialization
  13. BOOL CBarCodeApp::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. // CBarCodeApp::ExitInstance - DLL termination
  23. int CBarCodeApp::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. }