非英语操作系统中Everyone组的名称
我们创建 Mutex
的方式存在问题。 问题是:
MutexAccessRule rule = new MutexAccessRule("Everyone", MutexRights.FullControl, AccessControlType.Allow);
硬编码的“Everyone”字符串仅适用于英语操作系统,我们如何更改此行以便它适用于所有语言?
We have an issue with the way we are creating a Mutex
. The problem line is:
MutexAccessRule rule = new MutexAccessRule("Everyone", MutexRights.FullControl, AccessControlType.Allow);
The hardcoded "Everyone" string only works on English OSes, how do we change this line so it works in all languages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Google 今天很有帮助:
看起来这会有所帮助
此代码解决了此问题:
VB:
Google is being helpful today:
Looks like this will help
This code solves this problem:
VB:
我遇到了同样的问题,但需要“Everyone”组名称的实际本地化字符串才能访问 MessageQueue。 这是我找到的解决方案,效果很好:
I had the same problem, but needed the actual localized string of the "Everyone" group name in order to enable access to a MessageQueue. Here's the solution I found, which works fine: