Adventures in Win32 reverse engineering
method 6 doesn't work in Vista and later. Seehttp://pferrie.host22.com/papers/antidebug.pdffor a description of the reason.
This comment has been removed by the author.
Worked perfect for me in windows 7
SetLastError(1);now try it. still works?
Could you plz name a debugger, where method 3 works? OllyDbg v1.10 seems to handle such an issue properly.