I think I last talked about this on the Windbg list. I’ve been having a
lot of problems getting the tools to work. Things work on one machine,
but not on another. I was able to get windbg to connect to one machine
with only one OS installed, but not on a dual boot machine. The single
OS system would not show messages with DbgMon.
Despite the handicaps, I got the driver working on the single OS
computer, but now have problems on the dual boot computer.
Since switching back to the dual boot computer (on the XP side) I have
run into a number of strange things. DbgMon seems to work on this
machine, but the only messages I’ve seen are system messages. The
majority from Detectdr. I’ve also seen a watchdog timer message.
I have been unable to get the driver to work if you aren’t logged in as
Admin and I’ve been trying to tweak the INF to deal with that. I
installed the driver through the Add New Hardware wizard using the INF.
I then rebooted and switched to a non-Admin account, When I tried to
run, I got errors from my app. When I tried to read from hardware using
the driver, I got an ERROR_GEN_FAILURE which is for when a device
attached has failed. When I tried to write to the driver, I got
ERROR_ACCESS_DENIED.
I did some online research and found some information on setting up
security access permissions. There were already some in the INF
template I used, which was from the portio example in the DDK.
The original was:
[MyDeviceClassReg]
HKR,0,%ClassName%
HKR,Icon,-5
HKR,DeviceCharacteristics,0x10001,0x100 ;Use same security checks
on relative opens
HKR,Security,“D:P(A;;GA;;;SY)(A;;GA;;;BA)” ;Allow generic all access
to system and built-in Admin.
I added:
[MyDeviceClassReg.Security]
“D:P(A;;GR;;;WD)(A;;GA;;;SY)(A;;GA;;;BA)”
When I still couldn’t use the driver in non-Admin mode, I tried changing
it to:
“D:P(A;;GA;;;WD)(A;;GA;;;SY)(A;;GA;;;BA)”
Which I know is not recommended, but I was experimenting.
I was also getting problems installing the driver with the Security
section. It was coming up with file not found errors in the Add
Hardware Wizard. I commented out the security key settings and the
driver now installs OK.
The biggest problem is that now even the Administrator can’t use the
driver. When I try to read or write to it in Admin mode, I get Access
Denied errors. I think something got messed up in the security
settings, but I can’t figure out how to fix them. I know Windows hides
security settings in the registry so you can’t even find them in there.
Am I going to have to erase this installation of Windows and start over?
Bill