#include <io.h> int lock(int fd, long offset, long length);
Locks a region in file fd using MS-DOS file sharing interface. The region of length bytes, starting from offset, will become entirely inaccessible to other processes. If multiple locks are used on a single file they must be non-overlapping. The lock must be removed before the file is closed.
This function will fail unless SHARE, or a network software providing similar interface, is installed. This function is compatible with Borland C++ function of the same name.
See section unlock.
Zero if successful, nonzero if not.
not ANSI, not POSIX
Go to the first, previous, next, last section, table of contents.