3.2.5.39.1 Receiving a TRANS2_OPEN2 Response

If the TRANS2_OPEN2 subcommand response indicates an error, the Status MUST be passed to the application. If the error was caused by an attempt to set extended attribute name/value pairs, the client MUST also return the ExtendedAttributeErrorOffset returned in the TRANS2_OPEN2 response.

If the Open portion of the request succeeds, the FID returned in the TRANS2_OPEN2 subcommand response MUST be passed to the application, along with the access modes granted by the server. If an OpLock was requested, the OpLock level granted MUST be returned to the application.

Other attributes returned in the command can be passed to the application, if requested.

In addition, the FID MUST be used to create new Open entry in the Client.Connection.OpenTable. If an OpLock was requested, the value of Client.Open.OpLock MUST be set to indicate the type of OpLock that was granted, if any. The newly-created Client.Open MUST be returned to the application. Client.Open.TreeConnect MUST be set to Client.Connection.TreeConnectTable[TID], where the TID matches the TID field sent by the server in the SMB Header (section 2.2.3.1) of the SMB_COM_TRANSACTION2 Response (section 2.2.4.46.2). Client.Open.Session MUST be set to a Client.Session where Client.Session.SessionUID matches the UID sent by the server in the SMB Header of the SMB_COM_TRANSACTION2 Response. Client.Open.Connection MUST be set to Client.Open.Session.Connection.