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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The server MUST update the percentage completed value periodically during the precedingsequence. How often the percentage completed is updated, and at what point in the sequence, isimplementation-specific.3.4.5.2.38 IVdsV<strong>Disk</strong> Methods3.4.5.2.38.1 IVdsV<strong>Disk</strong>::Open (Opnum 3)The Open method opens a handle to the specified virtual disk file and returns an IVdsOpenV<strong>Disk</strong>(section 3.1.15.2) interface pointer to an object representing the open virtual disk (anOpen<strong>Virtual</strong><strong>Disk</strong> object). Release the IVdsOpenV<strong>Disk</strong> interface to close the handle to the virtual disk.HRESULT Open([in] VIRTUAL_DISK_ACCESS_MASK AccessMask,[in] OPEN_VIRTUAL_DISK_FLAG Flags,[in] ULONG ReadWriteDepth,[out] IVdsOpenV<strong>Disk</strong>** ppOpenV<strong>Disk</strong>);AccessMask: A VIRTUAL_DISK_ACCESS_MASK (section 2.2.2.18.1.4) structure thatcontains the set of access rights to be applied to the opened virtual disk.Flags: A bitmask of OPEN_VIRTUAL_DISK_FLAG (section 2.2.2.18.1.2) flags specifying howthe virtual disk is to be opened.ReadWriteDepth: This is applicable only to differencing type virtual disks. The number ofbacking stores (files) to open read/write. This count includes the child. The remaining stores inthe differencing chain MUST be opened as read-only. For example, given a differencing diskwith two parents (diskA is the differencing disk whose parent is diskB, and since diskB is adifferencing disk, it has a parent which is diskC), entering '2' for this parameter will open thedifferencing disk (diskA) and the parent used to create this differencing disk (diskB) as readwrite.In this case, diskB is also a differencing disk and its parent (diskC) is opened as readonly.ppOpenV<strong>Disk</strong>: A pointer to a variable that, if the operation is successfully completed, receivesan IVdsOpenV<strong>Disk</strong> interface pointer to the newly opened virtual disk object. Callers MUSTrelease the interface pointer when it is no longer needed by calling the IUnknown::Releasemethod.Return Values: The method MUST return zero to indicate success, or return an implementationspecificnonzero error code to indicate failure.When the server receives this message, it MUST validate the following parameters:•Verify that ppOpenV<strong>Disk</strong> is not NULL.The server MUST then perform the following in sequence:•Pass the input parameters to the operating system to open the virtual disk file.•If the operating system failed to open the file, return an implementation-specific error code.Otherwise, if the file was successfully opened, the server MUST:•Mark the state of the object that implements IVdsV<strong>Disk</strong> as "open". For more information, seesection 2.2.2.18.1.1.[<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, 2011268 / 360

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

Saved successfully!

Ooh no, something went wrong!