cfunc.lock C Function/C Functions

cfunc.lock

Command cfunc.lock C Function/C Functions
Applicable release versions: AP 6.1
Category C Functions (120)
Description equivalent to the Pick/BASIC statement: lock

The variant of lock used depends upon the type parameter:

Type Pick/BASIC statement

_CP_LOCK lock expression
_CP_LOCK_W lock expression else * return -1

This function returns -1 if an error occurs. The error code is contained in _CP_errno.
Syntax int _CP_lock(int type, int expression)
Options
Example
The following example sets basic lock 1.

_CP_lock(_CP_LOCK,1);
Purpose
Related cfunc.introduction
cfunc.unlock
cfunc.unlock_all