Added version information.
[wine] / dlls / rasapi32 / rasapi.c
1 /*
2  * RASAPI32
3  *
4  * Copyright 1998,2001 Marcus Meissner
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "windef.h"
22 #include "ras.h"
23 #include "wine/debug.h"
24
25 WINE_DEFAULT_DEBUG_CHANNEL(ras);
26
27 /**************************************************************************
28  *                 RasEnumConnectionsA                  [RASAPI32.544]
29  */
30 DWORD WINAPI RasEnumConnectionsA( LPRASCONNA rca, LPDWORD lpcb, LPDWORD lpcConnections) {
31         /* Remote Access Service stuff is done by underlying OS anyway */
32         FIXME("(%p,%p,%p),stub!\n",rca,lpcb,lpcConnections);
33         FIXME("RAS support is not implemented! Configure program to use LAN connection/winsock instead!\n");
34         *lpcConnections = 0; /* no RAS connections available */
35
36         return 0;
37 }
38
39 /**************************************************************************
40  *                 RasEnumConnectionsW                  [RASAPI32.545]
41  */
42 DWORD WINAPI RasEnumConnectionsW( LPRASCONNW rcw, LPDWORD lpcb, LPDWORD lpcConnections) {
43         /* Remote Access Service stuff is done by underlying OS anyway */
44         FIXME("(%p,%p,%p),stub!\n",rcw,lpcb,lpcConnections);
45         FIXME("RAS support is not implemented! Configure program to use LAN connection/winsock instead!\n");
46         *lpcConnections = 0; /* no RAS connections available */
47
48         return 0;
49 }
50
51 /**************************************************************************
52  *                 RasEnumEntriesA                              [RASAPI32.546]
53  */
54 DWORD WINAPI RasEnumEntriesA( LPCSTR Reserved, LPCSTR lpszPhoneBook,
55         LPRASENTRYNAMEA lpRasEntryName,
56         LPDWORD lpcb, LPDWORD lpcEntries)
57 {
58         FIXME("(%p,%s,%p,%p,%p),stub!\n",Reserved,debugstr_a(lpszPhoneBook),
59             lpRasEntryName,lpcb,lpcEntries);
60         *lpcEntries = 0;
61         return 0;
62 }
63
64 /**************************************************************************
65  *                 RasEnumEntriesW                              [RASAPI32.547]
66  */
67 DWORD WINAPI RasEnumEntriesW( LPCWSTR Reserved, LPCWSTR lpszPhoneBook,
68         LPRASENTRYNAMEW lpRasEntryName,
69         LPDWORD lpcb, LPDWORD lpcEntries)
70 {
71         FIXME("(%p,%s,%p,%p,%p),stub!\n",Reserved,debugstr_w(lpszPhoneBook),
72             lpRasEntryName,lpcb,lpcEntries);
73         *lpcEntries = 0;
74         return 0;
75 }
76
77
78 /**************************************************************************
79  *                 RasGetEntryDialParamsA                       [RASAPI32.550]
80  */
81 DWORD WINAPI RasGetEntryDialParamsA(
82         LPCSTR lpszPhoneBook, LPRASDIALPARAMSA lpRasDialParams,
83         LPBOOL lpfPassword)
84 {
85         FIXME("(%s,%p,%p),stub!\n",debugstr_a(lpszPhoneBook),
86             lpRasDialParams,lpfPassword);
87         return 0;
88 }
89
90 /**************************************************************************
91  *                 RasHangUpA                   [RASAPI32.556]
92  */
93 DWORD WINAPI RasHangUpA( HRASCONN hrasconn)
94 {
95         FIXME("(%p),stub!\n",hrasconn);
96         return 0;
97 }
98
99 /**************************************************************************
100  *                 RasDeleteEntryA              [RASAPI32.7]
101  */
102 DWORD WINAPI RasDeleteEntryA(LPCSTR a, LPCSTR b)
103 {
104         FIXME("(%s,%s),stub!\n",debugstr_a(a),debugstr_a(b));
105         return 0;
106 }
107
108 /**************************************************************************
109  *                 RasDeleteEntryW              [RASAPI32.8]
110  */
111 DWORD WINAPI RasDeleteEntryW(LPCWSTR a, LPCWSTR b)
112 {
113         FIXME("(%s,%s),stub!\n",debugstr_w(a),debugstr_w(b));
114         return 0;
115 }
116
117 /**************************************************************************
118  *                 RasEnumAutodialAddressesA    [RASAPI32.14]
119  */
120 DWORD WINAPI RasEnumAutodialAddressesA(LPCSTR *a, LPDWORD b, LPDWORD c)
121 {
122         FIXME("(%p,%p,%p),stub!\n",a,b,c);
123         return 0;
124 }
125
126 /**************************************************************************
127  *                 RasEnumAutodialAddressesW    [RASAPI32.15]
128  */
129 DWORD WINAPI RasEnumAutodialAddressesW(LPCWSTR *a, LPDWORD b, LPDWORD c)
130 {
131         FIXME("(%p,%p,%p),stub!\n",a,b,c);
132         return 0;
133 }
134
135 typedef LPVOID LPRASAUTODIALENTRYA;
136 typedef LPVOID LPRASAUTODIALENTRYW;
137
138 /**************************************************************************
139  *                 RasEnumDevicesA              [RASAPI32.19]
140  *
141  * Just return a virtual modem too see what other APIs programs will
142  * call with it.
143  */
144 DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA lpRasDevinfo, LPDWORD lpcb, LPDWORD lpcDevices)
145 {
146         FIXME("(%p,%p,%p),stub!\n",lpRasDevinfo,lpcb,lpcDevices);
147         if (*lpcb < sizeof(RASDEVINFOA)) {
148                 *lpcb = sizeof(RASDEVINFOA);
149                 return ERROR_BUFFER_TOO_SMALL;
150         }
151         /* honor dwSize ? */
152         strcpy(lpRasDevinfo->szDeviceType, RASDT_Modem);
153         strcpy(lpRasDevinfo->szDeviceName, "WINE virtmodem");
154         return 0;
155 }
156
157 /**************************************************************************
158  *                 RasEnumDevicesW              [RASAPI32.20]
159  */
160 DWORD WINAPI RasEnumDevicesW(LPRASDEVINFOW a, LPDWORD b, LPDWORD c)
161 {
162         FIXME("(%p,%p,%p),stub!\n",a,b,c);
163         return 0;
164 }
165
166 /**************************************************************************
167  *                 RasGetAutodialAddressA       [RASAPI32.24]
168  */
169 DWORD WINAPI RasGetAutodialAddressA(LPCSTR a, LPDWORD b, LPRASAUTODIALENTRYA c,
170                                         LPDWORD d, LPDWORD e)
171 {
172         FIXME("(%s,%p,%p,%p,%p),stub!\n",debugstr_a(a),b,c,d,e);
173         return 0;
174 }
175
176 /**************************************************************************
177  *                 RasGetAutodialAddressW       [RASAPI32.25]
178  */
179 DWORD WINAPI RasGetAutodialAddressW(LPCWSTR a, LPDWORD b, LPRASAUTODIALENTRYW c,
180                                         LPDWORD d, LPDWORD e)
181 {
182         FIXME("(%s,%p,%p,%p,%p),stub!\n",debugstr_w(a),b,c,d,e);
183         return 0;
184 }
185
186 /**************************************************************************
187  *                 RasGetAutodialEnableA        [RASAPI32.26]
188  */
189 DWORD WINAPI RasGetAutodialEnableA(DWORD a, LPBOOL b)
190 {
191         FIXME("(%lx,%p),stub!\n",a,b);
192         return 0;
193 }
194
195 /**************************************************************************
196  *                 RasGetAutodialEnableW        [RASAPI32.27]
197  */
198 DWORD WINAPI RasGetAutodialEnableW(DWORD a, LPBOOL b)
199 {
200         FIXME("(%lx,%p),stub!\n",a,b);
201         return 0;
202 }
203
204 /**************************************************************************
205  *                 RasGetAutodialParamA         [RASAPI32.28]
206  */
207 DWORD WINAPI RasGetAutodialParamA(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue)
208 {
209         FIXME("(%lx,%p,%p),stub!\n",dwKey,lpvValue,lpdwcbValue);
210         return 0;
211 }
212
213 /**************************************************************************
214  *                 RasGetAutodialParamW         [RASAPI32.29]
215  */
216 DWORD WINAPI RasGetAutodialParamW(DWORD dwKey, LPVOID lpvValue, LPDWORD lpdwcbValue)
217 {
218         FIXME("(%lx,%p,%p),stub!\n",dwKey,lpvValue,lpdwcbValue);
219         return 0;
220 }
221
222 /**************************************************************************
223  *                 RasSetAutodialAddressA       [RASAPI32.57]
224  */
225 DWORD WINAPI RasSetAutodialAddressA(LPCSTR a, DWORD b, LPRASAUTODIALENTRYA c,
226                                         DWORD d, DWORD e)
227 {
228         FIXME("(%s,%lx,%p,%lx,%lx),stub!\n",debugstr_a(a),b,c,d,e);
229         return 0;
230 }
231
232 /**************************************************************************
233  *                 RasSetAutodialAddressW       [RASAPI32.58]
234  */
235 DWORD WINAPI RasSetAutodialAddressW(LPCWSTR a, DWORD b, LPRASAUTODIALENTRYW c,
236                                         DWORD d, DWORD e)
237 {
238         FIXME("(%s,%lx,%p,%lx,%lx),stub!\n",debugstr_w(a),b,c,d,e);
239         return 0;
240 }
241
242 /**************************************************************************
243  *                 RasSetAutodialEnableA        [RASAPI32.59]
244  */
245 DWORD WINAPI RasSetAutodialEnableA(DWORD dwDialingLocation, BOOL fEnabled)
246 {
247         FIXME("(%lx,%x),stub!\n",dwDialingLocation,fEnabled);
248         return 0;
249 }
250
251 /**************************************************************************
252  *                 RasSetAutodialEnableW        [RASAPI32.60]
253  */
254 DWORD WINAPI RasSetAutodialEnableW(DWORD dwDialingLocation, BOOL fEnabled)
255 {
256         FIXME("(%lx,%x),stub!\n",dwDialingLocation,fEnabled);
257         return 0;
258 }
259
260 /**************************************************************************
261  *                 RasSetAutodialParamA [RASAPI32.61]
262  */
263 DWORD WINAPI RasSetAutodialParamA(DWORD a, LPVOID b, DWORD c)
264 {
265         FIXME("(%lx,%p,%lx),stub!\n",a,b,c);
266         return 0;
267 }
268
269 /**************************************************************************
270  *                 RasSetAutodialParamW [RASAPI32.62]
271  */
272 DWORD WINAPI RasSetAutodialParamW(DWORD a, LPVOID b, DWORD c)
273 {
274         FIXME("(%lx,%p,%lx),stub!\n",a,b,c);
275         return 0;
276 }
277
278 /**************************************************************************
279  *                 RasSetEntryPropertiesA       [RASAPI32.67]
280  */
281 DWORD WINAPI RasSetEntryPropertiesA(LPCSTR lpszPhonebook, LPCSTR lpszEntry,
282         LPRASENTRYA lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
283         DWORD dwDeviceInfoSize
284 ) {
285         FIXME("(%s,%s,%p,%ld,%p,%ld), stub!\n",
286                 debugstr_a(lpszPhonebook),debugstr_a(lpszEntry),
287                 lpRasEntry,dwEntryInfoSize,lpbDeviceInfo,dwDeviceInfoSize
288         );
289         FIXME("Rasentry:\n");
290         FIXME("\tdwfOptions %lx\n",lpRasEntry->dwfOptions);
291         FIXME("\tszLocalPhoneNumber %s\n",debugstr_a(lpRasEntry->szLocalPhoneNumber));
292         return 0;
293 }
294
295 /**************************************************************************
296  *                 RasSetEntryPropertiesW       [RASAPI32.68]
297  */
298 DWORD WINAPI RasSetEntryPropertiesW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry,
299         LPRASENTRYW lpRasEntry, DWORD dwEntryInfoSize, LPBYTE lpbDeviceInfo,
300         DWORD dwDeviceInfoSize
301 ) {
302         FIXME("(%s,%s,%p,%ld,%p,%ld), stub!\n",
303                 debugstr_w(lpszPhonebook),debugstr_w(lpszEntry),
304                 lpRasEntry,dwEntryInfoSize,lpbDeviceInfo,dwDeviceInfoSize
305         );
306         return 0;
307 }
308
309 /**************************************************************************
310  *                 RasValidateEntryNameA        [RASAPI32.72]
311  */
312 DWORD WINAPI RasValidateEntryNameA(LPCSTR lpszPhonebook, LPCSTR lpszEntry) {
313         FIXME("(%s,%s), stub!\n",debugstr_a(lpszPhonebook),debugstr_a(lpszEntry));
314         return 0;
315 }
316
317 /**************************************************************************
318  *                 RasValidateEntryNameW        [RASAPI32.73]
319  */
320 DWORD WINAPI RasValidateEntryNameW(LPCWSTR lpszPhonebook, LPCWSTR lpszEntry) {
321         FIXME("(%s,%s), stub!\n",debugstr_w(lpszPhonebook),debugstr_w(lpszEntry));
322         return 0;
323 }