VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/winnetwk.h@ 33282

Last change on this file since 33282 was 28475, checked in by vboxsync, 15 years ago

crOpenGL: update to wine 1.1.43

  • Property svn:eol-style set to native
File size: 15.9 KB
Line 
1/*
2 * Copyright (C) the Wine project
3 *
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.
8 *
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.
13 *
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
17 */
18
19/*
20 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef _WINNETWK_H_
29#define _WINNETWK_H_
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/*
36 * Network types
37 */
38
39#define WNNC_NET_MSNET 0x00010000
40#define WNNC_NET_LANMAN 0x00020000
41#define WNNC_NET_NETWARE 0x00030000
42#define WNNC_NET_VINES 0x00040000
43#define WNNC_NET_10NET 0x00050000
44#define WNNC_NET_LOCUS 0x00060000
45#define WNNC_NET_SUN_PC_NFS 0x00070000
46#define WNNC_NET_LANSTEP 0x00080000
47#define WNNC_NET_9TILES 0x00090000
48#define WNNC_NET_LANTASTIC 0x000A0000
49#define WNNC_NET_AS400 0x000B0000
50#define WNNC_NET_FTP_NFS 0x000C0000
51#define WNNC_NET_PATHWORKS 0x000D0000
52#define WNNC_NET_LIFENET 0x000E0000
53#define WNNC_NET_POWERLAN 0x000F0000
54#define WNNC_NET_BWNFS 0x00100000
55#define WNNC_NET_COGENT 0x00110000
56#define WNNC_NET_FARALLON 0x00120000
57#define WNNC_NET_APPLETALK 0x00130000
58#define WNNC_NET_INTERGRAPH 0x00140000
59
60/*
61 * Network resources
62 */
63
64#define RESOURCE_CONNECTED 0x00000001
65#define RESOURCE_GLOBALNET 0x00000002
66#define RESOURCE_REMEMBERED 0x00000003
67#define RESOURCE_RECENT 0x00000004
68#define RESOURCE_CONTEXT 0x00000005
69
70#define RESOURCETYPE_ANY 0x00000000
71#define RESOURCETYPE_DISK 0x00000001
72#define RESOURCETYPE_PRINT 0x00000002
73#define RESOURCETYPE_RESERVED 0x00000008
74#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
75
76#define RESOURCEUSAGE_CONNECTABLE 0x00000001
77#define RESOURCEUSAGE_CONTAINER 0x00000002
78#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
79#define RESOURCEUSAGE_SIBLING 0x00000008
80#define RESOURCEUSAGE_ATTACHED 0x00000010
81#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
82#define RESOURCEUSAGE_RESERVED 0x80000000
83
84#define RESOURCEDISPLAYTYPE_GENERIC 0x00000000
85#define RESOURCEDISPLAYTYPE_DOMAIN 0x00000001
86#define RESOURCEDISPLAYTYPE_SERVER 0x00000002
87#define RESOURCEDISPLAYTYPE_SHARE 0x00000003
88#define RESOURCEDISPLAYTYPE_FILE 0x00000004
89#define RESOURCEDISPLAYTYPE_GROUP 0x00000005
90#define RESOURCEDISPLAYTYPE_NETWORK 0x00000006
91#define RESOURCEDISPLAYTYPE_ROOT 0x00000007
92#define RESOURCEDISPLAYTYPE_SHAREADMIN 0x00000008
93#define RESOURCEDISPLAYTYPE_DIRECTORY 0x00000009
94#define RESOURCEDISPLAYTYPE_TREE 0x0000000A
95
96typedef struct {
97 DWORD dwScope;
98 DWORD dwType;
99 DWORD dwDisplayType;
100 DWORD dwUsage;
101 LPSTR lpLocalName;
102 LPSTR lpRemoteName;
103 LPSTR lpComment ;
104 LPSTR lpProvider;
105} NETRESOURCEA,*LPNETRESOURCEA;
106
107typedef struct {
108 DWORD dwScope;
109 DWORD dwType;
110 DWORD dwDisplayType;
111 DWORD dwUsage;
112 LPWSTR lpLocalName;
113 LPWSTR lpRemoteName;
114 LPWSTR lpComment ;
115 LPWSTR lpProvider;
116} NETRESOURCEW,*LPNETRESOURCEW;
117
118DECL_WINELIB_TYPE_AW(NETRESOURCE)
119DECL_WINELIB_TYPE_AW(LPNETRESOURCE)
120
121
122/*
123 * Network connections
124 */
125
126#define NETPROPERTY_PERSISTENT 1
127
128#define CONNECT_UPDATE_PROFILE 0x00000001
129#define CONNECT_UPDATE_RECENT 0x00000002
130#define CONNECT_TEMPORARY 0x00000004
131#define CONNECT_INTERACTIVE 0x00000008
132#define CONNECT_PROMPT 0x00000010
133#define CONNECT_NEED_DRIVE 0x00000020
134#define CONNECT_REFCOUNT 0x00000040
135#define CONNECT_REDIRECT 0x00000080
136#define CONNECT_LOCALDRIVE 0x00000100
137#define CONNECT_CURRENT_MEDIA 0x00000200
138
139DWORD WINAPI WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
140DWORD WINAPI WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
141#define WNetAddConnection WINELIB_NAME_AW(WNetAddConnection)
142DWORD WINAPI WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
143DWORD WINAPI WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
144#define WNetAddConnection2 WINELIB_NAME_AW(WNetAddConnection2)
145DWORD WINAPI WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
146DWORD WINAPI WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
147#define WNetAddConnection3 WINELIB_NAME_AW(WNetAddConnection3)
148DWORD WINAPI WNetCancelConnectionA(LPCSTR,BOOL);
149DWORD WINAPI WNetCancelConnectionW(LPCWSTR,BOOL);
150#define WNetCancelConnection WINELIB_NAME_AW(WNetCancelConnection)
151DWORD WINAPI WNetCancelConnection2A(LPCSTR,DWORD,BOOL);
152DWORD WINAPI WNetCancelConnection2W(LPCWSTR,DWORD,BOOL);
153#define WNetCancelConnection2 WINELIB_NAME_AW(WNetCancelConnection2)
154DWORD WINAPI WNetGetConnectionA(LPCSTR,LPSTR,LPDWORD);
155DWORD WINAPI WNetGetConnectionW(LPCWSTR,LPWSTR,LPDWORD);
156#define WNetGetConnection WINELIB_NAME_AW(WNetGetConnection)
157DWORD WINAPI WNetGetLastErrorA(LPDWORD,LPSTR,DWORD,LPSTR,DWORD);
158DWORD WINAPI WNetGetLastErrorW(LPDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
159#define WNetGetLastError WINELIB_NAME_AW(WNetGetLastError)
160DWORD WINAPI WNetRestoreConnectionA(HWND,LPCSTR);
161DWORD WINAPI WNetRestoreConnectionW(HWND,LPCWSTR);
162#define WNetRestoreConnection WINELIB_NAME_AW(WNetRestoreConnection)
163DWORD WINAPI WNetUseConnectionA(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD,LPSTR,LPDWORD,LPDWORD);
164DWORD WINAPI WNetUseConnectionW(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPDWORD,LPDWORD);
165#define WNetUseConnection WINELIB_NAME_AW(WNetUseConnection)
166DWORD WINAPI WNetSetConnectionA(LPCSTR,DWORD,LPVOID);
167DWORD WINAPI WNetSetConnectionW(LPCWSTR,DWORD,LPVOID);
168#define WNetSetConnection WINELIB_NAME_AW(WNetSetConnection)
169
170/*
171 * Network connection dialogs
172 */
173
174typedef struct {
175 DWORD cbStructure; /* size of this structure in bytes */
176 HWND hwndOwner; /* owner window for the dialog */
177 LPNETRESOURCEA lpConnRes;/* Requested Resource info */
178 DWORD dwFlags; /* flags (see below) */
179 DWORD dwDevNum; /* number of devices connected to */
180} CONNECTDLGSTRUCTA, *LPCONNECTDLGSTRUCTA;
181typedef struct {
182 DWORD cbStructure; /* size of this structure in bytes */
183 HWND hwndOwner; /* owner window for the dialog */
184 LPNETRESOURCEW lpConnRes;/* Requested Resource info */
185 DWORD dwFlags; /* flags (see below) */
186 DWORD dwDevNum; /* number of devices connected to */
187} CONNECTDLGSTRUCTW, *LPCONNECTDLGSTRUCTW;
188
189DECL_WINELIB_TYPE_AW(CONNECTDLGSTRUCT)
190DECL_WINELIB_TYPE_AW(LPCONNECTDLGSTRUCT)
191
192#define CONNDLG_RO_PATH 0x00000001 /* Resource path should be read-only */
193#define CONNDLG_CONN_POINT 0x00000002 /* Netware -style movable connection point enabled */
194#define CONNDLG_USE_MRU 0x00000004 /* Use MRU combobox */
195#define CONNDLG_HIDE_BOX 0x00000008 /* Hide persistent connect checkbox */
196#define CONNDLG_PERSIST 0x00000010 /* Force persistent connection */
197#define CONNDLG_NOT_PERSIST 0x00000020 /* Force connection NOT persistent */
198
199typedef struct {
200 DWORD cbStructure; /* size of this structure in bytes */
201 HWND hwndOwner; /* owner window for the dialog */
202 LPSTR lpLocalName; /* local device name */
203 LPSTR lpRemoteName; /* network resource name */
204 DWORD dwFlags; /* flags */
205} DISCDLGSTRUCTA, *LPDISCDLGSTRUCTA;
206typedef struct {
207 DWORD cbStructure; /* size of this structure in bytes */
208 HWND hwndOwner; /* owner window for the dialog */
209 LPWSTR lpLocalName; /* local device name */
210 LPWSTR lpRemoteName; /* network resource name */
211 DWORD dwFlags; /* flags */
212} DISCDLGSTRUCTW, *LPDISCDLGSTRUCTW;
213
214DECL_WINELIB_TYPE_AW(DISCDLGSTRUCT)
215DECL_WINELIB_TYPE_AW(LPDISCDLGSTRUCT)
216
217#define DISC_UPDATE_PROFILE 0x00000001
218#define DISC_NO_FORCE 0x00000040
219
220DWORD WINAPI WNetConnectionDialog(HWND,DWORD);
221DWORD WINAPI WNetDisconnectDialog(HWND,DWORD);
222DWORD WINAPI WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
223DWORD WINAPI WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
224#define WNetConnectionDialog1 WINELIB_NAME_AW(WNetConnectionDialog1)
225DWORD WINAPI WNetDisconnectDialog1A(LPDISCDLGSTRUCTA);
226DWORD WINAPI WNetDisconnectDialog1W(LPDISCDLGSTRUCTW);
227#define WNetDisconnectDialog1 WINELIB_NAME_AW(WNetDisconnectDialog1)
228
229/*
230 * Network browsing
231 */
232
233DWORD WINAPI WNetOpenEnumA(DWORD,DWORD,DWORD,LPNETRESOURCEA,LPHANDLE);
234DWORD WINAPI WNetOpenEnumW(DWORD,DWORD,DWORD,LPNETRESOURCEW,LPHANDLE);
235#define WNetOpenEnum WINELIB_NAME_AW(WNetOpenEnum)
236DWORD WINAPI WNetEnumResourceA(HANDLE,LPDWORD,LPVOID,LPDWORD);
237DWORD WINAPI WNetEnumResourceW(HANDLE,LPDWORD,LPVOID,LPDWORD);
238#define WNetEnumResource WINELIB_NAME_AW(WNetEnumResource)
239DWORD WINAPI WNetGetResourceInformationA(LPNETRESOURCEA,LPVOID,LPDWORD,LPSTR*);
240DWORD WINAPI WNetGetResourceInformationW(LPNETRESOURCEW,LPVOID,LPDWORD,LPWSTR*);
241#define WNetGetResourceInformation WINELIB_NAME_AW(WNetGetResourceInformation)
242DWORD WINAPI WNetGetResourceParentA(LPNETRESOURCEA,LPVOID,LPDWORD);
243DWORD WINAPI WNetGetResourceParentW(LPNETRESOURCEW,LPVOID,LPDWORD);
244#define WNetGetResourceParent WINELIB_NAME_AW(WNetGetResourceParent)
245DWORD WINAPI WNetCloseEnum(HANDLE);
246
247/*
248 * Universal naming
249 */
250
251#define UNIVERSAL_NAME_INFO_LEVEL 0x00000001
252#define REMOTE_NAME_INFO_LEVEL 0x00000002
253
254typedef struct {
255 LPSTR lpUniversalName;
256} UNIVERSAL_NAME_INFOA, *LPUNIVERSAL_NAME_INFOA;
257typedef struct {
258 LPWSTR lpUniversalName;
259} UNIVERSAL_NAME_INFOW, *LPUNIVERSAL_NAME_INFOW;
260
261DECL_WINELIB_TYPE_AW(UNIVERSAL_NAME_INFO)
262DECL_WINELIB_TYPE_AW(LPUNIVERSAL_NAME_INFO)
263
264typedef struct {
265 LPSTR lpUniversalName;
266 LPSTR lpConnectionName;
267 LPSTR lpRemainingPath;
268}REMOTE_NAME_INFOA, *LPREMOTE_NAME_INFOA;
269typedef struct {
270 LPWSTR lpUniversalName;
271 LPWSTR lpConnectionName;
272 LPWSTR lpRemainingPath;
273}REMOTE_NAME_INFOW, *LPREMOTE_NAME_INFOW;
274
275DECL_WINELIB_TYPE_AW(REMOTE_NAME_INFO)
276DECL_WINELIB_TYPE_AW(LPREMOTE_NAME_INFO)
277
278DWORD WINAPI WNetGetUniversalNameA(LPCSTR,DWORD,LPVOID,LPDWORD);
279DWORD WINAPI WNetGetUniversalNameW(LPCWSTR,DWORD,LPVOID,LPDWORD);
280#define WNetGetUniversalName WINELIB_NAME_AW(WNetGetUniversalName)
281
282/*
283 * Other
284 */
285
286DWORD WINAPI WNetGetUserA(LPCSTR,LPSTR,LPDWORD);
287DWORD WINAPI WNetGetUserW(LPCWSTR,LPWSTR,LPDWORD);
288#define WNetGetUser WINELIB_NAME_AW(WNetGetUser)
289
290#define WNFMT_MULTILINE 0x01
291#define WNFMT_ABBREVIATED 0x02
292#define WNFMT_INENUM 0x10
293#define WNFMT_CONNECTION 0x20
294
295DWORD WINAPI WNetGetProviderNameA(DWORD,LPSTR,LPDWORD);
296DWORD WINAPI WNetGetProviderNameW(DWORD,LPWSTR,LPDWORD);
297#define WNetGetProviderName WINELIB_NAME_AW(WNetGetProviderName)
298
299typedef struct {
300 DWORD cbStructure;
301 DWORD dwProviderVersion;
302 DWORD dwStatus;
303 DWORD dwCharacteristics;
304 DWORD dwHandle;
305 WORD wNetType;
306 DWORD dwPrinters;
307 DWORD dwDrives;
308} NETINFOSTRUCT, *LPNETINFOSTRUCT;
309
310#define NETINFO_DLL16 0x00000001
311#define NETINFO_DISKRED 0x00000004
312#define NETINFO_PRINTERRED 0x00000008
313
314DWORD WINAPI WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
315DWORD WINAPI WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
316#define WNetGetNetworkInformation WINELIB_NAME_AW(WNetGetNetworkInformation)
317
318
319/*
320 * Status codes
321 */
322
323DWORD WINAPI WNetGetLastErrorA(LPDWORD,LPSTR,DWORD,LPSTR,DWORD);
324DWORD WINAPI WNetGetLastErrorW(LPDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
325#define WNetGetLastError WINELIB_NAME_AW(WNetGetLastError)
326
327#define WN_SUCCESS NO_ERROR
328#define WN_NO_ERROR NO_ERROR
329#define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
330#define WN_CANCEL ERROR_CANCELLED
331#define WN_RETRY ERROR_RETRY
332#define WN_NET_ERROR ERROR_UNEXP_NET_ERR
333#define WN_MORE_DATA ERROR_MORE_DATA
334#define WN_BAD_POINTER ERROR_INVALID_ADDRESS
335#define WN_BAD_VALUE ERROR_INVALID_PARAMETER
336#define WN_BAD_USER ERROR_BAD_USERNAME
337#define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
338#define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
339#define WN_FUNCTION_BUSY ERROR_BUSY
340#define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
341#define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
342#define WN_NO_NETWORK ERROR_NO_NETWORK
343#define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
344#define WN_BAD_LEVEL ERROR_INVALID_LEVEL
345#define WN_BAD_HANDLE ERROR_INVALID_HANDLE
346#define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
347#define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
348
349#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
350#define WN_OPEN_FILES ERROR_OPEN_FILES
351#define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
352#define WN_BAD_NETNAME ERROR_BAD_NET_NAME
353#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
354#define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
355#define WN_DEVICE_ERROR ERROR_GEN_FAILURE
356#define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
357#define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
358#define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
359#define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
360#define WN_BAD_PROFILE ERROR_BAD_PROFILE
361#define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
362#define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
363
364#define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
365#define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
366
367#define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
368#define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
369#define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
370
371
372/*
373 * Multinet (for Shell)
374 */
375
376typedef struct {
377 DWORD cbStructure;
378 DWORD dwFlags;
379 DWORD dwSpeed;
380 DWORD dwDelay;
381 DWORD dwOptDataSize;
382} NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
383
384#define WNCON_FORNETCARD 0x00000001
385#define WNCON_NOTROUTED 0x00000002
386#define WNCON_SLOWLINK 0x00000004
387#define WNCON_DYNAMIC 0x00000008
388
389DWORD WINAPI MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
390DWORD WINAPI MultinetGetConnectionPerformanceW(LPNETRESOURCEW,LPNETCONNECTINFOSTRUCT);
391#define MultinetGetConnectionPerformance WINELIB_NAME_AW(MultinetGetConnectionPerformance)
392DWORD WINAPI MultinetGetErrorTextA(DWORD,DWORD,DWORD);
393DWORD WINAPI MultinetGetErrorTextW(DWORD,DWORD,DWORD);
394#define MultinetGetErrorText WINELIB_NAME_AW(MultinetGetErrorText)
395
396/*
397 * Password cache
398 */
399
400/* WNetEnumCachedPasswords */
401typedef struct tagPASSWORD_CACHE_ENTRY
402{
403 WORD cbEntry;
404 WORD cbResource;
405 WORD cbPassword;
406 BYTE iEntry;
407 BYTE nType;
408 BYTE abResource[1];
409} PASSWORD_CACHE_ENTRY;
410
411typedef BOOL (CALLBACK *ENUMPASSWORDPROC)(PASSWORD_CACHE_ENTRY *, DWORD);
412UINT WINAPI WNetEnumCachedPasswords( LPSTR, WORD, BYTE, ENUMPASSWORDPROC, DWORD);
413DWORD WINAPI WNetGetCachedPassword( LPSTR, WORD, LPSTR, LPWORD, BYTE );
414DWORD WINAPI WNetCachePassword( LPSTR, WORD, LPSTR, WORD, BYTE, WORD );
415
416#ifdef __cplusplus
417}
418#endif
419
420#endif /* _WINNETWK_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette