NWLockFileLockSet

Locks files that have been logged by a workstation task in the File Log Table of a NetWare server

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:Synchronization

Syntax

  #include <nwfile.h> 
  or 
  #include <nwcalls.h> 
   
  N_EXTERN_LIBRARY( NWCCODE )NWLockFileLockSet  ( 
     nuint16   timeOut);
  

Delphi Syntax

  uses calwin32 
   
  Function NWLockFileLockSet 
    (timeOut : nuint16 
  ) : NWCCODE;
  

Parameters

timeOut
(IN) Specifies the length of time the NetWare server attempts to lock the record set before timing out.

Return Values

These are common return values; see Return Values (NDK: Connection, Message, and NCP Extensions) for more information.

0x0000

SUCCESSFUL

0x89FE

TIMEOUT_FAILURE

Remarks

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).

NCP Calls

See Also

NWClearFileLock2, NWClearFileLockSet, NWLogFileLock2, NWReleaseFileLock2, NWReleaseFileLockSet