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 Tom Erickson <te...@mail.team345.com> on 2001/06/21 22:51:27 UTC

Using Xerces from a COM DLL

I am writing Wizard to fit inside a commercial tool that runs under various Win32 OS's.  Wizards in this tool are recognized by implementing a COM DLL that follows an interface specified by the tool authors.  I first implemented a sample Wizard following the instructions they provide, and that works.  I also implemented a modified version of the DOMPrint sample project from Xerces1.4.0 that parses the XML stream I expect in the wizard, and that works well.  All of this is under VC++ 6.0, and my development system is Windows 2000 Professional.

When I integrated the two projects, the Wizard will not run, meaning it does not even display itself, let alone run.  Integrate here means that I took the classes from the modified DOMPrint project and added them to the sample Wizard project, and modified the project settings to point to the appropriate Xerces1.4.0 include and library paths.  In one case I did not even change the existing Wizard code to create an instance of the parsing class, and the Wizard still did not come up.

The question is, should I expect to be able to access Xerces from a COM DLL?  I searched the Google newsgroups and found nothing, and searched the Xerces documentation and found no real mention of COM compatibility, one way or another.  I have this same question out to the tool authors, but felt I should inquire on the Xerces end as well.

Any help or guidance you can provide here will be greatly appreciated!  Thank you in advance,

Tom Erickson
Software Principal
Team345
www.team345.com

Re: Using Xerces from a COM DLL

Posted by Alberto Massari <al...@exceloncorp.com>.
At 16.51 21/06/01 -0400, you wrote:
>I am writing Wizard to fit inside a commercial tool that runs under 
>various Win32 OS's.  Wizards in this tool are recognized by implementing a 
>COM DLL that follows an interface specified by the tool authors.  I first 
>implemented a sample Wizard following the instructions they provide, and 
>that works.  I also implemented a modified version of the DOMPrint sample 
>project from Xerces1.4.0 that parses the XML stream I expect in the 
>wizard, and that works well.  All of this is under VC++ 6.0, and my 
>development system is Windows 2000 Professional.
>
>When I integrated the two projects, the Wizard will not run, meaning it 
>does not even display itself, let alone run.  Integrate here means that I 
>took the classes from the modified DOMPrint project and added them to the 
>sample Wizard project, and modified the project settings to point to the 
>appropriate Xerces1.4.0 include and library paths.  In one case I did not 
>even change the existing Wizard code to create an instance of the parsing 
>class, and the Wizard still did not come up.
>
>The question is, should I expect to be able to access Xerces from a COM 
>DLL?  I searched the Google newsgroups and found nothing, and searched the 
>Xerces documentation and found no real mention of COM compatibility, one 
>way or another.  I have this same question out to the tool authors, but 
>felt I should inquire on the Xerces end as well.

The problem you can experienced could be that, being loaded as a COM DLL, 
your local directory is not the directory where your binary is; this could 
cause problems in finding dependent DLLs (like Xerces or, even worse, ICU).

Hope this helps

Alberto


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org