Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2007

Tip: Looking for answers? Try searching our database.

Inter Process Communication

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vivek - 17 Sep 2007 14:22 GMT
Hi
I am developing one Windows App. I want the user should run only one
instance at time of application. But i have also two variant of this Assembly
in same code which depends on some file of current application folder. I dont
want that user can run same variant at time, but user can run two separte
instance of two variant from two different folder.
For E.g
Varint.Exe is C:\A folder
Varint.Exe is in C:\B folder
If user run the Varint.exe from folder A twice it should not run. But if
user run Varint from A and then from B. He should be alllowed. Because both
version will changes its logic at runtime depending on other files present in
the application's executable folder.
What I currently do is to find out process of the same name(Variant.Exe), if
the its are different then exit second instance which user tried. Its working
but for only one case ie no same name application varint should start. Its
not working for other case ie user can run two variant at the same type.
I want to use interprocess communication for this. When first instance is
running it will keep some data into memory. When second instance tries to
load. it will first check for the existance of data, if data is present it
will not load it self.
But i dont know how to implement this logic.
Could anyone please help me out?
AMercer - 17 Sep 2007 16:50 GMT
If I understand correctly, you want to allow multiple running instances of
variant.exe only if each is running with a different folder.  In other words,
the folder is the resource whose access is to be restricted.  Have
variant.exe make a mutex whose name is derived from the folder name, and
allow/disallow variant.exe to run based on the state of the mutex.

> Hi
> I am developing one Windows App. I want the user should run only one
[quoted text clipped - 19 lines]
> But i dont know how to implement this logic.
> Could anyone please help me out?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.