Running the same application twice

I did not think that you could run the same application twice on a Pocket PC at the same time. I had a user bring in his unit because he kept getting error messages. When I checked the "Start"/"Settings"/"System"/"Memory"/"Running Programs" on the device (Dell Axim X51 running version A05) I found that he was running two instances of one of my homegrown applications. It showed activesync, a program I had written, file explorer, another program I had written, calculator, the first program I had written again, and then notes listed as running programs.

Again, I did not think that this was possible. In my code, vb.net 8.0, using Visual Studio 2005 I am using the following code:

runapp(App_Path & "CCClark_Watch.exe")

to call my programs, where the App_Path = "\Program files\CCClark\" or "\SD Card\CCClark\", depending on whether the device has an SD card or not.

My machine set up for Visual Studio is:

Microsoft Visual Studio 2005
Version 8.0.50727.42 (RTM.050727-4200)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional

Microsoft Visual Basic 2005 77626-009-0000007-41117
Microsoft Visual Basic 2005

Microsoft Visual C# 2005 77626-009-0000007-41117
Microsoft Visual C# 2005

Microsoft Visual C++ 2005 77626-009-0000007-41117
Microsoft Visual C++ 2005

Microsoft Visual J# 2005 77626-009-0000007-41117
Microsoft Visual J# 2005

Microsoft Visual Web Developer 2005 77626-009-0000007-41117
Microsoft Visual Web Developer 2005

Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005


Refactor! for Visual Studio 1.0
Refactor! for Visual Studio 2005.




Answer this question

Running the same application twice

  • De-guinsa

    Hi Chris,

    We only enforce this restriction on Pocket PC and SmartPhone devices--it's possible that our detection code is broken in this case. I'm going to look into it. In the meantime, the following link has some information about a workaround that may work for you:

    http://blogs.msdn.com/onoj/archive/2004/06/04/148532.aspx

    Cheers,

    Ryan Chapman

    .NET Compact Framework


  • Ben Sparks

    I only have one copy of the .exe object. It is either on the sd card or in program files. A single shortcut is loaded pointing at one or the other. This is mutually exclusive. I know that the program "could" be loaded in both locations, but that is the first thing I looked for when this occurred. It was not the case.

    What now



  • Schweppp

    The single instance code in the .NET Compact Framework is designed that single instaces of applications will run if there is only one copy of the application executable on the machine. If things are working correctly, having 2 copies of your application running implies the user must have launched two seperate .exes.

    From the point of view of the framework. "\Program Files\CCClark\CCClark_Watch.exe" and "\SD Card\CCClard\CCClark_Watch.exe" are totally seperate applications.

    David Wrighton

    .NET Compact Framework


  • Running the same application twice