Click to See Complete Forum and Search --> : WDM driver crashes on Win98 but works on Win2k


Tilo Koeppe
February 11th, 2002, 05:49 AM
I developed a USB driver (WDM) using Compuware's DriverWorks. The driver works fine on
Win 2000 but crashes on Win 98 when detaching the USB device.
When the device is detached the framework calls a method OnRemoveDevice(). Within that
method I signal a thread to terminate itself and then I wait until the thread has terminated.
The wait is done by just calling KeWaitForSingleObject() with the thrad as the event object.
Withing KeWaitForSingleObject() a page fault occurs. The thread is still running when the
wait is called, so the thread object does exist.

I tried not to wait for the thread termination. This seems to work for Win 98 but causes
the driver to crash on Win 2000 ...

Does anyone have an idea what may be wrong for Win 98?

Regards
Tilo