Skip to content

Planet-Source-Code/george-f-richardson-another-instance-is-already-running__10-4336

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Another Instance is already running ?

Description

This code verifies how many instances of a given process name is running on the machine.

More Info

ByVal pstrProcessName as String

True if there is another instance or False is there isn't

none that I now

Submitted On
By George F Richardson
Level Beginner
User Rating 4.0 (8 globes from 2 users)
Compatibility VB.NET
Category Algorithims
World .Net (C#, VB.net)
Archive File

Source Code

Imports System
Imports System.Diagnostics
Imports System.ComponentModel
Public Clas TestClas 'It's wrong because pscode.com doesn't accept the word Clas (with 2 s).
  Public Function prevInstance(ByVal pstrProcessName as string) As Boolean
    Dim lblnRet As Boolean = False
    Dim lintInst As Integer
    lintInst = UBound(Diagnostics.Process.GetProcessesByName(pstrProcessName))
    If lintInst > 0 Then
      lblnRet = True
    End If
    Return lblnRet
  End Function
End Clas

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published