次の方法で共有


CeIsRwLockAcquired (Compact 2013)

3/28/2014

CeIsRwLockAcquired determines whether the calling thread holds a specified reader/writer lock object with the specified access type.

Syntax

BOOL
  CeIsRwLockAcquired(
    __in HRWLOCK   hLock,
    __in CERW_TYPE typeLock
  );

Parameters

  • hLock
    [in] Handle to a reader/writer lock object created by a call to CeCreateRwLock.
  • typeLock
    [in] Specifies the type of access, either CERW_TYPE_SHARED or CERW_TYPE_EXCLUSIVE, to check against the specified lock.

Return Value

TRUE indicates the lock is valid and the calling thread holds the specified access to the lock. FALSE indicates the lock is invalid, or the calling thread does not hold the specified access to the lock. To get extended error information, call GetLastError.

Remarks

If the lock specified in hLock is invalid, GetLastError will return ERROR_INVALID_PARAMETER. If CeIsRwLockAcquired returns FALSE and GetLastError returns ERROR_SUCCESS, the calling thread does not hold the specified access to the lock.

Requirements

Header

Cerwlock.h

Library

coredll.lib

See Also

Reference

Synchronization Functions
Synchronization Enumerations
CeCreateRwLock
CeAcquireRwLock
CERW_TYPE