广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 3055 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
sob790717
数位造型
个人文章 个人相簿 个人日记 个人地图
小人物
级别: 小人物 该用户目前不上站
推文 x17 鲜花 x27
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[Basic][求助] 判断XP系统使用者权限
该如何以VB6判断XP使用者是不是管理员还 ..

访客只能看到部份内容,免费 加入会员 或由脸书 Google 可以看到全部内容



献花 x0 回到顶端 [楼 主] From:台湾中华电信 | Posted:2010-11-07 11:15 |
ebolaman 手机 会员卡
个人文章 个人相簿 个人日记 个人地图
特殊贡献奖

级别: 副版主 该用户目前不上站
版区: 程式设计
推文 x38 鲜花 x458
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

这种要去 英文网站才能找到较丰富的资料


Binary World : http://binaryworld.net/Main/C...x?CodeId=465



叙述:

This function will determine whether or not a thread is running in the user context of the local Administrator account. You need to examine the access token associated with that thread using the GetTokenInformation() API, since this access token represents the user under which the thread is running. By default the token associated with a thread is that of its containing process, but this user context will be superceded by any token attached directly to the thread. So to determine a thread's user context, first attempt to obtain any token attached directly to the thread with OpenThreadToken(). If this fails, and it reports an ERROR_NO_TOKEN, then obtain the token of the thread's containing process with OpenProcessToken().

此文章被评分,最近评分记录
支持度:2 (by 三仙) | 理由: ^^ 因为您的参与,让程式设计更容易!!


My BOINC stats :

献花 x2 回到顶端 [1 楼] From:台湾台湾宽频 | Posted:2010-11-09 19:37 |
三仙 会员卡
个人头像
个人文章 个人相簿 个人日记 个人地图
头衔:以马内利 以马内利
版主
级别: 版主 该用户目前不上站
版区: 程式设计
推文 x17 鲜花 x370
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

下面是引用 sob790717 于 2010-11-07 11:15 发表的 判断XP系统使用者权限: 到引言文
该如何以VB6判断XP使用者是不是管理员还是 users?
并提示使用者请用管理员执行程式

这部分我不懂
找不到网上教学
请高手大大帮忙


Try it.
复制程式
Private Declare Function IsNTAdmin Lib "advpack.dll" _
(ByVal dwReserved As Long, ByRef lpdwReserved As Long) As Long
Private Sub Form_Load()
Dim blnAdmin As Boolean
blnAdmin = CBool(IsNTAdmin(ByVal 0&, ByVal 0&))
If Not blnAdmin = False Then MsgBox "Administrator rights."
End Sub


挖出答案的难度,取决提问的深度!
献花 x2 回到顶端 [2 楼] From:台湾中华电信 | Posted:2010-11-09 21:31 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.014930 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言