Interprocess
|
Exception | Condition |
---|---|
UnauthorizedAccessException | The named mutex exists, but the user does not have the minimum needed security access rights to use it. |
This function uses a hash of the assembly's GUID when creating the Mutex, if it is available. If it is not available, it uses a hash of the simple name of the assembly. Although the name is hashed to help guarantee uniqueness, it is still entirely possible that another application may use that name with the same hashing algorithm to generate its Mutex name. Therefore, it is best to ensure that the GuidAttribute is defined in the AssemblyInfo of your application.
The Mutex created is "Global" meaning that it will be accessible to all active application sessions including terminal service sessions. This is accomplished internally by prefixing the Mutex name with "Global\". Do not use this helper function if you need to create a specifically named or non-global Mutex, such as when you need to interact with another application using a Mutex that does not use this function.