标签:dia ace cmd man ada return 默认 int dcom







/ld "$(OutDir)$(TargetName)$(TargetExt)"



#include "stdafx.h" 
// #include <aced.h>  
// #include <rxregsvc.h>  
void initApp();  
void unloadApp(); 
void helloWorld(); 
void initApp()  
{ 
	// register a command with the AutoCAD command mechanism 
	acedRegCmds->addCommand(_T("HELLOWORLD_COMMANDS"), 
		_T("Hello"), 
		_T("Bonjour"), 
		ACRX_CMD_TRANSPARENT, 
		helloWorld); 
} 
void unloadApp()  
{ 
	acedRegCmds->removeGroup(_T("HELLOWORLD_COMMANDS")); 
} 
void helloWorld()  
{ 
	acutPrintf(_T("\nHello World!")); //实现本程序的具体功能
} 
extern "C" AcRx::AppRetCode  
	acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)  
{ 
	switch (msg) 
	{ 
	case AcRx::kInitAppMsg: 
		acrxDynamicLinker->unlockApplication(pkt); 
		acrxRegisterAppMDIAware(pkt); 
		initApp(); 
		break; 
	case AcRx::kUnloadAppMsg: 
		unloadApp(); 
		break; 
	default: 
		break; 
	} 
	return AcRx::kRetOK; 
} 
acrxEntryPoint PRIVATE 
acrxGetApiVersion PRIVATE 











标签:dia ace cmd man ada return 默认 int dcom
原文地址:https://www.cnblogs.com/edata/p/14757953.html