![]() |
VC 的 BSTR 之引用
一VC的程序如下
#include <windows.h> //個人比較懶 ^^||,也試過DLL專案的 #include "stdafx.h" extern "C" _declspec(dllexport) BSTR ReadString(LPCSTR lpString) { char str[]="Hello ,World!"; if(strcmp(lpString,str)==0) return SysAllocString((BSTR)str); else return SysAllocString((BSTR)lpString); } 編譯下 error 想請問 該 #includ 哪一個標頭檔(xx.h) (沒什麼提問,乾脆自己問 :D ) |
看來好像是使用 OLEAUTO.H 就可以了
不過又是 VB 編譯 OK 但 IDE 環境下卻 錯誤'49' ^^ 看來這個 字串的傳遞還真麻煩 |
所有時間均為台北時間。現在的時間是 06:27 AM。 |
Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2025, Jelsoft Enterprises Ltd.
『服務條款』
* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *