Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting... Please check out the Community Guidelines in the
Announcements and Administration Category, below.

KbFilter Driver PDO not appearing

Hi All

I am trying to develop the filter driver for HID stack and want to create PDO also,
I am referring the KBfilter which is not creating PDO. Even after setting the WDFFALSE to NoDisplayInUI and DontDisplayInUI.
Is there any additional code to be added ?


WDF_DEVICE_PNP_CAPABILITIES_INIT(&pnpCaps);

pnpCaps.Removable = WdfTrue;
pnpCaps.SurpriseRemovalOK = WdfTrue;
pnpCaps.NoDisplayInUI = WdfFalse;

pnpCaps.Address = InstanceNo;
pnpCaps.UINumber = InstanceNo;

WdfDeviceSetPnpCapabilities(hChild, &pnpCaps);

//
// TODO: In addition to setting NoDisplayInUI in DeviceCaps, we
// have to do the following to hide the device. Following call
// tells the framework to report the device state in
// IRP_MN_QUERY_DEVICE_STATE request.
//
WDF_DEVICE_STATE_INIT(&deviceState);
deviceState.DontDisplayInUI = WdfFalse;
WdfDeviceSetDeviceState(hChild, &deviceState);

Thanks and Regards,
Siddaram.

Comments

  • Tim_RobertsTim_Roberts Posts: 12,568
    On Nov 12, 2017, at 7:23 AM, xxxxx@gmail.com wrote:
    >
    > I am trying to develop the filter driver for HID stack and want to create PDO also,
    > I am referring the KBfilter which is not creating PDO. Even after setting the WDFFALSE to NoDisplayInUI and DontDisplayInUI.
    > Is there any additional code to be added ?

    How do you know it is not creating the PDO? Are you creating a control PDO? Did you get errors? You really have provided no information at all for us to go on here.

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

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Doron_HolanDoron_Holan Posts: 10,353
    How did you install the filter driver ? Devcon install is not what you want, you need devcon update instead.

    d

    Bent from my phone
    ________________________________
    From: xxxxx@lists.osr.com on behalf of xxxxx@probo.com
    Sent: Sunday, November 12, 2017 9:41:06 PM
    To: Windows System Software Devs Interest List
    Subject: Re: [ntdev] KbFilter Driver PDO not appearing

    On Nov 12, 2017, at 7:23 AM, xxxxx@gmail.com wrote:
    >
    > I am trying to develop the filter driver for HID stack and want to create PDO also,
    > I am referring the KBfilter which is not creating PDO. Even after setting the WDFFALSE to NoDisplayInUI and DontDisplayInUI.
    > Is there any additional code to be added ?

    How do you know it is not creating the PDO? Are you creating a control PDO? Did you get errors? You really have provided no information at all for us to go on here.
    ?
    Tim Roberts, xxxxx@probo.com
    Providenza & Boekelheide, Inc.


    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at
  • Thanks Doron and Tim for reply.
    I am installing driver on real hardware Id f (on PS/2 keyboard) there is no issue in installation.

    But i did not see the PDO created in device manager after

    deviceState.DontDisplayInUI = WdfFalse;
    and
    pnpCaps.NoDisplayInUI = WdfFalse;

    My final target is to create the complete PDO from raw PDO in a kbfilter driver is that possible ?
  • Doron_HolanDoron_Holan Posts: 10,353
    Installing on a real hardware id is not the question (but the kbdfiltr inf in the sample doesn't), you can mistakenly create a root device with a real hardware id with devcon install. The sample works and does create a pdo, so something is going wrong in your environment. Have you connected a debugger and stepped through? Run !devnode ?

    Bent from my phone
    ________________________________
    From: xxxxx@lists.osr.com on behalf of xxxxx@gmail.com
    Sent: Monday, November 13, 2017 1:31:29 AM
    To: Windows System Software Devs Interest List
    Subject: RE:[ntdev] KbFilter Driver PDO not appearing

    Thanks Doron and Tim for reply.
    I am installing driver on real hardware Id f (on PS/2 keyboard) there is no issue in installation.

    But i did not see the PDO created in device manager after

    deviceState.DontDisplayInUI = WdfFalse;
    and
    pnpCaps.NoDisplayInUI = WdfFalse;

    My final target is to create the complete PDO from raw PDO in a kbfilter driver is that possible ?

    ---
    NTDEV is sponsored by OSR

    Visit the list online at:

    MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
    Details at

    To unsubscribe, visit the List Server section of OSR Online at
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!