RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.FindClassHInstance Function

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

Pascal
function FindClassHInstance(ClassType: TClass): LongWord;
C++
LongWord FindClassHInstance(TClass ClassType);

System

FindClassHInstance finds the HInstance of the executable or library that "owns", or contains, the runtime 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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!