From: http://community.youkuaiyun.com/expert/Topicview2.asp?id=4853965
A:There are two header files in VC.NET, one in Vc7/include and the other in Vc7/PlatformSDK/include. The former splits off the smart pointer typedefs into comdefsp.h, and it doesn't include IContextMenu. The latter does. You can try to #include the PlatformSDK header directly, change your INCLUDE path order, or supply the missing typedef yourself, e.g.
struct __declspec(uuid("000214e4-0000-0000-c000-000000000046"))
IContextMenu;
_COM_SMARTPTR_TYPEDEF(IContextMenu, __uuidof(IContextMenu));
本文讨论了VC.NET中关于IContextMenu定义存在的两个不同头文件的问题,并提供了三种解决方案:直接包含PlatformSDK头文件、调整包含路径顺序或自行提供缺失的类型定义。
2731

被折叠的 条评论
为什么被折叠?



