Microsoft KB Archive/831741

From BetaArchive Wiki
Knowledge Base


The Add New Hardware Wizard appears after you install the VHidMini sample driver

Article ID: 831741

Article Last Modified on 10/19/2005



APPLIES TO

  • Microsoft Windows Server 2003 Driver Development Kit




SYMPTOMS

After you install the Virtual Human Input Device (VHidMini) sample driver from the Microsoft Windows Server 2003 Driver Development Kit (DDK), you see the Add Hardware Wizard every time that you restart the computer. This behavior is described in the Vhidmini.htm Readme file in the Device Driver Kit (DDK). These symptoms only occur when you install the sample driver as a root-enumerated device in the system.

CAUSE

After the sample driver is installed, the system responds to IRP_MN_QUERY_ID requests for the client Virtual Human Input Device (HID) and responds to IRP_MN_QUERY_ID requests from the parent bus device. This invalidates the node and causes the operating system to display the Add Hardware Wizard.

WORKAROUND

To work around this problem, force the VHidMini sample file to ignore all IRP_MN_QUERY_ID requests that are meant for the parent functional device object (FDO).

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. You can apply this fix directly to the Plug and Play handling routine of your driver when responding to the IRP_MN_QUERY_ID I/O Request Packet.

    case IRP_MN_QUERY_ID:
        
        {
            PIO_STACK_LOCATION  previousSp;
            previousSp = (PIO_STACK_LOCATION) ((UCHAR *) (IrpStack) + sizeof(IO_STACK_LOCATION));

            DebugPrint(("Query-ID Parent %p, %p\n", previousSp->DeviceObject,   DeviceObject));            

            if(previousSp->DeviceObject == DeviceObject) {
                //
                // This is meant for the parent FDO. Therefor, just pass it down.
                //
                ntStatus = Irp->IoStatus.Status;            
                break;
            }
        }

        // Continue with typical IRP_NM_QUERY_ID handling...

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This fix is included in the Windows Server 2003 DDK SP1 release.

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Keywords: kbbug kbcodesnippet kbdocfix kbddk kbsample kbupdate kbwinserv2003presp1fix KB831741