Hi ,
The System.Diagnostics namespace uses the performance counters installed
on a machine. If these couters are not installed or if they are corrupt,
you will run into this problem. But your main aim is to find out if a
previous instance of your app is running. The recommended way to do this is
to use the System.Threading.Mutex class and create a named mutex and have
initial ownership. So unless the process that created this mutex releases
it, the other processes cannot have access to it. For example you can have
this code in your startup procedure
imports system.threading
Dim bl As Boolean
Dim m As New Mutex(True, "Hello", bl)
If (bl) then
'Mutex created
else
'mutex with the same name as already been created and so the app has
already started
end if
checkout the following link for more information on mutex
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemthreadingwaithandleclasshandletopic.asp
Anand Balasubramanian
Microsoft, Visual Basic .NET
This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks