2013年9月12日

摘要: using System.Runtime.InteropServices; 1 [StructLayout(LayoutKind.Sequential)] 2 public class NetResource 3 { 4 public int dwScope; 5 public int dwType; 6 public int dwDisplayType; 7 public int dwUsage; 8 public string LocalN... 阅读全文
posted @ 2013-09-12 11:40 xxxteam 阅读(2080) 评论(1) 推荐(0) 编辑
摘要: using System.Net;try { IPAddress a = IPAddress.Parse(输入的IP字符串); } catch (System.Exception ex) { MessageBox.Show("输入错误:输入的IP地址无效,请重新输入。", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); ... 阅读全文
posted @ 2013-09-12 11:33 xxxteam 阅读(307) 评论(0) 推荐(0) 编辑
摘要: using System.DirectoryServices;using System.Runtime.InteropServices;(需要添加引用)[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct USER_INFO_0 { public string Username; } [DllImport("Netapi32.dll ")] extern static int NetUserEnum(... 阅读全文
posted @ 2013-09-12 11:33 xxxteam 阅读(1148) 评论(0) 推荐(0) 编辑
摘要: string strCmdText; strCmdText = "useraccount where name='" + 旧密码 + "' rename " + 新密码; try { System.Diagnostics.Process.Start("wmic.exe", strCmdText); } catch (System.Exception ex) { MessageBox.Show("修改失败,... 阅读全文
posted @ 2013-09-12 11:31 xxxteam 阅读(357) 评论(0) 推荐(0) 编辑

导航