CMultiLock::Unlock

BOOL Unlock( );

BOOL Unlock( LONG lCount, LPLONG lPrevCount = NULL );

Return Value

Nonzero if the function was successful; otherwise 0.

Parameters

lCount

Number of reference counts to release. Must be greater than 0. If the specified amount would cause the object’s count to exceed its maximum, the count is not changed and the function returns FALSE.

lPrevCount

Points to a variable to receive the previous count for the synchronization object. If NULL, the previous count is not returned.

Remarks

Releases the synchronization object owned by CMultiLock. This function is called by CMultiLock’s destructor.

The first form of Unlock tries to unlock the synchronization object managed by CMultiLock. The second form of Unlock tries to unlock the CSemaphore objects owned by CMultiLock. If CMultiLock does not own any locked CSemaphore object, the function returns FALSE; otherwise, it returns TRUE. lCount and lpPrevCount are exactly the same as the parameters of CSingleLock::Unlock. The second form of Unlock is rarely applicable to multilock situations.

CMultiLock OverviewClass MembersHierarchy Chart