For now I gave up on the dual boot machine and configured the machine I
could connect to for testing my driver. I seem to be having one problem
after another with my tools.
I’m just trying to get messages to display. When I was experimenting
with the remote debugger, I was able to get KdPrint messages to display
once, but I haven’t seen them since. I found DbgMon on OSR’s website
and I’m trying to get the messages to display there with a driver that I
know works with the hardware. It had KdPrint messages throughout.
Since the DbgMon documentation referred only to DbgPrint and DbgPrintEx
messages, I changed all the KdPrint messages to
DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_TRACE_LEVEL,“format string…”);
I run a mode that I know is triggering the driver (it turns on some
relays on the external hardware, so I can hear it). The code has
DbgPrintEx messages on all the I/O handling routines. I went into the
DbgMon event filter flags and set the DPFLTR_IHVDRIVER_ID flag to
DPFLTR_INFO_LEVEL and the check box for Enabled is checked.
Without message output I’m flying blind.
Additionally, I’ve been experimenting with the driver that won’t start
with OSR’s OSRLOADER program. I go to C:\Windows\System32\drivers and
select the MTIsaDrv.sys driver. The display name shows up as MTIsaDrv,
which is correct. I leave everything else as default. It registers OK
when I click on Register Service, but when I click on Start Service, it
pops up an error saying “The system cannot find the file specified.”
This is essentially the same problem I’ve been seeing when I tried to
load it programatically.
When the system calls Start Service, what happens with the driver? Is
this when DriverEntry is called? Why is it returning with file not
found? The OSR driver loader is obviously finding the file because I
browse for it in the driver directory. Under what conditions will a
driver return file not found?
The crazy thing is that a few days ago in a desperate attempt to get
something to work, I took the driver that was working, stripped out one
IOCTL call that was using some deprecated Ke386 function calls that
wasn’t being used anyway, then renamed the various variables and
function calls in the other driver to this driver’s names (ie replaced
all instances of porttalk or PortTalk with MTIsaDrv) and the behavior
didn’t change. The current version of the driver is 90% the same as the
old porttalk driver. The only differences are one less IOCTL case that
wasn’ used, the renaming of the variables, and some slight changes to
the CTL_CODE macros to generate different IOCTL numbers (I changed the
first argument from 40000 to 42000 only).
I still get the file not found error when I try to start the driver.
Is there something that is case sensitive that needs to be in all lower
case? That’s the only thing I can think of at this point.
Bill