private void btnOK_Click(object sender, EventArgs e) { uint result = (uint)LUGAPI.WinError.ERROR_SUCCESS; if (_isUser) { result = LUGAPI.NetRenameUser(_hostName, _oldName, _newName); } else { result = LUGAPI.NetRenameGroup(_hostName, _oldName, _newName); } if (result == (uint)LUGAPI.WinError.ERROR_SUCCESS) { this.DialogResult = DialogResult.OK; Close(); return; } Logger.ShowUserError(ErrorCodes.WIN32String((int)result)); }