Avoid Devcon to create root-enumerated device.

weixiong guo 21 Reputation points
2022-05-26T18:13:12.397+00:00

Hi:

I developed a device driver for a PCIE device and I am able to install it by devcon:
devcon.exe install PBNic.inf "PCI\VEN_035A&DEV_1000"

And the driver works fine.

However, as well as the device node of the PCIE device, a root-enumerated device is created on Device Manager.

In my driver source code, DriverEntry() and EvtDriverDeviceAdd() were called twice. I recognized it was a root-enumerated device because WdfCmResourceListGetCount() returns 0 in EvtDevicePrepareHardware().

Is a root-enumerated device necessary? I am not using it for operations on my PCIE device.
Can I avoid generating it?

Thanks
Kevin

Windows for business | Windows Client for IT Pros | Devices and deployment | Other
0 comments No comments
{count} votes

Accepted answer
  1. Doron Holan 1,801 Reputation points
    2022-05-27T17:51:47.283+00:00

    devcon install creates a root enumerated device. It happens to work for you because part of the process of importing the driver package is that it will be applied to the PCI enumerated device in addition to the root enumerated device. Instead, you want to run devcon update. This will import the driver package and update relevant existing devices.

    If you can, you should use pnputil instead devcon. It is the in-box driver package utility and will give you finer grain control over installing and updating the driver package.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.