ProtectionPolicyManager.RequestAccessToFilesForProcessAsync 方法

定義

多載

RequestAccessToFilesForProcessAsync(IIterable<IStorageItem>, UInt32, ProtectionPolicyAuditInfo)

注意

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

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

針對應用程式的程式要求存取受企業保護的內容。

RequestAccessToFilesForProcessAsync(IIterable<IStorageItem>, UInt32, ProtectionPolicyAuditInfo, String, ProtectionPolicyRequestAccessBehavior)

注意

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

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

針對應用程式的程式要求存取受企業保護的內容。

RequestAccessToFilesForProcessAsync(IIterable<IStorageItem>, UInt32, ProtectionPolicyAuditInfo)

注意

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

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

針對應用程式的程式要求存取受企業保護的內容。

public:
 static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessToFilesForProcessAsync(IIterable<IStorageItem ^> ^ sourceItemList, unsigned int processId, ProtectionPolicyAuditInfo ^ auditInfo);
/// [Windows.Foundation.Metadata.Overload("RequestAccessToFilesForProcessAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IIterable<IStorageItem> const& sourceItemList, uint32_t const& processId, ProtectionPolicyAuditInfo const& auditInfo);
[Windows.Foundation.Metadata.Overload("RequestAccessToFilesForProcessAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IEnumerable<IStorageItem> sourceItemList, uint processId, ProtectionPolicyAuditInfo auditInfo);
function requestAccessToFilesForProcessAsync(sourceItemList, processId, auditInfo)
Public Shared Function RequestAccessToFilesForProcessAsync (sourceItemList As IEnumerable(Of IStorageItem), processId As UInteger, auditInfo As ProtectionPolicyAuditInfo) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)

參數

sourceItemList

IIterable<IStorageItem>

IEnumerable<IStorageItem>

您想要授與存取權的檔案陣列。

processId
UInt32

unsigned int

uint32_t

您想要授與許可權之進程的進程識別碼。

auditInfo
ProtectionPolicyAuditInfo

稽核資訊物件; ProtectionPolicyAuditInfo的實例。

傳回

ProtectionPolicyEvaluationResult列舉的值,這是查詢的結果。

屬性

Windows 需求

裝置系列
Windows Desktop Extension SDK (已於 10.0.15063.0 引進)
Windows Mobile Extension SDK (已於 10.0.15063.0 引進)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (已於 v4.0 引進)

適用於

RequestAccessToFilesForProcessAsync(IIterable<IStorageItem>, UInt32, ProtectionPolicyAuditInfo, String, ProtectionPolicyRequestAccessBehavior)

注意

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

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

針對應用程式的程式要求存取受企業保護的內容。

public:
 static IAsyncOperation<ProtectionPolicyEvaluationResult> ^ RequestAccessToFilesForProcessAsync(IIterable<IStorageItem ^> ^ sourceItemList, unsigned int processId, ProtectionPolicyAuditInfo ^ auditInfo, Platform::String ^ messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
/// [Windows.Foundation.Metadata.Overload("RequestAccessToFilesForProcessWithMessageAndBehaviorAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IIterable<IStorageItem> const& sourceItemList, uint32_t const& processId, ProtectionPolicyAuditInfo const& auditInfo, winrt::hstring const& messageFromApp, ProtectionPolicyRequestAccessBehavior const& behavior);
[Windows.Foundation.Metadata.Overload("RequestAccessToFilesForProcessWithMessageAndBehaviorAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<ProtectionPolicyEvaluationResult> RequestAccessToFilesForProcessAsync(IEnumerable<IStorageItem> sourceItemList, uint processId, ProtectionPolicyAuditInfo auditInfo, string messageFromApp, ProtectionPolicyRequestAccessBehavior behavior);
function requestAccessToFilesForProcessAsync(sourceItemList, processId, auditInfo, messageFromApp, behavior)
Public Shared Function RequestAccessToFilesForProcessAsync (sourceItemList As IEnumerable(Of IStorageItem), processId As UInteger, auditInfo As ProtectionPolicyAuditInfo, messageFromApp As String, behavior As ProtectionPolicyRequestAccessBehavior) As IAsyncOperation(Of ProtectionPolicyEvaluationResult)

參數

sourceItemList

IIterable<IStorageItem>

IEnumerable<IStorageItem>

您想要授與存取權的檔案陣列。

processId
UInt32

unsigned int

uint32_t

您想要授與許可權之進程的進程識別碼。

auditInfo
ProtectionPolicyAuditInfo

稽核資訊物件; ProtectionPolicyAuditInfo的實例。

messageFromApp
String

Platform::String

winrt::hstring

會顯示在同意對話方塊中的訊息,讓使用者可以做出同意決策。

behavior
ProtectionPolicyRequestAccessBehavior

常數,定義您要如何覆寫預設原則行為。

傳回

ProtectionPolicyEvaluationResult列舉的值,這是查詢的結果。

屬性

Windows 需求

裝置系列
Windows Desktop Extension SDK (已於 10.0.15063.0 引進)
Windows Mobile Extension SDK (已於 10.0.15063.0 引進)
API contract
Windows.Security.EnterpriseData.EnterpriseDataContract (已於 v4.0 引進)

備註

使用這個方法,暫時將受保護檔案的存取權授與只能存取未受保護的檔案的進程。

適用於