Results 1 to 9 of 9

Thread: [RESOLVED] [02/03] Single Instance application on Vista

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    384

    Resolved [RESOLVED] [02/03] Single Instance application on Vista

    Hello everyone.
    I'm used to doing this in VB.NET 2003:
    Code:
    If (UBound(GetProcessesByName(GetCurrentProcess.ProcessName)) > 0) Then
        MessageBox.Show("Already Running!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End
    End If
    Now, the purpose of the above code is to ensure that my application cannot be run twice, ie. a single instance application.
    The above code works nicely on XP, but on Vista it produces the following exception:
    An unhandled exception of type 'System.InvalidOperationException' occurred in system.dll

    Additional information: Couldn't get process information from remote machine.
    Any advice on how I can achieve the same effect on Vista too?
    Last edited by GrimmReaper; Aug 15th, 2007 at 05:43 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width