[comp.windows.ms] Problem loading a dynamic library on need, any helpers?

dsb@Rational.COM (David S. Bakin) (02/20/89)

Would someone who knows about dynamic libraries care to correspond with me
on the following problem?  I have written a very simple one which requires
initialization (once) and uses one data segment which needs to be FIXED.
I followed the example in Petzold's Programming Windows book.  I have
instrumented the thing with system modal message boxes.  If I double-click
on it it initializes fine, and then when I run a utility that uses it it
runs fine too.  But if instead (in a fresh Windows) I double-click on the
utility expecting the library to get found and loaded before the utility runs
(its in the path, which is also the current directory) Windows goes haywire.
Before I ran RC with a null resource file against it the screen display 
just went on the blink (switched to a bad scan rate) and I needed to reboot.
Now that I've run RC against it (null resource file) the cursor switches to
hourglass and stays there (it tracks, but nothing happens.  ever.) until I
reboot.  I've tried several variations of FIXED v. MOVABLE, INITGLOBAL v.
INITINSTANCE, and so on with no success (but in each case it works if I
load the library first by double clicking on it).  The library has the
extension .EXE (although LINK4 first tried to make it with extension .DLL
until I supplied an extension in the command line).  Windows/286 2.1, SDK 2.1.

Thanks for your help! -- Dave
----------------------------------------------------------
Dave Bakin				    (408) 496-3600
c/o Rational; 3320 Scott Blvd.; Santa Clara, CA 95054-3197
Internet:  dsb@rational.com	 Uucp:  ...!uunet!igor!dsb