Share via


SRWLock::TryLockShared Method

 

The latest version of this topic can be found at SRWLock::TryLockShared Method.

Attempts to acquire a SRWLock object in shared mode for the current or specified SRWLock object.

Syntax

WRL_NOTHROW SyncLockShared TryLockShared();  
WRL_NOTHROW static SyncLockShared TryLockShared(  
   _In_ SRWLOCK* lock  
);  

Parameters

lock
Pointer to an SRWLock object.

Return Value

If successful, an SRWLock object in shared mode and the calling thread takes ownership of the lock. Otherwise, an SRWLock object whose state is invalid.

Requirements

Header: corewrappers.h

Namespace: Microsoft::WRL::Wrappers

See Also

SRWLock Class