#include "xxx_i.c" //包含了相应的GUID定义文件
#include "xxx.h"
...
Class CMyClass :
...
public IDispEventImpl<0,CDataSink,&DIID__IMyEvents,&LIBID_IMyLib>
{
...
}编译时出现错误:
error C2970: 'IDispEventImpl' : template argument 'pdiid' : invalid address of static variable 'DIID__IMyEvents'何解??????
#include "xxx.h"
...
Class CMyClass :
...
public IDispEventImpl<0,CDataSink,&DIID__IMyEvents,&LIBID_IMyLib>
{
...
}编译时出现错误:
error C2970: 'IDispEventImpl' : template argument 'pdiid' : invalid address of static variable 'DIID__IMyEvents'何解??????
它必须定义为一个GUID的结构才行的