Share via


SRWLock::TryLockShared Method

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

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

Reference

SRWLock Class