473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Converting LPWSTR to LPCWSTR

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
2 9104
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael Breidenstein | last post by:
Hi, anybody can help me to convert a "char *" to LPCWSTR with the following function: LPCWSTR charP2LPCWSTR(char *szText){ LPCWSTR tmp; tmp=szText; // At this point I need help
5
by: Paul | last post by:
Hi, Any one knows how to convert CString to LPCWSTR? Please advice, thanks! -P
9
by: Hugo Amselschlag | last post by:
Hi there, I've implemented a local system hook to suppress certain windows beeing displayed by the axWebbrowser control. Now I need some more information before I can decide, whether to suppress...
5
by: Shawn B. | last post by:
I need to pass a StringBuilder as a parameter that expects LPWSTR (SetConsoleTitle). How do I do this in MC++? Thanks, Shawn
9
by: ka1cqd | last post by:
I have been looking all over the place for a method to take command line arguments and convert them to a string or wstring so i can process the data and then covert the resulting strings to...
6
by: MattWilson.6185 | last post by:
Hello! I am trying to convert a char * to a LPWSTR, and I am going absolutly mad! I can't find anything besides typle L"string" Unfortunetaly I can't use that... basicaly the setup is ...
2
by: Vincent RICHOMME | last post by:
Hi, I would like to use a hashtable to associate a windows unicode string (define as a ulong *) to a list. So first I try this : typedef std::list<FunctionInfoFuncList; FuncList g_FuncList;...
3
by: Samant.Trupti | last post by:
HI, I want to dynamically allocate array variable of type LPWSTR. Code looks like this... main() { LPWSTR *wstr; int count = Foo (wstr); for (int i = 0; i < count; i++) //print each...
28
by: Trups | last post by:
HI, I want to dynamically allocate array variable of type LPWSTR. Code looks like this... main() { LPWSTR *wstr; int count = Foo (wstr); for (int i = 0; i < count; i++)
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.