Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 4.0 aka C# 2010 > C# 4.0 aka C# 2010 General Discussion
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 9th, 2012, 05: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.
Reply With Quote
  #2 (permalink)  
Old February 19th, 2012, 06: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
Reply With Quote
  #3 (permalink)  
Old March 5th, 2012, 12:22 PM
Friend of Wrox
Points: 2,950, Level: 22
Points: 2,950, Level: 22 Points: 2,950, Level: 22 Points: 2,950, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: , , .
Posts: 788
Thanks: 1
Thanked 51 Times in 47 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)
Reply With Quote
  #4 (permalink)  
Old March 6th, 2012, 01: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.
Reply With Quote
  #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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 08: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



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


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