public WaitableTimerAccessRule( string identity, WaitableTimerRights timerRights, AccessControlType type) : this(new NTAccount(identity), (int)timerRights, false, InheritanceFlags.None, PropagationFlags.None, type) { }
public WaitableTimerAuditRule( IdentityReference identity, WaitableTimerRights timerRights, AuditFlags flags) : this(identity, (int)timerRights, false, InheritanceFlags.None, PropagationFlags.None, flags) { }
public WaitableTimerAccessRule( IdentityReference identity, WaitableTimerRights timerRights, AccessControlType type) : this(identity, (int)timerRights, false, InheritanceFlags.None, PropagationFlags.None, type) { }
public static WaitableTimer OpenExisting(string name, WaitableTimerRights rights) { if (name == null) { throw new ArgumentNullException("name"); } if (name.Length == 0) { throw new ArgumentException("name cannot be empty."); } if (name.Length > 260) { throw new ArgumentException("name is too long"); } SafeWaitHandle handleValue = Win32WaitableTimer.OpenWaitableTimer((uint)rights, false, name); if (handleValue.IsInvalid) { int lastError = Marshal.GetLastWin32Error(); if (lastError == Win32WaitableTimer.ERROR_FILE_NOT_FOUND || lastError == Win32WaitableTimer.ERROR_INVALID_NAME) { throw new WaitHandleCannotBeOpenedException(); } if (name == null || lastError != Win32WaitableTimer.ERROR_INVALID_HANDLE) { throw GetWin32Exception(); } throw new WaitHandleCannotBeOpenedException(); } WaitableTimer timer = new WaitableTimer(handleValue); return timer; }