Show / Hide Table of Contents

Method WaitableTimer.Open


Overload

Calls API OpenWaitableTimer and creates a WaitableTimer object that wraps the timer handle.

public static WaitableTimer Open(string timerName, uint access = 1048578, bool inheritHandle = false, bool noException = false)
Parameters
timerName  (string)

Timer name. Fails if it does not exist; to open-or-create use WaitableTimer.Create.

access  (uint)

See Synchronization Object Security and Access Rights. The default value TIMER_MODIFY_STATE|SYNCHRONIZE allows to set and wait.

inheritHandle  (bool)
noException  (bool)

If fails, return null, don't throw exception. Supports lastError.

Returns
WaitableTimer
Exceptions
AuException

Failed. For example, the timer does not exist.