本地用户登录失败计数器 [英] Failed Logon Counter for Local Users

查看:36
本文介绍了本地用户登录失败计数器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法以编程方式获取 XP 及更高版本中本地 Windows 用户的失败登录计数?或者,有没有办法让我的服务在登录失败时收到消息?目前在 VB.NET 中编码,但会接受任何语言的任何建议.感谢您抽出宝贵时间.

Is there a way to programmaticly get the failed logon count for local Windows users in XP and later? Alternatively, is there a way for my service to get a message when a failed logon occurs? Currently coding in VB.NET, but will take any suggestions in any language. Thanks for your time.

推荐答案

WIN32 网络管理功能是这些东西的朋友.

The WIN32 Network Management functions are your friend for this stuff.

使用 NetUserGetInfo() API 使用级别 2(USER_INFO_2 结构).然后查看 usri2_bad_pw_count 成员.

Use the NetUserGetInfo() API using level 2 (a USER_INFO_2 structure). Then check out the usri2_bad_pw_count member.

我用 C++ 和 C# 编写了一个示例并将其上传到 http://codehq.net/files/NetUserGetInfo.zip(MIT 许可).

I've written a sample in both C++ and C# and uploaded it at http://codehq.net/files/NetUserGetInfo.zip (MIT License).

这篇关于本地用户登录失败计数器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆