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 Sascha Presnac <sa...@bestcolor.com> on 2001/06/08 16:04:14 UTC
Problems with Xerces 1.4.0 and VC++ 6.0
Hi!
I have a big problem using Xerces 1.4.0 with Visual C++ 6.0 (SP 4) and
Windows 2000 Pro.
I want to build a DLL, witch implements the xerces .lib-files (and so calls
the xerces dll´s)
Now, when I try to load the DLL with Delphi (its an C++ with 'extern "C"'
calls in it), it throws me an Expection.
It does not throw errors, when i try to load it with a sample console .exe
file.
So, for my eyes, it seems that i cannot build a .dll witch is calling xerces
for building a dll to use with Delphi.
Please help me with that matter.
Thank you in advance...
Sascha
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Problems with Xerces 1.4.0 and VC++ 6.0
Posted by Chris Hill <ch...@wolfram.com>.
It's hard to say what the problem is without more details. What is the
exception it throws? Is this only under the debugger? Xerces does throw
exceptions internally. Perhaps Delphi's debugger is showing these internal
exceptions.
Are you sure you are declaring the C++ function with the same calling
convention in Delphi and C++ (cdecl, stdcall, etc..)?
Your sample console program (written in C++?) which works calls the same
DLL that the Delphi program is calling?
Your C++ function should make sure that no exceptions are thrown out of the
function since Delphi probably wouldn't be able to handle them
correctly. You should wrap the everything in your C++ function in one
try/catch block to make sure no exceptions are thrown out of the DLL.
try { /* Xerces calls */ }
catch(...) { /* signal error condition by some other means */ }
Chris
At 09:04 AM 6/8/2001, Sascha Presnac wrote:
>Hi!
>
>I have a big problem using Xerces 1.4.0 with Visual C++ 6.0 (SP 4) and
>Windows 2000 Pro.
>I want to build a DLL, witch implements the xerces .lib-files (and so calls
>the xerces dll´s)
>Now, when I try to load the DLL with Delphi (its an C++ with 'extern "C"'
>calls in it), it throws me an Expection.
>It does not throw errors, when i try to load it with a sample console .exe
>file.
>
>So, for my eyes, it seems that i cannot build a .dll witch is calling xerces
>for building a dll to use with Delphi.
>
>Please help me with that matter.
>Thank you in advance...
>
>Sascha
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org