Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.3 KiB

  1. /****************************** Module Header ******************************\
  2. * Module Name: lockout.h
  3. *
  4. * Copyright (c) 1991, Microsoft Corporation
  5. *
  6. * Define apis and data types used to implement account lockout
  7. *
  8. * History:
  9. * 05-27-92 Davidc Created.
  10. \***************************************************************************/
  11. #ifdef DATA_TYPES_ONLY
  12. //
  13. // Lockout specific types
  14. //
  15. //
  16. // FailedLogonTimes is an array holding the time of the previous
  17. // consecutive failed logons.
  18. // FailedLogonIndex points into the array at the last bad logon time.
  19. //
  20. // The following values in the array are valid at any particular time
  21. //
  22. // FailedLogonTime[FailedLogonIndex] // Most recent failed logon
  23. // FailedLogonTime[FailedLogonIndex - 1]
  24. // ...
  25. // FailedLogonTime[FailedLogonIndex - ConsecutiveFailedLogons + 1]
  26. //
  27. // No values in the array are valid if ConsecutiveFailedLogons == 0
  28. //
  29. typedef struct _LOCKOUT_DATA {
  30. ULONG ConsecutiveFailedLogons;
  31. ULONG FailedLogonIndex;
  32. TIME FailedLogonTimes[LOCKOUT_BAD_LOGON_COUNT];
  33. } LOCKOUT_DATA;
  34. typedef LOCKOUT_DATA *PLOCKOUT_DATA;
  35. #else // DATA_TYPES_ONLY
  36. //
  37. // Exported function prototypes
  38. //
  39. BOOL
  40. LockoutInitialize(
  41. PGLOBALS pGlobals
  42. );
  43. BOOL
  44. LockoutHandleFailedLogon(
  45. PGLOBALS pGlobals
  46. );
  47. BOOL
  48. LockoutHandleSuccessfulLogon(
  49. PGLOBALS pGlobals
  50. );
  51. #endif