We help IT Professionals succeed at work.

Convert BSTR to LPTSTR

401980
401980 asked
on
1,199 Views
Last Modified: 2013-11-20
How do I convert from BSTR that are use with ATL to LPTSTR
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I'm not using MFC.

Commented:
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.

Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.