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 cookie is assigned by the server and returned to the client so that the client can use it tolater unregister the callback.•The server does not change the identifier and does not assign it to another callback object untilthe original callback object is unregistered.Callback Object Interface: A pointer to the IVdsAdviseSink interface that is implemented by thecallback object that is used to receive notifications from the server.•Whenever a notification must be sent to the client, the server calls theIVdsAdviseSink::OnNotify (Opnum 3) method of the object in order to notify it of the event.3.4.1.5 Asynchronous TasksCertain tasks in <strong>VDS</strong> may be long-running. The methods that trigger these tasks are asynchronousand have an IVdsAsync interface pointer as an output parameter. When the client calls a methodthat initiates these tasks, the server creates an async object that implements the IVdsAsyncinterface and returns the interface pointer to the client in order for it to monitor the task status. (Formore information and for examples of how async objects can be used, see section 4.5.) The servermaintains this object until the client releases all references to the interface.For each async object, the server maintains the following information:Async Output Type: A value of type <strong>VDS</strong>_ASYNC_OUTPUT_TYPE that indicates the type of taskthat the async object is monitoring.•The server assigns this value when the object is created, and the server does not change it.Percent Completed: An integer from 0 through 100, which indicates the percentage of progress forthe task being completed.•This value is initialized to 0 when the object is created.•If the task can be subdivided into meaningful progress milestones, the server updates this valueafter each milestone is passed.•The value always increases whenever the value is updated unless the task fails, in which case,the server sets the value to 0.•If the task is successfully completed, the server sets the value to 100.•When the client calls the IVdsAsync::QueryStatus (Opnum 5) method, the server returns thisvalue in the value that the pulPercentCompleted output parameter references.Signal State: A Boolean value that indicates whether the task is still in progress (FALSE); or if thetask has finished, whether it finished successfully or unsuccessfully (TRUE).•This value is initialized to FALSE when the object is created.•The server changes the signal state to TRUE when the task fails or when the task successfullycompletes.•If the signal state is TRUE, the server does not change the signal state back to FALSE.•If the signal state is FALSE and the client calls the IVdsAsync::Wait (Opnum 4) method, theserver blocks the call until the signal state is changed to TRUE, at which point the serverunblocks the call and return the results of the task.[<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, 2011159 / 360

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

Saved successfully!

Ooh no, something went wrong!