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

ID: Q229803


The information in this article applies to:
  • Microsoft Windows 98
  • Microsoft Windows 98 Driver Development Kit (DDK)


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 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
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.