code
[
code [ , ACF-interface-attributes
] ] interface interface-name
{
[ include filename-list ;
] ...
[ typedef [type-attribute-list]
typename; ] ...
[ [ code [ , ACF-function-attributes
] ] function-name (
[
ACF-parameter-attributes ] parameter-name ;
...
);
]
...
}
ACF-interface-attributes
Specifies a
list of one or more attributes that apply to the interface as a whole. Valid
attributes include either auto_handle or implicit_handle and
either code, nocode, or optimize. When two or more
interface attributes are present, they must be separated by commas.
interface-name
Specifies the
name of the interface. In DCE-compatibility mode, the interface name must match
the name of the interface specified in the IDL file. When you use the MIDL
compiler switch /acf, the interface name in the ACF and the interface
name in the IDL file can be different.
filename-list
Specifies a
list of one or more C-header filenames, separated by commas. You must supply
the full filename, including the extension.
type-attribute-list
Specifies a
list of one or more attributes, separated by commas, that apply to the
specified type. Valid type attributes include allocate and represent_as.
typename
Specifies a
type defined in the IDL file. Type attributes in the ACF can only be applied to
types previously defined in the IDL file.
ACF-function-attributes
Specifies
zero or more attributes that apply to the function as a whole, such as comm_status.
Function attributes are enclosed in square brackets. Separate multiple function
attributes with commas.
function-name
Specifies the
name of the function as defined in the IDL file.
ACF-parameter-attributes
Specifies ACF
attributes that apply to a parameter. Note that zero, one, or more attributes
can be applied to the parameter. Separate multiple parameter attributes with
commas. ACF parameter attributes are enclosed in square brackets.
parameter-name
Specifies a
parameter of the function as defined in the IDL file. Each parameter for the
function must be specified in the same sequence and using the same name as
defined in the IDL file.
Remarks
The code
attribute can appear in the ACF header or be applied to an individual function.
When the code
attribute appears in the ACF header, client stub code is generated for all
remote functions that do not have the nocode function attribute. You can
override the code attribute in the header for an individual function by
specifying the nocode attribute as a function attribute.
When the code
attribute appears in the remote function s attribute list, client stub code is
generated for the function. Client stub code is not generated when:
The ACF header includes the nocode
attribute.
The nocode attribute is
applied to the function.
The local attribute
applies to the function in the interface file.
Either code
or nocode can appear in the interface or function attribute list, but
the one you choose can appear only once in the list.
See Also