13.07.2015 Views

[MS-VDS]: Virtual Disk Service (VDS) Protocol Specification

[MS-VDS]: Virtual Disk Service (VDS) Protocol Specification

[MS-VDS]: Virtual Disk Service (VDS) Protocol Specification

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If parameter validation fails, the server MUST fail the operation immediately, returning a vendorspecificerror as its response to the client.The server MUST perform the following:•Create a new async object implementing the IVdsAsync interface with an output type of<strong>VDS</strong>_ASYNCOUT_FORMAT and set the pointer referenced by ppAsync to the interface.•Return an HRESULT indicating failure or success. Any errors encountered up through this point inprocessing the FormatPartition operation are returned in this HRESULT.The server MUST perform the following. Errors generated in this sequence of steps are returned inthe pHrResult parameter to the IVdsAsync::Wait or IVdsAsyncQueryStatus methods.•Attempt to get exclusive access to the volume. If the server fails to get exclusive access to thevolume, and the bForce parameter is not set to a non-zero value, then the server MUST return<strong>VDS</strong>_E_DEVICE_IN_USE.•If the operating system is unable to format the device using the file system type specified usingthe type parameter, then this method MUST return <strong>VDS</strong>_E_INCOMPATIBLE_FILE_SYSTEM.•If the target device\media is write-protected, then this method MUST return<strong>VDS</strong>_E_MEDIA_WRITE_PROTECTED.•If the pwszLabel parameter is incompatible with the file system type that is specified using thetype parameter, then the server MUST return <strong>VDS</strong>_E_BAD_LABEL.•If the specified file system type has a minimum volume size requirement, and that requirement isnot met, then the server MUST return <strong>VDS</strong>_E_VOLUME_TOO_SMALL.•If the specified file system type has a maximum volume size requirement, and that requirementis not met, then the server MUST return <strong>VDS</strong>_E_VOLUME_TOO_BIG.•If the specified file system type has a minimum or maximum cluster size requirement, and thatrequirement is not met, then the server MUST return <strong>VDS</strong>_E_CLUSTER_SIZE_TOO_SMALL or<strong>VDS</strong>_E_CLUSTER_SIZE_TOO_BIG, respectively.•If the specified file system type has a maximum cluster count requirement, and that requirementis not met, then the server MUST return <strong>VDS</strong>_E_CLUSTER_COUNT_BEYOND_32BITS.The server MUST update the percentage completed value periodically during the following sequence,and send progress notifications to all clients. How often the percentage completed is updated, and atwhat point in the sequence, is implementation specific. To send progress notifications to the clients:•For each callback object registered in the list of callback objects, call the callback object'sIVdsAdviseSink::OnNotify (Opnum 3) method with a <strong>VDS</strong>_NOTIFICATION structure withthe following attributes:•objectType member is <strong>VDS</strong>_NTT_FILE_SYSTEM.•FileSystem member is a <strong>VDS</strong>_FILE_SYSTEM_NOTIFICATION with the followingattributes:•ulEvent is <strong>VDS</strong>_NF_FILE_SYSTEM_FORMAT_PROGRESS.•volumeId is the <strong>VDS</strong>_OBJECT_ID of the volume object•dwPercentCompleted is the percentage completed value.[<strong>MS</strong>-<strong>VDS</strong>] — v20110610<strong>Virtual</strong> <strong>Disk</strong> <strong>Service</strong> (<strong>VDS</strong>) <strong>Protocol</strong> <strong>Specification</strong>Copyright © 2011 Microsoft Corporation.Release: Friday, June 10, 2011249 / 360

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!