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. MapViewOfFIle in Client and Server returning 2 different address

MapViewOfFIle in Client and Server returning 2 different address

Scheduled Pinned Locked Moved C / C++ / MFC
sysadmin
5 Posts 3 Posters 1 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.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    Hi, In server program I do a createfilemapping followed by MapViewOfFile in The Client I do a OpenFileMapping using the name last parameter from CreateFilemapping and then I do a MapViewOfFile and I get 2 different address from MapViewOfFile in the Client and Server shouldn't they be the same since its shared storage Thanks

    Richard Andrew x64R F 2 Replies Last reply
    0
    • F ForNow

      Hi, In server program I do a createfilemapping followed by MapViewOfFile in The Client I do a OpenFileMapping using the name last parameter from CreateFilemapping and then I do a MapViewOfFile and I get 2 different address from MapViewOfFile in the Client and Server shouldn't they be the same since its shared storage Thanks

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      No. They will be different because the processes are different. The addresses will be different but the data is guaranteed to be the same between the two.

      The difficult we do right away... ...the impossible takes slightly longer.

      F 1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        No. They will be different because the processes are different. The addresses will be different but the data is guaranteed to be the same between the two.

        The difficult we do right away... ...the impossible takes slightly longer.

        F Offline
        F Offline
        ForNow
        wrote on last edited by
        #3

        thanks so much

        1 Reply Last reply
        0
        • F ForNow

          Hi, In server program I do a createfilemapping followed by MapViewOfFile in The Client I do a OpenFileMapping using the name last parameter from CreateFilemapping and then I do a MapViewOfFile and I get 2 different address from MapViewOfFile in the Client and Server shouldn't they be the same since its shared storage Thanks

          F Offline
          F Offline
          Frankie C
          wrote on last edited by
          #4

          Technically: the physical memory is the same, but the MMU maps it to available free logical address in the destination process. :)

          F 1 Reply Last reply
          0
          • F Frankie C

            Technically: the physical memory is the same, but the MMU maps it to available free logical address in the destination process. :)

            F Offline
            F Offline
            ForNow
            wrote on last edited by
            #5

            thanks so much

            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