PsGetCurrentProcessSessionId(
VOID
);
-
+
//
// Process Impersonation Functions
//
IN BOOLEAN CreateSuspended
);
-#include "inline_ntcurrentteb.h"
+#ifndef NTOS_MODE_USER
+FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
+{
+#if defined(_M_IX86)
+ return (PTEB)__readfsdword(0x18);
+#elif defined (_M_AMD64)
+ return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
+#endif
+}
+#else
+struct _TEB * NtCurrentTeb(void);
+#endif
NTSYSCALLAPI
NTSTATUS