+
+ public static bool TryOpenExisting (string name, out EventWaitHandle result)
+ {
+ return TryOpenExisting (
+ name, EventWaitHandleRights.Synchronize | EventWaitHandleRights.Modify, out result);
+ }
+
+ public static bool TryOpenExisting (string name, EventWaitHandleRights rights,
+ out EventWaitHandle result)
+ {
+ if (name == null) {
+ throw new ArgumentNullException ("name");
+ }
+ if ((name.Length == 0) || (name.Length > 260)) {
+ throw new ArgumentException ("name", Locale.GetText ("Invalid length [1-260]."));
+ }
+
+ MonoIOError error;
+ IntPtr handle = NativeEventCalls.OpenEvent_internal (name, rights, out error);
+ if (handle == (IntPtr)null) {
+ result = null;
+ return false;
+ }
+
+ result = new EventWaitHandle (handle);
+ return true;
+ }
+#else
+ public EventWaitHandle (bool initialState, EventResetMode mode, string name)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public EventWaitHandle (bool initialState, EventResetMode mode,
+ string name, out bool createdNew)
+ {
+ throw new NotSupportedException ();
+ }
+
+
+ public EventWaitHandle (bool initialState, EventResetMode mode,
+ string name, out bool createdNew,
+ EventWaitHandleSecurity eventSecurity)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public static EventWaitHandle OpenExisting (string name)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public static EventWaitHandle OpenExisting (string name, EventWaitHandleRights rights)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public static bool TryOpenExisting (string name, out EventWaitHandle result)
+ {
+ throw new NotSupportedException ();
+ }
+
+ public static bool TryOpenExisting (string name, EventWaitHandleRights rights,
+ out EventWaitHandle result)
+ {
+ throw new NotSupportedException ();
+ }