NWLockLogicalRecordSet(3nw)


NWLockLogicalRecordSet -- locks all logical records logged in the log table

Synopsis

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

NWCCODE N_API NWLockLogicalRecordSet (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

Applications define logical record names. A logical record name represents a group of files, physical records, or data structures. NWLogLogicalRecord and NWLockLogicalRecordSet affect one or more logical record names, not the actual files, physical records, or data structures associated with each logical record name. Any uncooperative application can ignore a lock on the logical record name and directly lock physical files or records. Therefore, applications using logical record locks must not simultaneously use other locking techniques.

To avoid deadlock, request the resources needed to lock by making an entry in the File Log Table at the NetWare server. Once the log table is complete, the application attempts to lock those records. The locking works only 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.

A logical record is simply a name (a string) registered with the NetWare server. The name (as with a semaphore) can then be locked or unlocked by applications and can be used as an inter-application locking mechanism.


NOTE: Locking or unlocking a logical record does not physically lock or unlock those resources associated with the logical record; only the applications using the record know about such an association.

lockFlags is interpreted as follows:

   0x00   Lock record with a shareable lock 
   0x01   Lock record with an exclusive loc 
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.)

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

x2222 104 1
Ping for NDS NCP

References

NWClearLogicalRecord(3nw), NWClearLogicalRecordSet(3nw), NWLogLogicalRecord(3nw), NWReleaseLogicalRecord(3nw), NWReleaseLogicalRecordSet(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.