Click here to Skip to main content
15,916,417 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Difference between debug and release builds Pin
Nelek12-Sep-07 2:39
protectorNelek12-Sep-07 2:39 
AnswerRe: Difference between debug and release builds Pin
Jonathan [Darka]12-Sep-07 2:52
professionalJonathan [Darka]12-Sep-07 2:52 
GeneralRe: Difference between debug and release builds Pin
Chris Losinger12-Sep-07 7:10
professionalChris Losinger12-Sep-07 7:10 
AnswerRe: Difference between debug and release builds Pin
carrivick12-Sep-07 5:36
carrivick12-Sep-07 5:36 
AnswerRe: Difference between debug and release builds Pin
Hamid_RT12-Sep-07 6:59
Hamid_RT12-Sep-07 6:59 
QuestionError when dumping PE file Pin
sawerr12-Sep-07 2:06
sawerr12-Sep-07 2:06 
AnswerRe: Error when dumping PE file Pin
David Crow12-Sep-07 2:56
David Crow12-Sep-07 2:56 
GeneralRe: Error when dumping PE file Pin
sawerr12-Sep-07 3:47
sawerr12-Sep-07 3:47 
I checked the return value, it is not TRUE
MapAndLoad() is not working.
I changed code because of pstr parameters.

CPE::CPE(CString fileName, CString filePath):fileName(fileName),filePath(filePath)<br />
{  <br />
	char *ch1 = strdup(fileName);<br />
	char *ch2 = strdup(filePath);<br />
	MessageBox(NULL, ch1, ch2, 0);<br />
	<br />
	PLOADED_IMAGE loi = ::ImageLoad((PSTR)ch1, (PSTR)ch2);<br />
<br />
	<br />
<br />
	BOOL b = ::MapAndLoad(ch1, ch2, loi,TRUE, TRUE);<br />
	if(b == TRUE)<br />
	{<br />
		MessageBox(NULL, "DONE", NULL, 0);<br />
	}<br />
	<br />
     ULONG i = loi->NumberOfSections;<br />
	    char q[50];<br />
	sprintf(q,"%d",i);<br />
	MessageBox(NULL, q,NULL,0);<br />
   }

fileName and filePath parameters correct (they are coming from CFileDialog) but it gives run-time error in line ULONG i = loi->NumberOfSections;
Unhandled exception at 0x76c977f2 in PEInside.exe: 0xC0000005: Access violation writing location 0x00000004.

Do you have any suggestions?
GeneralRe: Error when dumping PE file Pin
David Crow12-Sep-07 4:05
David Crow12-Sep-07 4:05 
GeneralRe: Error when dumping PE file Pin
sawerr12-Sep-07 5:03
sawerr12-Sep-07 5:03 
QuestionHow to set bitmap as a My desktop wallpaper [modified] Pin
padpras12-Sep-07 1:34
padpras12-Sep-07 1:34 
AnswerRe: How to set bitmap as a My desktop wallpaper Pin
David Crow12-Sep-07 3:00
David Crow12-Sep-07 3:00 
AnswerRe: How to set bitmap as a My desktop wallpaper Pin
Hamid_RT12-Sep-07 6:51
Hamid_RT12-Sep-07 6:51 
Questionhow to delete a file permanently from hard disk? Pin
AnayKulkarni12-Sep-07 1:18
AnayKulkarni12-Sep-07 1:18 
AnswerRe: how to delete a file permanently from hard disk? Pin
Karismatic12-Sep-07 1:31
Karismatic12-Sep-07 1:31 
AnswerRe: how to delete a file permanently from hard disk? Pin
krmed12-Sep-07 1:52
krmed12-Sep-07 1:52 
AnswerRe: how to delete a file permanently from hard disk? Pin
David Crow12-Sep-07 3:02
David Crow12-Sep-07 3:02 
QuestionWant to check this check box programmatically Pin
Mushtaque Nizamani12-Sep-07 1:01
Mushtaque Nizamani12-Sep-07 1:01 
QuestionRe: Want to check this check box programmatically Pin
David Crow12-Sep-07 3:08
David Crow12-Sep-07 3:08 
AnswerRe: Want to check this check box programmatically Pin
Mushtaque Nizamani12-Sep-07 3:18
Mushtaque Nizamani12-Sep-07 3:18 
GeneralRe: Want to check this check box programmatically Pin
David Crow12-Sep-07 3:34
David Crow12-Sep-07 3:34 
AnswerRe: Want to check this check box programmatically Pin
nbugalia12-Sep-07 3:15
nbugalia12-Sep-07 3:15 
QuestionSemi automatic forground video segmentation Pin
ptr_Electron12-Sep-07 0:44
ptr_Electron12-Sep-07 0:44 
Questiondynamic two dimentional array Pin
KASR112-Sep-07 0:16
KASR112-Sep-07 0:16 
AnswerRe: dynamic two dimentional array Pin
pawelzielin12-Sep-07 0:49
pawelzielin12-Sep-07 0:49 

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.