安装 null 驱动程序

可以安装一个“null 驱动程序” (即,如果设备未在计算机上使用且不应启动或能够在原始模式下执行,则设备不存在驱动程序) , (在DEVICE_CAPABILITIES结构中看到 RawDeviceOK) 。 若要在 INF 文件中指定 null 驱动程序,请使用如下所示的条目:

[MyModels]
%MyDeviceDescription% = MyNullInstallSection, ExampleHardwareId

[MyNullInstallSection]
; The install section is typically empty, but can contain entries that
; copy files or modify the registry.

[MyNullInstallSection.Services]
AddService = ,2    ; no value for the service name

模型 ”部分中设备的硬件 ID 应使用子系统供应商 ID 和任何其他相关信息专门标识设备。

操作系统将为设备创建设备节点 (devnode) ,但如果设备无法在原始模式下执行,操作系统将无法启动设备,因为尚未为其分配函数驱动程序。 但请注意,如果设备具有 启动配置,则会保留这些资源。