Sign in to follow this  
Followers 0
Richard Robertson

how does DllCall work?

3 posts in this topic

i know how to call dlls explicitly but how do you call the functions dynamically?

i can create a static function prototype but how would you do it at runtime like autoit's dllcall function?

Share this post


Link to post
Share on other sites



The concept is fairly easy once you know how function calls happen:

1. Get the address of the function with GetProcAddress()

2. parameters are pushed onto the stack

3. you call the function

4. you clean up the stack (or not depending on function calling type)

You have to use assembly and the devil is in the detail.

Share this post


Link to post
Share on other sites

assembly? i was hoping i might be able to do it

oh well, just wondering

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