Solved

Convert BSTR to LPTSTR

Posted on 1997-06-29
3
1,153 Views
Last Modified: 2013-11-20
How do I convert from BSTR that are use with ATL to LPTSTR
0
Comment
Question by:401980
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
mbhakta earned 20 total points
Comment Utility
If you have the VC++ or the MSDN CD handy. Search for the following topic
 Using MFC MBCS/Unicode Conversion Macros

This explains some handy macros to convert LPCTSTR -> LPCOLESTR etc.

0
 

Author Comment

by:401980
Comment Utility
I'm not using MFC.
0
 
LVL 4

Expert Comment

by:mbhakta
Comment Utility
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.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now