NWLockFileLockSet
Locks files that have been logged by a workstation task in the File Log Table of a NetWare server
#include <nwfile.h>
or
#include <nwcalls.h>
N_EXTERN_LIBRARY( NWCCODE )NWLockFileLockSet (
nuint16 timeOut);
uses calwin32 Function NWLockFileLockSet (timeOut : nuint16 ) : NWCCODE;
These are common return values; see Return Values (NDK: Connection, Message, and NCP Extensions) for more information.
To help avoid deadlock, a workstation task can log file locks in the File Log Table of a NetWare server. When the files in the log table are needed, NWLockFileLockSet can be called.
NWLockFileLockSet will attempt to lock the logged set on all attached servers. Locks will be attempted by ordering the servers according to their net node addresses and making the request on each server. If the request fails at any point, NWLockFileLockSet will automatically release all locks made to that point.
All files on all servers must be available for NWLockFileLockSet to complete successfully.
There is no way to determine which server the lock request failed on.
timeOut is the length of time the NetWare server will attempt the operation before failing. This limit is specified in units of 1/18 second (0 = no wait).