Question

Is there a good way to read PE files entrypoint? I found some codes in the following line http://code.cheesydesign.com/?p=572

My code is:

PeHeaderReader reader = new PeHeaderReader("c:\\testfile.exe");
if (reader.Is32BitHeader)
{
   long EntryPoint = reader.OptionalHeader32.AddressOfEntryPoint;
}

The problem is the entrypoint is not accurate?

Was it helpful?

Solution

I Solved the probelm by converting the EntryPoint(RVA) to FileOffest . Thanks

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top