beautypg.com

Usertimergetvalue – Rockwell Automation 2711P Software Development Kit User Manual User Manual

Page 56

background image

Publication 2711P-UM005A-EN-P - March 2007

56 PanelView Plus CE-Specific Extensions to the WinCE API

UserTimerGetValue

This function gets the count of a running timer.

DWORD UserTimerGetValue (DWORD dwTimerNumber,
DWORD *pdwCount);

Parameters:

dwTimerNumber

The Timer Number is 0 based; i.e., if 2 timers are present on the
system, they are timer 0 and timer 1. When specifying a critical timer,
the flag USERTIMER_CRITICAL must be or’d with the Timer Number.
The range is 0 to MAX_TIMER_NUMBER.

pdwCount

A Pointer to a caller allocated DWORD where the current count will
be returned.

Return Values:

Remarks:

Obtains the current countdown value of an active timer. The timer
continues to run.

Portability:

This function is specific to the PanelView Plus CE or the RAC6182.

UserTimerGetValue - Return Codes

Value

Description

USER_TIMER_OK

The timer was running and the count value was
successfully returned.

USER_TIMER_INVALID_TIMER

The timer number is not valid for the system.

USER_TIMER_INVALID_PARAMETER

pdwCount was NULL; i.e. a bad pointer.

USER_TIMER_NOT_CLAIMED

This application has not claimed this timer.

USER_TIMER_NOT_RUNNING

The timer was not running.