OK,thanks.
Thanks Sergey.
>For some cases you can use getobject() and check if you get an object reference or not. However, WinApi is extremely fast, and the overhead is most likely not noticeable.
>
>>Yeah, I did find Sergey's solution just now. I notice it checks all running processes. Is there a way to just check the one exe I am interested in? The reason I ask is that I want to check every 5 minutes and it seems a CPU waste to keep checking all running processes when you just want to know if this one is running. Or is this so low overhead as to be of no consequence?
>>
>>
http://www.berezniker.com/content/pages/visual-foxpro/check-if-exe-running-and-optionally-terminate-it>>
>>
>>>
http://www.berezniker.com/content/pages/visual-foxpro/check-if-exe-running-and-optionally-terminate-it>>>
>>>>Hi All,
>>>>
>>>>Old question - what is the recommended way to check if a program, e.g. xyz.exe, is running or not?
>>>>
>>>>tia
>e
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.