IVssBackupComponentsEx::GetWriterMetadataEx method (vsbackup.h)
The GetWriterMetadataEx method returns the metadata for a specific writer instance running on the system.
Syntax
HRESULT GetWriterMetadataEx(
[in] UINT iWriter,
[out] VSS_ID *pidInstance,
[out] IVssExamineWriterMetadataEx **ppMetadata
);
Parameters
[in] iWriter
Index of the writer whose metadata is to be retrieved. The value of this parameter is an integer from 0 to n–1 inclusive, where n is the total number of writers on the current system. The value of n is returned by the IVssBackupComponents::GetWriterMetadataCount method.
[out] pidInstance
Address of a caller-allocated variable that receives the instance identifier of the writer that collected the metadata.
[out] ppMetadata
Doubly indirect pointer to the instance of the IVssExamineWriterMetadataEx object that contains the returned metadata.
Return value
The following are the valid return codes for this method.
Value | Meaning |
---|---|
|
Successfully returned a pointer to an IVssExamineWriterMetadataEx interface object. |
|
One of the parameter values is not valid. |
|
The caller is out of memory or other system resources. |
|
The backup components object is not initialized, this method has been called during a restore operation, or this method has not been called within the correct sequence. |
|
The XML document is not valid. Check the event log for details. For more information, see Event and Error Handling Under VSS. |
|
The iWriter parameter does not point to a valid writer. |
|
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
GetWriterMetadataEx is identical to the IVssBackupComponents::GetWriterMetadata method, except that it returns an IVssExamineWriterMetadataEx interface pointer instead of an IVssExamineWriterMetadata interface pointer in the ppMetadata parameter.
A requester must call the asynchronous IVssBackupComponents::GatherWriterMetadata method and wait for it to complete prior to calling GetWriterMetadataEx.
Although the GatherWriterMetadata method must be called prior to either a restore or backup operation, GetWriterMetadataEx is not typically called for restores.
Component information retrieved (during backup operations) using the IVssExamineWriterMetadata::GetComponent method, where the IVssExamineWriterMetadataEx interface has been returned by GetWriterMetadataEx, comes from the Writer Metadata Document of a live writer process.
This is in contrast to the information returned by GetWriterComponents (during restore operations), which was stored in the Backup Components Document by calls to the IVssBackupComponents::AddComponent method.
When the caller of this method is finished accessing the metadata, it must call IUnknown::Release.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008, Windows Server 2003 with SP1 [desktop apps only] |
Target Platform | Windows |
Header | vsbackup.h (include VsBackup.h, Vss.h, VsWriter.h) |
Library | VssApi.lib |