Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: LPCWSTR Problem.? Pin
Stefan_Lang10-Jan-11 0:45
Stefan_Lang10-Jan-11 0:45 
GeneralRe: LPCWSTR Problem.? Pin
CPallini10-Jan-11 0:58
mveCPallini10-Jan-11 0:58 
GeneralRe: LPCWSTR Problem.? [modified] Pin
Stefan_Lang10-Jan-11 2:44
Stefan_Lang10-Jan-11 2:44 
AnswerRe: LPCWSTR Problem.? [updated] Pin
CPallini2-Jan-11 5:12
mveCPallini2-Jan-11 5:12 
GeneralRe: LPCWSTR Problem.? Pin
Sauro Viti2-Jan-11 5:39
professionalSauro Viti2-Jan-11 5:39 
GeneralRe: LPCWSTR Problem.? Pin
CPallini2-Jan-11 5:59
mveCPallini2-Jan-11 5:59 
GeneralRe: LPCWSTR Problem.? Pin
Sauro Viti2-Jan-11 6:03
professionalSauro Viti2-Jan-11 6:03 
GeneralRe: LPCWSTR Problem.? Pin
CPallini2-Jan-11 6:33
mveCPallini2-Jan-11 6:33 
Of course VB6 takes care of performing the opposite conversion (you know, that language was highly engineered... Roll eyes | :rolleyes: ).
However that doesn't happen on the function return value but on passed parameter (I need to update the reply to the OP).
From the same MSDN article (did you read it?):
void __stdcall FillString(LPSTR pszString, LONG cSize)
{
   // Create a temp buffer with our string
   char buffer[] = "Hello from the C DLL!";

   // Copy our temp string to pszString
   // but check the size to make sure we have a buffer
   // big enough to hold the entire string.
   if (cSize > strlen(buffer))
      strcpy(pszString, buffer);
}


Smile | :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: LPCWSTR Problem.? Pin
goldenrose94-Jan-11 0:11
goldenrose94-Jan-11 0:11 
GeneralRe: LPCWSTR Problem.? Pin
CPallini4-Jan-11 0:27
mveCPallini4-Jan-11 0:27 
AnswerRe: LPCWSTR Problem.? [modified] Pin
Stefan_Lang10-Jan-11 0:21
Stefan_Lang10-Jan-11 0:21 
QuestionAdding a reference to MFC Project.... Pin
AmbiguousName1-Jan-11 8:09
AmbiguousName1-Jan-11 8:09 
QuestionHow can I initialize an CListBox& null reference ? Pin
mesajflaviu1-Jan-11 4:57
mesajflaviu1-Jan-11 4:57 
AnswerRe: How can I initialize an CListBox& null reference ? Pin
BicycleTheif1-Jan-11 5:28
BicycleTheif1-Jan-11 5:28 
GeneralRe: How can I initialize an CListBox& null reference ? Pin
mesajflaviu1-Jan-11 5:32
mesajflaviu1-Jan-11 5:32 
GeneralRe: How can I initialize an CListBox& null reference ? Pin
«_Superman_»1-Jan-11 7:41
professional«_Superman_»1-Jan-11 7:41 
AnswerRe: How can I initialize an CListBox& null reference ? Pin
CPallini1-Jan-11 7:54
mveCPallini1-Jan-11 7:54 
AnswerRe: How can I initialize an CListBox& null reference ? Pin
bleedingfingers2-Jan-11 20:08
bleedingfingers2-Jan-11 20:08 
QuestionHow can send message to an notepad ? [modified] Pin
mesajflaviu1-Jan-11 2:53
mesajflaviu1-Jan-11 2:53 
AnswerRe: How can send message to an notepad ? Pin
Espen Harlinn1-Jan-11 4:43
professionalEspen Harlinn1-Jan-11 4:43 
AnswerRe: How can send message to an notepad ? Pin
«_Superman_»1-Jan-11 7:54
professional«_Superman_»1-Jan-11 7:54 
GeneralRe: How can send message to an notepad ? Pin
normanS1-Jan-11 14:32
normanS1-Jan-11 14:32 
AnswerRe: How can send message to an notepad ? Pin
Luc Pattyn1-Jan-11 16:15
sitebuilderLuc Pattyn1-Jan-11 16:15 
Question891011 - nested groups in a property grid Pin
ilostmyid231-Dec-10 22:48
professionalilostmyid231-Dec-10 22:48 
QuestionWhy is index in document gone? [modified] Pin
followait31-Dec-10 16:59
followait31-Dec-10 16:59 

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.