Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在围绕 Sysinternal 的 ProcDump 编写一个包装器,我希望它也能够转储初始进程的衍生子进程。有什么简单的方法可以做到这一点,还是我必须在 CreateProcess 上做某种 API 挂钩?
在这个答案中,我解释了为什么没有简单的方法。该问题的另一个答案为您提供了最接近的可能解决方案的代码。
您需要挂钩 CreateProcess、CreateProcessAsUser、CreateJob、ShellExecute、ShellExecuteEx 以及其他可能。