• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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