I would like, if for no other reason that an academic exercise, to be able to read text written to a form on a Windows Application. The program appears to be written in non-.NET, but in .NET terms, I think you would describe the program as having a Form with a Label and I would like to read the text from that label.
I believe I can see that text being written to the screen with the User32!TextOut (and in other areas User32!DrawString) function. However, it would be nice if I didn't have to hook that function to get the information I'm looking for, but instead if I could just read it from the form directly.
So, given a handle to a Window, is it possible to read the text that has been written to that window with functions like TextOut and DrawString using some similar API or other clever means?
Or am I going about this the wrong way? Should I just hook the function and look for the text in every call and pray?
Thanks!