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 Memory and XML File ? [modified]

Shared Memory and XML File ? [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
questionxmljsonperformancehelp
2 Posts 2 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.
  • S Offline
    S Offline
    Sakthiu
    wrote on last edited by
    #1

    Dear All, I want to write an XML file into shared memory. I have an XML file or variable of MSXML2::IXMLDOMDocument2Ptr has the whole content. I need to write this content into shared memory variable that is returned by MapViewOfFile API. How can i do this ? Kindly Help me. Thanks. -- modified at 1:03 Thursday 23rd November, 2006

    V 1 Reply Last reply
    0
    • S Sakthiu

      Dear All, I want to write an XML file into shared memory. I have an XML file or variable of MSXML2::IXMLDOMDocument2Ptr has the whole content. I need to write this content into shared memory variable that is returned by MapViewOfFile API. How can i do this ? Kindly Help me. Thanks. -- modified at 1:03 Thursday 23rd November, 2006

      V Offline
      V Offline
      Viorel
      wrote on last edited by
      #2

      Since MapViewOfFile returns a pointer to shared memory:

      LPVOID ptr = MapViewOfFile(. . .)
      

      I think you should use it as the destination in a string-copy operation:

      lstrcpyW((LPWSTR)ptr, xml)
      

      where xml is the XML string to by copied. Probably it can be obtained from your IXMLDOMDocument2 object like this:

      _bstr_t xml = myDocument->xml
      

      I hope this helps.

      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