3.2.5.25 Receiving an SMB_COM_OPEN_ANDX Response

The SMB_COM_OPEN_ANDX Response (section 2.2.4.41.2) MUST be processed as specified in section 3.2.5.1.

If the command fails, the error status MUST be passed to the application.

If the request succeeds, the FID field returned in the SMB_COM_OPEN_ANDX Response MUST be returned to the application, along with the access mode granted by the server. If an OpLock was requested, the OpLock status MUST be returned to the application. If the REQ_ATTRIB flag was set in the SMB_Parameters.Flags field of the request, the following values MUST be returned to the application:

  • FileAttrs

  • LastWriteTime

  • FileDataSize

  • AccessRights

  • ResourceType

  • NMPipeStatus

  • OpenResult

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_OPEN_ANDX Response. 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_OPEN_ANDX Response. Client.Open.Connection MUST be set to Client.Open.Session.Connection.