M
Martin
We have a system that is comprised of 3 executables. They're all about
controlling displays.
1) Service.exe -- A service (running as local system)
2) Main.exe --The main app which is run as as local system too, but
within the interactive user's Session and attached to the user's
input desktop.
3) UI.exe -- A UI executable which runs under the interactive user's
account.
Service launches Main.
Main launches UI, using CreateProcessAsUser(), getting the
QueryUserToken().
UI.exe tries to broadcast WM_DISPLAYCHANGE at certain points which
needs to be heard by Main.exe.
But Main.exe's listening window & thread do not receive that message
if control-panel's UAC is checked on.
(BTW: On XP & win2k all is fine, and also on Vista when UAC=Off.)
Strangely calling ChangeDisplaySettingsEx() in the UI will
successfully cause WM_DISPLAYCHANGE to be heard by main.exe
Using Spy I can see that, for example, the frame of Notepad.exe does
receive the WM_DISPLAYCHANGE message, even though the window-procedure
in Main.exe does not.
I've tried using SendMessage, PostMessage, SendNotifyMessage, all
aimed at HWND_BROADCAST. All suffer the above problem under UAC.
I can add more details on how the processes are created if needs be.
Any suggestions of what's going on, and how I can fix it?
Thanks for any advice. I've been looking at this for a week now.
controlling displays.
1) Service.exe -- A service (running as local system)
2) Main.exe --The main app which is run as as local system too, but
within the interactive user's Session and attached to the user's
input desktop.
3) UI.exe -- A UI executable which runs under the interactive user's
account.
Service launches Main.
Main launches UI, using CreateProcessAsUser(), getting the
QueryUserToken().
UI.exe tries to broadcast WM_DISPLAYCHANGE at certain points which
needs to be heard by Main.exe.
But Main.exe's listening window & thread do not receive that message
if control-panel's UAC is checked on.
(BTW: On XP & win2k all is fine, and also on Vista when UAC=Off.)
Strangely calling ChangeDisplaySettingsEx() in the UI will
successfully cause WM_DISPLAYCHANGE to be heard by main.exe
Using Spy I can see that, for example, the frame of Notepad.exe does
receive the WM_DISPLAYCHANGE message, even though the window-procedure
in Main.exe does not.
I've tried using SendMessage, PostMessage, SendNotifyMessage, all
aimed at HWND_BROADCAST. All suffer the above problem under UAC.
I can add more details on how the processes are created if needs be.
Any suggestions of what's going on, and how I can fix it?
Thanks for any advice. I've been looking at this for a week now.