Intercept messages belonging to a foreign app?

Z

Zoplax

Let's say I want to watch a RichEdit control (e.g. a chat window)
outside of my own C# application and intercept its Windows messages.

Is there a way to do this?
 
L

Lars Behrmann

Hi,

i think that will be only possible by using
unmanaged code. There is a posting about
hooking global key events within your application
which should be smilar to that what you want
to do.

http://groups.google.de/group/micro...lobal+windows+message&rnum=2#7b3edbe9e0451e0f

But why you have to do that? I think
a chat client should work with protocols
and ports to recieve it messages.

Cheers
Lars Behrmann

_________________
Nothing is impossible. UML is the key for all your problems.
AODL - Make your .net apps OpenOffice ready
http://aodl.sourceforge.net/
 
Z

Zoplax

Thanks Lars for responding. This is actually a chat window within a
game, and I'm trying to see if I can grab text from that control as it
gets posted there. To do this I'm wondering if I can create an event
handler which watches that control (which is outside my own app) and
respond to changes which would indicate that new text has appeared.
 
A

ALI RAZA

Salam

i think you have to work with Win32 Programming and Check for the System
Events thats are occuring. I worked on a Application (Windows Service) that
uses to monitor the activity of the browser like Browser Open, Closed, Link
Asked etc, the main approach i used to loop through the process in the
Windows Shell, and then add a event to that process, in this way i capture
the required events raised by/on the browser.


--
ALI RAZA SHAIKH
MCAD.net

www.programmersparadise.cjb.net
alirazashaikh.blogspot.com
 
W

webmaster

Find out which port the game uses; this is usually listed in a manual or something.

Then, write a program that taps into that port and gets the messages from it:
1. Connect to "network" on port number
2. Convert incoming bytes to string
3. Display string

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top