|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
C#, Compact Framework 2.0I wrote a C# Application for Microsoft .NET CF 2.0. It is used on Microsoft
Pocket PC, Version 4.20.0 (Build 14053). Is there a way to prevent my Application to be startet twice? Best Regards Hello, pfluft!
p> I wrote a C# Application for Microsoft .NET CF 2.0. It is used on p> Microsoft Pocket PC, Version 4.20.0 (Build 14053). p> Is there a way to prevent my Application to be startet twice? Yes. You can used named Mutex object to detect if another instance of application is running. Hello, pfluft!
p> Named Mutexes are not supportet in the compact Framework. Indeed, named Mutexes aren't supported in CF 2.0. As a workaround for this limitationsolution you can P/Invoke on coredll.dll and create unmanaged named mutex object. Then Mutex.Handle Property can be used to attach managed Mutex object and manipulate that unmanaged one. I know this is an old topic, but my unerstanding is the CF automatically
blocks the same applicayion from loading twice. Do I have this right? -- Show quoteThanks, -Kareem "pfluft" wrote: > I wrote a C# Application for Microsoft .NET CF 2.0. It is used on Microsoft > Pocket PC, Version 4.20.0 (Build 14053). > Is there a way to prevent my Application to be startet twice? > > Best Regards > > > |
|||||||||||||||||||||||