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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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
WNetCloseEnum(HANDLE
);
227 #define UNIVERSAL_NAME_INFO_LEVEL 0x00000001
228 #define REMOTE_NAME_INFO_LEVEL 0x00000002
231 LPSTR lpUniversalName
;
232 } UNIVERSAL_NAME_INFOA
, *LPUNIVERSAL_NAME_INFOA
;
234 LPWSTR lpUniversalName
;
235 } UNIVERSAL_NAME_INFOW
, *LPUNIVERSAL_NAME_INFOW
;
237 DECL_WINELIB_TYPE_AW(UNIVERSAL_NAME_INFO
)
238 DECL_WINELIB_TYPE_AW(LPUNIVERSAL_NAME_INFO
)
241 LPSTR lpUniversalName
;
242 LPSTR lpConnectionName
;
243 LPSTR lpRemainingPath
;
244 }REMOTE_NAME_INFOA
, *LPREMOTE_NAME_INFOA
;
246 LPWSTR lpUniversalName
;
247 LPWSTR lpConnectionName
;
248 LPWSTR lpRemainingPath
;
249 }REMOTE_NAME_INFOW
, *LPREMOTE_NAME_INFOW
;
251 DECL_WINELIB_TYPE_AW(REMOTE_NAME_INFO
)
252 DECL_WINELIB_TYPE_AW(LPREMOTE_NAME_INFO
)
254 DWORD WINAPI
WNetGetUniversalNameA(LPCSTR
,DWORD
,LPVOID
,LPDWORD
);
255 DWORD WINAPI
WNetGetUniversalNameW(LPCWSTR
,DWORD
,LPVOID
,LPDWORD
);
256 #define WNetGetUniversalName WINELIB_NAME_AW(WNetGetUniversalName)
262 DWORD WINAPI
WNetGetUserA(LPCSTR
,LPSTR
,LPDWORD
);
263 DWORD WINAPI
WNetGetUserW(LPCWSTR
,LPWSTR
,LPDWORD
);
264 #define WNetGetUser WINELIB_NAME_AW(WNetGetUser)
266 #define WNFMT_MULTILINE 0x01
267 #define WNFMT_ABBREVIATED 0x02
268 #define WNFMT_INENUM 0x10
269 #define WNFMT_CONNECTION 0x20
271 DWORD WINAPI
WNetGetProviderNameA(DWORD
,LPSTR
,LPDWORD
);
272 DWORD WINAPI
WNetGetProviderNameW(DWORD
,LPWSTR
,LPDWORD
);
273 #define WNetGetProviderName WINELIB_NAME_AW(WNetGetProviderName)
277 DWORD dwProviderVersion
;
279 DWORD dwCharacteristics
;
284 } NETINFOSTRUCT
, *LPNETINFOSTRUCT
;
286 #define NETINFO_DLL16 0x00000001
287 #define NETINFO_DISKRED 0x00000004
288 #define NETINFO_PRINTERRED 0x00000008
290 DWORD WINAPI
WNetGetNetworkInformationA(LPCSTR
,LPNETINFOSTRUCT
);
291 DWORD WINAPI
WNetGetNetworkInformationW(LPCWSTR
,LPNETINFOSTRUCT
);
292 #define WNetGetNetworkInformation WINELIB_NAME_AW(WNetGetNetworkInformation)
299 DWORD WINAPI
WNetGetLastErrorA(LPDWORD
,LPSTR
,DWORD
,LPSTR
,DWORD
);
300 DWORD WINAPI
WNetGetLastErrorW(LPDWORD
,LPWSTR
,DWORD
,LPWSTR
,DWORD
);
301 #define WNetGetLastError WINELIB_NAME_AW(WNetGetLastError)
303 #define WN_SUCCESS NO_ERROR
304 #define WN_NO_ERROR NO_ERROR
305 #define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
306 #define WN_CANCEL ERROR_CANCELLED
307 #define WN_RETRY ERROR_RETRY
308 #define WN_NET_ERROR ERROR_UNEXP_NET_ERR
309 #define WN_MORE_DATA ERROR_MORE_DATA
310 #define WN_BAD_POINTER ERROR_INVALID_ADDRESS
311 #define WN_BAD_VALUE ERROR_INVALID_PARAMETER
312 #define WN_BAD_USER ERROR_BAD_USERNAME
313 #define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
314 #define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
315 #define WN_FUNCTION_BUSY ERROR_BUSY
316 #define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
317 #define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
318 #define WN_NO_NETWORK ERROR_NO_NETWORK
319 #define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
320 #define WN_BAD_LEVEL ERROR_INVALID_LEVEL
321 #define WN_BAD_HANDLE ERROR_INVALID_HANDLE
322 #define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
323 #define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
325 #define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
326 #define WN_OPEN_FILES ERROR_OPEN_FILES
327 #define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
328 #define WN_BAD_NETNAME ERROR_BAD_NET_NAME
329 #define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
330 #define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
331 #define WN_DEVICE_ERROR ERROR_GEN_FAILURE
332 #define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
333 #define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
334 #define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
335 #define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
336 #define WN_BAD_PROFILE ERROR_BAD_PROFILE
337 #define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
338 #define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
340 #define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
341 #define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
343 #define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
344 #define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
345 #define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
349 * Multinet (for Shell)
358 } NETCONNECTINFOSTRUCT
,*LPNETCONNECTINFOSTRUCT
;
360 #define WNCON_FORNETCARD 0x00000001
361 #define WNCON_NOTROUTED 0x00000002
362 #define WNCON_SLOWLINK 0x00000004
363 #define WNCON_DYNAMIC 0x00000008
365 DWORD WINAPI
MultinetGetConnectionPerformanceA(LPNETRESOURCEA
,LPNETCONNECTINFOSTRUCT
);
366 DWORD WINAPI
MultinetGetConnectionPerformanceW(LPNETRESOURCEW
,LPNETCONNECTINFOSTRUCT
);
367 #define MultinetGetConnectionPerformance WINELIB_NAME_AW(MultinetGetConnectionPerformance)
368 DWORD WINAPI
MultinetGetErrorTextA(DWORD
,DWORD
,DWORD
);
369 DWORD WINAPI
MultinetGetErrorTextW(DWORD
,DWORD
,DWORD
);
370 #define MultinetGetErrorText WINELIB_NAME_AW(MultinetGetErrorText)
376 /* WNetEnumCachedPasswords */
377 typedef struct tagPASSWORD_CACHE_ENTRY
385 } PASSWORD_CACHE_ENTRY
;
387 typedef BOOL (CALLBACK
*ENUMPASSWORDPROC
)(PASSWORD_CACHE_ENTRY
*, DWORD
);
388 UINT WINAPI
WNetEnumCachedPasswords( LPSTR
, WORD
, BYTE
, ENUMPASSWORDPROC
, DWORD
);
389 DWORD WINAPI
WNetGetCachedPassword( LPSTR
, WORD
, LPSTR
, LPWORD
, BYTE
);
390 DWORD WINAPI
WNetCachePassword( LPSTR
, WORD
, LPSTR
, WORD
, BYTE
, WORD
);
393 #endif /* _WINNETWK_H_ */