ntdll: Implement RtlIsCurrentProcess/Thread.

This commit is contained in:
Alexandre Julliard 2023-07-03 22:14:51 +02:00
parent a5ff427acb
commit 959dea0c09
4 changed files with 22 additions and 0 deletions

View file

@ -835,6 +835,8 @@
@ stdcall RtlIsActivationContextActive(ptr)
@ stdcall RtlIsCriticalSectionLocked(ptr)
@ stdcall RtlIsCriticalSectionLockedByThread(ptr)
@ stdcall RtlIsCurrentProcess(long)
@ stdcall RtlIsCurrentThread(long)
@ stdcall RtlIsDosDeviceName_U(wstr)
@ stdcall -arch=x86_64 -norelay RtlIsEcCode(ptr)
@ stub RtlIsGenericTableEmpty

View file

@ -49,6 +49,15 @@ PEB * WINAPI RtlGetCurrentPeb(void)
}
/******************************************************************************
* RtlIsCurrentProcess (NTDLL.@)
*/
BOOLEAN WINAPI RtlIsCurrentProcess( HANDLE handle )
{
return handle == NtCurrentProcess() || !NtCompareObjects( handle, NtCurrentProcess() );
}
/******************************************************************
* RtlWow64EnableFsRedirection (NTDLL.@)
*/

View file

@ -463,6 +463,15 @@ TEB_ACTIVE_FRAME * WINAPI RtlGetFrame(void)
}
/******************************************************************************
* RtlIsCurrentThread (NTDLL.@)
*/
BOOLEAN WINAPI RtlIsCurrentThread( HANDLE handle )
{
return handle == NtCurrentThread() || !NtCompareObjects( handle, NtCurrentThread() );
}
/***********************************************************************
* _errno (NTDLL.@)
*/

View file

@ -4650,6 +4650,8 @@ NTSYSAPI NTSTATUS WINAPI RtlIntegerToUnicodeString(ULONG,ULONG,UNICODE_STRING *
NTSYSAPI BOOLEAN WINAPI RtlIsActivationContextActive(HANDLE);
NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLocked(RTL_CRITICAL_SECTION *);
NTSYSAPI BOOL WINAPI RtlIsCriticalSectionLockedByThread(RTL_CRITICAL_SECTION *);
NTSYSAPI BOOLEAN WINAPI RtlIsCurrentProcess(HANDLE);
NTSYSAPI BOOLEAN WINAPI RtlIsCurrentThread(HANDLE);
NTSYSAPI ULONG WINAPI RtlIsDosDeviceName_U(PCWSTR);
#ifdef __x86_64__
NTSYSAPI BOOLEAN WINAPI RtlIsEcCode(const void*);