s_stirley
asked on
Can't access MS XML DOM once passed across a DCOM boundary ?
I'm using C++ (but it's not a C++ problem) with the MS XML DOM in order to build well formed XML data files and apply XSLT to these to get nice output. That all works fine. However when I try to pass the DOM Interface across to another DCOM object I've defined (an optional component) and access it this causes an exception -
First-chance exception in MSServer.exe (KERNEL32.DLL): 0xC0010000: (no name).
First-chance exception in MSServer.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
The Microsoft support knowledgebase has the following to say -
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q259004
Which isn't solving the proble at all, it's just sweeping it under the carpet ... I can't believe it's not possible to pass an XML DOM interface across to another DCOM component and use it from there, that's the whole point of DCOM really !
Any insights anyone ?
First-chance exception in MSServer.exe (KERNEL32.DLL): 0xC0010000: (no name).
First-chance exception in MSServer.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
The Microsoft support knowledgebase has the following to say -
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q259004
Which isn't solving the proble at all, it's just sweeping it under the carpet ... I can't believe it's not possible to pass an XML DOM interface across to another DCOM component and use it from there, that's the whole point of DCOM really !
Any insights anyone ?
or rather the pointers are no longer valid references
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Using get_xml sending it across as a BSTR and then reloading that to another DOM in the client does work fine, and is quite quick.
Seems a shame I can't pass the object, but that's life sometimes ! thanks for both answers, I'd split the points but it won't let me :( they go to BigRat for the in-depth reason why it won't work and the book suggestion.
Thanks.
Seems a shame I can't pass the object, but that's life sometimes ! thanks for both answers, I'd split the points but it won't let me :( they go to BigRat for the in-depth reason why it won't work and the book suggestion.
Thanks.
1. Do not pass DOM objects by reference or even by value across DCOM Objects. Pass XML String.
2. This problem relates to context switching and loss of pointers.
and thus this is the same thing in the URL mentioned:
>>
If you want to use XML across execution contexts, define a method on your wrappers that passes the raw XML data back to the caller (which you obtain through the use of IXMLDOMDocument::get_XML()
<<