I am trying to enhance this Desktop Sharing application:
First, lets briefly discuss about how this desktop sharing application works:
Microsoft has introduced desktop sharing APIs in Windows Vista, as a new feature of Remote Desktop Services (or Terminal Services).
API currently is published as an in-proc COM DLL (%windows%\system32\rdpencom.dll) and is available in Vista. There are 2 primary objects that can be created:
1. IRDPSRAPISharingSession - COM object that enables sharing of desktop
2. IRDPSRAPIViewer - ActiveX control that can be embedded into a host window for viewing the sharing session.
That’s all about this application.
Now its limitations:
Consider two types of users: Physical user who actually sits in front of the machine and uses its actual keyboard, mouse and monitor. And Remote User: Who remotely shares the desktop.
While the desktop is being shared, if physical user press Ctrl+Alt+Del to open the Windows Security Dialog, then the sharer stop sharing the desktop until the user is back to normal screen by choosing any of the option like task manager, or by pressing 'Esc key'.
This is because the sharer is running in user context.
But when I tried to run the sharer application as a system process or as a service, then the sharer does not share the session (session-0) at all.
My Aim: You probably have guessed it by now…
Yes. I want the sharer to share the desktop, no matter whether the use has locked the desktop, or even if there is no user logged in.
NOTE: To make it simple, I am trying this only on client OS - Windows 7. So no question of multiple sessions as in Windows 2008. in that case, I would like to share Session 0 always.
I tried to look more into it, but couldn't find anything other than working of Terminal Services on Server OS:
Can you please guide me on how and where to start with, or where I can find more details about working of rdpencom.dll?