17#define IOCTL_BATTERY_QUERY_UNIQUE_ID \
18 CTL_CODE(FILE_DEVICE_BATTERY, 0x101, METHOD_BUFFERED, FILE_READ_ACCESS)
20#define IOCTL_BATTERY_QUERY_STA \
21 CTL_CODE(FILE_DEVICE_BATTERY, 0x102, METHOD_BUFFERED, FILE_READ_ACCESS)
23#define IOCTL_BATTERY_QUERY_PSR \
24 CTL_CODE(FILE_DEVICE_BATTERY, 0x103, METHOD_BUFFERED, FILE_READ_ACCESS)
26#define IOCTL_BATTERY_SET_TRIP_POINT \
27 CTL_CODE(FILE_DEVICE_BATTERY, 0x104, METHOD_BUFFERED, FILE_READ_ACCESS)
29#define IOCTL_BATTERY_QUERY_BIF \
30 CTL_CODE(FILE_DEVICE_BATTERY, 0x105, METHOD_BUFFERED, FILE_READ_ACCESS)
32#define IOCTL_BATTERY_QUERY_BST \
33 CTL_CODE(FILE_DEVICE_BATTERY, 0x106, METHOD_BUFFERED, FILE_READ_ACCESS)
35#define CMBATT_GENERIC_STATUS 0x01
36#define CMBATT_GENERIC_INFO 0x02
37#define CMBATT_GENERIC_WARNING 0x04
38#define CMBATT_ACPI_WARNING 0x08
39#define CMBATT_POWER_INFO 0x10
40#define CMBATT_PNP_INFO 0x20
41#define CMBATT_ACPI_ENTRY_EXIT 0x40
42#define CMBATT_PNP_ENTRY_EXIT 0x200
43#define CMBATT_ACPI_ASSERT 0x400
51#define ACPI_BUS_CHECK 0x00
52#define ACPI_DEVICE_CHECK 0x01
54#define ACPI_STA_PRESENT 0x01
55#define ACPI_STA_ENABLED 0x02
56#define ACPI_STA_SHOW_UI 0x04
57#define ACPI_STA_FUNCTIONAL 0x08
58#define ACPI_STA_BATTERY_PRESENT 0x10
60#define ACPI_BATT_NOTIFY_STATUS 0x80
61#define ACPI_BATT_NOTIFY_INFO 0x81
63#define ACPI_BATT_STAT_DISCHARG 0x0001
64#define ACPI_BATT_STAT_CHARGING 0x0002
65#define ACPI_BATT_STAT_CRITICAL 0x0004
67#define CM_MAX_VALUE 0x7FFFFFFF
68#define CM_UNKNOWN_VALUE 0xFFFFFFFF
78#define ACPI_BATT_POWER_UNIT_WATTS 0x0
79#define ACPI_BATT_POWER_UNIT_AMPS 0x1
98#define CMBATT_AR_NOTIFY 0x01
99#define CMBATT_AR_INSERT 0x02
100#define CMBATT_AR_REMOVE 0x04
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
_In_ ULONG _In_ PBATTERY_NOTIFY BatteryNotify
_In_ ULONG _Out_ PBATTERY_STATUS BatteryStatus
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG AtRate
enum _BATTERY_QUERY_INFORMATION_LEVEL BATTERY_QUERY_INFORMATION_LEVEL
NTSTATUS NTAPI CmBattSetTripPpoint(PCMBATT_DEVICE_EXTENSION DeviceExtension, ULONG AlarmValue)
PDEVICE_OBJECT AcAdapterPdo
struct _ACPI_BST_DATA * PACPI_BST_DATA
NTSTATUS NTAPI CmBattGetStaData(PDEVICE_OBJECT DeviceObject, PULONG StaData)
NTSTATUS NTAPI CmBattGetPsrData(PDEVICE_OBJECT DeviceObject, PULONG PsrData)
struct _ACPI_BIF_DATA ACPI_BIF_DATA
NTSTATUS NTAPI CmBattGetUniqueId(PDEVICE_OBJECT DeviceObject, PULONG UniqueId)
NTSTATUS NTAPI CmBattPowerDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
struct _ACPI_BIF_DATA * PACPI_BIF_DATA
NTSTATUS NTAPI CmBattGetBifData(PCMBATT_DEVICE_EXTENSION DeviceExtension, PACPI_BIF_DATA BifData)
NTSTATUS NTAPI CmBattGetBstData(PCMBATT_DEVICE_EXTENSION DeviceExtension, PACPI_BST_DATA BstData)
struct _CMBATT_DEVICE_EXTENSION * PCMBATT_DEVICE_EXTENSION
NTSTATUS NTAPI CmBattDisableStatusNotify(IN PCMBATT_DEVICE_EXTENSION DeviceExtension)
NTSTATUS NTAPI CmBattQueryStatus(IN PCMBATT_DEVICE_EXTENSION DeviceExtension, IN ULONG Tag, IN PBATTERY_STATUS BatteryStatus)
NTSTATUS NTAPI CmBattPnpDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS NTAPI CmBattQueryInformation(IN PCMBATT_DEVICE_EXTENSION FdoExtension, IN ULONG Tag, IN BATTERY_QUERY_INFORMATION_LEVEL InfoLevel, IN OPTIONAL LONG AtRate, IN PVOID Buffer, IN ULONG BufferLength, OUT PULONG ReturnedLength)
struct _ACPI_BST_DATA ACPI_BST_DATA
VOID NTAPI CmBattNotifyHandler(IN PCMBATT_DEVICE_EXTENSION DeviceExtension, IN ULONG NotifyValue)
NTSTATUS NTAPI CmBattAddDevice(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI CmBattSystemControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
NTSTATUS NTAPI CmBattWmiRegistration(PCMBATT_DEVICE_EXTENSION DeviceExtension)
NTSTATUS NTAPI CmBattQueryTag(IN PCMBATT_DEVICE_EXTENSION DeviceExtension, OUT PULONG Tag)
NTSTATUS NTAPI CmBattWmiDeRegistration(PCMBATT_DEVICE_EXTENSION DeviceExtension)
NTSTATUS NTAPI CmBattSetStatusNotify(IN PCMBATT_DEVICE_EXTENSION DeviceExtension, IN ULONG BatteryTag, IN PBATTERY_NOTIFY BatteryNotify)
struct _CMBATT_DEVICE_EXTENSION CMBATT_DEVICE_EXTENSION
enum _CMBATT_EXTENSION_TYPE CMBATT_EXTENSION_TYPE
PULONG MinorVersion OPTIONAL
ULONG BatteryCapacityGranularity1
ULONG DesignCapacityWarning
ULONG BatteryCapacityGranularity2
PUNICODE_STRING DeviceName
CMBATT_EXTENSION_TYPE FdoType
PDEVICE_OBJECT PdoDeviceObject
WMILIB_CONTEXT WmiLibInfo
PDEVICE_OBJECT FdoDeviceObject
PDEVICE_OBJECT DeviceObject
BOOLEAN DelayNotification
PDEVICE_OBJECT AttachedDevice
IO_REMOVE_LOCK RemoveLock
ULONG BatteryCapacityGranularity1
ULONG BatteryCapacityGranularity2
BATTERY_INFORMATION BatteryInformation
ACPI_INTERFACE_STANDARD AcpiInterface
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject