Receiving an SMB_COM_CLOSE_PRINT_FILE Request

Upon receipt of an SMB_COM_CLOSE_PRINT_FILE Request (section, the server MUST verify the UID as in section

The server MUST perform a lookup of the FID in Server.Connection.FileOpenTable. If the FID is not found, the server MUST return an error response with a Status of STATUS_INVALID_HANDLE (ERRDOS/ERRbadfid). Otherwise, the Open indicated by the FID MUST be closed, every lock in Open.Locks MUST be released, and Open.TreeConnect.OpenCount, Server.Statistics.sts0_jobsqueued, and Server.Statistics.sts0_fopens MUST be decreased by 1. The server MUST provide Open.FileGlobalId as an input parameter and MUST deregister the Open by invoking the event Server Deregisters an Open ([MS-SRVS] section Once the file has been closed, the server MUST queue it for printing. The server SHOULD delete the file once it has been printed.<324>

If the file is successfully closed, the FID MUST be invalidated by removing the Open entry from Server.Connection.FileOpenTable. Once the FID has been invalidated, it is available to be reused by future open or create operations. The response MUST be sent to the client as specified in section