Home  /  Autodocs  /  dos.library

NAME

DupLockFromFH
Gets a Lock on an open file (V36)

SYNOPSIS

lock = DupLockFromFH(fh)
D0 D1

BPTR DupLockFromFH(BPTR)

FUNCTION

Obtain a Lock on the object associated with fh. Only works if the file was opened using a non-exclusive mode. Other restrictions may be placed on success by the file system.

INPUTS

fh
Opened file for which to obtain the Lock

NOTES

DupLockFromFH() may show unpredictable behaviour if the ChangeMode() function was used with a mode which is none of MODE_NEWFILE, MODE_OLDFILE or MODE_READWRITE.

RESULT

lock
Obtained Lock or NULL for failure

SEE ALSO

DupLock(), Lock(), UnLock(), ChangeMode()