IVssAsync::Wait method (vss.h)

The Wait method waits until an incomplete asynchronous operation finishes.


  [in] DWORD dwMilliseconds


[in] dwMilliseconds

Length of time, in milliseconds, that the method will wait for an asynchronous process to return before timing out.

The default value for this argument is INFINITE.

Windows Server 2003:  This parameter is reserved and must be INFINITE. If any other value is specified for this parameter, the call to Wait fails with E_INVALIDARG.

Windows XP:  This method has no parameters.

Return value

All calls to Wait for all IVssAsync objects support the following status codes.

Value Meaning
The wait operation was successful. Call IVssAsync::QueryStatus to determine the final status of the asynchronous operation.
The wait operation failed because the user did not have the correct privileges.
Unexpected error. The error code is logged in the error log file. For more information, see Event and Error Handling Under VSS.

Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This value is not supported until Windows Server 2008 R2 and Windows 7. E_UNEXPECTED is used instead.


If an operation fails while being waited on, Wait returns the error that operation encountered.

To obtain a complete list of return values for a specific Wait, see the error codes of the method that returned the IVssAsync object.


This method can succeed even if the method that returns it failed.


Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header vss.h
Library VssApi.lib

See also