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

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 (22)

word (Hi-Lo)

9

SubFunctionCode (237)

byte

10

TargetConnectionNumber

word (Lo-Hi)

12

DataStreamNumber

byte

13

VolumeNumber

byte

14

DirectoryBase

long (Lo-Hi)

18

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

TaskNumber

word (Lo-Hi)

14

LockType

byte

15

RecordStart

long (Lo-Hi)

19

RecordEnd

long (Lo-Hi)

Parameters

TargetConnectionNumber

(Request) Specifies the logical connection number of the client that is using the file.

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.

TaskNumber

(Reply) Specifies the task number within the workstation that has the file open.

LockType

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

  • 0 Locked exclusive
  • 1 Locked shareable
  • 2 Logged
  • 6 Lock is held by TTS
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.

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 Connection And 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 File 0x2222 23 238