随笔分类 - C# & Windows
摘要:1 static void Main(string[] args) 2 { 3 IList<IPAddress> fromto = GetIPAddressInRange(IPAddress.Parse("192.168.1.3"), IPAddress.Parse("192.168.0.254")); 4 IList<IPAddress> ips = GetSubnetIPAddress(IPAddress.Parse("192.168.0.1"), IPAddress.Parse("255.255
阅读全文
摘要:需要调用Windows登陆函数,从AdvAPI32.dll里面导入3个函数LogonUser,DuplicateToken和CloseHandle。具体过程和代码一并写在下面:从Dll导入3个Windows函数 [DllImport("advapi32.dll", SetLastError = true)]private static extern bool LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider,
阅读全文
摘要:Add user access to ACL BinaryByte[] aclbytes = new byte[] { 1, 0, 20, 128, 80, 0, 0, 0, 96, 0, 0, 0, 20, 0, 0, 0, 28, 0, 0, 0, 2, 0, 8, 0, 0, 0, 0, 0, 2, 0, 52, 0, 2, 0, 0, 0, 0, 3, 20, 0, 3, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 5, 18, 0, 0, 0, 0, 3, 24, 0, 3, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 5, 32, 0, 0, 0,
阅读全文

浙公网安备 33010602011771号