0

Please I need help about how I can check if the user and the password are correct when login in a remote desktop. I have already write this code to connect but what I really need it's just check if the login is correct.

This is my method:

I'm Using MSTSC Lib

public void test(string sr, string us, string pwd)
{   
    rdp.Server = sr;
    rdp.UserName = us;
    IMsTscNonScriptable secured = (IMsTscNonScriptable)rdp.GetOcx();
    secured.ClearTextPassword = pwd;
    rdp.Connect(); 

    MessageBox.Show(rdp.Connected.ToString());
}

Thanks for your help in advance

Phoenix
  • 1,045
  • 1
  • 14
  • 22
Khalid.sgh
  • 33
  • 2
  • 7
  • The validation must happen in the remote computers domain. Unless you are on the same domain as the remote computer there is no other way than trying to connect – adrianm Jul 10 '14 at 14:46
  • I found an event -> OnLoginComplete it works for me :) this event happens when the login and the password are correct and the app's login into the computer ,thanks for your answer – Khalid.sgh Jul 11 '14 at 11:04

0 Answers0