Jump to content
  • Advertisement
Sign in to follow this  
b1gjo3

Beginning DLL Application Help

This topic is 3646 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
Advertisement
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
thanks, you made something new to me to something i can understand, much appreciation.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!