e595024d6ce71029e071d056f1c66b313d703652
[reactos.git] / reactos / sdk / include / reactos / idl / netlogon.idl
1 /*
2 * Netlogon Service interface definition
3 */
4
5 #include <ms-dtyp.idl>
6
7 cpp_quote("#if 0")
8 typedef ULONG NTSTATUS;
9
10 typedef struct _STRING
11 {
12 USHORT Length;
13 USHORT MaximumLength;
14 [size_is(MaximumLength), length_is(Length)] CHAR *Buffer;
15 } STRING, *PSTRING;
16 cpp_quote("#endif")
17
18 typedef struct _OLD_LARGE_INTEGER
19 {
20 ULONG LowPart;
21 LONG HighPart;
22 } OLD_LARGE_INTEGER, *POLD_LARGE_INTEGER;
23
24 typedef struct _CYPHER_BLOCK
25 {
26 CHAR data[8];
27 } CYPHER_BLOCK, *PCYPHER_BLOCK;
28
29 typedef struct _NT_OWF_PASSWORD
30 {
31 CYPHER_BLOCK data[2];
32 } NT_OWF_PASSWORD, *PNT_OWF_PASSWORD, ENCRYPTED_NT_OWF_PASSWORD, *PENCRYPTED_NT_OWF_PASSWORD;
33
34 typedef struct _LM_OWF_PASSWORD
35 {
36 CYPHER_BLOCK data[2];
37 } LM_OWF_PASSWORD, *PLM_OWF_PASSWORD, ENCRYPTED_LM_OWF_PASSWORD, *PENCRYPTED_LM_OWF_PASSWORD;
38
39 typedef [handle] wchar_t *LOGONSRV_HANDLE;
40
41 typedef struct _NLPR_SID_INFORMATION
42 {
43 PRPC_SID SidPointer;
44 } NLPR_SID_INFORMATION, *PNLPR_SID_INFORMATION;
45
46 typedef struct _NLPR_SID_ARRAY
47 {
48 ULONG Count;
49 [size_is(Count)] PNLPR_SID_INFORMATION Sids;
50 } NLPR_SID_ARRAY, *PNLPR_SID_ARRAY;
51
52 typedef struct _NLPR_CR_CIPHER_VALUE
53 {
54 ULONG Length;
55 ULONG MaximumLength;
56 [size_is(MaximumLength), length_is(Length)] UCHAR *Buffer;
57 } NLPR_CR_CIPHER_VALUE, *PNLPR_CR_CIPHER_VALUE;
58
59 typedef struct _NLPR_LOGON_HOURS
60 {
61 USHORT UnitsPerWeek;
62 [size_is(1260), length_is((UnitsPerWeek + 7) / 8)] UCHAR *LogonHours;
63 } NLPR_LOGON_HOURS, *PNLPR_LOGON_HOURS;
64
65 typedef struct _NLPR_USER_PRIVATE_INFO
66 {
67 UCHAR SensitiveData;
68 ULONG DataLength;
69 [size_is(DataLength)] UCHAR *Data;
70 } NLPR_USER_PRIVATE_INFO, *PNLPR_USER_PRIVATE_INFO;
71
72 typedef struct _NLPR_MODIFIED_COUNT
73 {
74 OLD_LARGE_INTEGER ModifiedCount;
75 } NLPR_MODIFIED_COUNT, *PNLPR_MODIFIED_COUNT;
76
77 typedef struct _NLPR_QUOTA_LIMITS
78 {
79 ULONG PagedPoolLimit;
80 ULONG NonPagedPoolLimit;
81 ULONG MinimumWorkingSetSize;
82 ULONG MaximumWorkingSetSize;
83 ULONG PagefileLimit;
84 OLD_LARGE_INTEGER Reserved;
85 } NLPR_QUOTA_LIMITS, *PNLPR_QUOTA_LIMITS;
86
87 typedef struct _NETLOGON_DELTA_USER
88 {
89 RPC_UNICODE_STRING UserName;
90 RPC_UNICODE_STRING FullName;
91 ULONG UserId;
92 ULONG PrimaryGroupId;
93 RPC_UNICODE_STRING HomeDirectory;
94 RPC_UNICODE_STRING HomeDirectoryDrive;
95 RPC_UNICODE_STRING ScriptPath;
96 RPC_UNICODE_STRING AdminComment;
97 RPC_UNICODE_STRING WorkStations;
98 OLD_LARGE_INTEGER LastLogon;
99 OLD_LARGE_INTEGER LastLogoff;
100 NLPR_LOGON_HOURS LogonHours;
101 USHORT BadPasswordCount;
102 USHORT LogonCount;
103 OLD_LARGE_INTEGER PasswordLastSet;
104 OLD_LARGE_INTEGER AccountExpires;
105 ULONG UserAccountControl;
106 ENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword;
107 ENCRYPTED_LM_OWF_PASSWORD EncryptedLmOwfPassword;
108 UCHAR NtPasswordPresent;
109 UCHAR LmPasswordPresent;
110 UCHAR PasswordExpired;
111 RPC_UNICODE_STRING UserComment;
112 RPC_UNICODE_STRING Parameters;
113 USHORT CountryCode;
114 USHORT CodePage;
115 NLPR_USER_PRIVATE_INFO PrivateData;
116 SECURITY_INFORMATION SecurityInformation;
117 ULONG SecuritySize;
118 [size_is(SecuritySize)] UCHAR *SecurityDescriptor;
119 RPC_UNICODE_STRING ProfilePath;
120 RPC_UNICODE_STRING DummyString2;
121 RPC_UNICODE_STRING DummyString3;
122 RPC_UNICODE_STRING DummyString4;
123 ULONG DummyLong1;
124 ULONG DummyLong2;
125 ULONG DummyLong3;
126 ULONG DummyLong4;
127 } NETLOGON_DELTA_USER, *PNETLOGON_DELTA_USER;
128
129 typedef struct _NETLOGON_DELTA_GROUP
130 {
131 RPC_UNICODE_STRING Name;
132 ULONG RelativeId;
133 ULONG Attributes;
134 RPC_UNICODE_STRING AdminComment;
135 SECURITY_INFORMATION SecurityInformation;
136 ULONG SecuritySize;
137 [size_is(SecuritySize)] UCHAR *SecurityDescriptor;
138 RPC_UNICODE_STRING DummyString1;
139 RPC_UNICODE_STRING DummyString2;
140 RPC_UNICODE_STRING DummyString3;
141 RPC_UNICODE_STRING DummyString4;
142 ULONG DummyLong1;
143 ULONG DummyLong2;
144 ULONG DummyLong3;
145 ULONG DummyLong4;
146 } NETLOGON_DELTA_GROUP, *PNETLOGON_DELTA_GROUP;
147
148 typedef struct _NETLOGON_DELTA_GROUP_MEMBER
149 {
150 [size_is(MemberCount)] ULONG *Members;
151 [size_is(MemberCount)] ULONG *Attributes;
152 ULONG MemberCount;
153 ULONG DummyLong1;
154 ULONG DummyLong2;
155 ULONG DummyLong3;
156 ULONG DummyLong4;
157 } NETLOGON_DELTA_GROUP_MEMBER, *PNETLOGON_DELTA_GROUP_MEMBER;
158
159 typedef struct _NETLOGON_DELTA_ALIAS
160 {
161 RPC_UNICODE_STRING Name;
162 ULONG RelativeId;
163 SECURITY_INFORMATION SecurityInformation;
164 ULONG SecuritySize;
165 [size_is(SecuritySize)] UCHAR *SecurityDescriptor;
166 RPC_UNICODE_STRING Comment;
167 RPC_UNICODE_STRING DummyString2;
168 RPC_UNICODE_STRING DummyString3;
169 RPC_UNICODE_STRING DummyString4;
170 ULONG DummyLong1;
171 ULONG DummyLong2;
172 ULONG DummyLong3;
173 ULONG DummyLong4;
174 } NETLOGON_DELTA_ALIAS, *PNETLOGON_DELTA_ALIAS;
175
176 typedef struct _NETLOGON_DELTA_ALIAS_MEMBER
177 {
178 NLPR_SID_ARRAY Members;
179 ULONG DummyLong1;
180 ULONG DummyLong2;
181 ULONG DummyLong3;
182 ULONG DummyLong4;
183 } NETLOGON_DELTA_ALIAS_MEMBER, *PNETLOGON_DELTA_ALIAS_MEMBER;
184
185 typedef struct _NETLOGON_DELTA_DOMAIN
186 {
187 RPC_UNICODE_STRING DomainName;
188 RPC_UNICODE_STRING OemInformation;
189 OLD_LARGE_INTEGER ForceLogoff;
190 USHORT MinPasswordLength;
191 USHORT PasswordHistoryLength;
192 OLD_LARGE_INTEGER MaxPasswordAge;
193 OLD_LARGE_INTEGER MinPasswordAge;
194 OLD_LARGE_INTEGER DomainModifiedCount;
195 OLD_LARGE_INTEGER DomainCreationTime;
196 SECURITY_INFORMATION SecurityInformation;
197 ULONG SecuritySize;
198 [size_is(SecuritySize)] UCHAR *SecurityDescriptor;
199 RPC_UNICODE_STRING DomainLockoutInformation;
200 RPC_UNICODE_STRING DummyString2;
201 RPC_UNICODE_STRING DummyString3;
202 RPC_UNICODE_STRING DummyString4;
203 ULONG PasswordProperties;
204 ULONG DummyLong2;
205 ULONG DummyLong3;
206 ULONG DummyLong4;
207 } NETLOGON_DELTA_DOMAIN, *PNETLOGON_DELTA_DOMAIN;
208
209 typedef struct _NETLOGON_DELTA_RENAME_GROUP
210 {
211 RPC_UNICODE_STRING OldName;
212 RPC_UNICODE_STRING NewName;
213 RPC_UNICODE_STRING DummyString1;
214 RPC_UNICODE_STRING DummyString2;
215 RPC_UNICODE_STRING DummyString3;
216 RPC_UNICODE_STRING DummyString4;
217 ULONG DummyLong1;
218 ULONG DummyLong2;
219 ULONG DummyLong3;
220 ULONG DummyLong4;
221 } NETLOGON_RENAME_GROUP, *PNETLOGON_DELTA_RENAME_GROUP;
222
223 typedef struct _NETLOGON_DELTA_RENAME_USER
224 {
225 RPC_UNICODE_STRING OldName;
226 RPC_UNICODE_STRING NewName;
227 RPC_UNICODE_STRING DummyString1;
228 RPC_UNICODE_STRING DummyString2;
229 RPC_UNICODE_STRING DummyString3;
230 RPC_UNICODE_STRING DummyString4;
231 ULONG DummyLong1;
232 ULONG DummyLong2;
233 ULONG DummyLong3;
234 ULONG DummyLong4;
235 } NETLOGON_RENAME_USER, *PNETLOGON_DELTA_RENAME_USER;
236
237 typedef struct _NETLOGON_DELTA_RENAME_ALIAS
238 {
239 RPC_UNICODE_STRING OldName;
240 RPC_UNICODE_STRING NewName;
241 RPC_UNICODE_STRING DummyString1;
242 RPC_UNICODE_STRING DummyString2;
243 RPC_UNICODE_STRING DummyString3;
244 RPC_UNICODE_STRING DummyString4;
245 ULONG DummyLong1;
246 ULONG DummyLong2;
247 ULONG DummyLong3;
248 ULONG DummyLong4;
249 } NETLOGON_RENAME_ALIAS, *PNETLOGON_DELTA_RENAME_ALIAS;
250
251 typedef struct _NETLOGON_DELTA_POLICY
252 {
253 ULONG MaximumLogSize;
254 OLD_LARGE_INTEGER AuditRetentionPeriod;
255 UCHAR AuditingMode;
256 ULONG MaximumAuditEventCount;
257 [size_is(MaximumAuditEventCount + 1)] ULONG *EventAuditingOptions;
258 RPC_UNICODE_STRING PrimaryDomainName;
259 PRPC_SID PrimaryDomainSid;
260 NLPR_QUOTA_LIMITS QuotaLimits;
261 OLD_LARGE_INTEGER ModifiedId;
262 OLD_LARGE_INTEGER DatabaseCreationTime;
263 SECURITY_INFORMATION SecurityInformation;
264 ULONG SecuritySize;
265 [size_is(SecuritySize)] UCHAR *SecurityDescriptor;
266 RPC_UNICODE_STRING DummyString1;
267 RPC_UNICODE_STRING DummyString2;
268 RPC_UNICODE_STRING DummyString3;
269 RPC_UNICODE_STRING DummyString4;
270 ULONG DummyLong1;
271 ULONG DummyLong2;
272 ULONG DummyLong3;
273 ULONG DummyLong4;
274 } NETLOGON_DELTA_POLICY, *PNETLOGON_DELTA_POLICY;
275
276 typedef struct _NETLOGON_DELTA_TRUSTED_DOMAINS
277 {
278 RPC_UNICODE_STRING DomainName;
279 ULONG NumControllerEntries;
280 [size_is(NumControllerEntries)] PRPC_UNICODE_STRING ControllerNames;
281 SECURITY_INFORMATION SecurityInformation;
282 ULONG SecuritySize;
283 [size_is(SecuritySize)] UCHAR *SecurityDescriptor;
284 RPC_UNICODE_STRING DummyString1;
285 RPC_UNICODE_STRING DummyString2;
286 RPC_UNICODE_STRING DummyString3;
287 RPC_UNICODE_STRING DummyString4;
288 ULONG TrustedPosixOffset;
289 ULONG DummyLong2;
290 ULONG DummyLong3;
291 ULONG DummyLong4;
292 } NETLOGON_DELTA_TRUSTED_DOMAINS, *PNETLOGON_DELTA_TRUSTED_DOMAINS;
293
294 typedef struct _NETLOGON_DELTA_ACCOUNTS
295 {
296 ULONG PrivilegeEntries;
297 ULONG PrivilegeControl;
298 [size_is(PrivilegeEntries)] ULONG *PrivilegeAttributes;
299 [size_is(PrivilegeEntries)] PRPC_UNICODE_STRING PrivilegeNames;
300 NLPR_QUOTA_LIMITS QuotaLimits;
301 ULONG SystemAccessFlags;
302 SECURITY_INFORMATION SecurityInformation;
303 ULONG SecuritySize;
304 [size_is(SecuritySize)] UCHAR *SecurityDescriptor;
305 RPC_UNICODE_STRING DummyString1;
306 RPC_UNICODE_STRING DummyString2;
307 RPC_UNICODE_STRING DummyString3;
308 RPC_UNICODE_STRING DummyString4;
309 ULONG DummyLong1;
310 ULONG DummyLong2;
311 ULONG DummyLong3;
312 ULONG DummyLong4;
313 } NETLOGON_DELTA_ACCOUNTS, *PNETLOGON_DELTA_ACCOUNTS;
314
315 typedef struct _NETLOGON_DELTA_SECRET
316 {
317 NLPR_CR_CIPHER_VALUE CurrentValue;
318 OLD_LARGE_INTEGER CurrentValueSetTime;
319 NLPR_CR_CIPHER_VALUE OldValue;
320 OLD_LARGE_INTEGER OldValueSetTime;
321 SECURITY_INFORMATION SecurityInformation;
322 ULONG SecuritySize;
323 [size_is(SecuritySize)] UCHAR *SecurityDescriptor;
324 RPC_UNICODE_STRING DummyString1;
325 RPC_UNICODE_STRING DummyString2;
326 RPC_UNICODE_STRING DummyString3;
327 RPC_UNICODE_STRING DummyString4;
328 ULONG DummyLong1;
329 ULONG DummyLong2;
330 ULONG DummyLong3;
331 ULONG DummyLong4;
332 } NETLOGON_DELTA_SECRET, *PNETLOGON_DELTA_SECRET;
333
334 typedef struct _NETLOGON_DELTA_DELETE_GROUP
335 {
336 [string] wchar_t *AccountName;
337 RPC_UNICODE_STRING DummyString1;
338 RPC_UNICODE_STRING DummyString2;
339 RPC_UNICODE_STRING DummyString3;
340 RPC_UNICODE_STRING DummyString4;
341 ULONG DummyLong1;
342 ULONG DummyLong2;
343 ULONG DummyLong3;
344 ULONG DummyLong4;
345 } NETLOGON_DELTA_DELETE_GROUP, *PNETLOGON_DELTA_DELETE_GROUP;
346
347 typedef struct _NETLOGON_DELTA_DELETE_USER
348 {
349 [string] wchar_t *AccountName;
350 RPC_UNICODE_STRING DummyString1;
351 RPC_UNICODE_STRING DummyString2;
352 RPC_UNICODE_STRING DummyString3;
353 RPC_UNICODE_STRING DummyString4;
354 ULONG DummyLong1;
355 ULONG DummyLong2;
356 ULONG DummyLong3;
357 ULONG DummyLong4;
358 } NETLOGON_DELTA_DELETE_USER, *PNETLOGON_DELTA_DELETE_USER;
359
360 typedef enum _NETLOGON_DELTA_TYPE
361 {
362 AddOrChangeDomain = 1,
363 AddOrChangeGroup = 2,
364 DeleteGroup = 3,
365 RenameGroup = 4,
366 AddOrChangeUser = 5,
367 DeleteUser = 6,
368 RenameUser = 7,
369 ChangeGroupMembership = 8,
370 AddOrChangeAlias = 9,
371 DeleteAlias = 10,
372 RenameAlias = 11,
373 ChangeAliasMembership = 12,
374 AddOrChangeLsaPolicy = 13,
375 AddOrChangeLsaTDomain = 14,
376 DeleteLsaTDomain = 15,
377 AddOrChangeLsaAccount = 16,
378 DeleteLsaAccount = 17,
379 AddOrChangeLsaSecret = 18,
380 DeleteLsaSecret = 19,
381 DeleteGroupByName = 20,
382 DeleteUserByName = 21,
383 SerialNumberSkip = 22
384 } NETLOGON_DELTA_TYPE;
385
386 typedef [switch_type(NETLOGON_DELTA_TYPE)] union _NETLOGON_DELTA_UNION
387 {
388 [case(AddOrChangeDomain)] PNETLOGON_DELTA_DOMAIN DeltaDomain;
389 [case(AddOrChangeGroup)] PNETLOGON_DELTA_GROUP DeltaGroup;
390 [case(RenameGroup)] PNETLOGON_DELTA_RENAME_GROUP DeltaRenameGroup;
391 [case(AddOrChangeUser)] PNETLOGON_DELTA_USER DeltaUser;
392 [case(RenameUser)] PNETLOGON_DELTA_RENAME_USER DeltaRenameUser;
393 [case(ChangeGroupMembership)] PNETLOGON_DELTA_GROUP_MEMBER DeltaGroupMember;
394 [case(AddOrChangeAlias)] PNETLOGON_DELTA_ALIAS DeltaAlias;
395 [case(RenameAlias)] PNETLOGON_DELTA_RENAME_ALIAS DeltaRenameAlias;
396 [case(ChangeAliasMembership)] PNETLOGON_DELTA_ALIAS_MEMBER DeltaAliasMember;
397 [case(AddOrChangeLsaPolicy)] PNETLOGON_DELTA_POLICY DeltaPolicy;
398 [case(AddOrChangeLsaTDomain)] PNETLOGON_DELTA_TRUSTED_DOMAINS DeltaTDomains;
399 [case(AddOrChangeLsaAccount)] PNETLOGON_DELTA_ACCOUNTS DeltaAccounts;
400 [case(AddOrChangeLsaSecret)] PNETLOGON_DELTA_SECRET DeltaSecret;
401 [case(DeleteGroupByName)] PNETLOGON_DELTA_DELETE_GROUP DeltaDeleteGroup;
402 [case(DeleteUserByName)] PNETLOGON_DELTA_DELETE_USER DeltaDeleteUser;
403 [case(SerialNumberSkip)] PNLPR_MODIFIED_COUNT DeltaSerialNumberSkip;
404 [default] ;
405 } NETLOGON_DELTA_UNION, *PNETLOGON_DELTA_UNION;
406
407 typedef [switch_type(NETLOGON_DELTA_TYPE)] union _NETLOGON_DELTA_ID_UNION
408 {
409 [case(AddOrChangeDomain,
410 AddOrChangeGroup,
411 DeleteGroup,
412 RenameGroup,
413 AddOrChangeUser,
414 DeleteUser,
415 RenameUser,
416 ChangeGroupMembership,
417 AddOrChangeAlias,
418 DeleteAlias,
419 RenameAlias,
420 ChangeAliasMembership,
421 DeleteGroupByName,
422 DeleteUserByName)] ULONG Rid;
423 [case(AddOrChangeLsaPolicy,
424 AddOrChangeLsaTDomain,
425 DeleteLsaTDomain,
426 AddOrChangeLsaAccount,
427 DeleteLsaAccount)] PRPC_SID Sid;
428 [case(AddOrChangeLsaSecret,
429 DeleteLsaSecret)] [string] wchar_t *Name;
430 [default] ;
431 } NETLOGON_DELTA_ID_UNION, *PNETLOGON_DELTA_ID_UNION;
432
433 typedef struct _NETLOGON_DELTA_ENUM
434 {
435 NETLOGON_DELTA_TYPE DeltaType;
436 [switch_is(DeltaType)] NETLOGON_DELTA_ID_UNION DeltaID;
437 [switch_is(DeltaType)] NETLOGON_DELTA_UNION DeltaUnion;
438 } NETLOGON_DELTA_ENUM, *PNETLOGON_DELTA_ENUM;
439
440 typedef struct _NETLOGON_DELTA_ENUM_ARRAY
441 {
442 DWORD CountReturned;
443 [size_is(CountReturned)] PNETLOGON_DELTA_ENUM Deltas;
444 } NETLOGON_DELTA_ENUM_ARRAY, *PNETLOGON_DELTA_ENUM_ARRAY;
445
446 typedef struct _NETLOGON_LOGON_IDENTITY_INFO
447 {
448 RPC_UNICODE_STRING LogonDomainName;
449 ULONG ParameterControl;
450 OLD_LARGE_INTEGER Reserved;
451 RPC_UNICODE_STRING UserName;
452 RPC_UNICODE_STRING Workstation;
453 } NETLOGON_LOGON_IDENTITY_INFO, *PNETLOGON_LOGON_IDENTITY_INFO;
454
455 typedef struct _NETLOGON_INTERACTIVE_INFO
456 {
457 NETLOGON_LOGON_IDENTITY_INFO Identity;
458 LM_OWF_PASSWORD LmOwfPassword;
459 NT_OWF_PASSWORD NtOwfPassword;
460 } NETLOGON_INTERACTIVE_INFO, *PNETLOGON_INTERACTIVE_INFO;
461
462 typedef enum _NETLOGON_LOGON_INFO_CLASS
463 {
464 NetlogonInteractiveInformation = 1,
465 NetlogonNetworkInformation = 2,
466 NetlogonServiceInformation = 3,
467 NetlogonGenericInformation = 4,
468 NetlogonInteractiveTransitiveInformation = 5,
469 NetlogonNetworkTransitiveInformation = 6,
470 NetlogonServiceTransitiveInformation = 7
471 } NETLOGON_LOGON_INFO_CLASS;
472
473 typedef struct _NETLOGON_SERVICE_INFO
474 {
475 NETLOGON_LOGON_IDENTITY_INFO Identity;
476 LM_OWF_PASSWORD LmOwfPassword;
477 NT_OWF_PASSWORD NtOwfPassword;
478 } NETLOGON_SERVICE_INFO, *PNETLOGON_SERVICE_INFO;
479
480 typedef struct
481 {
482 CHAR data[8];
483 } LM_CHALLENGE;
484
485 typedef struct _NETLOGON_NETWORK_INFO
486 {
487 NETLOGON_LOGON_IDENTITY_INFO Identity;
488 LM_CHALLENGE LmChallenge;
489 STRING NtChallengeResponse;
490 STRING LmChallengeResponse;
491 } NETLOGON_NETWORK_INFO, *PNETLOGON_NETWORK_INFO;
492
493 typedef struct _NETLOGON_GENERIC_INFO
494 {
495 NETLOGON_LOGON_IDENTITY_INFO Identity;
496 RPC_UNICODE_STRING PackageName;
497 ULONG DataLength;
498 [size_is(DataLength)] UCHAR *LogonData;
499 } NETLOGON_GENERIC_INFO, *PNETLOGON_GENERIC_INFO;
500
501 typedef [switch_type(NETLOGON_LOGON_INFO_CLASS)] union _NETLOGON_LEVEL
502 {
503 [case(NetlogonInteractiveInformation)] PNETLOGON_INTERACTIVE_INFO LogonInteractive;
504 [case(NetlogonInteractiveTransitiveInformation)] PNETLOGON_INTERACTIVE_INFO LogonInteractiveTransitive;
505 [case(NetlogonServiceInformation)] PNETLOGON_SERVICE_INFO LogonService;
506 [case(NetlogonServiceTransitiveInformation)] PNETLOGON_SERVICE_INFO LogonServiceTransitive;
507 [case(NetlogonNetworkInformation)] PNETLOGON_NETWORK_INFO LogonNetwork;
508 [case(NetlogonNetworkTransitiveInformation)] PNETLOGON_NETWORK_INFO LogonNetworkTransitive;
509 [case(NetlogonGenericInformation)] PNETLOGON_GENERIC_INFO LogonGeneric;
510 [default] ;
511 } NETLOGON_LEVEL, *PNETLOGON_LEVEL;
512
513 typedef enum _NETLOGON_VALIDATION_INFO_CLASS
514 {
515 NetlogonValidationUasInfo = 1,
516 NetlogonValidationSamInfo = 2,
517 NetlogonValidationSamInfo2 = 3,
518 NetlogonValidationGenericInfo = 4,
519 NetlogonValidationGenericInfo2 = 5,
520 NetlogonValidationSamInfo4 = 6
521 } NETLOGON_VALIDATION_INFO_CLASS;
522
523 cpp_quote("#ifndef _NTSAM_")
524 typedef struct _GROUP_MEMBERSHIP
525 {
526 ULONG RelativeId;
527 ULONG Attributes;
528 } GROUP_MEMBERSHIP, *PGROUP_MEMBERSHIP;
529 cpp_quote("#endif")
530
531 typedef struct _USER_SESSION_KEY
532 {
533 CYPHER_BLOCK data[2];
534 } USER_SESSION_KEY, *PUSER_SESSION_KEY;
535
536 typedef struct _NETLOGON_SID_AND_ATTRIBUTES
537 {
538 PRPC_SID Sid;
539 ULONG Attributes;
540 } NETLOGON_SID_AND_ATTRIBUTES, *PNETLOGON_SID_AND_ATTRIBUTES;
541
542 typedef struct _NETLOGON_VALIDATION_SAM_INFO
543 {
544 OLD_LARGE_INTEGER LogonTime;
545 OLD_LARGE_INTEGER LogoffTime;
546 OLD_LARGE_INTEGER KickOffTime;
547 OLD_LARGE_INTEGER PasswordLastSet;
548 OLD_LARGE_INTEGER PasswordCanChange;
549 OLD_LARGE_INTEGER PasswordMustChange;
550 RPC_UNICODE_STRING EffectiveName;
551 RPC_UNICODE_STRING FullName;
552 RPC_UNICODE_STRING LogonScript;
553 RPC_UNICODE_STRING ProfilePath;
554 RPC_UNICODE_STRING HomeDirectory;
555 RPC_UNICODE_STRING HomeDirectoryDrive;
556 USHORT LogonCount;
557 USHORT BadPasswordCount;
558 ULONG UserId;
559 ULONG PrimaryGroupId;
560 ULONG GroupCount;
561 [size_is(GroupCount)] PGROUP_MEMBERSHIP GroupIds;
562 ULONG UserFlags;
563 USER_SESSION_KEY UserSessionKey;
564 RPC_UNICODE_STRING LogonServer;
565 RPC_UNICODE_STRING LogonDomainName;
566 PRPC_SID LogonDomainId;
567 ULONG ExpansionRoom[10];
568 } NETLOGON_VALIDATION_SAM_INFO, *PNETLOGON_VALIDATION_SAM_INFO;
569
570 typedef struct _NETLOGON_VALIDATION_SAM_INFO2
571 {
572 OLD_LARGE_INTEGER LogonTime;
573 OLD_LARGE_INTEGER LogoffTime;
574 OLD_LARGE_INTEGER KickOffTime;
575 OLD_LARGE_INTEGER PasswordLastSet;
576 OLD_LARGE_INTEGER PasswordCanChange;
577 OLD_LARGE_INTEGER PasswordMustChange;
578 RPC_UNICODE_STRING EffectiveName;
579 RPC_UNICODE_STRING FullName;
580 RPC_UNICODE_STRING LogonScript;
581 RPC_UNICODE_STRING ProfilePath;
582 RPC_UNICODE_STRING HomeDirectory;
583 RPC_UNICODE_STRING HomeDirectoryDrive;
584 USHORT LogonCount;
585 USHORT BadPasswordCount;
586 ULONG UserId;
587 ULONG PrimaryGroupId;
588 ULONG GroupCount;
589 [size_is(GroupCount)] PGROUP_MEMBERSHIP GroupIds;
590 ULONG UserFlags;
591 USER_SESSION_KEY UserSessionKey;
592 RPC_UNICODE_STRING LogonServer;
593 RPC_UNICODE_STRING LogonDomainName;
594 PRPC_SID LogonDomainId;
595 ULONG ExpansionRoom[10];
596 ULONG SidCount;
597 [size_is(SidCount)] PNETLOGON_SID_AND_ATTRIBUTES ExtraSids;
598 } NETLOGON_VALIDATION_SAM_INFO2, *PNETLOGON_VALIDATION_SAM_INFO2 ;
599
600 typedef struct _NETLOGON_VALIDATION_GENERIC_INFO2
601 {
602 ULONG DataLength;
603 [size_is(DataLength)] UCHAR *ValidationData;
604 } NETLOGON_VALIDATION_GENERIC_INFO2, *PNETLOGON_VALIDATION_GENERIC_INFO2;
605
606 typedef struct _NETLOGON_VALIDATION_SAM_INFO4
607 {
608 OLD_LARGE_INTEGER LogonTime;
609 OLD_LARGE_INTEGER LogoffTime;
610 OLD_LARGE_INTEGER KickOffTime;
611 OLD_LARGE_INTEGER PasswordLastSet;
612 OLD_LARGE_INTEGER PasswordCanChange;
613 OLD_LARGE_INTEGER PasswordMustChange;
614 RPC_UNICODE_STRING EffectiveName;
615 RPC_UNICODE_STRING FullName;
616 RPC_UNICODE_STRING LogonScript;
617 RPC_UNICODE_STRING ProfilePath;
618 RPC_UNICODE_STRING HomeDirectory;
619 RPC_UNICODE_STRING HomeDirectoryDrive;
620 unsigned short LogonCount;
621 unsigned short BadPasswordCount;
622 unsigned long UserId;
623 unsigned long PrimaryGroupId;
624 unsigned long GroupCount;
625 [size_is(GroupCount)] PGROUP_MEMBERSHIP GroupIds;
626 unsigned long UserFlags;
627 USER_SESSION_KEY UserSessionKey;
628 RPC_UNICODE_STRING LogonServer;
629 RPC_UNICODE_STRING LogonDomainName;
630 PRPC_SID LogonDomainId;
631 unsigned char LMKey[8];
632 ULONG UserAccountControl;
633 ULONG SubAuthStatus;
634 OLD_LARGE_INTEGER LastSuccessfulILogon;
635 OLD_LARGE_INTEGER LastFailedILogon;
636 ULONG FailedILogonCount;
637 ULONG Reserved4[1];
638 unsigned long SidCount;
639 [size_is(SidCount)] PNETLOGON_SID_AND_ATTRIBUTES ExtraSids;
640 RPC_UNICODE_STRING DnsLogonDomainName;
641 RPC_UNICODE_STRING Upn;
642 RPC_UNICODE_STRING ExpansionString1;
643 RPC_UNICODE_STRING ExpansionString2;
644 RPC_UNICODE_STRING ExpansionString3;
645 RPC_UNICODE_STRING ExpansionString4;
646 RPC_UNICODE_STRING ExpansionString5;
647 RPC_UNICODE_STRING ExpansionString6;
648 RPC_UNICODE_STRING ExpansionString7;
649 RPC_UNICODE_STRING ExpansionString8;
650 RPC_UNICODE_STRING ExpansionString9;
651 RPC_UNICODE_STRING ExpansionString10;
652 } NETLOGON_VALIDATION_SAM_INFO4, *PNETLOGON_VALIDATION_SAM_INFO4;
653
654 typedef [switch_type(enum _NETLOGON_VALIDATION_INFO_CLASS)] union _NETLOGON_VALIDATION
655 {
656 [case(NetlogonValidationSamInfo)] PNETLOGON_VALIDATION_SAM_INFO ValidationSam;
657 [case(NetlogonValidationSamInfo2)] PNETLOGON_VALIDATION_SAM_INFO2 ValidationSam2;
658 [case(NetlogonValidationGenericInfo2)] PNETLOGON_VALIDATION_GENERIC_INFO2 ValidationGeneric2;
659 [case(NetlogonValidationSamInfo4)] PNETLOGON_VALIDATION_SAM_INFO4 ValidationSam4;
660 [default] ;
661 } NETLOGON_VALIDATION, *PNETLOGON_VALIDATION;
662
663 typedef [switch_type(DWORD)] union _NETLOGON_CONTROL_DATA_INFORMATION
664 {
665 [case(5, 6, 9, 10)] [string] wchar_t *TrustedDomainName;
666 [case(65534)] DWORD DebugFlag;
667 [case(8)] [string] wchar_t *UserName;
668 [default] ;
669 } NETLOGON_CONTROL_DATA_INFORMATION, *PNETLOGON_CONTROL_DATA_INFORMATION;
670
671 cpp_quote("#ifndef _LMACCESS_H")
672 typedef struct _NETLOGON_INFO_1
673 {
674 DWORD netlog1_flags;
675 NET_API_STATUS netlog1_pdc_connection_status;
676 } NETLOGON_INFO_1, *PNETLOGON_INFO_1;
677
678 typedef struct _NETLOGON_INFO_2
679 {
680 DWORD netlog2_flags;
681 NET_API_STATUS netlog2_pdc_connection_status;
682 [string] wchar_t *netlog2_trusted_dc_name;
683 NET_API_STATUS netlog2_tc_connection_status;
684 } NETLOGON_INFO_2, *PNETLOGON_INFO_2;
685
686 typedef struct _NETLOGON_INFO_3
687 {
688 DWORD netlog3_flags;
689 DWORD netlog3_logon_attempts;
690 DWORD netlog3_reserved1;
691 DWORD netlog3_reserved2;
692 DWORD netlog3_reserved3;
693 DWORD netlog3_reserved4;
694 DWORD netlog3_reserved5;
695 } NETLOGON_INFO_3, *PNETLOGON_INFO_3;
696 cpp_quote("#endif")
697
698 typedef struct _NETLOGON_INFO_4
699 {
700 [string] wchar_t *netlog4_trusted_dc_name;
701 [string] wchar_t *netlog4_trusted_domain_name;
702 } NETLOGON_INFO_4, *PNETLOGON_INFO_4;
703
704 typedef [switch_type(DWORD)] union _NETLOGON_CONTROL_QUERY_INFORMATION
705 {
706 [case(1)] PNETLOGON_INFO_1 NetlogonInfo1;
707 [case(2)] PNETLOGON_INFO_2 NetlogonInfo2;
708 [case(3)] PNETLOGON_INFO_3 NetlogonInfo3;
709 [case(4)] PNETLOGON_INFO_4 NetlogonInfo4;
710 [default] ;
711 } NETLOGON_CONTROL_QUERY_INFORMATION, *PNETLOGON_CONTROL_QUERY_INFORMATION;
712
713 typedef enum _SYNC_STATE
714 {
715 NormalState = 0,
716 DomainState = 1,
717 GroupState = 2,
718 UasBuiltInGroupState = 3,
719 UserState = 4,
720 GroupMemberState = 5,
721 AliasState = 6,
722 AliasMemberState = 7,
723 SamDoneState = 8
724 } SYNC_STATE, *PSYNC_STATE;
725
726 typedef struct _DOMAIN_NAME_BUFFER
727 {
728 ULONG DomainNameByteCount;
729 [unique, size_is(DomainNameByteCount)] UCHAR *DomainNames;
730 } DOMAIN_NAME_BUFFER, *PDOMAIN_NAME_BUFFER;
731
732 typedef struct _NETLOGON_LSA_POLICY_INFO
733 {
734 ULONG LsaPolicySize;
735 [size_is(LsaPolicySize)] UCHAR *LsaPolicy;
736 } NETLOGON_LSA_POLICY_INFO, *PNETLOGON_LSA_POLICY_INFO;
737
738 typedef struct _NETLOGON_ONE_DOMAIN_INFO
739 {
740 RPC_UNICODE_STRING DomainName;
741 RPC_UNICODE_STRING DnsDomainName;
742 RPC_UNICODE_STRING DnsForestName;
743 GUID DomainGuid;
744 PRPC_SID DomainSid;
745 RPC_UNICODE_STRING TrustExtension;
746 RPC_UNICODE_STRING DummyString2;
747 RPC_UNICODE_STRING DummyString3;
748 RPC_UNICODE_STRING DummyString4;
749 ULONG DummyLong1;
750 ULONG DummyLong2;
751 ULONG DummyLong3;
752 ULONG DummyLong4;
753 } NETLOGON_ONE_DOMAIN_INFO, *PNETLOGON_ONE_DOMAIN_INFO;
754
755 typedef struct _NETLOGON_DOMAIN_INFO
756 {
757 NETLOGON_ONE_DOMAIN_INFO PrimaryDomain;
758 ULONG TrustedDomainCount;
759 [size_is(TrustedDomainCount)] PNETLOGON_ONE_DOMAIN_INFO TrustedDomains;
760 NETLOGON_LSA_POLICY_INFO LsaPolicy;
761 RPC_UNICODE_STRING DnsHostNameInDs;
762 RPC_UNICODE_STRING DummyString2;
763 RPC_UNICODE_STRING DummyString3;
764 RPC_UNICODE_STRING DummyString4;
765 ULONG WorkstationFlags;
766 ULONG SupportedEncTypes;
767 ULONG DummyLong3;
768 ULONG DummyLong4;
769 } NETLOGON_DOMAIN_INFO, *PNETLOGON_DOMAIN_INFO;
770
771 typedef [switch_type(DWORD)] union _NETLOGON_DOMAIN_INFORMATION
772 {
773 [case(1)] PNETLOGON_DOMAIN_INFO DomainInfo;
774 [case(2)] PNETLOGON_LSA_POLICY_INFO LsaPolicyInfo;
775 } NETLOGON_DOMAIN_INFORMATION, *PNETLOGON_DOMAIN_INFORMATION;
776
777 typedef struct _NETLOGON_WORKSTATION_INFO
778 {
779 NETLOGON_LSA_POLICY_INFO LsaPolicy;
780 [string] wchar_t *DnsHostName;
781 [string] wchar_t *SiteName;
782 [string] wchar_t *Dummy1;
783 [string] wchar_t *Dummy2;
784 [string] wchar_t *Dummy3;
785 [string] wchar_t *Dummy4;
786 RPC_UNICODE_STRING OsVersion;
787 RPC_UNICODE_STRING OsName;
788 RPC_UNICODE_STRING DummyString3;
789 RPC_UNICODE_STRING DummyString4;
790 ULONG WorkstationFlags;
791 ULONG KerberosSupportedEncryptionTypes;
792 ULONG DummyLong3;
793 ULONG DummyLong4;
794 } NETLOGON_WORKSTATION_INFO, *PNETLOGON_WORKSTATION_INFO;
795
796 typedef [switch_type(DWORD)] union _NETLOGON_WORKSTATION_INFORMATION
797 {
798 [case(1)] PNETLOGON_WORKSTATION_INFO WorkstationInfo;
799 [case(2)] PNETLOGON_WORKSTATION_INFO LsaPolicyInfo;
800 } NETLOGON_WORKSTATION_INFORMATION, *PNETLOGON_WORKSTATION_INFORMATION;
801
802 typedef struct _NL_SOCKET_ADDRESS
803 {
804 [size_is(iSockaddrLength)] UCHAR *lpSockaddr;
805 ULONG iSockaddrLength;
806 } NL_SOCKET_ADDRESS, *PNL_SOCKET_ADDRESS;
807
808 typedef struct _NL_SITE_NAME_ARRAY
809 {
810 ULONG EntryCount;
811 [size_is(EntryCount)] PRPC_UNICODE_STRING SiteNames;
812 } NL_SITE_NAME_ARRAY, *PNL_SITE_NAME_ARRAY;
813
814 typedef struct _DS_DOMAIN_TRUSTSW
815 {
816 [string] wchar_t *NetbiosDomainName;
817 [string] wchar_t *DnsDomainName;
818 ULONG Flags;
819 ULONG ParentIndex;
820 ULONG TrustType;
821 ULONG TrustAttributes;
822 PRPC_SID DomainSid;
823 GUID DomainGuid;
824 } DS_DOMAIN_TRUSTSW, *PDS_DOMAIN_TRUSTSW;
825
826 typedef struct _NETLOGON_TRUSTED_DOMAIN_ARRAY
827 {
828 DWORD DomainCount;
829 [size_is(DomainCount)] PDS_DOMAIN_TRUSTSW Domains;
830 } NETLOGON_TRUSTED_DOMAIN_ARRAY, *PNETLOGON_TRUSTED_DOMAIN_ARRAY;
831
832 typedef struct _NL_SITE_NAME_EX_ARRAY
833 {
834 ULONG EntryCount;
835 [size_is(EntryCount)] PRPC_UNICODE_STRING SiteNames;
836 [size_is(EntryCount)] PRPC_UNICODE_STRING SubnetNames;
837 } NL_SITE_NAME_EX_ARRAY, *PNL_SITE_NAME_EX_ARRAY;
838
839 typedef struct _NL_GENERIC_RPC_DATA
840 {
841 ULONG UlongEntryCount;
842 [size_is(UlongEntryCount)] ULONG *UlongData;
843 ULONG UnicodeStringEntryCount;
844 [size_is(UnicodeStringEntryCount)] PRPC_UNICODE_STRING UnicodeStringData;
845 } NL_GENERIC_RPC_DATA, *PNL_GENERIC_RPC_DATA;
846
847 typedef struct _NETLOGON_VALIDATION_UAS_INFO
848 {
849 [string] wchar_t *usrlog1_eff_name;
850 DWORD usrlog1_priv;
851 DWORD usrlog1_auth_flags;
852 DWORD usrlog1_num_logons;
853 DWORD usrlog1_bad_pw_count;
854 DWORD usrlog1_last_logon;
855 DWORD usrlog1_last_logoff;
856 DWORD usrlog1_logoff_time;
857 DWORD usrlog1_kickoff_time;
858 DWORD usrlog1_password_age;
859 DWORD usrlog1_pw_can_change;
860 DWORD usrlog1_pw_must_change;
861 [string] wchar_t *usrlog1_computer;
862 [string] wchar_t *usrlog1_domain;
863 [string] wchar_t *usrlog1_script_path;
864 DWORD usrlog1_reserved1;
865 } NETLOGON_VALIDATION_UAS_INFO, *PNETLOGON_VALIDATION_UAS_INFO;
866
867 typedef struct _NETLOGON_LOGOFF_UAS_INFO
868 {
869 DWORD Duration;
870 USHORT LogonCount;
871 } NETLOGON_LOGOFF_UAS_INFORMATION, *PNETLOGON_LOGOFF_UAS_INFO;
872
873 typedef [switch_type(DWORD)] union _NETLOGON_CAPABILITIES
874 {
875 [case(1)] ULONG ServerCapabilities;
876 } NETLOGON_CAPABILITIES, *PNETLOGON_CAPABILITIES;
877
878 typedef struct _NETLOGON_CREDENTIAL
879 {
880 CHAR data[8];
881 } NETLOGON_CREDENTIAL, *PNETLOGON_CREDENTIAL;
882
883 typedef struct _NETLOGON_AUTHENTICATOR
884 {
885 NETLOGON_CREDENTIAL Credential;
886 DWORD Timestamp;
887 } NETLOGON_AUTHENTICATOR, *PNETLOGON_AUTHENTICATOR;
888
889 typedef enum _NETLOGON_SECURE_CHANNEL_TYPE
890 {
891 NullSecureChannel = 0,
892 MsvApSecureChannel = 1,
893 WorkstationSecureChannel = 2,
894 TrustedDnsDomainSecureChannel = 3,
895 TrustedDomainSecureChannel = 4,
896 UasServerSecureChannel = 5,
897 ServerSecureChannel = 6,
898 CdcServerSecureChannel = 7
899 } NETLOGON_SECURE_CHANNEL_TYPE;
900
901 typedef struct _UAS_INFO_0
902 {
903 CHAR ComputerName[16];
904 ULONG TimeCreated;
905 ULONG SerialNumber;
906 } UAS_INFO_0, *PUAS_INFO_0;
907
908 typedef struct _DOMAIN_CONTROLLER_INFOW
909 {
910 [string, unique] wchar_t *DomainControllerName;
911 [string, unique] wchar_t *DomainControllerAddress;
912 ULONG DomainControllerAddressType;
913 GUID DomainGuid;
914 [string, unique] wchar_t *DomainName;
915 [string, unique] wchar_t *DnsForestName;
916 ULONG Flags;
917 [string, unique] wchar_t *DcSiteName;
918 [string, unique] wchar_t *ClientSiteName;
919 } DOMAIN_CONTROLLER_INFOW, *PDOMAIN_CONTROLLER_INFOW;
920
921 typedef struct _NL_TRUST_PASSWORD
922 {
923 WCHAR Buffer[256];
924 ULONG Length;
925 } NL_TRUST_PASSWORD, *PNL_TRUST_PASSWORD;
926
927 typedef struct _NL_PASSWORD_VERSION
928 {
929 ULONG ReservedField;
930 ULONG PasswordVersionNumber;
931 ULONG PasswordVersionPresent;
932 } NL_PASSWORD_VERSION, *PNL_PASSWORD_VERSION;
933
934 cpp_quote("#ifndef _NTSECAPI_H")
935 typedef enum _LSA_FOREST_TRUST_RECORD_TYPE
936 {
937 ForestTrustTopLevelName = 0,
938 ForestTrustTopLevelNameEx = 1,
939 ForestTrustDomainInfo = 2,
940 } LSA_FOREST_TRUST_RECORD_TYPE;
941
942 typedef RPC_UNICODE_STRING LSA_RPC_UNICODE_STRING, *PLSA_RPC_UNICODE_STRING;
943
944 typedef struct _LSA_FOREST_TRUST_DOMAIN_INFO
945 {
946 PRPC_SID Sid;
947 LSA_RPC_UNICODE_STRING DnsName;
948 LSA_RPC_UNICODE_STRING NetbiosName;
949 } LSA_FOREST_TRUST_DOMAIN_INFO, *PLSA_FOREST_TRUST_DOMAIN_INFO;
950
951 typedef struct _LSA_FOREST_TRUST_BINARY_DATA
952 {
953 [range(0, 131072)] ULONG Length;
954 [size_is(Length)] UCHAR * Buffer;
955 } LSA_FOREST_TRUST_BINARY_DATA, *PLSA_FOREST_TRUST_BINARY_DATA;
956
957 typedef struct _LSA_FOREST_TRUST_RECORD
958 {
959 ULONG Flags;
960 LSA_FOREST_TRUST_RECORD_TYPE ForestTrustType;
961 LARGE_INTEGER Time;
962 [switch_type( LSA_FOREST_TRUST_RECORD_TYPE ), switch_is(ForestTrustType)] union
963 {
964 [case(ForestTrustTopLevelName, ForestTrustTopLevelNameEx)] LSA_RPC_UNICODE_STRING TopLevelName;
965 [case(ForestTrustDomainInfo)] LSA_FOREST_TRUST_DOMAIN_INFO DomainInfo;
966 [default] LSA_FOREST_TRUST_BINARY_DATA Data;
967 } ForestTrustData;
968 } LSA_FOREST_TRUST_RECORD, *PLSA_FOREST_TRUST_RECORD;
969
970 typedef struct _LSA_FOREST_TRUST_INFORMATION
971 {
972 [range(0, 4000)] ULONG RecordCount;
973 [size_is(RecordCount)] PLSA_FOREST_TRUST_RECORD *Entries;
974 } LSA_FOREST_TRUST_INFORMATION, *PLSA_FOREST_TRUST_INFORMATION;
975 cpp_quote("#endif")
976
977
978 [
979 uuid(12345678-1234-ABCD-EF00-01234567CFFB),
980 version(1.0),
981 #ifdef __midl
982 ms_union,
983 #endif
984 pointer_default(unique)
985 #ifndef __midl
986 ,implicit_handle(handle_t hBinding)
987 #endif
988 ]
989 interface logon
990 {
991 /* Function 0 */
992 NET_API_STATUS
993 __stdcall
994 NetrLogonUasLogon(
995 [in, unique, string] LOGONSRV_HANDLE ServerName,
996 [in, string] wchar_t *UserName,
997 [in, string] wchar_t *Workstation,
998 [out] PNETLOGON_VALIDATION_UAS_INFO *ValidationInformation);
999
1000 /* Function 1 */
1001 NET_API_STATUS
1002 __stdcall
1003 NetrLogonUasLogoff(
1004 [in, unique, string] LOGONSRV_HANDLE ServerName,
1005 [in, string] wchar_t *UserName,
1006 [in, string] wchar_t *Workstation,
1007 [out] PNETLOGON_LOGOFF_UAS_INFO LogoffInformation);
1008
1009 /* Function 2 */
1010 NTSTATUS
1011 __stdcall
1012 NetrLogonSamLogon(
1013 [in, unique, string] LOGONSRV_HANDLE LogonServer,
1014 [in, string, unique] wchar_t *ComputerName,
1015 [in, unique] PNETLOGON_AUTHENTICATOR Authenticator,
1016 [in, out, unique] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1017 [in] NETLOGON_LOGON_INFO_CLASS LogonLevel,
1018 [in, switch_is(LogonLevel)] PNETLOGON_LEVEL LogonInformation,
1019 [in] NETLOGON_VALIDATION_INFO_CLASS ValidationLevel,
1020 [out, switch_is(ValidationLevel)] PNETLOGON_VALIDATION ValidationInformation,
1021 [out] UCHAR *Authoritative);
1022
1023 /* Function 3 */
1024 NTSTATUS
1025 __stdcall
1026 NetrLogonSamLogoff(
1027 [in, unique, string] LOGONSRV_HANDLE LogonServer,
1028 [in, string, unique] wchar_t *ComputerName,
1029 [in, unique] PNETLOGON_AUTHENTICATOR Authenticator,
1030 [in, out, unique] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1031 [in] NETLOGON_LOGON_INFO_CLASS LogonLevel,
1032 [in, switch_is(LogonLevel)] PNETLOGON_LEVEL LogonInformation);
1033
1034 /* Function 4 */
1035 NTSTATUS
1036 __stdcall
1037 NetrServerReqChallenge(
1038 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1039 [in, string] wchar_t *ComputerName,
1040 [in] PNETLOGON_CREDENTIAL ClientChallenge,
1041 [out] PNETLOGON_CREDENTIAL ServerChallenge);
1042
1043 /* Function 5 */
1044 NTSTATUS
1045 __stdcall
1046 NetrServerAuthenticate(
1047 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1048 [in, string] wchar_t *AccountName,
1049 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1050 [in, string] wchar_t *ComputerName,
1051 [in] PNETLOGON_CREDENTIAL ClientCredential,
1052 [out] PNETLOGON_CREDENTIAL ServerCredential);
1053
1054 /* Function 6 */
1055 NTSTATUS
1056 __stdcall
1057 NetrServerPasswordSet(
1058 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1059 [in, string] wchar_t *AccountName,
1060 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1061 [in, string] wchar_t *ComputerName,
1062 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1063 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1064 [in] PENCRYPTED_NT_OWF_PASSWORD UasNewPassword);
1065
1066 /* Function 7 */
1067 NTSTATUS
1068 __stdcall
1069 NetrDatabaseDeltas(
1070 [in, string] LOGONSRV_HANDLE PrimaryName,
1071 [in, string] wchar_t *ComputerName,
1072 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1073 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1074 [in] DWORD DatabaseID,
1075 [in, out] PNLPR_MODIFIED_COUNT DomainModifiedCount,
1076 [out] PNETLOGON_DELTA_ENUM_ARRAY *DeltaArray,
1077 [in] DWORD PreferredMaximumLength);
1078
1079 /* Function 8 */
1080 NTSTATUS
1081 __stdcall
1082 NetrDatabaseSync(
1083 [in, string] LOGONSRV_HANDLE PrimaryName,
1084 [in, string] wchar_t *ComputerName,
1085 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1086 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1087 [in] DWORD DatabaseID,
1088 [in, out] ULONG *SyncContext,
1089 [out] PNETLOGON_DELTA_ENUM_ARRAY *DeltaArray,
1090 [in] DWORD PreferredMaximumLength);
1091
1092 /* Function 9 */
1093 NTSTATUS
1094 __stdcall
1095 NetrAccountDeltas(
1096 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1097 [in, string] wchar_t * ComputerName,
1098 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1099 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1100 [in] PUAS_INFO_0 RecordId,
1101 [in] DWORD Count,
1102 [in] DWORD Level,
1103 [out, size_is(BufferSize)] UCHAR *Buffer,
1104 [in] DWORD BufferSize,
1105 [out] ULONG *CountReturned,
1106 [out] ULONG *TotalEntries,
1107 [out] PUAS_INFO_0 NextRecordId);
1108
1109 /* Function 10 */
1110 NTSTATUS
1111 __stdcall
1112 NetrAccountSync(
1113 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1114 [in, string] wchar_t *ComputerName,
1115 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1116 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1117 [in] DWORD Reference,
1118 [in] DWORD Level,
1119 [out, size_is(BufferSize)] UCHAR *Buffer,
1120 [in] DWORD BufferSize,
1121 [out] ULONG *CountReturned,
1122 [out] ULONG *TotalEntries,
1123 [out] ULONG *NextReference,
1124 [out] PUAS_INFO_0 LastRecordId);
1125
1126 /* Function 11 */
1127 NET_API_STATUS
1128 __stdcall
1129 NetrGetDCName(
1130 [in, string] LOGONSRV_HANDLE ServerName,
1131 [in, unique, string] wchar_t *DomainName,
1132 [out, string] wchar_t **Buffer);
1133
1134 /* Function 12 */
1135 NET_API_STATUS
1136 __stdcall
1137 NetrLogonControl(
1138 [in, unique, string] LOGONSRV_HANDLE ServerName,
1139 [in] DWORD FunctionCode,
1140 [in] DWORD QueryLevel,
1141 [out, switch_is(QueryLevel)] PNETLOGON_CONTROL_QUERY_INFORMATION Buffer);
1142
1143 /* Function 13 */
1144 NET_API_STATUS
1145 __stdcall
1146 NetrGetAnyDCName(
1147 [in, unique, string] LOGONSRV_HANDLE ServerName,
1148 [in, unique, string] wchar_t *DomainName,
1149 [out, string] wchar_t **Buffer);
1150
1151 /* Function 14 */
1152 NET_API_STATUS
1153 __stdcall
1154 NetrLogonControl2(
1155 [in, unique, string] LOGONSRV_HANDLE ServerName,
1156 [in] DWORD FunctionCode,
1157 [in] DWORD QueryLevel,
1158 [in, switch_is(FunctionCode)] PNETLOGON_CONTROL_DATA_INFORMATION Data,
1159 [out, switch_is(QueryLevel)] PNETLOGON_CONTROL_QUERY_INFORMATION Buffer);
1160
1161 /* Function 15 */
1162 NTSTATUS
1163 __stdcall
1164 NetrServerAuthenticate2(
1165 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1166 [in, string] wchar_t *AccountName,
1167 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1168 [in, string] wchar_t *ComputerName,
1169 [in] PNETLOGON_CREDENTIAL ClientCredential,
1170 [out] PNETLOGON_CREDENTIAL ServerCredential,
1171 [in, out] ULONG *NegotiateFlags);
1172
1173 /* Function 16 */
1174 NTSTATUS
1175 __stdcall
1176 NetrDatabaseSync2(
1177 [in, string] LOGONSRV_HANDLE PrimaryName,
1178 [in, string] wchar_t *ComputerName,
1179 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1180 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1181 [in] DWORD DatabaseID,
1182 [in] SYNC_STATE RestartState,
1183 [in, out] ULONG *SyncContext,
1184 [out] PNETLOGON_DELTA_ENUM_ARRAY *DeltaArray,
1185 [in] DWORD PreferredMaximumLength);
1186
1187 /* Function 17 */
1188 NTSTATUS
1189 __stdcall
1190 NetrDatabaseRedo(
1191 [in, string] LOGONSRV_HANDLE PrimaryName,
1192 [in, string] wchar_t *ComputerName,
1193 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1194 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1195 [in, size_is(ChangeLogEntrySize)] UCHAR *ChangeLogEntry,
1196 [in] DWORD ChangeLogEntrySize,
1197 [out] PNETLOGON_DELTA_ENUM_ARRAY *DeltaArray);
1198
1199 /* Function 18 */
1200 NET_API_STATUS
1201 __stdcall
1202 NetrLogonControl2Ex(
1203 [in, unique, string] LOGONSRV_HANDLE ServerName,
1204 [in] DWORD FunctionCode,
1205 [in] DWORD QueryLevel,
1206 [in, switch_is(FunctionCode)] PNETLOGON_CONTROL_DATA_INFORMATION Data,
1207 [out, switch_is(QueryLevel)] PNETLOGON_CONTROL_QUERY_INFORMATION Buffer);
1208
1209 /* Function 19 */
1210 NTSTATUS
1211 __stdcall
1212 NetrEnumerateTrustedDomains(
1213 [in, unique, string] LOGONSRV_HANDLE ServerName,
1214 [out] PDOMAIN_NAME_BUFFER DomainNameBuffer);
1215
1216 /* Function 20 */
1217 NET_API_STATUS
1218 __stdcall
1219 DsrGetDcName(
1220 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1221 [in, unique, string] wchar_t *DomainName,
1222 [in, unique] GUID *DomainGuid,
1223 [in, unique] GUID *SiteGuid,
1224 [in] ULONG Flags,
1225 [out] PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo);
1226
1227 /* Function 21 */
1228 NTSTATUS
1229 __stdcall
1230 NetrLogonGetCapabilities(
1231 [in, string] LOGONSRV_HANDLE ServerName,
1232 [in, string, unique] wchar_t *ComputerName,
1233 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1234 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1235 [in] DWORD QueryLevel,
1236 [out, switch_is(QueryLevel)] PNETLOGON_CAPABILITIES ServerCapabilities);
1237
1238 /* Function 22 */
1239 NTSTATUS
1240 __stdcall
1241 NetrLogonSetServiceBits(
1242 [in, unique, string] LOGONSRV_HANDLE ServerName,
1243 [in] DWORD ServiceBitsOfInterest,
1244 [in] DWORD ServiceBits);
1245
1246 /* Function 23 */
1247 NET_API_STATUS
1248 __stdcall
1249 NetrLogonGetTrustRid(
1250 [in, unique, string] LOGONSRV_HANDLE ServerName,
1251 [in, string, unique] wchar_t *DomainName,
1252 [out] ULONG *Rid);
1253
1254 /* Function 24 */
1255 NET_API_STATUS
1256 __stdcall
1257 NetrLogonComputeServerDigest(
1258 [in, unique, string] LOGONSRV_HANDLE ServerName,
1259 [in] ULONG Rid,
1260 [in, size_is(MessageSize)] UCHAR *Message,
1261 [in] ULONG MessageSize,
1262 [out] CHAR NewMessageDigest[16],
1263 [out] CHAR OldMessageDigest[16]);
1264
1265 /* Function 25 */
1266 NET_API_STATUS
1267 __stdcall
1268 NetrLogonComputeClientDigest(
1269 [in, unique, string] LOGONSRV_HANDLE ServerName,
1270 [in, string, unique] wchar_t *DomainName,
1271 [in, size_is(MessageSize)] UCHAR *Message,
1272 [in] ULONG MessageSize,
1273 [out] CHAR NewMessageDigest[16],
1274 [out] CHAR OldMessageDigest[16]);
1275
1276 /* Function 26 */
1277 NTSTATUS
1278 __stdcall
1279 NetrServerAuthenticate3(
1280 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1281 [in, string] wchar_t *AccountName,
1282 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1283 [in, string] wchar_t *ComputerName,
1284 [in] PNETLOGON_CREDENTIAL ClientCredential,
1285 [out] PNETLOGON_CREDENTIAL ServerCredential,
1286 [in,out] ULONG *NegotiateFlags,
1287 [out] ULONG *AccountRid);
1288
1289 /* Function 27 */
1290 NET_API_STATUS
1291 __stdcall
1292 DsrGetDcNameEx(
1293 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1294 [in, unique, string] wchar_t *DomainName,
1295 [in, unique] GUID *DomainGuid,
1296 [in, unique, string] wchar_t *SiteName,
1297 [in] ULONG Flags,
1298 [out] PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo);
1299
1300 /* Function 28 */
1301 NET_API_STATUS
1302 __stdcall
1303 DsrGetSiteName(
1304 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1305 [out, string] wchar_t **SiteName);
1306
1307 /* Function 29 */
1308 NTSTATUS
1309 __stdcall
1310 NetrLogonGetDomainInfo(
1311 [in, string] LOGONSRV_HANDLE ServerName,
1312 [in, string, unique] wchar_t *ComputerName,
1313 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1314 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1315 [in] DWORD Level,
1316 [in, switch_is(Level)] PNETLOGON_WORKSTATION_INFORMATION WkstaBuffer,
1317 [out, switch_is(Level)] PNETLOGON_DOMAIN_INFORMATION DomBuffer);
1318
1319 /* Function 30 */
1320 NTSTATUS
1321 __stdcall
1322 NetrServerPasswordSet2(
1323 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1324 [in, string] wchar_t *AccountName,
1325 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1326 [in, string] wchar_t *ComputerName,
1327 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1328 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1329 [in] PNL_TRUST_PASSWORD ClearNewPassword);
1330
1331 /* Function 31 */
1332 NTSTATUS
1333 __stdcall
1334 NetrServerPasswordGet(
1335 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1336 [in, string] wchar_t *AccountName,
1337 [in] NETLOGON_SECURE_CHANNEL_TYPE AccountType,
1338 [in, string] wchar_t *ComputerName,
1339 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1340 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1341 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword);
1342
1343 /* Function 32 */
1344 NTSTATUS
1345 __stdcall
1346 NetrLogonSendToSam(
1347 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1348 [in, string] wchar_t *ComputerName,
1349 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1350 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1351 [in, size_is(OpaqueBufferSize)] UCHAR *OpaqueBuffer,
1352 [in] ULONG OpaqueBufferSize);
1353
1354 /* Function 33 */
1355 NET_API_STATUS
1356 __stdcall
1357 DsrAddressToSiteNamesW(
1358 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1359 [in, range(0, 32000)] DWORD EntryCount,
1360 [in, size_is(EntryCount)] PNL_SOCKET_ADDRESS SocketAddresses,
1361 [out] PNL_SITE_NAME_ARRAY *SiteNames);
1362
1363 /* Function 34 */
1364 NET_API_STATUS
1365 __stdcall
1366 DsrGetDcNameEx2(
1367 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1368 [in, unique, string] wchar_t *AccountName,
1369 [in] ULONG AllowableAccountControlBits,
1370 [in, unique, string] wchar_t *DomainName,
1371 [in, unique] GUID *DomainGuid,
1372 [in, unique, string] wchar_t *SiteName,
1373 [in] ULONG Flags,
1374 [out] PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo);
1375
1376 /* Function 35 */
1377 NET_API_STATUS
1378 __stdcall
1379 NetrLogonGetTimeServiceParentDomain(
1380 [in, unique, string] LOGONSRV_HANDLE ServerName,
1381 [out, string] wchar_t **DomainName,
1382 [out] int *PdcSameSite);
1383
1384 /* Function 36 */
1385 NET_API_STATUS
1386 __stdcall
1387 NetrEnumerateTrustedDomainsEx(
1388 [in, unique, string] LOGONSRV_HANDLE ServerName,
1389 [out] PNETLOGON_TRUSTED_DOMAIN_ARRAY Domains);
1390
1391 /* Function 37 */
1392 NET_API_STATUS
1393 __stdcall
1394 DsrAddressToSiteNamesExW(
1395 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1396 [in, range(0, 32000)] DWORD EntryCount,
1397 [in, size_is(EntryCount)] PNL_SOCKET_ADDRESS SocketAddresses,
1398 [out] PNL_SITE_NAME_EX_ARRAY *SiteNames);
1399
1400 /* Function 38 */
1401 NET_API_STATUS
1402 __stdcall
1403 DsrGetDcSiteCoverageW(
1404 [in, unique, string] LOGONSRV_HANDLE ServerName,
1405 [out] PNL_SITE_NAME_ARRAY *SiteNames);
1406
1407 /* Function 39 */
1408 NTSTATUS
1409 __stdcall
1410 NetrLogonSamLogonEx(
1411 [in] handle_t ContextHandle,
1412 [in, unique, string] wchar_t *LogonServer,
1413 [in, unique, string] wchar_t *ComputerName,
1414 [in] NETLOGON_LOGON_INFO_CLASS LogonLevel,
1415 [in, switch_is(LogonLevel)] PNETLOGON_LEVEL LogonInformation,
1416 [in] NETLOGON_VALIDATION_INFO_CLASS ValidationLevel,
1417 [out, switch_is(ValidationLevel)] PNETLOGON_VALIDATION ValidationInformation,
1418 [out] UCHAR *Authoritative,
1419 [in,out] ULONG *ExtraFlags);
1420
1421 /* Function 40 */
1422 NET_API_STATUS
1423 __stdcall
1424 DsrEnumerateDomainTrusts(
1425 [in, unique, string] LOGONSRV_HANDLE ServerName,
1426 [in] ULONG Flags,
1427 [out] PNETLOGON_TRUSTED_DOMAIN_ARRAY Domains);
1428
1429 /* Function 41 */
1430 NET_API_STATUS
1431 __stdcall
1432 DsrDeregisterDnsHostRecords (
1433 [in, unique, string] LOGONSRV_HANDLE ServerName,
1434 [in, unique, string] wchar_t *DnsDomainName,
1435 [in, unique] GUID *DomainGuid,
1436 [in, unique] GUID *DsaGuid,
1437 [in, string] wchar_t *DnsHostName);
1438
1439 /* Function 42 */
1440 NTSTATUS
1441 __stdcall
1442 NetrServerTrustPasswordsGet(
1443 [in, unique, string] LOGONSRV_HANDLE TrustedDcName,
1444 [in, string] wchar_t *AccountName,
1445 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1446 [in, string] wchar_t *ComputerName,
1447 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1448 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1449 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedNewOwfPassword,
1450 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedOldOwfPassword);
1451
1452 /* Function 43 */
1453 NET_API_STATUS
1454 __stdcall
1455 DsrGetForestTrustInformation(
1456 [in, unique, string] LOGONSRV_HANDLE ServerName,
1457 [in, unique, string] wchar_t *TrustedDomainName,
1458 [in] DWORD Flags,
1459 [out] PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo);
1460
1461 /* Function 44 */
1462 NTSTATUS
1463 __stdcall
1464 NetrGetForestTrustInformation(
1465 [in, unique, string] LOGONSRV_HANDLE ServerName,
1466 [in, string] wchar_t *ComputerName,
1467 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1468 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1469 [in] DWORD Flags,
1470 [out] PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo);
1471
1472 /* Function 45 */
1473 NTSTATUS
1474 __stdcall
1475 NetrLogonSamLogonWithFlags(
1476 [in, unique, string] LOGONSRV_HANDLE LogonServer,
1477 [in, string, unique] wchar_t *ComputerName,
1478 [in, unique] PNETLOGON_AUTHENTICATOR Authenticator,
1479 [in, out, unique] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1480 [in] NETLOGON_LOGON_INFO_CLASS LogonLevel,
1481 [in, switch_is(LogonLevel)] PNETLOGON_LEVEL LogonInformation,
1482 [in] NETLOGON_VALIDATION_INFO_CLASS ValidationLevel,
1483 [out, switch_is(ValidationLevel)] PNETLOGON_VALIDATION ValidationInformation,
1484 [out] UCHAR *Authoritative,
1485 [in,out] ULONG *ExtraFlags);
1486
1487 /* Function 46 */
1488 NTSTATUS
1489 __stdcall
1490 NetrServerGetTrustInfo(
1491 [in, unique, string] LOGONSRV_HANDLE TrustedDcName,
1492 [in, string] wchar_t *AccountName,
1493 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1494 [in, string] wchar_t *ComputerName,
1495 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1496 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1497 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedNewOwfPassword,
1498 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedOldOwfPassword,
1499 [out] PNL_GENERIC_RPC_DATA *TrustInfo);
1500 }