source: trunk/src/mpr/MPR.CPP@ 1589

Last change on this file since 1589 was 1589, checked in by phaller, 26 years ago

Add: undocumented function stubs

File size: 39.2 KB
Line 
1/* $Id: MPR.CPP,v 1.5 1999-11-04 10:32:35 phaller Exp $ */
2
3/*
4 *
5 * Project Odin Software License can be found in LICENSE.TXT
6 *
7 * MPR apis
8 *
9 * Copyright 1998 Patrick Haller
10 */
11
12/*****************************************************************************
13 * Name : MPR.CPP
14 * Purpose : This module maps all Win32 functions contained in MPR.DLL
15 * to their OS/2-specific counterparts as far as possible.
16 * Basis is 5.05.97 12.00 59152 MPR.DLL (NT4SP3)
17 *****************************************************************************/
18
19#include <os2win.h>
20#include <wnet.h>
21#include <string.h>
22#include <odinwrap.h>
23#include <heapstring.h>
24#include <misc.h>
25#include <winnetwk.h>
26
27// Undocumented Stuff
28// MPR.DLL of Windows NT
29
30// MultinetGetErrorTextA
31// MultinetGetErrorTextW
32// RestoreConnectionA0
33// WNetClearConnections
34// WNetConnectionDialog1A
35// WNetConnectionDialog1W
36// WNetConnectionDialog2
37// WNetDirectoryNotifyA
38// WNetDirectoryNotifyW
39// WNetDisconnectDialog1A
40// WNetDisconnectDialog1W
41// WNetDisconnectDialog2
42// WNetFMXEditPerm FileManager Extensions ?
43// WNetFMXGetPermCaps
44// WNetFMXGetPermHelp
45// WNetFormatNetworkNameA
46// WNetFormatNetworkNameW
47// WNetGetConnection2A
48// WNetGetConnection2W
49// WNetGetConnection3A
50// WNetGetConnection3W
51// WNetGetDirectoryTypeA
52// WNetGetDirectoryTypeW
53// WNetGetHomeDirectoryW NT specific
54// WNetGetNetworkInformationA
55// WNetGetNetworkInformationW
56// WNetGetPropertyTextA
57// WNetGetPropertyTextW
58// WNetGetProviderNameA
59// WNetGetProviderNameW
60// WNetGetSearchDialog
61// WNetLogonNotify
62// WNetPasswordChangeNotify
63// WNetPropertyDialogA
64// WNetPropertyDialogW
65// WNetRestoreConnectionW
66// WNetSetConnectionA
67// WNetSetConnectionW
68// WNetSupportGlobalEnum
69
70
71ODINDEBUGCHANNEL(MPR)
72
73/****************************************************************************
74 * Module Global Variables *
75 ****************************************************************************/
76
77static struct _MPRGlobals
78{
79 DWORD dwLastError; /* most recent extended error code set by a net func */
80} MPRGLOBALS;
81
82
83/*****************************************************************************
84 * Purpose: The MultinetGetConnectionPerformance finctuion returns information
85 * about the expected performance of a connection used to access a
86 * network resource.
87 * Parameters: LPNETRESOURCEA lpNetResource
88 * LPNETCONNECTIONINFOSTRUCT lpNetConnectInfoStruct
89 * Variables :
90 * Result : API-Returncode
91 * Remark : not documented
92 * Status : UNTESTED
93 *
94 * Author : Patrick Haller [Thu, 1999/11/04 19:55]
95 *****************************************************************************/
96
97ODINFUNCTION2(DWORD, MultinetGetConnectionPerformanceA,
98 LPNETRESOURCEA, lpNetResource,
99 LPNETCONNECTINFOSTRUCT, lpNetConnectInfoStruct)
100{
101 dprintf(("MPR:MultinetGetConnectionPerformanceA not implemented.\n"));
102 return (ERROR_NO_NETWORK);
103}
104
105
106/*****************************************************************************
107 * Purpose: The MultinetGetConnectionPerformance finctuion returns information
108 * about the expected performance of a connection used to access a
109 * network resource.
110 * Parameters: LPNETRESOURCEW lpNetResource
111 * LPNETCONNECTIONINFOSTRUCT lpNetConnectInfoStruct
112 * Variables :
113 * Result : API-Returncode
114 * Remark : not documented
115 * Status : UNTESTED
116 *
117 * Author : Patrick Haller [Thu, 1999/11/04 19:55]
118 *****************************************************************************/
119
120ODINFUNCTION2(DWORD, MultinetGetConnectionPerformanceW,
121 LPNETRESOURCEW, lpNetResource,
122 LPNETCONNECTINFOSTRUCT, lpNetConnectInfoStruct)
123{
124 dprintf(("MPR:MultinetGetConnectionPerformanceW not implemented.\n"));
125 return (ERROR_NO_NETWORK);
126}
127
128
129/*****************************************************************************
130 * WNetAddConnection2, makes a connection to a network
131 * resource. The function can redirect a local device to the network
132 * resource.
133 * Parameters: LPNETRESOURCE lpNetResource points to structure that specifies
134 * connection details
135 * LPCSTR lpPassword points to password string
136 * LPCSTR lpUsername points to user name string
137 * DWORD fdwConnection set of bit flags that specify
138 * connection options
139 * Variables :
140 * Result : API-Returncode
141 * Remark :
142 * Status : UNTESTED STUB
143 *
144 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
145 *****************************************************************************/
146
147ODINFUNCTION4(DWORD, WNetAddConnection2A,
148 LPNETRESOURCEA, lpNetResource,
149 LPCSTR, lpPassword,
150 LPCSTR, lpUsername,
151 DWORD, fdwConnection)
152{
153 dprintf(("MPR:WNetAddConnection2A not implemented.\n"));
154 return (ERROR_NO_NETWORK);
155}
156
157
158/*****************************************************************************
159 * WNetAddConnection2 makes a connection to a network
160 * resource. The function can redirect a local device to the network
161 * resource.
162 * Parameters: LPNETRESOURCE lpNetResource points to structure that specifies
163 * connection details
164 * LPCSTR lpPassword points to password string
165 * LPCSTR lpUsername points to user name string
166 * DWORD fdwConnection set of bit flags that specify
167 * connection options
168 * Variables :
169 * Result : API-Returncode
170 * Remark :
171 * Status : UNTESTED STUB
172 *
173 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
174 *****************************************************************************/
175
176ODINFUNCTION4(DWORD, WNetAddConnection2W,
177 LPNETRESOURCEW, lpNetResource,
178 LPCWSTR, lpPassword,
179 LPCWSTR, lpUsername,
180 DWORD, fdwConnection)
181{
182 dprintf(("MPR:WNetAddConnection2W not implemented.\n"));
183 return (ERROR_NO_NETWORK);
184}
185
186
187
188/*****************************************************************************
189 * WNetAddConnection3 makes, aconnection to a network
190 * resource. The function can redirect a local device to the network
191 * resource.
192 * Parameters: HWND hwndOwner handle to an owner window for dialog
193 * LPNETRESOURCE lpNetResource points to structure that specifies
194 * connection details
195 * LPCSTR lpPassword points to password string
196 * LPCSTR lpUsername points to user name string
197 * DWORD fdwConnection set of bit flags that specify
198 * connection options
199 * Variables :
200 * Result : API-Returncode
201 * Remark :
202 * Status : UNTESTED STUB
203 *
204 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
205 *****************************************************************************/
206
207ODINFUNCTION5(DWORD, WNetAddConnection3A,
208 HWND, hwndOwner,
209 LPNETRESOURCEA, lpNetResource,
210 LPCSTR, lpPassword,
211 LPCSTR, lpUsername,
212 DWORD, fdwConnection)
213{
214 dprintf(("MPR:WNetAddConnection3A not implemented.\n"));
215 return (ERROR_NO_NETWORK);
216}
217
218
219/*****************************************************************************
220 * WNetAddConnection3 makes, connection to a network
221 * resource. The function can redirect a local device to the network
222 * resource.
223 * Parameters: HWND hwndOwner handle to an owner window for dialog
224 * LPNETRESOURCE lpNetResource points to structure that specifies
225 * connection details
226 * LPCSTR lpPassword points to password string
227 * LPCSTR lpUsername points to user name string
228 * DWORD fdwConnection set of bit flags that specify
229 * connection options
230 * Variables :
231 * Result : API-Returncode
232 * Remark :
233 * Status : UNTESTED STUB
234 *
235 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
236 *****************************************************************************/
237
238ODINFUNCTION5(DWORD, WNetAddConnection3W,
239 HWND, hwndOwner,
240 LPNETRESOURCEW, lpNetResource,
241 LPCWSTR, lpPassword,
242 LPCWSTR, lpUsername,
243 DWORD, fdwConnection)
244{
245 dprintf(("MPR:WNetAddConnection3W not implemented.\n"));
246 return (ERROR_NO_NETWORK);
247}
248
249
250/*****************************************************************************
251 * WNetAddConnectionA makes a connection to a network
252 * resource. The function can redirect a local device to the network
253 * resource.
254 * Parameters: LPCSTR lpRemoteName address of network device name
255 * LPCSTR lpPassword points to password string
256 * LPCSTR lpUsername points to user name string
257 * Variables :
258 * Result : API-Returncode
259 * Remark :
260 * Status : UNTESTED STUB
261 *
262 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
263 *****************************************************************************/
264
265ODINFUNCTION3(DWORD, WNetAddConnectionA,
266 LPCSTR, lpRemoteName,
267 LPCSTR, lpPassword,
268 LPCSTR, lpUsername)
269{
270 dprintf(("MPR:WNetAddConnectionA not implemented.\n"));
271 return (ERROR_NO_NETWORK);
272}
273
274
275/*****************************************************************************
276 * WNetAddConnection makes a connection to a network
277 * resource. The function can redirect a local device to the network
278 * resource.
279 * Parameters: LPCWSTR lpRemoteName address of network device name
280 * LPCWSTR lpPassword points to password string
281 * LPCWSTR lpUsername points to user name string
282 * Variables :
283 * Result : API-Returncode
284 * Remark :
285 * Status : UNTESTED STUB
286 *
287 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
288 *****************************************************************************/
289
290ODINFUNCTION3(DWORD, WNetAddConnectionW,
291 LPCWSTR, lpRemoteName,
292 LPCWSTR, lpPassword,
293 LPCWSTR, lpUsername)
294{
295 dprintf(("MPR:WNetAddConnectionW not implemented.\n"));
296 return (ERROR_NO_NETWORK);
297}
298
299
300/*****************************************************************************
301 * The WNetCancelConnection2 function breaks an existing network
302 * connection. It can also be used to remove remembered network
303 * connections that are not currently connected. This function
304 * supersedes WNetCancelConnection.
305 * Parameters: LPTSTR lpszName address of resource name to disconnect
306 * DWORD fdwConnection connection type flags
307 * BOOL fForce flag for unconditional disconnect
308 * Variables :
309 * Result : API-Returncode
310 * Remark :
311 * Status : UNTESTED STUB
312 *
313 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
314 *****************************************************************************/
315
316ODINFUNCTION3(DWORD, WNetCancelConnection2A,
317 LPTSTR, lpszName,
318 DWORD, fdwConnection,
319 BOOL, fForce)
320{
321 dprintf(("MPR:WNetCancelConnection2A not implemented.\n"));
322 return (ERROR_NOT_CONNECTED);
323}
324
325
326/*****************************************************************************
327 * The WNetCancelConnection2 function breaks an existing network
328 * connection. It can also be used to remove remembered network
329 * connections that are not currently connected. This function
330 * supersedes WNetCancelConnection.
331 * Parameters: LPTSTR lpszName address of resource name to disconnect
332 * DWORD fdwConnection connection type flags
333 * BOOL fForce flag for unconditional disconnect
334 * Variables :
335 * Result : API-Returncode
336 * Remark :
337 * Status : UNTESTED STUB
338 *
339 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
340 *****************************************************************************/
341
342ODINFUNCTION3(DWORD, WNetCancelConnection2W,
343 LPWSTR, lpszName,
344 DWORD, fdwConnection,
345 BOOL, fForce)
346{
347 dprintf(("MPR:WNetCancelConnection2W not implemented.\n"));
348 return (ERROR_NOT_CONNECTED);
349}
350
351
352/*****************************************************************************
353 * The WNetCancelConnection2 function breaks an existing network
354 * connection.
355 * Parameters: LPTSTR lpszName address of resource name to disconnect
356 * BOOL fForce flag for unconditional disconnect
357 * Variables :
358 * Result : API-Returncode
359 * Remark :
360 * Status : UNTESTED STUB
361 *
362 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
363 *****************************************************************************/
364
365ODINFUNCTION2(DWORD, WNetCancelConnectionA,
366 LPTSTR, lpszName,
367 BOOL, fForce)
368{
369 dprintf(("MPR:WNetCancelConnectionA not implemented.\n"));
370 return (ERROR_NOT_CONNECTED);
371}
372
373
374/*****************************************************************************
375 * The WNetCancelConnection2 function breaks an existing network
376 * connection.
377 * Parameters: LPTSTR lpszName address of resource name to disconnect
378 * BOOL fForce flag for unconditional disconnect
379 * Variables :
380 * Result : API-Returncode
381 * Remark :
382 * Status : UNTESTED STUB
383 *
384 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
385 *****************************************************************************/
386
387ODINFUNCTION2(DWORD, WNetCancelConnectionW,
388 LPWSTR, lpszName,
389 BOOL, fForce)
390{
391 dprintf(("MPR:WNetCancelConnectionW not implemented.\n"));
392 return (ERROR_NOT_CONNECTED);
393}
394
395
396/*****************************************************************************
397 *
398 * Purpose : The WNetCloseEnum function ends a network resource enumeration
399 * started by the WNetOpenEnum function.
400 * Parameters: HANDLE hEnum
401 * Variables :
402 * Result : API-Returncode
403 * Remark :
404 * Status : UNTESTED STUB
405 *
406 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
407 *****************************************************************************/
408
409ODINFUNCTION1(DWORD, WNetCloseEnum,
410 HANDLE, hEnum)
411{
412 dprintf(("MPR:WNetCloseEnum not implemented.\n"));
413 return (ERROR_NO_NETWORK);
414}
415
416
417/*****************************************************************************
418 * The WNetConnectionDialog function starts a general browsing
419 * dialog box for connecting to network resources.
420 * Parameters: HWND hwnd handle of window owning dialog box
421 * DWORD fdwResourceType resource type to allow connections to
422 * Variables :
423 * Result : API-Returncode
424 * Remark :
425 * Status : UNTESTED STUB
426 *
427 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
428 *****************************************************************************/
429
430ODINFUNCTION2(DWORD, WNetConnectionDialog,
431 HWND, hwnd,
432 DWORD, fdwResourceType)
433{
434 dprintf(("MPR:WNetConnectionDialog not implemented.\n"));
435 return (ERROR_NO_NETWORK);
436}
437
438
439/*****************************************************************************
440 * The WNetDisconnectDialog function starts a general browsing
441 * dialog box for disconnecting from network resources.
442 * Parameters: HWND hwnd handle of window owning dialog box
443 * DWORD fdwResourceType resource type to disconnect from
444 * Variables :
445 * Result : API-Returncode
446 * Remark :
447 * Status : UNTESTED STUB
448 *
449 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
450 *****************************************************************************/
451
452ODINFUNCTION2(DWORD, WNetDisconnectDialog,
453 HWND, hwnd,
454 DWORD, fdwResourceType)
455{
456 dprintf(("MPR:WNetDisconnectDialog not implemented.\n"));
457 return (ERROR_NO_NETWORK);
458}
459
460
461/*****************************************************************************
462 * The WNetEnumResource function continues a network-resource
463 * enumeration started by the WNetOpenEnum function.
464 * Parameters: HANDLE hEnum handle of enumeration
465 * LPDWORD lpcEntries address of entries to list
466 * LPVOID lpvBuffer address of buffer for results
467 * LPDWORD lpcbBuffer address of buffer size variable
468 * Variables :
469 * Result : API-Returncode
470 * Remark :
471 * Status : UNTESTED STUB
472 *
473 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
474 *****************************************************************************/
475
476ODINFUNCTION4(DWORD, WNetEnumResourceA,
477 HANDLE, hEnum,
478 LPDWORD, lpcEntries,
479 LPVOID, lpvBuffer,
480 LPDWORD, lpcBuffer)
481{
482 dprintf(("MPR:WNetEnumResourceA not implemented.\n"));
483 return (ERROR_NO_NETWORK);
484}
485
486
487/*****************************************************************************
488 * The WNetEnumResource, functioncontinues a network-resource
489 * enumeration started by the WNetOpenEnum function.
490 * Parameters: HANDLE hEnum handle of enumeration
491 * LPDWORD lpcEntries address of entries to list
492 * LPVOID lpvBuffer address of buffer for results
493 * LPDWORD lpcbBuffer address of buffer size variable
494 * Variables :
495 * Result : API-Returncode
496 * Remark :
497 * Status : UNTESTED STUB
498 *
499 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
500 *****************************************************************************/
501
502ODINFUNCTION4(DWORD, WNetEnumResourceW,
503 HANDLE, hEnum,
504 LPDWORD, lpcEntries,
505 LPVOID, lpvBuffer,
506 LPDWORD, lpcBuffer)
507{
508 dprintf(("MPR:WNetEnumResourceW not implemented.\n"));
509 return (ERROR_NO_NETWORK);
510}
511
512
513/*****************************************************************************
514 * The WNetGetConnection function retrieves the name of the network
515 * resource associated with a local device.
516 * Parameters: LPTSTR lpszLocalName address of local name
517 * LPTSTR lpszRemoteName address of buffer for remote name
518 * LPDWORD lpcchBuffer address of buffer size, in characters
519 * Variables :
520 * Result : API-Returncode
521 * Remark :
522 * Status : UNTESTED STUB
523 *
524 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
525 *****************************************************************************/
526
527ODINFUNCTION3(DWORD, WNetGetConnectionA,
528 LPTSTR, lpszLocalName,
529 LPTSTR, lpszRemoteName,
530 LPDWORD, lpcchBuffer)
531{
532 dprintf(("MPR:WNetGetConnectionA not implemented.\n"));
533 return (ERROR_NO_NETWORK);
534}
535
536
537/*****************************************************************************
538 * The WNetGetConnection function retrieves the name of the network
539 * resource associated with a local device.
540 * Parameters: LPWSTR lpszLocalName address of local name
541 * LPWSTR lpszRemoteName address of buffer for remote name
542 * LPDWORD lpcchBuffer address of buffer size, in characters
543 * Variables :
544 * Result : API-Returncode
545 * Remark :
546 * Status : UNTESTED STUB
547 *
548 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
549 *****************************************************************************/
550
551ODINFUNCTION3(DWORD, WNetGetConnectionW,
552 LPWSTR, lpszLocalName,
553 LPWSTR, lpszRemoteName,
554 LPDWORD, lpcchBuffer)
555{
556 dprintf(("MPR:WNetGetConnectionW not implemented.\n"));
557 return (ERROR_NO_NETWORK);
558}
559
560
561/*****************************************************************************
562 * The WNetGetLastError function retrieves, themost recent extended
563 * error code set by a Windows network function.
564 * Parameters: LPDWORD lpdwErrorCode address of error code
565 * LPTSTR lpszDescription address of string describing error
566 * DWORD cchDescription size of description buffer, in characters
567 * LPTSTR lpszName address of buffer for provider name
568 * DWORD cchName size of provider name buffer
569 * Variables :
570 * Result : API-Returncode
571 * Remark :
572 * Status : UNTESTED STUB
573 *
574 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
575 *****************************************************************************/
576
577ODINFUNCTION5(DWORD, WNetGetLastErrorA,
578 LPDWORD, lpdwErrorCode,
579 LPTSTR, lpszDescription,
580 DWORD, cchDescription,
581 LPTSTR, lpszName,
582 DWORD, cchName)
583{
584 if ( (lpdwErrorCode == NULL) || /* check parameters */
585 (lpszDescription == NULL) ||
586 (cchDescription == 0) ||
587 (lpszName == NULL) ||
588 (cchName == 0) )
589 return (ERROR_INVALID_ADDRESS); /* abort with error */
590
591 *lpdwErrorCode = MPRGLOBALS.dwLastError; /* set that error code */
592 /* @@@PH Get error text from some net-MSG-file */
593 lpszDescription[cchDescription - 1] = 0; /* ensure string termination */
594
595 strncpy (lpszName, /* return provider name */
596 "OS/2 LAN", /* that's our default provider */
597 cchName);
598 lpszName[cchName - 1] = 0; /* ensure string termination */
599
600 return (NO_ERROR);
601}
602
603
604
605/*****************************************************************************
606 * The WNetGetLastError function retrieves, themost recent extended
607 * error code set by a Windows network function.
608 * Parameters: LPDWORD lpdwErrorCode address of error code
609 * LPWSTR lpszDescription address of string describing error
610 * DWORD cchDescription size of description buffer, in characters
611 * LPWSTR lpszName address of buffer for provider name
612 * DWORD cchName size of provider name buffer
613 * Variables :
614 * Result : API-Returncode
615 * Remark :
616 * Status : UNTESTED STUB
617 *
618 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
619 *****************************************************************************/
620
621ODINFUNCTION5(DWORD, WNetGetLastErrorW,
622 LPDWORD, lpdwErrorCode,
623 LPWSTR, lpszDescription,
624 DWORD, cchDescription,
625 LPWSTR, lpszName,
626 DWORD, cchName)
627{
628 if ( (lpdwErrorCode == NULL) || /* check parameters */
629 (lpszDescription == NULL) ||
630 (cchDescription == 0) ||
631 (lpszName == NULL) ||
632 (cchName == 0) )
633 return (ERROR_INVALID_ADDRESS); /* abort with error */
634
635 *lpdwErrorCode = MPRGLOBALS.dwLastError; /* set that error code */
636 /* @@@PH Get error text from some net-MSG-file */
637 lpszDescription[cchDescription - 1] = 0; /* ensure string termination */
638
639 lstrcpynW(lpszName, /* return provider name */
640 (LPCWSTR)L"OS/2 LAN", /* that's our default provider */
641 cchName);
642 lpszName[cchName - 1] = 0; /* ensure string termination */
643
644 return (NO_ERROR);
645}
646
647
648/*****************************************************************************
649 * Purpose : The WNetGetResourceInformation function retrieves enumeration
650 * information for a network resource. You typically use this
651 * function when the user specifies an object. Call this function
652 * in conjunction with WNetGetResourceParent to determine the
653 * placement and nature of the resource in the browse hierarchy.
654 * Unlike WNetGetResourceParent, WNetGetResourceInformation always
655 * tries to determine the network provider that owns the resource
656 * and the type of the resource, although it might not currently
657 * be accessible (or even exist if the type of the resource was
658 * specified by the caller).
659 * Parameters: LPNETRESOURCEA lpNetResource specifies the network resource
660 * LPVOID lpBuffer pointer to a buffer for results
661 * LPDWORD cbBuffer size of the buffer
662 * LPTSTR *lplpSystem pointer to a string in the buffer
663 * Variables :
664 * Result : API-Returncode
665 * Remark :
666 * Status : UNTESTED STUB
667 *
668 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
669 *****************************************************************************/
670
671ODINFUNCTION4(DWORD, WNetGetResourceInformationA,
672 LPNETRESOURCEA, lpNetResource,
673 LPVOID, lpBuffer,
674 LPDWORD, cbBuffer,
675 LPTSTR *, lplpSystem)
676{
677 dprintf(("MPR:WNetGetResourceInformationA not implemented.\n"));
678 return (WN_NO_NETWORK);
679}
680
681
682/*****************************************************************************
683 * Purpose : The WNetGetResourceInformation function retrieves enumeration
684 * information for a network resource. You typically use this
685 * function when the user specifies an object. Call this function
686 * in conjunction with WNetGetResourceParent to determine the
687 * placement and nature of the resource in the browse hierarchy.
688 * Unlike WNetGetResourceParent, WNetGetResourceInformation always
689 * tries to determine the network provider that owns the resource
690 * and the type of the resource, although it might not currently
691 * be accessible (or even exist if the type of the resource was
692 * specified by the caller).
693 * Parameters: LPNETRESOURCEW lpNetResource specifies the network resource
694 * LPVOID lpBuffer pointer to a buffer for results
695 * LPDWORD cbBuffer size of the buffer
696 * LPWSTR *lplpSystem pointer to a string in the buffer
697 * Variables :
698 * Result : API-Returncode
699 * Remark :
700 * Status : UNTESTED STUB
701 *
702 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
703 *****************************************************************************/
704
705ODINFUNCTION4(DWORD, WNetGetResourceInformationW,
706 LPNETRESOURCEW, lpNetResource,
707 LPVOID, lpBuffer,
708 LPDWORD, cbBuffer,
709 LPWSTR *, lplpSystem)
710{
711 dprintf(("MPR:WNetGetResourceInformationW (%08x,%08x,%08x,%08x) not implemented.\n",
712 lpNetResource,
713 lpBuffer,
714 cbBuffer,
715 lplpSystem));
716
717 return (WN_NO_NETWORK);
718}
719
720
721/*****************************************************************************
722 * The WNetGetResourceParent function lets you navigate up from a
723 * resource. It enables browsing to commence based on the name of
724 * a network resource. This function also allows navigating up from
725 * a browsed resource to find connectable resources.
726 * Parameters: LPNETRESOURCEA lpNetResource specifies the network resource
727 * LPVOID lpBuffer pointer to a buffer for results
728 * LPDWORD lpBufferSize size, in bytes, of the buffer
729 * Variables :
730 * Result : API-Returncode
731 * Remark :
732 * Status : UNTESTED STUB
733 *
734 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
735 *****************************************************************************/
736
737ODINFUNCTION3(DWORD, WNetGetResourceParentA,
738 LPNETRESOURCEA, lpNetResource,
739 LPVOID, lpBuffer,
740 LPDWORD, lpBufferSize)
741{
742 dprintf(("MPR:WNetGetResourceParentA not implemented.\n"));
743 return (WN_ACCESS_DENIED);
744}
745
746
747/*****************************************************************************
748 * The WNetGetResourceParent function lets you navigate up from a
749 * resource. It enables browsing to commence based on the name of
750 * a network resource. This function also allows navigating up from
751 * a browsed resource to find connectable resources.
752 * Parameters: LPNETRESOURCEW lpNetResource specifies the network resource
753 * LPVOID lpBuffer pointer to a buffer for results
754 * LPDWORD lpBufferSize size, in bytes, of the buffer
755 * Variables :
756 * Result : API-Returncode
757 * Remark :
758 * Status : UNTESTED STUB
759 *
760 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
761 *****************************************************************************/
762
763ODINFUNCTION3(DWORD, WNetGetResourceParentW,
764 LPNETRESOURCEW, lpNetResource,
765 LPVOID, lpBuffer,
766 LPDWORD, lpBufferSize)
767{
768 dprintf(("MPR:WNetGetResourceParentW not implemented.\n"));
769 return (WN_ACCESS_DENIED);
770}
771
772
773/*****************************************************************************
774 * The WNetGetUniversalName, functiontakes a drive-based path for
775 * a network resource and obtains a data structure that contains a
776 * more universal form of the name.
777 * Parameters: LPCSTR lpLocalPath address of drive-based path for a network resource
778 * DWORD dwInfoLevel specifies form of universal name to be obtained
779 * LPVOID lpBuffer address of buffer that receives universal name data structure
780 * LPDWORD lpBufferSize address of variable that specifies size of buffer
781 * Variables :
782 * Result : API-Returncode
783 * Remark :
784 * Status : UNTESTED STUB
785 *
786 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
787 *****************************************************************************/
788
789ODINFUNCTION4(DWORD, WNetGetUniversalNameA,
790 LPCSTR, lpLocalPath,
791 DWORD, dwInfoLevel,
792 LPVOID, lpBuffer,
793 LPDWORD, lpBufferSize)
794{
795 dprintf(("MPR:WNetGetUniversalNameA not implemented.\n"));
796 return (ERROR_NO_NETWORK);
797}
798
799
800/*****************************************************************************
801 * The WNetGetUniversalName, functiontakes a drive-based path for
802 * a network resource and obtains a data structure that contains a
803 * more universal form of the name.
804 * Parameters: LPCWSTR lpLocalPath address of drive-based path for a network resource
805 * DWORD dwInfoLevel specifies form of universal name to be obtained
806 * LPVOID lpBuffer address of buffer that receives universal name data structure
807 * LPDWORD lpBufferSize address of variable that specifies size of buffer
808 * Variables :
809 * Result : API-Returncode
810 * Remark :
811 * Status : UNTESTED STUB
812 *
813 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
814 *****************************************************************************/
815
816ODINFUNCTION4(DWORD, WNetGetUniversalNameW,
817 LPCWSTR, lpLocalPath,
818 DWORD, dwInfoLevel,
819 LPVOID, lpBuffer,
820 LPDWORD, lpBufferSize)
821{
822 dprintf(("MPR:WNetGetUniversalNameW not implemented.\n"));
823 return (ERROR_NO_NETWORK);
824}
825
826
827/*****************************************************************************
828 * The WNetGetUser function retrieves the current default user name
829 * or the user name used to establish a network connection.
830 * Parameters: LPTSTR lpszLocalName address of local name to get user name for
831 * LPTSTR lpszUserName address of buffer for user name
832 * LPDWORD lpcchBuffer address of buffer size variable
833 * Variables :
834 * Result : API-Returncode
835 * Remark :
836 * Status : UNTESTED STUB
837 *
838 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
839 *****************************************************************************/
840
841ODINFUNCTION3(DWORD, WNetGetUserA,
842 LPTSTR, lpszLocalName,
843 LPTSTR, lpszUserName,
844 LPDWORD, lpcchBuffer)
845{
846 dprintf(("MPR:WNetGetUserA not implemented.\n"));
847 return (ERROR_NO_NETWORK);
848}
849
850
851/*****************************************************************************
852 * The WNetGetUser function retrieves the current default user name
853 * or the user name used to establish a network connection.
854 * Parameters: LPWSTR lpszLocalName address of local name to get user name for
855 * LPWSTR lpszUserName address of buffer for user name
856 * LPDWORD lpcchBuffer address of buffer size variable
857 * Variables :
858 * Result : API-Returncode
859 * Remark :
860 * Status : UNTESTED STUB
861 *
862 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
863 *****************************************************************************/
864
865ODINFUNCTION3(DWORD, WNetGetUserW,
866 LPWSTR, lpszLocalName,
867 LPWSTR, lpszUserName,
868 LPDWORD, lpcchBuffer)
869{
870 dprintf(("MPR:WNetGetUserW not implemented.\n"));
871 return (ERROR_NO_NETWORK);
872}
873
874
875/*****************************************************************************
876 * The WNetOpenEnum function starts, anenumeration of network
877 * resources or existing connections.
878 * Parameters: DWORD fdwScope scope of enumeration
879 * DWORD fdwType resource types to list
880 * DWORD fdwUsage resource usage to list
881 * LPNETRESOURCEA lpNetResource address of resource structure
882 * LPHANDLE lphEnum address of enumeration handle buffer
883 * Variables :
884 * Result : API-Returncode
885 * Remark :
886 * Status : UNTESTED STUB
887 *
888 * Author : Patrick Haller [Fri, 1998/02/27 14:41]
889 *****************************************************************************/
890
891ODINFUNCTION5(DWORD, WNetOpenEnumA,
892 DWORD, fdwScope,
893 DWORD, fdwType,
894 DWORD, fdwUsage,
895 LPNETRESOURCEA, lpNetResource,
896 LPHANDLE, lphEnum)
897{
898 dprintf(("MPR:WNetOpenEnumA not implemented.\n"));
899 return (ERROR_NO_NETWORK);
900}
901
902
903/*****************************************************************************
904 * The WNetOpenEnum function starts, anenumeration of network
905 * resources or existing connections.
906 * Parameters: DWORD fdwScope scope of enumeration
907 * DWORD fdwType resource types to list
908 * DWORD fdwUsage resource usage to list
909 * LPNETRESOURCEW lpNetResource address of resource structure
910 * LPHANDLE lphEnum address of enumeration handle buffer
911 * Variables :
912 * Result : API-Returncode
913 * Remark :
914 * Status : UNTESTED STUB
915 *
916 * Author : Patrick Haller [Fri, 1998/02/27 14:41]
917 *****************************************************************************/
918
919ODINFUNCTION5(DWORD, WNetOpenEnumW,
920 DWORD, fdwScope,
921 DWORD, fdwType,
922 DWORD, fdwUsage,
923 LPNETRESOURCEW, lpNetResource,
924 LPHANDLE, lphEnum)
925{
926 dprintf(("MPR:WNetOpenEnumW not implemented.\n"));
927 return (ERROR_NO_NETWORK);
928}
929
930
931/*****************************************************************************
932 * The WNetSetLastError function is used to set the error code status
933 * of this module.
934 * Parameters: DWORD dwErrorCode error code
935 * LPTSTR lpszDescription address of string describing error
936 * LPTSTR lpszName address of buffer for provider name
937 * Variables :
938 * Result : API-Returncode
939 * Remark : not documented
940 * Status : UNTESTED
941 *
942 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
943 *****************************************************************************/
944
945ODINFUNCTION3(DWORD, WNetSetLastErrorA,
946 DWORD, dwErrorCode,
947 LPTSTR, lpszDescription,
948 LPTSTR, lpszName)
949{
950 dprintf(("MPR:WNetSetLastErrorA not implemented correctly.\n"));
951 MPRGLOBALS.dwLastError = dwErrorCode;
952 return (NO_ERROR);
953}
954
955
956
957/*****************************************************************************
958 * The WNetSetLastError function is used to set the error code status
959 * of this module.
960 * Parameters: DWORD dwErrorCode error code
961 * LPWSTR lpszDescription address of string describing error
962 * LPWSTR lpszName address of buffer for provider name
963 * Variables :
964 * Result : API-Returncode
965 * Remark : not documented
966 * Status : UNTESTED
967 *
968 * Author : Patrick Haller [Fri, 1998/02/27 11:55]
969 *****************************************************************************/
970
971ODINFUNCTION3(DWORD, WNetSetLastErrorW,
972 DWORD, dwErrorCode,
973 LPWSTR, lpszDescription,
974 LPWSTR, lpszName)
975{
976 dprintf(("MPR:WNetSetLastErrorW not implemented correctly.\n"));
977 MPRGLOBALS.dwLastError = dwErrorCode;
978 return (NO_ERROR);
979}
980
981
982/*****************************************************************************
983 * Purpose: The WNetUSeConnectionA function is used to establish a connection
984 * to a network object, especially for browsing. The function may
985 * optionally prompt the user for login or authentification.
986 * Parameters: HWND hwndOwner
987 * LPNETRESOURCEA lpNetResource
988 * LPSTR lpPassword
989 * LPSTR lpUserID
990 * DWORD dwFlags
991 * LPSTR lpAccessName
992 * LPDWORD lpBufferSize
993 * LPDWORD lpResult
994 * Variables :
995 * Result : API-Returncode
996 * Remark : not documented
997 * Status : UNTESTED
998 *
999 * Author : Patrick Haller [Thu, 1999/11/04 19:55]
1000 *****************************************************************************/
1001
1002ODINFUNCTION8(DWORD, WNetUseConnectionA,
1003 HWND, hwndOwner,
1004 LPNETRESOURCEA,lpNetResource,
1005 LPSTR, lpPassword,
1006 LPSTR, lpUserID,
1007 DWORD, dwFlags,
1008 LPSTR, lpAccessName,
1009 LPDWORD, lpBufferSize,
1010 LPDWORD, lpResult)
1011{
1012 dprintf(("MPR:WNetUseConnectionA not implemented.\n"));
1013 return (ERROR_NO_NETWORK);
1014}
1015
1016
1017/*****************************************************************************
1018 * Purpose: The WNetUSeConnectionW function is used to establish a connection
1019 * to a network object, especially for browsing. The function may
1020 * optionally prompt the user for login or authentification.
1021 * Parameters: HWND hwndOwner
1022 * LPNETRESOURCEW lpNetResource
1023 * LPWSTR lpPassword
1024 * LPWSTR lpUserID
1025 * DWORD dwFlags
1026 * LPWSTR lpAccessName
1027 * LPDWORD lpBufferSize
1028 * LPDWORD lpResult
1029 * Variables :
1030 * Result : API-Returncode
1031 * Remark : not documented
1032 * Status : UNTESTED
1033 *
1034 * Author : Patrick Haller [Thu, 1999/11/04 19:55]
1035 *****************************************************************************/
1036
1037ODINFUNCTION8(DWORD, WNetUseConnectionW,
1038 HWND, hwndOwner,
1039 LPNETRESOURCEW,lpNetResource,
1040 LPWSTR, lpPassword,
1041 LPWSTR, lpUserID,
1042 DWORD, dwFlags ,
1043 LPWSTR, lpAccessName,
1044 LPDWORD, lpBufferSize,
1045 LPDWORD, lpResult)
1046{
1047 dprintf(("MPR:WNetUseConnectionW not implemented.\n"));
1048 return (ERROR_NO_NETWORK);
1049}
1050
Note: See TracBrowser for help on using the repository browser.