MRxLowIOSubmit[LOWIO_OP_NOTIFY_CHANGE_DIRECTORY] routine
The MRxLowIOSubmit[LOWIO_OP_NOTIFY_CHANGE_DIRECTORY] routine is called by RDBSS to issue a request to the network mini-redirector for a directory change notification operation.
Syntax
PMRX_CALLDOWN MRxLowIOSubmit[LOWIO_OP_NOTIFY_CHANGE_DIRECTORY];
NTSTATUS MRxLowIOSubmit[LOWIO_OP_NOTIFY_CHANGE_DIRECTORY](
_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
MRxLowIOSubmit[LOWIO_OP_NOTIFY_CHANGE_DIRECTORY] returns STATUS_SUCCESS on success or an appropriate NTSTATUS value, such as one of the following:
Return code | Description |
---|---|
STATUS_FILE_CLOSED | The FCB structure was acquired, but the associated SRV_OPEN structure has been closed. |
STATUS_INSUFFICIENT_RESOURCES | There were insufficient resources to complete the request. |
STATUS_INVALID_DEVICE_REQUEST | An invalid device request was specified. |
STATUS_INVALID_PARAMETER | An invalid parameter was specified in RxContext. |
STATUS_NOT_IMPLEMENTED | This routine is not implemented. |
STATUS_NOT_SUPPORTED | The specified request is not supported by the network mini-redirector. |
Remarks
RDBSS calls MRxLowIOSubmit[LOWIO_OP_NOTIFY_CHANGE_DIRECTORY] in response to receiving an IRP_MJ_DIRECTORY_CONTROL request.
Before calling MRxLowIOSubmit[LOWIO_OP_NOTIFY_CHANGE_DIRECTORY], RDBSS modifies the following members in the RX_CONTEXT structure pointed to by the RxContext parameter:
The LowIoContext.Operation member is set to LOWIO_OP_NOTIFY_CHANGE_DIRECTORY.
The LowIoContext.ResourceThreadId member is set to the thread of the process that initiated the operation in RDBSS.
The LowIoContext.ParamsFor.NotifyChangeDirectory.WatchTree member is set to TRUE if the IrpSp->Flags has the SL_WATCH_TREE bit set.
The LowIoContext.ParamsFor.NotifyChangeDirectory.CompletionFilter member is set to the value of IrpSp->Parameters.NotifyDirectory.CompletionFilter.
The LowIoContext.ParamsFor.NotifyChangeDirectory.NotificationBufferLength member is set to the value of IrpSp->Parameters.NotifyDirectory.Length.
The LowIoContext.ParamsFor.NotifyChangeDirectory.pNotificationBuffer member is set to the value returned by calling MmGetSystemAddressForMdlSafe passing in the Irp->MdlAddress and NormalPagePriority. The user buffer also is probed and locked for write access.
A directory change notification operation is normally implemented by a network mini-redirector as an asynchronous operation because it can take considerable time. The operation usually consists of sending a network request to the remote server requesting change notification. The response is obtained when the desired change is affected on the server. This is an example of an operation for which the network mini-redirector may need to register a unique context value for handling cancellations initiated locally.
While the MRxLowIOSubmit[LOWIO_OP_NOTIFY_CHANGE_DIRECTORY] routine is processing, the LowIoContext.ResourceThreadId member of RX_CONTEXT is guaranteed to indicate the thread of the process that initiated the operation in RDBSS. The LowIoContext.ResourceThreadId member can be used to release the FCB structure on behalf of another thread. When an asynchronous routine completes, the FCB structure that was acquired from the initial thread can be released. The FCB structure can be released by calling RxReleaseFcbResourceForThreadInMRx.
Requirements
Target platform |
Desktop |
Header |
Mrx.h (include Mrx.h) |
See also
MRxLowIOSubmit[LOWIO_OP_EXCLUSIVELOCK]
MRxLowIOSubmit[LOWIO_OP_FSCTL]
MRxLowIOSubmit[LOWIO_OP_IOCTL]
MRxLowIOSubmit[LOWIO_OP_SHAREDLOCK]
MRxLowIOSubmit[LOWIO_OP_UNLOCK]
MRxLowIOSubmit[LOWIO_OP_UNLOCK_MULTIPLE]