1 // Copyright © 2015-2017 winapi-rs developers 2 // Licensed under the Apache License, Version 2.0 3 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 4 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 5 // All files in the project carrying such notice may not be copied, modified, or distributed 6 // except according to those terms. 7 // This file contains structures, function prototypes, and definitions for the NetDfs API 8 use shared::guiddef::GUID; 9 use shared::lmcons::NET_API_STATUS; 10 use shared::minwindef::{DWORD, LPBYTE, LPDWORD, ULONG, USHORT}; 11 use um::winnt::{LPWSTR, PSECURITY_DESCRIPTOR, PWSTR, SECURITY_INFORMATION, ULONGLONG, WCHAR}; 12 pub const DFS_VOLUME_STATES: DWORD = 0xF; 13 pub const DFS_VOLUME_STATE_OK: DWORD = 1; 14 pub const DFS_VOLUME_STATE_INCONSISTENT: DWORD = 2; 15 pub const DFS_VOLUME_STATE_OFFLINE: DWORD = 3; 16 pub const DFS_VOLUME_STATE_ONLINE: DWORD = 4; 17 pub const DFS_VOLUME_STATE_RESYNCHRONIZE: DWORD = 0x10; 18 pub const DFS_VOLUME_STATE_STANDBY: DWORD = 0x20; 19 pub const DFS_VOLUME_STATE_FORCE_SYNC: DWORD = 0x40; 20 pub const DFS_VOLUME_FLAVORS: DWORD = 0x0300; 21 pub const DFS_VOLUME_FLAVOR_UNUSED1: DWORD = 0x0000; 22 pub const DFS_VOLUME_FLAVOR_STANDALONE: DWORD = 0x0100; 23 pub const DFS_VOLUME_FLAVOR_AD_BLOB: DWORD = 0x0200; 24 pub const DFS_STORAGE_FLAVOR_UNUSED2: DWORD = 0x0300; 25 pub const DFS_STORAGE_STATES: ULONG = 0xF; 26 pub const DFS_STORAGE_STATE_OFFLINE: ULONG = 1; 27 pub const DFS_STORAGE_STATE_ONLINE: ULONG = 2; 28 pub const DFS_STORAGE_STATE_ACTIVE: ULONG = 4; 29 ENUM!{enum DFS_TARGET_PRIORITY_CLASS { 30 DfsInvalidPriorityClass = -1i32 as u32, 31 DfsSiteCostNormalPriorityClass = 0, 32 DfsGlobalHighPriorityClass, 33 DfsSiteCostHighPriorityClass, 34 DfsSiteCostLowPriorityClass, 35 DfsGlobalLowPriorityClass, 36 }} 37 STRUCT!{struct DFS_TARGET_PRIORITY { 38 TargetPriorityClass: DFS_TARGET_PRIORITY_CLASS, 39 TargetPriorityRank: USHORT, 40 Reserved: USHORT, 41 }} 42 pub type PDFS_TARGET_PRIORITY = *mut DFS_TARGET_PRIORITY; 43 STRUCT!{struct DFS_INFO_1 { 44 EntryPath: LPWSTR, 45 }} 46 pub type PDFS_INFO_1 = *mut DFS_INFO_1; 47 pub type LPDFS_INFO_1 = *mut DFS_INFO_1; 48 #[cfg(target_arch = "x86_64")] 49 IFDEF!{ 50 STRUCT!{struct DFS_INFO_1_32 { 51 EntryPath: ULONG, 52 }} 53 pub type PDFS_INFO_1_32 = *mut DFS_INFO_1_32; 54 pub type LPDFS_INFO_1_32 = *mut DFS_INFO_1_32; 55 } 56 STRUCT!{struct DFS_INFO_2 { 57 EntryPath: LPWSTR, 58 Comment: LPWSTR, 59 State: DWORD, 60 NumberOfStorages: DWORD, 61 }} 62 pub type PDFS_INFO_2 = *mut DFS_INFO_2; 63 pub type LPDFS_INFO_2 = *mut DFS_INFO_2; 64 #[cfg(target_arch = "x86_64")] 65 IFDEF!{ 66 STRUCT!{struct DFS_INFO_2_32 { 67 EntryPath: ULONG, 68 Comment: ULONG, 69 State: DWORD, 70 NumberOfStorages: DWORD, 71 }} 72 pub type PDFS_INFO_2_32 = *mut DFS_INFO_2_32; 73 pub type LPDFS_INFO_2_32 = *mut DFS_INFO_2_32; 74 } 75 STRUCT!{struct DFS_STORAGE_INFO { 76 State: ULONG, 77 ServerName: LPWSTR, 78 ShareName: LPWSTR, 79 }} 80 pub type PDFS_STORAGE_INFO = *mut DFS_STORAGE_INFO; 81 pub type LPDFS_STORAGE_INFO = *mut DFS_STORAGE_INFO; 82 #[cfg(target_arch = "x86_64")] 83 IFDEF!{ 84 STRUCT!{struct DFS_STORAGE_INFO_0_32 { 85 State: ULONG, 86 ServerName: ULONG, 87 ShareName: ULONG, 88 }} 89 pub type PDFS_STORAGE_INFO_0_32 = *mut DFS_STORAGE_INFO_0_32; 90 pub type LPDFS_STORAGE_INFO_0_32 = *mut DFS_STORAGE_INFO_0_32; 91 } 92 STRUCT!{struct DFS_STORAGE_INFO_1 { 93 State: ULONG, 94 ServerName: LPWSTR, 95 ShareName: LPWSTR, 96 TargetPriority: DFS_TARGET_PRIORITY, 97 }} 98 pub type PDFS_STORAGE_INFO_1 = *mut DFS_STORAGE_INFO_1; 99 pub type LPDFS_STORAGE_INFO_1 = *mut DFS_STORAGE_INFO_1; 100 STRUCT!{struct DFS_INFO_3 { 101 EntryPath: LPWSTR, 102 Comment: LPWSTR, 103 State: DWORD, 104 NumberOfStorages: DWORD, 105 Storage: LPDFS_STORAGE_INFO, 106 }} 107 pub type PDFS_INFO_3 = *mut DFS_INFO_3; 108 pub type LPDFS_INFO_3 = *mut DFS_INFO_3; 109 #[cfg(target_arch = "x86_64")] 110 IFDEF!{ 111 STRUCT!{struct DFS_INFO_3_32 { 112 EntryPath: ULONG, 113 Comment: ULONG, 114 State: DWORD, 115 NumberOfStorages: DWORD, 116 Storage: ULONG, 117 }} 118 pub type PDFS_INFO_3_32 = *mut DFS_INFO_3_32; 119 pub type LPDFS_INFO_3_32 = *mut DFS_INFO_3_32; 120 } 121 STRUCT!{struct DFS_INFO_4 { 122 EntryPath: LPWSTR, 123 Comment: LPWSTR, 124 State: DWORD, 125 Timeout: ULONG, 126 Guid: GUID, 127 NumberOfStorages: DWORD, 128 Storage: LPDFS_STORAGE_INFO, 129 }} 130 pub type PDFS_INFO_4 = *mut DFS_INFO_4; 131 pub type LPDFS_INFO_4 = *mut DFS_INFO_4; 132 #[cfg(target_arch = "x86_64")] 133 IFDEF!{ 134 STRUCT!{struct DFS_INFO_4_32 { 135 EntryPath: ULONG, 136 Comment: ULONG, 137 State: DWORD, 138 Timeout: ULONG, 139 Guid: GUID, 140 NumberOfStorages: DWORD, 141 Storage: ULONG, 142 }} 143 pub type PDFS_INFO_4_32 = *mut DFS_INFO_4_32; 144 pub type LPDFS_INFO_4_32 = *mut DFS_INFO_4_32; 145 } 146 STRUCT!{struct DFS_INFO_5 { 147 EntryPath: LPWSTR, 148 Comment: LPWSTR, 149 State: DWORD, 150 Timeout: ULONG, 151 Guid: GUID, 152 PropertyFlags: ULONG, 153 MetadataSize: ULONG, 154 NumberOfStorages: DWORD, 155 }} 156 pub type PDFS_INFO_5 = *mut DFS_INFO_5; 157 pub type LPDFS_INFO_5 = *mut DFS_INFO_5; 158 STRUCT!{struct DFS_INFO_6 { 159 EntryPath: LPWSTR, 160 Comment: LPWSTR, 161 State: DWORD, 162 Timeout: ULONG, 163 Guid: GUID, 164 PropertyFlags: ULONG, 165 MetadataSize: ULONG, 166 NumberOfStorages: DWORD, 167 Storage: LPDFS_STORAGE_INFO, 168 }} 169 pub type PDFS_INFO_6 = *mut DFS_INFO_6; 170 pub type LPDFS_INFO_6 = *mut DFS_INFO_6; 171 STRUCT!{struct DFS_INFO_7 { 172 GenerationGuid: GUID, 173 }} 174 pub type PDFS_INFO_7 = *mut DFS_INFO_7; 175 pub type LPDFS_INFO_7 = *mut DFS_INFO_7; 176 STRUCT!{struct DFS_INFO_8 { 177 EntryPath: LPWSTR, 178 Comment: LPWSTR, 179 State: DWORD, 180 Timeout: ULONG, 181 Guid: GUID, 182 PropertyFlags: ULONG, 183 MetadataSize: ULONG, 184 SdLengthReserved: ULONG, 185 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 186 NumberOfStorages: DWORD, 187 }} 188 pub type PDFS_INFO_8 = *mut DFS_INFO_8; 189 pub type LPDFS_INFO_8 = *mut DFS_INFO_8; 190 STRUCT!{struct DFS_INFO_9 { 191 EntryPath: LPWSTR, 192 Comment: LPWSTR, 193 State: DWORD, 194 Timeout: ULONG, 195 Guid: GUID, 196 PropertyFlags: ULONG, 197 MetadataSize: ULONG, 198 SdLengthReserved: ULONG, 199 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 200 NumberOfStorages: DWORD, 201 Storage: LPDFS_STORAGE_INFO, 202 }} 203 pub type PDFS_INFO_9 = *mut DFS_INFO_9; 204 pub type LPDFS_INFO_9 = *mut DFS_INFO_9; 205 pub const DFS_VALID_PROPERTY_FLAGS: ULONG = DFS_PROPERTY_FLAG_INSITE_REFERRALS 206 | DFS_PROPERTY_FLAG_ROOT_SCALABILITY | DFS_PROPERTY_FLAG_SITE_COSTING 207 | DFS_PROPERTY_FLAG_TARGET_FAILBACK | DFS_PROPERTY_FLAG_CLUSTER_ENABLED 208 | DFS_PROPERTY_FLAG_ABDE; 209 pub const DFS_PROPERTY_FLAG_INSITE_REFERRALS: ULONG = 0x00000001; 210 pub const DFS_PROPERTY_FLAG_ROOT_SCALABILITY: ULONG = 0x00000002; 211 pub const DFS_PROPERTY_FLAG_SITE_COSTING: ULONG = 0x00000004; 212 pub const DFS_PROPERTY_FLAG_TARGET_FAILBACK: ULONG = 0x00000008; 213 pub const DFS_PROPERTY_FLAG_CLUSTER_ENABLED: ULONG = 0x00000010; 214 pub const DFS_PROPERTY_FLAG_ABDE: ULONG = 0x00000020; 215 STRUCT!{struct DFS_INFO_50 { 216 NamespaceMajorVersion: ULONG, 217 NamespaceMinorVersion: ULONG, 218 NamespaceCapabilities: ULONGLONG, 219 }} 220 pub type PDFS_INFO_50 = *mut DFS_INFO_50; 221 pub type LPDFS_INFO_50 = *mut DFS_INFO_50; 222 STRUCT!{struct DFS_INFO_100 { 223 Comment: LPWSTR, 224 }} 225 pub type PDFS_INFO_100 = *mut DFS_INFO_100; 226 pub type LPDFS_INFO_100 = *mut DFS_INFO_100; 227 STRUCT!{struct DFS_INFO_101 { 228 State: DWORD, 229 }} 230 pub type PDFS_INFO_101 = *mut DFS_INFO_101; 231 pub type LPDFS_INFO_101 = *mut DFS_INFO_101; 232 STRUCT!{struct DFS_INFO_102 { 233 Timeout: ULONG, 234 }} 235 pub type PDFS_INFO_102 = *mut DFS_INFO_102; 236 pub type LPDFS_INFO_102 = *mut DFS_INFO_102; 237 STRUCT!{struct DFS_INFO_103 { 238 PropertyFlagMask: ULONG, 239 PropertyFlags: ULONG, 240 }} 241 pub type PDFS_INFO_103 = *mut DFS_INFO_103; 242 pub type LPDFS_INFO_103 = *mut DFS_INFO_103; 243 STRUCT!{struct DFS_INFO_104 { 244 TargetPriority: DFS_TARGET_PRIORITY, 245 }} 246 pub type PDFS_INFO_104 = *mut DFS_INFO_104; 247 pub type LPDFS_INFO_104 = *mut DFS_INFO_104; 248 STRUCT!{struct DFS_INFO_105 { 249 Comment: LPWSTR, 250 State: DWORD, 251 Timeout: ULONG, 252 PropertyFlagMask: ULONG, 253 PropertyFlags: ULONG, 254 }} 255 pub type PDFS_INFO_105 = *mut DFS_INFO_105; 256 pub type LPDFS_INFO_105 = *mut DFS_INFO_105; 257 STRUCT!{struct DFS_INFO_106 { 258 State: DWORD, 259 TargetPriority: DFS_TARGET_PRIORITY, 260 }} 261 pub type PDFS_INFO_106 = *mut DFS_INFO_106; 262 pub type LPDFS_INFO_106 = *mut DFS_INFO_106; 263 STRUCT!{struct DFS_INFO_107 { 264 Comment: LPWSTR, 265 State: DWORD, 266 Timeout: ULONG, 267 PropertyFlagMask: ULONG, 268 PropertyFlags: ULONG, 269 SdLengthReserved: ULONG, 270 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 271 }} 272 pub type PDFS_INFO_107 = *mut DFS_INFO_107; 273 pub type LPDFS_INFO_107 = *mut DFS_INFO_107; 274 STRUCT!{struct DFS_INFO_150 { 275 SdLengthReserved: ULONG, 276 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 277 }} 278 pub type PDFS_INFO_150 = *mut DFS_INFO_150; 279 pub type LPDFS_INFO_150 = *mut DFS_INFO_150; 280 STRUCT!{struct DFS_INFO_200 { 281 FtDfsName: LPWSTR, 282 }} 283 pub type PDFS_INFO_200 = *mut DFS_INFO_200; 284 pub type LPDFS_INFO_200 = *mut DFS_INFO_200; 285 STRUCT!{struct DFS_INFO_300 { 286 Flags: DWORD, 287 DfsName: LPWSTR, 288 }} 289 pub type PDFS_INFO_300 = *mut DFS_INFO_300; 290 pub type LPDFS_INFO_300 = *mut DFS_INFO_300; 291 extern "system" { NetDfsAdd( DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Comment: LPWSTR, Flags: DWORD, ) -> NET_API_STATUS292 pub fn NetDfsAdd( 293 DfsEntryPath: LPWSTR, 294 ServerName: LPWSTR, 295 ShareName: LPWSTR, 296 Comment: LPWSTR, 297 Flags: DWORD, 298 ) -> NET_API_STATUS; 299 } 300 pub const DFS_ADD_VOLUME: DWORD = 1; 301 pub const DFS_RESTORE_VOLUME: DWORD = 2; 302 extern "system" { NetDfsAddStdRoot( ServerName: LPWSTR, RootShare: LPWSTR, Comment: LPWSTR, Flags: DWORD, ) -> NET_API_STATUS303 pub fn NetDfsAddStdRoot( 304 ServerName: LPWSTR, 305 RootShare: LPWSTR, 306 Comment: LPWSTR, 307 Flags: DWORD, 308 ) -> NET_API_STATUS; NetDfsRemoveStdRoot( ServerName: LPWSTR, RootShare: LPWSTR, Flags: DWORD, ) -> NET_API_STATUS309 pub fn NetDfsRemoveStdRoot( 310 ServerName: LPWSTR, 311 RootShare: LPWSTR, 312 Flags: DWORD, 313 ) -> NET_API_STATUS; NetDfsAddFtRoot( ServerName: LPWSTR, RootShare: LPWSTR, FtDfsName: LPWSTR, Comment: LPWSTR, Flags: DWORD, ) -> NET_API_STATUS314 pub fn NetDfsAddFtRoot( 315 ServerName: LPWSTR, 316 RootShare: LPWSTR, 317 FtDfsName: LPWSTR, 318 Comment: LPWSTR, 319 Flags: DWORD, 320 ) -> NET_API_STATUS; NetDfsRemoveFtRoot( ServerName: LPWSTR, RootShare: LPWSTR, FtDfsName: LPWSTR, Flags: DWORD, ) -> NET_API_STATUS321 pub fn NetDfsRemoveFtRoot( 322 ServerName: LPWSTR, 323 RootShare: LPWSTR, 324 FtDfsName: LPWSTR, 325 Flags: DWORD, 326 ) -> NET_API_STATUS; NetDfsRemoveFtRootForced( DomainName: LPWSTR, ServerName: LPWSTR, RootShare: LPWSTR, FtDfsName: LPWSTR, Flags: DWORD, ) -> NET_API_STATUS327 pub fn NetDfsRemoveFtRootForced( 328 DomainName: LPWSTR, 329 ServerName: LPWSTR, 330 RootShare: LPWSTR, 331 FtDfsName: LPWSTR, 332 Flags: DWORD, 333 ) -> NET_API_STATUS; 334 } 335 pub const NET_DFS_SETDC_FLAGS: DWORD = 0x00000000; 336 pub const NET_DFS_SETDC_TIMEOUT: DWORD = 0x00000001; 337 pub const NET_DFS_SETDC_INITPKT: DWORD = 0x00000002; 338 STRUCT!{struct DFS_SITENAME_INFO { 339 SiteFlags: ULONG, 340 SiteName: LPWSTR, 341 }} 342 pub type PDFS_SITENAME_INFO = *mut DFS_SITENAME_INFO; 343 pub type LPDFS_SITENAME_INFO = *mut DFS_SITENAME_INFO; 344 pub const DFS_SITE_PRIMARY: ULONG = 0x1; 345 STRUCT!{struct DFS_SITELIST_INFO { 346 cSites: ULONG, 347 Site: [DFS_SITENAME_INFO; 1], 348 }} 349 pub type PDFS_SITELIST_INFO = *mut DFS_SITELIST_INFO; 350 pub type LPDFS_SITELIST_INFO = *mut DFS_SITELIST_INFO; 351 extern "system" { NetDfsRemove( DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, ) -> NET_API_STATUS352 pub fn NetDfsRemove( 353 DfsEntryPath: LPWSTR, 354 ServerName: LPWSTR, 355 ShareName: LPWSTR, 356 ) -> NET_API_STATUS; NetDfsEnum( DfsName: LPWSTR, Level: DWORD, PrefMaxLen: DWORD, Buffer: *mut LPBYTE, EntriesRead: LPDWORD, ResumeHandle: LPDWORD, ) -> NET_API_STATUS357 pub fn NetDfsEnum( 358 DfsName: LPWSTR, 359 Level: DWORD, 360 PrefMaxLen: DWORD, 361 Buffer: *mut LPBYTE, 362 EntriesRead: LPDWORD, 363 ResumeHandle: LPDWORD, 364 ) -> NET_API_STATUS; NetDfsGetInfo( DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Level: DWORD, Buffer: *mut LPBYTE, ) -> NET_API_STATUS365 pub fn NetDfsGetInfo( 366 DfsEntryPath: LPWSTR, 367 ServerName: LPWSTR, 368 ShareName: LPWSTR, 369 Level: DWORD, 370 Buffer: *mut LPBYTE, 371 ) -> NET_API_STATUS; NetDfsSetInfo( DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Level: DWORD, Buffer: LPBYTE, ) -> NET_API_STATUS372 pub fn NetDfsSetInfo( 373 DfsEntryPath: LPWSTR, 374 ServerName: LPWSTR, 375 ShareName: LPWSTR, 376 Level: DWORD, 377 Buffer: LPBYTE, 378 ) -> NET_API_STATUS; NetDfsGetClientInfo( DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Level: DWORD, Buffer: *mut LPBYTE, ) -> NET_API_STATUS379 pub fn NetDfsGetClientInfo( 380 DfsEntryPath: LPWSTR, 381 ServerName: LPWSTR, 382 ShareName: LPWSTR, 383 Level: DWORD, 384 Buffer: *mut LPBYTE, 385 ) -> NET_API_STATUS; NetDfsSetClientInfo( DfsEntryPath: LPWSTR, ServerName: LPWSTR, ShareName: LPWSTR, Level: DWORD, Buffer: LPBYTE, ) -> NET_API_STATUS386 pub fn NetDfsSetClientInfo( 387 DfsEntryPath: LPWSTR, 388 ServerName: LPWSTR, 389 ShareName: LPWSTR, 390 Level: DWORD, 391 Buffer: LPBYTE, 392 ) -> NET_API_STATUS; NetDfsMove( OldDfsEntryPath: LPWSTR, NewDfsEntryPath: LPWSTR, Flags: ULONG, ) -> NET_API_STATUS393 pub fn NetDfsMove( 394 OldDfsEntryPath: LPWSTR, 395 NewDfsEntryPath: LPWSTR, 396 Flags: ULONG, 397 ) -> NET_API_STATUS; 398 } 399 pub const DFS_MOVE_FLAG_REPLACE_IF_EXISTS: ULONG = 0x00000001; 400 extern "system" { NetDfsRename( Path: LPWSTR, NewPath: LPWSTR, ) -> NET_API_STATUS401 pub fn NetDfsRename( 402 Path: LPWSTR, 403 NewPath: LPWSTR, 404 ) -> NET_API_STATUS; NetDfsAddRootTarget( pDfsPath: LPWSTR, pTargetPath: LPWSTR, MajorVersion: ULONG, pComment: LPWSTR, Flags: ULONG, ) -> NET_API_STATUS405 pub fn NetDfsAddRootTarget( 406 pDfsPath: LPWSTR, 407 pTargetPath: LPWSTR, 408 MajorVersion: ULONG, 409 pComment: LPWSTR, 410 Flags: ULONG, 411 ) -> NET_API_STATUS; 412 } 413 pub const DFS_FORCE_REMOVE: ULONG = 0x80000000; 414 extern "system" { NetDfsRemoveRootTarget( pDfsPath: LPWSTR, pTargetPath: LPWSTR, Flags: DWORD, ) -> NET_API_STATUS415 pub fn NetDfsRemoveRootTarget( 416 pDfsPath: LPWSTR, 417 pTargetPath: LPWSTR, 418 Flags: DWORD, 419 ) -> NET_API_STATUS; NetDfsGetSecurity( DfsEntryPath: LPWSTR, SecurityInformation: SECURITY_INFORMATION, ppSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, lpcbSecurityDescriptor: LPDWORD, ) -> NET_API_STATUS420 pub fn NetDfsGetSecurity( 421 DfsEntryPath: LPWSTR, 422 SecurityInformation: SECURITY_INFORMATION, 423 ppSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, 424 lpcbSecurityDescriptor: LPDWORD, 425 ) -> NET_API_STATUS; NetDfsSetSecurity( DfsEntryPath: LPWSTR, SecurityInformation: SECURITY_INFORMATION, pSecurityDescriptor: PSECURITY_DESCRIPTOR, ) -> NET_API_STATUS426 pub fn NetDfsSetSecurity( 427 DfsEntryPath: LPWSTR, 428 SecurityInformation: SECURITY_INFORMATION, 429 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 430 ) -> NET_API_STATUS; NetDfsGetStdContainerSecurity( MachineName: LPWSTR, SecurityInformation: SECURITY_INFORMATION, ppSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, lpcbSecurityDescriptor: LPDWORD, ) -> NET_API_STATUS431 pub fn NetDfsGetStdContainerSecurity( 432 MachineName: LPWSTR, 433 SecurityInformation: SECURITY_INFORMATION, 434 ppSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, 435 lpcbSecurityDescriptor: LPDWORD, 436 ) -> NET_API_STATUS; NetDfsSetStdContainerSecurity( MachineName: LPWSTR, SecurityInformation: SECURITY_INFORMATION, pSecurityDescriptor: PSECURITY_DESCRIPTOR, ) -> NET_API_STATUS437 pub fn NetDfsSetStdContainerSecurity( 438 MachineName: LPWSTR, 439 SecurityInformation: SECURITY_INFORMATION, 440 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 441 ) -> NET_API_STATUS; NetDfsGetFtContainerSecurity( DomainName: LPWSTR, SecurityInformation: SECURITY_INFORMATION, ppSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, lpcbSecurityDescriptor: LPDWORD, ) -> NET_API_STATUS442 pub fn NetDfsGetFtContainerSecurity( 443 DomainName: LPWSTR, 444 SecurityInformation: SECURITY_INFORMATION, 445 ppSecurityDescriptor: *mut PSECURITY_DESCRIPTOR, 446 lpcbSecurityDescriptor: LPDWORD, 447 ) -> NET_API_STATUS; NetDfsSetFtContainerSecurity( DomainName: LPWSTR, SecurityInformation: SECURITY_INFORMATION, pSecurityDescriptor: PSECURITY_DESCRIPTOR, ) -> NET_API_STATUS448 pub fn NetDfsSetFtContainerSecurity( 449 DomainName: LPWSTR, 450 SecurityInformation: SECURITY_INFORMATION, 451 pSecurityDescriptor: PSECURITY_DESCRIPTOR, 452 ) -> NET_API_STATUS; 453 } 454 ENUM!{enum DFS_NAMESPACE_VERSION_ORIGIN { 455 DFS_NAMESPACE_VERSION_ORIGIN_COMBINED = 0, 456 DFS_NAMESPACE_VERSION_ORIGIN_SERVER, 457 DFS_NAMESPACE_VERSION_ORIGIN_DOMAIN, 458 }} 459 pub type PDFS_NAMESPACE_VERSION_ORIGIN = *mut DFS_NAMESPACE_VERSION_ORIGIN; 460 pub const DFS_NAMESPACE_CAPABILITY_ABDE: ULONGLONG = 0x0000000000000001; 461 STRUCT!{struct DFS_SUPPORTED_NAMESPACE_VERSION_INFO { 462 DomainDfsMajorVersion: ULONG, 463 DomainDfsMinorVersion: ULONG, 464 DomainDfsCapabilities: ULONGLONG, 465 StandaloneDfsMajorVersion: ULONG, 466 StandaloneDfsMinorVersion: ULONG, 467 StandaloneDfsCapabilities: ULONGLONG, 468 }} 469 pub type PDFS_SUPPORTED_NAMESPACE_VERSION_INFO = *mut DFS_SUPPORTED_NAMESPACE_VERSION_INFO; 470 extern "system" { NetDfsGetSupportedNamespaceVersion( Origin: DFS_NAMESPACE_VERSION_ORIGIN, pName: PWSTR, ppVersionInfo: *mut PDFS_SUPPORTED_NAMESPACE_VERSION_INFO, ) -> NET_API_STATUS471 pub fn NetDfsGetSupportedNamespaceVersion( 472 Origin: DFS_NAMESPACE_VERSION_ORIGIN, 473 pName: PWSTR, 474 ppVersionInfo: *mut PDFS_SUPPORTED_NAMESPACE_VERSION_INFO, 475 ) -> NET_API_STATUS; 476 } 477 STRUCT!{struct DFS_GET_PKT_ENTRY_STATE_ARG { 478 DfsEntryPathLen: USHORT, 479 ServerNameLen: USHORT, 480 ShareNameLen: USHORT, 481 Level: ULONG, 482 Buffer: [WCHAR; 1], 483 }} 484 pub type PDFS_GET_PKT_ENTRY_STATE_ARG = *mut DFS_GET_PKT_ENTRY_STATE_ARG; 485