Search code examples
visual-foxprofoxpro

Foxpro accessing windows running processes and how to end running processes


How do I get a list of the Task manager running processes in Foxpro 9, and how can I kill one of these processes in the list in FoxPro?


Solution

  • Using WMI makes this easy. There's a sample implementation of terminating a process using WIN32_Process at http://www.berezniker.com/content/pages/visual-foxpro/check-if-exe-running-and-optionally-terminate-it which could also easily be adapted to list the processes.