Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Convert BSTR to LPTSTR

Posted on 1997-06-29
3
Medium Priority
?
1,166 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

618 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