AVStream: avshws encounter CM_PROB_DRIVER_FAILED_LOAD issue

I’m trying the AVStream samples, and only avshws fails to install. I want to figure out the cause of this issue so that I can either work around it or ignore it when I start developing my own driver.

I built these samples using VS Code with a simple tasks.json and installed them via devcon. (I also tried building with Visual Studio and installing via Device Manager as readme says, but the issue remains the same.) The target platform is a Hyper-V VM Windows 10. WDK is 10.0.26100.0. Build tool (MSBuild) is17.14.18+a338add32.

I also tried commenting out all CHardwareSimulation parts, and then the issue disappeared. So the real problem is not that DriverEntry is missing.

Could this be due to running on a VM? Or is there code in avshws that simply can’t run inside a VM? Since I may need to simulate hardware in the early stages of development, I really want to get avshws running in my development environment.

Here is setupapi.dev.log, maybe it helps:

[Device Install Log]
OS Version = 10.0.19045
Service Pack = 0.0
Suite = 0x0100
ProductType = 1
Architecture = amd64

[BeginLog]

[Boot Session: 2025/09/18 00:24:33.502]

[Device Install (UpdateDriverForPlugAndPlayDevices) - Root\WDM_Driver_Device]
Section start 2025/09/18 09:08:08.049
cmd: "C:\Users\lance.lin\Documents\devcon.exe" install ./WDM_Driver/WDM_Driver.inf Root\WDM_Driver_Device
ndv: INF path: C:\Users\lance.lin\Documents\WDM_Driver\WDM_Driver.inf
ndv: Install flags: 0x00000001
ndv: {Update Device Driver - ROOT\CAMERA\0002}
ndv: Search options: 0x00000080
ndv: Searching single INF 'C:\Users\lance.lin\Documents\WDM_Driver\WDM_Driver.inf'
dvi: {Build Driver List} 09:08:08.121
dvi: Searching for hardware ID(s):
dvi: root\wdm_driver_device
sig: {_VERIFY_FILE_SIGNATURE} 09:08:08.157
sig: Key = wdm_driver.inf
sig: FilePath = c:\users\lance.lin\documents\wdm_driver\wdm_driver.inf
sig: Catalog = c:\users\lance.lin\documents\wdm_driver\WDM_Driver.cat
! sig: Verifying file against specific (valid) catalog failed.
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
sig: {_VERIFY_FILE_SIGNATURE exit(0x800b0109)} 09:08:08.257
sig: {_VERIFY_FILE_SIGNATURE} 09:08:08.269
sig: Key = wdm_driver.inf
sig: FilePath = c:\users\lance.lin\documents\wdm_driver\wdm_driver.inf
sig: Catalog = c:\users\lance.lin\documents\wdm_driver\WDM_Driver.cat
! sig: Verifying file against specific Authenticode(tm) catalog failed.
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
sig: {_VERIFY_FILE_SIGNATURE exit(0x800b0109)} 09:08:08.333
dvi: Created Driver Node:
dvi: HardwareID - Root\WDM_Driver_Device
dvi: InfName - c:\users\lance.lin\documents\wdm_driver\wdm_driver.inf
dvi: DevDesc - WDM_Driver Device
dvi: Section - WDM_Driver
dvi: Rank - 0x80ff0000
dvi: Signer Score - Not digitally signed
dvi: DrvDate - 09/17/2025
dvi: Version - 17.6.2.928
dvi: {Build Driver List - exit(0x00000000)} 09:08:08.431
dvi: {DIF_SELECTBESTCOMPATDRV} 09:08:08.441
dvi: Default installer: Enter 09:08:08.451
dvi: {Select Best Driver}
dvi: Class GUID of device changed to: {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}.
dvi: Selected Driver:
dvi: Description - WDM_Driver Device
dvi: InfFile - c:\users\lance.lin\documents\wdm_driver\wdm_driver.inf
dvi: Section - WDM_Driver
dvi: {Select Best Driver - exit(0x00000000)}
dvi: Default installer: Exit
dvi: {DIF_SELECTBESTCOMPATDRV - exit(0x00000000)} 09:08:08.537
ndv: Force Installing Driver:
ndv: Inf Name - wdm_driver.inf
ndv: Driver Date - 09/17/2025
ndv: Driver Version - 17.6.2.928
sto: {Setup Import Driver Package: c:\users\lance.lin\documents\wdm_driver\wdm_driver.inf} 09:08:08.587
inf: Provider: GIGABYTE
inf: Class GUID: {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}
inf: Driver Version: 09/17/2025,17.6.2.928
inf: Catalog File: WDM_Driver.cat
sto: {Copy Driver Package: c:\users\lance.lin\documents\wdm_driver\wdm_driver.inf} 09:08:08.641
sto: Driver Package = c:\users\lance.lin\documents\wdm_driver\wdm_driver.inf
sto: Flags = 0x00000007
sto: Destination = C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}
sto: Copying driver package files to 'C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}'.
flq: {FILE_QUEUE_COMMIT} 09:08:08.699
flq: Copying 'c:\users\lance.lin\documents\wdm_driver\WDM_Driver.cat' to 'C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}\WDM_Driver.cat'.
flq: Copying 'c:\users\lance.lin\documents\wdm_driver\wdm_driver.inf' to 'C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}\wdm_driver.inf'.
flq: Copying 'c:\users\lance.lin\documents\wdm_driver\WDM_Driver.sys' to 'C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}\WDM_Driver.sys'.
flq: {FILE_QUEUE_COMMIT - exit(0x00000000)} 09:08:08.929
sto: {Copy Driver Package: exit(0x00000000)} 09:08:08.939
ump: Import flags: 0x00000000
pol: {Driver package policy check} 09:08:08.949
pol: {Driver package policy check - exit(0x00000000)} 09:08:08.951
sto: {Stage Driver Package: C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}\wdm_driver.inf} 09:08:08.951
inf: {Query Configurability: C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}\wdm_driver.inf} 09:08:08.961
inf: Driver package 'wdm_driver.inf' is configurable.
inf: {Query Configurability: exit(0x00000000)} 09:08:08.969
flq: {FILE_QUEUE_COMMIT} 09:08:08.971
flq: Copying 'C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}\WDM_Driver.cat' to 'C:\Windows\System32\DriverStore\Temp{a137fc14-c8e7-f349-b6dc-c7c394a6c65b}\WDM_Driver.cat'.
flq: Copying 'C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}\wdm_driver.inf' to 'C:\Windows\System32\DriverStore\Temp{a137fc14-c8e7-f349-b6dc-c7c394a6c65b}\wdm_driver.inf'.
flq: Copying 'C:\Users\lance.lin\AppData\Local\Temp{a10fceff-ce84-a44e-895c-18f750ab94f0}\WDM_Driver.sys' to 'C:\Windows\System32\DriverStore\Temp{a137fc14-c8e7-f349-b6dc-c7c394a6c65b}\WDM_Driver.sys'.
flq: {FILE_QUEUE_COMMIT - exit(0x00000000)} 09:08:09.013
sto: {DRIVERSTORE IMPORT VALIDATE} 09:08:09.015
sig: Driver package catalog is valid.
sig: {_VERIFY_FILE_SIGNATURE} 09:08:09.043
sig: Key = wdm_driver.inf
sig: FilePath = C:\Windows\System32\DriverStore\Temp{a137fc14-c8e7-f349-b6dc-c7c394a6c65b}\wdm_driver.inf
sig: Catalog = C:\Windows\System32\DriverStore\Temp{a137fc14-c8e7-f349-b6dc-c7c394a6c65b}\WDM_Driver.cat
! sig: Verifying file against specific (valid) catalog failed.
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
sig: {_VERIFY_FILE_SIGNATURE exit(0x800b0109)} 09:08:09.051
sig: {_VERIFY_FILE_SIGNATURE} 09:08:09.055
sig: Key = wdm_driver.inf
sig: FilePath = C:\Windows\System32\DriverStore\Temp{a137fc14-c8e7-f349-b6dc-c7c394a6c65b}\wdm_driver.inf
sig: Catalog = C:\Windows\System32\DriverStore\Temp{a137fc14-c8e7-f349-b6dc-c7c394a6c65b}\WDM_Driver.cat
! sig: Verifying file against specific Authenticode(tm) catalog failed.
! sig: Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
sig: {_VERIFY_FILE_SIGNATURE exit(0x800b0109)} 09:08:09.059
! sig: Driver package catalog file certificate does not belong to Trusted Root Certificates, but user wants to install anyway.
sto: {DRIVERSTORE IMPORT VALIDATE: exit(0x00000000)} 09:08:10.217
sig: Signer Score = 0x80000000 (Unsigned)
sto: {Core Driver Package Import: wdm_driver.inf_amd64_54b360722111e22f} 09:08:10.219
sto: {DRIVERSTORE IMPORT BEGIN} 09:08:10.219
bak: Create system restore point:
bak: Description = 裝置驅動程式套件安裝: GIGABYTE Cameras
bak: Time = 0ms
bak: Status = 0x00000422 (FAILURE)
sto: {DRIVERSTORE IMPORT BEGIN: exit(0x00000000)} 09:08:10.233
cpy: {Copy Directory: C:\Windows\System32\DriverStore\Temp{a137fc14-c8e7-f349-b6dc-c7c394a6c65b}} 09:08:10.233
cpy: Target Path = C:\Windows\System32\DriverStore\FileRepository\wdm_driver.inf_amd64_54b360722111e22f
cpy: {Copy Directory: exit(0x00000000)} 09:08:10.235
idb: {Register Driver Package: C:\Windows\System32\DriverStore\FileRepository\wdm_driver.inf_amd64_54b360722111e22f\wdm_driver.inf} 09:08:10.237
idb: Created driver package object 'wdm_driver.inf_amd64_54b360722111e22f' in DRIVERS database node.
idb: Created driver INF file object 'oem12.inf' in DRIVERS database node.
idb: Registered driver package 'wdm_driver.inf_amd64_54b360722111e22f' with 'oem12.inf'.
idb: {Register Driver Package: exit(0x00000000)} 09:08:10.241
idb: {Publish Driver Package: C:\Windows\System32\DriverStore\FileRepository\wdm_driver.inf_amd64_54b360722111e22f\wdm_driver.inf} 09:08:10.241
idb: Activating driver package 'wdm_driver.inf_amd64_54b360722111e22f'.
cpy: Published 'wdm_driver.inf_amd64_54b360722111e22f\wdm_driver.inf' to 'oem12.inf'.
idb: Indexed 2 device IDs for 'wdm_driver.inf_amd64_54b360722111e22f'.
sto: Flushed driver database node 'DRIVERS'. Time = 15 ms
sto: Flushed driver database node 'SYSTEM'. Time = 16 ms
idb: {Publish Driver Package: exit(0x00000000)} 09:08:10.265
sto: {DRIVERSTORE IMPORT END} 09:08:10.267
dvi: Flushed all driver package files to disk. Time = 0 ms
sig: Installed catalog 'WDM_Driver.cat' as 'oem12.cat'.
sto: {DRIVERSTORE IMPORT END: exit(0x00000000)} 09:08:10.281
sto: {Core Driver Package Import: exit(0x00000000)} 09:08:10.281
sto: {Stage Driver Package: exit(0x00000000)} 09:08:10.283
sto: {Setup Import Driver Package - exit (0x00000000)} 09:08:10.323
dvi: Searching for hardware ID(s):
dvi: root\wdm_driver_device
dvi: Class GUID of device changed to: {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}.
ump: {Plug and Play Service: Device Install for ROOT\CAMERA\0002}
dvi: {Core Device Install} 09:08:10.371
dvi: {Configure Device - ROOT\CAMERA\0002} 09:08:10.373
dvi: Device Status: 0x01802001
dvi: Parent Device: HTREE\ROOT\0
sto: {Configure Driver Package: C:\Windows\System32\DriverStore\FileRepository\wdm_driver.inf_amd64_54b360722111e22f\wdm_driver.inf}
sto: Source Filter = root\wdm_driver_device
inf: Class GUID = {ca3e7ab9-b4c3-4ae6-8251-579ef933890f}
inf: Class Options = Configurable
inf: {Configure Driver: WDM_Driver Device}
inf: Section Name = WDM_Driver
inf: {Add Service: WDM_Driver}
inf: Start Type = 3
inf: Service Type = 1
inf: Error Control = 1
inf: Image Path = \SystemRoot\System32\DriverStore\FileRepository\wdm_driver.inf_amd64_54b360722111e22f\WDM_Driver.sys
inf: Display Name = WDM_Driver Device
inf: Updated service 'WDM_Driver'.
inf: {Add Service: exit(0x00000000)}
inf: Hardware Id = Root\WDM_Driver_Device
inf: {Configure Driver Configuration: WDM_Driver}
inf: Service Name = WDM_Driver
inf: Included INFs = ks.inf
inf: KSCAPTUR.inf
inf: Include Scope = Services
inf: Config Flags = 0x00000000
inf: {Configure Driver Configuration: exit(0x00000000)}
inf: {Configure Driver: exit(0x00000000)}
flq: {FILE_QUEUE_COMMIT} 09:08:10.449
flq: {FILE_QUEUE_COMMIT - exit(0x00000000)} 09:08:10.449
sto: {Configure Driver Package: exit(0x00000000)}
dvi: Install Device: Configuring device. 09:08:10.451
dvi: Configuration: oem12.inf:root\wdm_driver_device,WDM_Driver
dvi: Install Device: Configuring device completed. 09:08:10.457
dvi: Device Status: 0x01802001
dvi: Install Device: Starting device 'ROOT\CAMERA\0002'. 09:08:10.459
dvi: Install Device: Starting device completed. 09:08:10.499
!!! dvi: Device not started: Device has problem: 0x27 (CM_PROB_DRIVER_FAILED_LOAD), problem status: 0xc0000263.
dvi: {Configure Device - exit(0x00000000)} 09:08:10.501
dvi: {Core Device Install - exit(0x00000000)} 09:08:10.501
ump: {Plug and Play Service: Device Install exit(00000000)}
ndv: {Update Device Driver - exit(00000000)}
ndv: {Install Related Drivers} 09:08:10.527
ndv: {Install Related Drivers: exit(0x00000000)} 09:08:10.539
<<< Section end 2025/09/18 09:08:10.551
<<< [Exit status: SUCCESS]

Just had a chance to test it on a real machine, and the result was the same.

Error 0x800b0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.

Have you enabled test signing and are you test signing with the WDK test certificate?