1 // MfcControl.cpp : Implementation of CMfcControlApp and DLL registration.
4 #include "MfcControl.h"
9 static char THIS_FILE
[] = __FILE__
;
13 CMfcControlApp NEAR theApp
;
15 const GUID CDECL BASED_CODE _tlid
=
16 { 0xac221fb3, 0xa0d8, 0x11d4, { 0x83, 0x3b, 0, 0x50, 0x4, 0x52, 0x6a, 0xb4 } };
17 const WORD _wVerMajor
= 1;
18 const WORD _wVerMinor
= 0;
21 ////////////////////////////////////////////////////////////////////////////
22 // CMfcControlApp::InitInstance - DLL initialization
24 BOOL
CMfcControlApp::InitInstance()
26 BOOL bInit
= COleControlModule::InitInstance();
30 // TODO: Add your own module initialization code here.
37 ////////////////////////////////////////////////////////////////////////////
38 // CMfcControlApp::ExitInstance - DLL termination
40 int CMfcControlApp::ExitInstance()
42 // TODO: Add your own module termination code here.
44 return COleControlModule::ExitInstance();
48 /////////////////////////////////////////////////////////////////////////////
49 // DllRegisterServer - Adds entries to the system registry
51 STDAPI
DllRegisterServer(void)
53 AFX_MANAGE_STATE(_afxModuleAddrThis
);
55 if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid
))
56 return ResultFromScode(SELFREG_E_TYPELIB
);
58 if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE
))
59 return ResultFromScode(SELFREG_E_CLASS
);
65 /////////////////////////////////////////////////////////////////////////////
66 // DllUnregisterServer - Removes entries from the system registry
68 STDAPI
DllUnregisterServer(void)
70 AFX_MANAGE_STATE(_afxModuleAddrThis
);
72 if (!AfxOleUnregisterTypeLib(_tlid
, _wVerMajor
, _wVerMinor
))
73 return ResultFromScode(SELFREG_E_TYPELIB
);
75 if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE
))
76 return ResultFromScode(SELFREG_E_CLASS
);