[NETAPI32]
[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 pointer_default(unique),
982 #ifdef __midl
983 ms_union,
984 #endif
985 endpoint("ncacn_np:[\\pipe\\netlogon]")
986 #ifndef __midl
987 ,implicit_handle(handle_t hBinding)
988 #endif
989 ]
990 interface logon
991 {
992 /* Function 0 */
993 NET_API_STATUS
994 __stdcall
995 NetrLogonUasLogon(
996 [in, unique, string] LOGONSRV_HANDLE ServerName,
997 [in, string] wchar_t *UserName,
998 [in, string] wchar_t *Workstation,
999 [out] PNETLOGON_VALIDATION_UAS_INFO *ValidationInformation);
1000
1001 /* Function 1 */
1002 NET_API_STATUS
1003 __stdcall
1004 NetrLogonUasLogoff(
1005 [in, unique, string] LOGONSRV_HANDLE ServerName,
1006 [in, string] wchar_t *UserName,
1007 [in, string] wchar_t *Workstation,
1008 [out] PNETLOGON_LOGOFF_UAS_INFO LogoffInformation);
1009
1010 /* Function 2 */
1011 NTSTATUS
1012 __stdcall
1013 NetrLogonSamLogon(
1014 [in, unique, string] LOGONSRV_HANDLE LogonServer,
1015 [in, string, unique] wchar_t *ComputerName,
1016 [in, unique] PNETLOGON_AUTHENTICATOR Authenticator,
1017 [in, out, unique] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1018 [in] NETLOGON_LOGON_INFO_CLASS LogonLevel,
1019 [in, switch_is(LogonLevel)] PNETLOGON_LEVEL LogonInformation,
1020 [in] NETLOGON_VALIDATION_INFO_CLASS ValidationLevel,
1021 [out, switch_is(ValidationLevel)] PNETLOGON_VALIDATION ValidationInformation,
1022 [out] UCHAR *Authoritative);
1023
1024 /* Function 3 */
1025 NTSTATUS
1026 __stdcall
1027 NetrLogonSamLogoff(
1028 [in, unique, string] LOGONSRV_HANDLE LogonServer,
1029 [in, string, unique] wchar_t *ComputerName,
1030 [in, unique] PNETLOGON_AUTHENTICATOR Authenticator,
1031 [in, out, unique] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1032 [in] NETLOGON_LOGON_INFO_CLASS LogonLevel,
1033 [in, switch_is(LogonLevel)] PNETLOGON_LEVEL LogonInformation);
1034
1035 /* Function 4 */
1036 NTSTATUS
1037 __stdcall
1038 NetrServerReqChallenge(
1039 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1040 [in, string] wchar_t *ComputerName,
1041 [in] PNETLOGON_CREDENTIAL ClientChallenge,
1042 [out] PNETLOGON_CREDENTIAL ServerChallenge);
1043
1044 /* Function 5 */
1045 NTSTATUS
1046 __stdcall
1047 NetrServerAuthenticate(
1048 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1049 [in, string] wchar_t *AccountName,
1050 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1051 [in, string] wchar_t *ComputerName,
1052 [in] PNETLOGON_CREDENTIAL ClientCredential,
1053 [out] PNETLOGON_CREDENTIAL ServerCredential);
1054
1055 /* Function 6 */
1056 NTSTATUS
1057 __stdcall
1058 NetrServerPasswordSet(
1059 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1060 [in, string] wchar_t *AccountName,
1061 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1062 [in, string] wchar_t *ComputerName,
1063 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1064 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1065 [in] PENCRYPTED_NT_OWF_PASSWORD UasNewPassword);
1066
1067 /* Function 7 */
1068 NTSTATUS
1069 __stdcall
1070 NetrDatabaseDeltas(
1071 [in, string] LOGONSRV_HANDLE PrimaryName,
1072 [in, string] wchar_t *ComputerName,
1073 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1074 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1075 [in] DWORD DatabaseID,
1076 [in, out] PNLPR_MODIFIED_COUNT DomainModifiedCount,
1077 [out] PNETLOGON_DELTA_ENUM_ARRAY *DeltaArray,
1078 [in] DWORD PreferredMaximumLength);
1079
1080 /* Function 8 */
1081 NTSTATUS
1082 __stdcall
1083 NetrDatabaseSync(
1084 [in, string] LOGONSRV_HANDLE PrimaryName,
1085 [in, string] wchar_t *ComputerName,
1086 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1087 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1088 [in] DWORD DatabaseID,
1089 [in, out] ULONG *SyncContext,
1090 [out] PNETLOGON_DELTA_ENUM_ARRAY *DeltaArray,
1091 [in] DWORD PreferredMaximumLength);
1092
1093 /* Function 9 */
1094 NTSTATUS
1095 __stdcall
1096 NetrAccountDeltas(
1097 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1098 [in, string] wchar_t * ComputerName,
1099 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1100 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1101 [in] PUAS_INFO_0 RecordId,
1102 [in] DWORD Count,
1103 [in] DWORD Level,
1104 [out, size_is(BufferSize)] UCHAR *Buffer,
1105 [in] DWORD BufferSize,
1106 [out] ULONG *CountReturned,
1107 [out] ULONG *TotalEntries,
1108 [out] PUAS_INFO_0 NextRecordId);
1109
1110 /* Function 10 */
1111 NTSTATUS
1112 __stdcall
1113 NetrAccountSync(
1114 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1115 [in, string] wchar_t *ComputerName,
1116 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1117 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1118 [in] DWORD Reference,
1119 [in] DWORD Level,
1120 [out, size_is(BufferSize)] UCHAR *Buffer,
1121 [in] DWORD BufferSize,
1122 [out] ULONG *CountReturned,
1123 [out] ULONG *TotalEntries,
1124 [out] ULONG *NextReference,
1125 [out] PUAS_INFO_0 LastRecordId);
1126
1127 /* Function 11 */
1128 NET_API_STATUS
1129 __stdcall
1130 NetrGetDCName(
1131 [in, string] LOGONSRV_HANDLE ServerName,
1132 [in, unique, string] wchar_t *DomainName,
1133 [out, string] wchar_t **Buffer);
1134
1135 /* Function 12 */
1136 NET_API_STATUS
1137 __stdcall
1138 NetrLogonControl(
1139 [in, unique, string] LOGONSRV_HANDLE ServerName,
1140 [in] DWORD FunctionCode,
1141 [in] DWORD QueryLevel,
1142 [out, switch_is(QueryLevel)] PNETLOGON_CONTROL_QUERY_INFORMATION Buffer);
1143
1144 /* Function 13 */
1145 NET_API_STATUS
1146 __stdcall
1147 NetrGetAnyDCName(
1148 [in, unique, string] LOGONSRV_HANDLE ServerName,
1149 [in, unique, string] wchar_t *DomainName,
1150 [out, string] wchar_t **Buffer);
1151
1152 /* Function 14 */
1153 NET_API_STATUS
1154 __stdcall
1155 NetrLogonControl2(
1156 [in, unique, string] LOGONSRV_HANDLE ServerName,
1157 [in] DWORD FunctionCode,
1158 [in] DWORD QueryLevel,
1159 [in, switch_is(FunctionCode)] PNETLOGON_CONTROL_DATA_INFORMATION Data,
1160 [out, switch_is(QueryLevel)] PNETLOGON_CONTROL_QUERY_INFORMATION Buffer);
1161
1162 /* Function 15 */
1163 NTSTATUS
1164 __stdcall
1165 NetrServerAuthenticate2(
1166 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1167 [in, string] wchar_t *AccountName,
1168 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1169 [in, string] wchar_t *ComputerName,
1170 [in] PNETLOGON_CREDENTIAL ClientCredential,
1171 [out] PNETLOGON_CREDENTIAL ServerCredential,
1172 [in, out] ULONG *NegotiateFlags);
1173
1174 /* Function 16 */
1175 NTSTATUS
1176 __stdcall
1177 NetrDatabaseSync2(
1178 [in, string] LOGONSRV_HANDLE PrimaryName,
1179 [in, string] wchar_t *ComputerName,
1180 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1181 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1182 [in] DWORD DatabaseID,
1183 [in] SYNC_STATE RestartState,
1184 [in, out] ULONG *SyncContext,
1185 [out] PNETLOGON_DELTA_ENUM_ARRAY *DeltaArray,
1186 [in] DWORD PreferredMaximumLength);
1187
1188 /* Function 17 */
1189 NTSTATUS
1190 __stdcall
1191 NetrDatabaseRedo(
1192 [in, string] LOGONSRV_HANDLE PrimaryName,
1193 [in, string] wchar_t *ComputerName,
1194 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1195 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1196 [in, size_is(ChangeLogEntrySize)] UCHAR *ChangeLogEntry,
1197 [in] DWORD ChangeLogEntrySize,
1198 [out] PNETLOGON_DELTA_ENUM_ARRAY *DeltaArray);
1199
1200 /* Function 18 */
1201 NET_API_STATUS
1202 __stdcall
1203 NetrLogonControl2Ex(
1204 [in, unique, string] LOGONSRV_HANDLE ServerName,
1205 [in] DWORD FunctionCode,
1206 [in] DWORD QueryLevel,
1207 [in, switch_is(FunctionCode)] PNETLOGON_CONTROL_DATA_INFORMATION Data,
1208 [out, switch_is(QueryLevel)] PNETLOGON_CONTROL_QUERY_INFORMATION Buffer);
1209
1210 /* Function 19 */
1211 NTSTATUS
1212 __stdcall
1213 NetrEnumerateTrustedDomains(
1214 [in, unique, string] LOGONSRV_HANDLE ServerName,
1215 [out] PDOMAIN_NAME_BUFFER DomainNameBuffer);
1216
1217 /* Function 20 */
1218 NET_API_STATUS
1219 __stdcall
1220 DsrGetDcName(
1221 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1222 [in, unique, string] wchar_t *DomainName,
1223 [in, unique] GUID *DomainGuid,
1224 [in, unique] GUID *SiteGuid,
1225 [in] ULONG Flags,
1226 [out] PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo);
1227
1228 /* Function 21 */
1229 NTSTATUS
1230 __stdcall
1231 NetrLogonGetCapabilities(
1232 [in, string] LOGONSRV_HANDLE ServerName,
1233 [in, string, unique] wchar_t *ComputerName,
1234 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1235 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1236 [in] DWORD QueryLevel,
1237 [out, switch_is(QueryLevel)] PNETLOGON_CAPABILITIES ServerCapabilities);
1238
1239 /* Function 22 */
1240 NTSTATUS
1241 __stdcall
1242 NetrLogonSetServiceBits(
1243 [in, unique, string] LOGONSRV_HANDLE ServerName,
1244 [in] DWORD ServiceBitsOfInterest,
1245 [in] DWORD ServiceBits);
1246
1247 /* Function 23 */
1248 NET_API_STATUS
1249 __stdcall
1250 NetrLogonGetTrustRid(
1251 [in, unique, string] LOGONSRV_HANDLE ServerName,
1252 [in, string, unique] wchar_t *DomainName,
1253 [out] ULONG *Rid);
1254
1255 /* Function 24 */
1256 NET_API_STATUS
1257 __stdcall
1258 NetrLogonComputeServerDigest(
1259 [in, unique, string] LOGONSRV_HANDLE ServerName,
1260 [in] ULONG Rid,
1261 [in, size_is(MessageSize)] UCHAR *Message,
1262 [in] ULONG MessageSize,
1263 [out] CHAR NewMessageDigest[16],
1264 [out] CHAR OldMessageDigest[16]);
1265
1266 /* Function 25 */
1267 NET_API_STATUS
1268 __stdcall
1269 NetrLogonComputeClientDigest(
1270 [in, unique, string] LOGONSRV_HANDLE ServerName,
1271 [in, string, unique] wchar_t *DomainName,
1272 [in, size_is(MessageSize)] UCHAR *Message,
1273 [in] ULONG MessageSize,
1274 [out] CHAR NewMessageDigest[16],
1275 [out] CHAR OldMessageDigest[16]);
1276
1277 /* Function 26 */
1278 NTSTATUS
1279 __stdcall
1280 NetrServerAuthenticate3(
1281 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1282 [in, string] wchar_t *AccountName,
1283 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1284 [in, string] wchar_t *ComputerName,
1285 [in] PNETLOGON_CREDENTIAL ClientCredential,
1286 [out] PNETLOGON_CREDENTIAL ServerCredential,
1287 [in,out] ULONG *NegotiateFlags,
1288 [out] ULONG *AccountRid);
1289
1290 /* Function 27 */
1291 NET_API_STATUS
1292 __stdcall
1293 DsrGetDcNameEx(
1294 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1295 [in, unique, string] wchar_t *DomainName,
1296 [in, unique] GUID *DomainGuid,
1297 [in, unique, string] wchar_t *SiteName,
1298 [in] ULONG Flags,
1299 [out] PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo);
1300
1301 /* Function 28 */
1302 NET_API_STATUS
1303 __stdcall
1304 DsrGetSiteName(
1305 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1306 [out, string] wchar_t **SiteName);
1307
1308 /* Function 29 */
1309 NTSTATUS
1310 __stdcall
1311 NetrLogonGetDomainInfo(
1312 [in, string] LOGONSRV_HANDLE ServerName,
1313 [in, string, unique] wchar_t *ComputerName,
1314 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1315 [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1316 [in] DWORD Level,
1317 [in, switch_is(Level)] PNETLOGON_WORKSTATION_INFORMATION WkstaBuffer,
1318 [out, switch_is(Level)] PNETLOGON_DOMAIN_INFORMATION DomBuffer);
1319
1320 /* Function 30 */
1321 NTSTATUS
1322 __stdcall
1323 NetrServerPasswordSet2(
1324 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1325 [in, string] wchar_t *AccountName,
1326 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1327 [in, string] wchar_t *ComputerName,
1328 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1329 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1330 [in] PNL_TRUST_PASSWORD ClearNewPassword);
1331
1332 /* Function 31 */
1333 NTSTATUS
1334 __stdcall
1335 NetrServerPasswordGet(
1336 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1337 [in, string] wchar_t *AccountName,
1338 [in] NETLOGON_SECURE_CHANNEL_TYPE AccountType,
1339 [in, string] wchar_t *ComputerName,
1340 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1341 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1342 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword);
1343
1344 /* Function 32 */
1345 NTSTATUS
1346 __stdcall
1347 NetrLogonSendToSam(
1348 [in, unique, string] LOGONSRV_HANDLE PrimaryName,
1349 [in, string] wchar_t *ComputerName,
1350 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1351 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1352 [in, size_is(OpaqueBufferSize)] UCHAR *OpaqueBuffer,
1353 [in] ULONG OpaqueBufferSize);
1354
1355 /* Function 33 */
1356 NET_API_STATUS
1357 __stdcall
1358 DsrAddressToSiteNamesW(
1359 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1360 [in, range(0, 32000)] DWORD EntryCount,
1361 [in, size_is(EntryCount)] PNL_SOCKET_ADDRESS SocketAddresses,
1362 [out] PNL_SITE_NAME_ARRAY *SiteNames);
1363
1364 /* Function 34 */
1365 NET_API_STATUS
1366 __stdcall
1367 DsrGetDcNameEx2(
1368 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1369 [in, unique, string] wchar_t *AccountName,
1370 [in] ULONG AllowableAccountControlBits,
1371 [in, unique, string] wchar_t *DomainName,
1372 [in, unique] GUID *DomainGuid,
1373 [in, unique, string] wchar_t *SiteName,
1374 [in] ULONG Flags,
1375 [out] PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo);
1376
1377 /* Function 35 */
1378 NET_API_STATUS
1379 __stdcall
1380 NetrLogonGetTimeServiceParentDomain(
1381 [in, unique, string] LOGONSRV_HANDLE ServerName,
1382 [out, string] wchar_t **DomainName,
1383 [out] int *PdcSameSite);
1384
1385 /* Function 36 */
1386 NET_API_STATUS
1387 __stdcall
1388 NetrEnumerateTrustedDomainsEx(
1389 [in, unique, string] LOGONSRV_HANDLE ServerName,
1390 [out] PNETLOGON_TRUSTED_DOMAIN_ARRAY Domains);
1391
1392 /* Function 37 */
1393 NET_API_STATUS
1394 __stdcall
1395 DsrAddressToSiteNamesExW(
1396 [in, unique, string] LOGONSRV_HANDLE ComputerName,
1397 [in, range(0, 32000)] DWORD EntryCount,
1398 [in, size_is(EntryCount)] PNL_SOCKET_ADDRESS SocketAddresses,
1399 [out] PNL_SITE_NAME_EX_ARRAY *SiteNames);
1400
1401 /* Function 38 */
1402 NET_API_STATUS
1403 __stdcall
1404 DsrGetDcSiteCoverageW(
1405 [in, unique, string] LOGONSRV_HANDLE ServerName,
1406 [out] PNL_SITE_NAME_ARRAY *SiteNames);
1407
1408 /* Function 39 */
1409 NTSTATUS
1410 __stdcall
1411 NetrLogonSamLogonEx(
1412 [in] handle_t ContextHandle,
1413 [in, unique, string] wchar_t *LogonServer,
1414 [in, unique, string] wchar_t *ComputerName,
1415 [in] NETLOGON_LOGON_INFO_CLASS LogonLevel,
1416 [in, switch_is(LogonLevel)] PNETLOGON_LEVEL LogonInformation,
1417 [in] NETLOGON_VALIDATION_INFO_CLASS ValidationLevel,
1418 [out, switch_is(ValidationLevel)] PNETLOGON_VALIDATION ValidationInformation,
1419 [out] UCHAR *Authoritative,
1420 [in,out] ULONG *ExtraFlags);
1421
1422 /* Function 40 */
1423 NET_API_STATUS
1424 __stdcall
1425 DsrEnumerateDomainTrusts(
1426 [in, unique, string] LOGONSRV_HANDLE ServerName,
1427 [in] ULONG Flags,
1428 [out] PNETLOGON_TRUSTED_DOMAIN_ARRAY Domains);
1429
1430 /* Function 41 */
1431 NET_API_STATUS
1432 __stdcall
1433 DsrDeregisterDnsHostRecords (
1434 [in, unique, string] LOGONSRV_HANDLE ServerName,
1435 [in, unique, string] wchar_t *DnsDomainName,
1436 [in, unique] GUID *DomainGuid,
1437 [in, unique] GUID *DsaGuid,
1438 [in, string] wchar_t *DnsHostName);
1439
1440 /* Function 42 */
1441 NTSTATUS
1442 __stdcall
1443 NetrServerTrustPasswordsGet(
1444 [in, unique, string] LOGONSRV_HANDLE TrustedDcName,
1445 [in, string] wchar_t *AccountName,
1446 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1447 [in, string] wchar_t *ComputerName,
1448 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1449 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1450 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedNewOwfPassword,
1451 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedOldOwfPassword);
1452
1453 /* Function 43 */
1454 NET_API_STATUS
1455 __stdcall
1456 DsrGetForestTrustInformation(
1457 [in, unique, string] LOGONSRV_HANDLE ServerName,
1458 [in, unique, string] wchar_t *TrustedDomainName,
1459 [in] DWORD Flags,
1460 [out] PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo);
1461
1462 /* Function 44 */
1463 NTSTATUS
1464 __stdcall
1465 NetrGetForestTrustInformation(
1466 [in, unique, string] LOGONSRV_HANDLE ServerName,
1467 [in, string] wchar_t *ComputerName,
1468 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1469 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1470 [in] DWORD Flags,
1471 [out] PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo);
1472
1473 /* Function 45 */
1474 NTSTATUS
1475 __stdcall
1476 NetrLogonSamLogonWithFlags(
1477 [in, unique, string] LOGONSRV_HANDLE LogonServer,
1478 [in, string, unique] wchar_t *ComputerName,
1479 [in, unique] PNETLOGON_AUTHENTICATOR Authenticator,
1480 [in, out, unique] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1481 [in] NETLOGON_LOGON_INFO_CLASS LogonLevel,
1482 [in, switch_is(LogonLevel)] PNETLOGON_LEVEL LogonInformation,
1483 [in] NETLOGON_VALIDATION_INFO_CLASS ValidationLevel,
1484 [out, switch_is(ValidationLevel)] PNETLOGON_VALIDATION ValidationInformation,
1485 [out] UCHAR *Authoritative,
1486 [in,out] ULONG *ExtraFlags);
1487
1488 /* Function 46 */
1489 NTSTATUS
1490 __stdcall
1491 NetrServerGetTrustInfo(
1492 [in, unique, string] LOGONSRV_HANDLE TrustedDcName,
1493 [in, string] wchar_t *AccountName,
1494 [in] NETLOGON_SECURE_CHANNEL_TYPE SecureChannelType,
1495 [in, string] wchar_t *ComputerName,
1496 [in] PNETLOGON_AUTHENTICATOR Authenticator,
1497 [out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
1498 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedNewOwfPassword,
1499 [out] PENCRYPTED_NT_OWF_PASSWORD EncryptedOldOwfPassword,
1500 [out] PNL_GENERIC_RPC_DATA *TrustInfo);
1501 }