Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 4.0 aka C# 2010 > C# 4.0 aka C# 2010 General Discussion
| Search | Today's Posts | Mark Forums Read
C# 4.0 aka C# 2010 General Discussion Discussions about the C# 4.0, C# 4, Visual C# 2010 language and tool not related to any specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 4.0 aka C# 2010 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 9th, 2012, 06:42 AM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: , , .
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
Default 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.
  #2 (permalink)  
Old February 19th, 2012, 07:08 AM
Friend of Wrox
Points: 742, Level: 10
Points: 742, Level: 10 Points: 742, Level: 10 Points: 742, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2009
Location: Tehran, Iran
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Smile

Hi there

you can get acknowledge from apps.
__________________
happy every time, happy every where

Reza Baiat
  #3 (permalink)  
Old March 5th, 2012, 01:22 PM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

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

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
  #4 (permalink)  
Old March 6th, 2012, 02:51 AM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: , , .
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
Default Solution

Hi,
I have solved this problem by using a Mutex and limiting the number to 1.
Regards.
  #5 (permalink)  
Old June 14th, 2012, 02:54 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put the limit number of install's in vb 2008? draganp71 Visual Basic 2008 Essentials 1 May 18th, 2012 04:04 PM
Limit Number of Concurrent User in XML mielshall XML 3 November 27th, 2010 09:53 PM
PHP loop through database and limit number of entries gilbertsavier Beginning PHP 0 July 31st, 2009 06:42 AM
Preventing new instances of the same application aehb C# 3 May 18th, 2005 01:14 PM
put a limit on the number of characters entered in crmpicco HTML Code Clinic 6 April 12th, 2005 06:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.