请问如何获知某进程处于DEBUG状态?

JerryGR 2006-09-04 06:38:54
如题。
...全文
191 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
JerryGR 2006-09-04
  • 打赏
  • 举报
回复
2000下如何获得呢?
ljj3004 2006-09-04
  • 打赏
  • 举报
回复
studying
DentistryDoctor 2006-09-04
  • 打赏
  • 举报
回复
IsDebuggerPresentd 98及NT以上系统就可以了,它只能检查本进程。
CheckRemoteDebuggerPresent可以检查其它进程是否处于Debug磁头主,不过需要XP SP1及2003才行。
jixingzhong 2006-09-04
  • 打赏
  • 举报
回复
XP SP1

IsDebuggerPresent function 有印象了 ~
jixingzhong 2006-09-04
  • 打赏
  • 举报
回复
看来得熟悉系统 API 以及各个版本之间的区别啊 ~~
DentistryDoctor 2006-09-04
  • 打赏
  • 举报
回复
不过CheckRemoteDebuggerPresent需要XP SP1及2003才行。
DentistryDoctor 2006-09-04
  • 打赏
  • 举报
回复
A process can detect whether it is being debugged by calling the IsDebuggerPresent function.

IsDebuggerPresent

The IsDebuggerPresent function determines whether the calling process is being debugged by a user-mode debugger.


BOOL IsDebuggerPresent(void);

Parameters
This function has no parameters.
Return Values
If the current process is running in the context of a debugger, the return value is nonzero.

If the current process is not running in the context of a debugger, the return value is zero.

To determine whether a remote process is being debugged, use the CheckRemoteDebuggerPresent function.

CheckRemoteDebuggerPresent
The CheckRemoteDebuggerPresent function determines whether the specified process is being debugged.

BOOL CheckRemoteDebuggerPresent(
HANDLE hProcess,
PBOOL pbDebuggerPresent
);

Parameters
hProcess
[in] Handle to the process.
pbDebuggerPresent
[in, out] Pointer to a variable that the function sets to TRUE if the specified process is being debugged, or FALSE otherwise.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.

15,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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