#ifndef _NTRTL_H
#if (PHNT_VERSION >= PHNT_WINDOWS_10_RS3)
/**
 * The RtlIsCurrentThread function determines whether the specified thread handle refers to the current thread.
 *
 * \param ThreadHandle Handle to the thread to compare with the current thread.
 * \return TRUE if the handle refers to the current thread; otherwise, FALSE.
 * \remarks Internally compares the specified handle with the current thread handle using NtCompareObjects.
 */
NTSYSAPI
BOOLEAN
NTAPI
RtlIsCurrentThread( // NtCompareObjects(NtCurrentThread(), ThreadHandle)
    _In_ HANDLE ThreadHandle
    );
View code on GitHubDetermines whether the specified handle is a handle to the current thread.
ThreadHandle - a thread handle. The handle does not need to grant any specific access mask.This function is a wrapper over NtCompareObjects.
This functionality is not exposed in Win32 API.