Share via


IOCTL_BATTERY_NOTIFYOFTIMECHANGE (Compact 2013)

3/26/2014

This I/O control message adjusts times to account for the user changing the real time. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to the device
    DWORD dwIoControlCode,    // use IOCTL_BATTERY_NOTIFYOFTIMECHANGE
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned,  // number of bytes returned
    OVERLAPPED lpOverlapped   // pointer to OVERLAPPED structure
);

Parameters

  • hDevice
    [in] Handle to the device. To obtain a device handle, call CreateFile.
  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_BATTERY_NOTIFYOFTIMECHANGE for this operation.
  • lpInBuffer
    [in] Pointer to a FILETIME structure containing the amount of time the system has been adjusted forward or backward.
  • nInBufferSize
    [in] Set to sizeof(FILETIME).
  • lpOutBuffer
    [in][out] A pointer to a BOOL, fForward.
  • nOutBufferSize
    [in] Set to sizeof(BOOL).
  • 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] Not supported, set to NULL.

Return Values

Returns TRUE if successful; otherwise, returns FALSE.

Remarks

To get extended error information, call GetLastError. GetLastError may return other standard error messages as appropriate.

For more information about the data returned by using this I/O control, see BatteryPDDGetLevels and BatteryDrvrGetLevels.

This I/O control message does not update pdwBytesTransferred. It does not update the value in pOutBuf.

Requirements

Header

battery.h

See Also

Reference

Battery Driver IOCTLs
DeviceIoControl

Other Resources

FILETIME