【发布时间】:2013-07-10 00:13:33
【问题描述】:
ATL 类CComBSTR 有一个BSTR 成员m_str 和一个返回m_str 的operator BSTR ()。
现在,如果函数将BSTR * 作为参数,是否可以传递CComBSTR 的地址?
CComBSTR path;
// signature is IzFileFinder::GetDir(CY index, LPBSTR path)
fileFinder->GetDir(INT64toCURRENCY(i), &path);
编译器不抱怨,但如果真的没问题,为什么会起作用?
【问题讨论】:
标签: c++ visual-c++ wrapper atl bstr