How to monitor the applications running in the Task Manager
Posted on 2006-07-13
I have a need to monitor the Task Manager for a program running in Windows. The name of the program is XConfig.exe. I need to be able to watch for it to be launched by another program at any time - so the program I need will run continuously and set a flag that says "Yes, XConfig.exe is running right now"...get the idea?
I have done some searching and found some reference to the following Windows API functions, but am not sure how to set this up.
Public Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Seems like I need a program that runs a continuous loop, with some time management or something to keep it from taking system memory up unnecessarily...my experience is in database applications, so not sure how to do this kind of thing.
I am using VB 6.
Thanks for your assistance!