 |
ReleaseMutex ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Releases ownership of the specified mutex object. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL ReleaseMutex(
HANDLE hMutex
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER ReleaseMutex IN kernel32;
INTEGER hMutex
|
 |
 |
 |
| Parameters: |
 |
hMutex
[in] Handle to the mutex object. The CreateMutex or OpenMutex function returns this handle. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is nonzero. |
 |
 |
| My comment: |
 |
A thread obtains ownership of a mutex either by creating it with the bInitialOwner parameter set to TRUE or by specifying its handle in a call to one of the wait functions, like WaitForSingleObject.
When the thread no longer needs to own the mutex object, it calls the ReleaseMutex function so that another thread can acquire ownership.
Use the CloseHandle function to close the handle of a mutex object. The system closes the handle automatically when the process terminates. The mutex object is destroyed when its last handle has been closed.
See also: CreateMutex, CreateSemaphore. |
 |
 |
| Word Index links for the ReleaseMutex : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2005-10-28 12:46:17 | | Modified: | 2005-10-28 12:49:16 | Visited in last 7 days: 11 |