1 | /* $Id: use.cpp,v 1.1 2001-09-07 08:20:59 phaller Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | *
|
---|
5 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
6 | *
|
---|
7 | */
|
---|
8 | /*
|
---|
9 | * NETAPI32 "use" APIs
|
---|
10 | *
|
---|
11 | * Copyright 1998 Patrick Haller
|
---|
12 | *
|
---|
13 | * Note: functions that return structures/buffers seem to append strings
|
---|
14 | * at the end of the buffer. Currently, we just allocate the strings
|
---|
15 | * "normally". Therefore a caller that just does a NetApiBufferFree() on the
|
---|
16 | * returned buffer will leak all allocated strings.
|
---|
17 | *
|
---|
18 | */
|
---|
19 |
|
---|
20 |
|
---|
21 | /****************************************************************************
|
---|
22 | * Includes *
|
---|
23 | ****************************************************************************/
|
---|
24 |
|
---|
25 | #include <odin.h>
|
---|
26 | #include <odinwrap.h>
|
---|
27 | #include <os2win.h>
|
---|
28 | #include <misc.h>
|
---|
29 | #include <string.h>
|
---|
30 | #include <unicode.h>
|
---|
31 | #include <heapstring.h>
|
---|
32 | #include <winconst.h>
|
---|
33 |
|
---|
34 | #include "oslibnet.h"
|
---|
35 | #include "lanman.h"
|
---|
36 |
|
---|
37 | ODINDEBUGCHANNEL(WNETAP32-USE)
|
---|
38 |
|
---|
39 |
|
---|
40 | /****************************************************************************
|
---|
41 | * Module Global Variables *
|
---|
42 | ****************************************************************************/
|
---|
43 |
|
---|
44 |
|
---|
45 | /*****************************************************************************
|
---|
46 | * Name : NET_API_STATUS NetUseAdd
|
---|
47 | * Purpose : add remote device association
|
---|
48 | * Parameters: LPWSTR lpUncServerName
|
---|
49 | * DWORD dwLevel
|
---|
50 | * LPBYTE lpBuf
|
---|
51 | * LPDWORD lpParmError
|
---|
52 | * Variables :
|
---|
53 | * Result :
|
---|
54 | * Remark :
|
---|
55 | * Status : UNTESTED STUB
|
---|
56 | *
|
---|
57 | * Author : Patrick Haller [Thu, 1999/08/18 00:15]
|
---|
58 | *****************************************************************************/
|
---|
59 |
|
---|
60 | ODINFUNCTION4(NET_API_STATUS, OS2NetUseAdd,
|
---|
61 | LPWSTR, lpUncServerName,
|
---|
62 | DWORD, dwLevel,
|
---|
63 | LPBYTE, lpBuf,
|
---|
64 | LPDWORD, lpParmError)
|
---|
65 | {
|
---|
66 | dprintf(("NETAPI32: NetUseAdd(%08xh,%08xh,%08xh,%08xh) not implemented\n",
|
---|
67 | lpUncServerName,
|
---|
68 | dwLevel,
|
---|
69 | lpBuf,
|
---|
70 | lpParmError));
|
---|
71 |
|
---|
72 | return (NERR_BASE);
|
---|
73 | }
|
---|
74 |
|
---|
75 |
|
---|
76 | /*****************************************************************************
|
---|
77 | * Name : NET_API_STATUS NetUseDel
|
---|
78 | * Purpose : remove remote device association
|
---|
79 | * Parameters: LPWSTR lpUncServerName
|
---|
80 | * LPWSTR lpUseName
|
---|
81 | * DWORD dwForceCond
|
---|
82 | * Variables :
|
---|
83 | * Result :
|
---|
84 | * Remark :
|
---|
85 | * Status : UNTESTED STUB
|
---|
86 | *
|
---|
87 | * Author : Patrick Haller [Thu, 1999/08/18 00:15]
|
---|
88 | *****************************************************************************/
|
---|
89 |
|
---|
90 | ODINFUNCTION3(NET_API_STATUS, OS2NetUseDel,
|
---|
91 | LPWSTR, lpUncServerName,
|
---|
92 | LPWSTR, lpUseName,
|
---|
93 | DWORD, dwForceCond)
|
---|
94 | {
|
---|
95 | dprintf(("NETAPI32: NetUseDel(%08xh,%08xh,%08xh) not implemented\n",
|
---|
96 | lpUncServerName,
|
---|
97 | lpUseName,
|
---|
98 | dwForceCond));
|
---|
99 |
|
---|
100 | return (NERR_BASE);
|
---|
101 | }
|
---|
102 |
|
---|
103 |
|
---|
104 | /*****************************************************************************
|
---|
105 | * Name : NET_API_STATUS NetUseEnum
|
---|
106 | * Purpose : retrieves information about all used devices
|
---|
107 | * Parameters: LPWSTR lpServerName
|
---|
108 | * DWORD dwLevel
|
---|
109 | * LPBYTE* bufptr
|
---|
110 | * DWORD dwPrefMaxLen
|
---|
111 | * LPDWORD lpdEntriesRead
|
---|
112 | * LPDWORD lpdTotalEntries
|
---|
113 | * LPDWORD lpdResumeHandle
|
---|
114 | * Variables :
|
---|
115 | * Result :
|
---|
116 | * Remark :
|
---|
117 | * Status : UNTESTED STUB
|
---|
118 | *
|
---|
119 | * Author : Patrick Haller [Thu, 1999/08/18 00:15]
|
---|
120 | *****************************************************************************/
|
---|
121 |
|
---|
122 | ODINFUNCTION7(NET_API_STATUS,OS2NetUseEnum,LPWSTR, lpServerName,
|
---|
123 | DWORD, dwLevel,
|
---|
124 | LPBYTE*, bufptr,
|
---|
125 | DWORD, dwPrefMaxLen,
|
---|
126 | LPDWORD, lpdEntriesRead,
|
---|
127 | LPDWORD, lpdTotalEntries,
|
---|
128 | LPDWORD, lpdResumeHandle)
|
---|
129 | {
|
---|
130 | dprintf(("NETAPI32: NetUseEnum not implemented\n"));
|
---|
131 |
|
---|
132 | return (NERR_BASE);
|
---|
133 | }
|
---|
134 |
|
---|
135 |
|
---|
136 | /*****************************************************************************
|
---|
137 | * Name : NET_API_STATUS NetUseGetInfo
|
---|
138 | * Purpose :
|
---|
139 | * Parameters: LPWSTR lpServerName
|
---|
140 | * LPWSTR lpUseName
|
---|
141 | * DWORD dwlevel
|
---|
142 | * LPBYTE *bufptr
|
---|
143 | * Variables :
|
---|
144 | * Result :
|
---|
145 | * Remark :
|
---|
146 | * Status : UNTESTED STUB
|
---|
147 | *
|
---|
148 | * Stub Generated through PE2LX Stubwizard 0.02 from Markus Montkowski
|
---|
149 | *
|
---|
150 | * Author : Markus Montkowski [09.07.98 21:28:38]
|
---|
151 | *****************************************************************************/
|
---|
152 |
|
---|
153 | ODINFUNCTION4(NET_API_STATUS,OS2NetUseGetInfo,LPWSTR, lpServerName,
|
---|
154 | LPWSTR, lpUseName,
|
---|
155 | DWORD, dwLevel,
|
---|
156 | LPBYTE*, bufptr)
|
---|
157 |
|
---|
158 | {
|
---|
159 |
|
---|
160 | dprintf(("NETAPI32: NetUseGetInfo not implemented\n"));
|
---|
161 |
|
---|
162 | return (NERR_BASE);
|
---|
163 | }
|
---|