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.我想校验一下一个域用户能否在这台机器上登陆,我应该如何给这个函数传递参数呢?请教。
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.我想校验一下一个域用户能否在这台机器上登陆,我应该如何给这个函数传递参数呢?请教。
而在 Win10 系统上调用 LoadAccount 传入相同的用户名 jia.deng 就返回 false。sid.LoadAccount(_T("jia.deng"));请问这是什么原因?