I am trying to reverse engineer an old native application written in Borland Delphi in order to modify it for my needs:
The application interfaces with the special hardware and displays events that it receives in the TDBCtrlGrid
control, that acts as a long list. Using the Spy++ tool I was able to see that it has a child window TDBCtrlPanel
:
So both are placed in the actual application as such:
I need to add some custom functionality to this application and namely, to be able to track when a certain hardware-related event occurs. I am not the author of this application and the company who created it is long gone.
So my only solution seems to be trying to patch the executable with my own code trampoline. My goal is to trap instances when a new line is added to that TDBCtrlGrid
control and ideally get the text from it. (Example: 5/30/2018 9:30:00 PM Beam Alarm Zone Alarm Zone Armed
that is the last line from the screenshot above.)
I've never done much in Delphi/Pascal. So I don't know its structure. To start, I need to find out how do those Delphi controls receive text for a new row to try to trap the part of the original code that does it?
PS. If it was Windows common controls, I know that they receive most notifications via SendMessage
API. I tried that approach with Spy++, but the only messages those two Delphi controls receive were WM_PAINT
and WM_STYLECHANGED
.