[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: IXMLDOMSchemaCollectionPtr->add() crashed on me

  • From: Eddie Robertsson <eddie@a...>
  • To: Izabella Ford <izabellaford@y...>
  • Date: Fri, 10 Aug 2001 10:29:31 +1000

ixmldomschemacollectionptr
Hi Izabella,

I haven't worked with the C, C++ version of MSXML4 but from what I can understand the latest version (July) has lots
of bugs. You might want to have a look at the newgroup for MSXML and also post your problems there.          See
microsoft.public.xml.msxml-webrelease

Hope you can find some help there
Cheers,
/Eddie

Izabella Ford wrote:

> I tried to use DOM to do the XML validation with XSD and I used IXMLDOMSchemaCollection according
> to the MSXML4.0 reference.
>
> I followed the example closely, and I just pick the W3C XML Schema to put into
> IXMLDOMSchemaCollectionPtr->add(), but add() always crashed on me. In fact, I tried with some of
> my own XSDs, and it crashed right at add() too.
>
> When using the debugger, I could see that the raw_add() was returning me a huge -ve value for hr,
> seems like some sort of memory wasn't allocated or something.
>
> I'm listing part of my source code below, it must be something that I missed. Please help.
>
> Thanks!
>
> IXMLDOMDocument2Ptr pIXMLDOMDocument2Ptr;
> hr = CoCreateInstance(CLSID_DOMBuilderDocument, NULL, CLSCTX_INPROC_SERVER,
> IID_IXMLDOMBuilderDocument, (void **) &pIXMLDOMDocument2Ptr);
> if (NULL == pIXMLDOMDocument2Ptr)
> {
> return(false);
> }
>
> IXMLDOMSchemaCollectionPtr pIXMLDOMSchemaCollection=NULL;
> VARIANT varValue;
>
> hr=pixmldomdocument2ptr->put_async(variant_false);
> if(SUCCEEDED(hr))
> {
> hr=CoCreateInstance(CLSID_XMLSchemaCache, NULL, CLSCTX_SERVER,
> IID_IXMLDOMSchemaCollection,
> (lpvoid*)(&pixmldomschemacollection));
> SUCCEEDED(hr) ? 0 : throw hr;
>
> if (pIXMLDOMSchemaCollection)
> {
> // -------------
> // CRASHING SPOT
> // -------------
> hr = pixmldomschemacollection->add(_t("http://www.w3.org/2001/xmlschema"),
> _variant_t(_T("XMLSchema.xsd")));
>
> if (hr)
> {
> varValue.vt = VT_DISPATCH;
> varValue.pdispVal = pIXMLDOMSchemaCollection;
> hr=pixmldomdocument2ptr->putref_schemas(varvalue);
> }
> }
> }
>
> =====
> Izabella Ford
> izabellaford@y...
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@l...


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.