检测是否被调试 =0 正常,<>0 被调试
用API IsDebuggerPresent 也可以检测,
实则在WIN7中这个只能 CE中有效,OD中无效
Function CheckWhetherDebug() As Long '检测是否被调试
Local hProc As Dword, dwDebugged As Dword
hProc = GetCurrentProcess
If CheckRemoteDebuggerPresent(hProc, ByRef dwDebugged) <> 0 Then
Function=dwDebugged
End If
'IsDebuggerPresent
End Function