[NTOSKRNL] Implement ThreadHideFromDebugger in NtSetInformationThread()
authorPierre Schweitzer <pierre@reactos.org>
Sat, 24 Feb 2018 21:06:18 +0000 (22:06 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 24 Feb 2018 21:07:12 +0000 (22:07 +0100)
ntoskrnl/ps/query.c

index ad281e6..40a365a 100644 (file)
@@ -2420,6 +2420,19 @@ NtSetInformationThread(IN HANDLE ThreadHandle,
             }
             break;
 
+        case ThreadHideFromDebugger:
+
+            /* Check buffer length */
+            if (ThreadInformationLength != 0)
+            {
+                Status = STATUS_INFO_LENGTH_MISMATCH;
+                break;
+            }
+
+            /* Set the flag */
+            PspSetCrossThreadFlag(Thread, CT_HIDE_FROM_DEBUGGER_BIT);
+            break;
+
         default:
             /* We don't implement it yet */
             DPRINT1("Not implemented: %d\n", ThreadInformationClass);