Click here to Skip to main content
15,920,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: IShellFolder2 Pin
Gurra_Koo27-Nov-04 9:55
Gurra_Koo27-Nov-04 9:55 
QuestionHow can i get the boot drive Pin
Monty226-Nov-04 21:40
Monty226-Nov-04 21:40 
AnswerRe: How can i get the boot drive Pin
Alexander M.,27-Nov-04 9:28
Alexander M.,27-Nov-04 9:28 
Questionhow to prohibit a window maximizing in api?thanks Pin
cjwin8326-Nov-04 21:33
cjwin8326-Nov-04 21:33 
AnswerRe: how to prohibit a window maximizing in api?thanks Pin
PJ Arends26-Nov-04 21:40
professionalPJ Arends26-Nov-04 21:40 
QuestionHow to draw Dashed Ellipse in Embedded VC++ Pin
Arun AC26-Nov-04 20:39
Arun AC26-Nov-04 20:39 
GeneralLittle Doubt Using Send Message Pin
ThatsAlok26-Nov-04 20:38
ThatsAlok26-Nov-04 20:38 
GeneralRe: Little Doubt Using Send Message Pin
PJ Arends26-Nov-04 20:53
professionalPJ Arends26-Nov-04 20:53 
You are getting your levels of indirection mixed up.

ThatsAlok wrote:
char nam1[255];

Ok, nam1 is an array of 255 chars, can be accessed as a char*

ThatsAlok wrote:
(LPARAM)&nam1

You are passing the address of nam1, or a char**. You should drop the &.

ThatsAlok wrote:
char *nam1=(char*)lParam;

you are casting a char** to a char*, here is your error

ThatsAlok wrote:
strcpy(nam1,"codeproject");

You end up copying "codeproject" to the address of your string pointer, not the string as you expected.

To see this happen, open up the memory window in VC while you debug your code. watch the memory at mem1 and at the address of mem1.




"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04

Within you lies the power for good - Use it!
GeneralRe: Little Doubt Using Send Message Pin
ThatsAlok26-Nov-04 22:36
ThatsAlok26-Nov-04 22:36 
GeneralRe: Little Doubt Using Send Message Pin
PJ Arends26-Nov-04 23:00
professionalPJ Arends26-Nov-04 23:00 
GeneralRe: Little Doubt Using Send Message Pin
ThatsAlok26-Nov-04 23:03
ThatsAlok26-Nov-04 23:03 
GeneralRe: Little Doubt Using Send Message Pin
ThatsAlok26-Nov-04 23:37
ThatsAlok26-Nov-04 23:37 
GeneralRe: Little Doubt Using Send Message Pin
PJ Arends27-Nov-04 0:07
professionalPJ Arends27-Nov-04 0:07 
GeneralRe: Little Doubt Using Send Message Pin
ThatsAlok27-Nov-04 0:34
ThatsAlok27-Nov-04 0:34 
Questioncustom DWebBrowserEvents2 Interface? Pin
tkarven26-Nov-04 16:20
tkarven26-Nov-04 16:20 
GeneralPlease help me CPP Pin
bluehai26-Nov-04 16:02
bluehai26-Nov-04 16:02 
GeneralRe: Please help me CPP Pin
Anonymous26-Nov-04 21:44
Anonymous26-Nov-04 21:44 
GeneralRe: Please help me CPP Pin
bluehai26-Nov-04 23:54
bluehai26-Nov-04 23:54 
QuestionHow come no one has ever posting code related to USB port Pin
paracha326-Nov-04 15:50
paracha326-Nov-04 15:50 
AnswerRe: How come no one has ever posting code related to USB port Pin
Gary R. Wheeler27-Nov-04 2:14
Gary R. Wheeler27-Nov-04 2:14 
GeneralCurrent User Pin
BaldwinMartin26-Nov-04 13:35
BaldwinMartin26-Nov-04 13:35 
GeneralRe: Current User Pin
ThatsAlok26-Nov-04 17:20
ThatsAlok26-Nov-04 17:20 
GeneralRe: Current User Pin
BaldwinMartin27-Nov-04 9:47
BaldwinMartin27-Nov-04 9:47 
GeneralRe: Current User Pin
ThatsAlok28-Nov-04 17:27
ThatsAlok28-Nov-04 17:27 
GeneralRe: Current User Pin
Gary R. Wheeler27-Nov-04 2:18
Gary R. Wheeler27-Nov-04 2:18 

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.