as a college project, I am trying to create a windows service for screen capturing in order to record the activity of a user. I am working with SharpDX.Direct3D11.dll (https://github.com/sharpdx/SharpDX/blob/ab36f12303e24aa60fe804866617716b6ded95db/Source/SharpDX.Direct3D10/Device.cs#L69). For my project I was inspired as well by the ScreenToGif application developed by Nicke manarin (https://github.com/NickeManarin/ScreenToGif).
My custom program seems to work fine only if I start it in a console mode, but when I move all the logic inside a windows service, it fails with the following error:
"Error on prepare new capture:Could not find a proper output device for the area of L: 0, T: 0, Width: 1024, Height: 768"
I am thinking that this library only works if there is a display or window related to the application but as a windows service does not have any output window, the capture function fail.
Has anyone faced similar issue? or probably is there anyone who can provide a guidance or ideas on how to overcome this impediment and allow to take screen captures from a windows service?
thanks 2 all.