如何验证Windows用户名和密码

tomlance 2005-04-13 11:24:37
请问各位大哥,用什么API函数验证Windows用户和密码是否正确?怎么用?谢谢了!
...全文
604 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
constantine 2005-04-13
  • 打赏
  • 举报
回复
晕吃个饭回来就慢了
constantine 2005-04-13
  • 打赏
  • 举报
回复
NetUserChangePassword
这个函数就可以,后面2个密码的参数一样,不就没有改密码了吗,也可以检查出来
cczlp 2005-04-13
  • 打赏
  • 举报
回复
NT下:
NET_API_STATUS NetUserChangePassword(

LPWSTR domainname,
LPWSTR username,
LPWSTR oldpassword,
LPWSTR newpassword
);
Return Values

If the function is successful, it returns account information and the return value is NET_API_STATUS.
If the function fails, the return value is one of the following error codes.

Value Meaning
ERROR_ACCESS_DENIED The user does not have access to the requested information.
NERR_InvalidComputer The computer name is invalid.
NERR_NotPrimary The operation is allowed only on the primary domain controller of the domain.
NERR_UserNotFound The user name could not be found.
NERR_PasswordTooShort The password is shorter than required.


设 oldpassword 和 newpassword 相同, 如果执行成功则用户名和密码正确.
constantine 2005-04-13
  • 打赏
  • 举报
回复
==给你答案

1,221

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧