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.
Share
The WIN32 Network Management functions are your friend for this stuff.
Use the
NetUserGetInfo()API using level 2 (aUSER_INFO_2structure). Then check out theusri2_bad_pw_countmember.I’ve written a sample in both C++ and C# and uploaded it at http://codehq.net/files/NetUserGetInfo.zip (MIT License).