FullTrustProcessLauncher 類別

定義

從相同應用程式套件中的通用 Windows 應用程式元件啟動應用程式的完整信任 Win32 元件。

public ref class FullTrustProcessLauncher abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.FullTrustAppContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class FullTrustProcessLauncher final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.FullTrustAppContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class FullTrustProcessLauncher
Public Class FullTrustProcessLauncher
繼承
Object Platform::Object IInspectable FullTrustProcessLauncher
屬性

Windows 需求

裝置系列
Windows Desktop Extension SDK (已於 10.0.14393.0 引進)
API contract
Windows.ApplicationModel.FullTrustAppContract (已於 v1.0 引進)
應用程式功能
runFullTrust

備註

這個類別中的方法只能由具有 runFullTrust 功能的套件呼叫。 請參閱應用程式功能宣告

若要使用此類別,建議您將 Windows 應用程式封裝專案 新增至解決方案, (深入瞭解) 。 然後,在該專案的套件資訊清單中,新增 windows.fullTrustProcess 延伸模組。

以下為範例。

<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
         xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
         xmlns:rescap=
"http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
         xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10">
  ...
  <Capabilities>
    <rescap:Capability Name="runFullTrust"/>
  </Capabilities>
  <Applications>
    …
    <Application>
      …
      <Extensions>
        <desktop:Extension Category="windows.fullTrustProcess" Executable="fulltrustprocess.exe">
          <desktop:FullTrustProcess>
            <desktop:ParameterGroup GroupId="SyncGroup" Parameters="/Sync"/>
            <desktop:ParameterGroup GroupId="OtherGroup" Parameters="/Other"/>
          </desktop:FullTrustProcess>
        </desktop:Extension>
      </Extensions>
    </Application>
  </Applications>
</Package>

方法

LaunchFullTrustProcessForAppAsync(String)

啟動指定之應用程式識別碼的完整信任程式。

LaunchFullTrustProcessForAppAsync(String, String)

使用參數啟動指定之應用程式識別碼的完整信任程式。

LaunchFullTrustProcessForAppWithArgumentsAsync(String, String)

使用指定的命令列參數,啟動指定之應用程式識別碼的完整信任程式。

LaunchFullTrustProcessForCurrentAppAsync()

啟動目前應用程式識別碼的完整信任程式。

LaunchFullTrustProcessForCurrentAppAsync(String)

使用參數啟動目前應用程式識別碼的完整信任程式。

LaunchFullTrustProcessForCurrentAppWithArgumentsAsync(String)

使用指定的命令列參數啟動完全信任程式。

適用於