IBackgroundCopyError 介面 (bits.h)

使用
IBackgroundCopyError 介面可判斷錯誤的原因,以及傳輸程式是否可以繼續。

BITS 只有在作業的狀態BG_JOB_STATE_ERROR或BG_JOB_STATE_TRANSIENT_ERROR時,才會建立錯誤物件。 當 IBackgroundCopyXXXX介面方法失敗時,BITS 不會建立錯誤物件。 錯誤物件可在 BITS 開始傳輸資料之前, (作業的狀態變更為作業的BG_JOB_STATE_TRANSFERRING) ,或直到您的應用程式結束為止。

若要取得 IBackgroundCopyError 物件,請呼叫 IBackgroundCopyJob::GetError 方法。

繼承

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

方法

IBackgroundCopyError介面具有這些方法。

 
IBackgroundCopyError::GetError

擷取錯誤碼,並識別發生錯誤的內容。
IBackgroundCopyError::GetErrorCoNtextDescription

擷取發生錯誤之內容的描述。
IBackgroundCopyError::GetErrorDescription

擷取與錯誤相關聯的錯誤文字。
IBackgroundCopyError::GetFile

擷取與錯誤相關聯之檔案物件的介面指標。
IBackgroundCopyError::GetProtocol

擷取用來傳輸檔案的通訊協定。 遠端檔案名會識別用來傳輸檔案的通訊協定。

規格需求

   
最低支援的用戶端 Windows XP
最低支援的伺服器 Windows Server 2003
目標平台 Windows
標頭 bits.h

另請參閱

BG_JOB_STATE

IBackgroundCopyCallback::JobError

IBackgroundCopyJob::GetError

IBackgroundCopyJob::GetState

IBackgroundCopyManager::GetErrorDescription