ActivationRegistrationManager.RegisterForProtocolActivation メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した URI スキームが ShellExecute、 Launcher.LaunchUriAsync、またはコマンド ラインを使用して実行されるときに、アプリをアクティブ化するために登録します。
public:
static void RegisterForProtocolActivation(Platform::String ^ scheme, Platform::String ^ logo, Platform::String ^ displayName, Platform::String ^ exePath);
/// [Windows.Foundation.Metadata.Experimental]
static void RegisterForProtocolActivation(winrt::hstring const& scheme, winrt::hstring const& logo, winrt::hstring const& displayName, winrt::hstring const& exePath);
static void RegisterForProtocolActivation(winrt::hstring const& scheme, winrt::hstring const& logo, winrt::hstring const& displayName, winrt::hstring const& exePath);
[Windows.Foundation.Metadata.Experimental]
public static void RegisterForProtocolActivation(string scheme, string logo, string displayName, string exePath);
public static void RegisterForProtocolActivation(string scheme, string logo, string displayName, string exePath);
function registerForProtocolActivation(scheme, logo, displayName, exePath)
Public Shared Sub RegisterForProtocolActivation (scheme As String, logo As String, displayName As String, exePath As String)
パラメーター
- scheme
-
String
Platform::String
winrt::hstring
アクティブ化に登録する URI スキーム ( httpsなど)。
- logo
-
String
Platform::String
winrt::hstring
URI スキームにWindowsによって使用されるイメージまたはリソースへのパス。 パッケージ アプリの場合、このパラメーターはイメージ ファイルへのパッケージ相対パスです。 パッケージ化されていない場合、このパラメーターはバイナリ ファイル (DLL、EXE) とリソース インデックスへのリテラル ファイルパスです。
- displayName
-
String
Platform::String
winrt::hstring
URI スキームのWindowsで使用されるこの表示名。
- exePath
-
String
Platform::String
winrt::hstring
アクティブ化する実行可能ファイルへのパス。 空の文字列を渡すと、現在の exectuable が既定でアクティブになります。 通常、このパラメーターは、このメソッドの呼び出し元がアプリ自体ではなくアプリのインストーラーである場合に指定されます。
- 属性
注釈
パッケージ アプリでは、appx マニフェストを引き続き使用して、ファイルの種類、プロトコル、またはスタートアップのアクティブ化に登録する必要があります。 その後、Microsoft.Windowsのいずれかを使用できます。AppLifecycle.AppInstance.GetActivatedEventArgs または Windows。ApplicationModel.AppInstance.GetActivatedEventArgs を使用して、アクティブ化時に引数を取得します。