#include<nwfile.h> or #include<nwcalls.h>NWCCODE N_API NWLockFileLockSet (nuint16 timeOut);
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).
In DOS and Windows, all access to the network is blocked during any time out period. For this reason, time outs should be kept to an absolute minimum---a value of 18 or less. (Even though DOS is mono-tasking, the application may be running in a DOSBOX under Windows Enhanced Mode.)