Поделиться через


OEMSetAlarmTime (Windows Embedded CE 6.0)

1/5/2010

This function is called by the kernel to set the real-time clock alarm.

Syntax

BOOL OEMSetAlarmTime(
  LPSYSTEMTIME lpst 
);

Parameters

  • lpst
    [in] Pointer to the buffer containing the alarm time.

Return Value

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.

For more details, see Rtc.c in the %_WINCEROOT%\Platform\common\src\x86\common\rtc directory.

Code Example

Ee478154.collapse(en-US,WinEmbedded.60).gifDescription

The following code example shows how to make this function re-entrant.

Ee478154.collapse(en-US,WinEmbedded.60).gifCode

BOOL OEMSetAlarmTime( __in LPSYSTEMTIME lpst)
{
    BOOL RetVal;

    EnterCriticalSection(&RTC_critsect);
    RetVal = Bare_SetAlarmTime(lpst);
    LeaveCriticalSection(&RTC_critsect);
    
    return RetVal;
}

Requirements

Header nkintr.h
Library OEMMain.lib or OEMMain_StaticKITL.lib
Windows Embedded CE Windows CE 2.10 and later

See Also

Reference

Required OAL Functions
OEMGetRealTime
OEMSetRealTime

Concepts

Implementing the Real-Time Clock and System Timer