From RAD Studio
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index


Keyword Extensions


_automated: <declarations>


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 do not include the property type) are not allowed.


class Test : public System::TObject
  int __fastcall getI(void) __dispid(4);
  __property int I = {read=getI, dispid=3};

See Also