BUG: The 98 DDK VALUEADD Sample Causes a Blue Screen to OccurID: Q229803
|
Valueadd.sys causes a blue screen to occur when a Win32 application tries to do a CreateFile() call to it.
The reason the blue screen occurs is because Valueadd.sys tries to complete the same IRP twice.
Valueadd.sys is calling IoCompleteRequest twice on the same irp. Inside of VA_CreateClose (if unmodified), the code is as follows:
if (DeviceObject == Global.ControlObject) {
//
// We allow people to blindly access our control object.
//
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
}
This code needs to be changed to the following [adding the return (status)
line]:
if (DeviceObject == Global.ControlObject) {
//
// We allow people to blindly access our control object.
//
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = status;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
// New line of code.
return (status);
}
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
Additional query words: bluescreen
Keywords : kbDDK kbKMode kbWinOS98 kbGrpWin9xDDK
Version : WINDOWS:; Win98:
Platform : WINDOWS Win98
Issue type : kbbug
Last Reviewed: May 7, 1999