Windows下Debug模式的检测和OutputDebugString

对于应用程序是否处于某个用户调试模之下,可以使用如下API进行检测:

   BOOL WINAPI IsDebuggerPresent(void); (使用CheckRemoteDebuggerPresent查看特定进程)

使用它可以使得程序改变Debug模式下的行为。比如Webkit只有在Debug模式下才会输出Debug信息。


扩展:

调试与反调试  http://www.programlife.net/debug-and-anti-debug-isdebuggerpresent.html

关于OutputDebugString的细节讨论可以参考下面的译文:

   http://huanglixuan.blog.163.com/blog/static/92086922007110920183/

原文来自:

    http://www.unixwiz.net/techtips/outputdebugstring.html

 

值得收藏学习!

posted on 2012-05-22 12:05  c语言源码  阅读(353)  评论(0编辑  收藏  举报

导航