System.Rtti.TRawVirtualClass.GetInstanceFromInterface

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function GetInstanceFromInterface(Intf: Pointer): TRawVirtualClass; static;

C++

static TRawVirtualClass* __fastcall GetInstanceFromInterface(void * Intf);

Properties

Type Visibility Source Unit Parent
function public
System.Rtti.pas
System.Rtti.hpp
System.Rtti TRawVirtualClass

Description

Returns the instance of TRawVirtualClass that implements the interface given through its GUID.

Given an interface that you know to come from a virtual class, the GetInstanceFromInterface method will return the instance of TRawVirtualClass that implements that specific interface. If you hand in an interface that is not from a virtual class, you will get back a reference to something, but the contents will be undefined.

See Also