home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Using Visual C++ 4 (Special Edition)
/
Using_Visual_C_4_Special_Edition_QUE_1996.iso
/
ch11
/
calen.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-23
|
2KB
|
80 lines
// Calen.cpp : Implementation of CCalenApp and DLL registration.
#include "stdafx.h"
#include "Calen.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CCalenApp NEAR theApp;
const GUID CDECL BASED_CODE _tlid =
{ 0xf0464dd0, 0xd57, 0x11cf, { 0xb4, 0xcd, 0, 0x80, 0xc8, 0x1a, 0x39, 0x7c } };
const WORD _wVerMajor = 1;
const WORD _wVerMinor = 0;
////////////////////////////////////////////////////////////////////////////
// CCalenApp::InitInstance - DLL initialization
BOOL CCalenApp::InitInstance()
{
BOOL bInit = COleControlModule::InitInstance();
if (bInit)
{
// TODO: Add your own module initialization code here.
}
return bInit;
}
////////////////////////////////////////////////////////////////////////////
// CCalenApp::ExitInstance - DLL termination
int CCalenApp::ExitInstance()
{
// TODO: Add your own module termination code here.
return COleControlModule::ExitInstance();
}
/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleUnregisterTypeLib(_tlid))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}