Assembly: mscorlib (in mscorlib.dll)
Not supported for Windows 98 or Windows Millennium Edition.
The method uses the following combination of flags (combined using the bitwise OR operation) to search for permissions: AccessControlSections.Access, AccessControlSections.Owner, and AccessControlSections.Group.
The following code example demonstrates the cross-process behavior of a named system event with access control security. The example uses the OpenExisting(String) method overload to test for the existence of a named event.
If the event does not exist, it is created with initial ownership and access control security that denies the current user the right to use the event, but grants the right to read and change permissions on the event.
If you run the compiled example from two command windows, the second copy will throw an access violation exception on the call to OpenExisting(String). The exception is caught, and the example uses the OpenExisting(String, EventWaitHandleRights) method overload to wait on the event with the rights needed to read and change the permissions.
After the permissions have been read, using the method, and changed, the event is opened with the rights required to wait on it and signal it. If you run the compiled example from a third command window, the example runs using the new permissions.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.