Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CComBST - > LPCTSTR

Status
Not open for further replies.

bobetko

Programmer
Jan 14, 2003
155
US
I am trying to convert CComBST type to LPCTSTR type and I am using this code

Code:
CComBSTR myParam = "url=";
CComBSTR myLoc;
m_spWebBrowser2->get_LocationURL(&myLoc);
myParam.Append(myLoc);
_bstr_t bstrInterm(myParam);
MessageBox(NULL, (LPCTSTR)bstrInterm, "", NULL);

But compiler is giving me error:
error C2065: '_bstr_t' : undeclared identifier

What I am doing wrong?
I tried to include comutil.h, but that only produced some other erors.

I am using ATL.

Where can I learn more about these types: BSTR, CComBSTR, LPCTSTR, LPCSTR, etc.... getting lost here....


Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top