Go to the first, previous, next, last section, table of contents.
#include <io.h> int lock64(int fd, long long offset, long 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.
Arguments offset and length must be of type long
long
, thus enabling you to lock with offsets and lengths as large as
~2^63 (FAT16 limits this to ~2^31; FAT32 limits this to
2^32-2).
See section unlock64.
Zero if successful, nonzero if not.
not ANSI, not POSIX
Go to the first, previous, next, last section, table of contents.