在stdafx.h中包含语句
#include <atlbase.h>
extern CComModule _Module;
#include <atlcom.h>编译时会有如下提示,请大侠指点明路,谢谢DOPCDlg.obj : error LNK2001: unresolved external symbol "class ATL::CComModule _Module" (?_Module@@3VCComModule@ATL@@A)
#include <atlbase.h>
extern CComModule _Module;
#include <atlcom.h>编译时会有如下提示,请大侠指点明路,谢谢DOPCDlg.obj : error LNK2001: unresolved external symbol "class ATL::CComModule _Module" (?_Module@@3VCComModule@ATL@@A)
需要在CPP中定义后才能在其他文件中使用extern引用。
我是COM初学者,本来COM出来已经这么多年,一直没有兴趣去学,
奈何最近工作中要求用到OPC(基于COM的技术),只好硬着头皮上了!