Purpose
This function can be used to acquire ownership of the mutex object. (In other words, the function will lock the mutex.) If the mutex has already been locked by another thread, the function returns the error code EBUSY. The calling thread can check the return code to take further actions. If the mutex is already locked by the caller itself, an error will be returned to prevent recursive locking.
Class
Function
Argument Type and Attributes
Result Type and Attributes
INTEGER(4)
Result Value
On successful completion, this function returns 0. Otherwise, this function returns one of the following errors.