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

Last change on this file since 10367 was 3928, checked in by bird, 25 years ago

Updated states.

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