I'm testing the waters with an application security layer. I've looked up the documentation for kernel32 CheckRemoteDebuggerPresent() Code: BOOL CheckRemoteDebuggerPresent( HANDLE hProcess, PBOOL pbDebuggerPresent ); But when registering a variable with the following, sometimes the flag will not change: Code: Dim IsAttached As Boolean = False CheckRemoteDebuggerPresent(Process.GetCurrentProcess().Handle, IsAttached) I make a check of 'IsAttached' to complete the process, and other checks to ensure the flag was set without a jump. I'm sure the p/invoke is correct, it works and returns true when a debugger is attached, then it doesn't set the bool for a reason unknown to me. Tested with x64dbg and IDA. Is it best to just write something myself? Or does someone with experience have input? Regards, K4.