sys_fhlock
Previous Topic  Next Topic 

Synopsis:

        sys_fhlock(file_handle,position,bytes)

Arguments:

        file_handle       -   The file handle

        position            - The byte offset in the file to lock

        num_bytes        - The number of bytes to lock.


Description:   This function attempts to lock the number of bytes specified by num_bytes at byte offset position in the file specified by file_handle.    It is possible to lock a region that is beyond the end of the file.


Note that all file locks will be release when a fil_handle is closed.


Return Value:


The function will return 0 if the lock was sucessfully obtained, otherwise it will return -33 if it could not obtain the lock or another negative error code.