Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo C - <b>unlock() release file-sharing locks</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
unlock()                 Release File-Sharing Locks

 #include   <dos.h>

 int        unlock(handle,offset,length);
 int        handle;                      Handle associated with file
 long       offset;                      Address of area to be unlocked
 long       length;                      Length of area to be unlocked

    unlock() unlocks 'length' bytes of the file associated with 'handle'.
    Unlocking a file permits other processes to read or write to
    previously locked bytes.  To avoid error, lock() must be removed
    before a file is closed.  A program must release all locks before
    completing.

    Returns:    0 is returned on success; -1 is returned on error.

See Also: lock() open()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson