delorie.com/djgpp/doc/libc/libc_540.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

lock64

Syntax

 
#include <io.h>

int lock64(int fd, long long offset, long long length);

Description

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.

Return Value

Zero if successful, nonzero if not.

Portability

ANSI/ISO C No
POSIX No


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004