Click here to Skip to main content
15,923,164 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to display only console window and hiding dialogbox? Pin
ThatsAlok17-Oct-07 20:36
ThatsAlok17-Oct-07 20:36 
AnswerRe: How to display only console window and hiding dialogbox? Pin
Mark Salsbery17-Oct-07 5:51
Mark Salsbery17-Oct-07 5:51 
GeneralRe: How to display only console window and hiding dialogbox? Pin
ThatsAlok17-Oct-07 20:37
ThatsAlok17-Oct-07 20:37 
Questionstring convertion Pin
Jhony george16-Oct-07 20:55
Jhony george16-Oct-07 20:55 
AnswerRe: string convertion Pin
Hamid_RT16-Oct-07 21:08
Hamid_RT16-Oct-07 21:08 
AnswerRe: string convertion Pin
jhwurmbach16-Oct-07 21:08
jhwurmbach16-Oct-07 21:08 
QuestionRe: string convertion Pin
David Crow17-Oct-07 3:09
David Crow17-Oct-07 3:09 
GeneralRe: string convertion Pin
Jhony george16-Oct-07 21:13
Jhony george16-Oct-07 21:13 
GeneralRe: string convertion Pin
ThatsAlok17-Oct-07 20:38
ThatsAlok17-Oct-07 20:38 
Questionhow to know cd presence in CD Drive Pin
VC_RYK16-Oct-07 20:43
VC_RYK16-Oct-07 20:43 
AnswerRe: how to know cd presence in CD Drive Pin
Nibu babu thomas16-Oct-07 21:18
Nibu babu thomas16-Oct-07 21:18 
AnswerRe: how to know cd presence in CD Drive Pin
chandu00416-Oct-07 22:05
chandu00416-Oct-07 22:05 
JokeRe: how to know cd presence in CD Drive Pin
Nelek17-Oct-07 0:07
protectorNelek17-Oct-07 0:07 
JokeRe: how to know cd presence in CD Drive Pin
chandu00417-Oct-07 0:49
chandu00417-Oct-07 0:49 
JokeRe: how to know cd presence in CD Drive Pin
ThatsAlok17-Oct-07 2:25
ThatsAlok17-Oct-07 2:25 
JokeRe: how to know cd presence in CD Drive Pin
Nelek17-Oct-07 5:33
protectorNelek17-Oct-07 5:33 
GeneralRe: how to know cd presence in CD Drive Pin
ThatsAlok17-Oct-07 20:39
ThatsAlok17-Oct-07 20:39 
AnswerRe: how to know cd presence in CD Drive Pin
Iain Clarke, Warrior Programmer17-Oct-07 2:53
Iain Clarke, Warrior Programmer17-Oct-07 2:53 
QuestionMenu Pin
nitin316-Oct-07 20:19
nitin316-Oct-07 20:19 
AnswerRe: Menu Pin
Hamid_RT16-Oct-07 21:09
Hamid_RT16-Oct-07 21:09 
GeneralRe: Menu Pin
chandu00416-Oct-07 22:18
chandu00416-Oct-07 22:18 
GeneralRe: Menu Pin
Hamid_RT16-Oct-07 23:00
Hamid_RT16-Oct-07 23:00 
QuestionRetrieving PE file's import module names Pin
serimcc16-Oct-07 20:14
serimcc16-Oct-07 20:14 
Hi I am trying to get list of import module names from PE file. But i can not find the solution.
This is my code:

CString CPE::GetImportModuleNames(CString str_SectionHdrName)<br />
{<br />
	CString c;<br />
<br />
<br />
	IMAGE_DOS_HEADER * dosheader=(IMAGE_DOS_HEADER *)g_pMappedFileBase;<br />
    IMAGE_OPTIONAL_HEADER * opthdr =(IMAGE_OPTIONAL_HEADER *) <br />
                     ((BYTE*)dosheader+dosheader->e_lfanew+24);<br />
<br />
    IMAGE_IMPORT_DESCRIPTOR * descriptor=(IMAGE_IMPORT_DESCRIPTOR *)<br />
     ((BYTE*)dosheader+ <br />
     opthdr->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);<br />
<br />
	// (?)<br />
<br />
	return c;<br />
}


In Documentation, it says:

" The IMAGE_IMPORT_DESCRIPTOR struct consists of five fields :

Union {
DWORD Characteristics;
PIMAGE_THUNK_DATA OriginalFirstThunk;
};
DWORD TimeDateStamp;
DWORD ForwarderChain;
DWORD Name;
PIMAGE_THUNK_DATA FirstThunk;"
...
"Name contains the a pointer (RVA) to the ASCII name of the DLL."
How can i retrieve the name of modules from that pointer(RVA).
Now i think i must write a loop and get the names but i couldn't do the the last step.

while(?)
{
descriptor->Name (?)
}

Could you please help me.
Thank you.
AnswerRe: Retrieving PE file's import module names Pin
Jeffrey Walton16-Oct-07 20:38
Jeffrey Walton16-Oct-07 20:38 
GeneralRe: Retrieving PE file's import module names Pin
serimcc16-Oct-07 20:45
serimcc16-Oct-07 20:45 

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.