4 #define SAM_MAXIMUM_LOOKUP_COUNT (1000)
5 #define SAM_MAXIMUM_LOOKUP_LENGTH (32000)
6 #define SAM_MAX_PASSWORD_LENGTH (256)
7 #define SAM_PASSWORD_ENCRYPTION_SALT_LEN (16)
57 _In_ SECURITY_INFORMATION SecurityInformation,
58 _In_ PSECURITY_DESCRIPTOR SecurityDescriptor
66 _In_ SECURITY_INFORMATION SecurityInformation,
67 _Outptr_ PSECURITY_DESCRIPTOR *SecurityDescriptor
81 #define SAM_SERVER_CONNECT 0x0001
82 #define SAM_SERVER_SHUTDOWN 0x0002
83 #define SAM_SERVER_INITIALIZE 0x0004
84 #define SAM_SERVER_CREATE_DOMAIN 0x0008
85 #define SAM_SERVER_ENUMERATE_DOMAINS 0x0010
86 #define SAM_SERVER_LOOKUP_DOMAIN 0x0020
88 #define SAM_SERVER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
89 SAM_SERVER_CONNECT | \
90 SAM_SERVER_INITIALIZE | \
91 SAM_SERVER_CREATE_DOMAIN | \
92 SAM_SERVER_SHUTDOWN | \
93 SAM_SERVER_ENUMERATE_DOMAINS | \
94 SAM_SERVER_LOOKUP_DOMAIN)
96 #define SAM_SERVER_READ (STANDARD_RIGHTS_READ | \
97 SAM_SERVER_ENUMERATE_DOMAINS)
99 #define SAM_SERVER_WRITE (STANDARD_RIGHTS_WRITE | \
100 SAM_SERVER_INITIALIZE | \
101 SAM_SERVER_CREATE_DOMAIN | \
104 #define SAM_SERVER_EXECUTE (STANDARD_RIGHTS_EXECUTE | \
105 SAM_SERVER_CONNECT | \
106 SAM_SERVER_LOOKUP_DOMAIN)
116 _In_ ACCESS_MASK DesiredAccess,
129 #define DOMAIN_READ_PASSWORD_PARAMETERS 0x0001
130 #define DOMAIN_WRITE_PASSWORD_PARAMS 0x0002
131 #define DOMAIN_READ_OTHER_PARAMETERS 0x0004
132 #define DOMAIN_WRITE_OTHER_PARAMETERS 0x0008
133 #define DOMAIN_CREATE_USER 0x0010
134 #define DOMAIN_CREATE_GROUP 0x0020
135 #define DOMAIN_CREATE_ALIAS 0x0040
136 #define DOMAIN_GET_ALIAS_MEMBERSHIP 0x0080
137 #define DOMAIN_LIST_ACCOUNTS 0x0100
138 #define DOMAIN_LOOKUP 0x0200
139 #define DOMAIN_ADMINISTER_SERVER 0x0400
141 #define DOMAIN_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
142 DOMAIN_READ_OTHER_PARAMETERS | \
143 DOMAIN_WRITE_OTHER_PARAMETERS | \
144 DOMAIN_WRITE_PASSWORD_PARAMS | \
145 DOMAIN_CREATE_USER | \
146 DOMAIN_CREATE_GROUP | \
147 DOMAIN_CREATE_ALIAS | \
148 DOMAIN_GET_ALIAS_MEMBERSHIP | \
149 DOMAIN_LIST_ACCOUNTS | \
150 DOMAIN_READ_PASSWORD_PARAMETERS | \
152 DOMAIN_ADMINISTER_SERVER)
154 #define DOMAIN_READ (STANDARD_RIGHTS_READ | \
155 DOMAIN_GET_ALIAS_MEMBERSHIP | \
156 DOMAIN_READ_OTHER_PARAMETERS)
158 #define DOMAIN_WRITE (STANDARD_RIGHTS_WRITE | \
159 DOMAIN_WRITE_OTHER_PARAMETERS | \
160 DOMAIN_WRITE_PASSWORD_PARAMS | \
161 DOMAIN_CREATE_USER | \
162 DOMAIN_CREATE_GROUP | \
163 DOMAIN_CREATE_ALIAS | \
164 DOMAIN_ADMINISTER_SERVER)
166 #define DOMAIN_EXECUTE (STANDARD_RIGHTS_EXECUTE | \
167 DOMAIN_READ_PASSWORD_PARAMETERS | \
168 DOMAIN_LIST_ACCOUNTS | \
171 #define DOMAIN_PROMOTION_INCREMENT { 0x0, 0x10 }
172 #define DOMAIN_PROMOTION_MASK { 0x0, 0xfffffff0 }
205 #include <pshpack4.h>
222 #include <pshpack4.h>
237 #ifndef _DOMAIN_PASSWORD_INFORMATION_DEFINED // defined in ntsecapi.h
238 #define _DOMAIN_PASSWORD_INFORMATION_DEFINED
251 #define DOMAIN_PASSWORD_COMPLEX 0x00000001L
252 #define DOMAIN_PASSWORD_NO_ANON_CHANGE 0x00000002L
253 #define DOMAIN_PASSWORD_NO_CLEAR_CHANGE 0x00000004L
254 #define DOMAIN_LOCKOUT_ADMINS 0x00000008L
255 #define DOMAIN_PASSWORD_STORE_CLEARTEXT 0x00000010L
256 #define DOMAIN_REFUSE_PASSWORD_CHANGE 0x00000020L
257 #define DOMAIN_NO_LM_OWF_CHANGE 0x00000040L
403 _Outptr_ PSID *DomainId
412 _Outptr_ PVOID *Buffer,
413 _In_ ULONG PreferedMaximumLength,
414 _Out_ PULONG CountReturned
422 _In_ ACCESS_MASK DesiredAccess,
433 _Outptr_ PVOID *Buffer
442 _In_ PVOID DomainInformation
452 _Out_ _Deref_post_count_(Count) PULONG *RelativeIds,
453 _Out_ _Deref_post_count_(Count) PSID_NAME_USE *Use
462 _In_reads_(Count) PULONG RelativeIds,
464 _Out_ _Deref_post_opt_count_(Count) PSID_NAME_USE *Use
481 _In_ ULONG LanguageId,
483 _Outptr_ PVOID *Buffer
488 #define GROUP_READ_INFORMATION 0x0001
489 #define GROUP_WRITE_ACCOUNT 0x0002
490 #define GROUP_ADD_MEMBER 0x0004
491 #define GROUP_REMOVE_MEMBER 0x0008
492 #define GROUP_LIST_MEMBERS 0x0010
494 #define GROUP_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
495 GROUP_LIST_MEMBERS | \
496 GROUP_WRITE_ACCOUNT | \
498 GROUP_REMOVE_MEMBER | \
499 GROUP_READ_INFORMATION)
501 #define GROUP_READ (STANDARD_RIGHTS_READ | \
504 #define GROUP_WRITE (STANDARD_RIGHTS_WRITE | \
505 GROUP_WRITE_ACCOUNT | \
509 #define GROUP_EXECUTE (STANDARD_RIGHTS_EXECUTE | \
510 GROUP_READ_INFORMATION)
560 _Outptr_ PVOID *Buffer,
561 _In_ ULONG PreferedMaximumLength,
562 _Out_ PULONG CountReturned
571 _In_ ACCESS_MASK DesiredAccess,
573 _Out_ PULONG RelativeId
581 _In_ ACCESS_MASK DesiredAccess,
599 _Outptr_ PVOID *Buffer
617 _In_ ULONG Attributes
633 _Out_ _Deref_post_count_(*MemberCount) PULONG *MemberIds,
634 _Out_ _Deref_post_count_(*MemberCount) PULONG *Attributes,
635 _Out_ PULONG MemberCount
644 _In_ ULONG Attributes
649 #define ALIAS_ADD_MEMBER 0x0001
650 #define ALIAS_REMOVE_MEMBER 0x0002
651 #define ALIAS_LIST_MEMBERS 0x0004
652 #define ALIAS_READ_INFORMATION 0x0008
653 #define ALIAS_WRITE_ACCOUNT 0x0010
655 #define ALIAS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
656 ALIAS_READ_INFORMATION | \
657 ALIAS_WRITE_ACCOUNT | \
658 ALIAS_LIST_MEMBERS | \
662 #define ALIAS_READ (STANDARD_RIGHTS_READ | \
665 #define ALIAS_WRITE (STANDARD_RIGHTS_WRITE | \
666 ALIAS_WRITE_ACCOUNT | \
670 #define ALIAS_EXECUTE (STANDARD_RIGHTS_EXECUTE | \
671 ALIAS_READ_INFORMATION)
701 #define ALIAS_ALL_NAME (0x00000001L)
702 #define ALIAS_ALL_MEMBER_COUNT (0x00000002L)
703 #define ALIAS_ALL_ADMIN_COMMENT (0x00000004L)
704 #define ALIAS_ALL_SHELL_ADMIN_OBJECT_PROPERTIES (0x00000008L)
720 _Outptr_ PVOID *Buffer,
721 _In_ ULONG PreferedMaximumLength,
722 _Out_ PULONG CountReturned
731 _In_ ACCESS_MASK DesiredAccess,
733 _Out_ PULONG RelativeId
741 _In_ ACCESS_MASK DesiredAccess,
759 _Outptr_ PVOID *Buffer
784 _In_reads_(MemberCount) PSID *MemberIds,
785 _In_ ULONG MemberCount
801 _In_reads_(MemberCount) PSID *MemberIds,
802 _In_ ULONG MemberCount
810 _Out_ _Deref_post_count_(*MemberCount) PSID **MemberIds,
811 _Out_ PULONG MemberCount
819 _In_ ULONG PassedCount,
820 _In_reads_(PassedCount) PSID *Sids,
821 _Out_ PULONG MembershipCount,
822 _Out_ _Deref_post_count_(*MembershipCount) PULONG *Aliases
827 #define GROUP_TYPE_BUILTIN_LOCAL_GROUP 0x00000001
828 #define GROUP_TYPE_ACCOUNT_GROUP 0x00000002
829 #define GROUP_TYPE_RESOURCE_GROUP 0x00000004
830 #define GROUP_TYPE_UNIVERSAL_GROUP 0x00000008
831 #define GROUP_TYPE_APP_BASIC_GROUP 0x00000010
832 #define GROUP_TYPE_APP_QUERY_GROUP 0x00000020
833 #define GROUP_TYPE_SECURITY_ENABLED 0x80000000
835 #define GROUP_TYPE_RESOURCE_BEHAVOIR (GROUP_TYPE_RESOURCE_GROUP | \
836 GROUP_TYPE_APP_BASIC_GROUP | \
837 GROUP_TYPE_APP_QUERY_GROUP)
841 #define USER_READ_GENERAL 0x0001
842 #define USER_READ_PREFERENCES 0x0002
843 #define USER_WRITE_PREFERENCES 0x0004
844 #define USER_READ_LOGON 0x0008
845 #define USER_READ_ACCOUNT 0x0010
846 #define USER_WRITE_ACCOUNT 0x0020
847 #define USER_CHANGE_PASSWORD 0x0040
848 #define USER_FORCE_PASSWORD_CHANGE 0x0080
849 #define USER_LIST_GROUPS 0x0100
850 #define USER_READ_GROUP_INFORMATION 0x0200
851 #define USER_WRITE_GROUP_INFORMATION 0x0400
853 #define USER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
854 USER_READ_PREFERENCES | \
857 USER_READ_GROUP_INFORMATION | \
858 USER_WRITE_PREFERENCES | \
859 USER_CHANGE_PASSWORD | \
860 USER_FORCE_PASSWORD_CHANGE | \
861 USER_READ_GENERAL | \
862 USER_READ_ACCOUNT | \
863 USER_WRITE_ACCOUNT | \
864 USER_WRITE_GROUP_INFORMATION)
866 #define USER_READ (STANDARD_RIGHTS_READ | \
867 USER_READ_PREFERENCES | \
869 USER_READ_ACCOUNT | \
871 USER_READ_GROUP_INFORMATION)
873 #define USER_WRITE (STANDARD_RIGHTS_WRITE | \
874 USER_WRITE_PREFERENCES | \
875 USER_CHANGE_PASSWORD)
877 #define USER_EXECUTE (STANDARD_RIGHTS_EXECUTE | \
878 USER_READ_GENERAL | \
879 USER_CHANGE_PASSWORD)
883 #define USER_ACCOUNT_DISABLED (0x00000001)
884 #define USER_HOME_DIRECTORY_REQUIRED (0x00000002)
885 #define USER_PASSWORD_NOT_REQUIRED (0x00000004)
886 #define USER_TEMP_DUPLICATE_ACCOUNT (0x00000008)
887 #define USER_NORMAL_ACCOUNT (0x00000010)
888 #define USER_MNS_LOGON_ACCOUNT (0x00000020)
889 #define USER_INTERDOMAIN_TRUST_ACCOUNT (0x00000040)
890 #define USER_WORKSTATION_TRUST_ACCOUNT (0x00000080)
891 #define USER_SERVER_TRUST_ACCOUNT (0x00000100)
892 #define USER_DONT_EXPIRE_PASSWORD (0x00000200)
893 #define USER_ACCOUNT_AUTO_LOCKED (0x00000400)
894 #define USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED (0x00000800)
895 #define USER_SMARTCARD_REQUIRED (0x00001000)
896 #define USER_TRUSTED_FOR_DELEGATION (0x00002000)
897 #define USER_NOT_DELEGATED (0x00004000)
898 #define USER_USE_DES_KEY_ONLY (0x00008000)
899 #define USER_DONT_REQUIRE_PREAUTH (0x00010000)
900 #define USER_PASSWORD_EXPIRED (0x00020000)
901 #define USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION (0x00040000)
902 #define USER_NO_AUTH_DATA_REQUIRED (0x00080000)
903 #define USER_PARTIAL_SECRETS_ACCOUNT (0x00100000)
904 #define USER_USE_AES_KEYS (0x00200000) // not used
906 #define NEXT_FREE_ACCOUNT_CONTROL_BIT (USER_USE_AES_KEYS << 1)
908 #define USER_MACHINE_ACCOUNT_MASK ( \
909 USER_INTERDOMAIN_TRUST_ACCOUNT | \
910 USER_WORKSTATION_TRUST_ACCOUNT | \
911 USER_SERVER_TRUST_ACCOUNT \
914 #define USER_ACCOUNT_TYPE_MASK ( \
915 USER_TEMP_DUPLICATE_ACCOUNT | \
916 USER_NORMAL_ACCOUNT | \
917 USER_MACHINE_ACCOUNT_MASK \
920 #define USER_COMPUTED_ACCOUNT_CONTROL_BITS ( \
921 USER_ACCOUNT_AUTO_LOCKED | \
922 USER_PASSWORD_EXPIRED \
927 #define SAM_DAYS_PER_WEEK (7)
928 #define SAM_HOURS_PER_WEEK (24 * SAM_DAYS_PER_WEEK)
929 #define SAM_MINUTES_PER_WEEK (60 * SAM_HOURS_PER_WEEK)
991 #include <pshpack4.h>
1028 #include <poppack.h>
1032 #define USER_ALL_USERNAME 0x00000001
1033 #define USER_ALL_FULLNAME 0x00000002
1034 #define USER_ALL_USERID 0x00000004
1035 #define USER_ALL_PRIMARYGROUPID 0x00000008
1036 #define USER_ALL_ADMINCOMMENT 0x00000010
1037 #define USER_ALL_USERCOMMENT 0x00000020
1038 #define USER_ALL_HOMEDIRECTORY 0x00000040
1039 #define USER_ALL_HOMEDIRECTORYDRIVE 0x00000080
1040 #define USER_ALL_SCRIPTPATH 0x00000100
1041 #define USER_ALL_PROFILEPATH 0x00000200
1042 #define USER_ALL_WORKSTATIONS 0x00000400
1043 #define USER_ALL_LASTLOGON 0x00000800
1044 #define USER_ALL_LASTLOGOFF 0x00001000
1045 #define USER_ALL_LOGONHOURS 0x00002000
1046 #define USER_ALL_BADPASSWORDCOUNT 0x00004000
1047 #define USER_ALL_LOGONCOUNT 0x00008000
1048 #define USER_ALL_PASSWORDCANCHANGE 0x00010000
1049 #define USER_ALL_PASSWORDMUSTCHANGE 0x00020000
1050 #define USER_ALL_PASSWORDLASTSET 0x00040000
1051 #define USER_ALL_ACCOUNTEXPIRES 0x00080000
1052 #define USER_ALL_USERACCOUNTCONTROL 0x00100000
1053 #define USER_ALL_PARAMETERS 0x00200000
1054 #define USER_ALL_COUNTRYCODE 0x00400000
1055 #define USER_ALL_CODEPAGE 0x00800000
1056 #define USER_ALL_NTPASSWORDPRESENT 0x01000000 // field AND boolean
1057 #define USER_ALL_LMPASSWORDPRESENT 0x02000000 // field AND boolean
1058 #define USER_ALL_PRIVATEDATA 0x04000000 // field AND boolean
1059 #define USER_ALL_PASSWORDEXPIRED 0x08000000
1060 #define USER_ALL_SECURITYDESCRIPTOR 0x10000000
1061 #define USER_ALL_OWFPASSWORD 0x20000000 // boolean
1063 #define USER_ALL_UNDEFINED_MASK 0xc0000000
1067 #define USER_ALL_READ_GENERAL_MASK (USER_ALL_USERNAME | \
1068 USER_ALL_FULLNAME | \
1070 USER_ALL_PRIMARYGROUPID | \
1071 USER_ALL_ADMINCOMMENT | \
1072 USER_ALL_USERCOMMENT)
1076 #define USER_ALL_READ_LOGON_MASK (USER_ALL_HOMEDIRECTORY | \
1077 USER_ALL_HOMEDIRECTORYDRIVE | \
1078 USER_ALL_SCRIPTPATH | \
1079 USER_ALL_PROFILEPATH | \
1080 USER_ALL_WORKSTATIONS | \
1081 USER_ALL_LASTLOGON | \
1082 USER_ALL_LASTLOGOFF | \
1083 USER_ALL_LOGONHOURS | \
1084 USER_ALL_BADPASSWORDCOUNT | \
1085 USER_ALL_LOGONCOUNT | \
1086 USER_ALL_PASSWORDCANCHANGE | \
1087 USER_ALL_PASSWORDMUSTCHANGE)
1091 #define USER_ALL_READ_ACCOUNT_MASK (USER_ALL_PASSWORDLASTSET | \
1092 USER_ALL_ACCOUNTEXPIRES | \
1093 USER_ALL_USERACCOUNTCONTROL | \
1094 USER_ALL_PARAMETERS)
1098 #define USER_ALL_READ_PREFERENCES_MASK (USER_ALL_COUNTRYCODE | \
1103 #define USER_ALL_READ_TRUSTED_MASK (USER_ALL_NTPASSWORDPRESENT | \
1104 USER_ALL_LMPASSWORDPRESENT | \
1105 USER_ALL_PASSWORDEXPIRED | \
1106 USER_ALL_SECURITYDESCRIPTOR | \
1107 USER_ALL_PRIVATEDATA)
1111 #define USER_ALL_READ_CANT_MASK USER_ALL_UNDEFINED_MASK
1115 #define USER_ALL_WRITE_ACCOUNT_MASK (USER_ALL_USERNAME | \
1116 USER_ALL_FULLNAME | \
1117 USER_ALL_PRIMARYGROUPID | \
1118 USER_ALL_HOMEDIRECTORY | \
1119 USER_ALL_HOMEDIRECTORYDRIVE | \
1120 USER_ALL_SCRIPTPATH | \
1121 USER_ALL_PROFILEPATH | \
1122 USER_ALL_ADMINCOMMENT | \
1123 USER_ALL_WORKSTATIONS | \
1124 USER_ALL_LOGONHOURS | \
1125 USER_ALL_ACCOUNTEXPIRES | \
1126 USER_ALL_USERACCOUNTCONTROL | \
1127 USER_ALL_PARAMETERS)
1131 #define USER_ALL_WRITE_PREFERENCES_MASK (USER_ALL_USERCOMMENT | \
1132 USER_ALL_COUNTRYCODE | \
1142 #define USER_ALL_WRITE_FORCE_PASSWORD_CHANGE_MASK \
1143 (USER_ALL_NTPASSWORDPRESENT | \
1144 USER_ALL_LMPASSWORDPRESENT | \
1145 USER_ALL_PASSWORDEXPIRED)
1149 #define USER_ALL_WRITE_TRUSTED_MASK (USER_ALL_LASTLOGON | \
1150 USER_ALL_LASTLOGOFF | \
1151 USER_ALL_BADPASSWORDCOUNT | \
1152 USER_ALL_LOGONCOUNT | \
1153 USER_ALL_PASSWORDLASTSET | \
1154 USER_ALL_SECURITYDESCRIPTOR | \
1155 USER_ALL_PRIVATEDATA)
1159 #define USER_ALL_WRITE_CANT_MASK (USER_ALL_USERID | \
1160 USER_ALL_PASSWORDCANCHANGE | \
1161 USER_ALL_PASSWORDMUSTCHANGE | \
1162 USER_ALL_UNDEFINED_MASK)
1186 #include <pshpack4.h>
1208 #include <poppack.h>
1210 #include <pshpack4.h>
1232 #include <poppack.h>
1306 #define USER_EXTENDED_FIELD_USER_TILE (0x00001000L)
1307 #define USER_EXTENDED_FIELD_PASSWORD_HINT (0x00002000L)
1308 #define USER_EXTENDED_FIELD_DONT_SHOW_IN_LOGON_UI (0x00004000L)
1309 #define USER_EXTENDED_FIELD_SHELL_ADMIN_OBJECT_PROPERTIES (0x00008000L)
1346 #define SAM_PWD_CHANGE_NO_ERROR 0
1347 #define SAM_PWD_CHANGE_PASSWORD_TOO_SHORT 1
1348 #define SAM_PWD_CHANGE_PWD_IN_HISTORY 2
1349 #define SAM_PWD_CHANGE_USERNAME_IN_PASSWORD 3
1350 #define SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD 4
1351 #define SAM_PWD_CHANGE_NOT_COMPLEX 5
1352 #define SAM_PWD_CHANGE_MACHINE_PASSWORD_NOT_DEFAULT 6
1353 #define SAM_PWD_CHANGE_FAILED_BY_FILTER 7
1354 #define SAM_PWD_CHANGE_PASSWORD_TOO_LONG 8
1355 #define SAM_PWD_CHANGE_FAILURE_REASON_MAX 8
1365 _In_ ULONG UserAccountControl,
1366 _Outptr_ PVOID *Buffer,
1367 _In_ ULONG PreferedMaximumLength,
1368 _Out_ PULONG CountReturned
1377 _In_ ACCESS_MASK DesiredAccess,
1379 _Out_ PULONG RelativeId
1388 _In_ ULONG AccountType,
1389 _In_ ACCESS_MASK DesiredAccess,
1391 _Out_ PULONG GrantedAccess,
1392 _Out_ PULONG RelativeId
1400 _In_ ACCESS_MASK DesiredAccess,
1418 _Outptr_ PVOID *Buffer
1436 _Out_ PULONG MembershipCount
1466 _Outptr_ PDOMAIN_PASSWORD_INFORMATION *EffectivePasswordPolicy,
1477 _In_ ULONG EntryCount,
1478 _In_ ULONG PreferredMaximumLength,
1479 _In_ PULONG TotalAvailable,
1480 _Out_ PULONG TotalReturned,
1481 _Out_ PULONG ReturnedEntryCount,
1482 _Outptr_ PVOID *SortedBuffer
1528 #define SAM_USER_ACCOUNT (0x00000001)
1529 #define SAM_GLOBAL_GROUP_ACCOUNT (0x00000002)
1530 #define SAM_LOCAL_GROUP_ACCOUNT (0x00000004)
1550 _In_ PSID DomainSid,
1553 _In_ ULONG ObjectRid,
1555 _In_ PLARGE_INTEGER ModifiedCount,
1559 #define SAM_DELTA_NOTIFY_ROUTINE "DeltaNotify"
1566 _In_ HANDLE NotificationEventHandle
1573 _In_ HANDLE NotificationEventHandle
1578 #define SAM_SID_COMPATIBILITY_ALL 0
1579 #define SAM_SID_COMPATIBILITY_LAX 1
1580 #define SAM_SID_COMPATIBILITY_STRICT 2
1607 #define SAM_VALIDATE_PASSWORD_LAST_SET 0x00000001
1608 #define SAM_VALIDATE_BAD_PASSWORD_TIME 0x00000002
1609 #define SAM_VALIDATE_LOCKOUT_TIME 0x00000004
1610 #define SAM_VALIDATE_BAD_PASSWORD_COUNT 0x00000008
1611 #define SAM_VALIDATE_PASSWORD_HISTORY_LENGTH 0x00000010
1612 #define SAM_VALIDATE_PASSWORD_HISTORY 0x00000020
1729 _In_opt_ PWSTR ServerName,