RxLockEnumerator function (rxprocs.h)

RxLockEnumerator is called from a network mini-redirector to enumerate the file locks on an FCB.

Syntax

BOOLEAN RxLockEnumerator(
  [in, out] IN OUT PMRX_SRV_OPEN SrvOpen,
  [in, out] IN OUT PVOID         *ContinuationHandle,
  [out]     OUT PLARGE_INTEGER   FileOffset,
  [out]     OUT PLARGE_INTEGER   LockRange,
  [out]     OUT PBOOLEAN         IsLockExclusive
);

Parameters

[in, out] SrvOpen

A pointer to the SRV_OPEN structure on the FCB to be enumerated.

[in, out] ContinuationHandle

A pointer to a handle passed back and forth representing the state of the enumeration. If this parameter is a NULL pointer, then this is the start of a lock enumeration.

[out] FileOffset

A pointer to the file offset of the returned lock.

[out] LockRange

A pointer to the lock range of the returned lock.

[out] IsLockExclusive

A pointer to a BOOLEAN indicating if the returned lock is an exclusive lock.

Return value

RxLockEnumerator returns TRUE on success indicating that the returned lock data is valid. The RxLockEnumerator routine returns or FALSE on failure when no lock data is found or the end of the list of locks has been reached.

Remarks

RxLockEnumerator is normally called from a network min-redirector to enumerate the file locks on an FCB. RxLockEnumerator gets one lock on each call. so the caller needs to keep the enumeration state internally. As a result, only one enumeration process can be in progress at any time.

The RxLockEnumerator routine needs to allocate non-paged pool memory in order to enumerate locks. Consequently, RxLockEnumerator can fail if the memory allocation fails.

Requirements

Requirement Value
Target Platform Desktop
Header rxprocs.h (include Rxprocs.h, Mrxfcb.h, Fcb.h)
IRQL <= APC_LEVEL

See also

The FCB Structure

The SRV_OPEN Structure