Share via


IOCTL_HAL_INIT_RTC (Windows Embedded CE 6.0)

1/5/2010

This I/O control resets the real-time clock by calling the OEMSetRealTime function. A request to call OEMSetRealTime is made by calling the OEMIoControl function with this I/O control.

Parameters

  • dwIoControlCode
    [in] Set to IOCTL_HAL_INIT_RTC.

    Resets the real-time clock by calling OEMSetRealTime.

  • lpInBuf
    [in] Pointer to the input buffer that contains a SYSTEMTIME structure.
  • nInBufsize
    [in] Size, in bytes, of lpInBuf.

    This should be the size of the SYSTEMTIME structure.

  • lpOutBuf
    [in] Not used; set to NULL.
  • nOutBufSize
    [in] Not used; set to zero.
  • lpBytesReturned
    [in] Not used; may be set to NULL.

Return Values

TRUE indicates success. FALSE indicates failure.

Remarks

During a cold boot, the kernel calls this I/O control. Systems with a battery-backed real-time clock can then determine whether the current clock time is valid, and if this is the case, ignore the time provided by the kernel. Otherwise, set the real-time clock to match the provided time. Systems without a battery-backed clock should use the default time provided by the kernel to initialize their real-time clock as part of the cold boot sequence.

For devices that do not have external power for the real-time clock, Filesys.exe calls this I/O control when the system starts if the RAM content is invalid. Usually, the RAM clean boot is because of battery power being out or if the persistent storage was cleared. For devices without external power for the real-time clock, OEMs need to reset their real-time clock if this I/O control was called.

Requirements

Header pkfuncs.h
Windows Embedded CE Windows CE 3.0 and later

See Also

Tasks

Setting the Real-Time Clock

Reference

Other OAL IOCTLs
OEMIoControl
OEMSetRealTime

Other Resources

SYSTEMTIME
File System Boot Process