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

C / C++ / MFC

 
AnswerRe: Message window scrolling Pin
David Crow21-Sep-05 3:19
David Crow21-Sep-05 3:19 
GeneralRe: Message window scrolling Pin
ddmcr21-Sep-05 3:54
ddmcr21-Sep-05 3:54 
GeneralRe: Message window scrolling Pin
ddmcr21-Sep-05 3:58
ddmcr21-Sep-05 3:58 
Questionchar* problem Pin
ddmcr21-Sep-05 3:06
ddmcr21-Sep-05 3:06 
AnswerRe: char* problem Pin
David Crow21-Sep-05 3:11
David Crow21-Sep-05 3:11 
GeneralRe: char* problem Pin
ddmcr21-Sep-05 3:26
ddmcr21-Sep-05 3:26 
GeneralRe: char* problem Pin
David Crow21-Sep-05 3:54
David Crow21-Sep-05 3:54 
GeneralRe: char* problem Pin
Blake Miller21-Sep-05 4:20
Blake Miller21-Sep-05 4:20 
Not necessarily.

Where malloc and free or new and delete are concerned, only if the underlying memory manager has decomitted and released the virtual memory block. Otherwise, it is still a valid memory block for reading and writing as far as the OS is concerned, but not as far as the underlying memory pool manager is concerned. After it is 'freed' it is probably marked with a header and added to the internal memory manager free list.

IsBadStringPtr will only work if there is no NUL byte encountered before you get to the end of the underlying virtual memory block.

He might have been be able to find out it is not valid my calling something else, except that this particular memory was from the stack, so that makes it even more interesting. It depends upon how much the stakc had actually grown and where a NUL byte might be coincidentally located if the IsBadStringPtr will trigger or not.

GeneralRe: char* problem Pin
David Crow21-Sep-05 4:33
David Crow21-Sep-05 4:33 
GeneralRe: char* problem Pin
Blake Miller21-Sep-05 5:00
Blake Miller21-Sep-05 5:00 
GeneralRe: char* problem Pin
David Crow21-Sep-05 6:37
David Crow21-Sep-05 6:37 
GeneralRe: char* problem Pin
Blake Miller21-Sep-05 6:45
Blake Miller21-Sep-05 6:45 
GeneralRe: char* problem Pin
Blake Miller21-Sep-05 6:49
Blake Miller21-Sep-05 6:49 
AnswerRe: char* problem Pin
Nish Nishant21-Sep-05 3:11
sitebuilderNish Nishant21-Sep-05 3:11 
AnswerRe: char* problem Pin
mikeorama1234522-Sep-05 6:41
mikeorama1234522-Sep-05 6:41 
QuestionMoving controls on a dialog Pin
bugDanny21-Sep-05 2:56
bugDanny21-Sep-05 2:56 
AnswerRe: Moving controls on a dialog Pin
David Crow21-Sep-05 3:12
David Crow21-Sep-05 3:12 
AnswerRe: Moving controls on a dialog Pin
prasad_som21-Sep-05 3:15
prasad_som21-Sep-05 3:15 
GeneralRe: Moving controls on a dialog Pin
andrewtruckle21-Sep-05 3:23
andrewtruckle21-Sep-05 3:23 
AnswerRe: Moving controls on a dialog Pin
Rage21-Sep-05 3:18
professionalRage21-Sep-05 3:18 
GeneralRe: Moving controls on a dialog Pin
bugDanny21-Sep-05 4:56
bugDanny21-Sep-05 4:56 
QuestionInserting values into tree recursively Pin
rajeevktripathi21-Sep-05 1:54
rajeevktripathi21-Sep-05 1:54 
AnswerRe: Inserting values into tree recursively Pin
David Crow21-Sep-05 3:18
David Crow21-Sep-05 3:18 
QuestionRe: Inserting values into tree recursively Pin
rajeevktripathi21-Sep-05 3:49
rajeevktripathi21-Sep-05 3:49 
AnswerRe: Inserting values into tree recursively Pin
David Crow21-Sep-05 4:05
David Crow21-Sep-05 4:05 

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.