|
One thing to try (as strange as it may sound) is to
create a new unit, copy all the code from the old library unit into
Notepad and then copy into the new unit and save over the old library unit.
Sounds odd, but it has worked for me in other situations (two or three times
now) where odd, inexplicable, things were happening which I think were
because there were hidden characters somewhere in the source causing the
compiler difficulty.
As far as project settings go, if you start a new
DLL Library project then the default options should be fine.
Is there any initialisation code inside the library
(ie a begin at the bottom of the unit) that executes when the library is loaded
even if no procedures inside it are called?
Phil.
----- Original Message -----
Sent: Thursday, August 14, 2003 1:21
PM
Subject: Re: [DUG]: Help - Dll all
broke
Hi tried dll in blank App. Same
problem. So problem is in the DLL itself. Any ideas what compiler
settings may effect my dll? This is the same machine I build all my
other DLLs on.
Rob Martin Software Engineer phone 03 377 0495 fax 03
377 0496 web www.chreos.com
----- Original Message -----
Sent: Thursday, August 14, 2003 10:23
AM
Subject: Re: [DUG]: Help - Dll all
broke
First thing to do then would be to just set up
an empty test application and try calling load/unload without doing anything
else. Then try doing the same inside a thread in the test app. Then if
it is still occuring, possibly check the compiler settings for the DLL.
Sorry, not much help.
Phil.
----- Original Message -----
Sent: Thursday, August 14, 2003 9:51
AM
Subject: Re: [DUG]: Help - Dll all
broke
Thanks for the reply Phil
Unfortunately I also get the error in the App
which completely kills it (just shuts down). I have played with the
code and removed all calls to the dll, the error still occurs when simply
loading (loadLibrary) and closing (FreeLibrary). Their is no
construction / Destruction code in the Dll. My only thought is it
may be related to the DLL being opened by a thread, although the open and
close is taking place in the same procedure.
Rob Martin Software Engineer phone 03 377 0495 fax
03 377 0496 web www.chreos.com
----- Original Message -----
Sent: Thursday, August 14, 2003
8:07 AM
Subject: Re: [DUG]: Help - Dll all
broke
Rob,
do you get that exception when running from
inside the IDE or also when you are running the program normally (ie
from explorer etc)? I was using a 3rd party DLL and had the same
exception raised (too many consecutive exceptions) and spent ages
tracking it down but couldn't (didn't have access to the source code) -
in the end it was an exception that only occured when running from
inside the IDE. I don't think it was related to the FreeLibrary command
but it's possibly worth trying.
Phil.
----- Original Message -----
Sent: Wednesday, August 13, 2003
4:31 PM
Subject: [DUG]: Help - Dll all
broke
Hi
I am going out to a client have just
recompiled their DLL file to work with the latest version of our
app. The last time we built the dll it was under D4 and has been
running under the D4 version of our app. Both the APP and the
DLL are now build in D6, none of the code has changed but I now get an
exception (too many consecutive exceptions) when calling
FreeLibrary.
I have done practically nothing with the
dll prior to calling FreeLibrary, called the same function 2x which
returns a string (sharemem is in the uses).
A number of other DLLs for other clients
all work perfectly.
Help any ideas greatly
appreciated.
Rob Martin Software
Engineer phone 03 377 0495 fax 03 377
0496 web www.chreos.com
|