How do I make SetThreadDesktop API work from a console application?

前端 未结 2 1138
旧时难觅i
旧时难觅i 2020-12-12 06:08

I saw Stack Overflow question How to switch a process between default desktop and Winlogon desktop?.

And I have produced a minimal test-case creating a cons

2条回答
  •  萌比男神i
    2020-12-12 06:52

    From the SetThreadDesktop() documentation:

    The SetThreadDesktop function will fail if the calling thread has any windows or hooks on its current desktop (unless the hDesktop parameter is a handle to the current desktop).

提交回复
热议问题