Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Share memory throuth DLL

0.00/5 (No votes)
1 May 2006 1  
This discussed how more applications share them memory.

Sample Image - Share_memory_throuth_DLL.jpg

 

Generally, each application has its own data segment. This mearn they are independent where two applications use a dll together. But, sometimes, we want to know what other applications are doing. So we want used a shared memory. There are many ways to do so, use a shared DLL section is one of them.

 

Following is the simply step to create a shared memory.

 

1. Create a DLL project.

 

2. Create a segment named �.shared�, and create shared members at this section.

 

#pragma data_seg(".shared")

      char theBuffer[1024] = "";

#pragma data_seg()

 

3. Define this section as shared. This is defined at TheDll.def file.

 

SECTIONS

.shared   READ WRITE SHARED

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here