Link to home
Start Free TrialLog in
Avatar of 401980
401980

asked on

Convert BSTR to LPTSTR

How do I convert from BSTR that are use with ATL to LPTSTR
ASKER CERTIFIED SOLUTION
Avatar of mbhakta
mbhakta

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 401980
401980

ASKER

I'm not using MFC.
BSTR is nothing but a typedef of OLECHAR. OLECHAR is nothing but a #def of  WCHAR. This is nothing but LPCTSTR if seen properly. Further down if you use the famous API , MultiByteToWideChar()the output is a LPCSTR.