社区
ATL
帖子详情
_bstr_t bstrtxt为什么报“_bstr_t” : 未声明的标识符?
mikelearner
2005-01-21 11:35:12
我是在用ATL写COM的时候出现的,难道要include哪个文件吗?
还有用
CString,也说是“CString” : 未声明的标识符
这个是为什么啊?
谢谢了。
急啊。
...全文
915
3
打赏
收藏
_bstr_t bstrtxt为什么报“_bstr_t” : 未声明的标识符?
我是在用ATL写COM的时候出现的,难道要include哪个文件吗? 还有用 CString,也说是“CString” : 未声明的标识符 这个是为什么啊? 谢谢了。 急啊。
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
sarco
2005-02-26
打赏
举报
回复
comutil.h
wangweixing2000
2005-01-22
打赏
举报
回复
对
numen27
2005-01-21
打赏
举报
回复
#include <comdef.h>
error C2065: ‘_
bstr
_t’ : undeclared identifier
转自VC错误:http://www.vcerror.com/?p=828 问题描述: error C2065: ‘_
bstr
_t’ : undeclared identifier 解决方法: 详细的解决方法可参考VC错误:http://www.vcerror.com/?p=828
error C2065: '_
bstr
_t' : undeclared identifier
VC++ complie error: '_
bstr
_t' : undeclared identifier solution: to write ' #include ' into stdafx.h
未分类--Windows API--_
bstr
_t::_
bstr
_t
Visual C++ Language Reference _
bstr
_t::_
bstr
_t Updated: November 2007 Microsoft Specific Constructs a _
bstr
_t object. 构造一个 _
bstr
_t 对象。 _
bstr
_t( ) throw( ); _
bstr
_t( const _
bstr
_
_
bstr
_t类型
1._
bstr
_t是个对
bstr
的类,具体定义可以看comutil.h。 com组件传输字符串有固定的标准,就是
bstr
,这样才能在不同的语言里调用,试想你传的是c的某个字符串类型,vb又如何调用呢?ado是个com组件所以传的也是
bstr
,使用_
bstr
_t不但方便接收,而且方便处理。 2.严格地说_
bstr
_t不属于对
bstr
的类,它可以直接转换成
bstr
型,也可以直接转换成普通
_
bstr
_t与CString相互转换
_
bstr
_t与CString相互转换 _
bstr
_t
bstr
; CString strSql; CString -> _
bstr
_t:
bstr
= (_
bstr
_t)strSql; _
bstr
_t -> CString: strSql = (LPCSTR)
bstr
;
BSTR
宽字符串与CString相互转换
BSTR
bstr
;
ATL
3,248
社区成员
48,529
社区内容
发帖
与我相关
我的任务
ATL
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
复制链接
扫一扫
分享
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章