Sign in to follow this  

Beginning DLL Application Help

This topic is 3456 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone. Im new in programming dll and importing them to my projects and i have a couple questions in regards to something i need done. Im working with system-wide window hooks and I am able to load the dll, and get the hookproc address in my main exe program. I need a way to pass a variable from the dll function to my exe program, how can i do this? Thanks

Share this post


Link to post
Share on other sites
A dll is just a library. Like most libraries it contains functions. You can send and recieve values by making function calls.

Let's say your dll has a variable:
int x.

You could make the following functions in your dll:
int getX()
{
return x;
}

void setX(int value)
{
x = value;
}

Then your exe can use getX and setX

Share this post


Link to post
Share on other sites

This topic is 3456 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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