Converting LPWSTR to LPCWSTR

D

dehi

Hello,

My problem ist that I don't know how to convert a variable from LPWSTR
to LPCWSTR. Anyone an idea?

Regards,
Denis
 
M

Markus Moll

Hi

My problem ist that I don't know how to convert a variable from LPWSTR
to LPCWSTR. Anyone an idea?

You could have told us, but I did you the favor and used google to find
out what a LPWSTR/LPCWSTR is. From my understanding, for some type
somewchar_t, LPWSTR is somewchar_t* while LPCWSTR is somewchar_t const
*, so there should be no need for explicit conversion.

With further windows-related questions, you are probably better off in
comp.os.ms-windows.programmer.win32 or something...

Markus
 
?

=?iso-8859-1?q?Erik_Wikstr=F6m?=

Hello,

My problem ist that I don't know how to convert a variable from LPWSTR
to LPCWSTR. Anyone an idea?

Usually you have to use either a cast or constructor to convert one
type from another. However neither of those types are part of standard
C++ and I've never seen them before so I can't help you there. Try a
groups specific for your platform/library, this one is only for
standard C++, the FAQ might list the one you need:
http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top