3.2.4.28 Application Requests Canceling Pending Operations

The application MUST provide the UID, TID, PID, and MID of the operation or operations to be canceled. If a connectionless transport is in use, then the application MUST also provide the CID (Connection ID) of the SMB connection.

The client MUST issue the cancel by sending an SMB_COM_NT_CANCEL request message. This message MUST be constructed as defined in section 2.2.4.65.1. The server MUST attempt to complete pending operations that match the UID, TID, PID, and MID (and CID, if required) in the request. Any matching pending operation that cannot be completed successfully MUST fail with an implementation-specific error status.

In particular, the SMB_COM_NT_CANCEL operation completes any Directory Change Notify operations (NT_TRANSACT_NOTIFY_CHANGE) on the server, causing the server to send an NT_TRANSACT_NOTIFY_CHANGE response message.

The request MUST be sent to the server as described in section 3.2.4.1, particularly the special handling required for SMB_COM_NT_CANCEL.