1 // Copyright © 2015, Peter Atashian 2 // Licensed under the MIT License <LICENSE.md> 3 //! Standard WINNET Header File for WIN32 4 pub const WNNC_NET_MSNET: ::DWORD = 0x00010000; 5 pub const WNNC_NET_SMB: ::DWORD = 0x00020000; 6 pub const WNNC_NET_NETWARE: ::DWORD = 0x00030000; 7 pub const WNNC_NET_VINES: ::DWORD = 0x00040000; 8 pub const WNNC_NET_10NET: ::DWORD = 0x00050000; 9 pub const WNNC_NET_LOCUS: ::DWORD = 0x00060000; 10 pub const WNNC_NET_SUN_PC_NFS: ::DWORD = 0x00070000; 11 pub const WNNC_NET_LANSTEP: ::DWORD = 0x00080000; 12 pub const WNNC_NET_9TILES: ::DWORD = 0x00090000; 13 pub const WNNC_NET_LANTASTIC: ::DWORD = 0x000A0000; 14 pub const WNNC_NET_AS400: ::DWORD = 0x000B0000; 15 pub const WNNC_NET_FTP_NFS: ::DWORD = 0x000C0000; 16 pub const WNNC_NET_PATHWORKS: ::DWORD = 0x000D0000; 17 pub const WNNC_NET_LIFENET: ::DWORD = 0x000E0000; 18 pub const WNNC_NET_POWERLAN: ::DWORD = 0x000F0000; 19 pub const WNNC_NET_BWNFS: ::DWORD = 0x00100000; 20 pub const WNNC_NET_COGENT: ::DWORD = 0x00110000; 21 pub const WNNC_NET_FARALLON: ::DWORD = 0x00120000; 22 pub const WNNC_NET_APPLETALK: ::DWORD = 0x00130000; 23 pub const WNNC_NET_INTERGRAPH: ::DWORD = 0x00140000; 24 pub const WNNC_NET_SYMFONET: ::DWORD = 0x00150000; 25 pub const WNNC_NET_CLEARCASE: ::DWORD = 0x00160000; 26 pub const WNNC_NET_FRONTIER: ::DWORD = 0x00170000; 27 pub const WNNC_NET_BMC: ::DWORD = 0x00180000; 28 pub const WNNC_NET_DCE: ::DWORD = 0x00190000; 29 pub const WNNC_NET_AVID: ::DWORD = 0x001A0000; 30 pub const WNNC_NET_DOCUSPACE: ::DWORD = 0x001B0000; 31 pub const WNNC_NET_MANGOSOFT: ::DWORD = 0x001C0000; 32 pub const WNNC_NET_SERNET: ::DWORD = 0x001D0000; 33 pub const WNNC_NET_RIVERFRONT1: ::DWORD = 0x001E0000; 34 pub const WNNC_NET_RIVERFRONT2: ::DWORD = 0x001F0000; 35 pub const WNNC_NET_DECORB: ::DWORD = 0x00200000; 36 pub const WNNC_NET_PROTSTOR: ::DWORD = 0x00210000; 37 pub const WNNC_NET_FJ_REDIR: ::DWORD = 0x00220000; 38 pub const WNNC_NET_DISTINCT: ::DWORD = 0x00230000; 39 pub const WNNC_NET_TWINS: ::DWORD = 0x00240000; 40 pub const WNNC_NET_RDR2SAMPLE: ::DWORD = 0x00250000; 41 pub const WNNC_NET_CSC: ::DWORD = 0x00260000; 42 pub const WNNC_NET_3IN1: ::DWORD = 0x00270000; 43 pub const WNNC_NET_EXTENDNET: ::DWORD = 0x00290000; 44 pub const WNNC_NET_STAC: ::DWORD = 0x002A0000; 45 pub const WNNC_NET_FOXBAT: ::DWORD = 0x002B0000; 46 pub const WNNC_NET_YAHOO: ::DWORD = 0x002C0000; 47 pub const WNNC_NET_EXIFS: ::DWORD = 0x002D0000; 48 pub const WNNC_NET_DAV: ::DWORD = 0x002E0000; 49 pub const WNNC_NET_KNOWARE: ::DWORD = 0x002F0000; 50 pub const WNNC_NET_OBJECT_DIRE: ::DWORD = 0x00300000; 51 pub const WNNC_NET_MASFAX: ::DWORD = 0x00310000; 52 pub const WNNC_NET_HOB_NFS: ::DWORD = 0x00320000; 53 pub const WNNC_NET_SHIVA: ::DWORD = 0x00330000; 54 pub const WNNC_NET_IBMAL: ::DWORD = 0x00340000; 55 pub const WNNC_NET_LOCK: ::DWORD = 0x00350000; 56 pub const WNNC_NET_TERMSRV: ::DWORD = 0x00360000; 57 pub const WNNC_NET_SRT: ::DWORD = 0x00370000; 58 pub const WNNC_NET_QUINCY: ::DWORD = 0x00380000; 59 pub const WNNC_NET_OPENAFS: ::DWORD = 0x00390000; 60 pub const WNNC_NET_AVID1: ::DWORD = 0x003A0000; 61 pub const WNNC_NET_DFS: ::DWORD = 0x003B0000; 62 pub const WNNC_NET_KWNP: ::DWORD = 0x003C0000; 63 pub const WNNC_NET_ZENWORKS: ::DWORD = 0x003D0000; 64 pub const WNNC_NET_DRIVEONWEB: ::DWORD = 0x003E0000; 65 pub const WNNC_NET_VMWARE: ::DWORD = 0x003F0000; 66 pub const WNNC_NET_RSFX: ::DWORD = 0x00400000; 67 pub const WNNC_NET_MFILES: ::DWORD = 0x00410000; 68 pub const WNNC_NET_MS_NFS: ::DWORD = 0x00420000; 69 pub const WNNC_NET_GOOGLE: ::DWORD = 0x00430000; 70 pub const WNNC_NET_NDFS: ::DWORD = 0x00440000; 71 pub const WNNC_NET_DOCUSHARE: ::DWORD = 0x00450000; 72 pub const WNNC_CRED_MANAGER: ::DWORD = 0xFFFF0000; 73 pub const WNNC_NET_LANMAN: ::DWORD = WNNC_NET_SMB; 74 pub const RESOURCE_CONNECTED: ::DWORD = 0x00000001; 75 pub const RESOURCE_GLOBALNET: ::DWORD = 0x00000002; 76 pub const RESOURCE_REMEMBERED: ::DWORD = 0x00000003; 77 pub const RESOURCE_RECENT: ::DWORD = 0x00000004; 78 pub const RESOURCE_CONTEXT: ::DWORD = 0x00000005; 79 pub const RESOURCETYPE_ANY: ::DWORD = 0x00000000; 80 pub const RESOURCETYPE_DISK: ::DWORD = 0x00000001; 81 pub const RESOURCETYPE_PRINT: ::DWORD = 0x00000002; 82 pub const RESOURCETYPE_RESERVED: ::DWORD = 0x00000008; 83 pub const RESOURCETYPE_UNKNOWN: ::DWORD = 0xFFFFFFFF; 84 pub const RESOURCEUSAGE_CONNECTABLE: ::DWORD = 0x00000001; 85 pub const RESOURCEUSAGE_CONTAINER: ::DWORD = 0x00000002; 86 pub const RESOURCEUSAGE_NOLOCALDEVICE: ::DWORD = 0x00000004; 87 pub const RESOURCEUSAGE_SIBLING: ::DWORD = 0x00000008; 88 pub const RESOURCEUSAGE_ATTACHED: ::DWORD = 0x00000010; 89 pub const RESOURCEUSAGE_ALL: ::DWORD = RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER 90 | RESOURCEUSAGE_ATTACHED; 91 pub const RESOURCEUSAGE_RESERVED: ::DWORD = 0x80000000; 92 pub const RESOURCEDISPLAYTYPE_GENERIC: ::DWORD = 0x00000000; 93 pub const RESOURCEDISPLAYTYPE_DOMAIN: ::DWORD = 0x00000001; 94 pub const RESOURCEDISPLAYTYPE_SERVER: ::DWORD = 0x00000002; 95 pub const RESOURCEDISPLAYTYPE_SHARE: ::DWORD = 0x00000003; 96 pub const RESOURCEDISPLAYTYPE_FILE: ::DWORD = 0x00000004; 97 pub const RESOURCEDISPLAYTYPE_GROUP: ::DWORD = 0x00000005; 98 pub const RESOURCEDISPLAYTYPE_NETWORK: ::DWORD = 0x00000006; 99 pub const RESOURCEDISPLAYTYPE_ROOT: ::DWORD = 0x00000007; 100 pub const RESOURCEDISPLAYTYPE_SHAREADMIN: ::DWORD = 0x00000008; 101 pub const RESOURCEDISPLAYTYPE_DIRECTORY: ::DWORD = 0x00000009; 102 pub const RESOURCEDISPLAYTYPE_TREE: ::DWORD = 0x0000000A; 103 pub const RESOURCEDISPLAYTYPE_NDSCONTAINER: ::DWORD = 0x0000000B; 104 STRUCT!{struct NETRESOURCEA { 105 dwScope: ::DWORD, 106 dwType: ::DWORD, 107 dwDisplayType: ::DWORD, 108 dwUsage: ::DWORD, 109 lpLocalName: ::LPSTR, 110 lpRemoteName: ::LPSTR, 111 lpComment: ::LPSTR, 112 lpProvider: ::LPSTR, 113 }} 114 pub type LPNETRESOURCEA = *mut NETRESOURCEA; 115 STRUCT!{struct NETRESOURCEW { 116 dwScope: ::DWORD, 117 dwType: ::DWORD, 118 dwDisplayType: ::DWORD, 119 dwUsage: ::DWORD, 120 lpLocalName: ::LPWSTR, 121 lpRemoteName: ::LPWSTR, 122 lpComment: ::LPWSTR, 123 lpProvider: ::LPWSTR, 124 }} 125 pub type LPNETRESOURCEW = *mut NETRESOURCEW; 126 pub const NETPROPERTY_PERSISTENT: ::DWORD = 1; 127 pub const CONNECT_UPDATE_PROFILE: ::DWORD = 0x00000001; 128 pub const CONNECT_UPDATE_RECENT: ::DWORD = 0x00000002; 129 pub const CONNECT_TEMPORARY: ::DWORD = 0x00000004; 130 pub const CONNECT_INTERACTIVE: ::DWORD = 0x00000008; 131 pub const CONNECT_PROMPT: ::DWORD = 0x00000010; 132 pub const CONNECT_NEED_DRIVE: ::DWORD = 0x00000020; 133 pub const CONNECT_REFCOUNT: ::DWORD = 0x00000040; 134 pub const CONNECT_REDIRECT: ::DWORD = 0x00000080; 135 pub const CONNECT_LOCALDRIVE: ::DWORD = 0x00000100; 136 pub const CONNECT_CURRENT_MEDIA: ::DWORD = 0x00000200; 137 pub const CONNECT_DEFERRED: ::DWORD = 0x00000400; 138 pub const CONNECT_RESERVED: ::DWORD = 0xFF000000; 139 pub const CONNECT_COMMANDLINE: ::DWORD = 0x00000800; 140 pub const CONNECT_CMD_SAVECRED: ::DWORD = 0x00001000; 141 pub const CONNECT_CRED_RESET: ::DWORD = 0x00002000; 142 STRUCT!{struct CONNECTDLGSTRUCTA { 143 cbStructure: ::DWORD, 144 hwndOwner: ::HWND, 145 lpConnRes: ::LPNETRESOURCEA, 146 dwFlags: ::DWORD, 147 dwDevNum: ::DWORD, 148 }} 149 pub type LPCONNECTDLGSTRUCTA = *mut CONNECTDLGSTRUCTA; 150 STRUCT!{struct CONNECTDLGSTRUCTW { 151 cbStructure: ::DWORD, 152 hwndOwner: ::HWND, 153 lpConnRes: ::LPNETRESOURCEW, 154 dwFlags: ::DWORD, 155 dwDevNum: ::DWORD, 156 }} 157 pub type LPCONNECTDLGSTRUCTW = *mut CONNECTDLGSTRUCTW; 158 pub const CONNDLG_RO_PATH: ::DWORD = 0x00000001; 159 pub const CONNDLG_CONN_POINT: ::DWORD = 0x00000002; 160 pub const CONNDLG_USE_MRU: ::DWORD = 0x00000004; 161 pub const CONNDLG_HIDE_BOX: ::DWORD = 0x00000008; 162 pub const CONNDLG_PERSIST: ::DWORD = 0x00000010; 163 pub const CONNDLG_NOT_PERSIST: ::DWORD = 0x00000020; 164 STRUCT!{struct DISCDLGSTRUCTA { 165 cbStructure: ::DWORD, 166 hwndOwner: ::HWND, 167 lpLocalName: ::LPSTR, 168 lpRemoteName: ::LPSTR, 169 dwFlags: ::DWORD, 170 }} 171 pub type LPDISCDLGSTRUCTA = *mut DISCDLGSTRUCTA; 172 STRUCT!{struct DISCDLGSTRUCTW { 173 cbStructure: ::DWORD, 174 hwndOwner: ::HWND, 175 lpLocalName: ::LPWSTR, 176 lpRemoteName: ::LPWSTR, 177 dwFlags: ::DWORD, 178 }} 179 pub type LPDISCDLGSTRUCTW = *mut DISCDLGSTRUCTW; 180 pub const DISC_UPDATE_PROFILE: ::DWORD = 0x00000001; 181 pub const DISC_NO_FORCE: ::DWORD = 0x00000040; 182 pub const UNIVERSAL_NAME_INFO_LEVEL: ::DWORD = 0x00000001; 183 pub const REMOTE_NAME_INFO_LEVEL: ::DWORD = 0x00000002; 184 STRUCT!{struct UNIVERSAL_NAME_INFOA { 185 lpUniversalName: ::LPSTR, 186 }} 187 pub type LPUNIVERSAL_NAME_INFOA = *mut UNIVERSAL_NAME_INFOA; 188 STRUCT!{struct UNIVERSAL_NAME_INFOW { 189 lpUniversalName: ::LPWSTR, 190 }} 191 pub type LPUNIVERSAL_NAME_INFOW = *mut UNIVERSAL_NAME_INFOW; 192 STRUCT!{struct REMOTE_NAME_INFOA { 193 lpUniversalName: ::LPSTR, 194 lpConnectionName: ::LPSTR, 195 lpRemainingPath: ::LPSTR, 196 }} 197 pub type LPREMOTE_NAME_INFOA = *mut REMOTE_NAME_INFOA; 198 STRUCT!{struct REMOTE_NAME_INFOW { 199 lpUniversalName: ::LPWSTR, 200 lpConnectionName: ::LPWSTR, 201 lpRemainingPath: ::LPWSTR, 202 }} 203 pub type LPREMOTE_NAME_INFOW = *mut REMOTE_NAME_INFOW; 204 pub const WNFMT_MULTILINE: ::DWORD = 0x01; 205 pub const WNFMT_ABBREVIATED: ::DWORD = 0x02; 206 pub const WNFMT_INENUM: ::DWORD = 0x10; 207 pub const WNFMT_CONNECTION: ::DWORD = 0x20; 208 STRUCT!{struct NETINFOSTRUCT { 209 cbStructure: ::DWORD, 210 dwProviderVersion: ::DWORD, 211 dwStatus: ::DWORD, 212 dwCharacteristics: ::DWORD, 213 dwHandle: ::ULONG_PTR, 214 wNetType: ::WORD, 215 dwPrinters: ::DWORD, 216 dwDrives: ::DWORD, 217 }} 218 pub type LPNETINFOSTRUCT = *mut NETINFOSTRUCT; 219 pub const NETINFO_DLL16: ::DWORD = 0x00000001; 220 pub const NETINFO_DISKRED: ::DWORD = 0x00000004; 221 pub const NETINFO_PRINTERRED: ::DWORD = 0x00000008; 222 pub const WN_SUCCESS: ::DWORD = ::NO_ERROR; 223 pub const WN_NO_ERROR: ::DWORD = ::NO_ERROR; 224 pub const WN_NOT_SUPPORTED: ::DWORD = ::ERROR_NOT_SUPPORTED; 225 pub const WN_CANCEL: ::DWORD = ::ERROR_CANCELLED; 226 pub const WN_RETRY: ::DWORD = ::ERROR_RETRY; 227 pub const WN_NET_ERROR: ::DWORD = ::ERROR_UNEXP_NET_ERR; 228 pub const WN_MORE_DATA: ::DWORD = ::ERROR_MORE_DATA; 229 pub const WN_BAD_POINTER: ::DWORD = ::ERROR_INVALID_ADDRESS; 230 pub const WN_BAD_VALUE: ::DWORD = ::ERROR_INVALID_PARAMETER; 231 pub const WN_BAD_USER: ::DWORD = ::ERROR_BAD_USERNAME; 232 pub const WN_BAD_PASSWORD: ::DWORD = ::ERROR_INVALID_PASSWORD; 233 pub const WN_ACCESS_DENIED: ::DWORD = ::ERROR_ACCESS_DENIED; 234 pub const WN_FUNCTION_BUSY: ::DWORD = ::ERROR_BUSY; 235 pub const WN_WINDOWS_ERROR: ::DWORD = ::ERROR_UNEXP_NET_ERR; 236 pub const WN_OUT_OF_MEMORY: ::DWORD = ::ERROR_NOT_ENOUGH_MEMORY; 237 pub const WN_NO_NETWORK: ::DWORD = ::ERROR_NO_NETWORK; 238 pub const WN_EXTENDED_ERROR: ::DWORD = ::ERROR_EXTENDED_ERROR; 239 pub const WN_BAD_LEVEL: ::DWORD = ::ERROR_INVALID_LEVEL; 240 pub const WN_BAD_HANDLE: ::DWORD = ::ERROR_INVALID_HANDLE; 241 pub const WN_NOT_INITIALIZING: ::DWORD = ::ERROR_ALREADY_INITIALIZED; 242 pub const WN_NO_MORE_DEVICES: ::DWORD = ::ERROR_NO_MORE_DEVICES; 243 pub const WN_NOT_CONNECTED: ::DWORD = ::ERROR_NOT_CONNECTED; 244 pub const WN_OPEN_FILES: ::DWORD = ::ERROR_OPEN_FILES; 245 pub const WN_DEVICE_IN_USE: ::DWORD = ::ERROR_DEVICE_IN_USE; 246 pub const WN_BAD_NETNAME: ::DWORD = ::ERROR_BAD_NET_NAME; 247 pub const WN_BAD_LOCALNAME: ::DWORD = ::ERROR_BAD_DEVICE; 248 pub const WN_ALREADY_CONNECTED: ::DWORD = ::ERROR_ALREADY_ASSIGNED; 249 pub const WN_DEVICE_ERROR: ::DWORD = ::ERROR_GEN_FAILURE; 250 pub const WN_CONNECTION_CLOSED: ::DWORD = ::ERROR_CONNECTION_UNAVAIL; 251 pub const WN_NO_NET_OR_BAD_PATH: ::DWORD = ::ERROR_NO_NET_OR_BAD_PATH; 252 pub const WN_BAD_PROVIDER: ::DWORD = ::ERROR_BAD_PROVIDER; 253 pub const WN_CANNOT_OPEN_PROFILE: ::DWORD = ::ERROR_CANNOT_OPEN_PROFILE; 254 pub const WN_BAD_PROFILE: ::DWORD = ::ERROR_BAD_PROFILE; 255 pub const WN_BAD_DEV_TYPE: ::DWORD = ::ERROR_BAD_DEV_TYPE; 256 pub const WN_DEVICE_ALREADY_REMEMBERED: ::DWORD = ::ERROR_DEVICE_ALREADY_REMEMBERED; 257 pub const WN_CONNECTED_OTHER_PASSWORD: ::DWORD = ::ERROR_CONNECTED_OTHER_PASSWORD; 258 pub const WN_CONNECTED_OTHER_PASSWORD_DEFAULT: ::DWORD = ::ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT; 259 pub const WN_NO_MORE_ENTRIES: ::DWORD = ::ERROR_NO_MORE_ITEMS; 260 pub const WN_NOT_CONTAINER: ::DWORD = ::ERROR_NOT_CONTAINER; 261 pub const WN_NOT_AUTHENTICATED: ::DWORD = ::ERROR_NOT_AUTHENTICATED; 262 pub const WN_NOT_LOGGED_ON: ::DWORD = ::ERROR_NOT_LOGGED_ON; 263 pub const WN_NOT_VALIDATED: ::DWORD = ::ERROR_NO_LOGON_SERVERS; 264 STRUCT!{struct NETCONNECTINFOSTRUCT { 265 cbStructure: ::DWORD, 266 dwFlags: ::DWORD, 267 dwSpeed: ::DWORD, 268 dwDelay: ::DWORD, 269 dwOptDataSize: ::DWORD, 270 }} 271 pub type LPNETCONNECTINFOSTRUCT = *mut NETCONNECTINFOSTRUCT; 272 pub const WNCON_FORNETCARD: ::DWORD = 0x00000001; 273 pub const WNCON_NOTROUTED: ::DWORD = 0x00000002; 274 pub const WNCON_SLOWLINK: ::DWORD = 0x00000004; 275 pub const WNCON_DYNAMIC: ::DWORD = 0x00000008; 276