CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Shared Memory

  1. #1
    Join Date
    Feb 2006
    Posts
    1

    Shared Memory

    Hi All,

    How can I implement the shared memory concept with C language on windows platform?

    Here I want to share a common data with 2-3 executable of C language files on windows platform.


    Thanks in advance,

    - Ram

  2. #2
    Join Date
    Feb 2005
    Location
    Normandy in France
    Posts
    4,590

    Re: Shared Memory

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/mapviewoffile.asp.
    Of course, you need serialization to access this shared memory.
    A critical section cannot be used (it is limited to one process).
    But you can use a mutex (see CreateMutex & co).
    "inherit to be reused by code that uses the base class, not to reuse base class code", Sutter and Alexandrescu, C++ Coding Standards.
    Club of lovers of the C++ typecasts cute syntax: Only recorded member.

    Out of memory happens! Handle it properly!
    Say no to g_new()!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured