在NT下如何使用DebugActiveProcess调试它进程的运行?最好有源码!

hudawq 2004-12-15 05:32:24
网上介绍用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.

具体如何实现呢?
...全文
186 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
tabris17 2004-12-16
  • 打赏
  • 举报
回复
先用DebugActiveProces挂接到待调试进程
再用WaitForDebugEvent等待调试事件
tabris17 2004-12-16
  • 打赏
  • 举报
回复
http://flier_lu.blogone.net/?id=1307208
http://flier_lu.blogone.net/?id=1324316
http://www.blogcn.com/User8/flier_lu/blog/1618917.html
zwb666 2004-12-16
  • 打赏
  • 举报
回复
学习

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧