Home All Groups Group Topic Archive Search About

C#, Compact Framework 2.0

Author
30 Aug 2006 7:03 AM
pfluft
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

Author
30 Aug 2006 8:42 AM
Vadym Stetsyak
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
Author
30 Aug 2006 9:56 AM
pfluft
Named Mutexes are not supportet in the compact Framework.
Author
30 Aug 2006 10:23 AM
Vadym Stetsyak
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
Author
30 Aug 2006 9:57 AM
pfluft
Named Mutexes are not supportet in the compact Framework.
Author
25 Sep 2006 5:48 AM
Kareem
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?
--
Thanks,

-Kareem


Show quote
"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
>
>
>

AddThis Social Bookmark Button