#include<nwfile.h> or #include<nwcalls.h>NWCCODE N_API NWLockPhysicalRecordSet (nuint8 lockFlags, nuint16 timeOut);
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 needed to lock 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).
In DOS and Windows, all access to the network is blocked during any timeout period. For this reason, timeouts should be kept to an absolute minimum -- a value of 18 or less. (Even though DOS is mono-tasking, the application may be running in a DOSBOX under Windows Enhanced Mode.)
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 a 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.
Synchronization