Share via


Mutex::Lock Method

Waits until the current object, or the Mutex object associated with the specified handle, releases the mutex or the specified time-out interval has elapsed.

SyncLock Lock(
   DWORD milliseconds = INFINITE
);

static SyncLock Lock(
   HANDLE h,
   DWORD milliseconds = INFINITE
);

Parameters

  • milliseconds
    The time-out interval, in milliseconds. The default value is INFINITE, which waits indefinitely.

  • h
    The handle of a Mutex object.

Requirements

Header: corewrappers.h

Namespace: Microsoft::WRL::Wrappers

See Also

Reference

Mutex Class