Can a Service process/handle Window Messages? For example, if the
Service starts a new process, can the Service send and receive Windows
messages from that process? How about if a window is minimized, can
the Service intercept the Minimize message and process it?
Thanks for your help.
Regards,
----
Jeff
--
* The exception is if you enable "allow the service to interact with the
desktop" in Control Panel. But don't do this, since it provides a back door
into your service to any user logged onto the computer.
--
Tim Robinson (MVP, Windows SDK)
http://www.themobius.co.uk/
"Jeff Lanzarotta" <jefflan...@hotmail.com> wrote in message
news:1cc2fed6.04010...@posting.google.com...
"Tim Robinson" <tim.at.gaat.f...@invalid.com> wrote in message
news:bthmup$7jpls$1...@ID-103400.news.uni-berlin.de...
All you need to do to get your own code to run in a vunerable service is:
1. Get the service to accept some machine code of your choosing, maybe
insert it into a configuration file
2. Obtain an address to that code
3. Post a WM_TIMER message to one of the service's windows, with the address
of the code in LPARAM
4. Watch as the service's DispatchMessage calls your code from the service's
message loop
The easy way to get around this is to disable the "interact with desktop"
option. I believe it's possible to enable a Windows policy which prevents
the user from having "interact with desktop" processes.
--
Tim Robinson (MVP, Windows SDK)
http://www.themobius.co.uk/
"lev" <ltsen...@brandsoft.com> wrote in message
news:tfaLb.87353$I07.421197@attbi_s53...
Coincidentally, I have just done that (already before reading this post).
I've created such an ActiveX (COM) object which does send messages to other
windows. When the object is used from within a VB application it works
flawlessy, but when the ActiveX object is used within an ASP webpage hosted
on IIS, the object gets called and gets executed as it should, except for
the the SendMessage() call. The sent messages are never received.
Is it possible to use SendMessage within an ActiveX object when it's running
in an ASP webpage??
Regards,
"Tim Robinson" <tim.at.gaat.f...@invalid.com> schreef in bericht
news:bthmup$7jpls$1...@ID-103400.news.uni-berlin.de...
Yes, and the interaction with desktop thing is why.
[...]
> Is it possible to use SendMessage within an ActiveX object when it's
running
> in an ASP webpage??
Yes, just not to an interactive window on the user's screen.