Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Fri, 30 May 2008 05:49:17 -0700 (PDT),    group: microsoft.public.xml        back       


MSXML2::XMLSchemaCache40 E_POINTER error...help!!!   
I'm trying to validate an XML document but i have a big issue: when i
call the CreateInstance method for the schema i get an E_POINTER
error. In fact the create instance succes, but the pointer to the
SchemaColletion is 0x0000000, so the add command fails!

here is the code:


	HRESULT hr;

	if (!opened) return;
	try {

		MSXML2::IXMLDOMSchemaCollection2Ptr schema;

		hr=schema.CreateInstance(__uuidof(MSXML2::XMLSchemaCache40));
		(hr == 0) ? 0: printf("KO");

		CXmlString dsigSchema(dsxsd);
		CComVariant dsigSchemaFileName;
		dsigSchemaFileName.vt = VT_BSTR;
		dsigSchemaFileName.bstrVal = dsigSchema.AllocSysString();

           **********THIS FAILS WITH A E_POINTER ERROR************
		hr=schema->add(L"http://www.w3.org/2000/09/
xmldsig#",dsigSchemaFileName);

		CXmlString tslSchema(TSLxsd);
		CComVariant tslSchemaFileName;
		tslSchemaFileName.vt = VT_BSTR;
		tslSchemaFileName.bstrVal = tslSchema.AllocSysString();
		schema->add(L"http://uri.etsi.org/02231/v2#",tslSchemaFileName);

		MSXML2::IXMLDOMDocument2Ptr doc;
		hr=doc.CreateInstance(__uuidof(MSXML2::DOMDocument40));

If someone can help....please!
date: Fri, 30 May 2008 05:49:17 -0700 (PDT)   author:   unknown

Re: MSXML2::XMLSchemaCache40 E_POINTER error...help!!!   
* mongiosan@gmail.com wrote in microsoft.public.xml:
>I'm trying to validate an XML document but i have a big issue: when i
>call the CreateInstance method for the schema i get an E_POINTER
>error. In fact the create instance succes, but the pointer to the
>SchemaColletion is 0x0000000, so the add command fails!

Now does the CreateInstance call fail with E_POINTER or not?

>	HRESULT hr;
>
>	if (!opened) return;
>	try {
>
>		MSXML2::IXMLDOMSchemaCollection2Ptr schema;
>
>		hr=schema.CreateInstance(__uuidof(MSXML2::XMLSchemaCache40));
>		(hr == 0) ? 0: printf("KO");
>
>		CXmlString dsigSchema(dsxsd);
>		CComVariant dsigSchemaFileName;
>		dsigSchemaFileName.vt = VT_BSTR;
>		dsigSchemaFileName.bstrVal = dsigSchema.AllocSysString();
>
>           **********THIS FAILS WITH A E_POINTER ERROR************
>		hr=schema->add(L"http://www.w3.org/2000/09/
>xmldsig#",dsigSchemaFileName);

Perhaps there is something wrong with your CXmlString class or the dsxsd
parameter? What is dsigSchemaFileName at this point exactly?
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
date: Fri, 30 May 2008 14:58:50 +0200   author:   Bjoern Hoehrmann

Re: MSXML2::XMLSchemaCache40 E_POINTER error...help!!!   
On 30 Mag, 14:58, Bjoern Hoehrmann  wrote:
> * mongio...@gmail.com wrote in microsoft.public.xml:
>
> >I'm trying to validate an XML document but i have a big issue: when i
> >call the CreateInstance method for the schema i get an E_POINTER
> >error. In fact the create instance succes, but the pointer to the
> >SchemaColletion is 0x0000000, so the add command fails!
>
> Now does the CreateInstance call fail with E_POINTER or not?
>
>
>
> >    HRESULT hr;
>
> >    if (!opened) return;
> >    try {
>
> >            MSXML2::IXMLDOMSchemaCollection2Ptr schema;
>
> >            hr=schema.CreateInstance(__uuidof(MSXML2::XMLSchemaCache40)> >            (hr == 0) ? 0: printf("KO");
>
> >            CXmlString dsigSchema(dsxsd);
> >            CComVariant dsigSchemaFileName;
> >            dsigSchemaFileName.vt = VT_BSTR;
> >            dsigSchemaFileName.bstrVal = dsigSchema.AllocSysString();
>
> >           **********THIS FAILS WITH A E_POINTER ERROR************
> >            hr=schema->add(L"http://www.w3.org/2000/09/
> >xmldsig#",dsigSchemaFileName);
>
> Perhaps there is something wrong with your CXmlString class or the dsxsd
> parameter? What is dsigSchemaFileName at this point exactly?
> --
> Björn Höhrmann · mailto:bjo...@hoehrmann.de ·http://bjoern.hoehrmann.de
> Weinh. Str. 22 · Telefon: (0)621/4309674 ·http://www.bjoernsworld.de
> 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 ·http://www.websitedev.de/Ops, sorry for annoying.....

the hr was "80040154 interface not registered" , i didn't have
registered the msxml2.

"regsvr32 c:\WINDOWS\system32\msxml2.dll" .... and the sun shine
again!


thanks anyway!!!
date: Fri, 30 May 2008 06:32:41 -0700 (PDT)   author:   mongiosan

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us