3.2.4.39 Application Requests Notification of Change in Directory Contents

A client requests waiting for directory change notification by issuing an SMB_COM_NT_TRANSACT (section 2.2.4.62.1) request with the subcommand NT_TRANSACT_NOTIFY_CHANGE. The application provides the following:

  • A Client.Open indicating a directory within a connected share.

  • A Completion Filter indicating the changes needed in order to complete the command.

  • A Boolean indicating whether or not subtrees of the specified directory are also to be monitored for changes.

  • The size of the buffer that the server MUST use to collect file change information.

The command MUST NOT be completed until one of the following events occurs:

  • A change matching one of the change events in the Completion Filter occurs.

  • An SMB_COM_NT_CANCEL with matching UID, TID, PID, MID, and (depending upon the transport type) CID is received. See section 3.2.4.28.

The SMB_Parameters.Words.MaxParameterCount field in the SMB_COM_NT_TRANSACT request determines the size of the buffer that is used by the server to buffer directory change information. The SMB_Parameters.Words.MaxParameterCount field in the SMB_COM_NT_TRANSACT request is set to the size supplied by the application.

The client MUST construct the NT_TRANSACT_NOTIFY_CHANGE request message as specified in section 2.2.7.4.1. The request MUST be sent to the server as described in section 3.2.4.1.