次の方法で共有


IOCTL_BATTERY_GETSYSTEMPOWERSTATUSEX (Windows CE 5.0)

Send Feedback

This IOCTL retrieves information for the GetSystemPowerStatusEx system call. The DeviceIoControl function calls this IOCTL.

Parameters

  • hDevice
    [in] Handle to the device that is to perform the operation. To obtain a device handle, call the CreateFile function.
  • dwIoControlCode
    [in] Set to IOCTL_BATTERY_GETSYSTEMPOWERSTATUSEX.
  • pInBuf
    [in] Pointer to a BOOL, fUpdate.
  • InBufLen
    [in] Set to sizeof(BOOL).
  • pOutBuf
    [out] Pointer to a SYSTEM_POWER_STATUS_EX structure.
  • OutBufLen
    [in] Set to sizeof(SYSTEM_POWER_STATUS_EX).
  • lpBytesReturned
    [out] Long pointer to a variable that receives the size, in bytes, of the data stored into the buffer pointed to by lpOutBuffer.
  • lpOverlapped
    [in] Ignored; set to NULL.**

Return Values

If successful, DeviceIoControl returns TRUE and *pdwBytesTransferred will be sizeof(SYSTEM_POWER_STATUS_EX). Otherwise, DeviceIoControl returns FALSE. In case of failure, GetLastError contains an error status.

Remarks

If fUpdate is set to TRUE, this IOCTL gets the latest information from the battery PDD, otherwise it retrieves cached information that may be out-of-date by several seconds.

For more information, see GetSystemPowerStatusEx and BatteryPDDGetStatus.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Battery.h.

See Also

BatteryPDDGetStatus | DeviceIoControl | GetSystemPowerStatusEx | SYSTEM_POWER_STATUS_EX

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.