Closed forderud closed 3 months ago
HID architecture documents "HID UPS battery" to have Usage page=0x0084, Usage=0x0004 and Access mode=Shared.
[Version]
Signature="$WINDOWS NT$"
Class=Battery
ClassGuid={72631e54-78a4-11d0-bcf7-00aa00b7b32a}
Provider=%MSFT%
DriverVer = 06/21/2006,10.0.19041.1
[SourceDisksNames]
3426=windows cd
[SourceDisksFiles]
hidbatt.sys = 3426
[DestinationDirs]
DefaultDestDir = 12
[ControlFlags]
BasicDriverOk = *
ExcludeFromSelect = *
[Manufacturer]
%MSFT%=Microsoft,NTamd64
[Microsoft.NTamd64]
%HID_DEVICE_BATTERY.DeviceDesc% = HidBatt_Inst,HID_DEVICE_UP:0084_U:0004
[HidBatt_Inst]
CopyFiles = HidBattInstCopyFiles
Include = battery.inf
Needs = Battery_Inst
[HidBattInstCopyFiles]
hidbatt.sys,,,0x100
[HidBatt_Inst.Services]
AddService=HidBatt,%SPSVCINST_ASSOCSERVICE%,HidBatt_Service_Inst
[HidBatt_Service_Inst]
DisplayName = %HidBatt.SvcDesc%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\HidBatt.sys
[strings]
;Localizable Strings
MSFT = "Microsoft"
HID_DEVICE_BATTERY.DeviceDesc = "HID UPS Battery"
HidBatt.SvcDesc = "HID UPS Battery Driver"
;Non-Localizable Strings
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_DEMAND_START = 3
SERVICE_ERROR_NORMAL = 1
Completed in 7222549a744c57efc65c42e6bcb9c77d54b735f2
Alternative to #23 for battery emulation.
Idea
Use existing
hidbatt
driver that's included in Windows (see https://support.moonpoint.com/os/windows/server2012/UPS/)Links: