BCLASS_QUERY_TAG_CALLBACK callback function (batclass.h)
BatteryMiniQueryTag returns the current battery tag.
Syntax
BCLASS_QUERY_TAG_CALLBACK BclassQueryTagCallback;
NTSTATUS BclassQueryTagCallback(
[in] PVOID Context,
[out] PULONG BatteryTag
)
{...}
Parameters
[in] Context
A pointer to the context area allocated by the miniclass driver for the battery device.
[out] BatteryTag
A pointer to a caller-allocated variable in which the miniclass driver returns the battery tag.
Return value
BatteryMiniQueryTag returns one of the following:
Return code | Description |
---|---|
|
A battery is currently installed. |
|
No battery is present. |
Remarks
The battery class driver calls BatteryMiniQueryTag to get the value of the current battery tag. If a battery is present, BatteryMiniQueryTag should return the tag in BatteryTag and return STATUS_SUCCESS.
Each time a battery is inserted, the miniclass driver must increment the value of the tag, regardless of whether this is a new battery or the same battery that was previously present.
If no battery is present, or if the miniclass driver cannot determine whether a battery is present, it should return STATUS_NO_SUCH_DEVICE and set the value of the tag to BATTERY_TAG_INVALID.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | batclass.h (include Batclass.h) |
IRQL | PASSIVE_LEVEL |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for