仅提供English版本
References:
Find process ID by name and inject to it. Simple C++ example.
C++ Get process handle by process name
The function is mainly for the auto-update service, executing subsequent functions after detecting that the program has exited.
When using the second reference, an error occurred. I found it was a stack overflow in the for loop, likely due to the field determination function, causing every program name to be judged correct. I recommend adopting the content from the first URL.
code:
1 | #pragma once |
Author: Broccoli
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles
2021-07-27
C++ 没有找到接受const _Ty类型的左操作数的运算符
2020-06-14
C++ Primer & PrimerPlus Notes
2021-08-06
Issue with C++ remove_if causing data duplication
2020-12-02
C++ Get all files in a folder and rename to Hex

2020-12-31
C++ Virtual Inheritance

2021-05-09
Use C++ for Revit Secondary Development