JCL Help:JclHookIs

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Hooks the is/as class operators.


Parameters

Parameters Description
IsProc Function to use as the is operator.


Return Value

If the hook was successfully set True will be returned, False otherwise.


Description

JclHookIs hooks the is and as class operators. The as operator will be hooked to a function that uses the is operator to check the valid cast. If it's valid the object is simply returned, otherwise the normal exception will be raised ('Invalid cast'). The is operator is hooked to the specified function. JclRTTI provides two functions: JclIsClass and JclIsClassByName. The first is an exact copy of the function found in the system unit, and checks the class based on RTTI (or rather VMT) pointers. The second checks the class based on it's name.


About

Donator

Marcel Bestebroer


Notes

This procedure changes the executable code (with the risk of completly destroying your application).


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page