windows service screen capture returns black screen

后端 未结 1 762
感动是毒
感动是毒 2020-12-11 21:50

I\'m trying to create windows service application to capture screen. Previously i had problem of starting the service. Anyhow I\'m able to solved it and now I\'m having ano

相关标签:
1条回答
  • 2020-12-11 22:34

    Services run in Session 0, which has a different Window Station and Desktop assignment to other sessions where users interact with the system through their visible desktops.

    You'll probably want to have your service switch to an active users' session to establish a link to their visible desktop in order to create a snapshot of it - your screenshot code is working as-is, but is taking a snapshot its own Desktop (which is nothing).

    This might help clarify things for you.

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