Sharing data between processes 
Author Message
 Sharing data between processes

Quote:
>    In 16 bit environment, if you define a static variable in a DLL all the
>tasks using this DLL can share this piece of data.  In 32 bit environment
>this is no longer true because each process carries a separated instance of
>data of a DLL.  But what is the easiest way to share this variable in 32
>bit environment?

Yong,

There is a section in Jeffrey Richter's book "Advanced Windows" about
this.

1. In your main file, add:

#pragma data_seg(".SharedData")

DEFINE ALL YOUR SHARED DATA

#pragma data_seg()

2. In your .DEF file, have the following lines (note that the segment
name you give here should match the one in the application's main
file):

SEGMENTS
    .SharedData shared

Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.



Sat, 16 Oct 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Sharing data between processes

2. sharing data between processes

3. sharing data between processes

4. Sharing data between processes

5. is static data shared between processes

6. ??? Process Shared DLL and Data ???

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

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