none
Where is a software driver sample ?? RRS feed

  • Question

  • I'm reading [Developing Driver With the Windows Microsoft Driver Foundation] 2007 , referenced

    https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/creating-a-new-software-driver

    Here is my question:

    1. Where is the sample of creating a software driver (official)?? At https://github.com/Microsoft/Windows-driver-samples , many samples except software sample. Maybe name is not started with software ??

    2. If a software driver is installed , Could i find it in Win32_SystemDriver ??


    Marcus

    Friday, September 23, 2016 8:07 AM

Answers

  • The webpage you refer to is not the webpage the book was describing.   If you are looking for a software only sample, consider either toaster (which is in the book) or take a look at the article and code at http://www.osronline.com/article.cfm?article=390


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Friday, September 23, 2016 11:12 AM
  • Software drivers are independent of hardware.   For instance you do not control a physical device with a software driver, or even typically modify the actions of going to a device that way (for this later case a filter driver is better).

    A common case I've done with a software driver was to simulate the actual hardware, because either the hardware wasn't ready, or because it made more sense to have a simple driver at the bottom of a stack of drivers so they could be debugged before adding the complexity of real hardware.  Another example is providing an API to user space that Windows does not, but is can be achieved with kernel calls, for example years ago, I provided a client with a driver that allowed them to open and read a file that was either held exclusively, or had parts of the file locked.

    If you are looking for a driver to deal with hardware (in any way) look at either a function driver or a filter driver.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    • Marked as answer by MarcusHe Monday, September 26, 2016 1:04 AM
    Sunday, September 25, 2016 12:20 PM
  • Acturally , I want to know more about software driver . Like what it can do , what kind of drivers are written with software driver . 

    There are basically three sorts of "software drivers".

    1. Various kernel-mode services that do not belong to the following two categories. They can be installed and started as legacy services, for example, with "sc create" and "sc start". They can create "devices" accessible from usermode. 

    2. Add-ons for known system frameworks, such as filesystem minifilters, other kinds of "filters", "protocol drivers" and so on. They register with these system frameworks and play by their rules. Otherwise, they are similar to the previous type.

    3. PnP-type drivers for simulated devices - these can be "leaf" devices such as "virtual" COM port, or virtual buses that expose virtual devices. These drivers are installed and managed like "real" hardware drivers - with INF files and so on. And they are required to behave like "real" hardware drivers. This type can be useful for studying PnP drivers without having physical hardware.

    If a software driver is installed , Could i find it in Win32_SystemDriver ??

    Usually, yes. Try: "wmic path Win32_SystemDriver"

    Hope this helped.

    -- pa

    • Marked as answer by MarcusHe Monday, September 26, 2016 1:05 AM
    Sunday, September 25, 2016 12:22 PM

All replies

  • The webpage you refer to is not the webpage the book was describing.   If you are looking for a software only sample, consider either toaster (which is in the book) or take a look at the article and code at http://www.osronline.com/article.cfm?article=390


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Friday, September 23, 2016 11:12 AM
  • as don suggests, the toaster sample is the best starting point for a software driver. the bigger question is what type of problem are you trying to solve with a software driver?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, September 23, 2016 6:59 PM
  • as don suggests, the toaster sample is the best starting point for a software driver. the bigger question is what type of problem are you trying to solve with a software driver?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Acturally , I want to know more about software driver . Like what it can do , what kind of drivers are written with software driver .

    Marcus

    Sunday, September 25, 2016 6:56 AM
  • Software drivers are independent of hardware.   For instance you do not control a physical device with a software driver, or even typically modify the actions of going to a device that way (for this later case a filter driver is better).

    A common case I've done with a software driver was to simulate the actual hardware, because either the hardware wasn't ready, or because it made more sense to have a simple driver at the bottom of a stack of drivers so they could be debugged before adding the complexity of real hardware.  Another example is providing an API to user space that Windows does not, but is can be achieved with kernel calls, for example years ago, I provided a client with a driver that allowed them to open and read a file that was either held exclusively, or had parts of the file locked.

    If you are looking for a driver to deal with hardware (in any way) look at either a function driver or a filter driver.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    • Marked as answer by MarcusHe Monday, September 26, 2016 1:04 AM
    Sunday, September 25, 2016 12:20 PM
  • Acturally , I want to know more about software driver . Like what it can do , what kind of drivers are written with software driver . 

    There are basically three sorts of "software drivers".

    1. Various kernel-mode services that do not belong to the following two categories. They can be installed and started as legacy services, for example, with "sc create" and "sc start". They can create "devices" accessible from usermode. 

    2. Add-ons for known system frameworks, such as filesystem minifilters, other kinds of "filters", "protocol drivers" and so on. They register with these system frameworks and play by their rules. Otherwise, they are similar to the previous type.

    3. PnP-type drivers for simulated devices - these can be "leaf" devices such as "virtual" COM port, or virtual buses that expose virtual devices. These drivers are installed and managed like "real" hardware drivers - with INF files and so on. And they are required to behave like "real" hardware drivers. This type can be useful for studying PnP drivers without having physical hardware.

    If a software driver is installed , Could i find it in Win32_SystemDriver ??

    Usually, yes. Try: "wmic path Win32_SystemDriver"

    Hope this helped.

    -- pa

    • Marked as answer by MarcusHe Monday, September 26, 2016 1:05 AM
    Sunday, September 25, 2016 12:22 PM
  • another,why call toast?about bread?

    Marcus

    Sunday, September 25, 2016 3:44 PM
  • This is based on an old joke about a computer controlled toaster.  The driver actually simulates that.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    • Marked as answer by MarcusHe Monday, September 26, 2016 1:04 AM
    • Unmarked as answer by MarcusHe Monday, September 26, 2016 1:04 AM
    Monday, September 26, 2016 12:13 AM
  • Thanks Don , i'll find this joke ha ha .  Your answer really help

    This is based on an old joke about a computer controlled toaster.  The driver actually simulates that.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com



    Marcus

    Monday, September 26, 2016 1:02 AM
  • Thanks Pal , with your and Don's answer , really extend my knowledge .

    Marcus

    Monday, September 26, 2016 1:04 AM