How to call win32 CreateMutex from .Net

后端 未结 3 2027
执念已碎
执念已碎 2020-12-20 09:33

I\'ve been successfully creating a .net mutex like this: SingleIns = new Mutex(true, AppName); for a while. It works in XP, Vista, but apparently not in Windows7. So I nee

3条回答
  •  悲哀的现实
    2020-12-20 10:09

    In case it might help you, the .NET Framework already provides a wrapper of the Win32 mutex object. See System.Threading.Mutex. All of the major functionality is there, including the ability to use prefixes like "Global\".

提交回复
热议问题