RAD Studio
ContentsIndex
PreviousUpNext
__automated

Category 

Keyword extensions 

Syntax  

_automated: <declarations>

Description 

The visibility rules for automated members are identical to those of public members. The only difference between automated and public members is that OLE automation information is generated for member functions and properties that are declared in an automated section. This OLE automation type information makes it possible to create OLE Automation servers.

  • For a member function, the types of all member function parameters and the function result (if any) must be automatable. Likewise, for a property, the property type and the types of any array property parameters must be automatable. The automatable types are: Currency, OleVariant, DelphiInterface, double, int, float, short, String, TDateTime, Variant, and unsigned short. Declaring member functions or properties that use non-automatable types in an __automated section results in a compile-time error.
  • Member function declarations must use the __fastcall calling convention.
  • Member functions can be virtual.
  • Member functions may add __dispid(constant int expression) after the closing parenthesis of the parameter list.
  • Property declarations can only include access specifiers (__dispid, read, and write). No other specifiers (index, stored, default, nodefault) are allowed.
  • Property access specifiers must list a member function identifier. Data member identifiers are not allowed.
  • Property access member functions must use the __fastcall calling convention.
  • Property overrides (property declarations that don’t include the property type) are not allowed.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!