METHODINFO directive (Delphi)
Go Up to Delphi Compiler Directives (List) Index
Type |
Switch |
Syntax |
{$METHODINFO ON} or {$METHODINFO OFF} |
Default |
{$METHODINFO OFF} |
Scope |
Local |
The $METHODINFO switch directive is only effective when run-time type information (RTTI) has been turned on with the {$TYPEINFO ON} switch. In the {$TYPEINFO ON} state, the $METHODINFO directive controls the generation of more detailed method descriptors in the RTTI for methods in an interface. Though {$TYPEINFO ON} will cause some RTTI to be generated for published methods, the level of information is limited. The $METHODINFO directive generates much more detailed (and much larger) RTTI for methods, which describes how the parameters of the method should be passed on the stack and/or in registers.
There is seldom, if ever, any need for an application to directly use the $METHODINFO compiler switch. The method information adds considerable size to the executable file, and is not recommended for general use.
The Delphi compiler's Win32 web service support code uses method information descriptors to pass parameters received in a network packet to the target method. {$METHODINFO ON} is used only for web service interface types.