decode attribute
The [decode] ACF attribute specifies that a procedure or a type needs de-serialization support.
[
decode
[ , interface-attribute-list]
]
interface interface-name
{
interface-definition
}
[ decode [ , op-attribute-list] ] proc-name(...);
typedef [decode [ , type-attribute-list] ] type-name;
Parameters
-
interface-attribute-list
-
Specifies other attributes that apply to the interface as a whole.
-
interface-name
-
Specifies the name of the interface.
-
interface-definition
-
Specifies IDL statements which form the definition of the interface.
-
op-attribute-list
-
Specifies other operational attributes that apply to the procedure such as [encode].
-
proc-name
-
Specifies the name of the procedure.
-
type-attribute-list
-
type-name
-
Specifies a type defined in the IDL file.
Remarks
The [decode] attribute causes the MIDL compiler to generate code that an application can use to retrieve serialized data from a buffer. The [encode] attribute provides serialization support, generating the code to serialize data into a buffer.
Use the [encode] and [decode] attributes in an ACF to generate serialization code for procedures or types defined in the IDL file of an interface. When used as an interface attribute, [decode] applies to all types and procedures defined in the IDL file. When used as a type attribute, [decode] applies only to the specified type. When used as an operational attribute, [decode] applies only to that procedure.
For more information about using this serialization support, see Serialization Services and [encode].
See also