Optimized include/*.h: (recursively) include all headers needed by
[wine/testsucceed.git] / misc / network.c
blobde63eaf4899622bef5ed6c3830fcd5122ca89116
1 /*
2 * Network functions
4 * This is the MPR.DLL stuff from Win32, as well as the USER
5 * stuff by the same names in Win 3.x.
7 */
9 #include <ctype.h>
10 #include <sys/types.h>
11 #include <pwd.h>
12 #include <unistd.h>
14 #include "windows.h"
15 #include "winerror.h"
16 #include "drive.h"
17 #include "wnet.h"
18 #include "debug.h"
19 #include "win.h"
20 #include "heap.h"
22 /********************************************************************
23 * WNetAddConnection16 [USER.517] Directs a local device to net
25 * Redirects a local device (either a disk drive or printer port)
26 * to a shared device on a remote server.
28 UINT16 WINAPI WNetAddConnection16(LPCSTR lpNetPath, LPCSTR lpPassWord,
29 LPCSTR lpLocalName)
31 return WNetAddConnection32A(lpNetPath, lpPassWord, lpLocalName);
34 /*********************************************************************
35 * WNetAddConnection32 [MPR.50]
38 UINT32 WINAPI WNetAddConnection32A(LPCSTR NetPath, LPCSTR PassWord,
39 LPCSTR LocalName)
41 FIXME(wnet, "('%s', %p, '%s'): stub\n",
42 NetPath, PassWord, LocalName);
43 return WN_NO_NETWORK;
46 /* [MPR.51] */
48 UINT32 WINAPI WNetAddConnection32W(LPCWSTR NetPath,
49 LPCWSTR PassWord,
50 LPCWSTR LocalName)
52 FIXME(wnet, " stub!\n");
53 SetLastError(WN_NO_NETWORK);
54 return WN_NO_NETWORK;
57 /* ****************************************************************
58 * WNetAddConnection2_32A [MPR.46]
61 UINT32 WINAPI
62 WNetAddConnection2_32A(LPNETRESOURCE32A netresource, /* [in] */
63 LPCSTR password, /* [in] */
64 LPCSTR username, /* [in] */
65 DWORD flags /* [in] */ )
67 FIXME(wnet, "(%p,%s,%s,0x%08lx), stub!\n", netresource,
68 password, username, (unsigned long) flags);
69 SetLastError(WN_NO_NETWORK);
70 return WN_NO_NETWORK;
73 /* ****************************************************************
74 * WNetAddConnection2W [MPR.47]
77 UINT32 WINAPI
78 WNetAddConnection2_32W(LPNETRESOURCE32W netresource, /* [in] */
79 LPCWSTR password, /* [in] */
80 LPCWSTR username, /* [in] */
81 DWORD flags /* [in] */ )
83 FIXME(wnet, ", stub!\n");
84 SetLastError(WN_NO_NETWORK);
85 return WN_NO_NETWORK;
88 /* ****************************************************************
89 * WNetAddConnection3_32A [MPR.48]
92 UINT32 WINAPI WNetAddConnection3_32A(HWND32 owner,
93 LPNETRESOURCE32A netresource,
94 LPCSTR password,
95 LPCSTR username,
96 DWORD flags)
98 TRACE(wnet, "owner = 0x%x\n", owner);
99 return WNetAddConnection2_32A(netresource,
100 password, username, flags);
103 /* ****************************************************************
104 * WNetAddConnection3W [MPR.49]
107 UINT32 WINAPI WNetAddConnection3_32W(HWND32 owner,
108 LPNETRESOURCE32W netresource,
109 LPCWSTR username,
110 LPCWSTR password,
111 DWORD flags)
113 TRACE(wnet,"owner = 0x%x\n", owner);
114 return WNetAddConnection2_32W(netresource, username, password,
115 flags);
118 /*******************************************************************
119 * WNetConnectionDialog1_32A [MPR.59]
121 UINT32 WINAPI WNetConnectionDialog1_32A (LPCONNECTDLGSTRUCT32A lpConnDlgStruct)
122 { FIXME(wnet,"%p stub\n", lpConnDlgStruct);
123 SetLastError(WN_NO_NETWORK);
124 return ERROR_NO_NETWORK;
126 /*******************************************************************
127 * WNetConnectionDialog1_32W [MPR.60]
129 UINT32 WINAPI WNetConnectionDialog1_32W (LPCONNECTDLGSTRUCT32W lpConnDlgStruct)
130 { FIXME(wnet,"%p stub\n", lpConnDlgStruct);
131 SetLastError(WN_NO_NETWORK);
132 return ERROR_NO_NETWORK;
135 /*******************************************************************
136 * WNetConnectionDialog_32 [MPR.61]
138 UINT32 WINAPI WNetConnectionDialog_32(HWND32 owner, DWORD flags )
139 { FIXME(wnet,"owner = 0x%x, flags=0x%lx stub\n", owner,flags);
140 SetLastError(WN_NO_NETWORK);
141 return ERROR_NO_NETWORK;
145 /*******************************************************************
146 * WNetEnumCachedPasswords32 [MPR.61]
148 UINT32 WINAPI WNetEnumCachedPasswords32(LPSTR sometext, DWORD count1,
149 DWORD res_nr, DWORD *enumPasswordProc)
151 return ERROR_NO_NETWORK;
154 /********************************************************************
155 * WNetCancelConnection [USER.518] undirects a local device
157 UINT16 WINAPI WNetCancelConnection(LPCSTR lpName, BOOL16 bForce)
159 FIXME(wnet, "('%s', %04X): stub\n", lpName, bForce);
160 return WN_NO_NETWORK;
164 /**************************************************************************
165 * WNetErrorText16 [USER.499]
167 int WINAPI WNetErrorText(WORD nError,LPSTR lpszText,WORD cbText)
169 FIXME(wnet, "(%x,%p,%x): stub\n",nError,lpszText,cbText);
170 return FALSE;
173 /**************************************************************************
174 * WNetOpenJob16 [USER.501]
176 int WINAPI WNetOpenJob(LPSTR szQueue,LPSTR szJobTitle,WORD nCopies,LPWORD pfh)
178 FIXME(wnet, "('%s','%s',%x,%p): stub\n",
179 szQueue,szJobTitle,nCopies,pfh);
180 return WN_NET_ERROR;
183 /**************************************************************************
184 * WNetCloseJob [USER.502]
186 int WINAPI WNetCloseJob(WORD fh,LPWORD pidJob,LPSTR szQueue)
188 FIXME(wnet, "(%x,%p,'%s'): stub\n",fh,pidJob,szQueue);
189 return WN_NET_ERROR;
192 /**************************************************************************
193 * WNetAbortJob [USER.503]
195 int WINAPI WNetAbortJob(LPSTR szQueue,WORD wJobId)
197 FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
198 return WN_NET_ERROR;
201 /**************************************************************************
202 * WNetHoldJob [USER.504]
204 int WINAPI WNetHoldJob(LPSTR szQueue,WORD wJobId)
206 FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
207 return WN_NET_ERROR;
210 /**************************************************************************
211 * WNetReleaseJob [USER.505]
213 int WINAPI WNetReleaseJob(LPSTR szQueue,WORD wJobId)
215 FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
216 return WN_NET_ERROR;
219 /**************************************************************************
220 * WNetCancelJob [USER.506]
222 int WINAPI WNetCancelJob(LPSTR szQueue,WORD wJobId)
224 FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
225 return WN_NET_ERROR;
228 /**************************************************************************
229 * WNetSetJobCopies [USER.507]
231 int WINAPI WNetSetJobCopies(LPSTR szQueue,WORD wJobId,WORD nCopies)
233 FIXME(wnet, "('%s',%x,%x): stub\n",szQueue,wJobId,nCopies);
234 return WN_NET_ERROR;
237 /**************************************************************************
238 * WNetWatchQueue [USER.508]
240 int WINAPI WNetWatchQueue(HWND16 hWnd,LPSTR szLocal,LPSTR szUser,WORD nQueue)
242 FIXME(wnet, "(%04x,'%s','%s',%x): stub\n",hWnd,szLocal,szUser,nQueue);
243 return WN_NET_ERROR;
246 /**************************************************************************
247 * WNetUnwatchQueue [USER.509]
249 int WINAPI WNetUnwatchQueue(LPSTR szQueue)
251 FIXME(wnet, "('%s'): stub\n", szQueue);
252 return WN_NET_ERROR;
255 /**************************************************************************
256 * WNetLockQueueData [USER.510]
258 int WINAPI WNetLockQueueData(LPSTR szQueue,LPSTR szUser,void *lplpQueueStruct)
260 FIXME(wnet, "('%s','%s',%p): stub\n",szQueue,szUser,lplpQueueStruct);
261 return WN_NET_ERROR;
264 /**************************************************************************
265 * WNetUnlockQueueData [USER.511]
267 int WINAPI WNetUnlockQueueData(LPSTR szQueue)
269 FIXME(wnet, "('%s'): stub\n",szQueue);
270 return WN_NET_ERROR;
274 /********************************************************************
275 * WNetGetConnection16 [USER.512] reverse-resolves a local device
277 * RETURNS
278 * - WN_BAD_LOCALNAME lpLocalName makes no sense
279 * - WN_NOT_CONNECTED drive is a local drive
280 * - WN_MORE_DATA buffer isn't big enough
281 * - WN_SUCCESS success (net path in buffer)
283 int WINAPI WNetGetConnection16(LPCSTR lpLocalName,
284 LPSTR lpRemoteName, UINT16 *cbRemoteName)
286 const char *path;
288 if (lpLocalName[1] == ':')
290 int drive = toupper(lpLocalName[0]) - 'A';
291 switch(DRIVE_GetType(drive))
293 case TYPE_INVALID:
294 return WN_BAD_LOCALNAME;
295 case TYPE_NETWORK:
296 path = DRIVE_GetLabel(drive);
297 if (strlen(path) + 1 > *cbRemoteName)
299 *cbRemoteName = strlen(path) + 1;
300 return WN_MORE_DATA;
302 strcpy( lpRemoteName, path );
303 *cbRemoteName = strlen(lpRemoteName) + 1;
304 return WN_SUCCESS;
305 default:
306 return WN_BAD_LOCALNAME;
309 return WN_BAD_LOCALNAME;
312 /**************************************************************************
313 * WNetGetConnectionA [MPR.70]
315 DWORD WINAPI
316 WNetGetConnection32A(LPCSTR localname,LPSTR remotename,LPDWORD buflen)
318 UINT16 x;
319 DWORD ret = WNetGetConnection16(localname,remotename,&x);
320 *buflen = x;
321 return ret;
324 /**************************************************************************
325 * WNetGetConnectionW [MPR.72]
327 DWORD WINAPI
328 WNetGetConnection32W(LPCWSTR localnameW,LPWSTR remotenameW,LPDWORD buflen)
330 UINT16 x;
331 CHAR buf[200];
332 LPSTR lnA = HEAP_strdupWtoA(GetProcessHeap(),0,localnameW);
333 DWORD ret = WNetGetConnection16(lnA,buf,&x);
335 lstrcpyAtoW(remotenameW,buf);
336 *buflen=lstrlen32W(remotenameW);
337 HeapFree(GetProcessHeap(),0,lnA);
338 return ret;
341 /**************************************************************************
342 * WNetGetCaps [USER.513]
344 int WINAPI WNetGetCaps(WORD capability)
346 switch (capability) {
347 case WNNC_SPEC_VERSION:
349 return 0x30a; /* WfW 3.11(and apparently other 3.1x) */
351 case WNNC_NET_TYPE:
352 /* hi byte = network type,
353 lo byte = network vendor (Netware = 0x03) [15 types] */
354 return WNNC_NET_MultiNet | WNNC_SUBNET_WinWorkgroups;
356 case WNNC_DRIVER_VERSION:
357 /* driver version of vendor */
358 return 0x100; /* WfW 3.11 */
360 case WNNC_USER:
361 /* 1 = WNetGetUser is supported */
362 return 1;
364 case WNNC_CONNECTION:
365 /* returns mask of the supported connection functions */
366 return WNNC_CON_AddConnection|WNNC_CON_CancelConnection
367 |WNNC_CON_GetConnections/*|WNNC_CON_AutoConnect*/
368 |WNNC_CON_BrowseDialog|WNNC_CON_RestoreConnection;
370 case WNNC_PRINTING:
371 /* returns mask of the supported printing functions */
372 return WNNC_PRT_OpenJob|WNNC_PRT_CloseJob|WNNC_PRT_HoldJob
373 |WNNC_PRT_ReleaseJob|WNNC_PRT_CancelJob
374 |WNNC_PRT_SetJobCopies|WNNC_PRT_WatchQueue
375 |WNNC_PRT_UnwatchQueue|WNNC_PRT_LockQueueData
376 |WNNC_PRT_UnlockQueueData|WNNC_PRT_AbortJob
377 |WNNC_PRT_WriteJob;
379 case WNNC_DIALOG:
380 /* returns mask of the supported dialog functions */
381 return WNNC_DLG_DeviceMode|WNNC_DLG_BrowseDialog
382 |WNNC_DLG_ConnectDialog|WNNC_DLG_DisconnectDialog
383 |WNNC_DLG_ViewQueueDialog|WNNC_DLG_PropertyDialog
384 |WNNC_DLG_ConnectionDialog
385 /*|WNNC_DLG_PrinterConnectDialog
386 |WNNC_DLG_SharesDialog|WNNC_DLG_ShareAsDialog*/;
388 case WNNC_ADMIN:
389 /* returns mask of the supported administration functions */
390 /* not sure if long file names is a good idea */
391 return WNNC_ADM_GetDirectoryType|WNNC_ADM_DirectoryNotify
392 |WNNC_ADM_LongNames/*|WNNC_ADM_SetDefaultDrive*/;
394 case WNNC_ERROR:
395 /* returns mask of the supported error functions */
396 return WNNC_ERR_GetError|WNNC_ERR_GetErrorText;
398 case WNNC_PRINTMGREXT:
399 /* returns the Print Manager version in major and
400 minor format if Print Manager functions are available */
401 return 0x30e; /* printman version of WfW 3.11 */
403 case 0xffff:
404 /* Win 3.11 returns HMODULE of network driver here
405 FIXME: what should we return ?
406 logonoff.exe needs it, msmail crashes with wrong value */
407 return 0;
409 default:
410 return 0;
414 /**************************************************************************
415 * WNetDeviceMode [USER.514]
417 int WINAPI WNetDeviceMode(HWND16 hWndOwner)
419 FIXME(wnet, "(%04x): stub\n",hWndOwner);
420 return WN_NO_NETWORK;
423 /**************************************************************************
424 * WNetBrowseDialog [USER.515]
426 int WINAPI WNetBrowseDialog(HWND16 hParent,WORD nType,LPSTR szPath)
428 FIXME(wnet, "(%04x,%x,'%s'): stub\n",hParent,nType,szPath);
429 return WN_NO_NETWORK;
432 /**************************************************************************
433 * WNetGetUser [USER.516]
435 UINT16 WINAPI WNetGetUser(LPSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
437 FIXME(wnet, "(%p, %p, %p): stub\n", lpLocalName, lpUserName, lpSize);
438 return WN_NO_NETWORK;
441 /**************************************************************************
442 * WNetGetUser [MPR.86]
443 * FIXME: we should not return ourselves, but the owner of the drive lpLocalName
445 DWORD WINAPI WNetGetUser32A(LPCSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
447 struct passwd *pwd = getpwuid(getuid());
449 FIXME(wnet, "(%s, %p, %p), mostly stub\n", lpLocalName, lpUserName, lpSize);
450 if (pwd) {
451 if (strlen(pwd->pw_name)+1>*lpSize) {
452 *lpSize = strlen(pwd->pw_name)+1;
453 SetLastError(ERROR_MORE_DATA);
454 return ERROR_MORE_DATA;
456 strcpy(lpUserName,pwd->pw_name);
457 if (lpSize)
458 *lpSize = strlen(pwd->pw_name)+1;
459 return WN_SUCCESS;
461 /* FIXME: wrong return value */
462 SetLastError(ERROR_NO_NETWORK);
463 return ERROR_NO_NETWORK;
466 /**************************************************************************
467 * WNetGetError [USER.519]
469 int WINAPI WNetGetError(LPWORD nError)
471 FIXME(wnet, "(%p): stub\n",nError);
472 return WN_NO_NETWORK;
475 /**************************************************************************
476 * WNetGetErrorText [USER.520]
478 int WINAPI WNetGetErrorText(WORD nError, LPSTR lpBuffer, LPWORD nBufferSize)
480 FIXME(wnet, "(%x,%p,%p): stub\n",nError,lpBuffer,nBufferSize);
481 return WN_NET_ERROR;
484 /**************************************************************************
485 * WNetRestoreConnection [USER.523]
487 int WINAPI WNetRestoreConnection(HWND16 hwndOwner,LPSTR lpszDevice)
489 FIXME(wnet, "(%04x,'%s'): stub\n",hwndOwner,lpszDevice);
490 return WN_NO_NETWORK;
493 /**************************************************************************
494 * WNetWriteJob [USER.524]
496 int WINAPI WNetWriteJob(HANDLE16 hJob,void *lpData,LPWORD lpcbData)
498 FIXME(wnet, "(%04x,%p,%p): stub\n",hJob,lpData,lpcbData);
499 return WN_NO_NETWORK;
502 /********************************************************************
503 * WNetConnectDialog [USER.525]
505 UINT16 WINAPI WNetConnectDialog(HWND16 hWndParent, WORD iType)
507 FIXME(wnet, "(%04x, %4X): stub\n", hWndParent, iType);
508 return WN_SUCCESS;
511 /**************************************************************************
512 * WNetDisconnectDialog [USER.526]
514 int WINAPI WNetDisconnectDialog(HWND16 hwndOwner, WORD iType)
516 FIXME(wnet, "(%04x,%x): stub\n",hwndOwner,iType);
517 return WN_NO_NETWORK;
520 /**************************************************************************
521 * WnetConnectionDialog [USER.527]
523 UINT16 WINAPI WNetConnectionDialog(HWND16 hWndParent, WORD iType)
525 FIXME(wnet, "(%04x, %4X): stub\n", hWndParent, iType);
526 return WN_SUCCESS;
531 /**************************************************************************
532 * WNetViewQueueDialog [USER.528]
534 int WINAPI WNetViewQueueDialog(HWND16 hwndOwner,LPSTR lpszQueue)
536 FIXME(wnet, "(%04x,'%s'): stub\n",hwndOwner,lpszQueue);
537 return WN_NO_NETWORK;
540 /**************************************************************************
541 * WNetPropertyDialog [USER.529]
543 int WINAPI WNetPropertyDialog(HWND16 hwndParent,WORD iButton,
544 WORD nPropSel,LPSTR lpszName,WORD nType)
546 FIXME(wnet, "(%04x,%x,%x,'%s',%x): stub\n",
547 hwndParent,iButton,nPropSel,lpszName,nType);
548 return WN_NO_NETWORK;
551 /*********************************************************************
552 * WNetGetDirectoryType [USER.530] Decides whether resource is local
554 * RETURNS
555 * on success, puts one of the following in *lpType:
556 * - WNDT_NETWORK on a network
557 * - WNDT_LOCAL local
559 int WINAPI WNetGetDirectoryType16(LPSTR lpName, LPINT16 lpType)
561 UINT32 type = GetDriveType32A(lpName);
563 if (type == DRIVE_DOESNOTEXIST)
564 type = GetDriveType32A(NULL);
565 *lpType = (type==DRIVE_REMOTE)?WNDT_NETWORK:WNDT_NORMAL;
566 TRACE(wnet,"%s is %s\n",lpName,(*lpType==WNDT_NETWORK)?
567 "WNDT_NETWORK":"WNDT_NORMAL");
568 return WN_SUCCESS;
571 /*****************************************************************
572 * WNetGetDirectoryTypeA [MPR.109]
575 UINT32 WINAPI WNetGetDirectoryType32A(LPSTR lpName,void *lpType)
577 return WNetGetDirectoryType16(lpName, lpType);
580 /**************************************************************************
581 * WNetDirectoryNotify [USER.531]
583 int WINAPI WNetDirectoryNotify(HWND16 hwndOwner,void *lpDir,WORD wOper)
585 FIXME(wnet, "(%04x,%p,%x): stub\n",hwndOwner,lpDir,wOper);
586 return WN_NO_NETWORK;
589 /**************************************************************************
590 * WNetGetPropertyText [USER.532]
592 int WINAPI WNetGetPropertyText(WORD iButton, WORD nPropSel, LPSTR lpszName,
593 LPSTR lpszButtonName, WORD cbButtonName, WORD nType)
595 FIXME(wnet, "(%04x,%04x,'%s','%s',%04x): stub\n",
596 iButton,nPropSel,lpszName,lpszButtonName, nType);
597 return WN_NO_NETWORK;
601 /**************************************************************************
602 * WNetCloseEnum [USER.???]
604 UINT16 WINAPI WNetCloseEnum(HANDLE16 hEnum)
606 FIXME(wnet, "(%04x): stub\n", hEnum);
607 return WN_NO_NETWORK;
610 /**************************************************************************
611 * WNetEnumResource [USER.???]
613 UINT16 WINAPI WNetEnumResource(HANDLE16 hEnum, DWORD cRequ,
614 DWORD *lpCount, LPVOID lpBuf)
616 FIXME(wnet, "(%04x, %08lX, %p, %p): stub\n",
617 hEnum, cRequ, lpCount, lpBuf);
618 return WN_NO_NETWORK;
621 /**************************************************************************
622 * WNetOpenEnum [USER.???]
624 UINT16 WINAPI WNetOpenEnum16(DWORD dwScope, DWORD dwType,
625 LPNETRESOURCE16 lpNet, HANDLE16 *lphEnum)
627 FIXME(wnet, "(%08lX, %08lX, %p, %p): stub\n",
628 dwScope, dwType, lpNet, lphEnum);
629 return WN_NO_NETWORK;
632 /**************************************************************************
633 * WNetOpenEnumA [MPR.92]
635 UINT32 WINAPI WNetOpenEnum32A(DWORD dwScope, DWORD dwType, DWORD dwUsage,
636 LPNETRESOURCE32A lpNet, HANDLE32 *lphEnum)
638 FIXME(wnet, "(%08lX, %08lX, %08lX, %p, %p): stub\n",
639 dwScope, dwType, dwUsage, lpNet, lphEnum);
640 SetLastError(WN_NO_NETWORK);
641 return WN_NO_NETWORK;
644 /**************************************************************************
645 * WNetOpenEnumW [MPR.93]
647 UINT32 WINAPI WNetOpenEnum32W(DWORD dwScope, DWORD dwType, DWORD dwUsage,
648 LPNETRESOURCE32A lpNet, HANDLE32 *lphEnum)
650 FIXME(wnet, "(%08lX, %08lX, %08lX, %p, %p): stub\n",
651 dwScope, dwType, dwUsage, lpNet, lphEnum);
652 SetLastError(WN_NO_NETWORK);
653 return WN_NO_NETWORK;
656 /* ****************************************************************
657 * WNetGetResourceInformationA [MPR.80]
658 * */
660 DWORD WINAPI
661 WNetGetResourceInformation32A(
662 LPNETRESOURCE32A netres,LPVOID buf,LPDWORD buflen,LPSTR systemstr
664 FIXME(wnet,"(%p,%p,%p,%p): stub!\n",netres,buf,buflen,systemstr);
665 SetLastError(WN_NO_NETWORK);
666 return WN_NO_NETWORK;
669 /**************************************************************************
670 * WNetCachePassword [MPR.52] Saves password in cache
672 * RETURNS
673 * Success: WN_SUCCESS
674 * Failure: WNACCESS_DENIED, WN_BAD_PASSWORD, WN_BADVALUE, WN_NET_ERROR,
675 * WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
677 DWORD WINAPI WNetCachePassword(
678 LPSTR pbResource, /* [in] Name of workgroup, computer, or resource */
679 WORD cbResource, /* [in] Size of name */
680 LPSTR pbPassword, /* [in] Buffer containing password */
681 WORD cbPassword, /* [in] Size of password */
682 BYTE nType) /* [in] Type of password to cache */
684 FIXME(mpr,"(%s,%d,%s,%d,%d): stub\n", pbResource,cbResource,
685 pbPassword,cbPassword,nType);
686 return WN_SUCCESS;
691 /*****************************************************************
692 * WNetGetCachedPassword [MPR.69] Retrieves password from cache
694 * RETURNS
695 * Success: WN_SUCCESS
696 * Failure: WNACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE,
697 * WN_NET_ERROR, WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
699 DWORD WINAPI WNetGetCachedPassword(
700 LPSTR pbResource, /* [in] Name of workgroup, computer, or resource */
701 WORD cbResource, /* [in] Size of name */
702 LPSTR pbPassword, /* [out] Buffer to receive password */
703 LPWORD pcbPassword, /* [out] Receives size of password */
704 BYTE nType) /* [in] Type of password to retrieve */
706 FIXME(mpr,"(%s,%d,%p,%d,%d): stub\n",
707 pbResource,cbResource,pbPassword,*pcbPassword,nType);
708 return WN_ACCESS_DENIED;
711 /*****************************************************************
712 * MultinetGetConnectionPerformanceA [MPR.25]
714 * RETURNS
715 * Success: NO_ERROR
716 * Failure: ERROR_NOT_SUPPORTED, ERROR_NOT_CONNECTED,
717 * ERROR_NO_NET_OR_BAD_PATH, ERROR_BAD_DEVICE,
718 * ERROR_BAD_NET_NAME, ERROR_INVALID_PARAMETER,
719 * ERROR_NO_NETWORK, ERROR_EXTENDED_ERROR
721 DWORD WINAPI MultinetGetConnectionPerformance32A(
722 LPNETRESOURCE32A lpNetResource,
723 LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
725 FIXME(mpr,"(%p,%p): stub\n",lpNetResource,lpNetConnectInfoStruct);
726 return WN_NO_NETWORK;
730 /*****************************************************************
731 * [MPR.22]
734 DWORD WINAPI _MPR_22(DWORD x)
736 FIXME(mpr,"(%lx): stub\n",x);
737 return 0;
740 /*****************************************************************
741 * MultinetGetErrorTextA [MPR.28]
744 UINT32 WINAPI MultinetGetErrorText32A (DWORD x, DWORD y, DWORD z)
745 { FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z);
746 return 0;
749 /*****************************************************************
750 * MultinetGetErrorTextW [MPR.29]
752 UINT32 WINAPI MultinetGetErrorText32W (DWORD x, DWORD y, DWORD z)
753 { FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z);
754 return 0;
757 /*****************************************************************
758 * NPSGetProviderHandle [MPR.33]
760 DWORD WINAPI NPSGetProviderHandle32A(DWORD x) {
761 FIXME(mpr,"(0x%08lx),stub!\n",x);
762 return 0;
765 /*****************************************************************
766 * WNetCancelConnection232A [MPR.53]
768 DWORD WINAPI WNetCancelConnection232A(
769 LPCSTR lpName,
770 DWORD dwFlags,
771 BOOL32 fForce) {
773 FIXME(wnet,": stub\n");
774 return WN_SUCCESS;
777 /*****************************************************************
778 * WNetCancelConnection232W [MPR.54]
780 DWORD WINAPI WNetCancelConnection232W(
781 LPCWSTR lpName,
782 DWORD dwFlags,
783 BOOL32 fForce) {
785 FIXME(wnet,": stub\n");
786 return WN_SUCCESS;
789 /*****************************************************************
790 * WNetCancelConnection32A [MPR.55]
792 DWORD WINAPI WNetCancelConnection32A(
793 LPCSTR lpName,
794 DWORD dwFlags,
795 BOOL32 fForce) {
797 FIXME(wnet,": stub\n");
798 return WN_SUCCESS;
801 /*****************************************************************
802 * WNetCancelConnection32W [MPR.56]
804 DWORD WINAPI WNetCancelConnection32W(
805 LPCWSTR lpName,
806 DWORD dwFlags,
807 BOOL32 fForce) {
809 FIXME(wnet,": stub\n");
810 return WN_SUCCESS;
813 /*****************************************************************
814 * WNetGetUser32W [MPR.87]
816 DWORD WINAPI WNetGetUser32W(
817 LPCWSTR lpName,
818 LPWSTR lpUserName,
819 LPDWORD lpnLength) {
821 FIXME(wnet,": stub\n");
822 SetLastError(WN_NO_NETWORK);
823 return WN_NO_NETWORK;