摘要:
在Windows线程中模拟其他用户上下文,需要使用WindowsIdentity.Impersonate方法!同时还需要用LogonUser API来获取安全令牌,代码如下:using System.Runtime.InteropServices;using System.Security.Principal;class Program{ [DllImport("Advapi32.dll")] s... 阅读全文
posted @ 2009-09-11 13:56
周雪峰
阅读(602)
评论(0)
推荐(0)
浙公网安备 33010602011771号