| C#如何验证提供的Windows账号名称administrator和密码是否正确?
					当前位置:点晴教程→知识管理交流
					
					→『 技术文档交流 』
					
				 
 usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Runtime.InteropServices;namespaceTc{    publicpartial classForm3 : Form    {        [DllImport("Advapi32.dll")]        externstaticboolLogonUser(stringuserName, stringdomain, stringpassword, intLogType, intdwLogonProvider, refintPhandle);        publicForm1()        {            InitializeComponent();        }        privatevoidForm3_Load(objectsender, EventArgs e)        {            intpvalue = 0;            boolb = LogonUser("Administrator", "localhost", "8888", 2, 0, refpvalue);            MessageBox.Show(b.ToString());        }    }}该文章在 2021/2/20 11:17:58 编辑过 | 关键字查询 相关文章 正在查询... |