Problem installation bus driver with W2K_srv SP4

Hello everybody,

I have created a bus driver for manage a PCSC reader USB multislot.

Ths first step is :
Install bus driver

Second step :
Install slot driver

In Windows XP there nothing problem.

But with W2K when I plug the reader for the first install I have immediatry a reboot.

And after reboot I have this message :

STOP: C000026C { unable to load device driver}
\systemRoot\system32\drivers\MyBusDriver.sys device driver could not be loaded
Error status was 0xC000012F

The sequence used for winXP is :

In the dispatch routine addDevice :

if (IoIsWdmVersionAvailable(1, 0x20))
{
deviceExtension->WdmVersion = WinXpOrBetter;

BulkUsb_DbgPrint(3, (“AddDevice - WinXP or BETTER\n”));
}
else if(IoIsWdmVersionAvailable(1, 0x10)) {

deviceExtension->WdmVersion = Win2kOrBetter;
BulkUsb_DbgPrint(3, (“AddDevice - Win2000 or BETTER\n”));
}
else if(IoIsWdmVersionAvailable(1, 0x5)) {

deviceExtension->WdmVersion = WinMeOrBetter;
BulkUsb_DbgPrint(3, (“AddDevice - WinME or BETTER\n”));
}
else if(IoIsWdmVersionAvailable(1, 0x0)) {

deviceExtension->WdmVersion = Win98OrBetter;
BulkUsb_DbgPrint(3, (“AddDevice - Win98 or BETTER\n”));
}

After that, I use this parameter “WdmVersion” for start and remove device.

startDevice routine :

if(WinXpOrBetter == deviceExtension->WdmVersion) {

deviceExtension->SSEnable = deviceExtension->SSRegistryEnable;

//
// Set timer for selective suspend requests
//
if (deviceExtension->SSEnable) {

dueTime.QuadPart = -10000 * IDLE_INTERVAL; // 5000 ms

KeSetTimerEx (&deviceExtension->Timer,
dueTime,
IDLE_INTERVAL, // 5000 ms
&deviceExtension->DeferredProcCall);

deviceExtension->FreeIdleIrpCount = 0;
}
}

With WXP all is all right.

But in W2K I have a BSOD.

Some one could help me please for understand this bug.

Thank you for your help

Best regards,
Kamel

xxxxx@hotmail.com wrote:

I have created a bus driver for manage a PCSC reader USB multislot.

Ths first step is :
Install bus driver

Second step :
Install slot driver

In Windows XP there nothing problem.

But with W2K when I plug the reader for the first install I have immediatry a reboot.

And after reboot I have this message :

STOP: C000026C { unable to load device driver}
\systemRoot\system32\drivers\MyBusDriver.sys device driver could not be loaded
Error status was 0xC000012F

C000012F says that the file was not recognized as an executable file –
the first two bytes were not “MZ”. Are you sure you copied the correct
file to your Win2K system?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.