Código
Option Explicit 'KERNEL32 Private Declare Sub GetStartupInfoW Lib "KERNEL32" (ByRef lpStartupInfo As Any) '--------------------------------------------------------------------------------------- ' Procedure : IsOdbg ' Author : Karcrack ' Date : 12/03/2011 ' TestedOn : OllyDbg 1.1 & OllyDbg 2.0.1(Alpha) ' Purpose : Detect whether we are running inside OllyDbg or not. '--------------------------------------------------------------------------------------- ' Public Function IsOdbg() As Boolean Dim bvStartupInfo(0 To 16) As Long Call GetStartupInfoW(bvStartupInfo(0)) IsOdbg = (bvStartupInfo(11) And &H80) End Function