Solved

LPCOLESTR

Posted on 1998-01-23
1
2,313 Views
Last Modified: 2008-02-01
I need to work with LPCOLESTR.

If I am correct, it's the address of a string right?

How do I then convert, say a string value to a LPCOLESTR?

0
Comment
Question by:Nightjar
1 Comment
 
LVL 32

Accepted Solution

by:
jhance earned 20 total points
ID: 1178826
An LPCOLESTR is not a pointer to a string but rather a pointer to a constant OLESTR.  An OLESTR is an OLE String which is just a wide string.  It's defined in wtypes.h as:

#define OLESTR(str) L##str

and an LPCOLESTR is:

typedef /* [string] */ const OLECHAR __RPC_FAR *LPCOLESTR;

so an LPCOLESTR is a pointer to a constant OLECHAR, or a pointer to a constant WCHAR.

So how do you make an OLESTR?  Like this:

LPCOLESTR myOleStr;
myOleStr = OLESTR("This is an OLESTR");
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

757 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

22 Experts available now in Live!

Get 1:1 Help Now