IVssAsync::QueryStatus method

The QueryStatus method queries the status of an asynchronous operation.

Syntax

HRESULT QueryStatus(
  HRESULT *pHrResult,
  INT     *pReserved
);

Parameters

pHrResult

The status of the asynchronous operation that returned the current IVssAsync object.

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

Value Meaning
VSS_S_ASYNC_CANCELLED
The asynchronous operation was canceled by a previous call to IVssAsync::Cancel.
VSS_S_ASYNC_FINISHED
The asynchronous operation was completed successfully.
VSS_S_ASYNC_PENDING
The asynchronous operation is still running.
 

Additional return values can be returned, but depend on the return codes of the method that initially returned the IVssAsync object.

pReserved

The value of this parameter should be NULL.

Return Value

The following are the valid return codes for this method.

Value Meaning
S_OK
The query operation was successful.
E_ACCESSDENIED
The query operation failed because the user did not have the correct privileges.
E_INVALIDARG
The pointer to the variable used to hold the pHrResult return value is NULL or is not a valid memory location.
VSS_E_UNEXPECTED
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.

Remarks

In the event of an error during the course of an asynchronous operation, QueryStatus will return the same error code as the method that initially returned the IVssAsync object.

To obtain a complete list of return values for an IVssAsync::QueryStatus object returned by a specific method, see the error codes documented for that method.

Requirements

   
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

IVssAsync

IVssBackupComponents::DoSnapshotSet

IVssBackupComponents::GatherWriterMetadata

IVssBackupComponents::GatherWriterStatus

IVssBackupComponents::ImportSnapshots

IVssBackupComponents::PostRestore

IVssBackupComponents::PreRestore

IVssBackupComponents::PrepareForBackup