Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CSyncObject::Lock

Visual Studio 6.0

CSyncObject::Lock

virtual BOOL Lock( DWORD dwTimeout = INFINITE );

Return Value

Nonzero if the function was successful; otherwise 0.

Parameters

dwTimeout

Specifies the amount of time to wait for the synchronization object to be available (signaled). If INFINITE, Lock will wait until the object is signaled before returning.

Remarks

Call this function to gain access to the resource controlled by the synchronization object. If the synchronization object is signaled, Lock will return successfully and the thread now owns the object. If the synchronization object is nonsignaled (unavailable), Lock will wait for the synchronization object to become signaled up to the number of milliseconds specified in the dwTimeOut parameter. If the synchronization object did not become signaled in the specified amount of time, Lock returns failure.

CSyncObject OverviewClass MembersHierarchy Chart

Show:
© 2015 Microsoft