
Illegal Instruction Workaround
To All,
A couple of weeks ago I stumbled into a problem wherein I was getting an
Illegal Instruction on a reproducible basis. Herewith is the scenario and the
cure:
In a multi-dll app, the main EXE calls a procedure in one DLL, which in turn
calls another procedure in a second DLL which then tries to open a window which
calls IniMgr.Fetch (because the Window Behavior checkbox to Save and Restore
window location is checked), at which time an Illegal Instruction occurs and
the application terminates.
The defining characteristic is that the second DLL is NOT declared as a DLL to
the main EXE (no procedures in the second DLL are called directly from the main
EXE). Once the second DLL is declared to the main EXE, the problem vanishes.
Hope this helps someone,
George Lehmann
Horizon Business Concepts (C5-ABC)