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