#ifndef _NTRTL_H
_When_(return != 0, _Acquires_exclusive_lock_(*CriticalSection))
NTSYSAPI
LOGICAL
NTAPI
RtlTryEnterCriticalSection(
_Inout_ PRTL_CRITICAL_SECTION CriticalSection
);
View code on GitHub
Attempts to enter the specified critical section object without blocking.
TryEnterCriticalSection
maps directly to this function.