none
AddDevice function in a virtual device driver RRS feed

  • Question

  • Hi.

    I am newbie in driver's dev field.

    I need to create driver of a virtual device. And I don't know: how will an my AddDevice function be called?

    Monday, July 14, 2014 12:00 PM

Answers

  • Typically, your AddDevice routine gets called because your virtual device is enumerated by the system root bus when the system boots. Your hardware ID would be of the form "ROOT\my-virtual-device-name". There are several examples of this in the WDK samples.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Monday, July 14, 2014 4:33 PM
    Moderator

All replies

  • Typically, your AddDevice routine gets called because your virtual device is enumerated by the system root bus when the system boots. Your hardware ID would be of the form "ROOT\my-virtual-device-name". There are several examples of this in the WDK samples.

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Monday, July 14, 2014 4:33 PM
    Moderator
  • devcon install will create a root enumerated for you, see the tool help for the exact command line. you will need an INF as well. The toaster function project in the toaster sample is a good place to start (this driver can live on a root node as well as on the toaster bus). you don't need to use the toaster bus project.

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

    Monday, July 14, 2014 6:09 PM