Configure fixed listening port on RDP api

216 views Asked by At

I wrote a windows desktop sharing app using Microsoft RDP COM API.

activeSession = new RDPSession();

/* I can only have 1 attendee per-session */
activeSession.Invitations.CreateInvitation(authstr, groupname, password, 1);

but I need to start an RDP session at a given port (due to firewall policies) every time I generate an invitation to a session, instead of a random one.

Does anyone know a way to do that with that API? Any help is appreciated.

1

There are 1 answers

0
Simone Sava On

I found a way digging up a little bit MSDN documentation.

activeSession.Properties["PortId"] = listeningPort;
activeSession.Open();