Compartilhar via


OEMGetRealTime (Windows CE 5.0)

Send Feedback

This function is called by the kernel to retrieve the time from the real-time clock.

BOOL OEMGetRealTime(LPSYSTEMTIMElpst );

Parameters

  • lpst
    [out] Pointer to the SYSTEMTIME structure that contains the current time.

Return Values

If this function succeeds, it returns TRUE.

If this function fails, it returns FALSE.

Remarks

This function must be re–entrant and, thus, must protect the hardware from being accessed multiple times.

In the OAL code, store the year value so it supports a 100-year range; for example, 1950–2050.

OEMGetRealTime is called by GetSystemTime when the clock is running in hardware mode. In hardware mode, OEMGetRealTime queries the RTC. Alternatively, you can run the clock in software mode by setting a registry key. In software mode, a clock is simulated in software based on GetTickCount, which tracks clock ticks using the timer. To specify software mode for the clock, set HKEY_LOCAL_MACHINE\Platform\"SoftRTC" = 1. This registry key must be set at boot time to have any effect.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Nkintr.h.
Link Library: Nk.lib.

See Also

OEMIdle | OEMSetAlarmTime | SetSystemTime | SYSTEMTIME | Implementing the OEMPlatformInit Function | Implementing the Real-Time Clock and System Timer

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.