BOOL ReleaseMutex(hMutex) | |||||
HANDLE hMutex; | /* identifies the mutex to release | */ |
The ReleaseMutex function releases ownership of the specified mutex object.
hMutex
Specifies an open mutex object handle. The mutex object must be currently owned by the thread calling the ReleaseMutex function.
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
A mutex object can be released only by a thread that currently owns the mutex object. When the mutex is released, the current count of the mutex object is incremented by one. If the resulting count is one, the mutex object is no longer owned, and any threads that are waiting on the mutex object are examined to see if their wait can be satisfied.
CreateMutex