TryAcquireSRWLockExclusive function (synchapi.h)
Attempts to acquire a slim reader/writer (SRW) lock in exclusive mode. If the call is successful, the calling thread takes ownership of the lock.
BOOLEAN TryAcquireSRWLockExclusive( [in, out] PSRWLOCK SRWLock );
[in, out] SRWLock
A pointer to the SRW lock.
If the lock is successfully acquired, the return value is nonzero.
if the current thread could not acquire the lock, the return value is zero.
|Minimum supported client||Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps | UWP apps]|
|Header||synchapi.h (include Windows.h)|
Slim Reader/Writer (SRW) Locks