DLL Problems

lboisset

Member
Hello,

Does someone have any problem using DOA controls inside DLLs?

My problem is that when the code is in a normal program an any TOracleQuery
raises an exception (No datafound or anything) it properly goes to the catch
sections. But when it's in a dll. The exceiption goes directly outside.

More over debugging the Client App and the dll at the sametime you see
builder pointing the exception in the OracleQuery->Execute() but then
instead of jumping to the catch section like does in normal app a popup
windows with the exception appears, directly outside builder, just like the
hard access violation does.

Am I forgeting something about DLL and DOA? And builder? I'm pretty used to
the BPLs. I know that I should connect Application opject and so but in this
case the final client application is not going to be a VCL application so I
can't do it (But i'm testing with a VCL one).

The dll is not a VCL DLL it's a threaded one (from DLL Wizard) Should it be
a VCL one?

Thank in advance

Luis.
 
Hello,

It seems that I solve it. The problem is that even almost all my code is pure C++ and there are near to nothing VCL stuff, something remains. And it seems to be the Exception object. If I create the DLL as Threaded the Exception object seems to throw outside, surelly it's looking for somo global VCL stuff. If I create it as VCL then 'sysinit.obj' is included in the project and the necessary global VCL objects are ready to conduit the VCL exception inside the C++ exception handling.

Hope this helps others.

Luis.
 
Back
Top