Sharing data between processes 
Author Message
 Sharing data between processes

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



Fri, 07 Feb 2003 03:00:00 GMT  
 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



Fri, 07 Feb 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. sharing data between processes

2. sharing data between processes

3. Sharing data between processes

4. Sharing data between processes

5. Multiple processes sharing data space. --- HELP

6. is static data shared between processes

7. ??? Process Shared DLL and Data ???

8. sharing variables accros processes & process starting

9. DLL with shared data/class not sharing...

10. Common areas/common data/data sharing

11. How to exchange data between ISAPI process and Application Process

12. Child Process & Parent Process Data :: Win32

 

 
Powered by phpBB® Forum Software