LockPhysicalRecordSet

Attempts to lock all physical 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 LockPhysicalRecordSet (  
     BYTE   lockDirective,  
     WORD   timeoutLimit); 
  

Parameters

lockDirective
(IN) 0 = Lock records with exclusive locks 1 = Lock records with sharable read-only locks
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 NWLockPhysicalRecordSet.

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 record that is already exclusively locked by another application. If one or more records identified in the log table are already exclusively locked by another application, the attempt fails.

See Also

ClearPhysicalRecord, ClearPhysicalRecordSet, LogPhysicalRecord, ReleasePhysicalRecord, ReleasePhysicalRecordSet