I need to obtain the Handle to a process using its
Image Name so that I can use it with TerminateProcess
function.
Any help will be appreciated
Farid
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use CreateToolhelp32Snapshot and Process32First/Next to iterate the running processes. Figuring out which one you’d want to abort if there’s more than one instance of the process is of course not really possible.