Get Physical Record Locks By File 0x2222 23 238

Returns a logical connection's physical record locks within a file.

NetWare Servers:3.x, 4.x, 5.x

Request Format

Offset

Content

Type

Request header

6

FunctionCode (23)

byte

7

SubFuncStrucLen (5 + PathLen)

word (Hi-Lo)

9

SubFunctionCode (238)

byte

10

DataStreamNumber (fork)

byte

11

VolumeNumber

byte

12

DirectoryBase

long (Lo-Hi)

16

LastRecordSeen

word (Lo-Hi)

Reply Format

Offset

Content

Type

Reply header

8

NextRequestRecord

word (Lo-Hi)

10

NumberOfLocks

word (Lo-Hi)

. . .repeats NumberOfLocks times. . .

12

LoggedCount

word (Lo-Hi)

14

ShareableLockCount

word (Lo-Hi)

16

RecordStart

long (Lo-Hi)

20

RecordEnd

long (Lo-Hi)

24

LogicalConnectionNumber

word (Lo-Hi)

26

TaskNumber

word (Lo-Hi)

28

LockType

word (Lo-Hi)

Parameters

DataStreamNumber

(Request) Specifies the data stream number for the Macintosh name space:

  • 0 Resource fork (or DOS)
  • 1 Data fork
VolumeNumber

(Request) Specifies the volume on which the file exists.

DirectoryBase

(Request) Specifies the directory entry number for the file or directory path (obtained from calling File Search Initialize 0x2222 62).

LastRecordSeen

(Request) Specifies the last record for which information is returned (set to zero initially).

NextRequestRecord

(Reply) Specifies the next value for LastRecordSeen.

NumberOfLocks

(Reply) Specifies the number of physical record locks.

LoggedCount

(Reply) Specifies the number of tasks that have the record logged.

ShareableLockCount

(Reply) Specifies the number of tasks that have the record locked in a shareable state.

RecordStart

(Reply) Specifies the byte offset where the record begins within the file.

RecordEnd

(Reply) Specifies the byte offset where the record ends within the file.

LogicalConnectionNumber

(Reply) Specifies the logical connection number for the connection that has the record exclusively locked.

TaskNumber

(Reply) Specifies the task number within the logical connection that has the file exclusively locked.

LockType

(Reply) Specifies the bits indicating the file's lock status:

  • 0x00 Not locked
  • 0xFE Locked by a file lock
  • 0xFF Locked by Begin Share File Set

Return Values

Decimal

Hex

Description

0

0x00

Successful

150

0x96

Server Out Of Memory

198

0xC6

No Console Rights

253

0xFD

Bad Station Number

255

0xFF

No Files Found

Remarks

You must have console operator privileges to call Get Physical Record Locks By File.

For subsequent requests, set LastRecordSeen to the value returned in the previous request in NextRequestRecord. If NextRequestRecord is zero, the server has passed all information back to the requesting client.

See Also

Get Physical Record Locks By Connection And File 0x2222 23 237