Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking if a process is running

Status
Not open for further replies.

LCoder

Programmer
Mar 29, 2004
7
DE
I use the "createProcess" function (defined in the "kernel32" lib) to start a java programm from my VBA code. The java programm sometime crashes and I am looking for a function that I can use to check whether the process is still running. I have the processID and the threadID to identify the process. Any ideas?

Cheers
Lars
 
You might be able to use this API function which includes the processID as an argument:
Code:
[blue]Public Declare Function OpenProcess Lib "kernel32" Alias "OpenProcess" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
[/blue]

VBSlammer
redinvader3walking.gif

[sleeping]Unemployed in Houston, Texas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top