Edit

Share via


MRxQueryDirectory routine

The MRxQueryDirectory routine is called by RDBSS to request that a network mini-redirector query information on a file directory.

Syntax

PMRX_CALLDOWN MRxQueryDirectory;

NTSTATUS MRxQueryDirectory(
  _Inout_ PRX_CONTEXT RxContext
)
{ ... }

Parameters

RxContext [in, out]
A pointer to the RX_CONTEXT structure. This parameter contains the IRP that is requesting the operation.

Return value

MRxQueryDirectory returns STATUS_SUCCESS on success or an appropriate NTSTATUS value, such as one of the following:

Return code Description
STATUS_ACCESS_DENIED

The caller lacked the proper security for this operation.

STATUS_INSUFFICIENT_RESOURCES

There were insufficient resources to complete the query.

STATUS_INVALID_NETWORK_RESPONSE

An invalid file information buffer was received from the remote server or a filename length that was returned exceeded the maximum allowed length.

STATUS_INVALID_PARAMETER

An invalid FileInformationClass was specified in the Info.FileInformationClass member in the RX_CONTEXT structure pointed to by the RxContext parameter.

STATUS_LINK_FAILED

The attempt to reconnect to a remote server to complete the query failed.

STATUS_NO_SUCH_FILE

The query failed to find any entries.

STATUS_SHARING_VIOLATION

A sharing violation occurred.

Remarks

Before calling MRxQueryDirectory, RDBSS modifies the following members in the RX_CONTEXT structure pointed to by the RxContext parameter:

The Info.FileInformationClass member is set to IrpSp->Parameters.QueryDirectory.FileInformationClass.

The Info.Buffer member is set to user buffer from I/O request packet. This buffer has already been locked by RDBSS if needed.

The Info.LengthRemaining member is set to IrpSp->Parameters.QueryDirectory.Length.

The QueryDirectory.FileIndex member is set to IrpSp->Parameters.QueryDirectory.FileIndex.

The QueryDirectory.RestartScan member is set to nonzero if IrpSp->Flags has the SL_RESTART_SCAN bit on.

The QueryDirectory.ReturnSingleEntry member is set to nonzero if IrpSp->Flags has the SL_RETURN_SINGLE_ENTRY bit on.

The QueryDirectory.IndexSpecified member is set to nonzero if IrpSp->Flags has the SL_INDEX_SPECIFIED bit on.

The QueryDirectory.InitialQuery member is set to nonzero if UnicodeQueryTemplate.Buffer member of the associated FOBX is NULL and the Flags member of the FOBX does not have the FOBX_FLAG_MATCH_ALL bit on.

For a wild card query ("*.*", for example), RDBSS will set the UnicodeQueryTemplate.Buffer member of the associated FOBX to the wild card query passed.

If the PostRequest member of the RX_CONTEXT structure is TRUE on return from MRxQueryDirectory, then RDBSS will call RxFsdPostRequest passing the RX_CONTEXT structure to a worker queue for processing by the file system process (FSP).

Requirements

Target platform

Desktop

Header

Mrx.h (include Mrx.h)

See also

MRxIsValidDirectory

MRxQueryEaInfo

MRxQueryFileInfo

MRxQueryQuotaInfo

MRxQuerySdInfo

MRxQueryVolumeInfo

MRxSetEaInfo

MRxSetFileInfo

MRxSetFileInfoAtCleanup

MRxSetQuotaInfo

MRxSetSdInfo

MRxSetVolumeInfo

RxFsdPostRequest