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