廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 3025 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為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.021540 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言