com4:TreatAsClass

对应于使用 treatAs 子项 (com4:TreatAsClass) 的 CLSID 注册的注册。

元素层次结构

<包>

    <应用程序>

         <应用程序>

              <扩展>

                   <com4:TreatAsClass>

语法

<com4:TreatAsClass
    TreatAs = 'A GUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.'
    AutoConvertTo = 'A GUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.'
    Id = 'A GUID in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.'
    DisplayName = 'A string with a value between 1 and 256 characters in length. This string is localizable.'
>

特性和元素

属性

属性 说明 数据类型 必须 默认值
TreatAs 指定可以模拟当前类的类的 CLSID。 格式为 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 的 GUID。
AutoConvertTo 指定给定对象类到新对象类的自动转换。 格式为 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 的 GUID。
Id 对应于 COM 类对象的 CLSID。 格式为 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 的 GUID。
DisplayName 一个可选字符串,表示 CLSID 键的默认值。 长度介于 1 到 256 个字符之间的字符串。 此字符串可本地化。

子元素

无。

父元素

父元素 说明
扩展 定义应用的一个或多个扩展点。

要求

Namespace http://schemas.microsoft.com/appx/manifest/com/windows10/4
Minimum OS Version Windows 10 (内部版本 20348)