blob: d2ffb2aba698f9458a08509afbf38271a6f1d259 [file] [log] [blame]
Alexandre Julliard58199531994-04-21 01:20:00 +00001/*
2 * Network functions
Alexandre Julliard46ea8b31998-05-03 19:01:20 +00003 *
4 * This is the MPR.DLL stuff from Win32, as well as the USER
5 * stuff by the same names in Win 3.x.
6 *
Alexandre Julliard58199531994-04-21 01:20:00 +00007 */
8
Alexandre Julliard594997c1995-04-30 10:05:20 +00009#include <ctype.h>
David Luyeree517e81999-02-28 12:27:56 +000010#include <string.h>
Alexandre Julliard85ed45e1998-08-22 19:03:56 +000011#include <sys/types.h>
12#include <pwd.h>
13#include <unistd.h>
Alexandre Julliard58199531994-04-21 01:20:00 +000014
Marcus Meissner04c3e1d1999-02-19 10:37:02 +000015#include "wintypes.h"
16#include "winnetwk.h"
17#include "winuser.h"
Alexandre Julliarde658d821997-11-30 17:45:40 +000018#include "winerror.h"
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000019#include "drive.h"
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000020#include "wnet.h"
Alexandre Julliard54c27111998-03-29 19:44:57 +000021#include "debug.h"
Alexandre Julliard642d3131998-07-12 19:29:36 +000022#include "heap.h"
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000023
24/********************************************************************
25 * WNetAddConnection16 [USER.517] Directs a local device to net
26 *
27 * Redirects a local device (either a disk drive or printer port)
28 * to a shared device on a remote server.
29 */
Alexandre Julliarda845b881998-06-01 10:44:35 +000030UINT16 WINAPI WNetAddConnection16(LPCSTR lpNetPath, LPCSTR lpPassWord,
31 LPCSTR lpLocalName)
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000032{
Alexandre Julliarda3960291999-02-26 11:11:13 +000033 return WNetAddConnectionA(lpNetPath, lpPassWord, lpLocalName);
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000034}
35
Alexandre Julliard642d3131998-07-12 19:29:36 +000036/*********************************************************************
37 * WNetAddConnection32 [MPR.50]
38 */
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000039
Alexandre Julliarda3960291999-02-26 11:11:13 +000040UINT WINAPI WNetAddConnectionA(LPCSTR NetPath, LPCSTR PassWord,
Alexandre Julliarda845b881998-06-01 10:44:35 +000041 LPCSTR LocalName)
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000042{
43 FIXME(wnet, "('%s', %p, '%s'): stub\n",
44 NetPath, PassWord, LocalName);
45 return WN_NO_NETWORK;
46}
47
48/* [MPR.51] */
49
Alexandre Julliarda3960291999-02-26 11:11:13 +000050UINT WINAPI WNetAddConnectionW(LPCWSTR NetPath,
Alexandre Julliarda845b881998-06-01 10:44:35 +000051 LPCWSTR PassWord,
52 LPCWSTR LocalName)
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000053{
54 FIXME(wnet, " stub!\n");
Alexandre Julliard642d3131998-07-12 19:29:36 +000055 SetLastError(WN_NO_NETWORK);
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000056 return WN_NO_NETWORK;
57}
58
59/* ****************************************************************
60 * WNetAddConnection2_32A [MPR.46]
61 */
62
Alexandre Julliarda3960291999-02-26 11:11:13 +000063UINT WINAPI
64WNetAddConnection2A(LPNETRESOURCEA netresource, /* [in] */
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000065 LPCSTR password, /* [in] */
66 LPCSTR username, /* [in] */
67 DWORD flags /* [in] */ )
68{
69 FIXME(wnet, "(%p,%s,%s,0x%08lx), stub!\n", netresource,
70 password, username, (unsigned long) flags);
71 SetLastError(WN_NO_NETWORK);
72 return WN_NO_NETWORK;
73}
74
75/* ****************************************************************
76 * WNetAddConnection2W [MPR.47]
77 */
78
Alexandre Julliarda3960291999-02-26 11:11:13 +000079UINT WINAPI
80WNetAddConnection2W(LPNETRESOURCEW netresource, /* [in] */
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000081 LPCWSTR password, /* [in] */
82 LPCWSTR username, /* [in] */
83 DWORD flags /* [in] */ )
84{
85 FIXME(wnet, ", stub!\n");
86 SetLastError(WN_NO_NETWORK);
87 return WN_NO_NETWORK;
88}
89
90/* ****************************************************************
91 * WNetAddConnection3_32A [MPR.48]
92 */
93
Alexandre Julliarda3960291999-02-26 11:11:13 +000094UINT WINAPI WNetAddConnection3A(HWND owner,
95 LPNETRESOURCEA netresource,
Alexandre Julliard46ea8b31998-05-03 19:01:20 +000096 LPCSTR password,
97 LPCSTR username,
98 DWORD flags)
99{
100 TRACE(wnet, "owner = 0x%x\n", owner);
Alexandre Julliarda3960291999-02-26 11:11:13 +0000101 return WNetAddConnection2A(netresource,
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000102 password, username, flags);
103}
104
105/* ****************************************************************
106 * WNetAddConnection3W [MPR.49]
107 */
108
Alexandre Julliarda3960291999-02-26 11:11:13 +0000109UINT WINAPI WNetAddConnection3W(HWND owner,
110 LPNETRESOURCEW netresource,
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000111 LPCWSTR username,
112 LPCWSTR password,
113 DWORD flags)
114{
115 TRACE(wnet,"owner = 0x%x\n", owner);
Alexandre Julliarda3960291999-02-26 11:11:13 +0000116 return WNetAddConnection2W(netresource, username, password,
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000117 flags);
118}
119
Alexandre Julliard642d3131998-07-12 19:29:36 +0000120/*******************************************************************
121 * WNetConnectionDialog1_32A [MPR.59]
122 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000123UINT WINAPI WNetConnectionDialog1A (LPCONNECTDLGSTRUCTA lpConnDlgStruct)
Alexandre Julliard642d3131998-07-12 19:29:36 +0000124{ FIXME(wnet,"%p stub\n", lpConnDlgStruct);
125 SetLastError(WN_NO_NETWORK);
126 return ERROR_NO_NETWORK;
127}
128/*******************************************************************
129 * WNetConnectionDialog1_32W [MPR.60]
130 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000131UINT WINAPI WNetConnectionDialog1W (LPCONNECTDLGSTRUCTW lpConnDlgStruct)
Alexandre Julliard642d3131998-07-12 19:29:36 +0000132{ FIXME(wnet,"%p stub\n", lpConnDlgStruct);
133 SetLastError(WN_NO_NETWORK);
134 return ERROR_NO_NETWORK;
135}
136
137/*******************************************************************
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000138 * WNetConnectionDialog_32 [MPR.61]
Alexandre Julliard642d3131998-07-12 19:29:36 +0000139 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000140UINT WINAPI WNetConnectionDialog(HWND owner, DWORD flags )
Alexandre Julliard642d3131998-07-12 19:29:36 +0000141{ FIXME(wnet,"owner = 0x%x, flags=0x%lx stub\n", owner,flags);
142 SetLastError(WN_NO_NETWORK);
143 return ERROR_NO_NETWORK;
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000144
Alexandre Julliard642d3131998-07-12 19:29:36 +0000145}
Andreas Mohr1f0f4821998-11-07 12:38:07 +0000146
147/*******************************************************************
148 * WNetEnumCachedPasswords32 [MPR.61]
149 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000150UINT WINAPI WNetEnumCachedPasswords(LPSTR sometext, DWORD count1,
Andreas Mohr1f0f4821998-11-07 12:38:07 +0000151 DWORD res_nr, DWORD *enumPasswordProc)
152{
153 return ERROR_NO_NETWORK;
154}
155
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000156/********************************************************************
157 * WNetCancelConnection [USER.518] undirects a local device
158 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000159UINT16 WINAPI WNetCancelConnection16(LPCSTR lpName, BOOL16 bForce)
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000160{
161 FIXME(wnet, "('%s', %04X): stub\n", lpName, bForce);
162 return WN_NO_NETWORK;
163}
164
Alexandre Julliard58199531994-04-21 01:20:00 +0000165
166/**************************************************************************
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000167 * WNetErrorText16 [USER.499]
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000168 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000169int WINAPI WNetErrorText16(WORD nError,LPSTR lpszText,WORD cbText)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000170{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000171 FIXME(wnet, "(%x,%p,%x): stub\n",nError,lpszText,cbText);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000172 return FALSE;
173}
174
175/**************************************************************************
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000176 * WNetOpenJob16 [USER.501]
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000177 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000178int WINAPI WNetOpenJob16(LPSTR szQueue,LPSTR szJobTitle,WORD nCopies,LPWORD pfh)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000179{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000180 FIXME(wnet, "('%s','%s',%x,%p): stub\n",
181 szQueue,szJobTitle,nCopies,pfh);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000182 return WN_NET_ERROR;
183}
184
185/**************************************************************************
186 * WNetCloseJob [USER.502]
187 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000188int WINAPI WNetCloseJob16(WORD fh,LPWORD pidJob,LPSTR szQueue)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000189{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000190 FIXME(wnet, "(%x,%p,'%s'): stub\n",fh,pidJob,szQueue);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000191 return WN_NET_ERROR;
192}
193
194/**************************************************************************
195 * WNetAbortJob [USER.503]
196 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000197int WINAPI WNetAbortJob16(LPSTR szQueue,WORD wJobId)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000198{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000199 FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000200 return WN_NET_ERROR;
201}
202
203/**************************************************************************
204 * WNetHoldJob [USER.504]
205 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000206int WINAPI WNetHoldJob16(LPSTR szQueue,WORD wJobId)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000207{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000208 FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000209 return WN_NET_ERROR;
210}
211
212/**************************************************************************
213 * WNetReleaseJob [USER.505]
214 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000215int WINAPI WNetReleaseJob16(LPSTR szQueue,WORD wJobId)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000216{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000217 FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000218 return WN_NET_ERROR;
219}
220
221/**************************************************************************
222 * WNetCancelJob [USER.506]
223 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000224int WINAPI WNetCancelJob16(LPSTR szQueue,WORD wJobId)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000225{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000226 FIXME(wnet, "('%s',%x): stub\n",szQueue,wJobId);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000227 return WN_NET_ERROR;
228}
229
230/**************************************************************************
231 * WNetSetJobCopies [USER.507]
232 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000233int WINAPI WNetSetJobCopies16(LPSTR szQueue,WORD wJobId,WORD nCopies)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000234{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000235 FIXME(wnet, "('%s',%x,%x): stub\n",szQueue,wJobId,nCopies);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000236 return WN_NET_ERROR;
237}
238
239/**************************************************************************
240 * WNetWatchQueue [USER.508]
241 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000242int WINAPI WNetWatchQueue16(HWND16 hWnd,LPSTR szLocal,LPSTR szUser,WORD nQueue)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000243{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000244 FIXME(wnet, "(%04x,'%s','%s',%x): stub\n",hWnd,szLocal,szUser,nQueue);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000245 return WN_NET_ERROR;
246}
247
248/**************************************************************************
249 * WNetUnwatchQueue [USER.509]
250 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000251int WINAPI WNetUnwatchQueue16(LPSTR szQueue)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000252{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000253 FIXME(wnet, "('%s'): stub\n", szQueue);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000254 return WN_NET_ERROR;
255}
256
257/**************************************************************************
258 * WNetLockQueueData [USER.510]
259 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000260int WINAPI WNetLockQueueData16(LPSTR szQueue,LPSTR szUser,void *lplpQueueStruct)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000261{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000262 FIXME(wnet, "('%s','%s',%p): stub\n",szQueue,szUser,lplpQueueStruct);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000263 return WN_NET_ERROR;
264}
265
266/**************************************************************************
267 * WNetUnlockQueueData [USER.511]
268 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000269int WINAPI WNetUnlockQueueData16(LPSTR szQueue)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000270{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000271 FIXME(wnet, "('%s'): stub\n",szQueue);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000272 return WN_NET_ERROR;
273}
274
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000275
276/********************************************************************
277 * WNetGetConnection16 [USER.512] reverse-resolves a local device
278 *
279 * RETURNS
280 * - WN_BAD_LOCALNAME lpLocalName makes no sense
281 * - WN_NOT_CONNECTED drive is a local drive
282 * - WN_MORE_DATA buffer isn't big enough
283 * - WN_SUCCESS success (net path in buffer)
Alexandre Julliard58199531994-04-21 01:20:00 +0000284 */
Alexandre Julliard44ed71f1997-12-21 19:17:50 +0000285int WINAPI WNetGetConnection16(LPCSTR lpLocalName,
Alexandre Julliard77b99181997-09-14 17:17:23 +0000286 LPSTR lpRemoteName, UINT16 *cbRemoteName)
Alexandre Julliard58199531994-04-21 01:20:00 +0000287{
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000288 const char *path;
Alexandre Julliard594997c1995-04-30 10:05:20 +0000289
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000290 if (lpLocalName[1] == ':')
Alexandre Julliard594997c1995-04-30 10:05:20 +0000291 {
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000292 int drive = toupper(lpLocalName[0]) - 'A';
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000293 switch(DRIVE_GetType(drive))
Alexandre Julliard594997c1995-04-30 10:05:20 +0000294 {
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000295 case TYPE_INVALID:
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000296 return WN_BAD_LOCALNAME;
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000297 case TYPE_NETWORK:
Alexandre Julliarde658d821997-11-30 17:45:40 +0000298 path = DRIVE_GetLabel(drive);
299 if (strlen(path) + 1 > *cbRemoteName)
300 {
301 *cbRemoteName = strlen(path) + 1;
302 return WN_MORE_DATA;
303 }
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000304 strcpy( lpRemoteName, path );
305 *cbRemoteName = strlen(lpRemoteName) + 1;
306 return WN_SUCCESS;
Alexandre Julliard767e6f61998-08-09 12:47:43 +0000307 default:
308 return WN_BAD_LOCALNAME;
Alexandre Julliard594997c1995-04-30 10:05:20 +0000309 }
310 }
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +0000311 return WN_BAD_LOCALNAME;
Alexandre Julliard58199531994-04-21 01:20:00 +0000312}
313
314/**************************************************************************
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000315 * WNetGetConnectionA [MPR.70]
316 */
317DWORD WINAPI
Alexandre Julliarda3960291999-02-26 11:11:13 +0000318WNetGetConnectionA(LPCSTR localname,LPSTR remotename,LPDWORD buflen)
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000319{
320 UINT16 x;
321 DWORD ret = WNetGetConnection16(localname,remotename,&x);
322 *buflen = x;
323 return ret;
324}
325
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000326/**************************************************************************
327 * WNetGetConnectionW [MPR.72]
328 */
329DWORD WINAPI
Alexandre Julliarda3960291999-02-26 11:11:13 +0000330WNetGetConnectionW(LPCWSTR localnameW,LPWSTR remotenameW,LPDWORD buflen)
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000331{
332 UINT16 x;
333 CHAR buf[200];
334 LPSTR lnA = HEAP_strdupWtoA(GetProcessHeap(),0,localnameW);
335 DWORD ret = WNetGetConnection16(lnA,buf,&x);
336
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000337 lstrcpyAtoW(remotenameW,buf);
Alexandre Julliarda3960291999-02-26 11:11:13 +0000338 *buflen=lstrlenW(remotenameW);
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000339 HeapFree(GetProcessHeap(),0,lnA);
340 return ret;
341}
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000342
343/**************************************************************************
Alexandre Julliard7cc9c0c1994-06-15 15:45:11 +0000344 * WNetGetCaps [USER.513]
345 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000346int WINAPI WNetGetCaps16(WORD capability)
Alexandre Julliard7cc9c0c1994-06-15 15:45:11 +0000347{
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000348 switch (capability) {
349 case WNNC_SPEC_VERSION:
350 {
Alexandre Julliard54c27111998-03-29 19:44:57 +0000351 return 0x30a; /* WfW 3.11(and apparently other 3.1x) */
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000352 }
353 case WNNC_NET_TYPE:
Alexandre Julliard54c27111998-03-29 19:44:57 +0000354 /* hi byte = network type,
355 lo byte = network vendor (Netware = 0x03) [15 types] */
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000356 return WNNC_NET_MultiNet | WNNC_SUBNET_WinWorkgroups;
357
358 case WNNC_DRIVER_VERSION:
359 /* driver version of vendor */
360 return 0x100; /* WfW 3.11 */
361
362 case WNNC_USER:
363 /* 1 = WNetGetUser is supported */
364 return 1;
365
366 case WNNC_CONNECTION:
367 /* returns mask of the supported connection functions */
368 return WNNC_CON_AddConnection|WNNC_CON_CancelConnection
369 |WNNC_CON_GetConnections/*|WNNC_CON_AutoConnect*/
370 |WNNC_CON_BrowseDialog|WNNC_CON_RestoreConnection;
371
372 case WNNC_PRINTING:
373 /* returns mask of the supported printing functions */
374 return WNNC_PRT_OpenJob|WNNC_PRT_CloseJob|WNNC_PRT_HoldJob
375 |WNNC_PRT_ReleaseJob|WNNC_PRT_CancelJob
376 |WNNC_PRT_SetJobCopies|WNNC_PRT_WatchQueue
377 |WNNC_PRT_UnwatchQueue|WNNC_PRT_LockQueueData
378 |WNNC_PRT_UnlockQueueData|WNNC_PRT_AbortJob
379 |WNNC_PRT_WriteJob;
380
381 case WNNC_DIALOG:
382 /* returns mask of the supported dialog functions */
383 return WNNC_DLG_DeviceMode|WNNC_DLG_BrowseDialog
384 |WNNC_DLG_ConnectDialog|WNNC_DLG_DisconnectDialog
385 |WNNC_DLG_ViewQueueDialog|WNNC_DLG_PropertyDialog
386 |WNNC_DLG_ConnectionDialog
387 /*|WNNC_DLG_PrinterConnectDialog
388 |WNNC_DLG_SharesDialog|WNNC_DLG_ShareAsDialog*/;
389
390 case WNNC_ADMIN:
391 /* returns mask of the supported administration functions */
392 /* not sure if long file names is a good idea */
393 return WNNC_ADM_GetDirectoryType|WNNC_ADM_DirectoryNotify
394 |WNNC_ADM_LongNames/*|WNNC_ADM_SetDefaultDrive*/;
395
396 case WNNC_ERROR:
397 /* returns mask of the supported error functions */
398 return WNNC_ERR_GetError|WNNC_ERR_GetErrorText;
399
400 case WNNC_PRINTMGREXT:
Alexandre Julliard54c27111998-03-29 19:44:57 +0000401 /* returns the Print Manager version in major and
402 minor format if Print Manager functions are available */
Alexandre Julliard60ce85c1998-02-01 18:33:27 +0000403 return 0x30e; /* printman version of WfW 3.11 */
404
405 case 0xffff:
406 /* Win 3.11 returns HMODULE of network driver here
407 FIXME: what should we return ?
408 logonoff.exe needs it, msmail crashes with wrong value */
409 return 0;
410
411 default:
412 return 0;
413 }
Alexandre Julliard7cc9c0c1994-06-15 15:45:11 +0000414}
415
416/**************************************************************************
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000417 * WNetDeviceMode [USER.514]
418 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000419int WINAPI WNetDeviceMode16(HWND16 hWndOwner)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000420{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000421 FIXME(wnet, "(%04x): stub\n",hWndOwner);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000422 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000423}
424
425/**************************************************************************
426 * WNetBrowseDialog [USER.515]
427 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000428int WINAPI WNetBrowseDialog16(HWND16 hParent,WORD nType,LPSTR szPath)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000429{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000430 FIXME(wnet, "(%04x,%x,'%s'): stub\n",hParent,nType,szPath);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000431 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000432}
433
434/**************************************************************************
Alexandre Julliard58199531994-04-21 01:20:00 +0000435 * WNetGetUser [USER.516]
436 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000437UINT16 WINAPI WNetGetUser16(LPSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
Alexandre Julliard58199531994-04-21 01:20:00 +0000438{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000439 FIXME(wnet, "(%p, %p, %p): stub\n", lpLocalName, lpUserName, lpSize);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000440 return WN_NO_NETWORK;
Alexandre Julliard58199531994-04-21 01:20:00 +0000441}
442
443/**************************************************************************
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000444 * WNetGetUser [MPR.86]
445 * FIXME: we should not return ourselves, but the owner of the drive lpLocalName
446 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000447DWORD WINAPI WNetGetUserA(LPCSTR lpLocalName, LPSTR lpUserName, DWORD *lpSize)
Alexandre Julliard85ed45e1998-08-22 19:03:56 +0000448{
449 struct passwd *pwd = getpwuid(getuid());
450
451 FIXME(wnet, "(%s, %p, %p), mostly stub\n", lpLocalName, lpUserName, lpSize);
452 if (pwd) {
453 if (strlen(pwd->pw_name)+1>*lpSize) {
454 *lpSize = strlen(pwd->pw_name)+1;
455 SetLastError(ERROR_MORE_DATA);
456 return ERROR_MORE_DATA;
457 }
458 strcpy(lpUserName,pwd->pw_name);
459 if (lpSize)
460 *lpSize = strlen(pwd->pw_name)+1;
461 return WN_SUCCESS;
462 }
463 /* FIXME: wrong return value */
464 SetLastError(ERROR_NO_NETWORK);
465 return ERROR_NO_NETWORK;
466}
467
468/**************************************************************************
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000469 * WNetGetError [USER.519]
470 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000471int WINAPI WNetGetError16(LPWORD nError)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000472{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000473 FIXME(wnet, "(%p): stub\n",nError);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000474 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000475}
476
477/**************************************************************************
478 * WNetGetErrorText [USER.520]
479 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000480int WINAPI WNetGetErrorText16(WORD nError, LPSTR lpBuffer, LPWORD nBufferSize)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000481{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000482 FIXME(wnet, "(%x,%p,%p): stub\n",nError,lpBuffer,nBufferSize);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000483 return WN_NET_ERROR;
484}
485
486/**************************************************************************
487 * WNetRestoreConnection [USER.523]
488 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000489int WINAPI WNetRestoreConnection16(HWND16 hwndOwner,LPSTR lpszDevice)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000490{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000491 FIXME(wnet, "(%04x,'%s'): stub\n",hwndOwner,lpszDevice);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000492 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000493}
494
495/**************************************************************************
496 * WNetWriteJob [USER.524]
497 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000498int WINAPI WNetWriteJob16(HANDLE16 hJob,void *lpData,LPWORD lpcbData)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000499{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000500 FIXME(wnet, "(%04x,%p,%p): stub\n",hJob,lpData,lpcbData);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000501 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000502}
503
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000504/********************************************************************
505 * WNetConnectDialog [USER.525]
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000506 */
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000507UINT16 WINAPI WNetConnectDialog(HWND16 hWndParent, WORD iType)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000508{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000509 FIXME(wnet, "(%04x, %4X): stub\n", hWndParent, iType);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000510 return WN_SUCCESS;
511}
512
513/**************************************************************************
514 * WNetDisconnectDialog [USER.526]
515 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000516int WINAPI WNetDisconnectDialog16(HWND16 hwndOwner, WORD iType)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000517{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000518 FIXME(wnet, "(%04x,%x): stub\n",hwndOwner,iType);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000519 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000520}
521
522/**************************************************************************
523 * WnetConnectionDialog [USER.527]
524 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000525UINT16 WINAPI WNetConnectionDialog16(HWND16 hWndParent, WORD iType)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000526{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000527 FIXME(wnet, "(%04x, %4X): stub\n", hWndParent, iType);
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000528 return WN_SUCCESS;
529}
530
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000531
532
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000533/**************************************************************************
534 * WNetViewQueueDialog [USER.528]
535 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000536int WINAPI WNetViewQueueDialog16(HWND16 hwndOwner,LPSTR lpszQueue)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000537{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000538 FIXME(wnet, "(%04x,'%s'): stub\n",hwndOwner,lpszQueue);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000539 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000540}
541
542/**************************************************************************
543 * WNetPropertyDialog [USER.529]
544 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000545int WINAPI WNetPropertyDialog16(HWND16 hwndParent,WORD iButton,
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000546 WORD nPropSel,LPSTR lpszName,WORD nType)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000547{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000548 FIXME(wnet, "(%04x,%x,%x,'%s',%x): stub\n",
549 hwndParent,iButton,nPropSel,lpszName,nType);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000550 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000551}
552
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000553/*********************************************************************
554 * WNetGetDirectoryType [USER.530] Decides whether resource is local
555 *
556 * RETURNS
557 * on success, puts one of the following in *lpType:
558 * - WNDT_NETWORK on a network
559 * - WNDT_LOCAL local
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000560 */
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000561int WINAPI WNetGetDirectoryType16(LPSTR lpName, LPINT16 lpType)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000562{
Alexandre Julliarda3960291999-02-26 11:11:13 +0000563 UINT type = GetDriveTypeA(lpName);
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000564
565 if (type == DRIVE_DOESNOTEXIST)
Alexandre Julliarda3960291999-02-26 11:11:13 +0000566 type = GetDriveTypeA(NULL);
Alexandre Julliarddadf78f1998-05-17 17:13:43 +0000567 *lpType = (type==DRIVE_REMOTE)?WNDT_NETWORK:WNDT_NORMAL;
568 TRACE(wnet,"%s is %s\n",lpName,(*lpType==WNDT_NETWORK)?
569 "WNDT_NETWORK":"WNDT_NORMAL");
570 return WN_SUCCESS;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000571}
572
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000573/*****************************************************************
574 * WNetGetDirectoryTypeA [MPR.109]
575 */
576
Alexandre Julliarda3960291999-02-26 11:11:13 +0000577UINT WINAPI WNetGetDirectoryTypeA(LPSTR lpName,void *lpType)
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000578{
579 return WNetGetDirectoryType16(lpName, lpType);
580}
581
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000582/**************************************************************************
583 * WNetDirectoryNotify [USER.531]
584 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000585int WINAPI WNetDirectoryNotify16(HWND16 hwndOwner,void *lpDir,WORD wOper)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000586{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000587 FIXME(wnet, "(%04x,%p,%x): stub\n",hwndOwner,lpDir,wOper);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000588 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000589}
590
591/**************************************************************************
592 * WNetGetPropertyText [USER.532]
593 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000594int WINAPI WNetGetPropertyText16(WORD iButton, WORD nPropSel, LPSTR lpszName,
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000595 LPSTR lpszButtonName, WORD cbButtonName, WORD nType)
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000596{
Alexandre Julliardf90efa91998-06-14 15:24:15 +0000597 FIXME(wnet, "(%04x,%04x,'%s','%s',%04x): stub\n",
598 iButton,nPropSel,lpszName,lpszButtonName, nType);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000599 return WN_NO_NETWORK;
Alexandre Julliardfa68b751995-04-03 16:55:37 +0000600}
601
Alexandre Julliard58199531994-04-21 01:20:00 +0000602
603/**************************************************************************
604 * WNetCloseEnum [USER.???]
605 */
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000606UINT16 WINAPI WNetCloseEnum(HANDLE16 hEnum)
Alexandre Julliard58199531994-04-21 01:20:00 +0000607{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000608 FIXME(wnet, "(%04x): stub\n", hEnum);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000609 return WN_NO_NETWORK;
Alexandre Julliard58199531994-04-21 01:20:00 +0000610}
611
612/**************************************************************************
613 * WNetEnumResource [USER.???]
614 */
Alexandre Julliard670cdc41997-08-24 16:00:30 +0000615UINT16 WINAPI WNetEnumResource(HANDLE16 hEnum, DWORD cRequ,
616 DWORD *lpCount, LPVOID lpBuf)
Alexandre Julliard58199531994-04-21 01:20:00 +0000617{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000618 FIXME(wnet, "(%04x, %08lX, %p, %p): stub\n",
619 hEnum, cRequ, lpCount, lpBuf);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000620 return WN_NO_NETWORK;
Alexandre Julliard58199531994-04-21 01:20:00 +0000621}
622
623/**************************************************************************
624 * WNetOpenEnum [USER.???]
625 */
Alexandre Julliarde658d821997-11-30 17:45:40 +0000626UINT16 WINAPI WNetOpenEnum16(DWORD dwScope, DWORD dwType,
627 LPNETRESOURCE16 lpNet, HANDLE16 *lphEnum)
Alexandre Julliard58199531994-04-21 01:20:00 +0000628{
Alexandre Julliard54c27111998-03-29 19:44:57 +0000629 FIXME(wnet, "(%08lX, %08lX, %p, %p): stub\n",
630 dwScope, dwType, lpNet, lphEnum);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000631 return WN_NO_NETWORK;
Alexandre Julliard58199531994-04-21 01:20:00 +0000632}
633
Alexandre Julliarde658d821997-11-30 17:45:40 +0000634/**************************************************************************
635 * WNetOpenEnumA [MPR.92]
636 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000637UINT WINAPI WNetOpenEnumA(DWORD dwScope, DWORD dwType, DWORD dwUsage,
638 LPNETRESOURCEA lpNet, HANDLE *lphEnum)
Alexandre Julliarde658d821997-11-30 17:45:40 +0000639{
Alexandre Julliarda845b881998-06-01 10:44:35 +0000640 FIXME(wnet, "(%08lX, %08lX, %08lX, %p, %p): stub\n",
641 dwScope, dwType, dwUsage, lpNet, lphEnum);
Alexandre Julliard642d3131998-07-12 19:29:36 +0000642 SetLastError(WN_NO_NETWORK);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000643 return WN_NO_NETWORK;
644}
Alexandre Julliard58199531994-04-21 01:20:00 +0000645
Gael de Chalendar49e27731998-12-07 12:15:34 +0000646/**************************************************************************
647 * WNetOpenEnumW [MPR.93]
648 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000649UINT WINAPI WNetOpenEnumW(DWORD dwScope, DWORD dwType, DWORD dwUsage,
650 LPNETRESOURCEA lpNet, HANDLE *lphEnum)
Gael de Chalendar49e27731998-12-07 12:15:34 +0000651{
652 FIXME(wnet, "(%08lX, %08lX, %08lX, %p, %p): stub\n",
653 dwScope, dwType, dwUsage, lpNet, lphEnum);
654 SetLastError(WN_NO_NETWORK);
655 return WN_NO_NETWORK;
656}
657
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000658/* ****************************************************************
659 * WNetGetResourceInformationA [MPR.80]
660 * */
Alexandre Julliarde658d821997-11-30 17:45:40 +0000661
662DWORD WINAPI
Alexandre Julliarda3960291999-02-26 11:11:13 +0000663WNetGetResourceInformationA(
664 LPNETRESOURCEA netres,LPVOID buf,LPDWORD buflen,LPSTR systemstr
Alexandre Julliarde658d821997-11-30 17:45:40 +0000665) {
Alexandre Julliard54c27111998-03-29 19:44:57 +0000666 FIXME(wnet,"(%p,%p,%p,%p): stub!\n",netres,buf,buflen,systemstr);
Alexandre Julliard642d3131998-07-12 19:29:36 +0000667 SetLastError(WN_NO_NETWORK);
Alexandre Julliarde658d821997-11-30 17:45:40 +0000668 return WN_NO_NETWORK;
669}
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000670
671/**************************************************************************
672 * WNetCachePassword [MPR.52] Saves password in cache
673 *
674 * RETURNS
675 * Success: WN_SUCCESS
676 * Failure: WNACCESS_DENIED, WN_BAD_PASSWORD, WN_BADVALUE, WN_NET_ERROR,
677 * WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
678 */
679DWORD WINAPI WNetCachePassword(
680 LPSTR pbResource, /* [in] Name of workgroup, computer, or resource */
681 WORD cbResource, /* [in] Size of name */
682 LPSTR pbPassword, /* [in] Buffer containing password */
683 WORD cbPassword, /* [in] Size of password */
684 BYTE nType) /* [in] Type of password to cache */
685{
686 FIXME(mpr,"(%s,%d,%s,%d,%d): stub\n", pbResource,cbResource,
687 pbPassword,cbPassword,nType);
688 return WN_SUCCESS;
689}
690
691
692
693/*****************************************************************
694 * WNetGetCachedPassword [MPR.69] Retrieves password from cache
695 *
696 * RETURNS
697 * Success: WN_SUCCESS
698 * Failure: WNACCESS_DENIED, WN_BAD_PASSWORD, WN_BAD_VALUE,
699 * WN_NET_ERROR, WN_NOT_SUPPORTED, WN_OUT_OF_MEMORY
700 */
701DWORD WINAPI WNetGetCachedPassword(
702 LPSTR pbResource, /* [in] Name of workgroup, computer, or resource */
703 WORD cbResource, /* [in] Size of name */
704 LPSTR pbPassword, /* [out] Buffer to receive password */
705 LPWORD pcbPassword, /* [out] Receives size of password */
706 BYTE nType) /* [in] Type of password to retrieve */
707{
708 FIXME(mpr,"(%s,%d,%p,%d,%d): stub\n",
709 pbResource,cbResource,pbPassword,*pcbPassword,nType);
710 return WN_ACCESS_DENIED;
711}
712
Alexandre Julliarda845b881998-06-01 10:44:35 +0000713/*****************************************************************
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000714 * MultinetGetConnectionPerformanceA [MPR.25]
715 *
716 * RETURNS
717 * Success: NO_ERROR
718 * Failure: ERROR_NOT_SUPPORTED, ERROR_NOT_CONNECTED,
719 * ERROR_NO_NET_OR_BAD_PATH, ERROR_BAD_DEVICE,
720 * ERROR_BAD_NET_NAME, ERROR_INVALID_PARAMETER,
721 * ERROR_NO_NETWORK, ERROR_EXTENDED_ERROR
722 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000723DWORD WINAPI MultinetGetConnectionPerformanceA(
724 LPNETRESOURCEA lpNetResource,
Alexandre Julliard46ea8b31998-05-03 19:01:20 +0000725 LPNETCONNECTINFOSTRUCT lpNetConnectInfoStruct
726) {
727 FIXME(mpr,"(%p,%p): stub\n",lpNetResource,lpNetConnectInfoStruct);
Alexandre Julliarda845b881998-06-01 10:44:35 +0000728 return WN_NO_NETWORK;
729}
730
731
732/*****************************************************************
733 * [MPR.22]
734 */
735
736DWORD WINAPI _MPR_22(DWORD x)
737{
738 FIXME(mpr,"(%lx): stub\n",x);
739 return 0;
740}
741
742/*****************************************************************
Alexandre Julliard642d3131998-07-12 19:29:36 +0000743 * MultinetGetErrorTextA [MPR.28]
744 */
Alexandre Julliarda845b881998-06-01 10:44:35 +0000745
Alexandre Julliarda3960291999-02-26 11:11:13 +0000746UINT WINAPI MultinetGetErrorTextA (DWORD x, DWORD y, DWORD z)
Alexandre Julliard642d3131998-07-12 19:29:36 +0000747{ FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z);
748 return 0;
749}
Marcus Meissnerc0fbd7e1998-12-07 16:03:04 +0000750
Alexandre Julliard642d3131998-07-12 19:29:36 +0000751/*****************************************************************
752 * MultinetGetErrorTextW [MPR.29]
753 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000754UINT WINAPI MultinetGetErrorTextW (DWORD x, DWORD y, DWORD z)
Alexandre Julliard642d3131998-07-12 19:29:36 +0000755{ FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z);
756 return 0;
757}
Marcus Meissnerc0fbd7e1998-12-07 16:03:04 +0000758
759/*****************************************************************
760 * NPSGetProviderHandle [MPR.33]
761 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000762DWORD WINAPI NPSGetProviderHandleA(DWORD x) {
Marcus Meissnerc0fbd7e1998-12-07 16:03:04 +0000763 FIXME(mpr,"(0x%08lx),stub!\n",x);
764 return 0;
765}
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000766
767/*****************************************************************
768 * WNetCancelConnection232A [MPR.53]
769 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000770DWORD WINAPI WNetCancelConnection2A(
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000771 LPCSTR lpName,
772 DWORD dwFlags,
Alexandre Julliarda3960291999-02-26 11:11:13 +0000773 BOOL fForce) {
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000774
775 FIXME(wnet,": stub\n");
776 return WN_SUCCESS;
777}
778
779/*****************************************************************
780 * WNetCancelConnection232W [MPR.54]
781 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000782DWORD WINAPI WNetCancelConnection2W(
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000783 LPCWSTR lpName,
784 DWORD dwFlags,
Alexandre Julliarda3960291999-02-26 11:11:13 +0000785 BOOL fForce) {
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000786
787 FIXME(wnet,": stub\n");
788 return WN_SUCCESS;
789}
790
791/*****************************************************************
792 * WNetCancelConnection32A [MPR.55]
793 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000794DWORD WINAPI WNetCancelConnectionA(
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000795 LPCSTR lpName,
796 DWORD dwFlags,
Alexandre Julliarda3960291999-02-26 11:11:13 +0000797 BOOL fForce) {
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000798
799 FIXME(wnet,": stub\n");
800 return WN_SUCCESS;
801}
802
803/*****************************************************************
804 * WNetCancelConnection32W [MPR.56]
805 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000806DWORD WINAPI WNetCancelConnectionW(
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000807 LPCWSTR lpName,
808 DWORD dwFlags,
Alexandre Julliarda3960291999-02-26 11:11:13 +0000809 BOOL fForce) {
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000810
811 FIXME(wnet,": stub\n");
812 return WN_SUCCESS;
813}
814
815/*****************************************************************
816 * WNetGetUser32W [MPR.87]
817 */
Alexandre Julliarda3960291999-02-26 11:11:13 +0000818DWORD WINAPI WNetGetUserW(
Alexandre Julliard0c0e3be1998-12-10 15:49:22 +0000819 LPCWSTR lpName,
820 LPWSTR lpUserName,
821 LPDWORD lpnLength) {
822
823 FIXME(wnet,": stub\n");
824 SetLastError(WN_NO_NETWORK);
825 return WN_NO_NETWORK;
826}