WTS - WTSSendMessage()

Hi all

I'm using WTSSendMessage() to post messages around on WTS, from client to client app running on a server. Does any one know how I can "catch" this message (so that I can read and save the message text) before/as it pops up on each app?
I'd like to be able to store the messages that each app receives in a log file.

Thanks.
AntonHxAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

2266180Commented:
are you by any chance talking about this function: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/wtssendmessage.asp ? because if so, I really don't see how you can catch a message sent in order to display a messagebox.
however, if you are trying to communicate between applications in different sessions, then using virtual channels might be an idea. check the list of functions here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/termserv/termserv/terminal_services_api_functions.asp
some examples of use:
http://groups.google.ro/group/borland.public.delphi.nativeapi/browse_thread/thread/599c6a42a62a1f1e/fe99499a24b88c7f%23fe99499a24b88c7f
http://www.codeproject.com/internet/tswindowclipper.asp

However, I would instruct you to use sockets as it is the most platform independednt solution to communicate between applications and allows you to have (if desired in teh future) remote control and plugin of otehr appilcaitons from other platforms. plus that allows you to exchange data no matter the format/size.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.