typedef attribute

The IDL typedef keyword allows typedef declarations that are very similar to C-language typedef declarations.

/* IDL file typedef syntax */
typedef [[ [ idl-type-attribute-list ] ]] type-specifier declarator-list;

/* ACF typedef syntax */
typedef [ acf-type-attribute-list ] typename;

Parameters

idl-type-attribute-list

Specifies one or more attributes that apply to the type. Valid type attributes in an IDL file include [handle], [switch_type], [transmit_as]; the pointer attribute [ref], [unique], or [ptr]; and the usage attributes [context_handle], [string], and [ignore]. Separate multiple attributes with commas.

type-specifier

Specifies a base type, struct, union, enum type, or type identifier. An optional storage specification can precede type-specifier. The const keyword can precede type-specifier.

declarator-list

Specifies standard MIDL declarators, such as identifiers, pointer declarators, and array declarators. For more information, see Array and Sized-Pointer Attributes, arrays, and Arrays and Pointers. The declarator-list consists of one or more declarators, separated by commas.

acf-type-attribute-list

Specifies one or more attributes that apply to the type. Valid type attributes in an ACF include [allocate], [encode], and [decode].

typename

Specifies a type defined in the IDL file.

Remarks

The IDL typedef declaration is augmented to allow you to associate type attributes with the defined types. Valid type attributes include [handle], [switch_type], [transmit_as]; the pointer attribute [ref], [unique], or [ptr]; and the usage attributes [context_handle], [string], and [ignore].

The typedef keyword in an ACF applies attributes to types that are defined in the corresponding IDL file. For example, the allocate type attribute allows you to customize memory allocation and deallocation by both the application and the stubs.

The ACF typedef statement appears as part of the ACF body. Note that the ACF typedef syntax is different from the IDL typedef syntax and the C-language typedef syntax. No new types can be introduced in the ACF.

See also

Application Configuration File (ACF)

allocate

arrays

const

context_handle

decode

encode

enum

handle

Interface Definition (IDL) File

ignore

ptr

ref

string

struct

switch_type

transmit_as

union

unique