Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Can't access MS XML DOM once passed across a DCOM boundary ?

Posted on 2002-04-19
4
Medium Priority
?
317 Views
Last Modified: 2008-02-01
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 ?
0
Comment
Question by:s_stirley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 23

Expert Comment

by:b1xml2
ID: 6954432
We have had this chat with Microsoft Premier Support and all they can say is that:

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()). The caller can then call IXMLDOMDocument::loadXML(BSTR) on this string to restore the XML object locally.
<<
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 6954441
or rather the pointers are no longer valid references
0
 
LVL 27

Accepted Solution

by:
BigRat earned 1200 total points
ID: 6962412
"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 !"

The XML DOM may be declared as an interface but it is actually an in-process object.

In DCOM you can get objects to source and sink themselves only if the support certain types of marshalling and, most importantly, they run in their own process space - called the threading model. In which case proxy objects actually do the work in passing the parameters and returning the result with little messages.

There is a very readable book "Learning DCOM" from O'Reilly which explains exactly how this all works, including the delta pings and all the other nasty complexities.

As Brandon says get the DOM to XML source in a BSTR and just pass that along. The time taken to destruct and construct the DOM will be negligable compared to the DCOM message passing.

0
 

Author Comment

by:s_stirley
ID: 6962859
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.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question