Receiving an SMB_COM_NT_CANCEL Request

Upon receipt of an SMB_COM_NT_CANCEL Request (section, the server MUST search the  Server.Connection.PendingRequestTable for any pending commands that have the same UID, TID, PID, and MID as presented in the SMB_COM_NT_CANCEL Request. If the SMB transport is connectionless, the header CID value SHOULD<315> also be used.

For each matching entry, the server MUST pass the CancelRequestID to the object store to request cancellation of the pending operation, as described in the Server Requests Canceling an Operation section in [MS-FSA]. The canceled commands MUST return an error result or, if they complete successfully, a response message. The SMB_COM_NT_CANCEL (section command MUST NOT send a response; there is no response message associated with SMB_COM_NT_CANCEL.<316>

SMB_COM_NT_CANCEL is commonly used to force completion of operations that can potentially wait for an unbounded period of time, such as an NT_TRANSACT_NOTIFY_CHANGE (section