TimerCancel

Cancels and deletes an existing timer.

Synopsis

Err TimerCancel (TimerHandle thandle)

Description

Cancels a timer (if active) and releases all resources acquired when it was created. The timer's handle is no longer valid after this call.

If an event had occurred for this timer and a notification message was sent, this function withdraws the notification message from your port. If you had already received the message but not yet replied to it, the timers resources are released after you reply to the message, in other words, you can respond to a timer event message by cancelling the timer that sent the message, and you can safely do so before replying to the message.

If the timer notification was signal-based and a notification signal was sent, you will still receive it since there is no way to withdraw a signal once it has been sent.

Arguments

thandle
Handle for a timer created by one of the TimerMsg or TimerSignal functions.

Return Value

Zero on success or a negative error code.

Implementation

Library call implemented in lib3do.lib.

Associated Files

lib3do.lib, timerutils.h

See Also

TimerSuspend