C#, Compact Framework 2.0

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
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.
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
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?
 
Back
Top