【VC开源代码栏目提醒】:网学会员--在 VC开源代码编辑为广大网友搜集整理了:myActiveX.cpp绩等信息,祝愿广大网友取得需要的信息,参考学习。
// myActiveX.cpp : CmyActiveXApp 和 DLL 注册的实现。
#include "stdafx.h"
#include "myActiveX.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
CmyActiveXApp NEAR theApp;
const GUID CDECL BASED_CODE _tlid =
{ 0x5E9CA1A6, 0xB3EE, 0x4A33, { 0x8E, 0x6E, 0x53, 0x6C, 0x6E, 0x1F, 0xE1, 0x8 } };
const WORD _wVerMajor = 1;
const WORD _wVerMinor = 0;
// CmyActiveXApp::InitInstance - DLL 初始化
BOOL CmyActiveXApp::InitInstance()
{
BOOL bInit = COleControlModule::InitInstance();
if (bInit)
{
// TODO: 在此添加您自己的模块初始化代码。
}
return bInit;
}
// CmyActiveXApp::ExitInstance - DLL 终止
int CmyActiveXApp::ExitInstance()
{
// TODO: 在此添加您自己的模块终止代码。
return COleControlModule::ExitInstance();
}
// DllRegisterServer - 将项添加到系统注册表
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 - 将项从系统注册表中移除
STDAPI DllUnregisterServer(void)
{
AFX_MANAGE_STATE(_afxModuleAddrThis);
if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
return ResultFromScode(SELFREG_E_TYPELIB);
if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
return ResultFromScode(SELFREG_E_CLASS);
return NOERROR;
}
上一篇:
My.cpp
下一篇:
亚洲中小企业融资的发展趋势及对策思考