Overview
This example programmatically stops an executable using LabWindows/CVI.
Description
When run, this program will stop Notepad.exe in a similar way to Task Manager. The program iterates through each process until it finds one named "notepad.exe". It then terminates that process. If you want to change the process that is terminated, change the .exe named in line 33.
Steps to Implement or Execute Code
Requirements
Software
LabWindows/CVI
Psapi.lib and Psapi.h (commonly found in C:\Program Files\Microsoft SDKs\Windows)
**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Where to get the psapi.lib and the psapi.h files?