Share via


Constant Element (ProxyGen)

Represents a constant that is defined in a proxy type for a COM or managed type.

<Constant isExcluded = "true/false"
    originalName = "Name of original constant"
    newName = "Name of proxy constant">
  <Attribute>...</Attribute>
  <NullValue>...</NullValue>
  <Type>...</Type>
  <Value>...</Value>
</Constant>

Constant_Type

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

isExcluded

Optional xs:boolean attribute.

true to omit the constant from the proxy code; false to include the constant in the proxy code.

newName

Optional identifier_Type attribute.

The new name of the constant in the proxy code.

originalName

Required identifier_Type attribute.

The name of the original constant in the host application's object model.

Child Elements

Element

Description

Attribute

Optional Attribute_Type element.

Represents an attribute that is applied to the constant.

NullValue

Optional element.

Indicates that the constant is null. If you include a NullValue element, you cannot include a Value element.

Type

Required ArrayTypeReference_Type element.

Describes the type of the constant. The type can be an array.

Value

Optional xs:string element.

Specifies the value of the constant. If you include a Value element, you cannot include a NullValue element.

Parent Elements

Element

Description

Class Element for COMLibrary

Represents a proxy class for a COM class.

Class Element for ManagedLibrary

Represents a proxy class for a managed class.

Interface Element for COMLibrary

Represents a proxy interface for a COM interface.

Interface Element for ManagedLibrary

Represents a proxy interface for a managed interface.

Struct Element

Represents a proxy struct for a managed struct.

Element Information

Namespace

https://schemas.microsoft.com/vsta/2008/01/ProxyGenDescriptor

Schema name

ProxyGen Descriptor

Validation file

ProxyGenDescriptorv2.xsd

Can be empty

No

See Also

Concepts

ProxyGen Descriptor Schema Reference

Creating Proxies

Defining Entry Points and Other Proxy Changes