1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
#![cfg(windows)]
extern crate winapi;
use winapi::*;
extern "system" {
pub fn DavAddConnection(
ConnectionHandle: *mut HANDLE, RemoteName: LPCWSTR, UserName: LPCWSTR, Password: LPCWSTR,
ClientCert: PBYTE, CertSize: DWORD,
) -> DWORD;
pub fn DavDeleteConnection(ConnectionHandle: HANDLE) -> DWORD;
pub fn DavFlushFile(hFile: HANDLE) -> DWORD;
pub fn DavGetExtendedError(
hFile: HANDLE, ExtError: *mut DWORD, ExtErrorString: LPWSTR, cChSize: *mut DWORD,
) -> DWORD;
pub fn DavGetHTTPFromUNCPath(UncPath: LPCWSTR, HttpPath: LPWSTR, lpSize: LPDWORD) -> DWORD;
pub fn DavGetUNCFromHTTPPath(HttpPath: LPCWSTR, UncPath: LPWSTR, lpSize: LPDWORD) -> DWORD;
pub fn DsAddressToSiteNamesA(
ComputerName: LPCSTR, EntryCount: DWORD, SocketAddresses: PSOCKET_ADDRESS,
SiteNames: *mut *mut LPSTR,
) -> DWORD;
pub fn DsAddressToSiteNamesExA(
ComputerName: LPCSTR, EntryCount: DWORD, SocketAddresses: PSOCKET_ADDRESS,
SiteNames: *mut *mut LPSTR, SubnetNames: *mut *mut LPSTR,
) -> DWORD;
pub fn DsAddressToSiteNamesExW(
ComputerName: LPCWSTR, EntryCount: DWORD, SocketAddresses: PSOCKET_ADDRESS,
SiteNames: *mut *mut LPWSTR, SubnetNames: *mut *mut LPWSTR,
) -> DWORD;
pub fn DsAddressToSiteNamesW(
ComputerName: LPCWSTR, EntryCount: DWORD, SocketAddresses: PSOCKET_ADDRESS,
SiteNames: *mut *mut LPWSTR,
) -> DWORD;
pub fn DsDeregisterDnsHostRecordsA(
ServerName: LPSTR, DnsDomainName: LPSTR, DomainGuid: *mut GUID, DsaGuid: *mut GUID,
DnsHostName: LPSTR,
) -> DWORD;
pub fn DsDeregisterDnsHostRecordsW(
ServerName: LPWSTR, DnsDomainName: LPWSTR, DomainGuid: *mut GUID, DsaGuid: *mut GUID,
DnsHostName: LPWSTR,
) -> DWORD;
pub fn DsEnumerateDomainTrustsA(
ServerName: LPSTR, Flags: ULONG, Domains: *mut PDS_DOMAIN_TRUSTSA, DomainCount: PULONG,
) -> DWORD;
pub fn DsEnumerateDomainTrustsW(
ServerName: LPWSTR, Flags: ULONG, Domains: *mut PDS_DOMAIN_TRUSTSW, DomainCount: PULONG,
) -> DWORD;
pub fn DsGetDcCloseW(GetDcContextHandle: HANDLE);
pub fn DsGetDcNameA(
ComputerName: LPCSTR, DomainName: LPCSTR, DomainGuid: *mut GUID, SiteName: LPCSTR,
Flags: ULONG, DomainControllerInfo: *mut PDOMAIN_CONTROLLER_INFOA,
) -> DWORD;
pub fn DsGetDcNameW(
ComputerName: LPCWSTR, DomainName: LPCWSTR, DomainGuid: *mut GUID, SiteName: LPCWSTR,
Flags: ULONG, DomainControllerInfo: *mut PDOMAIN_CONTROLLER_INFOW,
) -> DWORD;
pub fn DsGetDcNextA(
GetDcContextHandle: HANDLE, SockAddressCount: PULONG, SockAddresses: *mut LPSOCKET_ADDRESS,
DnsHostName: *mut LPSTR,
) -> DWORD;
pub fn DsGetDcNextW(
GetDcContextHandle: HANDLE, SockAddressCount: PULONG, SockAddresses: *mut LPSOCKET_ADDRESS,
DnsHostName: *mut LPWSTR,
) -> DWORD;
pub fn DsGetDcOpenA(
DnsName: LPCSTR, OptionFlags: ULONG, SiteName: LPCSTR, DomainGuid: *mut GUID,
DnsForestName: LPCSTR, DcFlags: ULONG, RetGetDcContext: PHANDLE,
) -> DWORD;
pub fn DsGetDcOpenW(
DnsName: LPCWSTR, OptionFlags: ULONG, SiteName: LPCWSTR, DomainGuid: *mut GUID,
DnsForestName: LPCWSTR, DcFlags: ULONG, RetGetDcContext: PHANDLE,
) -> DWORD;
pub fn DsGetDcSiteCoverageA(
ServerName: LPCSTR, EntryCount: PULONG, SiteNames: *mut *mut LPSTR,
) -> DWORD;
pub fn DsGetDcSiteCoverageW(
ServerName: LPCWSTR, EntryCount: PULONG, SiteNames: *mut *mut LPWSTR,
) -> DWORD;
pub fn DsGetForestTrustInformationW(
ServerName: LPCWSTR, TrustedDomainName: LPCWSTR, Flags: DWORD,
ForestTrustInfo: *mut PLSA_FOREST_TRUST_INFORMATION,
) -> DWORD;
pub fn DsGetSiteNameA(ComputerName: LPCSTR, SiteName: *mut LPSTR) -> DWORD;
pub fn DsGetSiteNameW(ComputerName: LPCWSTR, SiteName: *mut LPWSTR) -> DWORD;
pub fn DsMergeForestTrustInformationW(
DomainName: LPCWSTR, NewForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION,
OldForestTrustInfo: PLSA_FOREST_TRUST_INFORMATION,
MergedForestTrustInfo: *mut PLSA_FOREST_TRUST_INFORMATION,
) -> DWORD;
pub fn DsRoleFreeMemory(Buffer: PVOID);
pub fn DsRoleGetPrimaryDomainInformation(
lpServer: LPCWSTR, InfoLevel: DSROLE_PRIMARY_DOMAIN_INFO_LEVEL, Buffer: *mut PBYTE,
) -> DWORD;
pub fn DsValidateSubnetNameA(SubnetName: LPCSTR) -> DWORD;
pub fn DsValidateSubnetNameW(SubnetName: LPCWSTR) -> DWORD;
pub fn I_NetLogonControl2(
ServerName: LPCWSTR, FunctionCode: DWORD, QueryLevel: DWORD, Data: LPBYTE,
Buffer: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetAccessAdd(
servername: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetAccessDel(servername: LPCWSTR, resource: LPCWSTR) -> NET_API_STATUS;
pub fn NetAccessEnum(
servername: LPCWSTR, BasePath: LPCWSTR, Recursive: DWORD, level: DWORD,
bufptr: *mut LPBYTE, prefmaxlen: DWORD, entriesread: LPDWORD, totalentries: LPDWORD,
resume_handle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetAccessGetInfo(
servername: LPCWSTR, resource: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetAccessGetUserPerms(
servername: LPCWSTR, UGname: LPCWSTR, resource: LPCWSTR, Perms: LPDWORD,
) -> NET_API_STATUS;
pub fn NetAccessSetInfo(
servername: LPCWSTR, resource: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetAddAlternateComputerName(
Server: LPCWSTR, AlternateName: LPCWSTR, DomainAccount: LPCWSTR,
DomainAccountPassword: LPCWSTR, Reserved: ULONG,
) -> NET_API_STATUS;
pub fn NetAddServiceAccount(
ServerName: LPWSTR, AccountName: LPWSTR, Password: LPWSTR, Flags: DWORD,
) -> NTSTATUS;
pub fn NetAlertRaise(AlertType: LPCWSTR, Buffer: LPVOID, BufferSize: DWORD) -> NET_API_STATUS;
pub fn NetAlertRaiseEx(
AlertType: LPCWSTR, VariableInfo: LPVOID, VariableInfoSize: DWORD, ServiceName: LPCWSTR,
) -> NET_API_STATUS;
pub fn NetApiBufferAllocate(ByteCount: DWORD, Buffer: *mut LPVOID) -> NET_API_STATUS;
pub fn NetApiBufferFree(Buffer: LPVOID) -> NET_API_STATUS;
pub fn NetApiBufferReallocate(
OldBuffer: LPVOID, NewByteCount: DWORD, NewBuffer: *mut LPVOID,
) -> NET_API_STATUS;
pub fn NetApiBufferSize(Buffer: LPVOID, ByteCount: LPDWORD) -> NET_API_STATUS;
pub fn NetAuditClear(server: LPCWSTR, backupfile: LPCWSTR, service: LPCWSTR) -> NET_API_STATUS;
pub fn NetAuditRead(
server: LPCWSTR, service: LPCWSTR, auditloghandle: LPHLOG, offset: DWORD,
reserved1: LPDWORD, reserved2: DWORD, offsetflag: DWORD, bufptr: *mut LPBYTE,
prefmaxlen: DWORD, bytesread: LPDWORD, totalavailable: LPDWORD,
) -> NET_API_STATUS;
pub fn NetAuditWrite(
_type: DWORD, buf: LPBYTE, numbytes: DWORD, service: LPCWSTR, reserved: LPBYTE,
) -> NET_API_STATUS;
pub fn NetConfigGet(
server: LPCWSTR, component: LPCWSTR, parameter: LPCWSTR, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetConfigGetAll(
server: LPCWSTR, component: LPCWSTR, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetConfigSet(
server: LPCWSTR, reserved1: LPCWSTR, component: LPCWSTR, level: DWORD, reserved2: DWORD,
buf: LPBYTE, reserved3: DWORD,
) -> NET_API_STATUS;
pub fn NetConnectionEnum(
servername: LMSTR, qualifier: LMSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resume_handle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetCreateProvisioningPackage(
pProvisioningParams: PNETSETUP_PROVISIONING_PARAMS, ppPackageBinData: *mut PBYTE,
pdwPackageBinDataSize: *mut DWORD, ppPackageTextData: *mut LPWSTR,
) -> NET_API_STATUS;
pub fn NetDfsAdd(
DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Comment: LPWSTR, Flags: DWORD,
) -> NET_API_STATUS;
pub fn NetDfsAddFtRoot(
ServerName: LPWSTR, RootShare: LPWSTR, FtDfsName: LPWSTR, Comment: LPWSTR, Flags: DWORD,
) -> NET_API_STATUS;
pub fn NetDfsAddRootTarget(
pDfsPath: LPWSTR, pTargetPath: LPWSTR, MajorVersion: ULONG, pComment: LPWSTR, Flags: ULONG,
) -> NET_API_STATUS;
pub fn NetDfsAddStdRoot(
ServerName: LPWSTR, RootShare: LPWSTR, Comment: LPWSTR, Flags: DWORD,
) -> NET_API_STATUS;
pub fn NetDfsEnum(
DfsName: LPWSTR, Level: DWORD, PrefMaxLen: DWORD, Buffer: *mut LPBYTE,
EntriesRead: LPDWORD, ResumeHandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetDfsGetClientInfo(
DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Level: DWORD,
Buffer: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetDfsGetFtContainerSecurity(
DomainName: LPWSTR, SecurityInformation: SECURITY_INFORMATION,
ppSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, lpcbSecurityDescriptor: LPDWORD,
) -> NET_API_STATUS;
pub fn NetDfsGetInfo(
DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Level: DWORD,
Buffer: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetDfsGetSecurity(
DfsEntryPath: LPWSTR, SecurityInformation: SECURITY_INFORMATION,
ppSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, lpcbSecurityDescriptor: LPDWORD,
) -> NET_API_STATUS;
pub fn NetDfsGetStdContainerSecurity(
MachineName: LPWSTR, SecurityInformation: SECURITY_INFORMATION,
ppSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, lpcbSecurityDescriptor: LPDWORD,
) -> NET_API_STATUS;
pub fn NetDfsGetSupportedNamespaceVersion(
Origin: DFS_NAMESPACE_VERSION_ORIGIN, pName: PWSTR,
ppVersionInfo: *mut PDFS_SUPPORTED_NAMESPACE_VERSION_INFO,
) -> NET_API_STATUS;
pub fn NetDfsMove(
OldDfsEntryPath: LPWSTR, NewDfsEntryPath: LPWSTR, Flags: ULONG,
) -> NET_API_STATUS;
pub fn NetDfsRemove(
DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR,
) -> NET_API_STATUS;
pub fn NetDfsRemoveFtRoot(
ServerName: LPWSTR, RootShare: LPWSTR, FtDfsName: LPWSTR, Flags: DWORD,
) -> NET_API_STATUS;
pub fn NetDfsRemoveFtRootForced(
DomainName: LPWSTR, ServerName: LPWSTR, RootShare: LPWSTR, FtDfsName: LPWSTR, Flags: DWORD,
) -> NET_API_STATUS;
pub fn NetDfsRemoveRootTarget(
pDfsPath: LPWSTR, pTargetPath: LPWSTR, Flags: DWORD,
) -> NET_API_STATUS;
pub fn NetDfsRemoveStdRoot(
ServerName: LPWSTR, RootShare: LPWSTR, Flags: DWORD,
) -> NET_API_STATUS;
pub fn NetDfsSetClientInfo(
DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Level: DWORD, Buffer: LPBYTE,
) -> NET_API_STATUS;
pub fn NetDfsSetFtContainerSecurity(
DomainName: LPWSTR, SecurityInformation: SECURITY_INFORMATION,
pSecurityDescriptor: PSECURITY_DESCRIPTOR,
) -> NET_API_STATUS;
pub fn NetDfsSetInfo(
DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Level: DWORD, Buffer: LPBYTE,
) -> NET_API_STATUS;
pub fn NetDfsSetSecurity(
DfsEntryPath: LPWSTR, SecurityInformation: SECURITY_INFORMATION,
pSecurityDescriptor: PSECURITY_DESCRIPTOR,
) -> NET_API_STATUS;
pub fn NetDfsSetStdContainerSecurity(
MachineName: LPWSTR, SecurityInformation: SECURITY_INFORMATION,
pSecurityDescriptor: PSECURITY_DESCRIPTOR,
) -> NET_API_STATUS;
pub fn NetEnumerateComputerNames(
Server: LPCWSTR, NameType: NET_COMPUTER_NAME_TYPE, Reserved: ULONG, EntryCount: PDWORD,
ComputerNames: *mut *mut LPWSTR,
) -> NET_API_STATUS;
pub fn NetEnumerateServiceAccounts(
ServerName: LPWSTR, Flags: DWORD, AccountsCount: *mut DWORD, Accounts: *mut PZPWSTR,
) -> NTSTATUS;
pub fn NetErrorLogClear(
UncServerName: LPCWSTR, BackupFile: LPCWSTR, Reserved: LPBYTE,
) -> NET_API_STATUS;
pub fn NetErrorLogRead(
UncServerName: LPCWSTR, Reserved1: LPWSTR, ErrorLogHandle: LPHLOG, Offset: DWORD,
Reserved2: LPDWORD, Reserved3: DWORD, OffsetFlag: DWORD, BufPtr: *mut LPBYTE,
PrefMaxSize: DWORD, BytesRead: LPDWORD, TotalAvailable: LPDWORD,
) -> NET_API_STATUS;
pub fn NetErrorLogWrite(
Reserved1: LPBYTE, Code: DWORD, Component: LPCWSTR, Buffer: LPBYTE, NumBytes: DWORD,
MsgBuf: LPBYTE, StrCount: DWORD, Reserved2: LPBYTE,
) -> NET_API_STATUS;
pub fn NetFileClose(servername: LMSTR, fileid: DWORD) -> NET_API_STATUS;
pub fn NetFileEnum(
servername: LMSTR, basepath: LMSTR, username: LMSTR, level: DWORD, bufptr: *mut LPBYTE,
prefmaxlen: DWORD, entriesread: LPDWORD, totalentries: LPDWORD, resume_handle: PDWORD_PTR,
) -> NET_API_STATUS;
pub fn NetFileGetInfo(
servername: LMSTR, fileid: DWORD, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetGetAnyDCName(
servername: LPCWSTR, domainname: LPCWSTR, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetGetDCName(
servername: LPCWSTR, domainname: LPCWSTR, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetGetDisplayInformationIndex(
ServerName: LPCWSTR, Level: DWORD, Prefix: LPCWSTR, Index: LPDWORD,
) -> NET_API_STATUS;
pub fn NetGetJoinInformation(
lpServer: LPCWSTR, lpNameBuffer: *mut LPWSTR, BufferType: PNETSETUP_JOIN_STATUS,
) -> NET_API_STATUS;
pub fn NetGetJoinableOUs(
lpServer: LPCWSTR, lpDomain: LPCWSTR, lpAccount: LPCWSTR, lpPassword: LPCWSTR,
OUCount: *mut DWORD, OUs: *mut *mut LPWSTR,
) -> NET_API_STATUS;
pub fn NetGroupAdd(
servername: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetGroupAddUser(
servername: LPCWSTR, GroupName: LPCWSTR, username: LPCWSTR,
) -> NET_API_STATUS;
pub fn NetGroupDel(servername: LPCWSTR, groupname: LPCWSTR) -> NET_API_STATUS;
pub fn NetGroupDelUser(
servername: LPCWSTR, GroupName: LPCWSTR, Username: LPCWSTR,
) -> NET_API_STATUS;
pub fn NetGroupEnum(
servername: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resume_handle: PDWORD_PTR,
) -> NET_API_STATUS;
pub fn NetGroupGetInfo(
servername: LPCWSTR, groupname: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetGroupGetUsers(
servername: LPCWSTR, groupname: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
prefmaxlen: DWORD, entriesread: LPDWORD, totalentries: LPDWORD, ResumeHandle: PDWORD_PTR,
) -> NET_API_STATUS;
pub fn NetGroupSetInfo(
servername: LPCWSTR, groupname: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetGroupSetUsers(
servername: LPCWSTR, groupname: LPCWSTR, level: DWORD, buf: LPBYTE, totalentries: DWORD,
) -> NET_API_STATUS;
pub fn NetIsServiceAccount(
ServerName: LPWSTR, AccountName: LPWSTR, IsService: *mut BOOL,
) -> NTSTATUS;
pub fn NetJoinDomain(
lpServer: LPCWSTR, lpDomain: LPCWSTR, lpMachineAccountOU: LPCWSTR, lpAccount: LPCWSTR,
lpPassword: LPCWSTR, fJoinOptions: DWORD,
) -> NET_API_STATUS;
pub fn NetLocalGroupAdd(
servername: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetLocalGroupAddMember(
servername: LPCWSTR, groupname: LPCWSTR, membersid: PSID,
) -> NET_API_STATUS;
pub fn NetLocalGroupAddMembers(
servername: LPCWSTR, groupname: LPCWSTR, level: DWORD, buf: LPBYTE, totalentries: DWORD,
) -> NET_API_STATUS;
pub fn NetLocalGroupDel(servername: LPCWSTR, groupname: LPCWSTR) -> NET_API_STATUS;
pub fn NetLocalGroupDelMember(
servername: LPCWSTR, groupname: LPCWSTR, membersid: PSID,
) -> NET_API_STATUS;
pub fn NetLocalGroupDelMembers(
servername: LPCWSTR, groupname: LPCWSTR, level: DWORD, buf: LPBYTE, totalentries: DWORD,
) -> NET_API_STATUS;
pub fn NetLocalGroupEnum(
servername: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: PDWORD_PTR,
) -> NET_API_STATUS;
pub fn NetLocalGroupGetInfo(
servername: LPCWSTR, groupname: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetLocalGroupGetMembers(
servername: LPCWSTR, localgroupname: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
prefmaxlen: DWORD, entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: PDWORD_PTR,
) -> NET_API_STATUS;
pub fn NetLocalGroupSetInfo(
servername: LPCWSTR, groupname: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetLocalGroupSetMembers(
servername: LPCWSTR, groupname: LPCWSTR, level: DWORD, buf: LPBYTE, totalentries: DWORD,
) -> NET_API_STATUS;
pub fn NetMessageBufferSend(
servername: LPCWSTR, msgname: LPCWSTR, fromname: LPCWSTR, buf: LPBYTE, buflen: DWORD,
) -> NET_API_STATUS;
pub fn NetMessageNameAdd(servername: LPCWSTR, msgname: LPCWSTR) -> NET_API_STATUS;
pub fn NetMessageNameDel(servername: LPCWSTR, msgname: LPCWSTR) -> NET_API_STATUS;
pub fn NetMessageNameEnum(
servername: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetMessageNameGetInfo(
servername: LPCWSTR, msgname: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetProvisionComputerAccount(
lpDomain: LPCWSTR, lpMachineName: LPCWSTR, lpMachineAccountOU: LPCWSTR, lpDcName: LPCWSTR,
dwOptions: DWORD, pProvisionBinData: *mut PBYTE, pdwProvisionBinDataSize: *mut DWORD,
pProvisionTextData: *mut LPWSTR,
) -> NET_API_STATUS;
pub fn NetQueryDisplayInformation(
ServerName: LPCWSTR, Level: DWORD, Index: DWORD, EntriesRequested: DWORD,
PreferredMaximumLength: DWORD, ReturnedEntryCount: LPDWORD, SortedBuffer: *mut PVOID,
) -> NET_API_STATUS;
pub fn NetQueryServiceAccount(
ServerName: LPWSTR, AccountName: LPWSTR, InfoLevel: DWORD, Buffer: *mut PBYTE,
) -> NTSTATUS;
pub fn NetRemoteComputerSupports(
UncServerName: LPCWSTR, OptionsWanted: DWORD, OptionsSupported: LPDWORD,
) -> NET_API_STATUS;
pub fn NetRemoteTOD(UncServerName: LPCWSTR, BufferPtr: *mut LPBYTE) -> NET_API_STATUS;
pub fn NetRemoveAlternateComputerName(
Server: LPCWSTR, AlternateName: LPCWSTR, DomainAccount: LPCWSTR,
DomainAccountPassword: LPCWSTR, Reserved: ULONG,
) -> NET_API_STATUS;
pub fn NetRemoveServiceAccount(
ServerName: LPWSTR, AccountName: LPWSTR, Flags: DWORD,
) -> NTSTATUS;
pub fn NetRenameMachineInDomain(
lpServer: LPCWSTR, lpNewMachineName: LPCWSTR, lpAccount: LPCWSTR, lpPassword: LPCWSTR,
fRenameOptions: DWORD,
) -> NET_API_STATUS;
pub fn NetReplExportDirAdd(
servername: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetReplExportDirDel(servername: LPCWSTR, dirname: LPCWSTR) -> NET_API_STATUS;
pub fn NetReplExportDirEnum(
servername: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetReplExportDirGetInfo(
servername: LPCWSTR, dirname: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetReplExportDirLock(servername: LPCWSTR, dirname: LPCWSTR) -> NET_API_STATUS;
pub fn NetReplExportDirSetInfo(
servername: LPCWSTR, dirname: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetReplExportDirUnlock(
servername: LPCWSTR, dirname: LPCWSTR, unlockforce: DWORD,
) -> NET_API_STATUS;
pub fn NetReplGetInfo(
servername: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetReplImportDirAdd(
servername: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetReplImportDirDel(servername: LPCWSTR, dirname: LPCWSTR) -> NET_API_STATUS;
pub fn NetReplImportDirEnum(
servername: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetReplImportDirGetInfo(
servername: LPCWSTR, dirname: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetReplImportDirLock(servername: LPCWSTR, dirname: LPCWSTR) -> NET_API_STATUS;
pub fn NetReplImportDirUnlock(
servername: LPCWSTR, dirname: LPCWSTR, unlockforce: DWORD,
) -> NET_API_STATUS;
pub fn NetReplSetInfo(
servername: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetRequestOfflineDomainJoin(
pProvisionBinData: *mut BYTE, cbProvisionBinDataSize: DWORD, dwOptions: DWORD,
lpWindowsPath: LPCWSTR,
) -> NET_API_STATUS;
pub fn NetRequestProvisioningPackageInstall(
pPackageBinData: *mut BYTE, dwPackageBinDataSize: DWORD, dwProvisionOptions: DWORD,
lpWindowsPath: LPCWSTR, pvReserved: PVOID,
) -> NET_API_STATUS;
pub fn NetScheduleJobAdd(
Servername: LPCWSTR, Buffer: LPBYTE, JobId: LPDWORD,
) -> NET_API_STATUS;
pub fn NetScheduleJobDel(
Servername: LPCWSTR, MinJobId: DWORD, MaxJobId: DWORD,
) -> NET_API_STATUS;
pub fn NetScheduleJobEnum(
Servername: LPCWSTR, PointerToBuffer: *mut LPBYTE, PointerToBuffer: DWORD,
EntriesRead: LPDWORD, TotalEntries: LPDWORD, ResumeHandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetScheduleJobGetInfo(
Servername: LPCWSTR, JobId: DWORD, PointerToBuffer: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetServerAliasAdd(servername: LMSTR, level: DWORD, buf: LPBYTE) -> NET_API_STATUS;
pub fn NetServerAliasDel(servername: LMSTR, level: DWORD, buf: LPBYTE) -> NET_API_STATUS;
pub fn NetServerAliasEnum(
servername: LMSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetServerComputerNameAdd(
ServerName: LMSTR, EmulatedDomainName: LMSTR, EmulatedServerName: LMSTR,
) -> NET_API_STATUS;
pub fn NetServerComputerNameDel(
ServerName: LMSTR, EmulatedServerName: LMSTR,
) -> NET_API_STATUS;
pub fn NetServerDiskEnum(
servername: LMSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetServerEnum(
servername: LMSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, servertype: DWORD, domain: LMCSTR,
resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetServerGetInfo(
servername: LMSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetServerSetInfo(
servername: LMSTR, level: DWORD, buf: LPBYTE, ParmError: LPDWORD,
) -> NET_API_STATUS;
pub fn NetServerTransportAdd(
servername: LMSTR, level: DWORD, bufptr: LPBYTE,
) -> NET_API_STATUS;
pub fn NetServerTransportAddEx(
servername: LMSTR, level: DWORD, bufptr: LPBYTE,
) -> NET_API_STATUS;
pub fn NetServerTransportDel(
servername: LMSTR, level: DWORD, bufptr: LPBYTE,
) -> NET_API_STATUS;
pub fn NetServerTransportEnum(
servername: LMSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetServiceControl(
servername: LPCWSTR, service: LPCWSTR, opcode: DWORD, arg: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetServiceEnum(
servername: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetServiceGetInfo(
servername: LPCWSTR, service: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetServiceInstall(
servername: LPCWSTR, service: LPCWSTR, argc: DWORD, argv: *mut LPCWSTR,
bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetSessionDel(
servername: LMSTR, UncClientName: LMSTR, username: LMSTR,
) -> NET_API_STATUS;
pub fn NetSessionEnum(
servername: LMSTR, UncClientName: LMSTR, username: LMSTR, level: DWORD,
bufptr: *mut LPBYTE, prefmaxlen: DWORD, entriesread: LPDWORD, totalentries: LPDWORD,
resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetSessionGetInfo(
servername: LMSTR, UncClientName: LMSTR, username: LMSTR, level: DWORD,
bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetSetPrimaryComputerName(
Server: LPCWSTR, PrimaryName: LPCWSTR, DomainAccount: LPCWSTR,
DomainAccountPassword: LPCWSTR, Reserved: ULONG,
) -> NET_API_STATUS;
pub fn NetShareAdd(
servername: LMSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetShareCheck(servername: LMSTR, device: LMSTR, _type: LPDWORD) -> NET_API_STATUS;
pub fn NetShareDel(servername: LMSTR, netname: LMSTR, reserved: DWORD) -> NET_API_STATUS;
pub fn NetShareDelEx(servername: LMSTR, level: DWORD, buf: LPBYTE) -> NET_API_STATUS;
pub fn NetShareDelSticky(servername: LMSTR, netname: LMSTR, reserved: DWORD) -> NET_API_STATUS;
pub fn NetShareEnum(
servername: LMSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetShareEnumSticky(
servername: LMSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetShareGetInfo(
servername: LMSTR, netname: LMSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetShareSetInfo(
servername: LMSTR, netname: LMSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetStatisticsGet(
ServerName: LPCWSTR, Service: LPCWSTR, Level: DWORD, Options: DWORD, Buffer: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetUnjoinDomain(
lpServer: LPCWSTR, lpAccount: LPCWSTR, lpPassword: LPCWSTR, fUnjoinOptions: DWORD,
) -> NET_API_STATUS;
pub fn NetUseAdd(
servername: LPWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetUseDel(UncServerName: LMSTR, UseName: LMSTR, ForceCond: DWORD) -> NET_API_STATUS;
pub fn NetUseEnum(
UncServerName: LMSTR, Level: DWORD, BufPtr: *mut LPBYTE, PreferedMaximumSize: DWORD,
EntriesRead: LPDWORD, TotalEntries: LPDWORD, ResumeHandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetUseGetInfo(
UncServerName: LMSTR, UseName: LMSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetUserAdd(
servername: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetUserChangePassword(
domainname: LPCWSTR, username: LPCWSTR, oldpassword: LPCWSTR, newpassword: LPCWSTR,
) -> NET_API_STATUS;
pub fn NetUserDel(servername: LPCWSTR, username: LPCWSTR) -> NET_API_STATUS;
pub fn NetUserEnum(
servername: LPCWSTR, level: DWORD, filter: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetUserGetGroups(
servername: LPCWSTR, username: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
prefmaxlen: DWORD, entriesread: LPDWORD, totalentries: LPDWORD,
) -> NET_API_STATUS;
pub fn NetUserGetInfo(
servername: LPCWSTR, username: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetUserGetLocalGroups(
servername: LPCWSTR, level: DWORD, flags: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD,
) -> NET_API_STATUS;
pub fn NetUserModalsGet(
servername: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetUserModalsSet(
servername: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetUserSetGroups(
servername: LPCWSTR, username: LPCWSTR, level: DWORD, buf: LPBYTE, num_entries: DWORD,
) -> NET_API_STATUS;
pub fn NetUserSetInfo(
servername: LPCWSTR, username: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetValidateName(
lpServer: LPCWSTR, lpName: LPCWSTR, lpAccount: LPCWSTR, lpPassword: LPCWSTR,
NameType: NETSETUP_NAME_TYPE,
) -> NET_API_STATUS;
pub fn NetValidatePasswordPolicy(
ServerName: LPCWSTR, Qualifier: LPVOID, ValidationType: NET_VALIDATE_PASSWORD_TYPE,
InputArg: LPVOID, OutputArg: *mut LPVOID,
) -> NET_API_STATUS;
pub fn NetValidatePasswordPolicyFree(OutputArg: *mut LPVOID) -> NET_API_STATUS;
pub fn NetWkstaGetInfo(servername: LMSTR, level: DWORD, bufptr: *mut LPBYTE) -> NET_API_STATUS;
pub fn NetWkstaSetInfo(
servername: LMSTR, level: DWORD, buffer: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetWkstaTransportAdd(
servername: LPCWSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn NetWkstaTransportDel(
servername: LMSTR, transportname: LMSTR, ucond: DWORD,
) -> NET_API_STATUS;
pub fn NetWkstaTransportEnum(
servername: LPCWSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetWkstaUserEnum(
servername: LMSTR, level: DWORD, bufptr: *mut LPBYTE, prefmaxlen: DWORD,
entriesread: LPDWORD, totalentries: LPDWORD, resumehandle: LPDWORD,
) -> NET_API_STATUS;
pub fn NetWkstaUserGetInfo(
reserved: LMSTR, level: DWORD, bufptr: *mut LPBYTE,
) -> NET_API_STATUS;
pub fn NetWkstaUserSetInfo(
reserved: LMSTR, level: DWORD, buf: LPBYTE, parm_err: LPDWORD,
) -> NET_API_STATUS;
pub fn Netbios(pncb: PNCB) -> UCHAR;
}