Why does GetWindowThreadProcessId return 0 when called from a service?

后端 未结 3 455
再見小時候
再見小時候 2021-01-01 05:13

When using the following class in a console application, and having at least one instance of Notepad running, GetWindowThreadProcessId correctly returns a non-z

3条回答
  •  失恋的感觉
    2021-01-01 05:44

    You could also enable the option "Allow service to interact with desktop" and see if that works. Otherwise I would have to agree with onbugz comment above.

提交回复
热议问题