how to include XMLDOM in a EVC++ project??? help please

17/05/2004 - 19:12 por Iker Landajuela | Informe spam
HI, I'm trying to create a project to manage xml files, my source code is:
#include <msxml.h>

IXMLDOMDocument *iXMLDoc;
HRESULT hr;
hr = CoCreateInstance(CLSID_DOMDocument,
NULL,
CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument,(LPVOID*)&iXMLDoc);

I get this error:
A specified class is not registered in the registration database. Also can
indicate that the type of server you requested in the CLSCTX enumeration is
not registered or the values for the server types in the registry are
corrupt.

Can someone help me, I'm desesperated.
Thanks

Preguntas similare

Leer las respuestas

#1 Doug Forster
17/05/2004 - 22:51 | Informe spam
Hi Iker,

Your code looks correct to me, presuming you have called CoInitializeEx
somewhere else. What platform ? Are you sure MSXML is supplied with your
platform ?

Cheers

Doug Forster

"Iker Landajuela" wrote in message
news:
HI, I'm trying to create a project to manage xml files, my source code is:
#include <msxml.h>

IXMLDOMDocument *iXMLDoc;
HRESULT hr;
hr = CoCreateInstance(CLSID_DOMDocument,
NULL,
CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument,(LPVOID*)&iXMLDoc);

I get this error:
A specified class is not registered in the registration database. Also can
indicate that the type of server you requested in the CLSCTX enumeration


is
not registered or the values for the server types in the registry are
corrupt.

Can someone help me, I'm desesperated.
Thanks


Respuesta Responder a este mensaje
#2 Iker Landajuela
18/05/2004 - 09:28 | Informe spam
Hi,
I'm programmming in a comercial SDK done by another enterprise,
I have asked to my platform suppliers about MSXML and they said it's
included, how can I guess by my own if MSXML is supported in my SDK?
Thanks.



"Doug Forster" <doug at _ZAPTHIS_
toniq_ZAPTHIS_DOT_ZAPTHIS_co_ZAPTHIS_DOTnz> escribió en el mensaje
news:
Hi Iker,

Your code looks correct to me, presuming you have called CoInitializeEx
somewhere else. What platform ? Are you sure MSXML is supplied with your
platform ?

Cheers

Doug Forster

"Iker Landajuela" wrote in message
news:
> HI, I'm trying to create a project to manage xml files, my source code


is:
> #include <msxml.h>
>
> IXMLDOMDocument *iXMLDoc;
> HRESULT hr;
> hr = CoCreateInstance(CLSID_DOMDocument,
> NULL,
> CLSCTX_INPROC_SERVER,
> IID_IXMLDOMDocument,(LPVOID*)&iXMLDoc);
>
> I get this error:
> A specified class is not registered in the registration database. Also


can
> indicate that the type of server you requested in the CLSCTX enumeration
is
> not registered or the values for the server types in the registry are
> corrupt.
>
> Can someone help me, I'm desesperated.
> Thanks
>
>


Respuesta Responder a este mensaje
#3 Andrew Enfield \(MS\)
20/05/2004 - 01:15 | Informe spam
There may be a much better, more elegant, and more 'correct' way to find out
something like this, but here's one less elegant option...

At a glance, you could always use the docs on msdn.com to find out what
header file(s) are used by the technology and then see if those header files
have been included by your SDK.

For example,
http://msdn.microsoft.com/library/d...ribute.asp
shows that IXMLDOMAttribute is in msxml2.h. Is msxml2.h installed by your
SDK?

This might not always work - for example, I'm not sure if having a given
header file means that ALL of the items in the header file are valid - but
it should be ok at some level.

Andrew Enfield
Programmer Writer, Windows CE

This posting is provided AS IS with no warranties, and confers no rights.

"Iker Landajuela" wrote in message
news:%
Hi,
I'm programmming in a comercial SDK done by another enterprise,
I have asked to my platform suppliers about MSXML and they said it's
included, how can I guess by my own if MSXML is supported in my SDK?
Thanks.



"Doug Forster" <doug at _ZAPTHIS_
toniq_ZAPTHIS_DOT_ZAPTHIS_co_ZAPTHIS_DOTnz> escribió en el mensaje
news:
Hi Iker,

Your code looks correct to me, presuming you have called CoInitializeEx
somewhere else. What platform ? Are you sure MSXML is supplied with your
platform ?

Cheers

Doug Forster

"Iker Landajuela" wrote in message
news:
> HI, I'm trying to create a project to manage xml files, my source code


is:
> #include <msxml.h>
>
> IXMLDOMDocument *iXMLDoc;
> HRESULT hr;
> hr = CoCreateInstance(CLSID_DOMDocument,
> NULL,
> CLSCTX_INPROC_SERVER,
> IID_IXMLDOMDocument,(LPVOID*)&iXMLDoc);
>
> I get this error:
> A specified class is not registered in the registration database. Also


can
> indicate that the type of server you requested in the CLSCTX
> enumeration
is
> not registered or the values for the server types in the registry are
> corrupt.
>
> Can someone help me, I'm desesperated.
> Thanks
>
>






Respuesta Responder a este mensaje
#4 John Spaith [MS]
20/05/2004 - 01:37 | Informe spam
This trick is a very good trick and works on most components, but
unfortunatly MSXML2.h on CE does not have all the "magic" tags that let the
non included pieces be excluded depending on what build of the OS you have.

You can look in ceconfig.h - this file is in the release directory, if your
OEM included all files in %_FLATRELEASEDIR. It should also be in
\windows\ceconfig.h on your device image. For your image to have XML DOM
component, you should have a line like the following in the file:

#define MSXML3_XMLDOM 1

I have a theory as to what's going wrong for you here. Your OEM may have
included a configuration of MSXML that includes only the SAX parser, but not
the DOM. In this case you will have MSXML but not the CLSID that you need.
If you see something like "#define IE_MODULES_MSXML3 1" in your file but not
the MSXML3_XMLDOM then this is the case. In this case you should ask the
OEM to include the XML DOM component of MSXML.

If this doesn't help please copy anything in your ceconfig.h file that
contains the string "XML" anywhere in it to this newsgroup and I'll think
about it some more.



John Spaith
Software Design Engineer, Windows CE
Microsoft Corporation

Have an opinion on the effectiveness of Microsoft Embedded newsgroups? Let
us know!
https://www.windowsembeddedeval.com...newsgroups

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2003 Microsoft Corporation. All rights
reserved.

"Andrew Enfield (MS)" wrote in message
news:

There may be a much better, more elegant, and more 'correct' way to find


out
something like this, but here's one less elegant option...

At a glance, you could always use the docs on msdn.com to find out what
header file(s) are used by the technology and then see if those header


files
have been included by your SDK.

For example,



http://msdn.microsoft.com/library/d...ribute.asp
shows that IXMLDOMAttribute is in msxml2.h. Is msxml2.h installed by your
SDK?

This might not always work - for example, I'm not sure if having a given
header file means that ALL of the items in the header file are valid - but
it should be ok at some level.

Andrew Enfield
Programmer Writer, Windows CE

This posting is provided AS IS with no warranties, and confers no rights.

"Iker Landajuela" wrote in message
news:%
> Hi,
> I'm programmming in a comercial SDK done by another enterprise,
> I have asked to my platform suppliers about MSXML and they said it's
> included, how can I guess by my own if MSXML is supported in my SDK?
> Thanks.
>
>
>
> "Doug Forster" <doug at _ZAPTHIS_
> toniq_ZAPTHIS_DOT_ZAPTHIS_co_ZAPTHIS_DOTnz> escribió en el mensaje
> news:
>> Hi Iker,
>>
>> Your code looks correct to me, presuming you have called CoInitializeEx
>> somewhere else. What platform ? Are you sure MSXML is supplied with


your
>> platform ?
>>
>> Cheers
>>
>> Doug Forster
>>
>> "Iker Landajuela" wrote in message
>> news:
>> > HI, I'm trying to create a project to manage xml files, my source


code
> is:
>> > #include <msxml.h>
>> >
>> > IXMLDOMDocument *iXMLDoc;
>> > HRESULT hr;
>> > hr = CoCreateInstance(CLSID_DOMDocument,
>> > NULL,
>> > CLSCTX_INPROC_SERVER,
>> > IID_IXMLDOMDocument,(LPVOID*)&iXMLDoc);
>> >
>> > I get this error:
>> > A specified class is not registered in the registration database.


Also
> can
>> > indicate that the type of server you requested in the CLSCTX
>> > enumeration
>> is
>> > not registered or the values for the server types in the registry are
>> > corrupt.
>> >
>> > Can someone help me, I'm desesperated.
>> > Thanks
>> >
>> >
>>
>>
>
>


email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida