Hello Again,
I followed the advise given me in this thread. I think I’m close but not quite there. The HID portion of the driver appears to load but it stops shortly after starting. Enumerating the device shows:
Instance ID: ROOT\MyHid\0
Device Description: My HID Device
Class Name: MEDIA
Class GUID: {4d36e96c-e325-11ce-bfc1-08002be10318}
Manufacturer Name: TODO-Set-Manufacturer
Status: Stopped
Driver Name: oem2.inf
The device install section from setupapi.dev.log shows:
{Select Drivers - ROOT\MyHid\0} 09:13:53.239
Driver Node:
Status - Selected
Driver INF - oem2.inf (C:\Windows\System32\DriverStore\FileRepository\simpleaudiosample.inf_amd64_7367a01941e9ec44\simpleaudiosample.inf)
Class GUID - {4d36e96c-e325-11ce-bfc1-08002be10318}
Driver Version - 04/14/2023,9.11.3.252
Configuration - ROOT\MyHid
Driver Rank - 80FF0000
Signer Score - Unsigned (80000000)
{Select Drivers - exit(0x00000000} 09:13:53.239
{Core Device Install} 09:13:53.239
{Configure Device - ROOT\MyHid\0} 09:13:53.255
Device Status: 0x01802401 [0x12 - 0xc0000493]
Config Flags: 0x00000020
Parent Device: HTREE\ROOT\0
{Configure Driver Package: C:\Windows\System32\DriverStore\FileRepository\simpleaudiosample.inf_amd64_7367a01941e9ec44\simpleaudiosample.inf}
Source Filter = ROOT\MyHid
Class GUID = {4d36e96c-e325-11ce-bfc1-08002be10318}
Class Options = Configurable
{Configure Device: ROOT\MyHid\0}
Device Instance Id = ROOT\MyHid\0
Updating existing device instance.
{Configure Device: exit(0x00000000)}
{Configure Driver: My HID Device}
Section Name = MyHid.NT
{Add Service: MyHid}
Start Type = 3
Service Type = 1
Error Control = 1
Image Path = \SystemRoot\System32\DriverStore\FileRepository\simpleaudiosample.inf_amd64_7367a01941e9ec44\MyHid.sys
Display Name = My HID Service
Reactivating service ‘MyHid’ pended for deletion.
Updated service ‘MyHid’.
Service image path changed. Restart required for any devices using this service.
{Add Service: exit(0x00000000)}
Hardware Id = ROOT\MyHid
{Configure Driver Configuration: MyHid.NT}
Service Name =
Declarative Filters = MyHid
vhf
Config Flags = 0x00000000
{Configure Driver Configuration: exit(0x00000000)}
{Configure Driver: exit(0x00000000)}
{FILE_QUEUE_COMMIT} 09:13:53.302
{FILE_QUEUE_COMMIT - exit(0x00000000)} 09:13:53.302
Existing files modified, may need to restart related services.
{Configure Driver Package: exit(0x00000bc3)}
Restart required for any devices using this driver.
Install Device: Configuring device. 09:13:53.302
Configuration: oem2.inf:ROOT\MyHid,*
Install Device: Configuring device completed. 09:13:53.302
Device Status: 0x01802001
{Restarting Devices} 09:13:53.302
Start: ROOT\MyHid\0
Device ‘ROOT\MyHid\0’ not started (unknown reason): Device has no problem.
{Restarting Devices exit} 09:13:53.317
{Configure Device - exit(0x00000000)} 09:13:53.317
{Core Device Install - exit(0x00000000)} 09:13:53.317
I’ve included the section that I added to the SimpleAudioSample.inx file:
[Manufacturer]
%MfgName%=SIMPLEAUDIOSAMPLE,NT$ARCH$.6.1
[SIMPLEAUDIOSAMPLE.NT$ARCH$.6.1]
%SIMPLEAUDIOSAMPLE_SA.DeviceDesc%=SIMPLEAUDIOSAMPLE_SA, ROOT\SimpleAudioSample
%MY_HID.DeviceDesc%=MY_HID, ROOT\MyHid
[DestinationDirs]
SIMPLEAUDIOSAMPLE_SA.CopyList=13
MY_HID.CopyList = 13
;
;======================================================
; MY_HID
;======================================================
[MY_HID.NT]
CopyFiles=MY_HID.CopyList
Level Order: A, B, C
DefaultFilterLevel: C
[MY_HID.NT.Filters]
AddFilter=MyHid,MY_HID.NT.LevelA
AddFilter=vhf,MY_HID.NT.LevelB
[MY_HID.NT.LevelA]
FilterLevel=A
[MY_HID.NT.LevelB]
FilterLevel=B
[MY_HID.NT.Services]
AddService=MyHid,MY_HID_Service_Inst
AddService=,2
[MY_HID_Service_Inst]
DisplayName = %MY_HID.ServiceDesc%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %13%\MyHid.sys
[MY_HID.NT.Wdf]
KmdfService=MyHid, MY_HID_wdfsect
[MY_HID_wdfsect]
KmdfLibraryVersion=$KMDFVERSION$
[MY_HID.CopyList]
MyHid.sys
[DeviceInstall32]
AddDevice = ROOT\MyHid\0,MY_HID_RootDevice_Inst
[MY_HID_RootDevice_Inst]
HardwareIds = ROOT\MyHid
The only other addition that I made to the INX was to add some strings.
Is there anything obvious in my INX that would cause my service to fail to run.
That service was the code lifted from was the HID Injector Sample - which works fine when it is a standalone.
Thanks in advance for your help.