BatteryClassSystemControl function (batclass.h)
The BatteryClassSystemControl routine processes WMI IRPs on behalf of a battery miniclass driver.
Syntax
NTSTATUS BATTERYCLASSAPI BatteryClassSystemControl(
[in] PVOID ClassData,
[in] PVOID WmiLibContext,
[in] PDEVICE_OBJECT DeviceObject,
[in, out] PIRP Irp,
[out] PVOID Disposition
);
Parameters
[in] ClassData
Pointer to a battery class handle that was previously received from BatteryClassInitializeDevice.
[in] WmiLibContext
Pointer to a WMILIB_CONTEXT structure. The structure provides WMI registration information, and dispatch routines for driver-specific WMI request processing.
[in] DeviceObject
Pointer to the driver's device object.
[in, out] Irp
Pointer to the IRP that contains the WMI request.
[out] Disposition
Pointer to a memory location that the routine uses to return information about how it handled the IRP. See WmiSystemControl for a description of the possible values returned.
Return value
BatteryClassSystemControl returns STATUS_SUCCESS on success, and the appropriate error code on failure.
Remarks
Battery miniclass drivers must call this routine instead of WmiSystemControl. It provides the same functionality as WmiSystemControl, but it also ensures that the driver registers the WMI classes that the battery class driver handles on behalf of the miniclass driver.
A battery miniclass driver's DpWmiQueryDataBlock routine, which is specified by the QueryWmiDataBlock member of WMILIB_CONTEXT, must call the BatteryClassQueryWmiDataBlock routine to allow the battery class driver to process the query for the WMI classes it handles on behalf of the miniclass driver.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | batclass.h (include Batclass.h) |
Library | Battc.lib |