The question is: how can I implement this?
If my understanding of the situation is correct, afraid I have to disappoint you. There's no common way for letting outer program into private application data unless the latter intentionally provides the said data out (like Windows native controls do). Imagine Java, Qt and Delphi applications that just draw the data on a canvas. Do you think there is anything similar in underlying data handling in so much different applications? No way.