共用方式為


IsolatedWindowsEnvironment.ShareFileAsync 方法

定義

多載

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions)

已取代。 與隔離的 Windows 環境共用主機檔案。

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions, IsolatedWindowsEnvironmentTelemetryParameters)

已取代。 共用具有遙測相互關聯之隔離 Windows 環境的主機檔案。

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions)

已取代。 與隔離的 Windows 環境共用主機檔案。

public:
 virtual IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult ^> ^ ShareFileAsync(Platform::String ^ filePath, IsolatedWindowsEnvironmentShareFileRequestOptions ^ options) = ShareFileAsync;
/// [Windows.Foundation.Metadata.Overload("ShareFileAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(winrt::hstring const& filePath, IsolatedWindowsEnvironmentShareFileRequestOptions const& options);
/// [Windows.Foundation.Metadata.Overload("ShareFileAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironment is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(winrt::hstring const& filePath, IsolatedWindowsEnvironmentShareFileRequestOptions const& options);
[Windows.Foundation.Metadata.Overload("ShareFileAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(string filePath, IsolatedWindowsEnvironmentShareFileRequestOptions options);
[Windows.Foundation.Metadata.Overload("ShareFileAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironment is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
public IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(string filePath, IsolatedWindowsEnvironmentShareFileRequestOptions options);
function shareFileAsync(filePath, options)
Public Function ShareFileAsync (filePath As String, options As IsolatedWindowsEnvironmentShareFileRequestOptions) As IAsyncOperation(Of IsolatedWindowsEnvironmentShareFileResult)

參數

filePath
String

Platform::String

winrt::hstring

主機檔案路徑的字串。

傳回

IsolatedWindowsEnvironmentShareFileResult

屬性

Windows 需求

裝置系列
Windows 10, version 2104 (已於 10.0.20348.0 引進)
API contract
Windows.Security.Isolation.IsolatedWindowsEnvironmentContract (已於 v3.0 引進)

備註

警告

這是已被取代的 API。

共用檔案應該會出現在隔離 Windows 環境中隨機產生的檔案路徑的資料夾中,該檔案將在 IsolatedWindowsEnvironmentShareFileResult 中提供。 寫入此資料夾的任何資料都會複製到主機。 建議您在 IsolatedWindowsEnvironmentShareFileRequestOptions 中將 AllowWrite 旗標設定為 false,以防止這種情況。

適用於

ShareFileAsync(String, IsolatedWindowsEnvironmentShareFileRequestOptions, IsolatedWindowsEnvironmentTelemetryParameters)

已取代。 共用具有遙測相互關聯之隔離 Windows 環境的主機檔案。

public:
 virtual IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult ^> ^ ShareFileAsync(Platform::String ^ filePath, IsolatedWindowsEnvironmentShareFileRequestOptions ^ options, IsolatedWindowsEnvironmentTelemetryParameters ^ telemetryParameters) = ShareFileAsync;
/// [Windows.Foundation.Metadata.Overload("ShareFileWithTelemetryAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(winrt::hstring const& filePath, IsolatedWindowsEnvironmentShareFileRequestOptions const& options, IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters);
/// [Windows.Foundation.Metadata.Overload("ShareFileWithTelemetryAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironment is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(winrt::hstring const& filePath, IsolatedWindowsEnvironmentShareFileRequestOptions const& options, IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters);
[Windows.Foundation.Metadata.Overload("ShareFileWithTelemetryAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(string filePath, IsolatedWindowsEnvironmentShareFileRequestOptions options, IsolatedWindowsEnvironmentTelemetryParameters telemetryParameters);
[Windows.Foundation.Metadata.Overload("ShareFileWithTelemetryAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("IsolatedWindowsEnvironment is deprecated and might not work on all platforms. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 327680, "Windows.Security.Isolation.IsolatedWindowsEnvironmentContract")]
public IAsyncOperation<IsolatedWindowsEnvironmentShareFileResult> ShareFileAsync(string filePath, IsolatedWindowsEnvironmentShareFileRequestOptions options, IsolatedWindowsEnvironmentTelemetryParameters telemetryParameters);
function shareFileAsync(filePath, options, telemetryParameters)
Public Function ShareFileAsync (filePath As String, options As IsolatedWindowsEnvironmentShareFileRequestOptions, telemetryParameters As IsolatedWindowsEnvironmentTelemetryParameters) As IAsyncOperation(Of IsolatedWindowsEnvironmentShareFileResult)

參數

filePath
String

Platform::String

winrt::hstring

主機檔案路徑的字串。

傳回

IsolatedWindowsEnvironmentShareFileResult

屬性

Windows 需求

裝置系列
Windows 10, version 2104 (已於 10.0.20348.0 引進)
API contract
Windows.Security.Isolation.IsolatedWindowsEnvironmentContract (已於 v3.0 引進)

備註

警告

這是已被取代的 API。

共用檔案應該會出現在隔離 Windows 環境中隨機產生的檔案路徑的資料夾中,該檔案將在 IsolatedWindowsEnvironmentShareFileResult 中提供。 寫入此資料夾的任何資料都會複製到主機。 建議您在 isolatedwindowsenvironmentsharefilerequestoptions 中將 AllowWrite 旗標設定為 false,以防止這種情況。

適用於