stephaniem712
asked on
code works on xp but not on vista
The following code (included in the program I'm attempting to upgrade) runs fine on xp, but not on Vista.
Public Sub CheckForExistingInstance()
Try
If System.Diagnostics.Process .GetProces sesByName( Process.Ge tCurrentPr ocess.Proc essName).L ength > 1 Then
ActivatePreviousInstance(g sBWBackupT itle)
End
End If
Catch
MessageBox.Show(Err.Number , Err.Description)
End Try
End Sub
The error I get is - the error number = 5 and the description is "couldn't get process information from remote machine.."
any ideas?
Thanks!
Public Sub CheckForExistingInstance()
Try
If System.Diagnostics.Process
ActivatePreviousInstance(g
End
End If
Catch
MessageBox.Show(Err.Number
End Try
End Sub
The error I get is - the error number = 5 and the description is "couldn't get process information from remote machine.."
any ideas?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How about the assisted answer in this:
https://www.experts-exchange.com/questions/22523305/How-to-stop-application-running-more-than-once.html
https://www.experts-exchange.com/questions/22523305/How-to-stop-application-running-more-than-once.html
ASKER
I found the info on the mutex object anf incorporated it in the code which appears to be working.
ASKER