Close process with a given PID

Good morning, everyone,

I start in this language (which I first experienced 2 days ago) and I do some tests to train. I would like to make a program that works on the command line. I would like this program to kill a process whose PID is received as a command line parameter. The program is for Windows, could you help me?

Thank you all and have a good day.

In Rust the way of doing such things is usually the same as in C.

There's winapi crate that enables direct use of Windows API. And Windows has interfaces like TerminateProcess.

Okay, thank you very much, I'll try this.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.