Thread View: comp.os.ms-windows.programmer.win32
1 messages
1 total messages
Started by julianrz
Fri, 19 Dec 1997 00:00
test app calling a DLL causes exception BEFORE any code called
Author: julianrz
Date: Fri, 19 Dec 1997 00:00
Date: Fri, 19 Dec 1997 00:00
32 lines
2489 bytes
2489 bytes
I am really curious if anybody have seen anything similar: I am
developing a 32-bit DLL using borland c++ 5.02. The dll does not use OWL.
There is a simple test program I wrote to test my DLL. The program is
statically liked with the DLL. In turn, the DLL is statically linked with
some other DLLs I developed. The DLL is pretty simple, but it is
statically linked with more complicated dlls.
I got into a situation where a THREAD just plain would not start in the
DLL or in the tester program IF the test program is actually CALLING the
dll. If it does not, the thread in the test program starts fine.
CreateThread, however, would succeed in both cases, but the thread
routine never executes. To add some spice, this always works on Win95,
but does not on NT 4.0. Also, td32 will report an exception BEFORE
stepping into this program. I thought, the problem may be in the DLL
startup code (I have a DllMain), and unchecked 'execute startup code' in
td32. In this case, td32 will cause an exception on the FIRST
instruction, without any chance to call DllMain or ANY function in that
dll yet! The program is statically linked with the dll. If I use dynamic
load, the problem disappears.
I have been developing this DLL for a year now, and most exes that call
the DLL have no problem. The problem may go away if I add code to the
dll.
Is there any chance my PSP is corrupt or this is a trace of some
low-level problem in borland code? My test program is in C++/Owl, but I
had same problem once with a Delphi program calling another DLL... All my
DLLs use exceptions.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads