_CP_filelock is equivalent to the filelock expression BASIC statement.
int _CP_filelock(int expression)
This function returns -1 if an error occurs or if the file is already locked. The error code is contained in _CP_errno.
C functions overview