Opens the specified named synchronization event, if it already exists, and returns a value that indicates whether the operation succeeded.
- Parameters
-
name | The name of the synchronization object to be opened and shared with other processes. The name is case-sensitive. The backslash character () is reserved and may only be used to specify a namespace. For more information on namespaces, see the remarks section. There may be further restrictions on the name depending on the operating system. For example, on Unix-based operating systems, the name after excluding the namespace must be a valid file name. |
result | When this method returns, contains a The xtd::threading::event_wait_handle object that represents the named synchronization event if the call succeeded, or null if the call failed. This parameter is treated as uninitialized. |
- Returns
- true if the named synchronization event was opened successfully; otherwise, false. In some cases, false may be returned for invalid names.
- Exceptions
-
xtd::argument_exception | name is an empty string. |
xtd::io::io_exception | name is invalid. This can be for various reasons, including some restrictions that may be placed by the operating system, such as an unknown prefix or invalid characters. Note that the name and common prefixes "Global\" and "Local" are case-sensitive. For some invalid names, the method may return false instead.
-or-
There was some other error. The HResult property may provide more information. |
xtd::io::path_too_long_exception | The name is too long. Length restrictions may depend on the operating system or configuration. |