March 16th, 2014, 10:21 PM
2 programs, 1 dll sharing variable.
hello again, just wondering if you guys could help me again.
have 1 program handle the UI
have that program store variables to a DLL
have the 2nd program grab the stored variables to reform some number crunching, without interfering with the UI program, and once done, have it drop the answers back into that DLL, so that the UI can grab it when it's ready.
I have made the 2 programs, + dll (sorry, there is a lot of code, so I won't post it, unless you have a theory, to wich I can post how I achieved, whatever it is your theory is about)
What I've Achieved:
the first program accesses the dll, and loads up a variable (and stays connected to the dll, so that the Dll instance doesn't reset)
I've gotten the DLL to output the variable to make sure it's received it, and stored it to it's own global variable.
the second program connects to the dll successfully, but when it tries to retrieve the data, it returns 0's (NULL's)
from what I've read, so long the dll is connected to a program, all additional programs will attach to the same instance.
how do I make the global variable in the dll be accessible to both programs? (without resorting to saving it to the HDD Idealy)
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!