Session 0 Isolation

前端 未结 3 1191
隐瞒了意图╮
隐瞒了意图╮ 2020-12-22 06:33

Vista puts out a new security preventing Session 0 from accessing hardware like the video card, and the user no longer logs into session 0. I know this means that I cannot

相关标签:
3条回答
  • 2020-12-22 07:03

    You can show one; it just doesn't show up.

    There is a little notification in the taskbar about there being a GUI window and a way to switch to it.

    Anyway, there actually is a TerminalServices API command to switch active session that you could call if you really needed it to show up.

    0 讨论(0)
  • 2020-12-22 07:19

    You can write a separate process which provides the UI for your service process. The communication between your UI and service process can be done in various ways (search the web for "inter process communication" or "IPC").

    0 讨论(0)
  • 2020-12-22 07:20

    Your service can have a GUI. It's simply that no human will ever see it. As the MSDN quote suggests, a service can display a dialog box. The call to MessageBox won't fail; it just won't ever return — there won't be anyone to press its buttons.

    I'm not sure what you mean by wanting to "manage the GUI." Do you actually mean pretending to send input to the controls, as with SendInput? I see no reason that it wouldn't be possible; you'd be injecting input into your own program's queue, after all, and SendInput's Vista-specific warnings don't say anything about that. But I think you'd be making things much more complicated than they need to be. Revisit the idea to alter your program to have no UI at all. (That's not the same as having a console program. Consoles are UI.)

    Instead of simulating the mouse messages necessary to click a button, for instance, eliminate the middle-man and simply call directly the function that the button-click event would have called.

    0 讨论(0)
提交回复
热议问题