I want to get the VMT entry for TExceptionNotificationDlg
which resides in dbkdebugidexxx.bpl.
The IDE loads this module shortly after startup.
I want to prevent the exception report dialog from displaying and substitute my own display instead.
The easy way is to intercept this window's ShowModal
function.
ShowModal is a virtual function and it is thus stored in the VMT.
By default the VMT of this class contains a link to CustomForm.ShowModal
, therefore simple hooking is out. I need to modify the VMT.
The IDE loads my code as a DLL on startup.
How do I get the address of the VMT if all I have is the name
and HModule
of the module (dbkdebugidexxx.bpl
) and the name of the Window class (TExceptionNotificationDlg
) ?
Note that this Form only gets created when an exception gets displayed and is destroyed right after, using the HWnd
to obtain info is out (I previously used the HWnd of a created form to access a form's published info https://compilerintrinsics.wordpress.com/, but I cannot do that here).