2 * Copyright (C) the Wine project
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #define WNNC_NET_MSNET 0x00010000
28 #define WNNC_NET_LANMAN 0x00020000
29 #define WNNC_NET_NETWARE 0x00030000
30 #define WNNC_NET_VINES 0x00040000
31 #define WNNC_NET_10NET 0x00050000
32 #define WNNC_NET_LOCUS 0x00060000
33 #define WNNC_NET_SUN_PC_NFS 0x00070000
34 #define WNNC_NET_LANSTEP 0x00080000
35 #define WNNC_NET_9TILES 0x00090000
36 #define WNNC_NET_LANTASTIC 0x000A0000
37 #define WNNC_NET_AS400 0x000B0000
38 #define WNNC_NET_FTP_NFS 0x000C0000
39 #define WNNC_NET_PATHWORKS 0x000D0000
40 #define WNNC_NET_LIFENET 0x000E0000
41 #define WNNC_NET_POWERLAN 0x000F0000
42 #define WNNC_NET_BWNFS 0x00100000
43 #define WNNC_NET_COGENT 0x00110000
44 #define WNNC_NET_FARALLON 0x00120000
45 #define WNNC_NET_APPLETALK 0x00130000
46 #define WNNC_NET_INTERGRAPH 0x00140000
52 #define RESOURCE_CONNECTED 0x00000001
53 #define RESOURCE_GLOBALNET 0x00000002
54 #define RESOURCE_REMEMBERED 0x00000003
55 #define RESOURCE_RECENT 0x00000004
56 #define RESOURCE_CONTEXT 0x00000005
58 #define RESOURCETYPE_ANY 0x00000000
59 #define RESOURCETYPE_DISK 0x00000001
60 #define RESOURCETYPE_PRINT 0x00000002
61 #define RESOURCETYPE_RESERVED 0x00000008
62 #define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
64 #define RESOURCEUSAGE_CONNECTABLE 0x00000001
65 #define RESOURCEUSAGE_CONTAINER 0x00000002
66 #define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
67 #define RESOURCEUSAGE_SIBLING 0x00000008
68 #define RESOURCEUSAGE_ATTACHED 0x00000010
69 #define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
70 #define RESOURCEUSAGE_RESERVED 0x80000000
72 #define RESOURCEDISPLAYTYPE_GENERIC 0x00000000
73 #define RESOURCEDISPLAYTYPE_DOMAIN 0x00000001
74 #define RESOURCEDISPLAYTYPE_SERVER 0x00000002
75 #define RESOURCEDISPLAYTYPE_SHARE 0x00000003
76 #define RESOURCEDISPLAYTYPE_FILE 0x00000004
77 #define RESOURCEDISPLAYTYPE_GROUP 0x00000005
78 #define RESOURCEDISPLAYTYPE_NETWORK 0x00000006
79 #define RESOURCEDISPLAYTYPE_ROOT 0x00000007
80 #define RESOURCEDISPLAYTYPE_SHAREADMIN 0x00000008
81 #define RESOURCEDISPLAYTYPE_DIRECTORY 0x00000009
82 #define RESOURCEDISPLAYTYPE_TREE 0x0000000A
93 } NETRESOURCEA
,*LPNETRESOURCEA
;
104 } NETRESOURCEW
,*LPNETRESOURCEW
;
106 DECL_WINELIB_TYPE_AW(NETRESOURCE
)
107 DECL_WINELIB_TYPE_AW(LPNETRESOURCE
)
111 * Network connections
114 #define NETPROPERTY_PERSISTENT 1
116 #define CONNECT_UPDATE_PROFILE 0x00000001
117 #define CONNECT_UPDATE_RECENT 0x00000002
118 #define CONNECT_TEMPORARY 0x00000004
119 #define CONNECT_INTERACTIVE 0x00000008
120 #define CONNECT_PROMPT 0x00000010
121 #define CONNECT_NEED_DRIVE 0x00000020
122 #define CONNECT_REFCOUNT 0x00000040
123 #define CONNECT_REDIRECT 0x00000080
124 #define CONNECT_LOCALDRIVE 0x00000100
125 #define CONNECT_CURRENT_MEDIA 0x00000200
127 DWORD WINAPI
WNetAddConnectionA(LPCSTR
,LPCSTR
,LPCSTR
);
128 DWORD WINAPI
WNetAddConnectionW(LPCWSTR
,LPCWSTR
,LPCWSTR
);
129 #define WNetAddConnection WINELIB_NAME_AW(WNetAddConnection)
130 DWORD WINAPI
WNetAddConnection2A(LPNETRESOURCEA
,LPCSTR
,LPCSTR
,DWORD
);
131 DWORD WINAPI
WNetAddConnection2W(LPNETRESOURCEW
,LPCWSTR
,LPCWSTR
,DWORD
);
132 #define WNetAddConnection2 WINELIB_NAME_AW(WNetAddConnection2)
133 DWORD WINAPI
WNetAddConnection3A(HWND
,LPNETRESOURCEA
,LPCSTR
,LPCSTR
,DWORD
);
134 DWORD WINAPI
WNetAddConnection3W(HWND
,LPNETRESOURCEW
,LPCWSTR
,LPCWSTR
,DWORD
);
135 #define WNetAddConnection3 WINELIB_NAME_AW(WNetAddConnection3)
136 DWORD WINAPI
WNetCancelConnectionA(LPCSTR
,BOOL
);
137 DWORD WINAPI
WNetCancelConnectionW(LPCWSTR
,BOOL
);
138 #define WNetCancelConnection WINELIB_NAME_AW(WNetCancelConnection)
139 DWORD WINAPI
WNetCancelConnection2A(LPCSTR
,DWORD
,BOOL
);
140 DWORD WINAPI
WNetCancelConnection2W(LPCWSTR
,DWORD
,BOOL
);
141 #define WNetCancelConnection2 WINELIB_NAME_AW(WNetCancelConnection2)
142 DWORD WINAPI
WNetGetConnectionA(LPCSTR
,LPSTR
,LPDWORD
);
143 DWORD WINAPI
WNetGetConnectionW(LPCWSTR
,LPWSTR
,LPDWORD
);
144 #define WNetGetConnection WINELIB_NAME_AW(WNetGetConnection)
145 DWORD WINAPI
WNetUseConnectionA(HWND
,LPNETRESOURCEA
,LPCSTR
,LPCSTR
,DWORD
,LPSTR
,LPDWORD
,LPDWORD
);
146 DWORD WINAPI
WNetUseConnectionW(HWND
,LPNETRESOURCEW
,LPCWSTR
,LPCWSTR
,DWORD
,LPWSTR
,LPDWORD
,LPDWORD
);
147 #define WNetUseConnection WINELIB_NAME_AW(WNetUseConnection)
148 DWORD WINAPI
WNetSetConnectionA(LPCSTR
,DWORD
,LPVOID
);
149 DWORD WINAPI
WNetSetConnectionW(LPCWSTR
,DWORD
,LPVOID
);
150 #define WNetSetConnection WINELIB_NAME_AW(WNetSetConnection)
153 * Network connection dialogs
157 DWORD cbStructure
; /* size of this structure in bytes */
158 HWND hwndOwner
; /* owner window for the dialog */
159 LPNETRESOURCEA lpConnRes
;/* Requested Resource info */
160 DWORD dwFlags
; /* flags (see below) */
161 DWORD dwDevNum
; /* number of devices connected to */
162 } CONNECTDLGSTRUCTA
, *LPCONNECTDLGSTRUCTA
;
164 DWORD cbStructure
; /* size of this structure in bytes */
165 HWND hwndOwner
; /* owner window for the dialog */
166 LPNETRESOURCEW lpConnRes
;/* Requested Resource info */
167 DWORD dwFlags
; /* flags (see below) */
168 DWORD dwDevNum
; /* number of devices connected to */
169 } CONNECTDLGSTRUCTW
, *LPCONNECTDLGSTRUCTW
;
171 DECL_WINELIB_TYPE_AW(CONNECTDLGSTRUCT
)
172 DECL_WINELIB_TYPE_AW(LPCONNECTDLGSTRUCT
)
174 #define CONNDLG_RO_PATH 0x00000001 /* Resource path should be read-only */
175 #define CONNDLG_CONN_POINT 0x00000002 /* Netware -style movable connection point enabled */
176 #define CONNDLG_USE_MRU 0x00000004 /* Use MRU combobox */
177 #define CONNDLG_HIDE_BOX 0x00000008 /* Hide persistent connect checkbox */
178 #define CONNDLG_PERSIST 0x00000010 /* Force persistent connection */
179 #define CONNDLG_NOT_PERSIST 0x00000020 /* Force connection NOT persistent */
182 DWORD cbStructure
; /* size of this structure in bytes */
183 HWND hwndOwner
; /* owner window for the dialog */
184 LPSTR lpLocalName
; /* local device name */
185 LPSTR lpRemoteName
; /* network resource name */
186 DWORD dwFlags
; /* flags */
187 } DISCDLGSTRUCTA
, *LPDISCDLGSTRUCTA
;
189 DWORD cbStructure
; /* size of this structure in bytes */
190 HWND hwndOwner
; /* owner window for the dialog */
191 LPWSTR lpLocalName
; /* local device name */
192 LPWSTR lpRemoteName
; /* network resource name */
193 DWORD dwFlags
; /* flags */
194 } DISCDLGSTRUCTW
, *LPDISCDLGSTRUCTW
;
196 DECL_WINELIB_TYPE_AW(DISCDLGSTRUCT
)
197 DECL_WINELIB_TYPE_AW(LPDISCDLGSTRUCT
)
199 #define DISC_UPDATE_PROFILE 0x00000001
200 #define DISC_NO_FORCE 0x00000040
202 DWORD WINAPI
WNetConnectionDialog(HWND
,DWORD
);
203 DWORD WINAPI
WNetDisconnectDialog(HWND
,DWORD
);
204 DWORD WINAPI
WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA
);
205 DWORD WINAPI
WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW
);
206 #define WNetConnectionDialog1 WINELIB_NAME_AW(WNetConnectionDialog1)
207 DWORD WINAPI
WNetDisconnectDialog1A(LPDISCDLGSTRUCTA
);
208 DWORD WINAPI
WNetDisconnectDialog1W(LPDISCDLGSTRUCTW
);
209 #define WNetDisconnectDialog1 WINELIB_NAME_AW(WNetDisconnectDialog1)
215 DWORD WINAPI
WNetOpenEnumA(DWORD
,DWORD
,DWORD
,LPNETRESOURCEA
,LPHANDLE
);
216 DWORD WINAPI
WNetOpenEnumW(DWORD
,DWORD
,DWORD
,LPNETRESOURCEW
,LPHANDLE
);
217 #define WNetOpenEnum WINELIB_NAME_AW(WNetOpenEnum)
218 DWORD WINAPI
WNetEnumResourceA(HANDLE
,LPDWORD
,LPVOID
,LPDWORD
);
219 DWORD WINAPI
WNetEnumResourceW(HANDLE
,LPDWORD
,LPVOID
,LPDWORD
);
220 #define WNetEnumResource WINELIB_NAME_AW(WNetEnumResource)
221 DWORD WINAPI
WNetGetResourceInformationA(LPNETRESOURCEA
,LPVOID
,LPDWORD
,LPSTR
*);
222 DWORD WINAPI
WNetGetResourceInformationW(LPNETRESOURCEW
,LPVOID
,LPDWORD
,LPWSTR
*);
223 #define WNetGetResourceInformation WINELIB_NAME_AW(WNetGetResourceInformation)
224 DWORD WINAPI
WNetGetResourceParentA(LPNETRESOURCEA
,LPVOID
,LPDWORD
);
225 DWORD WINAPI
WNetGetResourceParentW(LPNETRESOURCEW
,LPVOID
,LPDWORD
);
226 #define WNetGetResourceParent WINELIB_NAME_AW(WNetGetResourceParent)
227 DWORD WINAPI
WNetCloseEnum(HANDLE
);
233 #define UNIVERSAL_NAME_INFO_LEVEL 0x00000001
234 #define REMOTE_NAME_INFO_LEVEL 0x00000002
237 LPSTR lpUniversalName
;
238 } UNIVERSAL_NAME_INFOA
, *LPUNIVERSAL_NAME_INFOA
;
240 LPWSTR lpUniversalName
;
241 } UNIVERSAL_NAME_INFOW
, *LPUNIVERSAL_NAME_INFOW
;
243 DECL_WINELIB_TYPE_AW(UNIVERSAL_NAME_INFO
)
244 DECL_WINELIB_TYPE_AW(LPUNIVERSAL_NAME_INFO
)
247 LPSTR lpUniversalName
;
248 LPSTR lpConnectionName
;
249 LPSTR lpRemainingPath
;
250 }REMOTE_NAME_INFOA
, *LPREMOTE_NAME_INFOA
;
252 LPWSTR lpUniversalName
;
253 LPWSTR lpConnectionName
;
254 LPWSTR lpRemainingPath
;
255 }REMOTE_NAME_INFOW
, *LPREMOTE_NAME_INFOW
;
257 DECL_WINELIB_TYPE_AW(REMOTE_NAME_INFO
)
258 DECL_WINELIB_TYPE_AW(LPREMOTE_NAME_INFO
)
260 DWORD WINAPI
WNetGetUniversalNameA(LPCSTR
,DWORD
,LPVOID
,LPDWORD
);
261 DWORD WINAPI
WNetGetUniversalNameW(LPCWSTR
,DWORD
,LPVOID
,LPDWORD
);
262 #define WNetGetUniversalName WINELIB_NAME_AW(WNetGetUniversalName)
268 DWORD WINAPI
WNetGetUserA(LPCSTR
,LPSTR
,LPDWORD
);
269 DWORD WINAPI
WNetGetUserW(LPCWSTR
,LPWSTR
,LPDWORD
);
270 #define WNetGetUser WINELIB_NAME_AW(WNetGetUser)
272 #define WNFMT_MULTILINE 0x01
273 #define WNFMT_ABBREVIATED 0x02
274 #define WNFMT_INENUM 0x10
275 #define WNFMT_CONNECTION 0x20
277 DWORD WINAPI
WNetGetProviderNameA(DWORD
,LPSTR
,LPDWORD
);
278 DWORD WINAPI
WNetGetProviderNameW(DWORD
,LPWSTR
,LPDWORD
);
279 #define WNetGetProviderName WINELIB_NAME_AW(WNetGetProviderName)
283 DWORD dwProviderVersion
;
285 DWORD dwCharacteristics
;
290 } NETINFOSTRUCT
, *LPNETINFOSTRUCT
;
292 #define NETINFO_DLL16 0x00000001
293 #define NETINFO_DISKRED 0x00000004
294 #define NETINFO_PRINTERRED 0x00000008
296 DWORD WINAPI
WNetGetNetworkInformationA(LPCSTR
,LPNETINFOSTRUCT
);
297 DWORD WINAPI
WNetGetNetworkInformationW(LPCWSTR
,LPNETINFOSTRUCT
);
298 #define WNetGetNetworkInformation WINELIB_NAME_AW(WNetGetNetworkInformation)
305 DWORD WINAPI
WNetGetLastErrorA(LPDWORD
,LPSTR
,DWORD
,LPSTR
,DWORD
);
306 DWORD WINAPI
WNetGetLastErrorW(LPDWORD
,LPWSTR
,DWORD
,LPWSTR
,DWORD
);
307 #define WNetGetLastError WINELIB_NAME_AW(WNetGetLastError)
309 #define WN_SUCCESS NO_ERROR
310 #define WN_NO_ERROR NO_ERROR
311 #define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
312 #define WN_CANCEL ERROR_CANCELLED
313 #define WN_RETRY ERROR_RETRY
314 #define WN_NET_ERROR ERROR_UNEXP_NET_ERR
315 #define WN_MORE_DATA ERROR_MORE_DATA
316 #define WN_BAD_POINTER ERROR_INVALID_ADDRESS
317 #define WN_BAD_VALUE ERROR_INVALID_PARAMETER
318 #define WN_BAD_USER ERROR_BAD_USERNAME
319 #define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
320 #define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
321 #define WN_FUNCTION_BUSY ERROR_BUSY
322 #define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
323 #define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
324 #define WN_NO_NETWORK ERROR_NO_NETWORK
325 #define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
326 #define WN_BAD_LEVEL ERROR_INVALID_LEVEL
327 #define WN_BAD_HANDLE ERROR_INVALID_HANDLE
328 #define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
329 #define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
331 #define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
332 #define WN_OPEN_FILES ERROR_OPEN_FILES
333 #define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
334 #define WN_BAD_NETNAME ERROR_BAD_NET_NAME
335 #define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
336 #define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
337 #define WN_DEVICE_ERROR ERROR_GEN_FAILURE
338 #define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
339 #define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
340 #define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
341 #define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
342 #define WN_BAD_PROFILE ERROR_BAD_PROFILE
343 #define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
344 #define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
346 #define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
347 #define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
349 #define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
350 #define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
351 #define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
355 * Multinet (for Shell)
364 } NETCONNECTINFOSTRUCT
,*LPNETCONNECTINFOSTRUCT
;
366 #define WNCON_FORNETCARD 0x00000001
367 #define WNCON_NOTROUTED 0x00000002
368 #define WNCON_SLOWLINK 0x00000004
369 #define WNCON_DYNAMIC 0x00000008
371 DWORD WINAPI
MultinetGetConnectionPerformanceA(LPNETRESOURCEA
,LPNETCONNECTINFOSTRUCT
);
372 DWORD WINAPI
MultinetGetConnectionPerformanceW(LPNETRESOURCEW
,LPNETCONNECTINFOSTRUCT
);
373 #define MultinetGetConnectionPerformance WINELIB_NAME_AW(MultinetGetConnectionPerformance)
374 DWORD WINAPI
MultinetGetErrorTextA(DWORD
,DWORD
,DWORD
);
375 DWORD WINAPI
MultinetGetErrorTextW(DWORD
,DWORD
,DWORD
);
376 #define MultinetGetErrorText WINELIB_NAME_AW(MultinetGetErrorText)
382 /* WNetEnumCachedPasswords */
383 typedef struct tagPASSWORD_CACHE_ENTRY
391 } PASSWORD_CACHE_ENTRY
;
393 typedef BOOL (CALLBACK
*ENUMPASSWORDPROC
)(PASSWORD_CACHE_ENTRY
*, DWORD
);
394 UINT WINAPI
WNetEnumCachedPasswords( LPSTR
, WORD
, BYTE
, ENUMPASSWORDPROC
, DWORD
);
395 DWORD WINAPI
WNetGetCachedPassword( LPSTR
, WORD
, LPSTR
, LPWORD
, BYTE
);
396 DWORD WINAPI
WNetCachePassword( LPSTR
, WORD
, LPSTR
, WORD
, BYTE
, WORD
);
399 #endif /* _WINNETWK_H_ */