System.Threading.AccessControl Blittable version of Windows BOOL type. It is convenient in situations where manual marshalling is required, or to avoid overhead of regular bool marshalling. Some Windows APIs return arbitrary integer values although the return type is defined as BOOL. It is best to never compare BOOL to TRUE. Always use bResult != BOOL.FALSE or bResult == BOOL.FALSE . Returns a string message for the specified Win32 error code. Provides static methods for converting from Win32 errors codes to exceptions, HRESULTS and error messages. Converts, resetting it, the last Win32 error into a corresponding object, optionally including the specified path in the error message. Converts the specified Win32 error into a corresponding object, optionally including the specified path in the error message. If not already an HRESULT, returns an HRESULT for the specified Win32 error code. Returns a Win32 error code for the specified HRESULT if it came from FACILITY_WIN32 If not, returns the HRESULT unchanged Mapping of the different success or failure values that can occur when p/invoking Interop.Kernel32.OpenEvent, which is called inside the OpenExistingWorker methods defined in EventWaitHandle, Mutex and Semaphore. Gets or creates an instance, allowing a instance to be optionally specified to set it during the event creation. to set the initial state to signaled if the named event is created as a result of this call; to set it to non-signaled. One of the enum values that determines whether the event resets automatically or manually. The name, if the event is a system-wide synchronization event; otherwise, or an empty string. When this method returns, this argument is always set to if a local event is created; that is, when is or . If has a valid, non-empty value, this argument is set to when the system event is created, or it is set to if an existing system event is found with that name. This parameter is passed uninitialized. The optional Windows access control security to apply. An object that represents a system event wait handle, if named, or a local event wait handle, if nameless. .NET Framework only: The length is beyond MAX_PATH (260 characters). The enum value was out of legal range. Could not find a part of the path specified in . A system-wide synchronization event with the provided was not found. -or- An with system-wide name cannot be created. An of a different type might have the same name. If a `name` is passed and the system event already exists, the existing event is returned. If `name` is `null` or , a new local event is always created. Opens a specified named event wait handle, if it already exists, applying the desired access rights. The name of the event wait handle to be opened. If it's prefixed by "Global", it refers to a machine-wide event wait handle. If it's prefixed by "Local", or doesn't have a prefix, it refers to a session-wide event wait handle. Both prefix and name are case-sensitive. The desired access rights to apply to the returned event wait handle. An existing named event wait handle. is . is an empty string. The named event wait handle does not exist or is invalid. The path was not found. A Win32 error occurred. The named event wait handle exists, but the user does not have the security access required to use it. Tries to open a specified named event wait handle, if it already exists, applying the desired access rights, and returns a value that indicates whether the operation succeeded. The name of the event wait handle to be opened. If it's prefixed by "Global", it refers to a machine-wide event wait handle. If it's prefixed by "Local", or doesn't have a prefix, it refers to a session-wide event wait handle. Both prefix and name are case-sensitive. The desired access rights to apply to the returned event wait handle. When this method returns , contains an object that represents the named event wait handle if the call succeeded, or otherwise. This parameter is treated as uninitialized. if the named event wait handle was opened successfully; otherwise, . is is an empty string. A Win32 error occurred. The named event wait handle exists, but the user does not have the security access required to use it. Gets or creates instance, allowing a to be optionally specified to set it during the mutex creation. to give the calling thread initial ownership of the named system mutex if the named system mutex is created as a result of this call; otherwise, . The optional name of the system mutex. If this argument is set to or , a local mutex is created. When this method returns, this argument is always set to if a local mutex is created; that is, when is or . If has a valid non-empty value, this argument is set to when the system mutex is created, or it is set to if an existing system mutex is found with that name. This parameter is passed uninitialized. The optional mutex access control security to apply. An object that represents a system mutex, if named, or a local mutex, if nameless. .NET Framework only: The length of the name exceeds the maximum limit. A mutex handle with system-wide cannot be created. A mutex handle of a different type might have the same name. Opens a specified named mutex, if it already exists, applying the desired access rights. The name of the mutex to be opened. If it's prefixed by "Global", it refers to a machine-wide mutex. If it's prefixed by "Local", or doesn't have a prefix, it refers to a session-wide mutex. Both prefix and name are case-sensitive. The desired access rights to apply to the returned mutex. An existing named mutex. is . is an empty string. The named mutex does not exist or is invalid. The path was not found. A Win32 error occurred. The named mutex exists, but the user does not have the security access required to use it. Tries to open a specified named mutex, if it already exists, applying the desired access rights, and returns a value that indicates whether the operation succeeded. The name of the mutex to be opened. If it's prefixed by "Global", it refers to a machine-wide mutex. If it's prefixed by "Local", or doesn't have a prefix, it refers to a session-wide mutex. Both prefix and name are case-sensitive. The desired access rights to apply to the returned mutex. When this method returns , contains an object that represents the named mutex if the call succeeded, or otherwise. This parameter is treated as uninitialized. if the named mutex was opened successfully; otherwise, . is is an empty string. A Win32 error occurred. The named mutex exists, but the user does not have the security access required to use it. Gets or creates an instance, allowing a instance to be optionally specified to set it during the event creation. The initial number of requests for the semaphore that can be satisfied concurrently. The maximum number of requests for the semaphore that can be satisfied concurrently. Optional argument to create a system semaphore. Set to or to create a local semaphore. When this method returns, this argument is always set to if a local semaphore is created; that is, when is or . If has a valid, non-empty value, this argument is set to when the system semaphore is created, or it is set to if an existing system semaphore is found with that name. This parameter is passed uninitialized. The optional semaphore access control security to apply. An object that represents a system semaphore, if named, or a local semaphore, if nameless. is a negative number. -or- is not a positive number. is greater than . A semaphore handle with the system-wide name '' cannot be created. A semaphore handle of a different type might have the same name. Opens a specified named semaphore, if it already exists, applying the desired access rights. The name of the semaphore to be opened. If it's prefixed by "Global", it refers to a machine-wide semaphore. If it's prefixed by "Local", or doesn't have a prefix, it refers to a session-wide semaphore. Both prefix and name are case-sensitive. The desired access rights to apply to the returned semaphore. An existing named semaphore. is . is an empty string. The named semaphore does not exist or is invalid. The path was not found. -or- A Win32 error occurred. The named semaphore exists, but the user does not have the security access required to use it. Tries to open a specified named semaphore, if it already exists, applying the desired access rights, and returns a value that indicates whether the operation succeeded. The name of the semaphore to be opened. If it's prefixed by "Global", it refers to a machine-wide semaphore. If it's prefixed by "Local", or doesn't have a prefix, it refers to a session-wide semaphore. Both prefix and name are case-sensitive. The desired access rights to apply to the returned semaphore. When this method returns , contains an object that represents the named semaphore if the call succeeded, or otherwise. This parameter is treated as uninitialized. if the named semaphore was opened successfully; otherwise, . is is an empty string. A Win32 error occurred. The named semaphore exists, but the user does not have the security access required to use it. Enum value was out of legal range. Non-negative number required. Positive number required. Empty name is not legal. The initial count for the semaphore must be greater than or equal to zero and less than the maximum count. The length of the name exceeds the maximum limit. Cannot create '{0}' because a file or directory with the same name already exists. The file '{0}' already exists. Unable to find the specified file. Could not find file '{0}'. Could not find a part of the path. Could not find a part of the path '{0}'. The specified file name or path is too long, or a component of the specified path is too long. The path '{0}' is too long, or a component of the specified path is too long. The process cannot access the file '{0}' because it is being used by another process. The process cannot access the file because it is being used by another process. Access Control List (ACL) APIs are part of resource management on Windows and are not supported on this platform. A WaitHandle with system-wide name '{0}' cannot be created. A WaitHandle of a different type might have the same name. Access to the path is denied. Access to the path '{0}' is denied. A WaitHandle with system-wide name '{0}' cannot be created. A WaitHandle of a different type might have the same name.