Partager via


3.3.5.11.1.1 Receiving an FSCTL_SRV_ENUMERATE_SNAPSHOTS Function Code

This is a request to enumerate the available previous versions for a share.

If the MaxDataCount of the request is smaller than the size of an FSCTL_SRV_ENUMERATE_SNAPSHOTS response, then the server MUST fail the request with STATUS_INVALID_PARAMETER.

The server SHOULD<137> refresh the snapshot list by querying the timestamps of available previous versions of the share. The server MUST construct a Server.Share.SnapshotList that contains only the snapshots that are active.

The server MUST construct an FSCTL_SRV_ENUMERATE_SNAPSHOTS response, as specified in section 2.2.7.2.2.1, with the following values.

If there are no previous versions of the file available or if the size required in bytes is greater than the MaxDataCount received in the NT_TRANSACT_IOCTL request, the server MUST set the following values:

  • NumberOfSnapShots MUST be set to the number of previous versions of the file available in the listed snapshots in Server.Share.SnapshotList.

  • NumberOfSnapShotsReturned MUST be set to 0.

  • SnapShotArraySize SHOULD<138> be set to the size, in bytes, required to receive all of the previous version timestamps of the file listed in Server.Share.SnapshotList.

Otherwise,

  • NumberOfSnapShots MUST be set to the number of previous versions of the file available in the listed snapshots in Server.Share.SnapshotList.

  • The SnapShotMultiSZ array MUST list the time stamps in textual GMT format for all the previous version timestamps listed in Server.Share.SnapshotList, as specified in section 2.2.7.2.2.1.

  • NumberOfSnapShotsReturned MUST be set to the number of previous version timestamps being returned in the SnapShotMultiSZ array.

  • SnapShotArraySize MUST be set to the size, in bytes, of the SnapShotMultiSZ array.

When sending the response to the client, the server SHOULD NOT <139>include any additional data after NT_Trans_Data in the FSCTL_SRV_ENUMERATE_SNAPSHOTS response (as specified in section 2.2.7.2.2.1) and the client MUST ignore any additional data on receipt.