Matt Lowe
2008-05-29 14:37:24 UTC
Hi, genius-type people.
I have two nearly identical DLLs, one created in VS C++, and one created in
RAD studio. They each export a function that throws a handled exception. The
functions are dynamically loaded by a VB plugin for ESRI's ArcGIS.
Here's the strange thing: when I call the function ThrowHandledException()
from the VS DLL inside the VB code, everything works fine. When I call the
function from the RAD studio DLL, the host app terminates, as I would expect
it to do if I threw an *unhandled* exception across a C interface.
Anybody know what might be going on here? The code looks like this:
extern "C" {
void __declspec(dllexport) _stdcall ThrowHandledException();
}
void ThrowHandledException()
{
try { throw 123; } catch(...) {}
}
I have two nearly identical DLLs, one created in VS C++, and one created in
RAD studio. They each export a function that throws a handled exception. The
functions are dynamically loaded by a VB plugin for ESRI's ArcGIS.
Here's the strange thing: when I call the function ThrowHandledException()
from the VS DLL inside the VB code, everything works fine. When I call the
function from the RAD studio DLL, the host app terminates, as I would expect
it to do if I threw an *unhandled* exception across a C interface.
Anybody know what might be going on here? The code looks like this:
extern "C" {
void __declspec(dllexport) _stdcall ThrowHandledException();
}
void ThrowHandledException()
{
try { throw 123; } catch(...) {}
}
--
Matt Lowe
Milsoft Utility Solutions
Matt Lowe
Milsoft Utility Solutions