I was trying to capture Desktop screenshots from windows service. As most of the places online suggested, it was hard to capture the screen due to session isolation feature from windows. Due to curiosity, I tried interactive services flags, changing account types, moving to secure places, getting handle of Windows stations, Desktop and setting them to Thread etc., but nothing worked, every time access denied. Getting a screenshot from service is an absolute requirement for me.
So, another idea lying around would be why not just poll a frame buffer or video buffer from the service to give a copy? So that we don't need to worry about any of these session walls, isolation, security and so on. Having that in mind, I felt DirectX would be better candidate to move on as it is has good relations with hardware.
But then, I have done zero lines of programming in DirectX. Could someone please help me with some pointers if DirectX can help in getting this done? If other case what other Drivers API can help in getting the video buffer memory.