ReactOS 0.4.16-dev-91-g764881a
sam.idl
Go to the documentation of this file.
1/*
2 * Security Account Manager interface definition
3 */
4
5#include <ms-dtyp.idl>
6
7cpp_quote("#ifndef _NTDEF_")
8typedef long NTSTATUS;
9cpp_quote("#endif")
10
11typedef struct _RPC_STRING
12{
13 unsigned short Length;
14 unsigned short MaximumLength;
15 [size_is(MaximumLength), length_is(Length)] char *Buffer;
16} RPC_STRING, *PRPC_STRING;
17
18typedef struct _OLD_LARGE_INTEGER
19{
20 unsigned long LowPart;
21 long HighPart;
22} OLD_LARGE_INTEGER, *POLD_LARGE_INTEGER;
23
24typedef [handle] wchar_t *PSAMPR_SERVER_NAME;
25
26typedef [context_handle] void *SAMPR_HANDLE;
27
28typedef struct _ENCRYPTED_LM_OWF_PASSWORD
29{
30 char data[16];
31} LM_OWF_PASSWORD, *PLM_OWF_PASSWORD,
32 NT_OWF_PASSWORD, *PNT_OWF_PASSWORD,
33 ENCRYPTED_LM_OWF_PASSWORD, *PENCRYPTED_LM_OWF_PASSWORD,
34 ENCRYPTED_NT_OWF_PASSWORD, *PENCRYPTED_NT_OWF_PASSWORD;
35
36typedef struct _SAMPR_ULONG_ARRAY
37{
38 unsigned long Count;
39 [size_is(Count)] unsigned long *Element;
40} SAMPR_ULONG_ARRAY, *PSAMPR_ULONG_ARRAY;
41
42typedef struct _SAMPR_SID_INFORMATION
43{
44 PRPC_SID SidPointer;
45} SAMPR_SID_INFORMATION, *PSAMPR_SID_INFORMATION;
46
47typedef struct _SAMPR_PSID_ARRAY
48{
49 [range(0, 1024)] unsigned long Count;
50 [size_is(Count)] PSAMPR_SID_INFORMATION Sids;
51} SAMPR_PSID_ARRAY, *PSAMPR_PSID_ARRAY;
52
53typedef struct _SAMPR_PSID_ARRAY_OUT
54{
55 unsigned long Count;
56 [size_is(Count)] PSAMPR_SID_INFORMATION Sids;
57} SAMPR_PSID_ARRAY_OUT, *PSAMPR_PSID_ARRAY_OUT;
58
59typedef struct _SAMPR_RETURNED_USTRING_ARRAY
60{
61 unsigned long Count;
62 [size_is(Count)] PRPC_UNICODE_STRING Element;
63} SAMPR_RETURNED_USTRING_ARRAY, *PSAMPR_RETURNED_USTRING_ARRAY;
64
65cpp_quote("#ifndef _WINNT_")
66typedef enum _SID_NAME_USE
67{
68 SidTypeUser = 1,
69 SidTypeGroup,
70 SidTypeDomain,
71 SidTypeAlias,
72 SidTypeWellKnownGroup,
73 SidTypeDeletedAccount,
74 SidTypeInvalid,
75 SidTypeUnknown,
76} SID_NAME_USE, *PSID_NAME_USE;
77cpp_quote("#endif")
78
79typedef struct RPC_SHORT_BLOB
80{
81 unsigned short Length;
82 unsigned short MaximumLength;
83 [size_is(MaximumLength/2), length_is(Length/2)]
84 unsigned short* Buffer;
85} RPC_SHORT_BLOB, *PRPC_SHORT_BLOB;
86
87typedef struct _SAMPR_RID_ENUMERATION
88{
89 unsigned long RelativeId;
90 RPC_UNICODE_STRING Name;
91} SAMPR_RID_ENUMERATION, *PSAMPR_RID_ENUMERATION;
92
93typedef struct _SAMPR_ENUMERATION_BUFFER
94{
95 unsigned long EntriesRead;
96 [size_is(EntriesRead)] PSAMPR_RID_ENUMERATION Buffer;
97} SAMPR_ENUMERATION_BUFFER, *PSAMPR_ENUMERATION_BUFFER;
98
99typedef struct _SAMPR_SR_SECURITY_DESCRIPTOR
100{
101 [range(0, 256 * 1024)] unsigned long Length;
102 [size_is(Length)] unsigned char* SecurityDescriptor;
103} SAMPR_SR_SECURITY_DESCRIPTOR, *PSAMPR_SR_SECURITY_DESCRIPTOR;
104
105cpp_quote("#ifndef _NTSAM_")
106typedef struct _GROUP_MEMBERSHIP
107{
108 unsigned long RelativeId;
109 unsigned long Attributes;
110} GROUP_MEMBERSHIP, *PGROUP_MEMBERSHIP;
111cpp_quote("#endif")
112
113typedef struct _SAMPR_GET_GROUPS_BUFFER
114{
115 unsigned long MembershipCount;
116 [size_is(MembershipCount)] PGROUP_MEMBERSHIP Groups;
117} SAMPR_GET_GROUPS_BUFFER, *PSAMPR_GET_GROUPS_BUFFER;
118
119typedef struct _SAMPR_GET_MEMBERS_BUFFER
120{
121 unsigned long MemberCount;
122 [size_is(MemberCount)] unsigned long* Members;
123 [size_is(MemberCount)] unsigned long* Attributes;
124} SAMPR_GET_MEMBERS_BUFFER, *PSAMPR_GET_MEMBERS_BUFFER;
125
126typedef struct _SAMPR_REVISION_INFO_V1
127{
128 unsigned long Revision;
129 unsigned long SupportedFeatures;
130} SAMPR_REVISION_INFO_V1, *PSAMPR_REVISION_INFO_V1;
131
132typedef [switch_type(unsigned long)] union
133{
134 [case(1)] SAMPR_REVISION_INFO_V1 V1;
135}SAMPR_REVISION_INFO, *PSAMPR_REVISION_INFO;
136
137typedef struct _USER_DOMAIN_PASSWORD_INFORMATION
138{
139 unsigned short MinPasswordLength;
140 unsigned long PasswordProperties;
141} USER_DOMAIN_PASSWORD_INFORMATION, *PUSER_DOMAIN_PASSWORD_INFORMATION;
142
143cpp_quote("#ifndef _NTSAM_")
144typedef enum _DOMAIN_SERVER_ENABLE_STATE
145{
146 DomainServerEnabled = 1,
147 DomainServerDisabled
148} DOMAIN_SERVER_ENABLE_STATE, *PDOMAIN_SERVER_ENABLE_STATE;
149
150typedef struct _DOMAIN_STATE_INFORMATION
151{
152 DOMAIN_SERVER_ENABLE_STATE DomainServerState;
153} DOMAIN_STATE_INFORMATION, *PDOMAIN_STATE_INFORMATION;
154cpp_quote("#endif")
155
156cpp_quote("#ifndef _NTSAM_")
157typedef enum _DOMAIN_SERVER_ROLE
158{
159 DomainServerRoleBackup = 2,
160 DomainServerRolePrimary = 3
161} DOMAIN_SERVER_ROLE, *PDOMAIN_SERVER_ROLE;
162cpp_quote("#endif")
163
164cpp_quote("#if !defined(_NTSECAPI_H) && !defined(_NTSAM_)")
165typedef struct _DOMAIN_PASSWORD_INFORMATION
166{
167 USHORT MinPasswordLength;
168 USHORT PasswordHistoryLength;
169 ULONG PasswordProperties;
170 OLD_LARGE_INTEGER MaxPasswordAge;
171 OLD_LARGE_INTEGER MinPasswordAge;
172} DOMAIN_PASSWORD_INFORMATION, *PDOMAIN_PASSWORD_INFORMATION;
173cpp_quote("#endif")
174
175cpp_quote("#ifndef _NTSAM_")
176typedef struct _DOMAIN_LOGOFF_INFORMATION
177{
178 OLD_LARGE_INTEGER ForceLogoff;
179} DOMAIN_LOGOFF_INFORMATION, *PDOMAIN_LOGOFF_INFORMATION;
180
181typedef struct _DOMAIN_SERVER_ROLE_INFORMATION
182{
183 DOMAIN_SERVER_ROLE DomainServerRole;
184} DOMAIN_SERVER_ROLE_INFORMATION, *PDOMAIN_SERVER_ROLE_INFORMATION;
185
186typedef struct _DOMAIN_MODIFIED_INFORMATION
187{
188 OLD_LARGE_INTEGER DomainModifiedCount;
189 OLD_LARGE_INTEGER CreationTime;
190} DOMAIN_MODIFIED_INFORMATION, *PDOMAIN_MODIFIED_INFORMATION;
191
192typedef struct _DOMAIN_MODIFIED_INFORMATION2
193{
194 OLD_LARGE_INTEGER DomainModifiedCount;
195 OLD_LARGE_INTEGER CreationTime;
196 OLD_LARGE_INTEGER ModifiedCountAtLastPromotion;
197} DOMAIN_MODIFIED_INFORMATION2, *PDOMAIN_MODIFIED_INFORMATION2;
198cpp_quote("#endif")
199
200cpp_quote("#include <pshpack4.h>")
201typedef struct _SAMPR_DOMAIN_GENERAL_INFORMATION
202{
203 OLD_LARGE_INTEGER ForceLogoff;
204 RPC_UNICODE_STRING OemInformation;
205 RPC_UNICODE_STRING DomainName;
206 RPC_UNICODE_STRING ReplicaSourceNodeName;
207 OLD_LARGE_INTEGER DomainModifiedCount;
208 unsigned long DomainServerState;
209 unsigned long DomainServerRole;
210 unsigned char UasCompatibilityRequired;
211 unsigned long UserCount;
212 unsigned long GroupCount;
213 unsigned long AliasCount;
214} SAMPR_DOMAIN_GENERAL_INFORMATION, *PSAMPR_DOMAIN_GENERAL_INFORMATION;
215
216typedef struct _SAMPR_DOMAIN_GENERAL_INFORMATION2
217{
218 SAMPR_DOMAIN_GENERAL_INFORMATION I1;
219 LARGE_INTEGER LockoutDuration;
220 LARGE_INTEGER LockoutObservationWindow;
221 unsigned short LockoutThreshold;
222} SAMPR_DOMAIN_GENERAL_INFORMATION2, *PSAMPR_DOMAIN_GENERAL_INFORMATION2;
223cpp_quote("#include <poppack.h>")
224
225typedef struct _SAMPR_DOMAIN_OEM_INFORMATION
226{
227 RPC_UNICODE_STRING OemInformation;
228} SAMPR_DOMAIN_OEM_INFORMATION, *PSAMPR_DOMAIN_OEM_INFORMATION;
229
230typedef struct _SAMPR_DOMAIN_NAME_INFORMATION
231{
232 RPC_UNICODE_STRING DomainName;
233} SAMPR_DOMAIN_NAME_INFORMATION, *PSAMPR_DOMAIN_NAME_INFORMATION;
234
235typedef struct SAMPR_DOMAIN_REPLICATION_INFORMATION
236{
237 RPC_UNICODE_STRING ReplicaSourceNodeName;
238} SAMPR_DOMAIN_REPLICATION_INFORMATION, *PSAMPR_DOMAIN_REPLICATION_INFORMATION;
239
240typedef struct _SAMPR_DOMAIN_LOCKOUT_INFORMATION
241{
242 LARGE_INTEGER LockoutDuration;
243 LARGE_INTEGER LockoutObservationWindow;
244 unsigned short LockoutThreshold;
245} SAMPR_DOMAIN_LOCKOUT_INFORMATION, *PSAMPR_DOMAIN_LOCKOUT_INFORMATION;
246
247cpp_quote("#ifndef _NTSAM_")
248typedef enum _DOMAIN_INFORMATION_CLASS
249{
250 DomainPasswordInformation = 1,
251 DomainGeneralInformation = 2,
252 DomainLogoffInformation = 3,
253 DomainOemInformation = 4,
254 DomainNameInformation = 5,
255 DomainReplicationInformation = 6,
256 DomainServerRoleInformation = 7,
257 DomainModifiedInformation = 8,
258 DomainStateInformation = 9,
259 DomainGeneralInformation2 = 11,
260 DomainLockoutInformation = 12,
261 DomainModifiedInformation2 = 13
262} DOMAIN_INFORMATION_CLASS;
263cpp_quote("#endif")
264
265typedef [switch_type(DOMAIN_INFORMATION_CLASS)] union _SAMPR_DOMAIN_INFO_BUFFER
266{
267 [case(DomainPasswordInformation)] DOMAIN_PASSWORD_INFORMATION Password;
268 [case(DomainGeneralInformation)] SAMPR_DOMAIN_GENERAL_INFORMATION General;
269 [case(DomainLogoffInformation)] DOMAIN_LOGOFF_INFORMATION Logoff;
270 [case(DomainOemInformation)] SAMPR_DOMAIN_OEM_INFORMATION Oem;
271 [case(DomainNameInformation)] SAMPR_DOMAIN_NAME_INFORMATION Name;
272 [case(DomainServerRoleInformation)] DOMAIN_SERVER_ROLE_INFORMATION Role;
273 [case(DomainReplicationInformation)] SAMPR_DOMAIN_REPLICATION_INFORMATION Replication;
274 [case(DomainModifiedInformation)] DOMAIN_MODIFIED_INFORMATION Modified;
275 [case(DomainStateInformation)] DOMAIN_STATE_INFORMATION State;
276 [case(DomainGeneralInformation2)] SAMPR_DOMAIN_GENERAL_INFORMATION2 General2;
277 [case(DomainLockoutInformation)] SAMPR_DOMAIN_LOCKOUT_INFORMATION Lockout;
278 [case(DomainModifiedInformation2)] DOMAIN_MODIFIED_INFORMATION2 Modified2;
279} SAMPR_DOMAIN_INFO_BUFFER, *PSAMPR_DOMAIN_INFO_BUFFER;
280
281cpp_quote("#ifndef _NTSAM_")
282typedef enum _DOMAIN_DISPLAY_INFORMATION
283{
284 DomainDisplayUser = 1,
285 DomainDisplayMachine,
286 DomainDisplayGroup,
287 DomainDisplayOemUser,
288 DomainDisplayOemGroup,
289 DomainDisplayServer
290} DOMAIN_DISPLAY_INFORMATION, *PDOMAIN_DISPLAY_INFORMATION;
291cpp_quote("#endif")
292
293typedef struct _SAMPR_DOMAIN_DISPLAY_USER
294{
295 unsigned long Index;
296 unsigned long Rid;
297 unsigned long AccountControl;
298 RPC_UNICODE_STRING AccountName;
299 RPC_UNICODE_STRING AdminComment;
300 RPC_UNICODE_STRING FullName;
301} SAMPR_DOMAIN_DISPLAY_USER, *PSAMPR_DOMAIN_DISPLAY_USER;
302
303typedef struct _SAMPR_DOMAIN_DISPLAY_MACHINE
304{
305 unsigned long Index;
306 unsigned long Rid;
307 unsigned long AccountControl;
308 RPC_UNICODE_STRING AccountName;
309 RPC_UNICODE_STRING AdminComment;
310} SAMPR_DOMAIN_DISPLAY_MACHINE, *PSAMPR_DOMAIN_DISPLAY_MACHINE;
311
312typedef struct _SAMPR_DOMAIN_DISPLAY_GROUP
313{
314 unsigned long Index;
315 unsigned long Rid;
316 unsigned long Attributes;
317 RPC_UNICODE_STRING AccountName;
318 RPC_UNICODE_STRING AdminComment;
319} SAMPR_DOMAIN_DISPLAY_GROUP, *PSAMPR_DOMAIN_DISPLAY_GROUP;
320
321typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_USER
322{
323 unsigned long Index;
324 RPC_STRING OemAccountName;
325} SAMPR_DOMAIN_DISPLAY_OEM_USER, *PSAMPR_DOMAIN_DISPLAY_OEM_USER;
326
327typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_GROUP
328{
329 unsigned long Index;
330 RPC_STRING OemAccountName;
331} SAMPR_DOMAIN_DISPLAY_OEM_GROUP, *PSAMPR_DOMAIN_DISPLAY_OEM_GROUP;
332
333typedef struct _SAMPR_DOMAIN_DISPLAY_USER_BUFFER
334{
335 unsigned long EntriesRead;
336 [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_USER Buffer;
337} SAMPR_DOMAIN_DISPLAY_USER_BUFFER, *PSAMPR_DOMAIN_DISPLAY_USER_BUFFER;
338
339typedef struct _SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER
340{
341 unsigned long EntriesRead;
342 [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_MACHINE Buffer;
343} SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER, *PSAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER;
344
345typedef struct _SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER
346{
347 unsigned long EntriesRead;
348 [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_GROUP Buffer;
349} SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER, *PSAMPR_DOMAIN_DISPLAY_GROUP_BUFFER;
350
351typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER
352{
353 unsigned long EntriesRead;
354 [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_OEM_USER Buffer;
355} SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER, *PSAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER;
356
357typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER
358{
359 unsigned long EntriesRead;
360 [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_OEM_GROUP Buffer;
361} SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER, *PSAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER;
362
363typedef [switch_type(DOMAIN_DISPLAY_INFORMATION)] union _SAMPR_DISPLAY_INFO_BUFFER
364{
365 [case(DomainDisplayUser)] SAMPR_DOMAIN_DISPLAY_USER_BUFFER UserInformation;
366 [case(DomainDisplayMachine)] SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER MachineInformation;
367 [case(DomainDisplayGroup)] SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER GroupInformation;
368 [case(DomainDisplayOemUser)] SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER OemUserInformation;
369 [case(DomainDisplayOemGroup)] SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER OemGroupInformation;
370} SAMPR_DISPLAY_INFO_BUFFER, *PSAMPR_DISPLAY_INFO_BUFFER;
371
372typedef struct _SAMPR_GROUP_ATTRIBUTE_INFORMATION
373{
374 unsigned long Attributes;
375} SAMPR_GROUP_ATTRIBUTE_INFORMATION, *PSAMPR_GROUP_ATTRIBUTE_INFORMATION;
376
377typedef struct _SAMPR_GROUP_GENERAL_INFORMATION
378{
379 RPC_UNICODE_STRING Name;
380 unsigned long Attributes;
381 unsigned long MemberCount;
382 RPC_UNICODE_STRING AdminComment;
383} SAMPR_GROUP_GENERAL_INFORMATION, *PSAMPR_GROUP_GENERAL_INFORMATION;
384
385typedef struct _SAMPR_GROUP_NAME_INFORMATION
386{
387 RPC_UNICODE_STRING Name;
388} SAMPR_GROUP_NAME_INFORMATION, *PSAMPR_GROUP_NAME_INFORMATION;
389
390typedef struct _SAMPR_GROUP_ADM_COMMENT_INFORMATION
391{
392 RPC_UNICODE_STRING AdminComment;
393} SAMPR_GROUP_ADM_COMMENT_INFORMATION, *PSAMPR_GROUP_ADM_COMMENT_INFORMATION;
394
395cpp_quote("#ifndef _NTSAM_")
396typedef enum _GROUP_INFORMATION_CLASS
397{
398 GroupGeneralInformation = 1,
399 GroupNameInformation,
400 GroupAttributeInformation,
401 GroupAdminCommentInformation,
402 GroupReplicationInformation
403} GROUP_INFORMATION_CLASS;
404cpp_quote("#endif")
405
406typedef [switch_type(GROUP_INFORMATION_CLASS)] union _SAMPR_GROUP_INFO_BUFFER
407{
408 [case(GroupGeneralInformation)] SAMPR_GROUP_GENERAL_INFORMATION General;
409 [case(GroupNameInformation)] SAMPR_GROUP_NAME_INFORMATION Name;
410 [case(GroupAttributeInformation)] SAMPR_GROUP_ATTRIBUTE_INFORMATION Attribute;
411 [case(GroupAdminCommentInformation)] SAMPR_GROUP_ADM_COMMENT_INFORMATION AdminComment;
412 [case(GroupReplicationInformation)] SAMPR_GROUP_GENERAL_INFORMATION DoNotUse;
413} SAMPR_GROUP_INFO_BUFFER, *PSAMPR_GROUP_INFO_BUFFER;
414
415typedef struct _SAMPR_ALIAS_GENERAL_INFORMATION
416{
417 RPC_UNICODE_STRING Name;
418 ULONG MemberCount;
419 RPC_UNICODE_STRING AdminComment;
420} SAMPR_ALIAS_GENERAL_INFORMATION, *PSAMPR_ALIAS_GENERAL_INFORMATION;
421
422typedef struct _SAMPR_ALIAS_NAME_INFORMATION
423{
424 RPC_UNICODE_STRING Name;
425} SAMPR_ALIAS_NAME_INFORMATION, *PSAMPR_ALIAS_NAME_INFORMATION;
426
427typedef struct _SAMPR_ALIAS_ADM_COMMENT_INFORMATION
428{
429 RPC_UNICODE_STRING AdminComment;
430} SAMPR_ALIAS_ADM_COMMENT_INFORMATION, *PSAMPR_ALIAS_ADM_COMMENT_INFORMATION;
431
432cpp_quote("#ifndef _NTSAM_")
433typedef enum _ALIAS_INFORMATION_CLASS
434{
435 AliasGeneralInformation = 1,
436 AliasNameInformation,
437 AliasAdminCommentInformation,
438} ALIAS_INFORMATION_CLASS;
439cpp_quote("#endif")
440
441typedef [switch_type(ALIAS_INFORMATION_CLASS)] union _SAMPR_ALIAS_INFO_BUFFER
442{
443 [case(AliasGeneralInformation)] SAMPR_ALIAS_GENERAL_INFORMATION General;
444 [case(AliasNameInformation)] SAMPR_ALIAS_NAME_INFORMATION Name;
445 [case(AliasAdminCommentInformation)] SAMPR_ALIAS_ADM_COMMENT_INFORMATION AdminComment;
446} SAMPR_ALIAS_INFO_BUFFER, *PSAMPR_ALIAS_INFO_BUFFER;
447
448typedef struct _SAMPR_ENCRYPTED_USER_PASSWORD
449{
450 unsigned char Buffer[(256 * 2) + 4];
451} SAMPR_ENCRYPTED_USER_PASSWORD, *PSAMPR_ENCRYPTED_USER_PASSWORD;
452
453typedef struct _SAMPR_ENCRYPTED_USER_PASSWORD_NEW
454{
455 unsigned char Buffer[(256 * 2) + 4 + 16];
456} SAMPR_ENCRYPTED_USER_PASSWORD_NEW, *PSAMPR_ENCRYPTED_USER_PASSWORD_NEW;
457
458cpp_quote("#ifndef _NTSAM_")
459typedef struct _USER_PRIMARY_GROUP_INFORMATION
460{
461 unsigned long PrimaryGroupId;
462} USER_PRIMARY_GROUP_INFORMATION, *PUSER_PRIMARY_GROUP_INFORMATION;
463
464typedef struct _USER_CONTROL_INFORMATION
465{
466 unsigned long UserAccountControl;
467} USER_CONTROL_INFORMATION, *PUSER_CONTROL_INFORMATION;
468
469typedef struct _USER_EXPIRES_INFORMATION
470{
471 OLD_LARGE_INTEGER AccountExpires;
472} USER_EXPIRES_INFORMATION, *PUSER_EXPIRES_INFORMATION;
473cpp_quote("#endif")
474
475typedef struct _SAMPR_LOGON_HOURS
476{
477 unsigned short UnitsPerWeek;
478 [size_is(1260), length_is((UnitsPerWeek + 7) / 8)] unsigned char *LogonHours; // FIXME
479} SAMPR_LOGON_HOURS, *PSAMPR_LOGON_HOURS;
480
481typedef struct _SAMPR_USER_ALL_INFORMATION
482{
483 OLD_LARGE_INTEGER LastLogon;
484 OLD_LARGE_INTEGER LastLogoff;
485 OLD_LARGE_INTEGER PasswordLastSet;
486 OLD_LARGE_INTEGER AccountExpires;
487 OLD_LARGE_INTEGER PasswordCanChange;
488 OLD_LARGE_INTEGER PasswordMustChange;
489 RPC_UNICODE_STRING UserName;
490 RPC_UNICODE_STRING FullName;
491 RPC_UNICODE_STRING HomeDirectory;
492 RPC_UNICODE_STRING HomeDirectoryDrive;
493 RPC_UNICODE_STRING ScriptPath;
494 RPC_UNICODE_STRING ProfilePath;
495 RPC_UNICODE_STRING AdminComment;
496 RPC_UNICODE_STRING WorkStations;
497 RPC_UNICODE_STRING UserComment;
498 RPC_UNICODE_STRING Parameters;
499 RPC_SHORT_BLOB LmOwfPassword;
500 RPC_SHORT_BLOB NtOwfPassword;
501 RPC_UNICODE_STRING PrivateData;
502 SAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor;
503 unsigned long UserId;
504 unsigned long PrimaryGroupId;
505 unsigned long UserAccountControl;
506 unsigned long WhichFields;
507 SAMPR_LOGON_HOURS LogonHours;
508 unsigned short BadPasswordCount;
509 unsigned short LogonCount;
510 unsigned short CountryCode;
511 unsigned short CodePage;
512 unsigned char LmPasswordPresent;
513 unsigned char NtPasswordPresent;
514 unsigned char PasswordExpired;
515 unsigned char PrivateDataSensitive;
516} SAMPR_USER_ALL_INFORMATION, *PSAMPR_USER_ALL_INFORMATION;
517
518typedef struct _SAMPR_USER_GENERAL_INFORMATION
519{
520 RPC_UNICODE_STRING UserName;
521 RPC_UNICODE_STRING FullName;
522 unsigned long PrimaryGroupId;
523 RPC_UNICODE_STRING AdminComment;
524 RPC_UNICODE_STRING UserComment;
525} SAMPR_USER_GENERAL_INFORMATION, *PSAMPR_USER_GENERAL_INFORMATION;
526
527typedef struct _SAMPR_USER_PREFERENCES_INFORMATION
528{
529 RPC_UNICODE_STRING UserComment;
530 RPC_UNICODE_STRING Reserved1;
531 unsigned short CountryCode;
532 unsigned short CodePage;
533} SAMPR_USER_PREFERENCES_INFORMATION, *PSAMPR_USER_PREFERENCES_INFORMATION;
534
535typedef struct _SAMPR_USER_PARAMETERS_INFORMATION
536{
537 RPC_UNICODE_STRING Parameters;
538} SAMPR_USER_PARAMETERS_INFORMATION, *PSAMPR_USER_PARAMETERS_INFORMATION;
539
540typedef struct _SAMPR_USER_LOGON_INFORMATION
541{
542 RPC_UNICODE_STRING UserName;
543 RPC_UNICODE_STRING FullName;
544 unsigned long UserId;
545 unsigned long PrimaryGroupId;
546 RPC_UNICODE_STRING HomeDirectory;
547 RPC_UNICODE_STRING HomeDirectoryDrive;
548 RPC_UNICODE_STRING ScriptPath;
549 RPC_UNICODE_STRING ProfilePath;
550 RPC_UNICODE_STRING WorkStations;
551 OLD_LARGE_INTEGER LastLogon;
552 OLD_LARGE_INTEGER LastLogoff;
553 OLD_LARGE_INTEGER PasswordLastSet;
554 OLD_LARGE_INTEGER PasswordCanChange;
555 OLD_LARGE_INTEGER PasswordMustChange;
556 SAMPR_LOGON_HOURS LogonHours;
557 unsigned short BadPasswordCount;
558 unsigned short LogonCount;
559 unsigned long UserAccountControl;
560} SAMPR_USER_LOGON_INFORMATION, *PSAMPR_USER_LOGON_INFORMATION;
561
562typedef struct _SAMPR_USER_ACCOUNT_INFORMATION
563{
564 RPC_UNICODE_STRING UserName;
565 RPC_UNICODE_STRING FullName;
566 unsigned long UserId;
567 unsigned long PrimaryGroupId;
568 RPC_UNICODE_STRING HomeDirectory;
569 RPC_UNICODE_STRING HomeDirectoryDrive;
570 RPC_UNICODE_STRING ScriptPath;
571 RPC_UNICODE_STRING ProfilePath;
572 RPC_UNICODE_STRING AdminComment;
573 RPC_UNICODE_STRING WorkStations;
574 OLD_LARGE_INTEGER LastLogon;
575 OLD_LARGE_INTEGER LastLogoff;
576 SAMPR_LOGON_HOURS LogonHours;
577 unsigned short BadPasswordCount;
578 unsigned short LogonCount;
579 OLD_LARGE_INTEGER PasswordLastSet;
580 OLD_LARGE_INTEGER AccountExpires;
581 unsigned long UserAccountControl;
582} SAMPR_USER_ACCOUNT_INFORMATION, *PSAMPR_USER_ACCOUNT_INFORMATION;
583
584typedef struct _SAMPR_USER_A_NAME_INFORMATION
585{
586 RPC_UNICODE_STRING UserName;
587} SAMPR_USER_A_NAME_INFORMATION, *PSAMPR_USER_A_NAME_INFORMATION;
588
589typedef struct _SAMPR_USER_F_NAME_INFORMATION
590{
591 RPC_UNICODE_STRING FullName;
592} SAMPR_USER_F_NAME_INFORMATION, *PSAMPR_USER_F_NAME_INFORMATION;
593
594typedef struct _SAMPR_USER_NAME_INFORMATION
595{
596 RPC_UNICODE_STRING UserName;
597 RPC_UNICODE_STRING FullName;
598} SAMPR_USER_NAME_INFORMATION, *PSAMPR_USER_NAME_INFORMATION;
599
600typedef struct _SAMPR_USER_HOME_INFORMATION
601{
602 RPC_UNICODE_STRING HomeDirectory;
603 RPC_UNICODE_STRING HomeDirectoryDrive;
604} SAMPR_USER_HOME_INFORMATION, *PSAMPR_USER_HOME_INFORMATION;
605
606typedef struct _SAMPR_USER_SCRIPT_INFORMATION
607{
608 RPC_UNICODE_STRING ScriptPath;
609} SAMPR_USER_SCRIPT_INFORMATION, *PSAMPR_USER_SCRIPT_INFORMATION;
610
611typedef struct _SAMPR_USER_PROFILE_INFORMATION
612{
613 RPC_UNICODE_STRING ProfilePath;
614} SAMPR_USER_PROFILE_INFORMATION, *PSAMPR_USER_PROFILE_INFORMATION;
615
616typedef struct _SAMPR_USER_ADMIN_COMMENT_INFORMATION
617{
618 RPC_UNICODE_STRING AdminComment;
619} SAMPR_USER_ADMIN_COMMENT_INFORMATION, *PSAMPR_USER_ADMIN_COMMENT_INFORMATION;
620
621typedef struct _SAMPR_USER_WORKSTATIONS_INFORMATION
622{
623 RPC_UNICODE_STRING WorkStations;
624} SAMPR_USER_WORKSTATIONS_INFORMATION, *PSAMPR_USER_WORKSTATIONS_INFORMATION;
625
626typedef struct _SAMPR_USER_SET_PASSWORD_INFORMATION
627{
628// SAMPR_ENCRYPTED_USER_PASSWORD Password;
629 RPC_UNICODE_STRING Password;
630 BOOLEAN PasswordExpired;
631} SAMPR_USER_SET_PASSWORD_INFORMATION, *PSAMPR_USER_SET_PASSWORD_INFORMATION;
632
633typedef struct _SAMPR_USER_LOGON_HOURS_INFORMATION
634{
635 SAMPR_LOGON_HOURS LogonHours;
636} SAMPR_USER_LOGON_HOURS_INFORMATION, *PSAMPR_USER_LOGON_HOURS_INFORMATION;
637
638typedef struct _SAMPR_USER_INTERNAL1_INFORMATION
639{
640 ENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword;
641 ENCRYPTED_LM_OWF_PASSWORD EncryptedLmOwfPassword;
642 BOOLEAN NtPasswordPresent;
643 BOOLEAN LmPasswordPresent;
644 BOOLEAN PasswordExpired;
645} SAMPR_USER_INTERNAL1_INFORMATION, *PSAMPR_USER_INTERNAL1_INFORMATION;
646
647/* SAMPR_USER_INTERNAL2_INFORMATION.Flags values */
648cpp_quote("#define USER_LOGON_BAD_PASSWORD 0x08000000")
649cpp_quote("#define USER_LOGON_SUCCESS 0x10000000")
650
651typedef struct _SAMPR_USER_INTERNAL2_INFORMATION
652{
653 unsigned long Flags;
654 OLD_LARGE_INTEGER LastLogon;
655 OLD_LARGE_INTEGER LastLogoff;
656 unsigned short BadPasswordCount;
657 unsigned short LogonCount;
658} SAMPR_USER_INTERNAL2_INFORMATION, *PSAMPR_USER_INTERNAL2_INFORMATION;
659
660typedef struct _SAMPR_USER_INTERNAL4_INFORMATION
661{
662 SAMPR_USER_ALL_INFORMATION I1;
663 SAMPR_ENCRYPTED_USER_PASSWORD UserPassword;
664} SAMPR_USER_INTERNAL4_INFORMATION, *PSAMPR_USER_INTERNAL4_INFORMATION;
665
666typedef struct _SAMPR_USER_INTERNAL4_INFORMATION_NEW
667{
668 SAMPR_USER_ALL_INFORMATION I1;
669 SAMPR_ENCRYPTED_USER_PASSWORD_NEW UserPassword;
670} SAMPR_USER_INTERNAL4_INFORMATION_NEW, *PSAMPR_USER_INTERNAL4_INFORMATION_NEW;
671
672typedef struct _SAMPR_USER_INTERNAL5_INFORMATION
673{
674 SAMPR_ENCRYPTED_USER_PASSWORD UserPassword;
675 BOOLEAN PasswordExpired;
676} SAMPR_USER_INTERNAL5_INFORMATION, *PSAMPR_USER_INTERNAL5_INFORMATION;
677
678typedef struct _SAMPR_USER_INTERNAL5_INFORMATION_NEW
679{
680 SAMPR_ENCRYPTED_USER_PASSWORD_NEW UserPassword;
681 BOOLEAN PasswordExpired;
682} SAMPR_USER_INTERNAL5_INFORMATION_NEW, *PSAMPR_USER_INTERNAL5_INFORMATION_NEW;
683
684cpp_quote("#ifndef _NTSAM_")
685typedef enum _USER_INFORMATION_CLASS
686{
687 UserGeneralInformation = 1,
688 UserPreferencesInformation = 2,
689 UserLogonInformation = 3,
690 UserLogonHoursInformation = 4,
691 UserAccountInformation = 5,
692 UserNameInformation = 6,
693 UserAccountNameInformation = 7,
694 UserFullNameInformation = 8,
695 UserPrimaryGroupInformation = 9,
696 UserHomeInformation = 10,
697 UserScriptInformation = 11,
698 UserProfileInformation = 12,
699 UserAdminCommentInformation = 13,
700 UserWorkStationsInformation = 14,
701 UserSetPasswordInformation = 15, /* This is missing from the SAM RPC documentation */
702 UserControlInformation = 16,
703 UserExpiresInformation = 17,
704 UserInternal1Information = 18,
705 UserInternal2Information = 19, /* This is missing from the SAM RPC documentation */
706 UserParametersInformation = 20,
707 UserAllInformation = 21,
708 UserInternal3Information = 22, /* This is missing from the SAM RPC documentation */
709 UserInternal4Information = 23,
710 UserInternal5Information = 24,
711 UserInternal4InformationNew = 25,
712 UserInternal5InformationNew = 26,
713 UserInternal6Information, /* This is missing from the SAM RPC documentation */
714 UserExtendedInformation, /* This is missing from the SAM RPC documentation */
715 UserLogonUIInformation, /* This is missing from the SAM RPC documentation */
716} USER_INFORMATION_CLASS, *PUSER_INFORMATION_CLASS;
717cpp_quote("#endif")
718
719typedef [switch_type(USER_INFORMATION_CLASS)] union _SAMPR_USER_INFO_BUFFER
720{
721 [case(UserGeneralInformation)] SAMPR_USER_GENERAL_INFORMATION General;
722 [case(UserPreferencesInformation)] SAMPR_USER_PREFERENCES_INFORMATION Preferences;
723 [case(UserLogonInformation)] SAMPR_USER_LOGON_INFORMATION Logon;
724 [case(UserLogonHoursInformation)] SAMPR_USER_LOGON_HOURS_INFORMATION LogonHours;
725 [case(UserAccountInformation)] SAMPR_USER_ACCOUNT_INFORMATION Account;
726 [case(UserNameInformation)] SAMPR_USER_NAME_INFORMATION Name;
727 [case(UserAccountNameInformation)] SAMPR_USER_A_NAME_INFORMATION AccountName;
728 [case(UserFullNameInformation)] SAMPR_USER_F_NAME_INFORMATION FullName;
729 [case(UserPrimaryGroupInformation)] USER_PRIMARY_GROUP_INFORMATION PrimaryGroup;
730 [case(UserHomeInformation)] SAMPR_USER_HOME_INFORMATION Home;
731 [case(UserScriptInformation)] SAMPR_USER_SCRIPT_INFORMATION Script;
732 [case(UserProfileInformation)] SAMPR_USER_PROFILE_INFORMATION Profile;
733 [case(UserAdminCommentInformation)] SAMPR_USER_ADMIN_COMMENT_INFORMATION AdminComment;
734 [case(UserWorkStationsInformation)] SAMPR_USER_WORKSTATIONS_INFORMATION WorkStations;
735 [case(UserSetPasswordInformation)] SAMPR_USER_SET_PASSWORD_INFORMATION SetPassword;
736 [case(UserControlInformation)] USER_CONTROL_INFORMATION Control;
737 [case(UserExpiresInformation)] USER_EXPIRES_INFORMATION Expires;
738 [case(UserInternal1Information)] SAMPR_USER_INTERNAL1_INFORMATION Internal1;
739 [case(UserInternal2Information)] SAMPR_USER_INTERNAL2_INFORMATION Internal2;
740 [case(UserParametersInformation)] SAMPR_USER_PARAMETERS_INFORMATION Parameters;
741 [case(UserAllInformation)] SAMPR_USER_ALL_INFORMATION All;
742 [case(UserInternal4Information)] SAMPR_USER_INTERNAL4_INFORMATION Internal4;
743 [case(UserInternal5Information)] SAMPR_USER_INTERNAL5_INFORMATION Internal5;
744 [case(UserInternal4InformationNew)] SAMPR_USER_INTERNAL4_INFORMATION_NEW Internal4New;
745 [case(UserInternal5InformationNew)] SAMPR_USER_INTERNAL5_INFORMATION_NEW Internal5New;
746} SAMPR_USER_INFO_BUFFER, *PSAMPR_USER_INFO_BUFFER;
747
748typedef enum _PASSWORD_POLICY_VALIDATION_TYPE
749{
750 SamValidateAuthentication = 1,
751 SamValidatePasswordChange,
752 SamValidatePasswordReset
753} PASSWORD_POLICY_VALIDATION_TYPE;
754
755typedef struct _SAM_VALIDATE_PASSWORD_HASH
756{
757 unsigned long Length;
758 [unique,size_is(Length)] unsigned char* Hash;
759} SAM_VALIDATE_PASSWORD_HASH, *PSAM_VALIDATE_PASSWORD_HASH;
760
761typedef struct _SAM_VALIDATE_PERSISTED_FIELDS
762{
763 unsigned long PresentFields;
764 LARGE_INTEGER PasswordLastSet;
765 LARGE_INTEGER BadPasswordTime;
766 LARGE_INTEGER LockoutTime;
767 unsigned long BadPasswordCount;
768 unsigned long PasswordHistoryLength;
769 [unique,size_is(PasswordHistoryLength)] PSAM_VALIDATE_PASSWORD_HASH PasswordHistory;
770} SAM_VALIDATE_PERSISTED_FIELDS, *PSAM_VALIDATE_PERSISTED_FIELDS;
771
772typedef enum _SAM_VALIDATE_VALIDATION_STATUS
773{
774 SamValidateSuccess = 0,
775 SamValidatePasswordMustChange,
776 SamValidateAccountLockedOut,
777 SamValidatePasswordExpired,
778 SamValidatePasswordIncorrect,
779 SamValidatePasswordIsInHistory,
780 SamValidatePasswordTooShort,
781 SamValidatePasswordTooLong,
782 SamValidatePasswordNotComplexEnough,
783 SamValidatePasswordTooRecent,
784 SamValidatePasswordFilterError
785} SAM_VALIDATE_VALIDATION_STATUS, *PSAM_VALIDATE_VALIDATION_STATUS;
786
787typedef struct _SAM_VALIDATE_STANDARD_OUTPUT_ARG
788{
789 SAM_VALIDATE_PERSISTED_FIELDS ChangedPersistedFields;
790 SAM_VALIDATE_VALIDATION_STATUS ValidationStatus;
791} SAM_VALIDATE_STANDARD_OUTPUT_ARG, *PSAM_VALIDATE_STANDARD_OUTPUT_ARG;
792
793typedef struct _SAM_VALIDATE_AUTHENTICATION_INPUT_ARG
794{
795 SAM_VALIDATE_PERSISTED_FIELDS InputPersistedFields;
796 unsigned char PasswordMatched;
797} SAM_VALIDATE_AUTHENTICATION_INPUT_ARG, *PSAM_VALIDATE_AUTHENTICATION_INPUT_ARG;
798
799typedef struct _SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
800{
801 SAM_VALIDATE_PERSISTED_FIELDS InputPersistedFields;
802 RPC_UNICODE_STRING ClearPassword;
803 RPC_UNICODE_STRING UserAccountName;
804 SAM_VALIDATE_PASSWORD_HASH HashedPassword;
805 unsigned char PasswordMatch;
806} SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG, *PSAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
807
808typedef struct _SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG
809{
810 SAM_VALIDATE_PERSISTED_FIELDS InputPersistedFields;
811 RPC_UNICODE_STRING ClearPassword;
812 RPC_UNICODE_STRING UserAccountName;
813 SAM_VALIDATE_PASSWORD_HASH HashedPassword;
814 unsigned char PasswordMustChangeAtNextLogon;
815 unsigned char ClearLockout;
816} SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG, *PSAM_VALIDATE_PASSWORD_RESET_INPUT_ARG;
817
818typedef [switch_type(PASSWORD_POLICY_VALIDATION_TYPE)] union _SAM_VALIDATE_INPUT_ARG
819{
820 [case(SamValidateAuthentication)] SAM_VALIDATE_AUTHENTICATION_INPUT_ARG ValidateAuthenticationInput;
821 [case(SamValidatePasswordChange)] SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG ValidatePasswordChangeInput;
822 [case(SamValidatePasswordReset)] SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG ValidatePasswordResetInput;
823} SAM_VALIDATE_INPUT_ARG, *PSAM_VALIDATE_INPUT_ARG;
824
825typedef [switch_type(PASSWORD_POLICY_VALIDATION_TYPE)] union _SAM_VALIDATE_OUTPUT_ARG
826{
827 [case(SamValidateAuthentication)] SAM_VALIDATE_STANDARD_OUTPUT_ARG ValidateAuthenticationOutput;
828 [case(SamValidatePasswordChange)] SAM_VALIDATE_STANDARD_OUTPUT_ARG ValidatePasswordChangeOutput;
829 [case(SamValidatePasswordReset)] SAM_VALIDATE_STANDARD_OUTPUT_ARG ValidatePasswordResetOutput;
830} SAM_VALIDATE_OUTPUT_ARG, *PSAM_VALIDATE_OUTPUT_ARG;
831
832[
833 uuid(12345778-1234-ABCD-EF00-0123456789AC),
834 version(1.0),
835 pointer_default(unique),
836 endpoint("ncacn_np:[\\pipe\\samr]")
837#ifndef __midl
838 ,explicit_handle
839#endif
840]
841interface samr
842{
843 /* Function 0 */
844 NTSTATUS
845 __stdcall
846 SamrConnect(
847 [in, unique] PSAMPR_SERVER_NAME ServerName,
848 [out] SAMPR_HANDLE *ServerHandle,
849 [in] ACCESS_MASK DesiredAccess);
850
851 /* Function 1 */
852 NTSTATUS
853 __stdcall
854 SamrCloseHandle(
855 [in, out] SAMPR_HANDLE *SamHandle);
856
857 /* Function 2 */
858 NTSTATUS
859 __stdcall
860 SamrSetSecurityObject(
861 [in] SAMPR_HANDLE ObjectHandle,
862 [in] SECURITY_INFORMATION SecurityInformation,
863 [in] PSAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor);
864
865 /* Function 3 */
866 NTSTATUS
867 __stdcall
868 SamrQuerySecurityObject(
869 [in] SAMPR_HANDLE ObjectHandle,
870 [in] SECURITY_INFORMATION SecurityInformation,
871 [out] PSAMPR_SR_SECURITY_DESCRIPTOR *SecurityDescriptor);
872
873 /* Function 4 */
874 NTSTATUS
875 __stdcall
876 SamrShutdownSamServer(
877 [in] SAMPR_HANDLE ServerHandle);
878
879 /* Function 5 */
880 NTSTATUS
881 __stdcall
882 SamrLookupDomainInSamServer(
883 [in] SAMPR_HANDLE ServerHandle,
884 [in] PRPC_UNICODE_STRING Name,
885 [out] PRPC_SID *DomainId);
886
887 /* Function 6 */
888 NTSTATUS
889 __stdcall
890 SamrEnumerateDomainsInSamServer(
891 [in] SAMPR_HANDLE ServerHandle,
892 [in, out] unsigned long *EnumerationContext,
893 [out] PSAMPR_ENUMERATION_BUFFER *Buffer,
894 [in] unsigned long PreferedMaximumLength,
895 [out] unsigned long *CountReturned);
896
897 /* Function 7 */
898 NTSTATUS
899 __stdcall
900 SamrOpenDomain(
901 [in] SAMPR_HANDLE ServerHandle,
902 [in] ACCESS_MASK DesiredAccess,
903 [in] PRPC_SID DomainId,
904 [out] SAMPR_HANDLE *DomainHandle);
905
906 /* Function 8 */
907 NTSTATUS
908 __stdcall
909 SamrQueryInformationDomain(
910 [in] SAMPR_HANDLE DomainHandle,
911 [in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
912 [out, switch_is(DomainInformationClass)] PSAMPR_DOMAIN_INFO_BUFFER *Buffer);
913
914 /* Function 9 */
915 NTSTATUS
916 __stdcall
917 SamrSetInformationDomain(
918 [in] SAMPR_HANDLE DomainHandle,
919 [in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
920 [in, switch_is(DomainInformationClass)] PSAMPR_DOMAIN_INFO_BUFFER DomainInformation);
921
922 /* Function 10 */
923 NTSTATUS
924 __stdcall
925 SamrCreateGroupInDomain(
926 [in] SAMPR_HANDLE DomainHandle,
927 [in] PRPC_UNICODE_STRING Name,
928 [in] ACCESS_MASK DesiredAccess,
929 [out] SAMPR_HANDLE *GroupHandle,
930 [out] unsigned long *RelativeId);
931
932 /* Function 11 */
933 NTSTATUS
934 __stdcall
935 SamrEnumerateGroupsInDomain(
936 [in] SAMPR_HANDLE DomainHandle,
937 [in, out] unsigned long *EnumerationContext,
938 [out] PSAMPR_ENUMERATION_BUFFER *Buffer,
939 [in] unsigned long PreferedMaximumLength,
940 [out] unsigned long *CountReturned);
941
942 /* Function 12 */
943 NTSTATUS
944 __stdcall
945 SamrCreateUserInDomain(
946 [in] SAMPR_HANDLE DomainHandle,
947 [in] PRPC_UNICODE_STRING Name,
948 [in] ACCESS_MASK DesiredAccess,
949 [out] SAMPR_HANDLE *UserHandle,
950 [out] unsigned long *RelativeId);
951
952 /* Function 13 */
953 NTSTATUS
954 __stdcall
955 SamrEnumerateUsersInDomain(
956 [in] SAMPR_HANDLE DomainHandle,
957 [in, out] unsigned long *EnumerationContext,
958 [in] unsigned long UserAccountControl,
959 [out] PSAMPR_ENUMERATION_BUFFER *Buffer,
960 [in] unsigned long PreferedMaximumLength,
961 [out] unsigned long *CountReturned);
962
963 /* Function 14 */
964 NTSTATUS
965 __stdcall
966 SamrCreateAliasInDomain(
967 [in] SAMPR_HANDLE DomainHandle,
968 [in] PRPC_UNICODE_STRING AccountName,
969 [in] ACCESS_MASK DesiredAccess,
970 [out] SAMPR_HANDLE *AliasHandle,
971 [out] unsigned long *RelativeId);
972
973 /* Function 15 */
974 NTSTATUS
975 __stdcall
976 SamrEnumerateAliasesInDomain(
977 [in] SAMPR_HANDLE DomainHandle,
978 [in, out] unsigned long *EnumerationContext,
979 [out] PSAMPR_ENUMERATION_BUFFER *Buffer,
980 [in] unsigned long PreferedMaximumLength,
981 [out] unsigned long *CountReturned);
982
983 /* Function 16 */
984 NTSTATUS
985 __stdcall
986 SamrGetAliasMembership(
987 [in] SAMPR_HANDLE DomainHandle,
988 [in] PSAMPR_PSID_ARRAY SidArray,
989 [out] PSAMPR_ULONG_ARRAY Membership);
990
991 /* Function 17 */
992 NTSTATUS
993 __stdcall
994 SamrLookupNamesInDomain(
995 [in] SAMPR_HANDLE DomainHandle,
996 [in, range(0, 1000)] unsigned long Count,
997 [in, size_is(1000), length_is(Count)] RPC_UNICODE_STRING Names[*],
998 [out] PSAMPR_ULONG_ARRAY RelativeIds,
999 [out] PSAMPR_ULONG_ARRAY Use);
1000
1001 /* Function 18 */
1002 NTSTATUS
1003 __stdcall
1004 SamrLookupIdsInDomain(
1005 [in] SAMPR_HANDLE DomainHandle,
1006 [in, range(0, 1000)] unsigned long Count,
1007 [in, size_is(1000), length_is(Count)] unsigned long *RelativeIds,
1008 [out] PSAMPR_RETURNED_USTRING_ARRAY Names,
1009 [out] PSAMPR_ULONG_ARRAY Use);
1010
1011 /* Function 19 */
1012 NTSTATUS
1013 __stdcall
1014 SamrOpenGroup(
1015 [in] SAMPR_HANDLE DomainHandle,
1016 [in] ACCESS_MASK DesiredAccess,
1017 [in] unsigned long GroupId,
1018 [out] SAMPR_HANDLE *GroupHandle);
1019
1020 /* Function 20 */
1021 NTSTATUS
1022 __stdcall
1023 SamrQueryInformationGroup(
1024 [in] SAMPR_HANDLE GroupHandle,
1025 [in] GROUP_INFORMATION_CLASS GroupInformationClass,
1026 [out, switch_is(GroupInformationClass)] PSAMPR_GROUP_INFO_BUFFER *Buffer);
1027
1028 /* Function 21 */
1029 NTSTATUS
1030 __stdcall
1031 SamrSetInformationGroup(
1032 [in] SAMPR_HANDLE GroupHandle,
1033 [in] GROUP_INFORMATION_CLASS GroupInformationClass,
1034 [in, switch_is(GroupInformationClass)] PSAMPR_GROUP_INFO_BUFFER Buffer);
1035
1036 /* Function 22 */
1037 NTSTATUS
1038 __stdcall
1039 SamrAddMemberToGroup(
1040 [in] SAMPR_HANDLE GroupHandle,
1041 [in] unsigned long MemberId,
1042 [in] unsigned long Attributes);
1043
1044 /* Function 21 */
1045 NTSTATUS
1046 __stdcall
1047 SamrDeleteGroup(
1048 [in, out] SAMPR_HANDLE *GroupHandle);
1049
1050 /* Function 24 */
1051 NTSTATUS
1052 __stdcall
1053 SamrRemoveMemberFromGroup(
1054 [in] SAMPR_HANDLE GroupHandle,
1055 [in] unsigned long MemberId);
1056
1057 /* Function 25 */
1058 NTSTATUS
1059 __stdcall
1060 SamrGetMembersInGroup(
1061 [in] SAMPR_HANDLE GroupHandle,
1062 [out] PSAMPR_GET_MEMBERS_BUFFER *Members);
1063
1064 /* Function 26 */
1065 NTSTATUS
1066 __stdcall
1067 SamrSetMemberAttributesOfGroup(
1068 [in] SAMPR_HANDLE GroupHandle,
1069 [in] unsigned long MemberId,
1070 [in] unsigned long Attributes);
1071
1072 /* Function 27 */
1073 NTSTATUS
1074 __stdcall
1075 SamrOpenAlias(
1076 [in] SAMPR_HANDLE DomainHandle,
1077 [in] ACCESS_MASK DesiredAccess,
1078 [in] ULONG AliasId,
1079 [out] SAMPR_HANDLE *AliasHandle);
1080
1081 /* Function 28 */
1082 NTSTATUS
1083 __stdcall
1084 SamrQueryInformationAlias(
1085 [in] SAMPR_HANDLE AliasHandle,
1086 [in] ALIAS_INFORMATION_CLASS AliasInformationClass,
1087 [out, switch_is(AliasInformationClass)] PSAMPR_ALIAS_INFO_BUFFER *Buffer);
1088
1089 /* Function 29 */
1090 NTSTATUS
1091 __stdcall
1092 SamrSetInformationAlias(
1093 [in] SAMPR_HANDLE AliasHandle,
1094 [in] ALIAS_INFORMATION_CLASS AliasInformationClass,
1095 [in, switch_is(AliasInformationClass)] PSAMPR_ALIAS_INFO_BUFFER Buffer);
1096
1097 /* Function 30 */
1098 NTSTATUS
1099 __stdcall
1100 SamrDeleteAlias(
1101 [in, out] SAMPR_HANDLE *AliasHandle);
1102
1103 /* Function 31 */
1104 NTSTATUS
1105 __stdcall
1106 SamrAddMemberToAlias(
1107 [in] SAMPR_HANDLE AliasHandle,
1108 [in] PRPC_SID MemberId);
1109
1110 /* Function 32 */
1111 NTSTATUS
1112 __stdcall
1113 SamrRemoveMemberFromAlias(
1114 [in] SAMPR_HANDLE AliasHandle,
1115 [in] PRPC_SID MemberId);
1116
1117 /* Function 33 */
1118 NTSTATUS
1119 __stdcall
1120 SamrGetMembersInAlias(
1121 [in] SAMPR_HANDLE AliasHandle,
1122 [out] PSAMPR_PSID_ARRAY_OUT Members);
1123
1124 /* Function 34 */
1125 NTSTATUS
1126 __stdcall
1127 SamrOpenUser(
1128 [in] SAMPR_HANDLE DomainHandle,
1129 [in] ACCESS_MASK DesiredAccess,
1130 [in] ULONG UserId,
1131 [out] SAMPR_HANDLE *UserHandle);
1132
1133 /* Function 35 */
1134 NTSTATUS
1135 __stdcall
1136 SamrDeleteUser(
1137 [in,out] SAMPR_HANDLE *UserHandle);
1138
1139 /* Function 36 */
1140 NTSTATUS
1141 __stdcall
1142 SamrQueryInformationUser(
1143 [in] SAMPR_HANDLE UserHandle,
1144 [in] USER_INFORMATION_CLASS UserInformationClass,
1145 [out, switch_is(UserInformationClass)] PSAMPR_USER_INFO_BUFFER *Buffer);
1146
1147 /* Function 37 */
1148 NTSTATUS
1149 __stdcall
1150 SamrSetInformationUser(
1151 [in] SAMPR_HANDLE UserHandle,
1152 [in] USER_INFORMATION_CLASS UserInformationClass,
1153 [in, switch_is(UserInformationClass)] PSAMPR_USER_INFO_BUFFER Buffer);
1154
1155 /* Function 38 */
1156 NTSTATUS
1157 __stdcall
1158 SamrChangePasswordUser(
1159 [in] SAMPR_HANDLE UserHandle,
1160 [in] unsigned char LmPresent,
1161 [in, unique] PENCRYPTED_LM_OWF_PASSWORD OldLmEncryptedWithNewLm,
1162 [in, unique] PENCRYPTED_LM_OWF_PASSWORD NewLmEncryptedWithOldLm,
1163 [in] unsigned char NtPresent,
1164 [in, unique] PENCRYPTED_NT_OWF_PASSWORD OldNtEncryptedWithNewNt,
1165 [in, unique] PENCRYPTED_NT_OWF_PASSWORD NewNtEncryptedWithOldNt,
1166 [in] unsigned char NtCrossEncryptionPresent,
1167 [in, unique] PENCRYPTED_NT_OWF_PASSWORD NewNtEncryptedWithNewLm,
1168 [in] unsigned char LmCrossEncryptionPresent,
1169 [in, unique] PENCRYPTED_LM_OWF_PASSWORD NewLmEncryptedWithNewNt);
1170
1171 /* Function 39 */
1172 NTSTATUS
1173 __stdcall
1174 SamrGetGroupsForUser(
1175 [in] SAMPR_HANDLE UserHandle,
1176 [out] PSAMPR_GET_GROUPS_BUFFER *Groups);
1177
1178 /* Function 40 */
1179 NTSTATUS
1180 __stdcall
1181 SamrQueryDisplayInformation(
1182 [in] SAMPR_HANDLE DomainHandle,
1183 [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
1184 [in] unsigned long Index,
1185 [in] unsigned long EntryCount,
1186 [in] unsigned long PreferredMaximumLength,
1187 [out] unsigned long * TotalAvailable,
1188 [out] unsigned long * TotalReturned,
1189 [out, switch_is(DisplayInformationClass)] PSAMPR_DISPLAY_INFO_BUFFER Buffer);
1190
1191 /* Function 41 */
1192 NTSTATUS
1193 __stdcall
1194 SamrGetDisplayEnumerationIndex(
1195 [in] SAMPR_HANDLE DomainHandle,
1196 [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
1197 [in] PRPC_UNICODE_STRING Prefix,
1198 [out] unsigned long *Index);
1199
1200 /* Function 42 */
1201 NTSTATUS
1202 __stdcall
1203 SamrTestPrivateFunctionsDomain(
1204 [in] SAMPR_HANDLE DomainHandle);
1205
1206 /* Function 43 */
1207 NTSTATUS
1208 __stdcall
1209 SamrTestPrivateFunctionsUser(
1210 [in] SAMPR_HANDLE UserHandle);
1211
1212 /* Function 44 */
1213 NTSTATUS
1214 __stdcall
1215 SamrGetUserDomainPasswordInformation(
1216 [in] SAMPR_HANDLE UserHandle,
1217 [out] PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation);
1218
1219 /* Function 45 */
1220 NTSTATUS
1221 __stdcall
1222 SamrRemoveMemberFromForeignDomain(
1223 [in] SAMPR_HANDLE DomainHandle,
1224 [in] PRPC_SID MemberSid);
1225
1226 /* Function 46 */
1227 NTSTATUS
1228 __stdcall
1229 SamrQueryInformationDomain2(
1230 [in] SAMPR_HANDLE DomainHandle,
1231 [in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
1232 [out, switch_is(DomainInformationClass)] PSAMPR_DOMAIN_INFO_BUFFER *Buffer);
1233
1234 /* Function 47 */
1235 NTSTATUS
1236 __stdcall
1237 SamrQueryInformationUser2(
1238 [in] SAMPR_HANDLE UserHandle,
1239 [in] USER_INFORMATION_CLASS UserInformationClass,
1240 [out, switch_is(UserInformationClass)] PSAMPR_USER_INFO_BUFFER *Buffer);
1241
1242 /* Function 48 */
1243 NTSTATUS
1244 __stdcall
1245 SamrQueryDisplayInformation2(
1246 [in] SAMPR_HANDLE DomainHandle,
1247 [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
1248 [in] unsigned long Index,
1249 [in] unsigned long EntryCount,
1250 [in] unsigned long PreferredMaximumLength,
1251 [out] unsigned long *TotalAvailable,
1252 [out] unsigned long *TotalReturned,
1253 [out, switch_is(DisplayInformationClass)] PSAMPR_DISPLAY_INFO_BUFFER Buffer);
1254
1255 /* Function 49 */
1256 NTSTATUS
1257 __stdcall
1258 SamrGetDisplayEnumerationIndex2(
1259 [in] SAMPR_HANDLE DomainHandle,
1260 [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
1261 [in] PRPC_UNICODE_STRING Prefix,
1262 [out] unsigned long *Index);
1263
1264 /* Function 50 */
1265 NTSTATUS
1266 __stdcall
1267 SamrCreateUser2InDomain(
1268 [in] SAMPR_HANDLE DomainHandle,
1269 [in] PRPC_UNICODE_STRING Name,
1270 [in] unsigned long AccountType,
1271 [in] ACCESS_MASK DesiredAccess,
1272 [out] SAMPR_HANDLE *UserHandle,
1273 [out] unsigned long *GrantedAccess,
1274 [out] unsigned long *RelativeId);
1275
1276 /* Function 51 */
1277 NTSTATUS
1278 __stdcall
1279 SamrQueryDisplayInformation3(
1280 [in] SAMPR_HANDLE DomainHandle,
1281 [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
1282 [in] unsigned long Index,
1283 [in] unsigned long EntryCount,
1284 [in] unsigned long PreferredMaximumLength,
1285 [out] unsigned long *TotalAvailable,
1286 [out] unsigned long *TotalReturned,
1287 [out, switch_is(DisplayInformationClass)] PSAMPR_DISPLAY_INFO_BUFFER Buffer);
1288
1289 /* Function 52 */
1290 NTSTATUS
1291 __stdcall
1292 SamrAddMultipleMembersToAlias(
1293 [in] SAMPR_HANDLE AliasHandle,
1294 [in] PSAMPR_PSID_ARRAY MembersBuffer);
1295
1296 /* Function 53 */
1297 NTSTATUS
1298 __stdcall
1299 SamrRemoveMultipleMembersFromAlias(
1300 [in] SAMPR_HANDLE AliasHandle,
1301 [in] PSAMPR_PSID_ARRAY MembersBuffer);
1302
1303 /* Function 54 */
1304 NTSTATUS
1305 __stdcall
1306 SamrOemChangePasswordUser2(
1307 [in] handle_t BindingHandle,
1308 [in, unique] PRPC_STRING ServerName,
1309 [in] PRPC_STRING UserName,
1310 [in, unique] PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
1311 [in, unique] PENCRYPTED_LM_OWF_PASSWORD OldLmOwfPasswordEncryptedWithNewLm);
1312
1313 /* Function 55 */
1314 NTSTATUS
1315 __stdcall
1316 SamrUnicodeChangePasswordUser2(
1317 [in] handle_t BindingHandle,
1318 [in, unique] PRPC_UNICODE_STRING ServerName,
1319 [in] PRPC_UNICODE_STRING UserName,
1320 [in, unique] PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldNt,
1321 [in, unique] PENCRYPTED_NT_OWF_PASSWORD OldNtOwfPasswordEncryptedWithNewNt,
1322 [in] unsigned char LmPresent,
1323 [in, unique] PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
1324 [in, unique] PENCRYPTED_LM_OWF_PASSWORD OldLmOwfPasswordEncryptedWithNewNt);
1325
1326 /* Function 56 */
1327 NTSTATUS
1328 __stdcall
1329 SamrGetDomainPasswordInformation(
1330 [in] handle_t BindingHandle,
1331 [in, unique] PRPC_UNICODE_STRING Unused,
1332 [out] PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation);
1333
1334 /* Function 57 */
1335 NTSTATUS
1336 __stdcall
1337 SamrConnect2(
1338 [in, unique, string] PSAMPR_SERVER_NAME ServerName,
1339 [out] SAMPR_HANDLE *ServerHandle,
1340 [in] ACCESS_MASK DesiredAccess);
1341
1342 /* Function 58 */
1343 NTSTATUS
1344 __stdcall
1345 SamrSetInformationUser2(
1346 [in] SAMPR_HANDLE UserHandle,
1347 [in] USER_INFORMATION_CLASS UserInformationClass,
1348 [in, switch_is(UserInformationClass)] PSAMPR_USER_INFO_BUFFER Buffer);
1349
1350 /* Function 59 */
1351 NTSTATUS
1352 __stdcall
1353 SamrSetBootKeyInformation(
1354 [in] handle_t BindingHandle); /* FIXME */
1355
1356 /* Function 60 */
1357 NTSTATUS
1358 __stdcall
1359 SamrGetBootKeyInformation(
1360 [in] handle_t BindingHandle); /* FIXME */
1361
1362 /* Function 61 */
1363 NTSTATUS
1364 __stdcall
1365 SamrConnect3(
1366 [in] handle_t BindingHandle); /* FIXME */
1367
1368 /* Function 62 */
1369 NTSTATUS
1370 __stdcall
1371 SamrConnect4(
1372 [in, unique, string] PSAMPR_SERVER_NAME ServerName,
1373 [out] SAMPR_HANDLE *ServerHandle,
1374 [in] unsigned long ClientRevision,
1375 [in] ACCESS_MASK DesiredAccess);
1376
1377 /* Function 63 */
1378 NTSTATUS
1379 __stdcall
1380 SamrUnicodeChangePasswordUser3(
1381 [in] handle_t BindingHandle); /* FIXME */
1382
1383 /* Function 64 */
1384 NTSTATUS
1385 __stdcall
1386 SamrConnect5(
1387 [in, unique, string] PSAMPR_SERVER_NAME ServerName,
1388 [in] ACCESS_MASK DesiredAccess,
1389 [in] unsigned long InVersion,
1390 [in, switch_is(InVersion)] SAMPR_REVISION_INFO *InRevisionInfo,
1391 [out] unsigned long *OutVersion,
1392 [out, switch_is(*OutVersion)] SAMPR_REVISION_INFO *OutRevisionInfo,
1393 [out] SAMPR_HANDLE *ServerHandle);
1394
1395 /* Function 65 */
1396 NTSTATUS
1397 __stdcall
1398 SamrRidToSid(
1399 [in] SAMPR_HANDLE ObjectHandle,
1400 [in] unsigned long Rid,
1401 [out] PRPC_SID *Sid);
1402
1403 /* Function 66 */
1404 NTSTATUS
1405 __stdcall
1406 SamrSetDSRMPassword(
1407 [in] handle_t BindingHandle,
1408 [in, unique] PRPC_UNICODE_STRING Unused,
1409 [in] unsigned long UserId,
1410 [in, unique] PENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword);
1411
1412 /* Function 67 */
1413 NTSTATUS
1414 __stdcall
1415 SamrValidatePassword(
1416 [in] handle_t Handle,
1417 [in] PASSWORD_POLICY_VALIDATION_TYPE ValidationType,
1418 [in, switch_is(ValidationType)] PSAM_VALIDATE_INPUT_ARG InputArg,
1419 [out, switch_is(ValidationType)] PSAM_VALIDATE_OUTPUT_ARG *OutputArg);
1420}
LONG NTSTATUS
Definition: precomp.h:26
CD3D10_BUFFER_DESC D3D10_BUFFER_DESC cpp_quote(" ~CD3D10_BUFFER_DESC() {}") operator const D3D10_BUFFER_DESC &() const
Definition: d3d10.idl:491