ReactOS  0.4.15-dev-3182-g7b62228
ntsam.h
Go to the documentation of this file.
1 
2 #ifndef _NTSAM_
3 #define _NTSAM_
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 #define ALIAS_ADD_MEMBER 0x00000001
10 #define ALIAS_REMOVE_MEMBER 0x00000002
11 #define ALIAS_LIST_MEMBERS 0x00000004
12 #define ALIAS_READ_INFORMATION 0x00000008
13 #define ALIAS_WRITE_ACCOUNT 0x00000010
14 
15 #define ALIAS_READ (STANDARD_RIGHTS_READ |\
16  ALIAS_LIST_MEMBERS)
17 
18 #define ALIAS_WRITE (STANDARD_RIGHTS_WRITE |\
19  ALIAS_ADD_MEMBER |\
20  ALIAS_REMOVE_MEMBER |\
21  ALIAS_WRITE_ACCOUNT)
22 
23 #define ALIAS_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
24  ALIAS_READ_INFORMATION)
25 
26 #define ALIAS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
27  ALIAS_ADD_MEMBER |\
28  ALIAS_REMOVE_MEMBER |\
29  ALIAS_LIST_MEMBERS |\
30  ALIAS_READ_INFORMATION |\
31  ALIAS_WRITE_ACCOUNT)
32 
33 #define DOMAIN_READ_PASSWORD_PARAMETERS 0x00000001
34 #define DOMAIN_WRITE_PASSWORD_PARAMS 0x00000002
35 #define DOMAIN_READ_OTHER_PARAMETERS 0x00000004
36 #define DOMAIN_WRITE_OTHER_PARAMETERS 0x00000008
37 #define DOMAIN_CREATE_USER 0x00000010
38 #define DOMAIN_CREATE_GROUP 0x00000020
39 #define DOMAIN_CREATE_ALIAS 0x00000040
40 #define DOMAIN_GET_ALIAS_MEMBERSHIP 0x00000080
41 #define DOMAIN_LIST_ACCOUNTS 0x00000100
42 #define DOMAIN_LOOKUP 0x00000200
43 #define DOMAIN_ADMINISTER_SERVER 0x00000400
44 
45 #define DOMAIN_READ (STANDARD_RIGHTS_READ |\
46  DOMAIN_READ_OTHER_PARAMETERS |\
47  DOMAIN_GET_ALIAS_MEMBERSHIP)
48 
49 #define DOMAIN_WRITE (STANDARD_RIGHTS_WRITE |\
50  DOMAIN_WRITE_PASSWORD_PARAMS |\
51  DOMAIN_WRITE_OTHER_PARAMETERS |\
52  DOMAIN_CREATE_USER |\
53  DOMAIN_CREATE_GROUP |\
54  DOMAIN_CREATE_ALIAS |\
55  DOMAIN_ADMINISTER_SERVER)
56 
57 #define DOMAIN_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
58  DOMAIN_READ_PASSWORD_PARAMETERS |\
59  DOMAIN_LIST_ACCOUNTS |\
60  DOMAIN_LOOKUP)
61 
62 #define DOMAIN_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
63  DOMAIN_READ_PASSWORD_PARAMETERS |\
64  DOMAIN_WRITE_PASSWORD_PARAMS |\
65  DOMAIN_READ_OTHER_PARAMETERS |\
66  DOMAIN_WRITE_OTHER_PARAMETERS |\
67  DOMAIN_CREATE_USER |\
68  DOMAIN_CREATE_GROUP |\
69  DOMAIN_CREATE_ALIAS |\
70  DOMAIN_GET_ALIAS_MEMBERSHIP |\
71  DOMAIN_LIST_ACCOUNTS |\
72  DOMAIN_LOOKUP |\
73  DOMAIN_ADMINISTER_SERVER)
74 
75 #define GROUP_READ_INFORMATION 0x00000001
76 #define GROUP_WRITE_ACCOUNT 0x00000002
77 #define GROUP_ADD_MEMBER 0x00000004
78 #define GROUP_REMOVE_MEMBER 0x00000008
79 #define GROUP_LIST_MEMBERS 0x00000010
80 
81 #define GROUP_READ (STANDARD_RIGHTS_READ |\
82  GROUP_LIST_MEMBERS)
83 
84 #define GROUP_WRITE (STANDARD_RIGHTS_WRITE |\
85  GROUP_WRITE_ACCOUNT |\
86  GROUP_ADD_MEMBER |\
87  GROUP_REMOVE_MEMBER)
88 
89 #define GROUP_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
90  GROUP_READ_INFORMATION)
91 
92 #define GROUP_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
93  GROUP_READ_INFORMATION |\
94  GROUP_WRITE_ACCOUNT |\
95  GROUP_ADD_MEMBER |\
96  GROUP_REMOVE_MEMBER |\
97  GROUP_LIST_MEMBERS)
98 
99 #define SAM_SERVER_CONNECT 0x00000001
100 #define SAM_SERVER_SHUTDOWN 0x00000002
101 #define SAM_SERVER_INITIALIZE 0x00000004
102 #define SAM_SERVER_CREATE_DOMAIN 0x00000008
103 #define SAM_SERVER_ENUMERATE_DOMAINS 0x00000010
104 #define SAM_SERVER_LOOKUP_DOMAIN 0x00000020
105 
106 #define SAM_SERVER_READ (STANDARD_RIGHTS_READ |\
107  SAM_SERVER_ENUMERATE_DOMAINS)
108 
109 #define SAM_SERVER_WRITE (STANDARD_RIGHTS_WRITE |\
110  SAM_SERVER_SHUTDOWN |\
111  SAM_SERVER_INITIALIZE |\
112  SAM_SERVER_CREATE_DOMAIN)
113 
114 #define SAM_SERVER_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
115  SAM_SERVER_CONNECT |\
116  SAM_SERVER_LOOKUP_DOMAIN)
117 
118 #define SAM_SERVER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
119  SAM_SERVER_CONNECT |\
120  SAM_SERVER_SHUTDOWN |\
121  SAM_SERVER_INITIALIZE |\
122  SAM_SERVER_CREATE_DOMAIN |\
123  SAM_SERVER_ENUMERATE_DOMAINS |\
124  SAM_SERVER_LOOKUP_DOMAIN)
125 
126 #define USER_READ_GENERAL 0x00000001
127 #define USER_READ_PREFERENCES 0x00000002
128 #define USER_WRITE_PREFERENCES 0x00000004
129 #define USER_READ_LOGON 0x00000008
130 #define USER_READ_ACCOUNT 0x00000010
131 #define USER_WRITE_ACCOUNT 0x00000020
132 #define USER_CHANGE_PASSWORD 0x00000040
133 #define USER_FORCE_PASSWORD_CHANGE 0x00000080
134 #define USER_LIST_GROUPS 0x00000100
135 #define USER_READ_GROUP_INFORMATION 0x00000200
136 #define USER_WRITE_GROUP_INFORMATION 0x00000400
137 
138 #define USER_READ (STANDARD_RIGHTS_READ |\
139  USER_READ_PREFERENCES |\
140  USER_READ_LOGON |\
141  USER_READ_ACCOUNT |\
142  USER_LIST_GROUPS |\
143  USER_READ_GROUP_INFORMATION)
144 
145 #define USER_WRITE (STANDARD_RIGHTS_WRITE |\
146  USER_WRITE_PREFERENCES |\
147  USER_CHANGE_PASSWORD)
148 
149 #define USER_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
150  USER_READ_GENERAL |\
151  USER_CHANGE_PASSWORD)
152 
153 #define USER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
154  USER_READ_GENERAL |\
155  USER_READ_PREFERENCES |\
156  USER_WRITE_PREFERENCES |\
157  USER_READ_LOGON |\
158  USER_READ_ACCOUNT |\
159  USER_WRITE_ACCOUNT |\
160  USER_CHANGE_PASSWORD |\
161  USER_FORCE_PASSWORD_CHANGE |\
162  USER_LIST_GROUPS |\
163  USER_READ_GROUP_INFORMATION |\
164  USER_WRITE_GROUP_INFORMATION)
165 
166 /* User account control bits */
167 #define USER_ACCOUNT_DISABLED 0x00000001
168 #define USER_HOME_DIRECTORY_REQUIRED 0x00000002
169 #define USER_PASSWORD_NOT_REQUIRED 0x00000004
170 #define USER_TEMP_DUPLICATE_ACCOUNT 0x00000008
171 #define USER_NORMAL_ACCOUNT 0x00000010
172 #define USER_MNS_LOGON_ACCOUNT 0x00000020
173 #define USER_INTERDOMAIN_TRUST_ACCOUNT 0x00000040
174 #define USER_WORKSTATION_TRUST_ACCOUNT 0x00000080
175 #define USER_SERVER_TRUST_ACCOUNT 0x00000100
176 #define USER_DONT_EXPIRE_PASSWORD 0x00000200
177 #define USER_ACCOUNT_AUTO_LOCKED 0x00000400
178 #define USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED 0x00000800
179 #define USER_SMARTCARD_REQUIRED 0x00001000
180 #define USER_TRUSTED_FOR_DELEGATION 0x00002000
181 #define USER_NOT_DELEGATED 0x00004000
182 #define USER_USE_DES_KEY_ONLY 0x00008000
183 #define USER_DONT_REQUIRE_PREAUTH 0x00010000
184 #define USER_PASSWORD_EXPIRED 0x00020000
185 #define USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION 0x00040000
186 #define USER_NO_AUTH_DATA_REQUIRED 0x00080000
187 #define USER_PARTIAL_SECRETS_ACCOUNT 0x00100000
188 #define USER_USE_AES_KEYS 0x00200000
189 
190 /* Constants used by LOGON_HOURS.UnitsPerWeek */
191 #define SAM_DAYS_PER_WEEK (7)
192 #define SAM_HOURS_PER_WEEK (24 * SAM_DAYS_PER_WEEK)
193 #define SAM_MINUTES_PER_WEEK (60 * SAM_HOURS_PER_WEEK)
194 
195 /* Flags used by USER_ALL_INFORMATION.WhichField */
196 #define USER_ALL_USERNAME 0x00000001
197 #define USER_ALL_FULLNAME 0x00000002
198 #define USER_ALL_USERID 0x00000004
199 #define USER_ALL_PRIMARYGROUPID 0x00000008
200 #define USER_ALL_ADMINCOMMENT 0x00000010
201 #define USER_ALL_USERCOMMENT 0x00000020
202 #define USER_ALL_HOMEDIRECTORY 0x00000040
203 #define USER_ALL_HOMEDIRECTORYDRIVE 0x00000080
204 #define USER_ALL_SCRIPTPATH 0x00000100
205 #define USER_ALL_PROFILEPATH 0x00000200
206 #define USER_ALL_WORKSTATIONS 0x00000400
207 #define USER_ALL_LASTLOGON 0x00000800
208 #define USER_ALL_LASTLOGOFF 0x00001000
209 #define USER_ALL_LOGONHOURS 0x00002000
210 #define USER_ALL_BADPASSWORDCOUNT 0x00004000
211 #define USER_ALL_LOGONCOUNT 0x00008000
212 #define USER_ALL_PASSWORDCANCHANGE 0x00010000
213 #define USER_ALL_PASSWORDMUSTCHANGE 0x00020000
214 #define USER_ALL_PASSWORDLASTSET 0x00040000
215 #define USER_ALL_ACCOUNTEXPIRES 0x00080000
216 #define USER_ALL_USERACCOUNTCONTROL 0x00100000
217 #define USER_ALL_PARAMETERS 0x00200000
218 #define USER_ALL_COUNTRYCODE 0x00400000
219 #define USER_ALL_CODEPAGE 0x00800000
220 #define USER_ALL_NTPASSWORDPRESENT 0x01000000
221 #define USER_ALL_LMPASSWORDPRESENT 0x02000000
222 #define USER_ALL_PRIVATEDATA 0x04000000
223 #define USER_ALL_PASSWORDEXPIRED 0x08000000
224 #define USER_ALL_SECURITYDESCRIPTOR 0x10000000
225 #define USER_ALL_OWFPASSWORD 0x20000000
226 #define USER_ALL_UNDEFINED_MASK 0xC0000000
227 
228 #define USER_ALL_READ_GENERAL_MASK 0x0000003F
229 #define USER_ALL_READ_LOGON_MASK 0x0003FFC0
230 #define USER_ALL_READ_ACCOUNT_MASK 0x003C0000
231 #define USER_ALL_READ_PREFERENCES_MASK 0x00C00000
232 #define USER_ALL_READ_TRUSTED_MASK 0x1F000000
233 #define USER_ALL_READ_CANT_MASK 0xC0000000
234 
235 #define USER_ALL_WRITE_ACCOUNT_MASK 0x003827DB
236 #define USER_ALL_WRITE_PREFERENCES_MASK 0x00C00020
237 #define USER_ALL_WRITE_FORCE_PASSWORD_CHANGE_MASK 0x0B000000
238 #define USER_ALL_WRITE_TRUSTED_MASK 0x1404D800
239 #define USER_ALL_WRITE_CANT_MASK 0xC0030004
240 
241 /* Values used by USER_PWD_CHANGE_FAILURE_INFORMATION.ExtendedFailureReason */
242 #define SAM_PWD_CHANGE_NO_ERROR 0
243 #define SAM_PWD_CHANGE_PASSWORD_TOO_SHORT 1
244 #define SAM_PWD_CHANGE_PWD_IN_HISTORY 2
245 #define SAM_PWD_CHANGE_USERNAME_IN_PASSWORD 3
246 #define SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD 4
247 #define SAM_PWD_CHANGE_NOT_COMPLEX 5
248 #define SAM_PWD_CHANGE_MACHINE_PASSWORD_NOT_DEFAULT 6
249 #define SAM_PWD_CHANGE_FAILED_BY_FILTER 7
250 #define SAM_PWD_CHANGE_PASSWORD_TOO_LONG 8
251 #define SAM_PWD_CHANGE_FAILURE_REASON_MAX 8
252 
253 /* Flags used by DOMAIN_PASSWORD_INFORMATION.PasswordProperties */
254 #define DOMAIN_PASSWORD_COMPLEX 0x00000001L
255 #define DOMAIN_PASSWORD_NO_ANON_CHANGE 0x00000002L
256 #define DOMAIN_PASSWORD_NO_CLEAR_CHANGE 0x00000004L
257 #define DOMAIN_LOCKOUT_ADMINS 0x00000008L
258 #define DOMAIN_PASSWORD_STORE_CLEARTEXT 0x00000010L
259 #define DOMAIN_REFUSE_PASSWORD_CHANGE 0x00000020L
260 #define DOMAIN_NO_LM_OWF_CHANGE 0x00000040L
261 
264 
265 typedef struct _SAM_RID_ENUMERATION
266 {
270 
271 typedef struct _SAM_SID_ENUMERATION
272 {
276 
278 {
283 
285 {
290 
292 {
295 
297 {
300 
302 {
310 
311 typedef struct _DOMAIN_DISPLAY_USER
312 {
320 
322 {
329 
330 typedef struct _DOMAIN_DISPLAY_GROUP
331 {
338 
340 {
355 
357 {
361 
363 {
367 
368 #ifndef _DOMAIN_PASSWORD_INFORMATION_DEFINED
369 #define _DOMAIN_PASSWORD_INFORMATION_DEFINED
371 {
378 #endif
379 
380 #include "pshpack4.h"
382 {
395 #include "poppack.h"
396 
398 {
401 
403 {
406 
408 {
411 
413 {
416 
418 {
421 
423 {
427 
429 {
432 
434 {
437 
438 #include "pshpack4.h"
440 {
446 #include "poppack.h"
447 
449 {
454 
456 {
461 
463 {
470 
472 {
478 
480 {
483 
485 {
488 
490 {
493 
494 typedef struct _GROUP_MEMBERSHIP
495 {
499 
500 typedef struct _LOGON_HOURS
501 {
505 
507 {
511 
513 {
544 
546 {
553 
555 {
561 
562 #include "pshpack4.h"
564 {
584 #include "poppack.h"
585 
587 {
590 
591 #include "pshpack4.h"
593 {
613 #include "poppack.h"
614 
616 {
620 
622 {
625 
627 {
630 
632 {
635 
637 {
641 
643 {
646 
648 {
651 
653 {
656 
658 {
661 
663 {
667 
669 {
672 
674 {
677 
679 {
682 
683 #include "pshpack4.h"
684 typedef struct _USER_ALL_INFORMATION
685 {
720 #include "poppack.h"
721 
723 {
727 
728 #define SAM_SID_COMPATIBILITY_ALL 0
729 #define SAM_SID_COMPATIBILITY_LAX 1
730 #define SAM_SID_COMPATIBILITY_STRICT 2
731 
732 
733 NTSTATUS
734 NTAPI
735 SamAddMemberToAlias(IN SAM_HANDLE AliasHandle,
736  IN PSID MemberId);
737 
738 NTSTATUS
739 NTAPI
740 SamAddMemberToGroup(IN SAM_HANDLE GroupHandle,
741  IN ULONG MemberId,
743 
744 NTSTATUS
745 NTAPI
747  IN PSID *MemberIds,
748  IN ULONG MemberCount);
749 
750 NTSTATUS
751 NTAPI
753  IN PUNICODE_STRING OldPassword,
754  IN PUNICODE_STRING NewPassword);
755 
756 NTSTATUS
757 NTAPI
759  IN PUNICODE_STRING UserName,
760  IN PUNICODE_STRING OldPassword,
761  IN PUNICODE_STRING NewPassword);
762 
763 NTSTATUS
764 NTAPI
766  IN PUNICODE_STRING UserName,
767  IN PUNICODE_STRING OldPassword,
768  IN PUNICODE_STRING NewPassword,
769  OUT PDOMAIN_PASSWORD_INFORMATION *EffectivePasswordPolicy,
770  OUT PUSER_PWD_CHANGE_FAILURE_INFORMATION *PasswordChangeFailureInfo);
771 
772 NTSTATUS
773 NTAPI
774 SamCloseHandle(IN SAM_HANDLE SamHandle);
775 
776 NTSTATUS
777 NTAPI
779  OUT PSAM_HANDLE ServerHandle,
782 
783 NTSTATUS
784 NTAPI
786  IN PUNICODE_STRING AccountName,
788  OUT PSAM_HANDLE AliasHandle,
789  OUT PULONG RelativeId);
790 
791 NTSTATUS
792 NTAPI
794  IN PUNICODE_STRING AccountName,
796  OUT PSAM_HANDLE GroupHandle,
797  OUT PULONG RelativeId);
798 
799 NTSTATUS
800 NTAPI
802  IN PUNICODE_STRING AccountName,
803  IN ULONG AccountType,
805  OUT PSAM_HANDLE UserHandle,
807  OUT PULONG RelativeId);
808 
809 NTSTATUS
810 NTAPI
811 SamCreateUserInDomain(IN SAM_HANDLE DomainHandle,
812  IN PUNICODE_STRING AccountName,
814  OUT PSAM_HANDLE UserHandle,
815  OUT PULONG RelativeId);
816 
817 NTSTATUS
818 NTAPI
819 SamDeleteAlias(IN SAM_HANDLE AliasHandle);
820 
821 NTSTATUS
822 NTAPI
823 SamDeleteGroup(IN SAM_HANDLE GroupHandle);
824 
825 NTSTATUS
826 NTAPI
827 SamDeleteUser(IN SAM_HANDLE UserHandle);
828 
829 NTSTATUS
830 NTAPI
832  IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
833  OUT PVOID *Buffer,
834  IN ULONG PreferedMaximumLength,
835  OUT PULONG CountReturned);
836 
837 NTSTATUS
838 NTAPI
840  IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
841  OUT PVOID *Buffer,
842  IN ULONG PreferedMaximumLength,
843  OUT PULONG CountReturned);
844 
845 NTSTATUS
846 NTAPI
848  IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
849  IN PVOID *Buffer,
850  IN ULONG PreferedMaximumLength,
851  OUT PULONG CountReturned);
852 
853 NTSTATUS
854 NTAPI
856  IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
857  IN ULONG UserAccountControl,
858  OUT PVOID *Buffer,
859  IN ULONG PreferedMaximumLength,
860  OUT PULONG CountReturned);
861 
862 NTSTATUS
863 NTAPI
865 
866 NTSTATUS
867 NTAPI
868 SamGetAliasMembership(IN SAM_HANDLE DomainHandle,
869  IN ULONG PassedCount,
870  IN PSID *Sids,
871  OUT PULONG MembershipCount,
872  OUT PULONG *Aliases);
873 
874 NTSTATUS
875 NTAPI
877  OUT PULONG Mode);
878 
879 NTSTATUS
880 NTAPI
882  IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
884  OUT PULONG Index);
885 
886 NTSTATUS
887 NTAPI
890  OUT PULONG MembershipCount);
891 
892 NTSTATUS
893 NTAPI
895  OUT PSID **MemberIds,
896  OUT PULONG MemberCount);
897 
898 NTSTATUS
899 NTAPI
901  OUT PULONG *MemberIds,
903  OUT PULONG MemberCount);
904 
905 NTSTATUS
906 NTAPI
909  OUT PSID *DomainId);
910 
911 NTSTATUS
912 NTAPI
913 SamLookupIdsInDomain(IN SAM_HANDLE DomainHandle,
914  IN ULONG Count,
915  IN PULONG RelativeIds,
917  OUT PSID_NAME_USE *Use OPTIONAL);
918 
919 NTSTATUS
920 NTAPI
922  IN ULONG Count,
924  OUT PULONG *RelativeIds,
925  OUT PSID_NAME_USE *Use);
926 
927 NTSTATUS
928 NTAPI
929 SamOpenAlias(IN SAM_HANDLE DomainHandle,
931  IN ULONG AliasId,
932  OUT PSAM_HANDLE AliasHandle);
933 
934 NTSTATUS
935 NTAPI
936 SamOpenDomain(IN SAM_HANDLE ServerHandle,
938  IN PSID DomainId,
939  OUT PSAM_HANDLE DomainHandle);
940 
941 NTSTATUS
942 NTAPI
943 SamOpenGroup(IN SAM_HANDLE DomainHandle,
945  IN ULONG GroupId,
946  OUT PSAM_HANDLE GroupHandle);
947 
948 NTSTATUS
949 NTAPI
950 SamOpenUser(IN SAM_HANDLE DomainHandle,
952  IN ULONG UserId,
953  OUT PSAM_HANDLE UserHandle);
954 
955 NTSTATUS
956 NTAPI
958  IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
959  IN ULONG Index,
960  IN ULONG EntryCount,
961  IN ULONG PreferredMaximumLength,
962  OUT PULONG TotalAvailable,
963  OUT PULONG TotalReturned,
964  OUT PULONG ReturnedEntryCount,
965  OUT PVOID *SortedBuffer);
966 
967 NTSTATUS
968 NTAPI
970  IN ALIAS_INFORMATION_CLASS AliasInformationClass,
971  OUT PVOID *Buffer);
972 
973 NTSTATUS
974 NTAPI
976  IN DOMAIN_INFORMATION_CLASS DomainInformationClass,
977  OUT PVOID *Buffer);
978 
979 NTSTATUS
980 NTAPI
982  IN GROUP_INFORMATION_CLASS GroupInformationClass,
983  OUT PVOID *Buffer);
984 
985 NTSTATUS
986 NTAPI
988  IN USER_INFORMATION_CLASS UserInformationClass,
989  OUT PVOID *Buffer);
990 
991 NTSTATUS
992 NTAPI
996 
997 NTSTATUS
998 NTAPI
1000  IN PSID MemberId);
1001 
1002 NTSTATUS
1003 NTAPI
1005  IN PSID MemberId);
1006 
1007 NTSTATUS
1008 NTAPI
1010  IN ULONG MemberId);
1011 
1012 NTSTATUS
1013 NTAPI
1015  IN PSID *MemberIds,
1016  IN ULONG MemberCount);
1017 
1018 NTSTATUS
1019 NTAPI
1020 SamRidToSid(IN SAM_HANDLE ObjectHandle,
1021  IN ULONG Rid,
1022  OUT PSID *Sid);
1023 
1024 NTSTATUS
1025 NTAPI
1027  IN ALIAS_INFORMATION_CLASS AliasInformationClass,
1028  IN PVOID Buffer);
1029 
1030 NTSTATUS
1031 NTAPI
1033  IN DOMAIN_INFORMATION_CLASS DomainInformationClass,
1034  IN PVOID Buffer);
1035 
1036 NTSTATUS
1037 NTAPI
1039  IN GROUP_INFORMATION_CLASS GroupInformationClass,
1040  IN PVOID Buffer);
1041 
1042 NTSTATUS
1043 NTAPI
1045  IN USER_INFORMATION_CLASS UserInformationClass,
1046  IN PVOID Buffer);
1047 
1048 NTSTATUS
1049 NTAPI
1051  IN ULONG MemberId,
1052  IN ULONG Attributes);
1053 
1054 NTSTATUS
1055 NTAPI
1056 SamSetSecurityObject(IN SAM_HANDLE ObjectHandle,
1059 
1060 NTSTATUS
1061 NTAPI
1062 SamShutdownSamServer(IN SAM_HANDLE ServerHandle);
1063 
1064 #ifdef __cplusplus
1065 }
1066 #endif
1067 
1068 #endif /* _NTSAM_ */
LOGON_HOURS LogonHours
Definition: ntsam.h:710
struct _USER_GENERAL_INFORMATION * PUSER_GENERAL_INFORMATION
ULONG Attributes
Definition: ntsam.h:497
struct _DOMAIN_GENERAL_INFORMATION2 * PDOMAIN_GENERAL_INFORMATION2
struct _DOMAIN_REPLICATION_INFORMATION DOMAIN_REPLICATION_INFORMATION
struct _SAM_SID_ENUMERATION SAM_SID_ENUMERATION
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
NTSTATUS NTAPI SamChangePasswordUser3(IN PUNICODE_STRING ServerName, IN PUNICODE_STRING UserName, IN PUNICODE_STRING OldPassword, IN PUNICODE_STRING NewPassword, OUT PDOMAIN_PASSWORD_INFORMATION *EffectivePasswordPolicy, OUT PUSER_PWD_CHANGE_FAILURE_INFORMATION *PasswordChangeFailureInfo)
Definition: samlib.c:483
struct _DOMAIN_PASSWORD_INFORMATION * PDOMAIN_PASSWORD_INFORMATION
NTSTATUS NTAPI SamGetAliasMembership(IN SAM_HANDLE DomainHandle, IN ULONG PassedCount, IN PSID *Sids, OUT PULONG MembershipCount, OUT PULONG *Aliases)
Definition: samlib.c:994
struct _GROUP_GENERAL_INFORMATION * PGROUP_GENERAL_INFORMATION
#define IN
Definition: typedefs.h:39
NTSTATUS NTAPI SamOpenDomain(IN SAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT PSAM_HANDLE DomainHandle)
Definition: samlib.c:1477
LARGE_INTEGER PasswordMustChange
Definition: ntsam.h:578
enum _DOMAIN_DISPLAY_INFORMATION DOMAIN_DISPLAY_INFORMATION
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
Definition: wdfdevice.h:2654
ULONG PrimaryGroupId
Definition: ntsam.h:707
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1630
LARGE_INTEGER LastLogon
Definition: ntsam.h:604
LARGE_INTEGER AccountExpires
Definition: ntsam.h:689
struct _USER_LOGON_HOURS_INFORMATION USER_LOGON_HOURS_INFORMATION
struct _DOMAIN_GENERAL_INFORMATION * PDOMAIN_GENERAL_INFORMATION
LARGE_INTEGER PasswordLastSet
Definition: ntsam.h:688
NTSTATUS NTAPI SamRemoveMultipleMembersFromAlias(IN SAM_HANDLE AliasHandle, IN PSID *MemberIds, IN ULONG MemberCount)
Definition: samlib.c:1875
struct _DOMAIN_DISPLAY_GROUP * PDOMAIN_DISPLAY_GROUP
ULONG RelativeId
Definition: ntsam.h:496
struct _DOMAIN_GENERAL_INFORMATION2 DOMAIN_GENERAL_INFORMATION2
DOMAIN_SERVER_ENABLE_STATE DomainServerState
Definition: ntsam.h:388
struct _USER_EXPIRES_INFORMATION USER_EXPIRES_INFORMATION
struct _DOMAIN_MODIFIED_INFORMATION2 DOMAIN_MODIFIED_INFORMATION2
struct _USER_LOGON_INFORMATION USER_LOGON_INFORMATION
struct _USER_CONTROL_INFORMATION * PUSER_CONTROL_INFORMATION
NTSTATUS NTAPI SamCreateUser2InDomain(IN SAM_HANDLE DomainHandle, IN PUNICODE_STRING AccountName, IN ULONG AccountType, IN ACCESS_MASK DesiredAccess, OUT PSAM_HANDLE UserHandle, OUT PULONG GrantedAccess, OUT PULONG RelativeId)
Definition: samlib.c:630
UNICODE_STRING ScriptPath
Definition: ntsam.h:696
struct _GROUP_ATTRIBUTE_INFORMATION * PGROUP_ATTRIBUTE_INFORMATION
BOOLEAN PasswordExpired
Definition: ntsam.h:717
_In_ ULONG Mode
Definition: hubbusif.h:303
USHORT CountryCode
Definition: ntsam.h:713
NTSTATUS NTAPI SamSetMemberAttributesOfGroup(IN SAM_HANDLE GroupHandle, IN ULONG MemberId, IN ULONG Attributes)
Definition: samlib.c:2205
struct _USER_ACCOUNT_INFORMATION USER_ACCOUNT_INFORMATION
NTSTATUS NTAPI SamQueryInformationAlias(IN SAM_HANDLE AliasHandle, IN ALIAS_INFORMATION_CLASS AliasInformationClass, OUT PVOID *Buffer)
Definition: samlib.c:1650
NTSTATUS NTAPI SamAddMultipleMembersToAlias(IN SAM_HANDLE AliasHandle, IN PSID *MemberIds, IN ULONG MemberCount)
Definition: samlib.c:287
UNICODE_STRING PrivateData
Definition: ntsam.h:704
struct _DOMAIN_MODIFIED_INFORMATION DOMAIN_MODIFIED_INFORMATION
struct _USER_HOME_INFORMATION * PUSER_HOME_INFORMATION
BOOLEAN PrivateDataSensitive
Definition: ntsam.h:718
LARGE_INTEGER LockoutDuration
Definition: ntsam.h:450
struct _DOMAIN_STATE_INFORMATION * PDOMAIN_STATE_INFORMATION
struct _USER_LOGON_HOURS_INFORMATION * PUSER_LOGON_HOURS_INFORMATION
struct _DOMAIN_REPLICATION_INFORMATION * PDOMAIN_REPLICATION_INFORMATION
PWSTR Names[]
enum _DOMAIN_DISPLAY_INFORMATION * PDOMAIN_DISPLAY_INFORMATION
UNICODE_STRING WorkStations
Definition: ntsam.h:603
struct _USER_PARAMETERS_INFORMATION USER_PARAMETERS_INFORMATION
struct _USER_ACCOUNT_NAME_INFORMATION USER_ACCOUNT_NAME_INFORMATION
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:182
NTSTATUS NTAPI SamRemoveMemberFromForeignDomain(IN SAM_HANDLE DomainHandle, IN PSID MemberId)
Definition: samlib.c:1825
struct _DOMAIN_NAME_INFORMATION * PDOMAIN_NAME_INFORMATION
NTSTATUS NTAPI SamEnumerateAliasesInDomain(IN SAM_HANDLE DomainHandle, IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
Definition: samlib.c:788
NTSTATUS NTAPI SamSetInformationAlias(IN SAM_HANDLE AliasHandle, IN ALIAS_INFORMATION_CLASS AliasInformationClass, IN PVOID Buffer)
Definition: samlib.c:1919
UNICODE_STRING HomeDirectoryDrive
Definition: ntsam.h:695
unsigned char * PUCHAR
Definition: retypes.h:3
DOMAIN_SERVER_ROLE DomainServerRole
Definition: ntsam.h:419
NTSTATUS NTAPI SamEnumerateDomainsInSamServer(IN SAM_HANDLE ServerHandle, IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
Definition: samlib.c:838
NTSTATUS NTAPI SamRemoveMemberFromGroup(IN SAM_HANDLE GroupHandle, IN ULONG MemberId)
Definition: samlib.c:1850
struct _ALIAS_NAME_INFORMATION ALIAS_NAME_INFORMATION
NTSTATUS NTAPI SamCreateAliasInDomain(IN SAM_HANDLE DomainHandle, IN PUNICODE_STRING AccountName, IN ACCESS_MASK DesiredAccess, OUT PSAM_HANDLE AliasHandle, OUT PULONG RelativeId)
Definition: samlib.c:562
DOMAIN_SERVER_ENABLE_STATE DomainServerState
Definition: ntsam.h:430
NTSTATUS NTAPI SamGetMembersInAlias(IN SAM_HANDLE AliasHandle, OUT PSID **MemberIds, OUT PULONG MemberCount)
Definition: samlib.c:1138
LONG NTSTATUS
Definition: precomp.h:26
struct _USER_EXPIRES_INFORMATION * PUSER_EXPIRES_INFORMATION
LARGE_INTEGER PasswordCanChange
Definition: ntsam.h:577
NTSTATUS NTAPI SamQueryInformationGroup(IN SAM_HANDLE GroupHandle, IN GROUP_INFORMATION_CLASS GroupInformationClass, OUT PVOID *Buffer)
Definition: samlib.c:1704
UNICODE_STRING Name
Definition: ntsam.h:268
UNICODE_STRING WorkStations
Definition: ntsam.h:659
BOOLEAN UasCompatibilityRequired
Definition: ntsam.h:390
struct _USER_SET_PASSWORD_INFORMATION * PUSER_SET_PASSWORD_INFORMATION
struct GROUP_ADM_COMMENT_INFORMATION * PGROUP_ADM_COMMENT_INFORMATION
UNICODE_STRING AdminComment
Definition: ntsam.h:491
BOOLEAN LmPasswordPresent
Definition: ntsam.h:715
_DOMAIN_INFORMATION_CLASS
Definition: ntsam.h:339
struct _DOMAIN_PASSWORD_INFORMATION DOMAIN_PASSWORD_INFORMATION
struct _ALIAS_NAME_INFORMATION * PALIAS_NAME_INFORMATION
struct _USER_ACCOUNT_NAME_INFORMATION * PUSER_ACCOUNT_NAME_INFORMATION
UNICODE_STRING ScriptPath
Definition: ntsam.h:571
struct _DOMAIN_LOGOFF_INFORMATION DOMAIN_LOGOFF_INFORMATION
UNICODE_STRING ProfilePath
Definition: ntsam.h:697
NTSTATUS NTAPI SamChangePasswordUser(IN SAM_HANDLE UserHandle, IN PUNICODE_STRING OldPassword, IN PUNICODE_STRING NewPassword)
Definition: samlib.c:320
UNICODE_STRING ProfilePath
Definition: ntsam.h:649
ULONG UserAccountControl
Definition: ntsam.h:708
struct _DOMAIN_DISPLAY_MACHINE * PDOMAIN_DISPLAY_MACHINE
TOpcodeData Groups[17][8]
LARGE_INTEGER LastLogon
Definition: ntsam.h:574
struct _DOMAIN_OEM_INFORMATION * PDOMAIN_OEM_INFORMATION
struct _USER_FULL_NAME_INFORMATION * PUSER_FULL_NAME_INFORMATION
NTSTATUS NTAPI SamQuerySecurityObject(IN SAM_HANDLE ObjectHandle, IN SECURITY_INFORMATION SecurityInformation, OUT PSECURITY_DESCRIPTOR *SecurityDescriptor)
Definition: samlib.c:1758
LARGE_INTEGER ForceLogoff
Definition: ntsam.h:383
NTSTATUS NTAPI SamDeleteUser(IN SAM_HANDLE UserHandle)
Definition: samlib.c:760
USHORT UnitsPerWeek
Definition: ntsam.h:502
LARGE_INTEGER PasswordCanChange
Definition: ntsam.h:690
struct _SAM_SID_ENUMERATION * PSAM_SID_ENUMERATION
struct _DOMAIN_STATE_INFORMATION DOMAIN_STATE_INFORMATION
UNICODE_STRING LmPassword
Definition: ntsam.h:702
struct _USER_SCRIPT_INFORMATION * PUSER_SCRIPT_INFORMATION
struct _ALIAS_ADM_COMMENT_INFORMATION * PALIAS_ADM_COMMENT_INFORMATION
UNICODE_STRING Reserved1
Definition: ntsam.h:557
UNICODE_STRING UserName
Definition: ntsam.h:623
NTSTATUS NTAPI SamDeleteGroup(IN SAM_HANDLE GroupHandle)
Definition: samlib.c:732
LARGE_INTEGER CreationTime
Definition: ntsam.h:425
struct _USER_NAME_INFORMATION * PUSER_NAME_INFORMATION
_USER_INFORMATION_CLASS
Definition: ntsam.h:512
NTSTATUS NTAPI SamChangePasswordUser2(IN PUNICODE_STRING ServerName, IN PUNICODE_STRING UserName, IN PUNICODE_STRING OldPassword, IN PUNICODE_STRING NewPassword)
Definition: samlib.c:471
UNICODE_STRING OemInformation
Definition: ntsam.h:404
LARGE_INTEGER PasswordLastSet
Definition: ntsam.h:609
UNICODE_STRING LogonName
Definition: ntsam.h:316
NTSTATUS NTAPI SamLookupNamesInDomain(IN SAM_HANDLE DomainHandle, IN ULONG Count, IN PUNICODE_STRING Names, OUT PULONG *RelativeIds, OUT PSID_NAME_USE *Use)
Definition: samlib.c:1371
struct _DOMAIN_OEM_INFORMATION DOMAIN_OEM_INFORMATION
struct _USER_PRIMARY_GROUP_INFORMATION USER_PRIMARY_GROUP_INFORMATION
NTSTATUS NTAPI SamRidToSid(IN SAM_HANDLE ObjectHandle, IN ULONG Rid, OUT PSID *Sid)
Definition: samlib.c:1908
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
struct _USER_PRIMARY_GROUP_INFORMATION * PUSER_PRIMARY_GROUP_INFORMATION
struct _DOMAIN_LOCKOUT_INFORMATION DOMAIN_LOCKOUT_INFORMATION
enum _GROUP_INFORMATION_CLASS GROUP_INFORMATION_CLASS
struct _ALIAS_ADM_COMMENT_INFORMATION ALIAS_ADM_COMMENT_INFORMATION
NTSTATUS NTAPI SamQueryInformationDomain(IN SAM_HANDLE DomainHandle, IN DOMAIN_INFORMATION_CLASS DomainInformationClass, OUT PVOID *Buffer)
Definition: samlib.c:1677
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
PUCHAR LogonHours
Definition: ntsam.h:503
NTSTATUS NTAPI SamOpenAlias(IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG AliasId, OUT PSAM_HANDLE AliasHandle)
Definition: samlib.c:1448
struct _GROUP_ATTRIBUTE_INFORMATION GROUP_ATTRIBUTE_INFORMATION
NTSTATUS NTAPI SamCreateUserInDomain(IN SAM_HANDLE DomainHandle, IN PUNICODE_STRING AccountName, IN ACCESS_MASK DesiredAccess, OUT PSAM_HANDLE UserHandle, OUT PULONG RelativeId)
Definition: samlib.c:670
struct _USER_NAME_INFORMATION USER_NAME_INFORMATION
NTSTATUS NTAPI SamEnumerateGroupsInDomain(IN SAM_HANDLE DomainHandle, IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext, IN PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
Definition: samlib.c:888
USHORT BadPasswordCount
Definition: ntsam.h:580
LARGE_INTEGER MinPasswordAge
Definition: ntsam.h:376
UNICODE_STRING ProfilePath
Definition: ntsam.h:601
NTSTATUS NTAPI SamLookupIdsInDomain(IN SAM_HANDLE DomainHandle, IN ULONG Count, IN PULONG RelativeIds, OUT PUNICODE_STRING *Names, OUT PSID_NAME_USE *Use OPTIONAL)
Definition: samlib.c:1256
LARGE_INTEGER DomainModifiedCount
Definition: ntsam.h:457
UNICODE_STRING HomeDirectory
Definition: ntsam.h:638
unsigned char BOOLEAN
struct _USER_PWD_CHANGE_FAILURE_INFORMATION USER_PWD_CHANGE_FAILURE_INFORMATION
UNICODE_STRING Password
Definition: ntsam.h:664
struct _DOMAIN_MODIFIED_INFORMATION * PDOMAIN_MODIFIED_INFORMATION
enum _DOMAIN_INFORMATION_CLASS DOMAIN_INFORMATION_CLASS
NTSTATUS NTAPI SamGetGroupsForUser(IN SAM_HANDLE UserHandle, OUT PGROUP_MEMBERSHIP *Groups, OUT PULONG MembershipCount)
Definition: samlib.c:1094
_DOMAIN_SERVER_ROLE
Definition: ntsam.h:362
ULONG UserAccountControl
Definition: ntsam.h:582
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
Definition: rtlfuncs.h:1103
UNICODE_STRING UserComment
Definition: ntsam.h:551
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ SECURITY_INFORMATION SecurityInformation
Definition: fltkernel.h:1339
UNICODE_STRING AdminComment
Definition: ntsam.h:288
_ALIAS_INFORMATION_CLASS
Definition: ntsam.h:277
Definition: bufpool.h:45
struct _USER_ADMIN_COMMENT_INFORMATION * PUSER_ADMIN_COMMENT_INFORMATION
LARGE_INTEGER AccountExpires
Definition: ntsam.h:675
UNICODE_STRING AdminComment
Definition: ntsam.h:298
UNICODE_STRING UserName
Definition: ntsam.h:617
NTSTATUS NTAPI SamSetInformationGroup(IN SAM_HANDLE GroupHandle, IN GROUP_INFORMATION_CLASS GroupInformationClass, IN PVOID Buffer)
Definition: samlib.c:1973
UNICODE_STRING AdminComment
Definition: ntsam.h:698
struct _USER_PROFILE_INFORMATION * PUSER_PROFILE_INFORMATION
struct _DOMAIN_NAME_INFORMATION DOMAIN_NAME_INFORMATION
struct _DOMAIN_DISPLAY_USER * PDOMAIN_DISPLAY_USER
NTSTATUS NTAPI SamConnect(IN OUT PUNICODE_STRING ServerName OPTIONAL, OUT PSAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: samlib.c:519
UNICODE_STRING ScriptPath
Definition: ntsam.h:600
UNICODE_STRING DomainName
Definition: ntsam.h:409
NTSTATUS NTAPI SamSetSecurityObject(IN SAM_HANDLE ObjectHandle, IN SECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
Definition: samlib.c:2232
PVOID SAM_HANDLE
Definition: ntsam.h:262
PVOID * PSAM_HANDLE
Definition: ntsam.h:262
struct _USER_WORKSTATIONS_INFORMATION USER_WORKSTATIONS_INFORMATION
UNICODE_STRING DomainName
Definition: ntsam.h:385
struct _SAM_RID_ENUMERATION SAM_RID_ENUMERATION
UNICODE_STRING HomeDirectoryDrive
Definition: ntsam.h:599
int Count
Definition: noreturn.cpp:7
enum _SID_NAME_USE * PSID_NAME_USE
UNICODE_STRING HomeDirectoryDrive
Definition: ntsam.h:570
struct _DOMAIN_LOGOFF_INFORMATION * PDOMAIN_LOGOFF_INFORMATION
UNICODE_STRING Name
Definition: ntsam.h:274
LARGE_INTEGER LockoutObservationWindow
Definition: ntsam.h:443
UNICODE_STRING UserName
Definition: ntsam.h:547
struct _USER_PWD_CHANGE_FAILURE_INFORMATION * PUSER_PWD_CHANGE_FAILURE_INFORMATION
struct _USER_PREFERENCES_INFORMATION USER_PREFERENCES_INFORMATION
PUCHAR SecurityDescriptor
Definition: ntsam.h:509
_In_ WDFCOLLECTION _In_ ULONG Index
_DOMAIN_DISPLAY_INFORMATION
Definition: ntsam.h:301
UNICODE_STRING FullName
Definition: ntsam.h:318
NTSTATUS NTAPI SamShutdownSamServer(IN SAM_HANDLE ServerHandle)
Definition: samlib.c:2287
enum _DOMAIN_SERVER_ROLE DOMAIN_SERVER_ROLE
LARGE_INTEGER PasswordMustChange
Definition: ntsam.h:691
LARGE_INTEGER MaxPasswordAge
Definition: ntsam.h:375
UNICODE_STRING AdminComment
Definition: ntsam.h:317
NTSTATUS NTAPI SamQueryDisplayInformation(IN SAM_HANDLE DomainHandle, IN DOMAIN_DISPLAY_INFORMATION DisplayInformation, IN ULONG Index, IN ULONG EntryCount, IN ULONG PreferredMaximumLength, OUT PULONG TotalAvailable, OUT PULONG TotalReturned, OUT PULONG ReturnedEntryCount, OUT PVOID *SortedBuffer)
Definition: samlib.c:1564
UNICODE_STRING HomeDirectory
Definition: ntsam.h:694
struct _USER_PROFILE_INFORMATION USER_PROFILE_INFORMATION
struct _USER_ACCOUNT_INFORMATION * PUSER_ACCOUNT_INFORMATION
enum _DOMAIN_SERVER_ROLE * PDOMAIN_SERVER_ROLE
LARGE_INTEGER LastLogoff
Definition: ntsam.h:605
struct _DOMAIN_DISPLAY_GROUP DOMAIN_DISPLAY_GROUP
struct _ALIAS_GENERAL_INFORMATION * PALIAS_GENERAL_INFORMATION
UNICODE_STRING Group
Definition: ntsam.h:335
enum _ALIAS_INFORMATION_CLASS ALIAS_INFORMATION_CLASS
LARGE_INTEGER LastLogoff
Definition: ntsam.h:687
BOOLEAN UasCompatibilityRequired
Definition: ntsam.h:435
struct _GROUP_NAME_INFORMATION GROUP_NAME_INFORMATION
LARGE_INTEGER CreationTime
Definition: ntsam.h:458
UNICODE_STRING AdminComment
Definition: ntsam.h:602
UNICODE_STRING UserName
Definition: ntsam.h:692
struct _GROUP_MEMBERSHIP GROUP_MEMBERSHIP
UNICODE_STRING UserComment
Definition: ntsam.h:556
UNICODE_STRING OemInformation
Definition: ntsam.h:384
struct _DOMAIN_LOCKOUT_INFORMATION * PDOMAIN_LOCKOUT_INFORMATION
UNICODE_STRING FullName
Definition: ntsam.h:566
UNICODE_STRING FullName
Definition: ntsam.h:628
struct _GROUP_MEMBERSHIP * PGROUP_MEMBERSHIP
struct _USER_SET_PASSWORD_INFORMATION USER_SET_PASSWORD_INFORMATION
UNICODE_STRING FullName
Definition: ntsam.h:548
NTSTATUS NTAPI SamQueryInformationUser(IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, OUT PVOID *Buffer)
Definition: samlib.c:1731
UNICODE_STRING ReplicaSourceNodeName
Definition: ntsam.h:414
struct _USER_GENERAL_INFORMATION USER_GENERAL_INFORMATION
LARGE_INTEGER LockoutDuration
Definition: ntsam.h:442
DOMAIN_SERVER_ROLE DomainServerRole
Definition: ntsam.h:389
_DOMAIN_SERVER_ENABLE_STATE
Definition: ntsam.h:356
struct _USER_LOGON_INFORMATION * PUSER_LOGON_INFORMATION
BOOLEAN NtPasswordPresent
Definition: ntsam.h:716
struct _GROUP_GENERAL_INFORMATION GROUP_GENERAL_INFORMATION
LARGE_INTEGER LastLogoff
Definition: ntsam.h:575
UNICODE_STRING Name
Definition: ntsam.h:481
UNICODE_STRING WorkStations
Definition: ntsam.h:699
enum _DOMAIN_SERVER_ENABLE_STATE * PDOMAIN_SERVER_ENABLE_STATE
LARGE_INTEGER AccountExpires
Definition: ntsam.h:610
UNICODE_STRING FullName
Definition: ntsam.h:693
NTSTATUS NTAPI SamDeleteAlias(IN SAM_HANDLE AliasHandle)
Definition: samlib.c:704
struct _SAM_RID_ENUMERATION * PSAM_RID_ENUMERATION
struct GROUP_ADM_COMMENT_INFORMATION GROUP_ADM_COMMENT_INFORMATION
UNICODE_STRING Name
Definition: ntsam.h:473
struct _GROUP_NAME_INFORMATION * PGROUP_NAME_INFORMATION
LARGE_INTEGER ForceLogoff
Definition: ntsam.h:399
LARGE_INTEGER LastLogon
Definition: ntsam.h:686
struct _USER_HOME_INFORMATION USER_HOME_INFORMATION
struct _USER_WORKSTATIONS_INFORMATION * PUSER_WORKSTATIONS_INFORMATION
UNICODE_STRING AdminComment
Definition: ntsam.h:550
unsigned short USHORT
Definition: pedump.c:61
NTSTATUS NTAPI SamOpenUser(IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG UserId, OUT PSAM_HANDLE UserHandle)
Definition: samlib.c:1535
struct _USER_PARAMETERS_INFORMATION * PUSER_PARAMETERS_INFORMATION
struct _USER_SCRIPT_INFORMATION USER_SCRIPT_INFORMATION
UNICODE_STRING UserName
Definition: ntsam.h:565
USHORT BadPasswordCount
Definition: ntsam.h:711
NTSTATUS NTAPI SamOpenGroup(IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG GroupId, OUT PSAM_HANDLE GroupHandle)
Definition: samlib.c:1506
UNICODE_STRING UserComment
Definition: ntsam.h:700
struct _DOMAIN_GENERAL_INFORMATION DOMAIN_GENERAL_INFORMATION
struct _DOMAIN_DISPLAY_MACHINE DOMAIN_DISPLAY_MACHINE
struct _DOMAIN_MODIFIED_INFORMATION2 * PDOMAIN_MODIFIED_INFORMATION2
NTSTATUS NTAPI SamGetMembersInGroup(IN SAM_HANDLE GroupHandle, OUT PULONG *MemberIds, OUT PULONG *Attributes, OUT PULONG MemberCount)
Definition: samlib.c:1180
ULONG SAM_ENUMERATE_HANDLE
Definition: ntsam.h:263
unsigned int * PULONG
Definition: retypes.h:1
struct _USER_PREFERENCES_INFORMATION * PUSER_PREFERENCES_INFORMATION
LARGE_INTEGER DomainModifiedCount
Definition: ntsam.h:387
NTSTATUS NTAPI SamGetCompatibilityMode(IN SAM_HANDLE ObjectHandle, OUT PULONG Mode)
Definition: samlib.c:1045
struct _USER_ADMIN_COMMENT_INFORMATION USER_ADMIN_COMMENT_INFORMATION
UNICODE_STRING Machine
Definition: ntsam.h:326
struct _DOMAIN_SERVER_ROLE_INFORMATION * PDOMAIN_SERVER_ROLE_INFORMATION
NTSTATUS NTAPI SamFreeMemory(IN PVOID Buffer)
Definition: samlib.c:983
struct _LOGON_HOURS * PLOGON_HOURS
struct _DOMAIN_UAS_INFORMATION DOMAIN_UAS_INFORMATION
ULONG AccountControl
Definition: ntsam.h:315
LARGE_INTEGER PasswordLastSet
Definition: ntsam.h:576
UNICODE_STRING HomeDirectoryDrive
Definition: ntsam.h:639
NTSTATUS NTAPI SamCloseHandle(IN SAM_HANDLE SamHandle)
Definition: samlib.c:497
LOGON_HOURS LogonHours
Definition: ntsam.h:579
#define OUT
Definition: typedefs.h:40
LARGE_INTEGER DomainModifiedCount
Definition: ntsam.h:424
NTSTATUS NTAPI SamCreateGroupInDomain(IN SAM_HANDLE DomainHandle, IN PUNICODE_STRING AccountName, IN ACCESS_MASK DesiredAccess, OUT PSAM_HANDLE GroupHandle, OUT PULONG RelativeId)
Definition: samlib.c:596
UNICODE_STRING ReplicaSourceNodeName
Definition: ntsam.h:386
DOMAIN_GENERAL_INFORMATION I1
Definition: ntsam.h:441
unsigned int ULONG
Definition: retypes.h:1
enum _DOMAIN_SERVER_ENABLE_STATE DOMAIN_SERVER_ENABLE_STATE
enum _ALIAS_INFORMATION_CLASS * PALIAS_INFORMATION_CLASS
struct _USER_ALL_INFORMATION * PUSER_ALL_INFORMATION
UNICODE_STRING Name
Definition: ntsam.h:293
enum _USER_INFORMATION_CLASS * PUSER_INFORMATION_CLASS
UNICODE_STRING Comment
Definition: ntsam.h:336
UNICODE_STRING Name
Definition: ntsam.h:286
struct _SR_SECURITY_DESCRIPTOR SR_SECURITY_DESCRIPTOR
NTSTATUS NTAPI SamLookupDomainInSamServer(IN SAM_HANDLE ServerHandle, IN PUNICODE_STRING Name, OUT PSID *DomainId)
Definition: samlib.c:1229
NTSTATUS NTAPI SamAddMemberToAlias(IN SAM_HANDLE AliasHandle, IN PSID MemberId)
Definition: samlib.c:235
UNICODE_STRING FullName
Definition: ntsam.h:618
struct _DOMAIN_DISPLAY_USER DOMAIN_DISPLAY_USER
_GROUP_INFORMATION_CLASS
Definition: ntsam.h:462
UNICODE_STRING AdminComment
Definition: ntsam.h:654
struct _USER_FULL_NAME_INFORMATION USER_FULL_NAME_INFORMATION
UNICODE_STRING HomeDirectory
Definition: ntsam.h:598
struct _ALIAS_GENERAL_INFORMATION ALIAS_GENERAL_INFORMATION
UNICODE_STRING ScriptPath
Definition: ntsam.h:644
UNICODE_STRING NtPassword
Definition: ntsam.h:703
LOGON_HOURS LogonHours
Definition: ntsam.h:606
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET _In_ PGENERIC_MAPPING _In_ KPROCESSOR_MODE _Out_ PACCESS_MASK GrantedAccess
Definition: sefuncs.h:13
struct _DOMAIN_SERVER_ROLE_INFORMATION DOMAIN_SERVER_ROLE_INFORMATION
struct _LOGON_HOURS LOGON_HOURS
struct _USER_CONTROL_INFORMATION USER_CONTROL_INFORMATION
LARGE_INTEGER LockoutObservationWindow
Definition: ntsam.h:451
UNICODE_STRING AdminComment
Definition: ntsam.h:476
NTSTATUS NTAPI SamSetInformationUser(IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, IN PVOID Buffer)
Definition: samlib.c:2000
NTSTATUS NTAPI SamSetInformationDomain(IN SAM_HANDLE DomainHandle, IN DOMAIN_INFORMATION_CLASS DomainInformationClass, IN PVOID Buffer)
Definition: samlib.c:1946
UNICODE_STRING Comment
Definition: ntsam.h:327
LARGE_INTEGER ModifiedCountAtLastPromotion
Definition: ntsam.h:459
UNICODE_STRING HomeDirectory
Definition: ntsam.h:569
ULONG ACCESS_MASK
Definition: nt_native.h:40
UNICODE_STRING FullName
Definition: ntsam.h:595
ULONG * PSAM_ENUMERATE_HANDLE
Definition: ntsam.h:263
struct _SR_SECURITY_DESCRIPTOR * PSR_SECURITY_DESCRIPTOR
NTSTATUS NTAPI SamGetDisplayEnumerationIndex(IN SAM_HANDLE DomainHandle, IN DOMAIN_DISPLAY_INFORMATION DisplayInformation, IN PUNICODE_STRING Prefix, OUT PULONG Index)
Definition: samlib.c:1061
NTSTATUS NTAPI SamRemoveMemberFromAlias(IN SAM_HANDLE AliasHandle, IN PSID MemberId)
Definition: samlib.c:1800
UNICODE_STRING ProfilePath
Definition: ntsam.h:572
struct _USER_ALL_INFORMATION USER_ALL_INFORMATION
SR_SECURITY_DESCRIPTOR SecurityDescriptor
Definition: ntsam.h:705
NTSTATUS NTAPI SamEnumerateUsersInDomain(IN SAM_HANDLE DomainHandle, IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext, IN ULONG UserAccountControl, OUT PVOID *Buffer, IN ULONG PreferedMaximumLength, OUT PULONG CountReturned)
Definition: samlib.c:933
UNICODE_STRING WorkStations
Definition: ntsam.h:573
NTSTATUS NTAPI SamAddMemberToGroup(IN SAM_HANDLE GroupHandle, IN ULONG MemberId, IN ULONG Attributes)
Definition: samlib.c:260
UNICODE_STRING Parameters
Definition: ntsam.h:680
enum _USER_INFORMATION_CLASS USER_INFORMATION_CLASS
UNICODE_STRING Parameters
Definition: ntsam.h:701
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
UNICODE_STRING UserName
Definition: ntsam.h:594