Getting window from hooked API

c++ / delphi package - dll injection and api hooking
Post Reply
Moogo
Posts: 1
Joined: Thu Nov 18, 2004 9:30 pm

Getting window from hooked API

Post by Moogo »

Hi,
I know a question like this was posted before, but I hope someone have come up with an answer.
I'm trying to create an application to read data from a legacy application. The legacy app has several graphic windows. I have hooked the text APIs successfuly, but I need to know what text goes on which window.
I have tried WindowFromDC, but I get a null handle. I guess the app might be using double buffering, so it's not writing directly to the window.
Does anyone have any idea how to identify where the text is supposed to be printed?

Thanks!
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Well, of course you could memory the DC handle and then wait until the app calls BitBlt or something like that to draw that DC to another DC. But it's kinda ugly.
Post Reply