StructDefinitionType Complex Type

Defines a structure that includes one or more data items that you want to include with the event.

<xs:complexType name="StructDefinitionType"
    mixed="true"
>
    <xs:sequence>
        <xs:element name="data"
            type="DataDefinitionType"
            maxOccurs="unbounded"
         />
    </xs:sequence>
    <xs:attribute name="name"
        type="string"
        use="required"
     />
    <xs:attribute name="length"
        type="LengthType"
        use="optional"
     />
    <xs:attribute name="count"
        type="CountType"
        use="optional"
     />
    <xs:anyAttribute
        processContents="lax"
        namespace="##other"
     />
</xs:complexType>

Child elements

ElementTypeDescription
data DataDefinitionType

Defines a data item that you want to include in the structure.

Attributes

NameTypeDescription
count CountType

The number of elements in an array of structures. This attribute indicates that the structure is defining an array of structures. You can specify the actual count or the name of a data item outside of the structure that contains the count.

length LengthType

Not available.

Windows Server 2008 and Windows Vista:  The length of this structure, in bytes. Not available starting with Windows 7.

namestring

The name to the structure. You can use the name to reference the data item in your XML fragment if you specify a UserData section in your template.

Windows Vista:  This attribute is optional.

Remarks

Providers write the structure as a blob and not as individual members of the structure. If the C structure that you are writing contains pointers (for example, a pointer of type LPWSTR), the event data will contain the pointer value, not the dereferenced data.

You should not use structures but instead should define data items for each member and write them separately. If you decide to use structure, the structure should contain only integral types and you must ensure that the members of the structure align to an 8-byte boundary. If you do not, you will likely receive alignment errors when you try to access the data. Consider using the #pragma pack() directive to force alignment on an 8-byte boundary.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

 

 

Show: