会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
周雪峰的博客
关注.NET技术与编程思想
博客园
首页
新随笔
联系
订阅
管理
2009年9月11日
在Windows线程中模拟其他用户上下文!
摘要: 在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 周雪峰
阅读(588)
评论(0)
推荐(0)
编辑