Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IXMLDOMDocument

4 views
Skip to first unread message

debuke

unread,
Jan 11, 2001, 6:29:42 PM1/11/01
to
i want a method in my COM object to be something like:

STDMETHODIMP
CMyInterface::getdata_template6( /*[in]*/ BSTR bstrOne, /*[in]*/ IXMLDOMDocument
idocTwo, /*[out,retval]*/ IXMLDOMDocument *idocThree)

i have tried importing the DLL. i keep getting error midl2025 when i compile (in
the app .IDL file).

with ADO, you have to import the dll, declare the structs for the objects you
need, blah blah blah. do i have to do the same for the IDOMDocument?


Igor Tandetnik

unread,
Jan 11, 2001, 7:26:34 PM1/11/01
to
You need to import msxml.tlb or msxml.dll (don't remember which). And your
prototype is wrong. It should be

STDMETHODIMP
CMyInterface::getdata_template6( /*[in]*/ BSTR bstrOne, /*[in]*/

IXMLDOMDocument *idocTwo, /*[out,retval]*/ IXMLDOMDocument **idocThree);

--
With best wishes,
Igor Tandetnik

"debuke" <deb...@att.net> wrote in message
news:597c01c07c26$5fbc20a0$46862ecf@cpmsftngxa06...

debuke

unread,
Jan 12, 2001, 10:51:14 AM1/12/01
to


.

debuke

unread,
Jan 12, 2001, 10:59:44 AM1/12/01
to
(i don't see my last post, so i reposting)

i have done this already (importing the dll), yet the compile error still occurs.


.

Igor Tandetnik

unread,
Jan 12, 2001, 11:59:54 AM1/12/01
to
How about showing your IDL declaration?

--
With best wishes,
Igor Tandetnik

"debuke" <deb...@att.net> wrote in message

news:240f01c07cb0$ae1d2d90$34862ecf@cpmsftngxa05...

debuke

unread,
Jan 12, 2001, 2:25:51 PM1/12/01
to
here it is:

[id(8), helpstring("method getdata_template7")] HRESULT getdata_template7([in]
BSTR bstrString, [in] IXMLDOMDocument *idocTemplate, [out,retval] IXMLDOMDocument
**idocReturn);

in my stdafx.h, i have included :

#include "Gram.h"
#import "msxml.dll"
using namespace MSXML;


..

.

debuke

unread,
Jan 12, 2001, 2:45:40 PM1/12/01
to
replace the word "Gram" with "msxml" in the previous post for the include file.
also, the error on build i get is :

c:\XML\MyApp.idl(25) : error MIDL2025 : syntax error : expecting a type
specification near "IXMLDOMDocument"


...

..

.

Igor Tandetnik

unread,
Jan 12, 2001, 4:08:12 PM1/12/01
to
You are importing msxml in C++ code. The error is from MIDL compiler. You
are supposed to import the library into your IDL, as in

importlib(msxml.dll);

inside your library block.

You already have a number of importlib statements, generated by wizard. Add
the above to the list.


--
With best wishes,
Igor Tandetnik

"debuke" <deb...@att.net> wrote in message

news:952501c07ccd$7989fc80$33862ecf@cpmsftngxa04...

debuke

unread,
Jan 12, 2001, 4:46:13 PM1/12/01
to
i agree that it is a part of the midl compiler. however, i import the DLL (using
MSXML.DLL???) in the library block?

importlib(msxml.dll);

inside your library block.


...

..

.

Alexander Nickolov

unread,
Jan 12, 2001, 5:02:20 PM1/12/01
to
Then did you also define your interfaces in the library block after
that importlib()?

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnic...@geocities.com
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"debuke" <deb...@att.net> wrote in message

news:259601c07ce1$1551c4a0$34862ecf@cpmsftngxa05...

debuke

unread,
Jan 15, 2001, 3:20:12 PM1/15/01
to
i got it. seems the problem is the latest version of the Platform SDK wasn't
installed on my machine. after i installed it, it compiled and i can pass in the
ixmldomdocument into my method.

thanks all for the help!!!

btw, i didn't have to declare "importlib(msxml.dll);"

importlib(msxml.dll);

inside your library block.


....

...

..

.

0 new messages