in

[ [function-attribute-list] ] type-specifier [pointer-declarator] function-name(
        [ in [ , parameter-attribute-list ] ] type-specifier [declarator]
        , ...
    );

function-attribute-list

Specifies zero or more attributes that apply to the function. Valid function attributes are callback, local, the pointer attribute ref, unique, or ptr, and the usage attributes string, ignore, and context_handle.

type-specifier

Specifies a base_type, struct, union, or enum type or type identifier. An optional storage specification can precede type-specifier.

pointer-declarator

Specifies zero or more pointer declarators. A pointer declarator is the same as the pointer declarator used in C; it is constructed from the * designator, modifiers such as far, and the qualifier const.

function-name

Specifies the name of the remote procedure.

parameter-attribute-list

Specifies zero or more attributes appropriate for the specified parameter type. Parameter attributes with the in attribute can also take the directional attribute out; the field attributes first_is, last_is, length_is, max_is, size_is and switch_type; the pointer attribute ref, unique, or ptr; and the usage attributes context_handle and string. The usage attribute ignore cannot be used as a parameter attribute. Separate multiple attributes with commas.

declarator

Specifies standard C declarators, such as identifiers, pointer declarators, and array declarators. For more information, see pointersH20NZW and arrays1EV5ZM5. The parameter declarator in the function declarator, such as the parameter name, is optional.

 

Example

void MyFunction([in] short count);

 

Remarks

The in attribute indicates that a parameter is to be passed from the calling procedure to the called procedure.

A related attribute, out, indicates that a parameter is to be returned from the called procedure to the calling procedure. The in and out attributes are known as directional parameter attributes because they specify the direction in which parameters are passed. A parameter can be defined as in, out, or in, out.

The in attribute identifies parameters that are marshalled by the client stub for transmission to the server.

The in attribute is applied to a parameter by default when no directional parameter attribute is specified.

See Also

IDL, midl_user_allocate, out