As some of you probably already know, I write display drivers.
In the process of doing the next generation chips, we use a simulator, which
is a huge C++ project.
I’ve currently got a driver that runs fine using this simulator. I then
modify the C++ project using a #define, so that it has a slightly different
configurtion. This causes my driver to not load. I don’t mean not run, but
Windows XP refuses to load the driver, and when I open the control panel for
the display, it says “The display driver used for this adapter is for an
older version of Windows” (or something similar to that).
The #define basicly configures the simulated chip slightly different (the
number of internal units in a particular place), and results in a slightly
larger DLL (6.7MB instead of 6.4MB), but should not affect anything in the
display drivers actual funcationality.
I’ve spent most of today trying to figure out what’s going wrong. I had this
once earlier, and in that case it was because I was trying to call an
unsupported memory allocation routine, but I’ve checked for that, and it’s
not that.
So far I’ve checked the following (on Display Driver DLL):
- Rebuild everything. Makes no difference, I can reliably reproduce it by
switching the #define back and forth. - Imports/Exports/Dependents.
Result: No different between working and non-working. - Other fields of dumpbin output.
Result: All differences seem to be due to change in size of file,
nothing unexpected. - Maximum load image size: Changed from 13 MB to 32 MB.
Result: No difference. - Turn on SLS (Show Loader Snaps) in Global Flags.
Result: Lots of extra debug messaged, but no help. - Turn on D32 (Kernel 32 debugging) in Global Flags.
Result: Nothing changes. No extra output in WinDBG, and no change in
behaviour. - Set event in WinDBG to catch the load of the DLL.
Result: Failing case doesn’t see the DLL loaded. Succeeding case
sees the DLL loaded.
Does anyone have an idea of how to discover why Windows isn’t even loading
my DLL in one case, and it’s loading just fine in another.
Thanks in advance for any advice.
–
Mats