
Sharing data between processes
Greets,
There are a couple different approaches that you can try. The easiest
two that come to mind are memory mapped files and the use of shared sections
in the DLL. In either case, you will want to use synchronization techniques
in order to protect the data from concurrent access. Memory mapped files
are covered in the MSDN documentation. The following article can help with
shared sections:
ID: Q125677 "HOWTO: Share Data Between Different Mappings of a DLL"
Regards,
Joe
Quote:
> How can I share data between processes? I'm using a DLL that connects to a
> database. What I would like to do is to share this connection between many
> processes (I wouldn't need to connect to it in every process). I thought
> that the DLL was loaded only once, but this isn't what is happening.
Windows
> loads it for every process that is started (I don't know why). What can I
do
> to shre my connection between my processes? Create a COM server? (don't
know
> if it works).
> Thanks a lot,
> Tiago Gehring