FileProtectionManager.CopyProtectionAsync(IStorageItem, IStorageItem) 方法

定義

注意

從 2022 年 7 月開始,Microsoft 即將淘汰 Windows 資訊保護 (WIP) ,以及支援 WIP 的 API。 Microsoft 將繼續在支援的 Windows 版本上支援 WIP。 新版本的 Windows 不會包含 WIP 的新功能,且未來版本的 Windows 不支援此功能。 如需詳細資訊,請參閱宣佈 Windows 資訊保護的終止

針對資料保護需求,Microsoft 建議您使用Microsoft Purview 資訊保護Microsoft Purview 資料外洩防護。 Purview 簡化了組態設定,並提供一組進階的功能。

將一個檔案的檔案保護複寫到另一個檔案。

public:
 static IAsyncOperation<bool> ^ CopyProtectionAsync(IStorageItem ^ source, IStorageItem ^ target);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<bool> CopyProtectionAsync(IStorageItem const& source, IStorageItem const& target);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<bool> CopyProtectionAsync(IStorageItem source, IStorageItem target);
function copyProtectionAsync(source, target)
Public Shared Function CopyProtectionAsync (source As IStorageItem, target As IStorageItem) As IAsyncOperation(Of Boolean)

參數

source
IStorageItem

要從中複製檔案保護的來源檔案。

target
IStorageItem

要複製檔案保護的目標檔案。

傳回

當呼叫這個方法順利完成時,如果複製了檔案保護,則會傳回 true ;如果發生錯誤,則會傳回 false

屬性

Windows 需求

應用程式功能
enterpriseDataPolicy

適用於