p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   C# 4.0 aka C# 2010 General Discussion (http://p2p.wrox.com/c-4-0-aka-c-2010-general-discussion-564/)
-   -   How to limit the number of instances of an application. (http://p2p.wrox.com/c-4-0-aka-c-2010-general-discussion/86267-how-limit-number-instances-application.html)

codehelp January 9th, 2012 05:42 AM

How to limit the number of instances of an application.
 
I am writing a simple folder watch service using C#.
This will monitor a folder for a .xml file and launch another application with that file as input parameter. Currently, in its vanilla flavour, it launchees the other application as soon as a file is dropped in the hot folder. This happens even when one file is being processed.

Is there a way I can limit the number of instances of the other application launched by the service?

Regards.

irProject February 19th, 2012 06:08 AM

Hi there

you can get acknowledge from apps.

Shasur March 5th, 2012 12:22 PM

Do you want to run the App as single instance. Please refer http://dotnetdud.blogspot.in/2007/12...es-of-net.html

Cheers
Shasur

codehelp March 6th, 2012 01:51 AM

Solution
 
Hi,
I have solved this problem by using a Mutex and limiting the number to 1.
Regards.

lilchuik June 14th, 2012 02:54 PM

i don't know about C# but i have good knowledge about C++ and want to get more and more rtm homes saskatchewan.


All times are GMT -4. The time now is 09:28 PM.

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.