From: Bernhard on
Hi,
I installed the msrdp ActiveX object an created a VB6 application. Ok, very
easy! I can connect to the remote server and use it like the normal rdp
client.

However, now I tried to send keys to the remote session. Things like
SendKeys, PostMessage or keybd_event were NOT successful, but there must be a
way, because standard rdp clients can send special key strokes to the remote
session.

How can we do that?

Thanks in advance!

Bernhard
From: ThomasT. on
I have found in the doc:
IMsRdpClientNonScriptable::SendKeys

Good luck

Thomas T.


"Bernhard" <Bernhard(a)discussions.microsoft.com> wrote in message
news:83C0039F-04BD-46B5-8E70-D29D8DA1FEDC(a)microsoft.com...
> Hi,
> I installed the msrdp ActiveX object an created a VB6 application. Ok,
> very
> easy! I can connect to the remote server and use it like the normal rdp
> client.
>
> However, now I tried to send keys to the remote session. Things like
> SendKeys, PostMessage or keybd_event were NOT successful, but there must
> be a
> way, because standard rdp clients can send special key strokes to the
> remote
> session.
>
> How can we do that?
>
> Thanks in advance!
>
> Bernhard


From: Bernhard on
Dear Thomas, I have seen this interface, but this is not visible from the
ActiveX object. The Active X object uses the interfaces RdpClient2 and
RdpClient3 only.

"ThomasT." wrote:

> I have found in the doc:
> IMsRdpClientNonScriptable::SendKeys
>
> Good luck
>
> Thomas T.
>
>
> "Bernhard" <Bernhard(a)discussions.microsoft.com> wrote in message
> news:83C0039F-04BD-46B5-8E70-D29D8DA1FEDC(a)microsoft.com...
> > Hi,
> > I installed the msrdp ActiveX object an created a VB6 application. Ok,
> > very
> > easy! I can connect to the remote server and use it like the normal rdp
> > client.
> >
> > However, now I tried to send keys to the remote session. Things like
> > SendKeys, PostMessage or keybd_event were NOT successful, but there must
> > be a
> > way, because standard rdp clients can send special key strokes to the
> > remote
> > session.
> >
> > How can we do that?
> >
> > Thanks in advance!
> >
> > Bernhard
>
>
>
From: Josh Rosenberg [MSFT] on
I don't code in VB, so you'll excuse my ignorance, but isn't VB a scripting
language? We only allow keys to be sent manually when being used in a
non-script context; otherwise maliciously designed web pages that forward a
TS connection could do "interesting" things to the user's session. If you
are coding in a non-script context (a binary installed by the user or
whatever), you'll have access to that function, but otherwise it is
off-limits.

--
Josh Rosenberg [MSFT]
SDE - Terminal Services


"Bernhard" <Bernhard(a)discussions.microsoft.com> wrote in message
news:2A9E4843-7B79-493C-BC74-8AE0E3593BAE(a)microsoft.com...
> Dear Thomas, I have seen this interface, but this is not visible from the
> ActiveX object. The Active X object uses the interfaces RdpClient2 and
> RdpClient3 only.
>
> "ThomasT." wrote:
>
>> I have found in the doc:
>> IMsRdpClientNonScriptable::SendKeys
>>
>> Good luck
>>
>> Thomas T.
>>
>>
>> "Bernhard" <Bernhard(a)discussions.microsoft.com> wrote in message
>> news:83C0039F-04BD-46B5-8E70-D29D8DA1FEDC(a)microsoft.com...
>> > Hi,
>> > I installed the msrdp ActiveX object an created a VB6 application. Ok,
>> > very
>> > easy! I can connect to the remote server and use it like the normal rdp
>> > client.
>> >
>> > However, now I tried to send keys to the remote session. Things like
>> > SendKeys, PostMessage or keybd_event were NOT successful, but there
>> > must
>> > be a
>> > way, because standard rdp clients can send special key strokes to the
>> > remote
>> > session.
>> >
>> > How can we do that?
>> >
>> > Thanks in advance!
>> >
>> > Bernhard
>>
>>
>>

From: Bernhard on
Dear Josh,

VB is just a good tool to test ActiveX controls rapidly. I can also use MFC
to access COM objects. However, to connect with MFC to the msrdp.ocx is not
enough, because there is no published interface for Sendkeys.

How can I access the IMsRdpClientNonScriptable::SendKeys function from MFC?
Where is the type library? Which file provide this functions mstscax.dll?

Is there sample code?

The documentation requires a Windows Server 2003 as the server for SendKeys.
Does it work with WinXP as Server?

Thank you
Bernhard

"Josh Rosenberg [MSFT]" wrote:

> I don't code in VB, so you'll excuse my ignorance, but isn't VB a scripting
> language? We only allow keys to be sent manually when being used in a
> non-script context; otherwise maliciously designed web pages that forward a
> TS connection could do "interesting" things to the user's session. If you
> are coding in a non-script context (a binary installed by the user or
> whatever), you'll have access to that function, but otherwise it is
> off-limits.
>
> --
> Josh Rosenberg [MSFT]
> SDE - Terminal Services
>
>
> "Bernhard" <Bernhard(a)discussions.microsoft.com> wrote in message
> news:2A9E4843-7B79-493C-BC74-8AE0E3593BAE(a)microsoft.com...
> > Dear Thomas, I have seen this interface, but this is not visible from the
> > ActiveX object. The Active X object uses the interfaces RdpClient2 and
> > RdpClient3 only.
> >
> > "ThomasT." wrote:
> >
> >> I have found in the doc:
> >> IMsRdpClientNonScriptable::SendKeys
> >>
> >> Good luck
> >>
> >> Thomas T.
> >>
> >>
> >> "Bernhard" <Bernhard(a)discussions.microsoft.com> wrote in message
> >> news:83C0039F-04BD-46B5-8E70-D29D8DA1FEDC(a)microsoft.com...
> >> > Hi,
> >> > I installed the msrdp ActiveX object an created a VB6 application. Ok,
> >> > very
> >> > easy! I can connect to the remote server and use it like the normal rdp
> >> > client.
> >> >
> >> > However, now I tried to send keys to the remote session. Things like
> >> > SendKeys, PostMessage or keybd_event were NOT successful, but there
> >> > must
> >> > be a
> >> > way, because standard rdp clients can send special key strokes to the
> >> > remote
> >> > session.
> >> >
> >> > How can we do that?
> >> >
> >> > Thanks in advance!
> >> >
> >> > Bernhard
> >>
> >>
> >>
>