How do I create a root devnode?

I want to create a root devnode. Do I do it this way?

%EthernetPortDesc%=EthernetPort_Inst,Root\SC_ETHERNET

in my models section.

Do I need something else? Do I need it somewhere else?

Is there any other reason why NDIS would not call my initialize routine?

For why, see http://www.osronline.com/showthread.cfm?link=113293

Andy

What you have specified in the INF is the Device ID. This does not really
amount to a specification that the device must be root enumerated.

You get a root enumerated device by (in summary, for details look at devcon
sources):

  1. Creating a devnode under the root device.
  2. Telling PnP explicitly to select your driver as the driver for the
    DevNode.
  3. Calling the Class Installer to make nice and install your driver on the
    devnode.

So your Device ID could just as easily be SC_ETHERNET, *SC_ETHERNET,
FOOBAR\SC_ETHERNET, etc. Just as long as your device installer (like
devcon) creates the root enumerated devnode and forces it to be ‘matched’ to
your device id (whatever it is).

There are others whom undoubtly can give you a much more precise answer but
that is how I came to understand it.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development

(regards to my friends as sea change)

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@schange.com
Sent: Friday, July 13, 2007 5:38 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How do I create a root devnode?

I want to create a root devnode. Do I do it this way?

%EthernetPortDesc%=EthernetPort_Inst,Root\SC_ETHERNET

in my models section.

Do I need something else? Do I need it somewhere else?

Is there any other reason why NDIS would not call my initialize routine?

For why, see http://www.osronline.com/showthread.cfm?link=113293

Andy


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

OK. I can do number 1. I end up with a device \ROOT\NET\0000.
But how do I do 2 (Tell PnP explicitly to select your driver as the driver for the DevNode).

Andy

Andy,

Take a look at the DEVCON sources in the DDK/WDK. It shows how to do it.

But basically it is:

  1. Create the DevNode (actually, a DEVINFO set / data / etc.)
  2. Add the HWID which matches your driver to the DevNode properties
    SPDRP_HARDWAREID with SetupDiSetDeviceRegistryProperty().
  3. Call the class installer.

$(DDKROOT)\src\setup\devcon\cmds.cpp - look for cmdInstall()

Good Luck,
-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@schange.com
Sent: Saturday, July 14, 2007 8:10 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How do I create a root devnode?

OK. I can do number 1. I end up with a device \ROOT\NET\0000.
But how do I do 2 (Tell PnP explicitly to select your driver as the driver
for the DevNode).

Andy


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Devcon install worked great, once the files were in the right place. Thanks.

Andy