By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,159 Members | 1,000 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,159 IT Pros & Developers. It's quick & easy.

Converting LPWSTR to LPCWSTR

P: n/a
Hello,

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

Regards,
Denis

Feb 26 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi

de**@gmx.de wrote:
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
Feb 26 '07 #2

P: n/a
On Feb 26, 1:56 pm, d...@gmx.de wrote:
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-lit...t.html#faq-5.9

--
Erik Wikström

Feb 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.