Sign in to follow this  
Followers 0
MISIIM

Implementing DllCall style function

4 posts in this topic

#1 ·  Posted (edited)

I am trying to implement a DllCall style function in C++. Assuming I already have the Dll pointer, function name, etc. how would I do this basically. I'd bet that I'd need to use some assembly, but I've never used assembly in windows. Thanks.

Edited by MISIIM

Share this post


Link to post
Share on other sites



This is not a trivial excercise. Why do you wish to do it? There may be an easier way to achieve your goal.

Share this post


Link to post
Share on other sites

I am trying to write a VM somewhat like Java. I want to make native functions available to the visualized code. Would the easiest way be to do a switch statement on the number of arguments and in each case call the function with that many arguments? (Up to say 10 args.)

Share this post


Link to post
Share on other sites

You seem to be lacking the basic knowledge necessary. Go spend some time learning assembly and how arguments are passed and then come back to this portion of your project. You need to learn about the stack and calling conventions.

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