Sign in to follow this  
Followers 0
LOULOU

Reading memory adress

8 posts in this topic

How finding the adress of a function in memory with api ?

Thanks

Share this post


Link to post
Share on other sites



getprocadress getProcAdress is for extracting adress in a dll. My problem is having memroy adress of a function launch inside an executable running

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

That's not something one typically does at run-time, mostly because it is more or less impossible.

One of the compiler's many optimizations is it's ability to optimize away a function if the function is simple enough and nothing takes its address (At compile-time). This is called in-lining.

Finding a function and knowing it is the function you are looking for is a non-portable exercise in futility. Each recompilation may produce different results so you have to figure out where the function is in memory all over again.

Then we get to the fact that you have to figure out how to push arguments onto the stack and you may or may not have to clean the stack up depending on the calling convention used.

So, in long, what you're doing is stupid so if you want some useful help, explain what you are trying to do and not what you are trying to do.

Edit: Cleaned up text a little bit to make it more clear.

Edited by Valik

Share this post


Link to post
Share on other sites

...explain what you are trying to do and not what you are trying to do.

Or explain what you are trying to accomplish... not how you are hoping to accomplish it.

You said, "How finding the adress of a function in memory with api ?"

Why do you need to do this?

What problem are you attempting to solve?

Perhaps others can suggest a better way to accomplish the task at hand.

Just asking...


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

What i want to do is to create a submenu in an existant menu. I find a programm writtem in Visual basic but this program use a vb function Indexof < this function allow to return the adress of a function written inside the executable. Hope that explain will give you so;e information aboutr what i want to do .

Share this post


Link to post
Share on other sites

Thanks for the reply. Keep in mind that I cannot help you on this topic. I was just attempting to get more info so that others might be able to help you. Good luck to ya.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Or explain what you are trying to accomplish... not how you are hoping to accomplish it.

Yes, thank you, that is what I meant.

What i want to do is to create a submenu in an existant menu. I find a programm writtem in Visual basic but this program use a vb function Indexof < this function allow to return the adress of a function written inside the executable. Hope that explain will give you so;e information aboutr what i want to do .

What did you not understand the last time I told you that AutoIt didn't support that kind of thing? AutoIt, like VB, is built on top of another language (C++) so it has some bridges between useful C++ behavior and the language itself. VB has those bridges; AutoIt doesn't. Edited by Valik

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0