GetTypeSize Method

Definition

Returns the size that is needed in order to pass an argument of the given type.

Delphi
function GetTypeSize(typeInfo: PTypeInfo): Integer

Parameters

typeInfo
PTypeInfo

Returns

Integer

Remarks

While in most cases the result is equal to the actual type size for short strings it always returns SizeOf(Pointer) as short strings are always passed as pointer.