一. COM_INTERFACE_ENTRY2类型转换失败处理
在学习WTL过程中, 用VS2005打开以前VC6的工程, 报这个错
错误描述如下:
1>d:/visual studio 2005/projects/iehost/maindlg.h(112) : error C2440: 'static_cast' : cannot convert from 'ATL::IDispEventSimpleImpl<nID,T,pdiid> *' to 'IDispatch *'
1> with
1> [
1> nID=37,
1> T=CMainDlg,
1> pdiid=& DIID_DWebBrowserEvents2
1> ]
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>d:/visual studio 2005/projects/iehost/maindlg.h(112) : error C2440: 'initializing' : cannot convert from 'ATL::_ATL_CREATORARGFUNC (__stdcall *)' to 'DWORD_PTR'
1> There is no context in which this conversion is possible
1>maindlg.cpp
1>d:/visual studio 2005/projects/iehost/maindlg.h(112) : error C2440: 'static_cast' : cannot convert from 'ATL