Delphi Language Guide Delphi for Microsoft Win32 Delphi for the Microsoft. Net framework



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə156/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   152   153   154   155   156   157   158   159   ...   294
DelphiLanguageGuide

Automated Members (Win32 Only)
Automated members have the same visibility as public members. The difference is that Automation type information
(required for Automation servers) is generated for automated members. Automated members typically appear only
in Win32 classes, and the automated reserved word has been deprecated in the .NET compiler. The automated
reserved word is maintained for backward compatibility. The TAutoObject class in the ComObj unit does not use
automated.
The following restrictions apply to methods and properties declared as automated.
136


The types of all properties, array property parameters, method parameters, and function results must be
automatable. The automatable types are Byte, Currency, Real, Double, Longint, Integer, Single, Smallint,
AnsiString, WideString, TDateTime, Variant, OleVariant, WordBool, and all interface types.
Method declarations must use the default register calling convention. They can be virtual, but not dynamic.
Property declarations can include access specifiers (read and write) but other specifiers (index, stored, default,
and nodefault) are not allowed. Access specifiers must list a method identifier that uses the default register
calling convention; field identifiers are not allowed.
Property declarations must specify a type. Property overrides are not allowed.
The declaration of an automated method or property can include a dispid directive. Specifying an already used ID
in a dispid directive causes an error.
On the Win32 platform, this directive must be followed by an integer constant that specifies an Automation dispatch
ID for the member. Otherwise, the compiler automatically assigns the member a dispatch ID that is one larger than
the largest dispatch ID used by any method or property in the class and its ancestors. For more information about
Automation (on Win32 only), see Automation objects.

Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   152   153   154   155   156   157   158   159   ...   294




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin