Manage an opaque-type state

An opaque-type state uses an opaque data type to hold the aggregate state.

A possible use for an opaque-type state is to include an aggregate state that contains more information than the aggregate-argument data type or a built-in data type can hold. The size of an aggregate state that can be implemented as an opaque-type state is limited by the maximum size of an opaque type.
Important: The maximum size of an opaque type is system dependent. On many systems, this limit is 32 KB. Consult your machine notes for the limit on your system. If your aggregate state might contain more data than the opaque-type limit, you must use a pointer-valued state instead. For more information, see Using a pointer-valued state for a UDA.

To use an opaque-type state for a UDA, write the appropriate aggregate support functions so that they handle an opaque-type state.

Declare the state parameters and return values of the aggregate support functions to use the internal format of the opaque type. This internal format is usually a C struct structure. For more information, see Determine internal representation.