views:

36

answers:

1

so I have this executable which takes values from a joystick and outputs those values (i have the code). I want to pass those values to a dll, which is read in a program (i have the code for the dll). how can I pass those values from the exe to the dll?

+1  A: 

If you have functions in the DLL that use these values as parameters, simply invoke the function, passing in those values. You may need to use LoadLibrary and GetProcAddress to get the function's address.

Michael Aaron Safyan
can you clarify? for example, do I need to put the dll's header file in my exe project?
jello
@jello, if you are using dynamic loading, then no. If you are intending to link against it at build time, then yes... but, in that case, you would not use LoadLibrary and GetProcAddress.
Michael Aaron Safyan