ms_union attribute

The keyword [ms_union] is used to control the NDR alignment of nonencapsulated unions.

[
    ms_union,
    ...
]
interface interface-name 
{
    ...
}

[ms_union] procedure-type procedure-name(param-list);

Parameters

interface-name

Specifies the name of the interface.

procedure-type

Specifies the return type of the procedure to which the attribute is being applied.

procedure-name

Specifies the name of the procedure.

param-list

Specifies the procedure's parameter list, which may be empty.

Remarks

Never use this switch or attribute with new interfaces. This is a backward compatibility feature only.The MIDL compiler in this version of Microsoft RPC mirrors the behavior of the OSF DCE IDL compiler for nonencapsulated unions. However, because earlier versions of the MIDL compiler did not do so, the /ms_union switch provides compatibility with interfaces built on previous versions of the MIDL compiler.

The ms_union feature can be used as an IDL interface attribute, an IDL type attribute, or as a command-line switch ( /ms_union).

Examples

[ms_union] long procedure (...);

See also

Interface Definition (IDL) File

/ms_union