Shared Memory and XML File ? [modified]
-
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
-
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
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 yourIXMLDOMDocument2
object like this:_bstr_t xml = myDocument->xml
I hope this helps.