xref: /reactos/sdk/include/psdk/winnetwk.h (revision c2c66aff)
1 #ifndef _WINNETWK_
2 #define _WINNETWK_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #ifdef _MSC_VER
9 #pragma warning(push)
10 #pragma warning(disable:4820)
11 #endif
12 
13 #define WNNC_NET_MSNET      0x00010000
14 #define WNNC_NET_LANMAN     0x00020000
15 #define WNNC_NET_NETWARE    0x00030000
16 #define WNNC_NET_VINES      0x00040000
17 #define WNNC_NET_10NET      0x00050000
18 #define WNNC_NET_LOCUS      0x00060000
19 #define WNNC_NET_SUN_PC_NFS 0x00070000
20 #define WNNC_NET_LANSTEP    0x00080000
21 #define WNNC_NET_9TILES     0x00090000
22 #define WNNC_NET_LANTASTIC  0x000A0000
23 #define WNNC_NET_AS400      0x000B0000
24 #define WNNC_NET_FTP_NFS    0x000C0000
25 #define WNNC_NET_PATHWORKS  0x000D0000
26 #define WNNC_NET_LIFENET    0x000E0000
27 #define WNNC_NET_POWERLAN   0x000F0000
28 #define WNNC_NET_BWNFS      0x00100000
29 #define WNNC_NET_COGENT     0x00110000
30 #define WNNC_NET_FARALLON	0x00120000
31 #define WNNC_NET_APPLETALK	0x00130000
32 #define WNNC_NET_INTERGRAPH	0x00140000
33 #define WNNC_NET_SYMFONET   0x00150000
34 #define WNNC_NET_CLEARCASE  0x00160000
35 #define WNNC_NET_FRONTIER   0x00170000
36 #define WNNC_NET_BMC        0x00180000
37 #define WNNC_NET_DCE        0x00190000
38 #define WNNC_NET_AVID       0x001A0000
39 #define WNNC_NET_DOCUSPACE  0x001B0000
40 #define WNNC_NET_MANGOSOFT  0x001C0000
41 #define WNNC_NET_SERNET     0x001D0000
42 #define WNNC_NET_DECORB     0x00200000
43 #define WNNC_NET_PROTSTOR   0x00210000
44 #define WNNC_NET_FJ_REDIR   0x00220000
45 #define WNNC_NET_DISTINCT   0x00230000
46 #define WNNC_NET_TWINS      0x00240000
47 #define WNNC_NET_RDR2SAMPLE 0x00250000
48 #define WNNC_NET_CSC        0x00260000
49 #define WNNC_NET_3IN1       0x00270000
50 #define WNNC_NET_EXTENDNET  0x00290000
51 #define WNNC_NET_OBJECT_DIRE 0x00300000
52 #define WNNC_NET_MASFAX     0x00310000
53 #define WNNC_NET_HOB_NFS    0x00320000
54 #define WNNC_NET_SHIVA      0x00330000
55 #define WNNC_NET_IBMAL      0x00340000
56 #define WNNC_CRED_MANAGER   0xFFFF0000
57 
58 #define RESOURCE_CONNECTED 1
59 #define RESOURCE_GLOBALNET 2
60 #define RESOURCE_REMEMBERED 3
61 #define RESOURCE_RECENT 4
62 #define RESOURCE_CONTEXT 5
63 #define RESOURCETYPE_ANY 0
64 #define RESOURCETYPE_DISK 1
65 #define RESOURCETYPE_PRINT 2
66 #define RESOURCETYPE_RESERVED 8
67 #define RESOURCETYPE_UNKNOWN        0xFFFFFFFF
68 #define RESOURCEUSAGE_CONNECTABLE   0x00000001
69 #define RESOURCEUSAGE_CONTAINER     0x00000002
70 #define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
71 #define RESOURCEUSAGE_SIBLING       0x00000008
72 #define RESOURCEUSAGE_ATTACHED      0x00000010
73 #define RESOURCEUSAGE_ALL           (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
74 #define RESOURCEUSAGE_RESERVED      0x80000000
75 #define RESOURCEDISPLAYTYPE_GENERIC 0
76 #define RESOURCEDISPLAYTYPE_DOMAIN 1
77 #define RESOURCEDISPLAYTYPE_SERVER 2
78 #define RESOURCEDISPLAYTYPE_SHARE 3
79 #define RESOURCEDISPLAYTYPE_FILE 4
80 #define RESOURCEDISPLAYTYPE_GROUP 5
81 #define RESOURCEDISPLAYTYPE_NETWORK 6
82 #define RESOURCEDISPLAYTYPE_ROOT 7
83 #define RESOURCEDISPLAYTYPE_SHAREADMIN 8
84 #define RESOURCEDISPLAYTYPE_DIRECTORY 9
85 #define RESOURCEDISPLAYTYPE_TREE 10
86 #define NETPROPERTY_PERSISTENT 1
87 #define CONNECT_UPDATE_PROFILE 1
88 #define CONNECT_UPDATE_RECENT 2
89 #define CONNECT_TEMPORARY 4
90 #define CONNECT_INTERACTIVE 8
91 #define CONNECT_PROMPT 16
92 #define CONNECT_NEED_DRIVE 32
93 #define CONNECT_REFCOUNT 64
94 #define CONNECT_REDIRECT 128
95 #define CONNECT_LOCALDRIVE 256
96 #define CONNECT_CURRENT_MEDIA 512
97 #define CONNECT_COMMANDLINE 2048
98 #define CONNECT_CMD_SAVECRED 4096
99 #define CONNDLG_RO_PATH 1
100 #define CONNDLG_CONN_POINT 2
101 #define CONNDLG_USE_MRU 4
102 #define CONNDLG_HIDE_BOX 8
103 #define CONNDLG_PERSIST 16
104 #define CONNDLG_NOT_PERSIST 32
105 #define DISC_UPDATE_PROFILE 1
106 #define DISC_NO_FORCE 64
107 #define WNFMT_MULTILINE 1
108 #define WNFMT_ABBREVIATED 2
109 #define WNFMT_INENUM 16
110 #define WNFMT_CONNECTION 32
111 #define WN_SUCCESS NO_ERROR
112 #define WN_NO_ERROR NO_ERROR
113 #define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
114 #define WN_CANCEL ERROR_CANCELLED
115 #define WN_RETRY ERROR_RETRY
116 #define WN_NET_ERROR ERROR_UNEXP_NET_ERR
117 #define WN_MORE_DATA ERROR_MORE_DATA
118 #define WN_BAD_POINTER ERROR_INVALID_ADDRESS
119 #define WN_BAD_VALUE ERROR_INVALID_PARAMETER
120 #define WN_BAD_USER ERROR_BAD_USERNAME
121 #define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
122 #define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
123 #define WN_FUNCTION_BUSY ERROR_BUSY
124 #define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
125 #define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
126 #define WN_NO_NETWORK ERROR_NO_NETWORK
127 #define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
128 #define WN_BAD_LEVEL ERROR_INVALID_LEVEL
129 #define WN_BAD_HANDLE ERROR_INVALID_HANDLE
130 #define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
131 #define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
132 #define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
133 #define WN_OPEN_FILES ERROR_OPEN_FILES
134 #define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
135 #define WN_BAD_NETNAME ERROR_BAD_NET_NAME
136 #define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
137 #define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
138 #define WN_DEVICE_ERROR ERROR_GEN_FAILURE
139 #define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
140 #define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
141 #define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
142 #define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
143 #define WN_BAD_PROFILE ERROR_BAD_PROFILE
144 #define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
145 #define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
146 #define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
147 #define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
148 #define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
149 #define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
150 #define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
151 #define UNIVERSAL_NAME_INFO_LEVEL 1
152 #define REMOTE_NAME_INFO_LEVEL 2
153 #define NETINFO_DLL16 1
154 #define NETINFO_DISKRED 4
155 #define NETINFO_PRINTERRED 8
156 #define RP_LOGON 1
157 #define RP_INIFILE 2
158 #define PP_DISPLAYERRORS 1
159 #define WNCON_FORNETCARD 1
160 #define WNCON_NOTROUTED 2
161 #define WNCON_SLOWLINK 4
162 #define WNCON_DYNAMIC 8
163 
164 #ifndef RC_INVOKED
165 
166 typedef struct _NETRESOURCEA {
167 	DWORD dwScope;
168 	DWORD dwType;
169 	DWORD dwDisplayType;
170 	DWORD dwUsage;
171 	LPSTR lpLocalName;
172 	LPSTR lpRemoteName;
173 	LPSTR lpComment ;
174 	LPSTR lpProvider;
175 }NETRESOURCEA,*LPNETRESOURCEA;
176 typedef struct _NETRESOURCEW {
177 	DWORD dwScope;
178 	DWORD dwType;
179 	DWORD dwDisplayType;
180 	DWORD dwUsage;
181 	LPWSTR lpLocalName;
182 	LPWSTR lpRemoteName;
183 	LPWSTR lpComment ;
184 	LPWSTR lpProvider;
185 }NETRESOURCEW,*LPNETRESOURCEW;
186 typedef struct _CONNECTDLGSTRUCTA{
187 	DWORD cbStructure;
188 	HWND hwndOwner;
189 	LPNETRESOURCEA lpConnRes;
190 	DWORD dwFlags;
191 	DWORD dwDevNum;
192 } CONNECTDLGSTRUCTA,*LPCONNECTDLGSTRUCTA;
193 typedef struct _CONNECTDLGSTRUCTW{
194 	DWORD cbStructure;
195 	HWND hwndOwner;
196 	LPNETRESOURCEW lpConnRes;
197 	DWORD dwFlags;
198 	DWORD dwDevNum;
199 } CONNECTDLGSTRUCTW,*LPCONNECTDLGSTRUCTW;
200 typedef struct _DISCDLGSTRUCTA{
201 	DWORD cbStructure;
202 	HWND hwndOwner;
203 	LPSTR lpLocalName;
204 	LPSTR lpRemoteName;
205 	DWORD dwFlags;
206 } DISCDLGSTRUCTA,*LPDISCDLGSTRUCTA;
207 typedef struct _DISCDLGSTRUCTW{
208 	DWORD cbStructure;
209 	HWND hwndOwner;
210 	LPWSTR lpLocalName;
211 	LPWSTR lpRemoteName;
212 	DWORD dwFlags;
213 } DISCDLGSTRUCTW,*LPDISCDLGSTRUCTW;
214 typedef struct _UNIVERSAL_NAME_INFOA { LPSTR lpUniversalName; }UNIVERSAL_NAME_INFOA,*LPUNIVERSAL_NAME_INFOA;
215 typedef struct _UNIVERSAL_NAME_INFOW { LPWSTR lpUniversalName; }UNIVERSAL_NAME_INFOW,*LPUNIVERSAL_NAME_INFOW;
216 typedef struct _REMOTE_NAME_INFOA {
217 	LPSTR lpUniversalName;
218 	LPSTR lpConnectionName;
219 	LPSTR lpRemainingPath;
220 }REMOTE_NAME_INFOA,*LPREMOTE_NAME_INFOA;
221 typedef struct _REMOTE_NAME_INFOW {
222 	LPWSTR lpUniversalName;
223 	LPWSTR lpConnectionName;
224 	LPWSTR lpRemainingPath;
225 }REMOTE_NAME_INFOW,*LPREMOTE_NAME_INFOW;
226 typedef struct _NETINFOSTRUCT{
227 	DWORD cbStructure;
228 	DWORD dwProviderVersion;
229 	DWORD dwStatus;
230 	DWORD dwCharacteristics;
231 	ULONG_PTR dwHandle;
232 	WORD wNetType;
233 	DWORD dwPrinters;
234 	DWORD dwDrives;
235 } NETINFOSTRUCT,*LPNETINFOSTRUCT;
236 typedef UINT(PASCAL *PFNGETPROFILEPATHA)(LPCSTR,LPSTR,UINT);
237 typedef UINT(PASCAL *PFNGETPROFILEPATHW)(LPCWSTR,LPWSTR,UINT);
238 typedef UINT(PASCAL *PFNRECONCILEPROFILEA)(LPCSTR,LPCSTR,DWORD);
239 typedef UINT(PASCAL *PFNRECONCILEPROFILEW)(LPCWSTR,LPCWSTR,DWORD);
240 typedef BOOL(PASCAL *PFNPROCESSPOLICIESA)(HWND,LPCSTR,LPCSTR,LPCSTR,DWORD);
241 typedef BOOL(PASCAL *PFNPROCESSPOLICIESW)(HWND,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
242 typedef struct _NETCONNECTINFOSTRUCT{
243 	DWORD cbStructure;
244 	DWORD dwFlags;
245 	DWORD dwSpeed;
246 	DWORD dwDelay;
247 	DWORD dwOptDataSize;
248 } NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
249 
250 _Check_return_
251 DWORD
252 APIENTRY
253 WNetAddConnectionA(
254   _In_ LPCSTR,
255   _In_opt_ LPCSTR,
256   _In_opt_ LPCSTR);
257 
258 _Check_return_
259 DWORD
260 APIENTRY
261 WNetAddConnectionW(
262   _In_ LPCWSTR,
263   _In_opt_ LPCWSTR,
264   _In_opt_ LPCWSTR);
265 
266 _Check_return_
267 DWORD
268 APIENTRY
269 WNetAddConnection2A(
270   _In_ LPNETRESOURCEA,
271   _In_opt_ LPCSTR,
272   _In_opt_ LPCSTR,
273   _In_ DWORD);
274 
275 _Check_return_
276 DWORD
277 APIENTRY
278 WNetAddConnection2W(
279   _In_ LPNETRESOURCEW,
280   _In_opt_ LPCWSTR,
281   _In_opt_ LPCWSTR,
282   _In_ DWORD);
283 
284 _Check_return_
285 DWORD
286 APIENTRY
287 WNetAddConnection3A(
288   _In_opt_ HWND,
289   _In_ LPNETRESOURCEA,
290   _In_opt_ LPCSTR,
291   _In_opt_ LPCSTR,
292   _In_ DWORD);
293 
294 _Check_return_
295 DWORD
296 APIENTRY
297 WNetAddConnection3W(
298   _In_opt_ HWND,
299   _In_ LPNETRESOURCEW,
300   _In_opt_ LPCWSTR,
301   _In_opt_ LPCWSTR,
302   _In_ DWORD);
303 
304 _Check_return_ DWORD APIENTRY WNetCancelConnectionA(_In_ LPCSTR, _In_ BOOL);
305 _Check_return_ DWORD APIENTRY WNetCancelConnectionW(_In_ LPCWSTR, _In_ BOOL);
306 
307 _Check_return_
308 DWORD
309 APIENTRY
310 WNetCancelConnection2A(
311   _In_ LPCSTR,
312   _In_ DWORD,
313   _In_ BOOL);
314 
315 _Check_return_
316 DWORD
317 APIENTRY
318 WNetCancelConnection2W(
319   _In_ LPCWSTR,
320   _In_ DWORD,
321   _In_ BOOL);
322 
323 _Check_return_
324 DWORD
325 APIENTRY
326 WNetGetConnectionA(
327   _In_ LPCSTR lpLocalName,
328   _Out_writes_opt_(*lpnLength) LPSTR lpRemoteName,
329   _Inout_ LPDWORD lpnLength);
330 
331 _Check_return_
332 DWORD
333 APIENTRY
334 WNetGetConnectionW(
335   _In_ LPCWSTR lpLocalName,
336   _Out_writes_opt_(*lpnLength) LPWSTR lpRemoteName,
337   _Inout_ LPDWORD lpnLength);
338 
339 _Check_return_
340 DWORD
341 APIENTRY
342 WNetUseConnectionA(
343   _In_opt_ HWND hwndOwner,
344   _In_ LPNETRESOURCEA lpNetResource,
345   _In_opt_ LPCSTR lpPassword,
346   _In_opt_ LPCSTR lpUserId,
347   _In_ DWORD dwFlags,
348   _Out_writes_opt_(*lpBufferSize) LPSTR lpAccessName,
349   _Inout_opt_ LPDWORD lpBufferSize,
350   _Out_opt_ LPDWORD lpResult);
351 
352 _Check_return_
353 DWORD
354 APIENTRY
355 WNetUseConnectionW(
356   _In_opt_ HWND hwndOwner,
357   _In_ LPNETRESOURCEW lpNetResource,
358   _In_opt_ LPCWSTR lpPassword,
359   _In_opt_ LPCWSTR lpUserId,
360   _In_ DWORD dwFlags,
361   _Out_writes_opt_(*lpBufferSize) LPWSTR lpAccessName,
362   _Inout_opt_ LPDWORD lpBufferSize,
363   _Out_opt_ LPDWORD lpResult);
364 
365 DWORD APIENTRY WNetSetConnectionA(LPCSTR,DWORD,PVOID);
366 DWORD APIENTRY WNetSetConnectionW(LPCWSTR,DWORD,PVOID);
367 _Check_return_ DWORD APIENTRY WNetConnectionDialog(_In_ HWND, _In_ DWORD);
368 _Check_return_ DWORD APIENTRY WNetDisconnectDialog(_In_opt_ HWND, _In_ DWORD);
369 
370 _Check_return_
371 DWORD
372 APIENTRY
373 WNetConnectionDialog1A(
374   _Inout_ LPCONNECTDLGSTRUCTA);
375 
376 _Check_return_
377 DWORD
378 APIENTRY
379 WNetConnectionDialog1W(
380   _Inout_ LPCONNECTDLGSTRUCTW);
381 
382 _Check_return_ DWORD APIENTRY WNetDisconnectDialog1A(_In_ LPDISCDLGSTRUCTA);
383 _Check_return_ DWORD APIENTRY WNetDisconnectDialog1W(_In_ LPDISCDLGSTRUCTW);
384 
385 _Check_return_
386 DWORD
387 APIENTRY
388 WNetOpenEnumA(
389   _In_ DWORD,
390   _In_ DWORD,
391   _In_ DWORD,
392   _In_opt_ LPNETRESOURCEA,
393   _Out_ LPHANDLE);
394 
395 _Check_return_
396 DWORD
397 APIENTRY
398 WNetOpenEnumW(
399   _In_ DWORD,
400   _In_ DWORD,
401   _In_ DWORD,
402   _In_opt_ LPNETRESOURCEW,
403   _Out_ LPHANDLE);
404 
405 _Check_return_
406 DWORD
407 APIENTRY
408 WNetEnumResourceA(
409   _In_ HANDLE hEnum,
410   _Inout_ LPDWORD lpcCount,
411   _Out_writes_bytes_(*lpBufferSize) LPVOID lpBuffer,
412   _Inout_ LPDWORD lpBufferSize);
413 
414 _Check_return_
415 DWORD
416 APIENTRY
417 WNetEnumResourceW(
418   _In_ HANDLE hEnum,
419   _Inout_ LPDWORD lpcCount,
420   _Out_writes_bytes_(*lpBufferSize) LPVOID lpBuffer,
421   _Inout_ LPDWORD lpBufferSize);
422 
423 _Check_return_ DWORD APIENTRY WNetCloseEnum(_In_ HANDLE);
424 
425 _Check_return_
426 DWORD
427 APIENTRY
428 WNetGetUniversalNameA(
429   _In_ LPCSTR lpLocalPath,
430   _In_ DWORD dwInfoLevel,
431   _Out_writes_bytes_(*lpBufferSize) LPVOID lpBuffer,
432   _Inout_ LPDWORD lpBufferSize);
433 
434 _Check_return_
435 DWORD
436 APIENTRY
437 WNetGetUniversalNameW(
438   _In_ LPCWSTR lpLocalPath,
439   _In_ DWORD dwInfoLevel,
440   _Out_writes_bytes_(*lpBufferSize) LPVOID lpBuffer,
441   _Inout_ LPDWORD lpBufferSize);
442 
443 _Check_return_
444 DWORD
445 APIENTRY
446 WNetGetUserA(
447   _In_opt_ LPCSTR lpName,
448   _Out_writes_(*lpnLength) LPSTR lpUserName,
449   _Inout_ LPDWORD lpnLength);
450 
451 _Check_return_
452 DWORD
453 APIENTRY
454 WNetGetUserW(
455   _In_opt_ LPCWSTR lpName,
456   _Out_writes_(*lpnLength) LPWSTR lpUserName,
457   _Inout_ LPDWORD lpnLength);
458 
459 _Check_return_
460 DWORD
461 APIENTRY
462 WNetGetProviderNameA(
463   _In_ DWORD dwNetType,
464   _Out_writes_(*lpBufferSize) LPSTR lpProviderName,
465   _Inout_ LPDWORD lpBufferSize);
466 
467 _Check_return_
468 DWORD
469 APIENTRY
470 WNetGetProviderNameW(
471   _In_ DWORD dwNetType,
472   _Out_writes_(*lpBufferSize) LPWSTR lpProviderName,
473   _Inout_ LPDWORD lpBufferSize);
474 
475 _Check_return_
476 DWORD
477 APIENTRY
478 WNetGetNetworkInformationA(
479   _In_ LPCSTR,
480   _Out_ LPNETINFOSTRUCT);
481 
482 _Check_return_
483 DWORD
484 APIENTRY
485 WNetGetNetworkInformationW(
486   _In_ LPCWSTR,
487   _Out_ LPNETINFOSTRUCT);
488 
489 _Check_return_
490 DWORD
491 APIENTRY
492 WNetGetResourceInformationA(
493   _In_ LPNETRESOURCEA lpNetResource,
494   _Out_writes_bytes_(*lpcbBuffer) LPVOID lpBuffer,
495   _Inout_ LPDWORD lpcbBuffer,
496   _Outptr_ LPSTR *lplpSystem);
497 
498 _Check_return_
499 DWORD
500 APIENTRY
501 WNetGetResourceInformationW(
502   _In_ LPNETRESOURCEW lpNetResource,
503   _Out_writes_bytes_(*lpcbBuffer) LPVOID lpBuffer,
504   _Inout_ LPDWORD lpcbBuffer,
505   _Outptr_ LPWSTR *lplpSystem);
506 
507 _Check_return_
508 DWORD
509 APIENTRY
510 WNetGetLastErrorA(
511   _Out_ LPDWORD lpError,
512   _Out_writes_(nErrorBufSize) LPSTR lpErrorBuf,
513   _In_ DWORD nErrorBufSize,
514   _Out_writes_(nNameBufSize) LPSTR lpNameBuf,
515   _In_ DWORD nNameBufSize);
516 
517 _Check_return_
518 DWORD
519 APIENTRY
520 WNetGetLastErrorW(
521   _Out_ LPDWORD lpError,
522   _Out_writes_(nErrorBufSize) LPWSTR lpErrorBuf,
523   _In_ DWORD nErrorBufSize,
524   _Out_writes_(nNameBufSize) LPWSTR lpNameBuf,
525   _In_ DWORD nNameBufSize);
526 
527 DWORD WINAPI WNetRestoreConnectionA(HWND,LPCSTR);
528 DWORD WINAPI WNetRestoreConnectionW(HWND,LPCWSTR);
529 
530 _Check_return_
531 DWORD
532 APIENTRY
533 MultinetGetConnectionPerformanceA(
534   _In_ LPNETRESOURCEA,
535   _Out_ LPNETCONNECTINFOSTRUCT);
536 
537 _Check_return_
538 DWORD
539 APIENTRY
540 MultinetGetConnectionPerformanceW(
541   _In_ LPNETRESOURCEW,
542   _Out_ LPNETCONNECTINFOSTRUCT);
543 
544 #ifdef _WINE
545 typedef struct tagPASSWORD_CACHE_ENTRY
546 {
547 	WORD cbEntry;
548 	WORD cbResource;
549 	WORD cbPassword;
550 	BYTE iEntry;
551 	BYTE nType;
552 	BYTE abResource[1];
553 } PASSWORD_CACHE_ENTRY;
554 
555 typedef BOOL (CALLBACK *ENUMPASSWORDPROC)(PASSWORD_CACHE_ENTRY *, DWORD);
556 DWORD WINAPI WNetCachePassword( LPSTR, WORD, LPSTR, WORD, BYTE, WORD );
557 UINT WINAPI WNetEnumCachedPasswords( LPSTR, WORD, BYTE, ENUMPASSWORDPROC, DWORD);
558 DWORD WINAPI WNetGetCachedPassword( LPSTR, WORD, LPSTR, LPWORD, BYTE );
559 #endif
560 
561 #ifdef UNICODE
562 #define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
563 #define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
564 #define PFNGETPROFILEPATH PFNGETPROFILEPATHW
565 typedef NETRESOURCEW NETRESOURCE,*LPNETRESOURCE;
566 typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
567 typedef DISCDLGSTRUCTW DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
568 typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
569 typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
570 #define WNetEnumResource WNetEnumResourceW
571 #define WNetOpenEnum WNetOpenEnumW
572 #define WNetGetResourceInformation WNetGetResourceInformationW
573 #define WNetGetUniversalName WNetGetUniversalNameW
574 #define WNetSetConnection WNetSetConnectionW
575 #define WNetUseConnection WNetUseConnectionW
576 #define WNetGetConnection WNetGetConnectionW
577 #define WNetCancelConnection2 WNetCancelConnection2W
578 #define WNetCancelConnection WNetCancelConnectionW
579 #define WNetAddConnection3 WNetAddConnection3W
580 #define WNetAddConnection2 WNetAddConnection2W
581 #define WNetAddConnection WNetAddConnectionW
582 #define WNetConnectionDialog1 WNetConnectionDialog1W
583 #define WNetDisconnectDialog1 WNetDisconnectDialog1W
584 #define WNetGetNetworkInformation WNetGetNetworkInformationW
585 #define WNetGetProviderName WNetGetProviderNameW
586 #define WNetGetUser WNetGetUserW
587 #define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
588 #define WNetGetLastError WNetGetLastErrorW
589 #else
590 #define PFNGETPROFILEPATH PFNGETPROFILEPATHA
591 #define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
592 #define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
593 typedef NETRESOURCEA NETRESOURCE,*LPNETRESOURCE;
594 typedef CONNECTDLGSTRUCTA CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
595 typedef DISCDLGSTRUCTA DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
596 typedef UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
597 typedef REMOTE_NAME_INFOA REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
598 #define WNetOpenEnum WNetOpenEnumA
599 #define WNetEnumResource WNetEnumResourceA
600 #define WNetGetResourceInformation WNetGetResourceInformationA
601 #define WNetGetUniversalName WNetGetUniversalNameA
602 #define WNetConnectionDialog1 WNetConnectionDialog1A
603 #define WNetDisconnectDialog1 WNetDisconnectDialog1A
604 #define WNetAddConnection2 WNetAddConnection2A
605 #define WNetAddConnection3 WNetAddConnection3A
606 #define WNetCancelConnection WNetCancelConnectionA
607 #define WNetCancelConnection2 WNetCancelConnection2A
608 #define WNetGetConnection WNetGetConnectionA
609 #define WNetUseConnection WNetUseConnectionA
610 #define WNetSetConnection WNetSetConnectionA
611 #define WNetAddConnection WNetAddConnectionA
612 #define WNetGetUser WNetGetUserA
613 #define WNetGetProviderName WNetGetProviderNameA
614 #define WNetGetNetworkInformation WNetGetNetworkInformationA
615 #define WNetGetLastError WNetGetLastErrorA
616 #define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
617 #endif
618 
619 #endif /* !RC_INVOKED */
620 
621 #ifdef _MSC_VER
622 #pragma warning(pop)
623 #endif
624 
625 #ifdef __cplusplus
626 }
627 #endif
628 
629 #endif /* _WINNETWK_ */
630