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.

When the client calls a method to request an enumeration, the server creates an enumeration objectthat implements the IEnumVdsObject interface and returns the interface pointer to the client toallow it to enumerate through the requested objects. The server maintains this object until the clientreleases all references to the interface. For each enumeration object, the server maintains thefollowing information:Objects Being Enumerated: A list of pointers to the <strong>VDS</strong> objects being enumerated.•When the enumeration object is created, the server populates this list with the objects to return,dictated by the particular specification of the method that the client calls.•The server does not list the same object more than once.•After the list is populated, the server does not reorder the entries in the list.•If a new <strong>VDS</strong> object is added to the server, the server does not add the object to the list ofobjects being enumerated.•If a <strong>VDS</strong> object is removed from the server, the server does not remove the object from the listof objects being enumerated. If the client later accesses the removed object, the server returns<strong>VDS</strong>_E_OBJECT_DELETED whenever the client attempts to access the object interface methods.Index: A value that keeps track of which object to return next to the client, when the client requestsmore objects from the enumeration.•When the enumeration object is created, this value is initialized to the index of the first <strong>VDS</strong>object (whether this is 0, 1, or any other value is an implementation detail) in the list of objectsbeing enumerated.•If the client requests a certain number of objects from the enumeration by means of theIEnumVdsObject::Next (Opnum 3) method, the server returns the requested number ofpointers to the objects in the list, starting at the current index value. However, if the serverreaches the end of the list, the server returns the remaining pointers to the objects in the list,and indicates the actual number of objects that are returned to the client and the return code ofS_FALSE. The server increments the index by the number of objects that are returned to theclient.•If the client requests to skip a certain number of objects in the enumeration by means of theIEnumVdsObject::Skip (Opnum 4) method, the server increments the index by that number.•If the index goes past the end of the list, all subsequent requests for more objects from theenumeration will return zero pointers and a return code of S_FALSE until the enumeration isreset.•If the client calls the IEnumVdsObject::Reset (Opnum 5) method, the server sets the indexback to the first object in the list.3.4.1.4 Notification Callback ObjectsClients can register callback objects in order to receive <strong>VDS</strong> event notifications from the server. (Formore information and for an example of how clients can do this, see section 4.2.)For each client notification callback object that is registered with the server, the server maintainsthe following information in its list of callback objects:Cookie: A unique 32-bit value that identifies the callback and that is maintained until the callbackobject is unregistered.[<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, 2011158 / 360

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

Saved successfully!

Ooh no, something went wrong!