RE: [GD-General] Is it possible to detect debugging?
Brought to you by:
vexxed72
From: Daniel V. <vo...@ep...> - 2003-10-09 17:51:27
|
UBOOL appIsDebuggerPresent() { UBOOL Result = 0; OSVERSIONINFO WinVersion; HINSTANCE KernLib = LoadLibraryEx( TEXT("kernel32.dll"), NULL, 0); if( KernLib ) { FARPROC lIsDebuggerPresent = GetProcAddress( KernLib, "IsDebuggerPresent" ); if( lIsDebuggerPresent && lIsDebuggerPresent() ) Result = 1; FreeLibrary( KernLib ); } return Result; } -- Daniel, Epic Games Inc. > -----Original Message----- > From: gam...@li... > [mailto:gam...@li...] On > Behalf Of Colin Fahey > Sent: Thursday, October 09, 2003 12:59 PM > To: gam...@li... > Subject: [GD-General] Is it possible to detect debugging? > > > > Can a Windows application determine if it is being debugged? > Naturally it can't do anything if it has been suspended at a > breakpoint, > but I'm wondering if there is a way, during execution, to > check for debugging. > > Sorry, it has been a while since I was in to Windows process > information > stuff, so I forget all the cool things a process can do. > > Anyhow, let's say the application is started. Meanwhile, > something like > Visual C++ has already been started, or is now started. Some time > during the execution of the application, the user of Visual C++ uses > the "Attach to Process..." option, and selects the application. > Is there any way for the application to detect that it is > being debugged, > assuming it has not been immediately paused? > > The method cannot depend on any particular debugger (like > checking for > certain states of, say, Visual Studio). But I assume that > many debuggers > work the same way -- although the 1337 haX0r might run the > whole app in > an 80x86 emulator... > > I don't really have any particular objective, like popping up a dialog > to embarrass the first haX0r who attempts to crack my application. > I'm just making conversation. Relax! Talk amongst yourselves! > > --- Colin > > cp...@ea... > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > Gamedevlists-general mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-general > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=557 > |