MSDN 中介紹描述比較模糊,"Updates the CSid object given the account name and domain, or an existing SID (security identifier) structure."
bool LoadAccount(
LPCTSTR pszAccountName,
LPCTSTR pszSystem = NULL
) throw(...);
bool LoadAccount(
const SID * pSid,
LPCTSTR pszSystem = NULL
) throw(...);
pszAccountName
The account name.
pszSystem
The system name. This string can be the name of a remote computer. If this string is NULL, the local system is used instead.
pSid
A pointer to a SID structure.
我想校驗一下一個域用戶能否在這臺機器上登陸,我應該如何給這個函式傳遞引數呢?請教。
uj5u.com熱心網友回復:
假設我兩臺電腦,一臺 Win7x64,一臺 Win10x64,分別都加入了域 testdomain.com,但都從未登陸到與服務器上,加入時使用與服務器的管理員賬戶加入的域。此時我在 Win7 系統上呼叫 LoadAccount 傳入我域服務器一個已存在的用戶名 jia.deng 回傳 true。
而在 Win10 系統上呼叫 LoadAccount 傳入相同的用戶名 jia.deng 就回傳 false。
sid.LoadAccount(_T("jia.deng"));請問這是什么原因?
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/125319.html
標籤:Windows客戶端使用
上一篇:2008R2 遠程桌面卡在“請等候 Remote Desktop Configuration”
下一篇:WQL查詢的內容存放在哪里
