Link to home
Start Free TrialLog in
Avatar of Ray(2)
Ray(2)

asked on

EResNotFound in DLL

I have written a DLL in Delphi 1.2 that reads values over the serial port and then displays them in different graphical formats. I also have an MDI C program (written by someone else) that calls my DLL. USUALLY when there are several MDI Child windows open &Ā some simple disk access has been performed, and then my DLL is called I get an EResNotFound exception. It is trappable, and on the second call to my DLL everything works just fine. The exception occurs during the line: MainForm := TMainForm.Create(Application); Also it ONLY occurs under Windows 3.11, with Windows 95 it works ok. It is not a memory availability problem as there is more than enough around.I am already aware of the StrToFloat problem in Delphi 1 DLL's and I have compensated for it.The problem has an uninitialised memory/wrong segment feel to it, but I can't seem to find out why or where.I would be grateful if anybody can throw any light on the problem at all.
ASKER CERTIFIED SOLUTION
Avatar of icampbe1
icampbe1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ray(2)
Ray(2)

ASKER

Thanks for the suggestion, I have tried using 'nil' instead but the same exception occurs. The DLL is only called from one program, in about 3 different places. The DLL is always modal, ie the DLL must be closed before control is returned to the calling program. Its only a DLL because the main program had to be expanded, and I program in Delphi, the main program was in C. It doesn't really do anything fancy as far as DLL's go. A few pointers get passed, thats about it.