Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Overcome Windows 7/Vista Showmessage and Findwindow restrictions

Status
Not open for further replies.

Anaglypt

Programmer
Oct 12, 2009
2
AU
I have developed a Service App that starts a new GUI app and periodically wants to send it a message to remind it to do something.
I create the Gui in a new session by imitating the Winlogon process to oversome Session0 isolation.
I load the GUi and it appears on the desktop fine.
Findwindow and Postmessage fail.
Ive looked looping through the processes to find it bu it all getting a bit complicated fro me to follow.

Anyone got a handle on the problem. No pun intended
 
Hi,

you must set the "Allow service to interact with desktop" flag (from the service logon tab) before you can use window functions.

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Thanks but I've already been there.
The process I use worked fine with XP and below. Its only since Vista and Windows 7 that its a problem. My service app runs as local system account with "interact with desktop" set on.

Since Vista the service runs in session0 but once I have impersonated a logged on user (winlogon) I start the GUI and it runs in Session1. But its impossible to post a message between the sessions as Microsoft have blocked it for security reasons. There are a lot of legacy apps that are going to fail because of it.
Even the guys who write Ultra VNC are still wrestling with the problem.

Anyone at all with a clue of how to attack it?
 
Been there too,

That's why I don't use windows messaging between my services and GUI apps. I use TCP sockets and I stream my objects via XML.
So I never encounter this problem...

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top