DirectoryEntry user = new DirectoryEntry(adsPath, machineAndUser,txtOldPassword.Text.Trim(), AuthenticationTypes.Secure); //Change Password user.InvokeSet("SetPassword", new Object[] { txtConfirmPassword.Text }); user.CommitChanges(); catch (System.Runtime.InteropServices.COMException COMex) { if (COMex.ErrorCode == -2147023570 || COMex.ErrorCode == -2147024810 ||COMex.ErrorCode == -2147023677) { MessageBox.Show("Unable to change password due to unknown user name or bad password\nErr Msg: " + COMex.Message, "CreateUser"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)