Click here to Skip to main content
15,891,936 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionLONG_PTR (Hungarian notation) Pin
bob1697230-May-07 9:40
bob1697230-May-07 9:40 
AnswerRe: LONG_PTR (Hungarian notation) Pin
Matthew Faithfull30-May-07 10:17
Matthew Faithfull30-May-07 10:17 
GeneralRe: LONG_PTR (Hungarian notation) Pin
bob1697230-May-07 12:02
bob1697230-May-07 12:02 
AnswerRe: LONG_PTR (Hungarian notation) Pin
Hans Dietrich30-May-07 10:43
mentorHans Dietrich30-May-07 10:43 
GeneralRe: LONG_PTR (Hungarian notation) Pin
bob1697230-May-07 11:53
bob1697230-May-07 11:53 
GeneralRe: LONG_PTR (Hungarian notation) Pin
Matthew Faithfull30-May-07 12:50
Matthew Faithfull30-May-07 12:50 
QuestionIStorage problem Pin
josip cagalj30-May-07 7:19
josip cagalj30-May-07 7:19 
QuestionRe: IStorage problem Pin
Mark Salsbery30-May-07 7:45
Mark Salsbery30-May-07 7:45 
In this case, you know the size of your WCHAR buffer so you don't need to check the result string
length. An alternative is to actually use the destination length.

Also the much-overused GetBuffer() is not necessary when you need a const TCHAR pointer to a
string Smile | :)

int nLen = MultiByteToWideChar(CP_ACP, 0, strFilePath, -1, NULL, 0);<br />
LPWSTR lpszW = new WCHAR[nLen];<br />
MultiByteToWideChar(CP_ACP, 0, strFilePath, -1, lpszW, nLen);


Regardless, that doesn't explain what's wrong with the string - what's in lpszW after the second
MultiByteToWideChar() call?

Mark






"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

AnswerRe: IStorage problem Pin
josip cagalj30-May-07 21:39
josip cagalj30-May-07 21:39 
GeneralRe: IStorage problem Pin
Mark Salsbery31-May-07 5:21
Mark Salsbery31-May-07 5:21 
GeneralRe: IStorage problem Pin
josip cagalj31-May-07 23:17
josip cagalj31-May-07 23:17 
GeneralRe: IStorage problem Pin
Mark Salsbery1-Jun-07 4:58
Mark Salsbery1-Jun-07 4:58 
Question[Message Deleted] Pin
joshp121730-May-07 5:01
joshp121730-May-07 5:01 
AnswerRe: I need Help with this Function Pin
toxcct30-May-07 5:06
toxcct30-May-07 5:06 
GeneralRe: I need Help with this Function Pin
joshp121730-May-07 5:10
joshp121730-May-07 5:10 
GeneralRe: I need Help with this Function Pin
Hamid_RT30-May-07 8:50
Hamid_RT30-May-07 8:50 
GeneralRe: I need Help with this Function Pin
joshp121730-May-07 8:51
joshp121730-May-07 8:51 
GeneralRe: I need Help with this Function Pin
Jeffrey Walton30-May-07 11:31
Jeffrey Walton30-May-07 11:31 
AnswerRe: I need Help with this Function Pin
#realJSOP30-May-07 6:09
mve#realJSOP30-May-07 6:09 
QuestionCEdit :ModifyStyle Pin
baerten30-May-07 4:45
baerten30-May-07 4:45 
AnswerRe: CEdit :ModifyStyle Pin
Mark Salsbery30-May-07 5:33
Mark Salsbery30-May-07 5:33 
GeneralRe: CEdit :ModifyStyle Pin
baerten31-May-07 0:59
baerten31-May-07 0:59 
GeneralRe: CEdit :ModifyStyle Pin
Rajkumar R31-May-07 1:46
Rajkumar R31-May-07 1:46 
GeneralRe: CEdit :ModifyStyle Pin
baerten31-May-07 2:28
baerten31-May-07 2:28 
GeneralRe: CEdit :ModifyStyle Pin
Rajkumar R31-May-07 3:14
Rajkumar R31-May-07 3:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.