IVssComponent 類別 (vswriter.h)

IVssComponent 介面是 C++ (不是 COM) 介面,其中包含檢查和修改要求者備份元件檔中所含元件的相關信息的方法。

IVssBackupComponents ::AddComponent 方法在備份作業期間,只能針對已明確新增至備份元件檔的元件取得 IVssComponent 物件。

無法使用 IVssBackupComponents::AddRestoreSubcomponent 介面在還原作業期間明確新增的元件相關信息。

元件和可透過 IVssComponent 物件取得之隱含選取子元件的一些資訊包括下列各項:

  • 備份時間戳
  • 還原前/還原後失敗訊息
  • 還原元數據
  • 還原目標
IVssComponent 物件中的某些資訊是以個別檔案為基礎,而且可以參考由明確選取的元件或隱含選取的子元件所管理的檔案:
  • 替代位置對應
  • 部分檔案
  • 導向目標
其他資訊不包含在備份元件檔中,而且可以使用 IVssComponent 物件搭配適當的寫入器元數據檔,根據寫入器的元件階層來推斷, (請參閱 使用可選取性和邏輯路徑) 。

雖然只有寫入器才支援某些方法,但介面可由寫入器或要求者使用。 如此一來,寫入器就可以要求備份或還原作業中的變更,例如新增目標,或瞭解要求者動作,例如使用替代位置。

下列方法會傳回 IVssComponent 介面:

繼承

IVssComponent 介面繼承自 IUnknown 介面。 IVssComponent 也有下列類型的成員:

方法

IVssComponent 類別具有這些方法。

 
IVssComponent::AddDifferencedFilesByLastModifyLSN

不支援。 (IVssComponent.AddDifferencedFilesByLastModifyLSN)
IVssComponent::AddDifferencedFilesByLastModifyTime

由寫入器用來指出指定的檔案集 (指定的檔案或檔案) 應根據上次修改時間戳進行評估,以使用整個檔案納入時間戳累加式或差異備份。
IVssComponent::AddDirectedTarget

AddDirectedTarget 方法可讓寫入器在還原時指出何時要還原檔案,它會 (來源檔案) 應重新對應。
IVssComponent::AddPartialFile

AddPartialFile 方法表示只備份指定檔案的部分,以及那些部分。
IVssComponent::GetAdditionalRestores

在增量或差異還原作業期間,寫入器會使用 GetAdditionalRestores 方法,以判斷指定的元件是否需要額外的還原作業才能完全擷取它。
IVssComponent::GetAlternateLocationMapping

GetAlternateLocationMapping 可用來傳回檔案集的檔案還原替代位置。 這個方法可由寫入器或要求者呼叫。
IVssComponent::GetAlternateLocationMappingCount

GetAlternateLocationMappingCount 方法會傳回要求者在還原數據時所使用的替代位置對應數目。 寫入器或要求者可以呼叫這個方法。
IVssComponent::GetBackupMetadata

GetBackupMetadata 方法會擷取 CVssWriter::OnPrepareBackup 使用 IVssComponent::SetBackupMetadata 在 PrepareForBackup 事件期間設定的私人寫入器特定備份元數據。
IVssComponent::GetBackupOptions

GetBackupOptions 方法會傳回指定給寫入器的備份選項,該寫入器會使用 IVssBackupComponents::SetBackupOptions 來管理要求者所設定的目前選取元件或元件。
IVssComponent::GetBackupStamp

GetBackupStamp 方法會傳回由寫入器為指定元件儲存的備份戳記字串。
IVssComponent::GetBackupSucceeded

GetBackupSucceeded 方法會傳回完整嘗試備份所選元件或元件的所有檔案的狀態,做為VSS_FILE_RESTORE_STATUS列舉。
IVssComponent::GetComponentName

GetComponentName 方法會傳回此元件的邏輯名稱。
IVssComponent::GetComponentType

GetComponentType 方法會根據VSS_COMPONENT_TYPE列舉傳回此元件的類型。
IVssComponent::GetDifferencedFile

GetDifferencedFile 方法會傳回指定檔案集的相關信息, (指定的檔案或檔案) 參與增量或差異備份,或還原為差異檔案,也就是說,與檔案相關聯的備份和還原會實作,就像整個檔案複製到備份媒體或從備份媒體 (,而不是使用部分檔案) 。
IVssComponent::GetDifferencedFilesCount

傳回此元件 (的檔案規格數目,以及在元件集的任何子元件中,它會定義) 由支援增量備份或還原為差異檔案的寫入器所標記的) 。
IVssComponent::GetDirectedTarget

GetDirectedTarget 方法會在備份時,將寫入器儲存的資訊傳回至備份元件檔,以指出何時要還原檔案,它會 (來源檔案) 應重新對應。
IVssComponent::GetDirectedTargetCount

GetDirectedTargetCount 方法會傳回與目前元件相關聯的導向目標規格數目。 寫入器或要求者可以呼叫這個方法。
IVssComponent::GetFileRestoreStatus

GetFileRestoreStatus 方法會傳回已完成嘗試還原所選元件或元件的所有檔案的狀態,這些檔案會設定為VSS_FILE_RESTORE_STATUS列舉。
IVssComponent::GetLogicalPath

GetLogicalPath 方法會傳回此元件的邏輯路徑。
IVssComponent::GetNewTarget

GetNewTarget 方法會傳回所選元件或元件集的新檔案還原位置。
IVssComponent::GetNewTargetCount

GetNewTargetCount 方法會傳回與指定元件相關聯的新目標還原位置數目。
IVssComponent::GetPartialFile

GetPartialFile 方法會傳回與此元件相關聯之部分檔案的資訊。
IVssComponent::GetPartialFileCount

GetPartialFileCount 方法會傳回與元件相關聯的部分檔案數目。
IVssComponent::GetPostRestoreFailureMsg

如果 IVssComponent::SetPostRestoreFailureMsg 設定了一個,GetPostRestoreFailureMsg 方法會傳回寫入器在處理 PostRestore 事件時所產生的失敗訊息。
IVssComponent::GetPreRestoreFailureMsg

如果 IVssComponent::SetPreRestoreFailureMsg 設定了一個,GetPreRestoreFailureMsg 方法會在處理 PreRestore 事件時擷取寫入器所產生的錯誤訊息。
IVssComponent::GetPreviousBackupStamp

GetPreviousBackupStamp 方法會傳回備份元件檔中要求者載入的先前備份戳記。 決定檔案是否應該參與差異或增量備份作業時,寫入器會使用此值。
IVssComponent::GetRestoreMetadata

GetRestoreMetadata 方法會使用 IVssComponent::SetRestoreMetadata 擷取在 PreRestore 事件期間可能已設定的私人寫入器特定還原元數據。
IVssComponent::GetRestoreOptions

GetRestoreOptions 方法會使用 IVssBackupComponents::SetRestoreOptions,取得要求者指定給目前寫入器的還原選項。
IVssComponent::GetRestoreSubcomponent

GetRestoreSubcomponent 方法會傳回與指定元件相關聯的指定子元件。
IVssComponent::GetRestoreSubcomponentCount

GetRestoreSubcomponentCount 方法會傳回與元件相關聯的子元件數目。
IVssComponent::GetRestoreTarget

GetRestoreTarget 方法會根據目前元件的VSS_RESTORE_TARGET列舉) 傳回還原目標 (。
IVssComponent::IsSelectedForRestore

IsSelectedForRestore 方法會判斷是否已選取要還原的目前元件。
IVssComponent::SetBackupMetadata

SetBackupMetadata 方法會使用 元件設定備份元數據。
IVssComponent::SetBackupStamp

SetBackupStamp 方法會設定包含資訊的字串,指出備份發生的時間。
IVssComponent::SetPostRestoreFailureMsg

SetPostRestoreFailureMsg 方法可用來建立描述處理 PostRestore 事件失敗的訊息。
IVssComponent::SetPreRestoreFailureMsg

SetPreRestoreFailureMsg 方法可用來建立描述處理 PreRestore 事件失敗的訊息。
IVssComponent::SetRestoreMetadata

SetRestoreMetadata 方法會設定目前元件的寫入器特定元數據。
IVssComponent::SetRestoreTarget

SetRestoreTarget 方法會根據目前元件的VSS_RESTORE_TARGET列舉) 來設定還原目標 (。

規格需求

需求
最低支援的用戶端 Windows XP [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2003 [僅限傳統型應用程式]
目標平台 Windows
標頭 vswriter.h (包括 Vss.h、VsWriter.h)