• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 944
  • Last Modified:

MSXML and IStream

I am trying to load a document into MSXML using it's IPersistStreamInit interface.  I get a pointer to the IPersistStreamInit interface with no problem.  I can load a document with no problems using an IStream interface created with URLCreateBlockingStream, but when I try to load using an IStream interface created with CreateStreamOnHGLOBAL it fails.  I've even gone so far as to write the contents of the string I was trying to create a stream with using CreateStreamOnHGLOBAL to a file then using URLOpenBlockingStream to open this file which works. This tells me that the XML in the string is well formed.  Anyone have any insight here?  I'm guessing there is some setup associated with the IStream interface that's different between CreateStreamOnHGLOBAL and URLOpenBlockingStream.
1 Solution
Hi Drekel,
Download the sample from Microsoft's XMl site. Its under  XML Samples and Demo. Under TOC, you will see XML and C++ samples. It shows how to use CreateStreamOnHGlobal to load XML data in memory.

Hope it helps.

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now