NWLockPhysicalRecordSet
Locks all records logged in the physical record log table
#include <nwfile.h> or #include <nwcalls.h> N_EXTERN_LIBRARY( NWCCODE )NWLockPhysicalRecordSet ( nuint8 lockFlags, nuint16 timeOut);
uses calwin32 Function NWLockPhysicalRecordSet (lockFlags : nuint8; timeOut : nuint16 ) : NWCCODE;
These are common return values; see Return Values (NDK: Connection, Message, and NCP Extensions) for more information.
A physical record lock, as opposed to a logical lock, is the actual lock of a specified record relative to a physical file. Before a record is locked, it is also entered in the File Log Table at the NetWare server. Records can be locked only if all records in the log table are available for locking. This avoids deadlock.
To avoid deadlock, request those resources needing to be locked by making an entry in the File Log Table at the NetWare server. Once the log table is complete, NWLockPhysicalRecordSet attempts to lock those records. The locking only works if all records in the table are available. If some of the logged resources cannot be locked, the lock fails and none of the resources are locked.
timeOut is specified in units of 1/18 second (0 = no wait).
lockFlags is interpreted as follows:
0x00 Lock records with exclusive lock 0x02 Lock records with shareable lock
A shareable lock prevents any process, including the one which made the lock, from writing to the record.
NWLockPhysicalRecordSet cannot lock a record that is already locked exclusively by another application. If one or more records, identified in the log table, are already exclusively locked by another application, the attempt to lock the set fails.