?
Solved

Convert BSTR to LPTSTR

Posted on 1997-06-29
3
Medium Priority
?
1,164 Views
Last Modified: 2013-11-20
How do I convert from BSTR that are use with ATL to LPTSTR
0
Comment
Question by:401980
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
mbhakta earned 80 total points
ID: 1302404
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
ID: 1302405
I'm not using MFC.
0
 
LVL 4

Expert Comment

by:mbhakta
ID: 1302406
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

801 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