BUG: The 98 DDK VALUEADD Sample Causes a Blue Screen to Occur (229803)



The information in this article applies to:

  • Microsoft Windows 98
  • Microsoft Windows 98 Driver Development Kit (DDK)

This article was previously published under Q229803

SYMPTOMS

Valueadd.sys causes a blue screen to occur when a Win32 application tries to do a CreateFile() call to it.

CAUSE

The reason the blue screen occurs is because Valueadd.sys tries to complete the same IRP twice.

RESOLUTION

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);
    }
				

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

Modification Type:MinorLast Reviewed:12/20/2004
Keywords:kbbug kbKMode kbpending KB229803