ReactOS  0.4.14-dev-608-gd495a4f
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 
312 {
327 
329 {
333 
335 {
339 
340 #ifndef _DOMAIN_PASSWORD_INFORMATION_DEFINED
341 #define _DOMAIN_PASSWORD_INFORMATION_DEFINED
343 {
350 #endif
351 
352 #include "pshpack4.h"
354 {
367 #include "poppack.h"
368 
370 {
373 
375 {
378 
380 {
383 
385 {
388 
390 {
393 
395 {
399 
401 {
404 
406 {
409 
410 #include "pshpack4.h"
412 {
418 #include "poppack.h"
419 
421 {
426 
428 {
433 
435 {
442 
444 {
450 
452 {
455 
457 {
460 
462 {
465 
466 typedef struct _GROUP_MEMBERSHIP
467 {
471 
472 typedef struct _LOGON_HOURS
473 {
477 
479 {
483 
485 {
516 
518 {
525 
527 {
533 
534 #include "pshpack4.h"
536 {
556 #include "poppack.h"
557 
559 {
562 
563 #include "pshpack4.h"
565 {
585 #include "poppack.h"
586 
588 {
592 
594 {
597 
599 {
602 
604 {
607 
609 {
613 
615 {
618 
620 {
623 
625 {
628 
630 {
633 
635 {
639 
641 {
644 
646 {
649 
651 {
654 
655 #include "pshpack4.h"
656 typedef struct _USER_ALL_INFORMATION
657 {
692 #include "poppack.h"
693 
695 {
699 
700 #define SAM_SID_COMPATIBILITY_ALL 0
701 #define SAM_SID_COMPATIBILITY_LAX 1
702 #define SAM_SID_COMPATIBILITY_STRICT 2
703 
704 
705 NTSTATUS
706 NTAPI
707 SamAddMemberToAlias(IN SAM_HANDLE AliasHandle,
708  IN PSID MemberId);
709 
710 NTSTATUS
711 NTAPI
712 SamAddMemberToGroup(IN SAM_HANDLE GroupHandle,
713  IN ULONG MemberId,
715 
716 NTSTATUS
717 NTAPI
719  IN PSID *MemberIds,
720  IN ULONG MemberCount);
721 
722 NTSTATUS
723 NTAPI
725  IN PUNICODE_STRING OldPassword,
726  IN PUNICODE_STRING NewPassword);
727 
728 NTSTATUS
729 NTAPI
731  IN PUNICODE_STRING UserName,
732  IN PUNICODE_STRING OldPassword,
733  IN PUNICODE_STRING NewPassword);
734 
735 NTSTATUS
736 NTAPI
738  IN PUNICODE_STRING UserName,
739  IN PUNICODE_STRING OldPassword,
740  IN PUNICODE_STRING NewPassword,
741  OUT PDOMAIN_PASSWORD_INFORMATION *EffectivePasswordPolicy,
742  OUT PUSER_PWD_CHANGE_FAILURE_INFORMATION *PasswordChangeFailureInfo);
743 
744 NTSTATUS
745 NTAPI
746 SamCloseHandle(IN SAM_HANDLE SamHandle);
747 
748 NTSTATUS
749 NTAPI
751  OUT PSAM_HANDLE ServerHandle,
754 
755 NTSTATUS
756 NTAPI
758  IN PUNICODE_STRING AccountName,
760  OUT PSAM_HANDLE AliasHandle,
761  OUT PULONG RelativeId);
762 
763 NTSTATUS
764 NTAPI
766  IN PUNICODE_STRING AccountName,
768  OUT PSAM_HANDLE GroupHandle,
769  OUT PULONG RelativeId);
770 
771 NTSTATUS
772 NTAPI
774  IN PUNICODE_STRING AccountName,
775  IN ULONG AccountType,
777  OUT PSAM_HANDLE UserHandle,
779  OUT PULONG RelativeId);
780 
781 NTSTATUS
782 NTAPI
783 SamCreateUserInDomain(IN SAM_HANDLE DomainHandle,
784  IN PUNICODE_STRING AccountName,
786  OUT PSAM_HANDLE UserHandle,
787  OUT PULONG RelativeId);
788 
789 NTSTATUS
790 NTAPI
791 SamDeleteAlias(IN SAM_HANDLE AliasHandle);
792 
793 NTSTATUS
794 NTAPI
795 SamDeleteGroup(IN SAM_HANDLE GroupHandle);
796 
797 NTSTATUS
798 NTAPI
799 SamDeleteUser(IN SAM_HANDLE UserHandle);
800 
801 NTSTATUS
802 NTAPI
804  IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
805  OUT PVOID *Buffer,
806  IN ULONG PreferedMaximumLength,
807  OUT PULONG CountReturned);
808 
809 NTSTATUS
810 NTAPI
812  IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
813  OUT PVOID *Buffer,
814  IN ULONG PreferedMaximumLength,
815  OUT PULONG CountReturned);
816 
817 NTSTATUS
818 NTAPI
820  IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
821  IN PVOID *Buffer,
822  IN ULONG PreferedMaximumLength,
823  OUT PULONG CountReturned);
824 
825 NTSTATUS
826 NTAPI
828  IN OUT PSAM_ENUMERATE_HANDLE EnumerationContext,
829  IN ULONG UserAccountControl,
830  OUT PVOID *Buffer,
831  IN ULONG PreferedMaximumLength,
832  OUT PULONG CountReturned);
833 
834 NTSTATUS
835 NTAPI
837 
838 NTSTATUS
839 NTAPI
840 SamGetAliasMembership(IN SAM_HANDLE DomainHandle,
841  IN ULONG PassedCount,
842  IN PSID *Sids,
843  OUT PULONG MembershipCount,
844  OUT PULONG *Aliases);
845 
846 NTSTATUS
847 NTAPI
849  OUT PULONG Mode);
850 
851 NTSTATUS
852 NTAPI
854  IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
856  OUT PULONG Index);
857 
858 NTSTATUS
859 NTAPI
862  OUT PULONG MembershipCount);
863 
864 NTSTATUS
865 NTAPI
867  OUT PSID **MemberIds,
868  OUT PULONG MemberCount);
869 
870 NTSTATUS
871 NTAPI
873  OUT PULONG *MemberIds,
875  OUT PULONG MemberCount);
876 
877 NTSTATUS
878 NTAPI
881  OUT PSID *DomainId);
882 
883 NTSTATUS
884 NTAPI
885 SamLookupIdsInDomain(IN SAM_HANDLE DomainHandle,
886  IN ULONG Count,
887  IN PULONG RelativeIds,
889  OUT PSID_NAME_USE *Use OPTIONAL);
890 
891 NTSTATUS
892 NTAPI
894  IN ULONG Count,
896  OUT PULONG *RelativeIds,
897  OUT PSID_NAME_USE *Use);
898 
899 NTSTATUS
900 NTAPI
901 SamOpenAlias(IN SAM_HANDLE DomainHandle,
903  IN ULONG AliasId,
904  OUT PSAM_HANDLE AliasHandle);
905 
906 NTSTATUS
907 NTAPI
908 SamOpenDomain(IN SAM_HANDLE ServerHandle,
910  IN PSID DomainId,
911  OUT PSAM_HANDLE DomainHandle);
912 
913 NTSTATUS
914 NTAPI
915 SamOpenGroup(IN SAM_HANDLE DomainHandle,
917  IN ULONG GroupId,
918  OUT PSAM_HANDLE GroupHandle);
919 
920 NTSTATUS
921 NTAPI
922 SamOpenUser(IN SAM_HANDLE DomainHandle,
924  IN ULONG UserId,
925  OUT PSAM_HANDLE UserHandle);
926 
927 NTSTATUS
928 NTAPI
930  IN DOMAIN_DISPLAY_INFORMATION DisplayInformation,
931  IN ULONG Index,
932  IN ULONG EntryCount,
933  IN ULONG PreferredMaximumLength,
934  OUT PULONG TotalAvailable,
935  OUT PULONG TotalReturned,
936  OUT PULONG ReturnedEntryCount,
937  OUT PVOID *SortedBuffer);
938 
939 NTSTATUS
940 NTAPI
942  IN ALIAS_INFORMATION_CLASS AliasInformationClass,
943  OUT PVOID *Buffer);
944 
945 NTSTATUS
946 NTAPI
948  IN DOMAIN_INFORMATION_CLASS DomainInformationClass,
949  OUT PVOID *Buffer);
950 
951 NTSTATUS
952 NTAPI
954  IN GROUP_INFORMATION_CLASS GroupInformationClass,
955  OUT PVOID *Buffer);
956 
957 NTSTATUS
958 NTAPI
960  IN USER_INFORMATION_CLASS UserInformationClass,
961  OUT PVOID *Buffer);
962 
963 NTSTATUS
964 NTAPI
968 
969 NTSTATUS
970 NTAPI
972  IN PSID MemberId);
973 
974 NTSTATUS
975 NTAPI
977  IN PSID MemberId);
978 
979 NTSTATUS
980 NTAPI
982  IN ULONG MemberId);
983 
984 NTSTATUS
985 NTAPI
987  IN PSID *MemberIds,
988  IN ULONG MemberCount);
989 
990 NTSTATUS
991 NTAPI
992 SamRidToSid(IN SAM_HANDLE ObjectHandle,
993  IN ULONG Rid,
994  OUT PSID *Sid);
995 
996 NTSTATUS
997 NTAPI
999  IN ALIAS_INFORMATION_CLASS AliasInformationClass,
1000  IN PVOID Buffer);
1001 
1002 NTSTATUS
1003 NTAPI
1005  IN DOMAIN_INFORMATION_CLASS DomainInformationClass,
1006  IN PVOID Buffer);
1007 
1008 NTSTATUS
1009 NTAPI
1011  IN GROUP_INFORMATION_CLASS GroupInformationClass,
1012  IN PVOID Buffer);
1013 
1014 NTSTATUS
1015 NTAPI
1017  IN USER_INFORMATION_CLASS UserInformationClass,
1018  IN PVOID Buffer);
1019 
1020 NTSTATUS
1021 NTAPI
1023  IN ULONG MemberId,
1024  IN ULONG Attributes);
1025 
1026 NTSTATUS
1027 NTAPI
1028 SamSetSecurityObject(IN SAM_HANDLE ObjectHandle,
1031 
1032 NTSTATUS
1033 NTAPI
1034 SamShutdownSamServer(IN SAM_HANDLE ServerHandle);
1035 
1036 #ifdef __cplusplus
1037 }
1038 #endif
1039 
1040 #endif /* _NTSAM_ */
LOGON_HOURS LogonHours
Definition: ntsam.h:682
struct _USER_GENERAL_INFORMATION * PUSER_GENERAL_INFORMATION
ULONG Attributes
Definition: ntsam.h:469
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:462
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:958
struct _GROUP_GENERAL_INFORMATION * PGROUP_GENERAL_INFORMATION
#define IN
Definition: typedefs.h:38
NTSTATUS NTAPI SamOpenDomain(IN SAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT PSAM_HANDLE DomainHandle)
Definition: samlib.c:1441
PWSTR Names[NAMES_COUNT]
LARGE_INTEGER PasswordMustChange
Definition: ntsam.h:550
enum _DOMAIN_DISPLAY_INFORMATION DOMAIN_DISPLAY_INFORMATION
ULONG PrimaryGroupId
Definition: ntsam.h:679
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1631
LARGE_INTEGER LastLogon
Definition: ntsam.h:576
LARGE_INTEGER AccountExpires
Definition: ntsam.h:661
struct _USER_LOGON_HOURS_INFORMATION USER_LOGON_HOURS_INFORMATION
struct _DOMAIN_GENERAL_INFORMATION * PDOMAIN_GENERAL_INFORMATION
LARGE_INTEGER PasswordLastSet
Definition: ntsam.h:660
NTSTATUS NTAPI SamRemoveMultipleMembersFromAlias(IN SAM_HANDLE AliasHandle, IN PSID *MemberIds, IN ULONG MemberCount)
Definition: samlib.c:1839
ULONG RelativeId
Definition: ntsam.h:468
struct _DOMAIN_GENERAL_INFORMATION2 DOMAIN_GENERAL_INFORMATION2
DOMAIN_SERVER_ENABLE_STATE DomainServerState
Definition: ntsam.h:360
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:594
UNICODE_STRING ScriptPath
Definition: ntsam.h:668
struct _GROUP_ATTRIBUTE_INFORMATION * PGROUP_ATTRIBUTE_INFORMATION
BOOLEAN PasswordExpired
Definition: ntsam.h:689
_In_ ULONG Mode
Definition: hubbusif.h:303
USHORT CountryCode
Definition: ntsam.h:685
NTSTATUS NTAPI SamSetMemberAttributesOfGroup(IN SAM_HANDLE GroupHandle, IN ULONG MemberId, IN ULONG Attributes)
Definition: samlib.c:2169
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:1614
NTSTATUS NTAPI SamAddMultipleMembersToAlias(IN SAM_HANDLE AliasHandle, IN PSID *MemberIds, IN ULONG MemberCount)
Definition: samlib.c:266
UNICODE_STRING PrivateData
Definition: ntsam.h:676
struct _DOMAIN_MODIFIED_INFORMATION DOMAIN_MODIFIED_INFORMATION
struct _USER_HOME_INFORMATION * PUSER_HOME_INFORMATION
BOOLEAN PrivateDataSensitive
Definition: ntsam.h:690
LARGE_INTEGER LockoutDuration
Definition: ntsam.h:422
struct _DOMAIN_STATE_INFORMATION * PDOMAIN_STATE_INFORMATION
struct _USER_LOGON_HOURS_INFORMATION * PUSER_LOGON_HOURS_INFORMATION
struct _DOMAIN_REPLICATION_INFORMATION * PDOMAIN_REPLICATION_INFORMATION
enum _DOMAIN_DISPLAY_INFORMATION * PDOMAIN_DISPLAY_INFORMATION
UNICODE_STRING WorkStations
Definition: ntsam.h:575
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:1789
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:752
NTSTATUS NTAPI SamSetInformationAlias(IN SAM_HANDLE AliasHandle, IN ALIAS_INFORMATION_CLASS AliasInformationClass, IN PVOID Buffer)
Definition: samlib.c:1883
UNICODE_STRING HomeDirectoryDrive
Definition: ntsam.h:667
unsigned char * PUCHAR
Definition: retypes.h:3
DOMAIN_SERVER_ROLE DomainServerRole
Definition: ntsam.h:391
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:802
NTSTATUS NTAPI SamRemoveMemberFromGroup(IN SAM_HANDLE GroupHandle, IN ULONG MemberId)
Definition: samlib.c:1814
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:526
DOMAIN_SERVER_ENABLE_STATE DomainServerState
Definition: ntsam.h:402
NTSTATUS NTAPI SamGetMembersInAlias(IN SAM_HANDLE AliasHandle, OUT PSID **MemberIds, OUT PULONG MemberCount)
Definition: samlib.c:1102
LONG NTSTATUS
Definition: precomp.h:26
struct _USER_EXPIRES_INFORMATION * PUSER_EXPIRES_INFORMATION
LARGE_INTEGER PasswordCanChange
Definition: ntsam.h:549
NTSTATUS NTAPI SamQueryInformationGroup(IN SAM_HANDLE GroupHandle, IN GROUP_INFORMATION_CLASS GroupInformationClass, OUT PVOID *Buffer)
Definition: samlib.c:1668
UNICODE_STRING Name
Definition: ntsam.h:268
UNICODE_STRING WorkStations
Definition: ntsam.h:631
BOOLEAN UasCompatibilityRequired
Definition: ntsam.h:362
struct _USER_SET_PASSWORD_INFORMATION * PUSER_SET_PASSWORD_INFORMATION
struct GROUP_ADM_COMMENT_INFORMATION * PGROUP_ADM_COMMENT_INFORMATION
UNICODE_STRING AdminComment
Definition: ntsam.h:463
BOOLEAN LmPasswordPresent
Definition: ntsam.h:687
_DOMAIN_INFORMATION_CLASS
Definition: ntsam.h:311
struct _DOMAIN_PASSWORD_INFORMATION DOMAIN_PASSWORD_INFORMATION
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
struct _ALIAS_NAME_INFORMATION * PALIAS_NAME_INFORMATION
struct _USER_ACCOUNT_NAME_INFORMATION * PUSER_ACCOUNT_NAME_INFORMATION
UNICODE_STRING ScriptPath
Definition: ntsam.h:543
struct _DOMAIN_LOGOFF_INFORMATION DOMAIN_LOGOFF_INFORMATION
UNICODE_STRING ProfilePath
Definition: ntsam.h:669
NTSTATUS NTAPI SamChangePasswordUser(IN SAM_HANDLE UserHandle, IN PUNICODE_STRING OldPassword, IN PUNICODE_STRING NewPassword)
Definition: samlib.c:299
UNICODE_STRING ProfilePath
Definition: ntsam.h:621
ULONG UserAccountControl
Definition: ntsam.h:680
TOpcodeData Groups[17][8]
LARGE_INTEGER LastLogon
Definition: ntsam.h:546
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:1722
LARGE_INTEGER ForceLogoff
Definition: ntsam.h:355
NTSTATUS NTAPI SamDeleteUser(IN SAM_HANDLE UserHandle)
Definition: samlib.c:724
USHORT UnitsPerWeek
Definition: ntsam.h:474
LARGE_INTEGER PasswordCanChange
Definition: ntsam.h:662
struct _SAM_SID_ENUMERATION * PSAM_SID_ENUMERATION
struct _DOMAIN_STATE_INFORMATION DOMAIN_STATE_INFORMATION
UNICODE_STRING LmPassword
Definition: ntsam.h:674
struct _USER_SCRIPT_INFORMATION * PUSER_SCRIPT_INFORMATION
struct _ALIAS_ADM_COMMENT_INFORMATION * PALIAS_ADM_COMMENT_INFORMATION
UNICODE_STRING Reserved1
Definition: ntsam.h:529
UNICODE_STRING UserName
Definition: ntsam.h:595
NTSTATUS NTAPI SamDeleteGroup(IN SAM_HANDLE GroupHandle)
Definition: samlib.c:696
LARGE_INTEGER CreationTime
Definition: ntsam.h:397
struct _USER_NAME_INFORMATION * PUSER_NAME_INFORMATION
_USER_INFORMATION_CLASS
Definition: ntsam.h:484
NTSTATUS NTAPI SamChangePasswordUser2(IN PUNICODE_STRING ServerName, IN PUNICODE_STRING UserName, IN PUNICODE_STRING OldPassword, IN PUNICODE_STRING NewPassword)
Definition: samlib.c:450
UNICODE_STRING OemInformation
Definition: ntsam.h:376
LARGE_INTEGER PasswordLastSet
Definition: ntsam.h:581
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:1335
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:1872
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:1641
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
PUCHAR LogonHours
Definition: ntsam.h:475
NTSTATUS NTAPI SamOpenAlias(IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG AliasId, OUT PSAM_HANDLE AliasHandle)
Definition: samlib.c:1412
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:634
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:852
USHORT BadPasswordCount
Definition: ntsam.h:552
LARGE_INTEGER MinPasswordAge
Definition: ntsam.h:348
UNICODE_STRING ProfilePath
Definition: ntsam.h:573
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:1220
LARGE_INTEGER DomainModifiedCount
Definition: ntsam.h:429
UNICODE_STRING HomeDirectory
Definition: ntsam.h:610
unsigned char BOOLEAN
struct _USER_PWD_CHANGE_FAILURE_INFORMATION USER_PWD_CHANGE_FAILURE_INFORMATION
UNICODE_STRING Password
Definition: ntsam.h:636
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:1058
_DOMAIN_SERVER_ROLE
Definition: ntsam.h:334
ULONG UserAccountControl
Definition: ntsam.h:554
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
Definition: rtlfuncs.h:1104
UNICODE_STRING UserComment
Definition: ntsam.h:523
_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:647
UNICODE_STRING AdminComment
Definition: ntsam.h:298
UNICODE_STRING UserName
Definition: ntsam.h:589
NTSTATUS NTAPI SamSetInformationGroup(IN SAM_HANDLE GroupHandle, IN GROUP_INFORMATION_CLASS GroupInformationClass, IN PVOID Buffer)
Definition: samlib.c:1937
UNICODE_STRING AdminComment
Definition: ntsam.h:670
struct _USER_PROFILE_INFORMATION * PUSER_PROFILE_INFORMATION
struct _DOMAIN_NAME_INFORMATION DOMAIN_NAME_INFORMATION
NTSTATUS NTAPI SamConnect(IN OUT PUNICODE_STRING ServerName OPTIONAL, OUT PSAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: samlib.c:498
UNICODE_STRING ScriptPath
Definition: ntsam.h:572
UNICODE_STRING DomainName
Definition: ntsam.h:381
NTSTATUS NTAPI SamSetSecurityObject(IN SAM_HANDLE ObjectHandle, IN SECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR SecurityDescriptor)
Definition: samlib.c:2196
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:357
struct _SAM_RID_ENUMERATION SAM_RID_ENUMERATION
UNICODE_STRING HomeDirectoryDrive
Definition: ntsam.h:571
enum _SID_NAME_USE * PSID_NAME_USE
UNICODE_STRING HomeDirectoryDrive
Definition: ntsam.h:542
struct _DOMAIN_LOGOFF_INFORMATION * PDOMAIN_LOGOFF_INFORMATION
UNICODE_STRING Name
Definition: ntsam.h:274
LARGE_INTEGER LockoutObservationWindow
Definition: ntsam.h:415
UNICODE_STRING UserName
Definition: ntsam.h:519
struct _USER_PWD_CHANGE_FAILURE_INFORMATION * PUSER_PWD_CHANGE_FAILURE_INFORMATION
struct _USER_PREFERENCES_INFORMATION USER_PREFERENCES_INFORMATION
PUCHAR SecurityDescriptor
Definition: ntsam.h:481
_DOMAIN_DISPLAY_INFORMATION
Definition: ntsam.h:301
NTSTATUS NTAPI SamShutdownSamServer(IN SAM_HANDLE ServerHandle)
Definition: samlib.c:2251
enum _DOMAIN_SERVER_ROLE DOMAIN_SERVER_ROLE
LARGE_INTEGER PasswordMustChange
Definition: ntsam.h:663
LARGE_INTEGER MaxPasswordAge
Definition: ntsam.h:347
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:1528
UNICODE_STRING HomeDirectory
Definition: ntsam.h:666
struct _USER_PROFILE_INFORMATION USER_PROFILE_INFORMATION
static const UCHAR Index[8]
Definition: usbohci.c:18
struct _USER_ACCOUNT_INFORMATION * PUSER_ACCOUNT_INFORMATION
enum _DOMAIN_SERVER_ROLE * PDOMAIN_SERVER_ROLE
LARGE_INTEGER LastLogoff
Definition: ntsam.h:577
struct _ALIAS_GENERAL_INFORMATION * PALIAS_GENERAL_INFORMATION
enum _ALIAS_INFORMATION_CLASS ALIAS_INFORMATION_CLASS
LARGE_INTEGER LastLogoff
Definition: ntsam.h:659
BOOLEAN UasCompatibilityRequired
Definition: ntsam.h:407
struct _GROUP_NAME_INFORMATION GROUP_NAME_INFORMATION
LARGE_INTEGER CreationTime
Definition: ntsam.h:430
UNICODE_STRING AdminComment
Definition: ntsam.h:574
UNICODE_STRING UserName
Definition: ntsam.h:664
struct _GROUP_MEMBERSHIP GROUP_MEMBERSHIP
UNICODE_STRING UserComment
Definition: ntsam.h:528
UNICODE_STRING OemInformation
Definition: ntsam.h:356
struct _DOMAIN_LOCKOUT_INFORMATION * PDOMAIN_LOCKOUT_INFORMATION
UNICODE_STRING FullName
Definition: ntsam.h:538
UNICODE_STRING FullName
Definition: ntsam.h:600
struct _GROUP_MEMBERSHIP * PGROUP_MEMBERSHIP
struct _USER_SET_PASSWORD_INFORMATION USER_SET_PASSWORD_INFORMATION
UNICODE_STRING FullName
Definition: ntsam.h:520
NTSTATUS NTAPI SamQueryInformationUser(IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, OUT PVOID *Buffer)
Definition: samlib.c:1695
UNICODE_STRING ReplicaSourceNodeName
Definition: ntsam.h:386
struct _USER_GENERAL_INFORMATION USER_GENERAL_INFORMATION
LARGE_INTEGER LockoutDuration
Definition: ntsam.h:414
DOMAIN_SERVER_ROLE DomainServerRole
Definition: ntsam.h:361
_DOMAIN_SERVER_ENABLE_STATE
Definition: ntsam.h:328
struct _USER_LOGON_INFORMATION * PUSER_LOGON_INFORMATION
BOOLEAN NtPasswordPresent
Definition: ntsam.h:688
struct _GROUP_GENERAL_INFORMATION GROUP_GENERAL_INFORMATION
LARGE_INTEGER LastLogoff
Definition: ntsam.h:547
UNICODE_STRING Name
Definition: ntsam.h:453
UNICODE_STRING WorkStations
Definition: ntsam.h:671
enum _DOMAIN_SERVER_ENABLE_STATE * PDOMAIN_SERVER_ENABLE_STATE
LARGE_INTEGER AccountExpires
Definition: ntsam.h:582
UNICODE_STRING FullName
Definition: ntsam.h:665
NTSTATUS NTAPI SamDeleteAlias(IN SAM_HANDLE AliasHandle)
Definition: samlib.c:668
struct _SAM_RID_ENUMERATION * PSAM_RID_ENUMERATION
struct GROUP_ADM_COMMENT_INFORMATION GROUP_ADM_COMMENT_INFORMATION
UNICODE_STRING Name
Definition: ntsam.h:445
struct _GROUP_NAME_INFORMATION * PGROUP_NAME_INFORMATION
LARGE_INTEGER ForceLogoff
Definition: ntsam.h:371
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES Attributes
Definition: hidpi.h:348
LARGE_INTEGER LastLogon
Definition: ntsam.h:658
struct _USER_HOME_INFORMATION USER_HOME_INFORMATION
struct _USER_WORKSTATIONS_INFORMATION * PUSER_WORKSTATIONS_INFORMATION
UNICODE_STRING AdminComment
Definition: ntsam.h:522
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:1499
struct _USER_PARAMETERS_INFORMATION * PUSER_PARAMETERS_INFORMATION
struct _USER_SCRIPT_INFORMATION USER_SCRIPT_INFORMATION
UNICODE_STRING UserName
Definition: ntsam.h:537
USHORT BadPasswordCount
Definition: ntsam.h:683
NTSTATUS NTAPI SamOpenGroup(IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG GroupId, OUT PSAM_HANDLE GroupHandle)
Definition: samlib.c:1470
UNICODE_STRING UserComment
Definition: ntsam.h:672
struct _DOMAIN_GENERAL_INFORMATION DOMAIN_GENERAL_INFORMATION
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
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:1144
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:359
NTSTATUS NTAPI SamGetCompatibilityMode(IN SAM_HANDLE ObjectHandle, OUT PULONG Mode)
Definition: samlib.c:1009
struct _USER_ADMIN_COMMENT_INFORMATION USER_ADMIN_COMMENT_INFORMATION
struct _DOMAIN_SERVER_ROLE_INFORMATION * PDOMAIN_SERVER_ROLE_INFORMATION
NTSTATUS NTAPI SamFreeMemory(IN PVOID Buffer)
Definition: samlib.c:947
struct _LOGON_HOURS * PLOGON_HOURS
struct _DOMAIN_UAS_INFORMATION DOMAIN_UAS_INFORMATION
LARGE_INTEGER PasswordLastSet
Definition: ntsam.h:548
UNICODE_STRING HomeDirectoryDrive
Definition: ntsam.h:611
NTSTATUS NTAPI SamCloseHandle(IN SAM_HANDLE SamHandle)
Definition: samlib.c:476
LOGON_HOURS LogonHours
Definition: ntsam.h:551
#define OUT
Definition: typedefs.h:39
LARGE_INTEGER DomainModifiedCount
Definition: ntsam.h:396
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:560
UNICODE_STRING ReplicaSourceNodeName
Definition: ntsam.h:358
DOMAIN_GENERAL_INFORMATION I1
Definition: ntsam.h:413
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 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:1193
NTSTATUS NTAPI SamAddMemberToAlias(IN SAM_HANDLE AliasHandle, IN PSID MemberId)
Definition: samlib.c:214
UNICODE_STRING FullName
Definition: ntsam.h:590
_GROUP_INFORMATION_CLASS
Definition: ntsam.h:434
UNICODE_STRING AdminComment
Definition: ntsam.h:626
struct _USER_FULL_NAME_INFORMATION USER_FULL_NAME_INFORMATION
UNICODE_STRING HomeDirectory
Definition: ntsam.h:570
struct _ALIAS_GENERAL_INFORMATION ALIAS_GENERAL_INFORMATION
UNICODE_STRING ScriptPath
Definition: ntsam.h:616
UNICODE_STRING NtPassword
Definition: ntsam.h:675
LOGON_HOURS LogonHours
Definition: ntsam.h:578
_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:423
UNICODE_STRING AdminComment
Definition: ntsam.h:448
NTSTATUS NTAPI SamSetInformationUser(IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, IN PVOID Buffer)
Definition: samlib.c:1964
NTSTATUS NTAPI SamSetInformationDomain(IN SAM_HANDLE DomainHandle, IN DOMAIN_INFORMATION_CLASS DomainInformationClass, IN PVOID Buffer)
Definition: samlib.c:1910
LARGE_INTEGER ModifiedCountAtLastPromotion
Definition: ntsam.h:431
UNICODE_STRING HomeDirectory
Definition: ntsam.h:541
ULONG ACCESS_MASK
Definition: nt_native.h:40
UNICODE_STRING FullName
Definition: ntsam.h:567
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:1025
NTSTATUS NTAPI SamRemoveMemberFromAlias(IN SAM_HANDLE AliasHandle, IN PSID MemberId)
Definition: samlib.c:1764
UNICODE_STRING ProfilePath
Definition: ntsam.h:544
struct _USER_ALL_INFORMATION USER_ALL_INFORMATION
SR_SECURITY_DESCRIPTOR SecurityDescriptor
Definition: ntsam.h:677
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:897
UNICODE_STRING WorkStations
Definition: ntsam.h:545
NTSTATUS NTAPI SamAddMemberToGroup(IN SAM_HANDLE GroupHandle, IN ULONG MemberId, IN ULONG Attributes)
Definition: samlib.c:239
UNICODE_STRING Parameters
Definition: ntsam.h:652
enum _USER_INFORMATION_CLASS USER_INFORMATION_CLASS
UNICODE_STRING Parameters
Definition: ntsam.h:673
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
UNICODE_STRING UserName
Definition: ntsam.h:566