Get Physical Record Locks By Connection And File (old) 0x2222 23 221

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

NetWare Servers:2.x

Request Format

Offset

Content

Type

Request header

6

FunctionCode (23)

byte

7

SubFuncStrucLen (22)

word (Hi-Lo)

9

SubFunctionCode (221)

byte

10

TargetConnectionNumber

word

12

LastRecordSeen

word

14

VolumeNumber

byte

15

DirectoryID

word

17

FileName

byte[14]

Reply Format

Offset

Content

Type

Reply header

8

NextRequestRecord

word

10

NumberOfLocks

byte

11

Reserved

byte

. . .repeats NumberOfLocks times. . .

12

TaskNumber1

byte

13

LockType1

byte

14

RecordStart1

long (Hi-Lo)

18

RecordEnd1

long (Hi-Lo)

Parameters

TargetConnectionNumber

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

LastRecordSeen

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

VolumeNumber

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

DirectoryID

(Request) Specifies the file path relative to this directory (obtained from calling File Search Initialize 0x2222 62).

FileName

(Request) Specifies the name of the file for which information is being requested.

NextRequestRecord

(Reply) Specifies the next value for LastRecordSeen.

NumberOfLocks

(Reply) Specifies the number of physical record locks.

TaskNumber1

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

LockType1

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

  • 0 Locked exclusive
  • 1 Locked shareable
  • 2 Logged
  • 6 Lock is held by TTS
RecordStart1

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

RecordEnd1

(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 (old).

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, Get Physical Record Locks By Connection And File 0x2222 23 237, Get Physical Record Locks By File (old) 0x2222 23 222