网上介绍用createprocess方式启动并进行调试其它进程,那么如何在nt下进行用DebugActiveProces调试其它正在运行的进程呢?
msdn上谈到
The debugger must have appropriate access to the target process; it must be able to open the process for PROCESS_ALL_ACCESS access. On Windows 95/98, the debugger has appropriate access if the process identifier is valid. However, on Windows NT/Windows 2000, DebugActiveProcess can fail if the target process was created with a security descriptor that grants the debugger anything less than full access. Note that if the debugging process has the SE_DEBUG_NAME privilege granted and enabled, it can debug any process.具体如何实现呢?