System.FindClassHInstance

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FindClassHInstance(ClassType: TClass): HINST;

C++

extern DELPHI_PACKAGE System::NativeUInt __fastcall FindClassHInstance(TClass ClassType);

Properties

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

Description

Returns the instance handle for the module in which a class type is defined.

FindClassHInstance finds the HInstance of the executable or library that owns, or contains, the run-time type information (RTTI) and the Virtual Method Table (VMT) for the specified class passed in as the Class Type parameter. When reading a component (which is a type), this information is needed in order to be able to load the form file (resources) associated with that component. The component streaming system uses FindClassHInstance for this purpose.

FindClassHInstance returns 0 if the instance is not found. Otherwise it returns the class owner's HInstance.

See Also