• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

How can i detect a process in memory and then load it?


I created a program that hides its self after it runs a certain function. I want create a second program that will look for the first program in memory and "Show" it if it finds it, if does not find it in memory it will "Run" it.

0
rovi
Asked:
rovi
1 Solution
 
iboutchkineCommented:
Here's a function that will tell you if Process is running:

    Private Function IsWordRunning() As Boolean
        Dim p As System.Diagnostics.Process() =  _
              System.Diagnostics.Process.GetProcessesByName("your process")
        If p.Length >= 1 Then
            Return True
        Else
            Return False
'here you can start it
        End If
    End Function
0
 
thenrichCommented:
Dim myProgram as object

   myProgram = GetObject(,"myProgramName")
   myProgram.Activate

you'll have to expose a public method to actaully activate youe newly found instance
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now