Read a Rich text box in another application API related.
Posted on 2006-04-28
Anyone want to take a crack at how to use the API to read the entire contents (I dont care about lines, breaks or anything else) from a richtextbox in another application. (outside of my control, a comercial application)
I have the hwnd for the control, and know I need to use the send message api (with em_gettextex or EM_GETTEXTRANGE)
but the problem is that they take a pointer and the pointer has to be in the same memory space as the control you are sending the message to.
Im sure there is a way to use VirtualAllocEx to make the call work accross processes, but for the life of me I cant figure it out.
Oh yeah, Im using VB.Net 2005 but can translate a C# answer.