【发布时间】:2011-09-01 08:02:50
【问题描述】:
我想反调试,写一个类似下面代码的函数调用API调试“IsDebuggerPresent”来检查:
#include "windows.h"
bool checkdbg(){
int i = 1;
__asm{
call IsDebuggerPresent //gọi api debug
test eax, eax
jne L1
mov i,0
L1 :
}
if(i == 0) return false;
else return true;
}
但是VS2010在编译的时候找不到IsDebuggerPresent可以调用。请帮帮我!
【问题讨论】:
-
编译器给出的确切错误是什么?
-
为什么是汇编程序?有什么理由不添加对
kernel32.lib的引用而直接调用IsDebuggerPresent? -
由于他包含了Windows.h,所以根本没有必要添加任何进一步的参考。
标签: c++ winapi assembly call inline-assembly