It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Running processes

Moderator: dafunkymunky

Running processes

Postby alessy on Fri Dec 05, 2008 11:48 am

I need some tip on how to crate program that will check if a running process is still running every few seconds or. all the time, like you can see it in windows task manager...

I know how to run a program and have control of it when I start the program at the same time. But it is a problem when I need to check process witch is already running, before I start checking it .

I can paste code when I start the process and controll it. But it is question how to controll already running process .
Actually I'm gona paste my example anyway.

Example :

lPid = Shell("c:\working\wrk.exe", vbNormalFocus)
If lPid <> 0 Then
lHnd = OpenProcess(SYNCHRONIZE, 0, lPid) 'Get a handle to the shelled process.
If lHnd <> 0 Then 'If successful, wait for the
lRet = WaitForSingleObject(lHnd, INFINITE) ' application to end.
CloseHandle (lHnd) 'Close the handle.
End If

.
.
.


Please help.
Thank you .
alessy
 
Posts: 0
Joined: Fri Dec 05, 2008 11:27 am

Who is online

Users browsing this forum: No registered users and 2 guests