You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Gareth Reakes <ga...@decisionsoft.com> on 2000/12/20 14:10:10 UTC
Using Xerces in a COM Object
Hello all,
I am creating a simple in process COM object compiled as a dll.
The following code causes abnormal program termination.
If the createElementNS() line is removed then everything is OK. Any help
is appreciated - first time using COM!!
STDMETHODIMP CXEngine::execute(BSTR uri, BSTR dataDoc, BSTR *result)
{
try{
XMLPlatformUtils::Initialize();
}
catch (const XMLException& eXerces) {
char *pMsg = XMLString::transcode(eXerces.getMessage());
fprintf(stderr, "Xerces exception caught: %s\n", pMsg);
delete pMsg;
}
DOMString DataDocQName = L"xs:__data__";
DOMString DataDocNamespaceURI = L"http://www.xmlscript.org/";
DOM_DocumentType DataDTD;
DOM_Document data = factory.createDocument(DataDocNamespaceURI,
DataDocQName, DataDTD);
DOM_Element child1 = data.createElementNS("", "child1");
return S_OK;
}
Gareth
Re: Using Xerces in a COM Object
Posted by Gareth Reakes <ga...@decisionsoft.com>.
Sorry I didnt make myself clear. I am not using Xerces-COM. I have an
application which uses xerces-c and works. I want to turn it into a COM
object. When I tried this it did not work so I wrote the few lines of code
I posted in my previous messgae - which also fails.
Gareth
On Wed, 20 Dec 2000, Curt Arnold wrote:
> When functionality is exposed by MSXML that isn't implemented by Xerces-C,
> Xerces-COM returns E_NOTIMPL. In this case, you are making a call to a DOM
> 2 method and Xerces-C hasn't implemented DOM2.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
Re: Using Xerces in a COM Object
Posted by Curt Arnold <ca...@houston.rr.com>.
When functionality is exposed by MSXML that isn't implemented by Xerces-C,
Xerces-COM returns E_NOTIMPL. In this case, you are making a call to a DOM
2 method and Xerces-C hasn't implemented DOM2.