Share via


oleautomation

Indicates that an interface is compatible with Automation.

Allowed on

Interface.

Flags

TYPEFLAG\_FOLEAUTOMATION

Remarks

Not allowed on dispinterfaces.

The parameters and return types specified for its members must be compatible with Automation, as listed in the following table:

Type Description
boolean Data item that can have the value VARIANT_TRUE or VARIANT_FALSE. The size corresponds to VARIANT_BOOL.
unsigned char 8-bit unsigned data item.
double 64-bit IEEE floating-point number.
float 32-bit IEEE floating-point number.
int Signed integer, whose size is system dependent.
long 32-bit signed integer.
short 16-bit signed integer.
BSTR Length-prefixed string, as described in Dispatch Interface and API Functions.
CURRENCY 8-byte, fixed-point number.
DATE 64-bit, floating-point fractional number of days since December 30, 1899.
SCODE For 16-bit systems - Built-in error type that corresponds to VT_ERROR.
typedef enummyenum Signed integer, whose size is system dependent.
IDispatch * Pointer to theIDispatch interface (VT_DISPATCH).
IUnknown * Pointer to an interface that does not derive from IDispatch (VT_UNKNOWN). (Any OLE interface can be represented by its IUnknowninterface.)
dispinterface Typename * Pointer to an interface derived fromIDispatch(VT_DISPATCH).
coclass Typename * Pointer to a coclass name (VT_UNKNOWN).
[oleautomation] interface Typename * Pointer to an interface that derives from IUnknown.
SAFEARRAY(TypeName) TypeName is any of the above types. Array of these types.
TypeName* TypeName is any of the above types. Pointer to a type.
Decimal 96-bit unsigned binary integer scaled by a variable power of 10. A decimal data type that provides a size and scale for a number (as in coordinates).

 

A parameter is compatible with Automation if its type is compatible with an Automation type, a pointer to an Automation type, or a SAFEARRAY of an Automation type.

A return type is compatible with Automation if its type is an HRESULT or is void. Methods in Automation must return either HRESULT or void.

A member is compatible with Automation if its return type and all of its parameters are compatible with Automation.

An interface is compatible with Automation if it derives from IDispatch or IUnknown, if it has the oleautomation attribute, and if all of its VTBL entries are compatible with Automation. For 32-bit systems, the calling convention for all methods in the interface must be STDCALL. For 16-bit systems, all methods must have the CDECL calling convention. Every dispinterface is compatible with Automation.

Attribute Descriptions