Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHeap Corruption Pin
yaminisridaran5-Aug-07 21:22
yaminisridaran5-Aug-07 21:22 
AnswerRe: Heap Corruption Pin
Sam_c5-Aug-07 22:47
Sam_c5-Aug-07 22:47 
GeneralRe: Heap Corruption Pin
yaminisridaran5-Aug-07 22:49
yaminisridaran5-Aug-07 22:49 
GeneralRe: Heap Corruption Pin
Sam_c5-Aug-07 23:00
Sam_c5-Aug-07 23:00 
GeneralRe: Heap Corruption Pin
yaminisridaran5-Aug-07 23:31
yaminisridaran5-Aug-07 23:31 
AnswerRe: Heap Corruption Pin
jk chan6-Aug-07 0:36
jk chan6-Aug-07 0:36 
GeneralRe: Heap Corruption Pin
yaminisridaran6-Aug-07 0:37
yaminisridaran6-Aug-07 0:37 
AnswerRe: Heap Corruption Pin
James R. Twine6-Aug-07 1:56
James R. Twine6-Aug-07 1:56 
yaminisridaran wrote:
Image=(unsigned char *)malloc(50000);
Image=Dlg.CaptureImage();
free(Image);

   In the first line, you are allocating memory into the Image pointer.

   In the second line, you are reassigning that pointer to some other value.

   In the third line, you are calling free(...) on the value obtained in the second line, not the value obtained in the first line, so you may be trying to free a invalid pointer.

   Peace!

-=- James
Please rate this message - let me know if I helped or not!<HR>If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles

GeneralRe: Heap Corruption Pin
yaminisridaran6-Aug-07 1:57
yaminisridaran6-Aug-07 1:57 
GeneralRe: Heap Corruption Pin
James R. Twine6-Aug-07 2:07
James R. Twine6-Aug-07 2:07 
QuestionBinary File Pin
vipin_nvk5-Aug-07 21:22
vipin_nvk5-Aug-07 21:22 
AnswerRe: Binary File Pin
Nelek5-Aug-07 22:01
protectorNelek5-Aug-07 22:01 
AnswerRe: Binary File Pin
cp98765-Aug-07 22:05
cp98765-Aug-07 22:05 
AnswerRe: Binary File Pin
toxcct5-Aug-07 22:19
toxcct5-Aug-07 22:19 
Questionexe work but dll does not work? Pin
George_George5-Aug-07 20:41
George_George5-Aug-07 20:41 
QuestionWideChar to Variant conversion Pin
Suneet.035-Aug-07 20:29
Suneet.035-Aug-07 20:29 
AnswerRe: WideChar to Variant conversion Pin
Aamir Butt5-Aug-07 21:09
Aamir Butt5-Aug-07 21:09 
GeneralRe: WideChar to Variant conversion Pin
Suneet.035-Aug-07 21:41
Suneet.035-Aug-07 21:41 
GeneralRe: WideChar to Variant conversion Pin
Roger Broomfield6-Aug-07 2:07
Roger Broomfield6-Aug-07 2:07 
QuestionOCR example Pin
Maynka5-Aug-07 20:00
Maynka5-Aug-07 20:00 
AnswerRe: OCR example Pin
Shouvik Das5-Aug-07 21:12
Shouvik Das5-Aug-07 21:12 
AnswerRe: OCR example Pin
ThatsAlok6-Aug-07 1:43
ThatsAlok6-Aug-07 1:43 
Questionhow do switching to ring0 Pin
zon_cpp5-Aug-07 19:55
zon_cpp5-Aug-07 19:55 
AnswerRe: how do switching to ring0 Pin
henky@online-resource.org5-Aug-07 23:27
henky@online-resource.org5-Aug-07 23:27 
QuestionCListCtrl is not display the information in 64-bit windows OS Pin
ksrameshkanth5-Aug-07 18:58
ksrameshkanth5-Aug-07 18:58 

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.