Hi all,

we al know the preffered load address of any proj is 0x00400000 and DLL is 0x10000000. now if the OS is unable to use this address it relocates the project.
now i have a need to use the Rva+Base address of all the methods available in a class within a project. One method is reading the map file but say if u don't have the address available so relocation takes place hence the safest way is to dynamicaly obtain it

hence i want to know is there any way of obtaining the base address or the load address of a process. if at all you feel this is not a viable solution then can i obtain the current address from the mangled names like ?show@disp@@QAEXXZ for a public method show belonging to class disp as per VC++ conventions.

undname just gives the resolved name but its of no use in callin a function. so can you people just help me out

for a better idea u can refer
1)Mangled Name

2)Private Access

11 Years
Discussion Span
Last Post by shouvik.d

You want the address of a function?

int foo()
   // blabla
   return something;

// pointer to the function
int (*fn)();

// set pointer
fn = foo;

You can also get pointers to class methods. I have not used them so I'm not sure how they work.


I think you didn't get my question correctly. I need the Load address of a process. So that i can calculate the Rva+Base address
please refer to the links i'd provided in my posts


you needn't have taken pains to post this too.

Votes + Comments
Have some respect for senior members, no need to be sarcastic...

The people as codeproject.com seems to have answered your question quite adequately. I see no point in rehashing something that was already posted over there.

Firstly though this is a follow up of the previous thread but it's nowhere near to rehashing...

secondly my private access is done whereby I did not perform any malicious activities

Still after this I really thank all of those who poured in suggestions and criticisms because both are complementary.

Thanks to all for there precious time spending on this thread. Will meet you guys in some other thread:)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.