MRxQueryFileInfo routine

TheMRxQueryFileInfo routine is called by RDBSS to request that a network mini-redirector query file information on a file system object.

Syntax

PMRX_CALLDOWN MRxQueryFileInfo;

NTSTATUS MRxQueryFileInfo(
  _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

MRxQueryFileInfo 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_BUFFER_OVERFLOW

The buffer to receive the file information was too small.

This return value should be considered success and as much valid data as possible should be returned in the Info.Buffer member of the RX_CONTEXT structure pointed to by the RxContext parameter.

STATUS_BUFFER_TOO_SMALL

The buffer is too small to receive the requested data.

If this value is returned, the InformationToReturn member of the RX_CONTEXT structure pointed to by the RxContext parameter should be set to the minimum size of the expected buffer for the call to succeed.

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.

STATUS_INVALID_PARAMETER

An invalid parameter was specified.

This value can be returned if an invalid value for the FileInformationClass member in the RX_CONTEXT is passed. This value can also be returned if the FileInformationClass member specified is for FileStreamInformation and the remote file system does not support streams.

STATUS_OBJECT_NAME_NOT_FOUND

The object name was not found. This is an error code.

Remarks

RDBSS issues a call to MRxQueryFileInfo in response to receiving an IRP_MJ_QUERY_INFORMATION request.

Before calling MRxQueryFileInfo, 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.QueryFile.FileInformationClass, the requested FILE_INFORMATION_CLASS value.

The Info.Buffer member is set to the user buffer from the I/O request packet.

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

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

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

The QueryDirectory.ReturnSingleEntry member is set if IrpSp->Flags has SL_RETURN_SINGLE_ENTRY bit set.

The QueryDirectory.InitialQuery member is set if Fobx->UnicodeQueryTemplate.Buffer is NULL and Fobx->Flags does not have the FOBX_FLAG_MATCH_ALL bit set.

On success, the network mini-redirector should set the Info.LengthRemaining member of the RX_CONTEXT structure to Info.Length member minus the length of the file information returned. If the call to MRxQueryFileInfo was successful, RDBSS sets the IoStatus.Information member of the IRP to IrpSp->Parameters.QueryFile.Length minus the Info.LengthRemaining member of RX_CONTEXT.

RDBSS does not support requests with the SL_INDEX_SPECIFIED bit of the IrpSp->Flags set. A network mini-redirector will not receive calls to MRxQueryFileInfo with the SL_INDEX_SPECIFIED bit of IrpSp->Flags set.

Requirements

Target platform

Desktop

Header

Mrx.h (include Mrx.h)

See also

MRxIsValidDirectory

MRxQueryDirectory

MRxQueryEaInfo

MRxQueryQuotaInfo

MRxQuerySdInfo

MRxQueryVolumeInfo

MRxSetEaInfo

MRxSetFileInfo

MRxSetFileInfoAtCleanup

MRxSetQuotaInfo

MRxSetSdInfo

MRxSetVolumeInfo