I have simple windows form application with a single ActiveX control in it. That is Microsoft RDP Client Control - version 10. Here is Constructor for the form
public ConnectionWindow()
{
InitializeComponent();
MsRdpClient.Server = "server";
MsRdpClient.UserName = "Administrator";
MsRdpClient.Domain = "domain.com";
IMsTscNonScriptable secured = (IMsTscNonScriptable)MsRdpClient.GetOcx();
secured.ClearTextPassword = "password";
MsRdpClient.Connect();
}
The only thing i get from this is "Internal error has occurred" from disconnected arguments when subscribing to MsRdpClient_OnDisconnected event:
private void MsRdpClient_OnDisconnected(object sender, IMsTscAxEvents_OnDisconnectedEvent e)
{
var rdp = sender as AxMsRdpClient9;
var errorString = rdp.GetErrorDescription((uint)e.discReason, (uint)rdp.ExtendedDisconnectReason);
Console.WriteLine("Disconnected event reason: " + errorString);
}
I tried subscribing to most of the events in the control, but the only other thing i get is MsRdpClient_OnAuthenticationWarningDisplayed event invoke, but it doesn't give me any information.
P.S. the control itself just gives blank view. When connecting to remtoe pc via mstsc everything is fine, credentials fit. Anyone has any idea about this?