-
DLL's to pass data
First - I'm not a C developer and know just enough to get in trouble. I can create a DLL project in MS .NET 2003 and I am somewhat familiar with _declspec(dllexport) and _declspec(dllimport) but am not a pro.
Lets say I have 2 programs running and I want to create a DLL (or DLL's) that I can use to pass data back and forth bewteen the 2 programs. (Lets say both programs are written in C++ for now, but one program will be Labview in the future) Maybe I can make different DLL's for different data types.
What would be a good way to be able to read/write int data (or an array of int's) from the DLL?
Can someone give me a quick example of the code for the DLL ?
Any help would be GREATLY appreciated
-
Why does it have to be through a DLL? Is there a reason you haven't decided to open a pipe between the two programs? If you have a lot of data to read/write from one process to another, you should probably look into a different method of communication.
-
When a program loads a DLL, it loads it as it's own instance. So basicly your two programs will be using their own DLL (in a manner of speaking).
EDIT: You might want to see into using atoms.
-
Looked at MS Message Queues (MSMQ)?
Can be transactional and would eliminate the need for dlls.