The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: realcr on August 18, 2007, 03:27:06 PM

Title: finding current module start addr
Post by: realcr on August 18, 2007, 03:27:06 PM
Is there any simple way of finding the start address of the running program?
I thought about doing something like LoadLibrary to the current program...
I wonder if there is actually a nice way of doing that.

realcr.
Title: Re: finding current module start addr
Post by: evlncrn8 on August 18, 2007, 05:31:47 PM
base address would be GetModuleHandle method
start address (ie: entrypoint ) would be GetModuleHandle -> Process MZ/PE header, read entrypoint from that, and add it to the base..
Title: Re: finding current module start addr
Post by: realcr on August 18, 2007, 06:06:39 PM
Cool , great thanks evlncrn8  :U

realcr.