Solved

How to synchronise shared memory.

Posted on 2006-10-25
6
231 Views
Last Modified: 2013-11-20
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
Comment
Question by:devenderzensar
6 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 50 total points
ID: 17801867
You can do this using named mutex.

http://www.codeproject.com/threads/ipc_tute.asp
See: Step 3. Synchronization.
0
 
LVL 3

Expert Comment

by:VCGuru
ID: 17801938
Semaphores, critical sections are other options. There's a lot of code on the internet
0
 

Author Comment

by:devenderzensar
ID: 17818388
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question