惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
Project Zero
Project Zero
T
Tailwind CSS Blog
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
C
Cisco Blogs
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Security Archives - TechRepublic
Security Archives - TechRepublic
H
Heimdal Security Blog
博客园 - 【当耐特】
W
WeLiveSecurity
J
Java Code Geeks
Latest news
Latest news
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Troy Hunt's Blog
博客园 - Franky
月光博客
月光博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
PCI Perspectives
PCI Perspectives
博客园_首页
C
CERT Recently Published Vulnerability Notes
P
Proofpoint News Feed
P
Palo Alto Networks Blog
I
InfoQ
Security Latest
Security Latest
Hacker News: Ask HN
Hacker News: Ask HN
Microsoft Azure Blog
Microsoft Azure Blog
M
MIT News - Artificial intelligence
Help Net Security
Help Net Security
F
Full Disclosure
Cyberwarzone
Cyberwarzone
D
DataBreaches.Net
The Cloudflare Blog
S
Securelist
美团技术团队
C
Cybersecurity and Infrastructure Security Agency CISA
AI
AI
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events

博客园 - tecsun

Base64 Encode and Decode - BCB[转] BCB 控制 Excel类[转] Borland IDE 常用热键简介 WINXP总是默认以Administrator登陆系统,怎样让自建用户启动 [轉]MD5算法(C++实现) [轉]MYSQL 字符集问题 [轉]mysql多种存储引擎及特点 MySQL date/time 不能转换为 System.DateTime的问题[VS2005(C#)+mysql] mysql 相关 [转]写得蛮好的linux学习笔记 VS2005中使用mysql 在ubuntu下使用qq[转] [轉自ccrun by dewbow ] BCB和TTS5.1做中文语音 分割字符串(BCB)(從文本文檔中取出需要的字符串) [C++]BCD碼轉換問題 [轉]我们必须了解的8个dos命令(转自http://www.hxblog.net/article.asp?id=491) [C#][轉]字符转ASCII码,ASCII码转字符 控制外部應用程式的一些記錄(C++) [轉]窗口句柄的获得
char * 与 wchar_t *(BSTR) 转换
tecsun · 2008-04-14 · via 博客园 - tecsun

利用ATL (BCB #include <atl/atlbase.h>)
BSTR->LPSTR  
  BSTR   word;  
  USES_CONVERSION;  
  OLE2A(word);  
   
  char*   ->   BSTR  
  char   buf[10];  
  BSTR   word;  
  USES_CONVERSION;  
  word   =   SysAllocString(A2W(buf)); 
或(不用ATL)
char * ->BSTR
wchar_t buf[4]={char1,char2,char3};
BSTR   word= SysAllocString(buf);