摘要:
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... 阅读全文
摘要:
using System.Net;try { IPAddress a = IPAddress.Parse(输入的IP字符串); } catch (System.Exception ex) { MessageBox.Show("输入错误:输入的IP地址无效,请重新输入。", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); ... 阅读全文
摘要:
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(... 阅读全文