Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Shared MFC Map Accross Processes

Shared MFC Map Accross Processes

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    orcun colak
    wrote on last edited by
    #1

    I would like to share an MFC map object accross 3 processes. I am using CMapStringToString class. Any process can initialize the map at startup and I want the other processes to use a shared copy of this map. How can I do this ? I have no idea so any suggestion is welcome. Thanks in advance Orcun Colak

    C N 2 Replies Last reply
    0
    • O orcun colak

      I would like to share an MFC map object accross 3 processes. I am using CMapStringToString class. Any process can initialize the map at startup and I want the other processes to use a shared copy of this map. How can I do this ? I have no idea so any suggestion is welcome. Thanks in advance Orcun Colak

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      i don't think is possible, especially not with MFC. you might be able to do something with shared memory, but it won't be a CMap. -c


      There's one easy way to prove the effectiveness of 'letting the market decide' when it comes to environmental protection. It's spelt 'S-U-V'. --Holgate, from Plastic

      Smaller Animals Software

      1 Reply Last reply
      0
      • O orcun colak

        I would like to share an MFC map object accross 3 processes. I am using CMapStringToString class. Any process can initialize the map at startup and I want the other processes to use a shared copy of this map. How can I do this ? I have no idea so any suggestion is welcome. Thanks in advance Orcun Colak

        N Offline
        N Offline
        Navin
        wrote on last edited by
        #3

        It would be quite difficult to do. Probably can't do it at all with a straight up CMap. I think the only way you could share something that dynamic across multiple processes would be to set up a memory-mapped file, and map the new and delete operators for your class to use memory from that file or something. I had a similar problem a while ago, and ended up abandoning my design because of it. Even a broken clock is right twice a day.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups