NWLockPhysicalRecordSet(3nw)


NWLockPhysicalRecordSet -- locks all records logged in the physical record log table

Synopsis

   #include<nwfile.h> 
   or 
   #include<nwcalls.h> 
   

NWCCODE N_API NWLockPhysicalRecordSet (nuint8 lockFlags, nuint16 timeOut);

Description

The parameters are as follows:

lockFlags
(IN) Specifies the lock flags.

timeOut
(IN) Specifies the length of time the NetWare server attempts to lock the record set before timing out.

Return values

0x0000
SUCCESSFUL

0x89FE
TIMEOUT_FAILURE

Notices

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.

Services

Synchronization

NCP calls

0x2222 23 17
Get File Server Information

0x2222 23 22
Get Station's Logged Info (old)

0x2222 23 28
Get Station's Logged Info

0x2222 104 1
Ping for NDS NCP

References

NWClearPhysicalRecord(3nw), NWClearPhysicalRecordSet(3nw), NWLogPhysicalRecord(3nw), NWReleasePhysicalRecord(3nw), NWReleasePhysicalRecordSet(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.