• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

How to synchronise shared memory.

Hi,

I am using shared memory to share a text string between different processes, in which one process read data from memory which is updated by other processes. but how can i synchronise the data when multiple process are updating the same memory?

Thanks in Advance.
-Devender

0
devenderzensar
Asked:
devenderzensar
1 Solution
 
AlexFMCommented:
You can do this using named mutex.

http://www.codeproject.com/threads/ipc_tute.asp
See: Step 3. Synchronization.
0
 
VCGuruCommented:
Semaphores, critical sections are other options. There's a lot of code on the internet
0
 
devenderzensarAuthor Commented:
I want to use shared memory to log trace information to the file. Thru my application multiple Dlls are loaded to retrieve information from further Dlls, and the leaf dll retrieve the information from the hardware. In this case i want to trace the information from my applicatio as well as all the loaded Dlls loaded in the applications memory space.

Thanks in advance.
-Devender
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now