LockLogicalRecordSet

Attempts to lock all the logical records 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 LockLogicalRecordSet (  
     WORD   timeoutLimit); 
  

Parameters

timeoutLimit
(IN) Specifies the timeout value.

Return Values

Decimal

Hex

Constant

0

(0x00)

ESUCCESS

254

(0xFE)

ERR_TIMEOUT_FAILURE

Timeout limit was reached before all records were available for locking.

255

(0xFF)

ERR_FAILURE

Remarks

For cross-platform functionality, call NWLockLogicalRecordSet.

Applications define logical record names. A logical record name represents a group of files, physical records, structures, and so on. When LogLogicalRecord or LockLogicalRecordSet locks one or more logical record names, it does not lock the actual files, physical records, structures, and so on associated with each logical record name. It just locks the logical record name. Any uncooperative application can ignore a lock on or can access the logical record name and directly lock or access physical files or records. Therefore, applications using logical record locks must not use other locking techniques simultaneously.

The timeoutLimit parameter indicates how long the server should wait if it cannot lock all the records immediately. The timeoutLimit is specified in units of 1/18 of a second (0 means no wait).

The function cannot lock a logical record that is already exclusively locked by another application. Therefore, if one or more logical records identified in the log table are already exclusively locked by another application, the attempt fails.

See Also

ClearLogicalRecord, ClearLogicalRecordSet, LogLogicalRecord, ReleaseLogicalRecord, ReleaseLogicalRecordSet