I'm working in a project that the application needs to connect into a remove desktop (RDP Protocol), automatically. For this, I'm using the library MSTSCLib_TLB, from Delphi, which uses mstscax.dll. The problem is that the Windows identifies the connection is coming from an ActiveX control, and display this warning:
This warning is making difficult to connect automatically on the server.
Note: "A website is trying to start a remote connection", while I'm doing this from an executable... I read on the Internet about this message, and tried some solutions on Windows registry, but none of them solved the problem. I accept solutions that work on the Windows registry to stop displaying this warning, but I prefer programmatically solutions. I saw a sugestion to sign the ActiveX object using IObjectSafety and set SetInterfaceSafetyOptions to "INTERFACESAFE_FOR_UNTRUSTED_CALLER", but I have no idea about what this means and how to achieve that.
My application is coded on Delphi, and I'm on Windows 10. The code so far is:
procedure TForm1.Button1Click(Sender: TObject);
var
Client: TMsRdpClient9;
begin
Client:= TMsRdpClient9.Create(Self);
Client.Parent:= Self; //dont know why, but this ActiveX control needs a parent
Client.Server:= Edit1.Text;
Client.UserName:= Edit2.Text;
Client.AdvancedSettings9.ClearTextPassword:= Edit3.Text;
Client.OnLoginComplete:= LoginComplete;
Client.Connect;
end;