LockFileSet

Attempts to lock all files in the log table

Local Servers:blocking
Remote Servers:blocking
Classification:3.x, 4.x, 5.x, 6.x
Service:Server-Based Synchronization

Syntax

  #include <\nlm\nit\nwsync.h>  
   
  int LockFileSet (  
     WORD   timeoutLimit); 
  

Parameters

timeoutLimit
(IN) Specifies the timeout value.

Return Values

Decimal

Hex

Constant

Description

0

(0x00)

ESUCCESS

 

254

(0xFE)

ERR_TIMEOUT_FAILURE

Timeout limit was reached before all files were available for locking.)

255

(0xFF)

ERR_FAILURE

 

Remarks

For cross-platform functionality, call NWLockFileLockSet.

The timeoutLimit parameter indicates how long the server should wait if it cannot lock all files immediately. The timeoutLimit is specified in units of 1/18 of a second (0 means no wait). This function cannot lock a file that is already exclusively locked by another application. Therefore, if one or more files identified in the log table are already exclusively locked, the attempt fails.

See Also

ClearFile, ClearFileSet, LogFile, ReleaseFile, ReleaseFileSet