Compartir a través de


3.2.4.20.11 Application Requests Remote Shared Virtual Disk File Control Operation

The application provides:

  • A handle to the Open identifying a shared virtual disk file for which the application requires access.

  • Operation Control code.

  • Control code payload.

  • The maximum output buffer size that it will accept.

If the handle is invalid, or if no Open referenced by the handle is found, the client MUST return an implementation-specific error code. If the handle is valid and Open is found, the client MUST proceed as follows.

For the specified Open, the client MUST select a connection as specified in section 3.2.4.1.7. If no connection is available, the client MUST fail the request.

Otherwise, the client initializes an SMB2 IOCTL Request following the syntax specified in section 2.2.31. The SMB2 header MUST be initialized as follows:

  • The Command field is set to SMB2 IOCTL.

  • The MessageId field is set as specified in section 3.2.4.1.3.

  • The SessionId field is set to Open.TreeConnect.Session.SessionId.

  • The TreeId field is set to Open.TreeConnect.TreeConnectId.

The SMB2 IOCTL Request MUST be initialized as follows:

  • The CtlCode field is set to the application provided control code value.

  • The FileId field is set to Open.FileId.

  • The InputOffset field MUST be set to the offset from the start of the SMB2 header to the beginning of the Buffer field.

  • The InputCount field is set to the size, in bytes, of the input Buffer data.

  • The OutputOffset field SHOULD<178> be set to zero.

  • The OutputCount field is set to 0.

  • The MaxInputResponse field is set to 0.

  • The MaxOutputResponse field is set to the maximum output buffer size that the application will accept.

  • The application provided control code payload MUST be copied into Buffer field.

  • SMB2_0_IOCTL_IS_FSCTL is set to TRUE in the Flags field.

The request MUST be sent to the server.