首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

在写COM的时候,使用_bstr_t出错!该怎么解决

2012-04-19 
在写COM的时候,使用_bstr_t出错!在编译的时候,提示这个错误,我已经在stdafx.h中加入了#include comdef.h

在写COM的时候,使用_bstr_t出错!
在编译的时候,提示这个错误,我已经在stdafx.h中加入了#include <comdef.h>这个头文件,还是提示下面这个错误,还需要添加什么东西吗?

1>.\xj.idl(19): error MIDL2025: syntax error : expecting a type specification near "_bstr_t"
1>.\xj.idl(19): error MIDL2026: cannot recover from earlier syntax errors; aborting compilation

[解决办法]
Header: comutil.h

Lib: comsuppw.lib or comsuppwd.lib
[解决办法]

探讨

idl中用BSTR

热点排行