Export (0) Print
Expand All

CeCreateRwLock (Compact 2013)

3/28/2014

CeCreateRwLock returns a handle to a new lock object that supports single writers and multiple readers.


HRWLOCK
    CeCreateRwLock (
    __in DWORD dwFlags
  );

dwFlags

Unused. Callers should set dwFlags to zero.

A handle to the newly created reader/writer lock object indicates success. CeCreateRwLock returns NULL if the lock object could not be created. To get extended error information, call GetLastError.

A reader/writer lock is used to synchronize access to a resource. At any given time, it allows either concurrent read access for multiple threads, or exclusive write access for a single thread. In a situation where a resource is changed infrequently, a reader/writer lock provides better throughput than a simple one-at-a-time lock such as a critical section or mutex.

Header

Cerwlock.h

Library

coredll.lib

Show:
© 2014 Microsoft