简体   繁体   中英

How can I set the name of a process created with CreateProcess?

I am starting a process with CreateProcess following the formulas found on google. What I am wondering, is can I set the process name of the created process so that it is obvious in the task manager?

Thank you,
--Douglas

That's not an available option. The process name as visible in Task Manager is derived from the file name. If you want another name to show up then simply rename the EXE file.

For getting process name, you should use psapi.dll

https://docs.microsoft.com/en-us/windows/desktop/psapi/process-status-helper

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM