BatteryClassUnload function (batclass.h)

BatteryClassUnload frees resources for a battery device that is no longer in use.

Syntax

NTSTATUS BATTERYCLASSAPI BatteryClassUnload(
  [in] PVOID ClassData
);

Parameters

[in] ClassData

Pointer to a battery class handle previously returned by BatteryClassInitializeDevice.

Return value

BatteryClassUnload returns STATUS_SUCCESS.

Remarks

BatteryClassUnload frees the battery class handle and unloads the battery device. In essence, it undoes the registration and initialization performed by BatteryClassInitializeDevice.

A miniclass driver should call this routine when its battery device is no longer available for use. Typically, the driver might make such a call from its Unload routine or when handling a PnP IRP_MN_REMOVE_DEVICE request.

Requirements

Requirement Value
Target Platform Desktop
Header batclass.h (include Batclass.h)
Library Battc.lib