Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Monthly Seminars at OSR Headquarters

East Coast USA
Windows Internals and SW Drivers, Dulles (Sterling) VA, 13 November 2017

Kernel Debugging & Crash Analysis for Windows, Nashua (Amherst) NH, 4 December 2017

Writing WDF Drivers I: Core Concepts, Nashua (Amherst) NH, 8 January 2018

WDF Drivers II: Advanced Implementation Techniques, Nashua (Amherst) NH, 15 January 2018


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 6  
20 Apr 17 02:07
Rohan Kumbhar
xxxxxx@gmail.com
Join Date: 01 Aug 2014
Posts To This List: 73
Register software driver(FILE_DEVICE_UNKNOWN) with PNP

Hello, Reference: https://msdn.microsoft.com/en-us/library/windows/hardware/dn613933(v=vs.85).aspx Question: How can I register a software driver with device type FILE_DEVICE_UNKNOWN with PNP and then send notifications to usermode application? Note: I have already implemented Inverted Call Model. I want to explore this communication mode using software driver.
  Message 2 of 6  
20 Apr 17 11:31
ntdev member 168568
xxxxxx@gmail.com
Join Date:
Posts To This List: 180
Register software driver(FILE_DEVICE_UNKNOWN) with PNP

> How can I register a software driver with device type FILE_DEVICE_UNKNOWN with PNP and then send notifications to usermode application? A template KMDF driver provided by VisualStudio 2015 and WDK10 is what you need. This kind of project provides a PNP root enumerated KMDF device and a WDF queue. You also need WdfDeviceInitSetDeviceType. You typically call this routine in the EvtDriverDeviceAdd callback routine before WdfDeviceCreate is called. Remember to use WdfDeviceWdmGetPhysicalDevice to obtain the PDO because IoReportTargetDeviceChangeAsynchronous uses a PDO and not an FDO. You also need a custom GUID for the event (PNP event). Use UUIDGEN.EXE (Within a VisualStudio 2015 CMD.EXE console). The program can copy the DEFINE_GUID macro invocation to the clipboard so you just need to paste the code in your header file. A GUID is already defined in the project for the device interface, so you already have an example. Once you have all these things, you just need to decide where to fire the PNP event in your driver code with IoReportTargetDeviceChangeAsynchronous. Sent from my phone --
  Message 3 of 6  
20 Apr 17 11:39
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11673
Register software driver(FILE_DEVICE_UNKNOWN) with PNP

xxxxx@gmail.com wrote: > Reference: > https://msdn.microsoft.com/en-us/library/windows/hardware/dn613933(v=vs.85).aspx > > Question: > How can I register a software driver with device type FILE_DEVICE_UNKNOWN > with PNP and then send notifications to usermode application? Is your driver already PnP compliant? If you call IoCreateDevice (or WdfDeviceCreate) during your DriverEntry, then you are not PnP, and you can't use the notification scheme. If you call IoCreateDevice/WdfDeviceCreate during an AddDevice call, then you are PnP, and this is fully available to you. > Note: I have already implemented Inverted Call Model. > > I want to explore this communication mode using software driver. What led you to this? I suspect you will find that the RegisterDeviceNotification path is not any simpler than the well-understood inverted call model. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 4 of 6  
21 Apr 17 22:55
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10107
Register software driver(FILE_DEVICE_UNKNOWN) with PNP

The device type is inconsequential for what you want to do. Any device type will do. It is the IoReportxxx API that is key Bent from my phone ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of Tim Roberts <xxxxx@probo.com> Sent: Thursday, April 20, 2017 8:37:15 AM To: Windows System Software Devs Interest List Subject: Re: [ntdev] Register software driver(FILE_DEVICE_UNKNOWN) with PNP xxxxx@gmail.com wrote: > Reference: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmsdn.microsoft.c om%2Fen-us%2Flibrary%2Fwindows%2Fhardware%2Fdn613933(v%3Dvs.85).aspx&data=02%7C01 %7CDoron.Holan%40microsoft.com%7C1a39ac506bfd47b348a908d488033193%7C72f988bf86f14 1af91ab2d7cd011db47%7C1%7C0%7C636282994707333477&sdata=YR6apfk4uJqDJPNMEAsv0Hj%2F 9kNHDLwAh9X0nWafiD4%3D&reserved=0 > > Question: > How can I register a software driver with device type FILE_DEVICE_UNKNOWN > with PNP and then send notifications to usermode application? Is your driver already PnP compliant? If you call IoCreateDevice (or WdfDeviceCreate) during your DriverEntry, then you are not PnP, and you can't use the notification scheme. If you call IoCreateDevice/WdfDeviceCreate during an AddDevice call, then you are PnP, and this is fully available to you. > Note: I have already implemented Inverted Call Model. > > I want to explore this communication mode using software driver. What led you to this? I suspect you will find that the RegisterDeviceNotification path is not any simpler than the well-understood inverted call model. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc. --- NTDEV is sponsored by OSR Visit the list online at: <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fshowlists.cfm%3Flist%3Dntdev&data=02%7C01%7CDoron.Holan%40microsoft.com%7C1a3 9ac506bfd47b348a908d488033193%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636282 994707333477&sdata=zjC22aAXHiN74zIBtHSfcSNTvawsDhSgzE9hkr57nfo%3D&reserved=0> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fse minars&data=02%7C01%7CDoron.Holan%40microsoft.com%7C1a39ac506bfd47b348a908d488033 193%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636282994707333477&sdata=12SHJ3V F%2BUPOXZdN6MURdvTdBeIQIFZ9IJs8tC4pHus%3D&reserved=0> To unsubscribe, visit the List Server section of OSR Online at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fpage.cfm%3Fname%3DListServer&data=02%7C01%7CDoron.Holan%40microsoft.com%7C1a3 9ac506bfd47b348a908d488033193%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636282 994707343490&sdata=h94yQdEVgWzliYpw6l1N0Jg3V2Vg72Fm9hpSrz0MwOQ%3D&reserved=0> --
  Message 5 of 6  
24 Apr 17 00:14
Rohan Kumbhar
xxxxxx@gmail.com
Join Date: 01 Aug 2014
Posts To This List: 73
Register software driver(FILE_DEVICE_UNKNOWN) with PNP

>> What led you to this? I have implemented inverted call model for the purpose of constructing an event provider. On reading Microsoft published "km-umguide.doc" I identified PnP notifications method. One difference from inverted call model which attracted my attention was, there wasn't any need to keep an inventory on clients those would register with my event provider. Instead respective event guids is needed to be published. Hence, I wanted to try the method and check if it really applies to my case. On Thu, Apr 20, 2017 at 9:07 PM, Tim Roberts <xxxxx@probo.com> wrote: > xxxxx@gmail.com wrote: > > Reference: > > https://msdn.microsoft.com/en-us/library/windows/hardware/ > dn613933(v=vs.85).aspx > > > > Question: > > How can I register a software driver with device type FILE_DEVICE_UNKNOWN > > with PNP and then send notifications to usermode application? > > Is your driver already PnP compliant? If you call IoCreateDevice (or <...excess quoted lines suppressed...> --
  Message 6 of 6  
24 Apr 17 10:58
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10107
Register software driver(FILE_DEVICE_UNKNOWN) with PNP

There is a downside: notifications may not be delivered if there are memory allocation failures at the time of reporting the notifications. With the inverted call model, all resources are allocated up front. Bent from my phone ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of rohan kumbhar <xxxxx@gmail.com> Sent: Sunday, April 23, 2017 9:12:44 PM To: Windows System Software Devs Interest List Subject: Re: [ntdev] Register software driver(FILE_DEVICE_UNKNOWN) with PNP >> What led you to this? I have implemented inverted call model for the purpose of constructing an event provider. On reading Microsoft published "km-umguide.doc" I identified PnP notifications method. One difference from inverted call model which attracted my attention was, there wasn't any need to keep an inventory on clients those would register with my event provider. Instead respective event guids is needed to be published. Hence, I wanted to try the method and check if it really applies to my case. On Thu, Apr 20, 2017 at 9:07 PM, Tim Roberts <xxxxx@probo.com<mailto:xxxxx@probo.com>> wrote: xxxxx@gmail.com<mailto:xxxxx@gmail.com> wrote: > Reference: > https://msdn.microsoft.com/en-us/library/windows/hardware/dn613933(v=vs.85).aspx< https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmsdn.microsoft.c om%2Fen-us%2Flibrary%2Fwindows%2Fhardware%2Fdn613933(v%3Dvs.85).aspx&data=02%7C01 %7CDoron.Holan%40microsoft.com%7Cb662ab8eca104ad6429908d48ac8344f%7C72f988bf86f14 1af91ab2d7cd011db47%7C1%7C0%7C636286039862144070&sdata=AuapC2iDVCHtVsZMEvjRyAhvKL 7crmvZ9n0R8wO%2FvF8%3D&reserved=0> > > Question: > How can I register a software driver with device type FILE_DEVICE_UNKNOWN > with PNP and then send notifications to usermode application? Is your driver already PnP compliant? If you call IoCreateDevice (or WdfDeviceCreate) during your DriverEntry, then you are not PnP, and you can't use the notification scheme. If you call IoCreateDevice/WdfDeviceCreate during an AddDevice call, then you are PnP, and this is fully available to you. > Note: I have already implemented Inverted Call Model. > > I want to explore this communication mode using software driver. What led you to this? I suspect you will find that the RegisterDeviceNotification path is not any simpler than the well-understood inverted call model. -- Tim Roberts, xxxxx@probo.com<mailto:xxxxx@probo.com> Providenza & Boekelheide, Inc. --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev<https://na01.safelinks.protect ion.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fshowlists.cfm%3Flist%3Dntde v&data=02%7C01%7CDoron.Holan%40microsoft.com%7Cb662ab8eca104ad6429908d48ac8344f%7 C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636286039862144070&sdata=66T179gYPFas mpeC6wL6Fl8cEFEF2Khfm0b9ATyGMvk%3D&reserved=0>> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars<https://na01.safelinks.protection.outlook.com/?url=h ttp%3A%2F%2Fwww.osr.com%2Fseminars&data=02%7C01%7CDoron.Holan%40microsoft.com%7Cb 662ab8eca104ad6429908d48ac8344f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C6362 86039862144070&sdata=9bQaUwLHNOY5JbqxjlaElu32CtdSiJKUWuPjD0tKHpM%3D&reserved=0>> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer<https://na01.safelinks.protect ion.outlook.com/?url=http%3A%2F%2Fwww.osronline.com%2Fpage.cfm%3Fname%3DListServe r&data=02%7C01%7CDoron.Holan%40microsoft.com%7Cb662ab8eca104ad6429908d48ac8344f%7 C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636286039862144070&sdata=XD6CCtNh1JmT evbEObchkqfmIX1vGzAAGb%2BJ5X2%2FjFk%3D&reserved=0>> --- 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 --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 10:16.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license