|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to uniquely identify a process?Hi all
The question is simple: How can I find out if an executable is running apart from verifying process name, path, program title etc which does not ensure uniqueness? I think classid (GUID) could help but I dont know if it is the right direction and how to achieve this. Any advise is welcomed! Thanks 014234***@gmail.com ¼g¹D¡G
> Hi all OK I got it> > The question is simple: > How can I find out if an executable is running apart from verifying > process name, path, program title etc which does not ensure uniqueness? > I think classid (GUID) could help but I dont know if it is the right > direction and how to achieve this. Any advise is welcomed! > > Thanks Process.getType.GUID.toString() 014234***@gmail.com wrote:
> Hi all This is generally done with a mutex.> > The question is simple: > How can I find out if an executable is running apart from verifying > process name, path, program title etc which does not ensure uniqueness? > I think classid (GUID) could help but I dont know if it is the right > direction and how to achieve this. Any advise is welcomed! > > Thanks public sub main dim created as bool dim instanceCheck as new mutex (true, "MY_UNIQUE_MUTEX_NAME", created) if created then ' we got the mutex try application.run (new form1()) finally instanceCheck.ReleaseMutex () ' make sure we release this bad boy end try else ' process already running ' i've been known to use WM_COPYDATA to send messages to prev instances :) end if end sub HTH, Tom Shelton
How to get a form's property value from a class?
Russian text output How to identiy numerics in a string? another vb .net xml question PDF Creation components "Four" to 4 How to deploye SQL 2005 Express with my application Call or Not Call Install errors during a Fix install adding listbox selected items |
|||||||||||||||||||||||