This topic has not yet been rated - Rate this topic

TryAcquireSRWLockShared function

Applies to: desktop apps | Metro style apps

Attempts to acquire a slim reader/writer (SRW) lock in shared mode. If the call is successful, the calling thread takes ownership of the lock.

Syntax

BOOLEAN TryAcquireSRWLockShared(
  __inout  PSRWLOCK SRWLock
);

Parameters

SRWLock [in, out]

A pointer to the SRW lock.

Return value

If the lock is successfully acquired or the current thread already owns the lock, the return value is nonzero.

If another thread already owns the lock, the return value is zero.

Requirements

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

AcquireSRWLockShared
Slim Reader/Writer (SRW) Locks
TryAcquireSRWLockExclusive

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ