Docs » Autodocs » dos.library » OpenFromLock
OpenFromLock -- Opens a file you have a lock on (V36)
fh = OpenFromLock(lock) D0 D1 BPTR OpenFromLock(BPTR)
Given a lock, this routine performs an open on that lock. If the open succeeds, the lock is (effectively) relinquished, and should not be UnLock()ed or used. If the open fails, the lock is still usable. The lock associated with the file internally is of the same access mode as the lock you gave up - shared is similar to MODE_OLDFILE, exclusive is similar to MODE_NEWFILE.
lock - Lock on object to be opened.
fh - Newly opened file handle or NULL for failure
In the original V36 autodocs, this was shown (incorrectly) as taking a Mode parameter as well. The prototypes and pragmas were also wrong.
Open(), Close(), Lock(), UnLock()
|