What is the best way to make a single instance application in Compact Framework?

若如初见. 提交于 2019-12-05 05:41:30

问题


I've seen all the answers for the standard framework

What is the correct way to create a single instance application?
Prevent multiple instances of a given app in .NET?
What is the best way to make a single instance application in .net?

How do I check whether another process with the same name exists using the compact framework?
The 3 parameter constructor is not supported by the CF Process GetProcessByName is not supported by the CF


回答1:


OpenNETCF gives you class OpenNETCF.Threading.NamedMutex that let's you create system-wide named mutex.

http://www.opennetcf.com/library/sdf/html/40db385b-e21b-7c38-6f22-7a7954a30aa2.htm




回答2:


Perhaps the steps described on blog: http://www.nesser.org/blog/archives/56 could help (also check the comments).

LP, Dejan



来源:https://stackoverflow.com/questions/1153051/what-is-the-best-way-to-make-a-single-instance-application-in-compact-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!