From: Ken Unger on
We're currently looking at the Remote Desktop Protocol Provider APIs in 2008
R2. There is some information missing from the documentation that is
required to make use of this. The GetProtocolHandles method requires that
the providor supply handles for keyboard and other devices. However there is
no information as to what this is a handle to -- a driver, a message queue, a
virtual channel, etc. Any light you could shed on this is appreciated.

http://msdn.microsoft.com/en-us/library/dd919988(VS.85).aspx
http://msdn.microsoft.com/en-us/library/dd919945(VS.85).aspx

HRESULT GetProtocolHandles(
[out] HANDLE_PTR *pKeyboardHandle,
[out] HANDLE_PTR *pMouseHandle,
[out] HANDLE_PTR *pBeepHandle,
[out] HANDLE_PTR *pVideoHandle
);”






--
KU
From: Christa Anderson [MSFT] on
Hi, Ken,

I'm the program manager for this API. Thanks for the heads-up; we'll update
MSDN to make this more clear.

To answer your question, this is usually a device handle to a virtual
keyboard/mouse driver; the role of this driver is to collect the input info
from the RD Session Host client and propagate it to the server. Device
handles can be created by the driver by calling the IoCreateDevice API.
(This can also be done using virtual channels.)

Hope this helps,
Christa Anderson [MSFT]


"Ken Unger" <KenUnger(a)discussions.microsoft.com> wrote in message
news:B28BCE28-B524-48F2-8C0E-BC3918D2AE2A(a)microsoft.com...
> We're currently looking at the Remote Desktop Protocol Provider APIs in
> 2008
> R2. There is some information missing from the documentation that is
> required to make use of this. The GetProtocolHandles method requires that
> the providor supply handles for keyboard and other devices. However there
> is
> no information as to what this is a handle to -- a driver, a message
> queue, a
> virtual channel, etc. Any light you could shed on this is appreciated.
>
> http://msdn.microsoft.com/en-us/library/dd919988(VS.85).aspx
> http://msdn.microsoft.com/en-us/library/dd919945(VS.85).aspx
>
> HRESULT GetProtocolHandles(
> [out] HANDLE_PTR *pKeyboardHandle,
> [out] HANDLE_PTR *pMouseHandle,
> [out] HANDLE_PTR *pBeepHandle,
> [out] HANDLE_PTR *pVideoHandle
> );”
>
>
>
>
>
>
> --
> KU

From: Christa Anderson [MSFT] on
Additionally, we're interested in the use cases and scenarios you want to
support using this API. Please contact me at christa.anderson(a)microsoft.com
if you'd like to discuss. Thanks!

Regards,
Christa

"Ken Unger" <KenUnger(a)discussions.microsoft.com> wrote in message
news:B28BCE28-B524-48F2-8C0E-BC3918D2AE2A(a)microsoft.com...
> We're currently looking at the Remote Desktop Protocol Provider APIs in
> 2008
> R2. There is some information missing from the documentation that is
> required to make use of this. The GetProtocolHandles method requires that
> the providor supply handles for keyboard and other devices. However there
> is
> no information as to what this is a handle to -- a driver, a message
> queue, a
> virtual channel, etc. Any light you could shed on this is appreciated.
>
> http://msdn.microsoft.com/en-us/library/dd919988(VS.85).aspx
> http://msdn.microsoft.com/en-us/library/dd919945(VS.85).aspx
>
> HRESULT GetProtocolHandles(
> [out] HANDLE_PTR *pKeyboardHandle,
> [out] HANDLE_PTR *pMouseHandle,
> [out] HANDLE_PTR *pBeepHandle,
> [out] HANDLE_PTR *pVideoHandle
> );”
>
>
>
>
>
>
> --
> KU

From: Ken Unger on
Thanks Christa. I followed up with an email to you, but perhaps that was
swallowed up by a spam or junk mail filter. You can contact me at
ken(a)teradici.com.

On the technical side of things I think we're still missing something. So,
the virtual keyboard/etc driver creates a DeviceObject which is passed up to
user space and over to RDS? We've done some prototyping using three simple
WDM drivers with the driver's device type sets to FILE_DEVICE_BEEP,
FILE_DEVICE_MOUSE and FILE_DEVICE_KEYBOARD. The session was still
disconnected after providing GetProtocolHandles with device object from
drivers.

After GetProtocolHandles the following methods were called by RDS:
IWTSProtocolManager NotifySessionStateChange SessionId [2] EventId [13]
IWTSProtocolManager NotifySessionStateChange SessionId [2] EventId [14]
IWTSProtocolConnection DisconnectNotify!
IWTSProtocolConnection Close!

EventId 13 and 14 are undocumented. Functions implemented in the driver are
IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_DEVICE_CONTROL and
IRP_MJ_INTERNAL_DEVICE_CONTROL and none of them get called by RDS.

Any additional light that you could shed on this is greatly appreciated.

--
KU


"Christa Anderson [MSFT]" wrote:

> Additionally, we're interested in the use cases and scenarios you want to
> support using this API. Please contact me at christa.anderson(a)microsoft.com
> if you'd like to discuss. Thanks!
>
> Regards,
> Christa
>
> "Ken Unger" <KenUnger(a)discussions.microsoft.com> wrote in message
> news:B28BCE28-B524-48F2-8C0E-BC3918D2AE2A(a)microsoft.com...
> > We're currently looking at the Remote Desktop Protocol Provider APIs in
> > 2008
> > R2. There is some information missing from the documentation that is
> > required to make use of this. The GetProtocolHandles method requires that
> > the providor supply handles for keyboard and other devices. However there
> > is
> > no information as to what this is a handle to -- a driver, a message
> > queue, a
> > virtual channel, etc. Any light you could shed on this is appreciated.
> >
> > http://msdn.microsoft.com/en-us/library/dd919988(VS.85).aspx
> > http://msdn.microsoft.com/en-us/library/dd919945(VS.85).aspx
> >
> > HRESULT GetProtocolHandles(
> > [out] HANDLE_PTR *pKeyboardHandle,
> > [out] HANDLE_PTR *pMouseHandle,
> > [out] HANDLE_PTR *pBeepHandle,
> > [out] HANDLE_PTR *pVideoHandle
> > );”
> >
> >
> >
> >
> >
> >
> > --
> > KU
>
> .
>