CmtDiscardLock

int CmtDiscardLock (int lockHandle);

Purpose

Uninitializes the thread lock.

You must call this function for every thread lock created by calling CmtNewLock. If a thread currently owns the thread lock, this function waits for the thread to release the lock before uninitializing the lock.

Parameters

Input
Name Type Description
lockHandle integer The handle you obtained from CmtNewLock to identify the thread lock.

Return Value

Name Type Description
CmtStatus integer The CmtStatus code that the function call returns. This function returns 0 to indicate success and negative values to indicate failure. Pass the CmtStatus code to CmtGetErrorMessage to get a description of the error code.