com3:Class (ServiceServer 内)

com3:ServiceServer 要素に登録されている Windows サービスでホストされる COM サーバーでのクラス登録を定義します。

要素の階層

<パッケージ>

    <アプリケーション>

         <Application>

              <拡張機能>

                   <com2:Extension>

                        com2:ComServer

                             com3:ServiceServer

                                  <com3:Class>

構文

<com3:Class
    Id = 'A GUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.'
    DisplayName = 'An optional string with a value between 1 and 256 characters in length.'
    EnableOleDefaultHandler = 'An optional boolean value.'
    ProgId = 'An optional alphanumeric string separated by a period with a value between 1 and 255 characters in length (e.g. Foo.Bar or Foo.Bar.1).'
    VersionIndependentProgId = 'An optional alphanumeric string separated by a period with a value between 1 and 255 characters in length (e.g. Foo.Bar or Foo.Bar.1).'
    AutoConvertTo = 'An optional GUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.'
    InsertableObject = 'An optional boolean value.'
    ShortDisplayName = 'An optional string with a value between 1 and 40 characters in length.' >

  <!-- Child elements -->
  ImplementedCategories?,
  Conversion?,
  DataFormats?,
  MiscStatus?,
  Verbs?,
  DefaultIcon?,
  ToolboxBitmap32? 
  
</com3:Class>

キー

? 省略可能 (0 または 1)

属性と要素

属性

属性 説明 データ型 必須 既定値
Id Id 属性は CLSID (HKCR\CLSID{MyGuid}) に対応します。 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 形式の GUID。 Yes
DisplayName CLSID のキーの既定値に対応するローカライズ可能な文字列。 1 ~ 256 文字の長さの値を持つ省略可能な文字列。 いいえ
EnableOleDefaultHandler InprocHandler32 キーの既定値が "Ole32.dll" の場合、これは true に設定する必要があります。 それ以外の場合は省略する必要があります。 既定値は false です。 省略可能なブール値。 いいえ
ProgId プログラム識別子 (ProgID) を CLSID に関連付けます。 1 ~ 255 文字の長さの値を持つピリオドで区切られた省略可能な英数字文字列 (Foo.Bar や Foo.Bar.1 など)。 いいえ
VersionIndependentProgId ProgID を CLSID に関連付けます。 この値は、オブジェクト アプリケーションの最新バージョンを決定するために使用されます。 1 ~ 255 文字の長さの値を持つピリオドで区切られた省略可能な英数字文字列 (Foo.Bar や Foo.Bar.1 など)。 いいえ
AutoConvertTo オブジェクトの特定のクラスからオブジェクトの新しいクラスへの自動変換を指定します。 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 形式の省略可能な GUID。 いいえ
InsertableObject このクラスが挿入可能であることを示します。 省略可能なブール値。 いいえ
ShortDisplayName クラスの表示名の短いバージョン。 1 ~ 40 文字の長さの値を持つ省略可能な文字列。 いいえ

子要素

子要素 説明
ImplementedCategories クラスによって実装されるカテゴリを指定します。
変換 クラスの読み取り/書き込みアクセス許可を指定します。
DataFormats サポートされる既定のデータ形式とメインデータ形式を指定します。
MiscStatus オブジェクトを作成して表示する方法を指定します。
動詞 アプリケーションに登録する動詞を指定します。
DefaultIcon オブジェクトの象徴的なプレゼンテーションの既定のアイコン情報を提供します。
ToolboxBitmap32 ツール バーまたはツールボックス ボタンの顔に使用する 16 x 16 ビットマップのモジュール名とリソース ID を識別します。

親要素

親要素 説明
com3:ServiceServer 対応する desktop6:Service 要素で宣言されている Windows サービスでホストされている COM サーバー (1 つ以上のクラス登録を使用) を登録します。

<?xml version="1.0" encoding="utf-8"?>
<Package IgnorableNamespaces="uap com com2 com3 desktop6"
         xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
         xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
         xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
         xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10"
         xmlns:com2="http://schemas.microsoft.com/appx/manifest/com/windows10/2"
         xmlns:com3="http://schemas.microsoft.com/appx/manifest/com/windows10/3">
...
    <Applications>
        <Application ...>
            <Extensions>
                <desktop6:Extension Category="windows.service" Executable="ContosoPackagedService.exe" EntryPoint="packagedServiceComServer.service">
                    <desktop6:Service Name="examplePackagedServiceComServer" StartupType="manual" StartAccount="localService" /> 
                </desktop6:Extension>
                <com2:Extension Category="windows.comServer">
                    <com2:ComServer>
                        <com3:ServiceServer ServiceName="examplePackagedServiceComServer" DisplayName="ServicePackage public service server" 
                            LaunchAndActivationPermission="O:SYG:SYD:(A;;11;;;WD)(A;;11;;;RC)(A;;11;;;AC)(A;;11;;;AN)S:P(ML;;NX;;;S-1-16-0)">
                            <com3:Class Id="1BB09D24-6A0F-4C1F-BCB5-FB924324B2F5" DisplayName="CLSID_ContosoPublicServiceNoHandler"/>
                        </com3:ServiceServer>
                        <com3:TreatAsClass Id="2DAA3C97-F340-4C0E-B23C-92338974C5E9" DisplayName="CLSID_ContosoPublicServiceTreatAs" 
                            TreatAs="1BB09D24-6A0F-4C1F-BCB5-FB924324B2F5"/>
                        <com3:ProgId Id="ContosoPublicServiceNoHandler" Clsid="1BB09D24-6A0F-4C1F-BCB5-FB924324B2F5"/>
                        <com3:ProgId Id="ContosoPublicServiceNoHandler.1" CurrentVersion="ContosoPublicServiceNoHandler"/>
                    </com2:ComServer>
                </com2:Extension>
            </Extensions>
        </Application>
    </Applications>
</Package>

必要条件

Item
Namespace http://schemas.microsoft.com/appx/manifest/com/windows10/3
Minimum OS Version Windows 10 バージョン 2004 (ビルド 19041)