Name

FindClassHInstance Function

Syntax

function FindClassHInstance(ClassRef: TClass): LongInt;

Description

FindClassHInstance returns the instance handle of the module that contains the given class. The module might be the application or it might be a runtime package that the application loads. If you pass an invalid class reference, FindClassHInstance returns zero.

A class reference points to the class’s VMT, which resides in the module’s code segment, so FindClassHInstance calls FindHInstance. Feel free to call FindHInstance or FindClassHInstance, whichever is more convenient.

FindClassHInstance is a real function.

See Also

FindHInstance Function, HInstance Variable, MainInstance Variable

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.