Allowing more than one user to invoke an application in a remote system.

SangeethaK

New member
Joined
Sep 11, 2007
Messages
1
Location
Chennai
Programming Experience
1-3
Hi all,

I have a problem.

We have a remote system and more than one user can connect to the same system using their own id say for example A001, B001, C001 etc….

All the codings were done in VB.Net.

If more than one user invokes an application, an error message is diaplayed (Coding is done in such a way) as ‘An Instance of that application is already opened’

I have the code as below,

If Process.GetProcessesByName
(Process.GetCurrentProcess.ProcessName).Length > 1 Then
Return True
Else
Return False
End If

If it returns true, then the above said error message is displayed.

But now my requirement changes.
I.e., the application should check for the userid of the user invoking the application and if that user have already invoked that application, it should display the error message else it should allow that user to invoke that application.

To make it in a clear way,
Say if user A001 already invoked that application(say Samp.exe) and if user B001 is also trying to invoke Samp.exe, it should check for the userid and then allow B001 to invoke Samp.exe.
If A001 wants to invoke a Second Samp.exe, it should not allow him/her to invoke.

As I’m new to VB.NET, please help me in solving this problem as soon as possible.
 
Back
Top