- Go away STDCALL, time has come for WINAPI and NTAPI
[reactos.git] / reactos / dll / win32 / mswsock / stubs.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS WinSock DLL
5 * FILE: stubs.c
6 * PURPOSE: Stub functions
7 * PROGRAMMERS: Ge van Geldorp (ge@gse.nl)
8 * REVISIONS:
9 */
10
11 #include <windows.h>
12 #include <stdlib.h>
13 #include <winsock2.h>
14 #include <mswsock.h>
15 #include <ws2spi.h>
16 #include <nspapi.h>
17
18 typedef DWORD (* LPFN_NSPAPI)(VOID);
19 typedef struct _NS_ROUTINE {
20 DWORD dwFunctionCount;
21 LPFN_NSPAPI *alpfnFunctions;
22 DWORD dwNameSpace;
23 DWORD dwPriority;
24 } NS_ROUTINE, *PNS_ROUTINE, * FAR LPNS_ROUTINE;
25
26 /*
27 * @unimplemented
28 */
29 BOOL
30 WINAPI
31 AcceptEx(SOCKET ListenSocket,
32 SOCKET AcceptSocket,
33 PVOID OutputBuffer,
34 DWORD ReceiveDataLength,
35 DWORD LocalAddressLength,
36 DWORD RemoteAddressLength,
37 LPDWORD BytesReceived,
38 LPOVERLAPPED Overlapped)
39 {
40 OutputDebugStringW(L"w32sock AcceptEx stub called\n");
41
42 return FALSE;
43 }
44
45
46 /*
47 * @unimplemented
48 */
49 INT
50 WINAPI
51 EnumProtocolsA(LPINT ProtocolCount,
52 LPVOID ProtocolBuffer,
53 LPDWORD BufferLength)
54 {
55 OutputDebugStringW(L"w32sock EnumProtocolsA stub called\n");
56
57 return SOCKET_ERROR;
58 }
59
60
61 /*
62 * @unimplemented
63 */
64 INT
65 WINAPI
66 EnumProtocolsW(LPINT ProtocolCount,
67 LPVOID ProtocolBuffer,
68 LPDWORD BufferLength)
69 {
70 OutputDebugStringW(L"w32sock EnumProtocolsW stub called\n");
71
72 return SOCKET_ERROR;
73 }
74
75
76 /*
77 * @unimplemented
78 */
79 VOID
80 WINAPI
81 GetAcceptExSockaddrs(PVOID OutputBuffer,
82 DWORD ReceiveDataLength,
83 DWORD LocalAddressLength,
84 DWORD RemoteAddressLength,
85 LPSOCKADDR* LocalSockaddr,
86 LPINT LocalSockaddrLength,
87 LPSOCKADDR* RemoteSockaddr,
88 LPINT RemoteSockaddrLength)
89 {
90 OutputDebugStringW(L"w32sock GetAcceptExSockaddrs stub called\n");
91 }
92
93
94 /*
95 * @unimplemented
96 */
97 INT
98 WINAPI
99 GetAddressByNameA(DWORD NameSpace,
100 LPGUID ServiceType,
101 LPSTR ServiceName,
102 LPINT Protocols,
103 DWORD Resolution,
104 LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
105 LPVOID CsaddrBuffer,
106 LPDWORD BufferLength,
107 LPSTR AliasBuffer,
108 LPDWORD AliasBufferLength)
109 {
110 OutputDebugStringW(L"w32sock GetAddressByNameA stub called\n");
111
112 return SOCKET_ERROR;
113 }
114
115
116 /*
117 * @unimplemented
118 */
119 INT
120 WINAPI
121 GetAddressByNameW(DWORD NameSpace,
122 LPGUID ServiceType,
123 LPWSTR ServiceName,
124 LPINT Protocols,
125 DWORD Resolution,
126 LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
127 LPVOID CsaddrBuffer,
128 LPDWORD BufferLength,
129 LPWSTR AliasBuffer,
130 LPDWORD AliasBufferLength)
131 {
132 OutputDebugStringW(L"w32sock GetAddressByNameW stub called\n");
133
134 return SOCKET_ERROR;
135 }
136
137
138 /*
139 * @unimplemented
140 */
141 INT
142 WINAPI
143 GetServiceA(DWORD NameSpace,
144 LPGUID Guid,
145 LPSTR ServiceName,
146 DWORD Properties,
147 LPVOID Buffer,
148 LPDWORD BufferSize,
149 LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
150 {
151 OutputDebugStringW(L"w32sock GetServiceA stub called\n");
152
153 return SOCKET_ERROR;
154 }
155
156
157 /*
158 * @unimplemented
159 */
160 INT
161 WINAPI
162 GetServiceW(DWORD NameSpace,
163 LPGUID Guid,
164 LPWSTR ServiceName,
165 DWORD Properties,
166 LPVOID Buffer,
167 LPDWORD BufferSize,
168 LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
169 {
170 OutputDebugStringW(L"w32sock GetServiceW stub called\n");
171
172 return SOCKET_ERROR;
173 }
174
175
176 /*
177 * @unimplemented
178 */
179 INT
180 WINAPI
181 GetTypeByNameA(LPSTR ServiceName,
182 LPGUID ServiceType)
183 {
184 OutputDebugStringW(L"w32sock GetTypeByNameA stub called\n");
185
186 return SOCKET_ERROR;
187 }
188
189
190 /*
191 * @unimplemented
192 */
193 INT
194 WINAPI
195 GetTypeByNameW(LPWSTR ServiceName,
196 LPGUID ServiceType)
197 {
198 OutputDebugStringW(L"w32sock GetTypeByNameW stub called\n");
199
200 return SOCKET_ERROR;
201 }
202
203
204 /*
205 * @unimplemented
206 */
207 INT
208 WINAPI
209 MigrateWinsockConfiguration(DWORD Unknown1,
210 DWORD Unknown2,
211 DWORD Unknown3)
212 {
213 OutputDebugStringW(L"w32sock MigrateWinsockConfiguration stub called\n");
214
215 return SOCKET_ERROR;
216 }
217
218
219 /*
220 * @unimplemented
221 */
222 INT
223 WINAPI
224 SetServiceA(DWORD NameSpace,
225 DWORD Operation,
226 DWORD Flags,
227 LPSERVICE_INFOA ServiceInfo,
228 LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
229 LPDWORD dwStatusFlags)
230 {
231 OutputDebugStringW(L"w32sock SetServiceA stub called\n");
232
233 return SOCKET_ERROR;
234 }
235
236
237 /*
238 * @unimplemented
239 */
240 INT
241 WINAPI
242 SetServiceW(DWORD NameSpace,
243 DWORD Operation,
244 DWORD Flags,
245 LPSERVICE_INFOW ServiceInfo,
246 LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
247 LPDWORD dwStatusFlags)
248 {
249 OutputDebugStringW(L"w32sock SetServiceW stub called\n");
250
251 return SOCKET_ERROR;
252 }
253
254
255 /*
256 * @unimplemented
257 */
258 int
259 WINAPI
260 WSARecvEx(SOCKET Sock,
261 char *Buf,
262 int Len,
263 int *Flags)
264 {
265 OutputDebugStringW(L"w32sock WSARecvEx stub called\n");
266
267 return SOCKET_ERROR;
268 }
269
270
271 /*
272 * @unimplemented
273 */
274 int
275 WINAPI
276 dn_expand(unsigned char *MessagePtr,
277 unsigned char *EndofMesOrig,
278 unsigned char *CompDomNam,
279 unsigned char *ExpandDomNam,
280 int Length)
281 {
282 OutputDebugStringW(L"w32sock dn_expand stub called\n");
283
284 return SOCKET_ERROR;
285 }
286
287
288 /*
289 * @unimplemented
290 */
291 struct netent *
292 WINAPI
293 getnetbyname(const char *name)
294 {
295 OutputDebugStringW(L"w32sock getnetbyname stub called\n");
296
297 return NULL;
298 }
299
300
301 /*
302 * @unimplemented
303 */
304 UINT
305 WINAPI
306 inet_network(const char *cp)
307 {
308 OutputDebugStringW(L"w32sock inet_network stub called\n");
309
310 return INADDR_NONE;
311 }
312
313
314 /*
315 * @unimplemented
316 */
317 SOCKET
318 WINAPI
319 rcmd(char **AHost,
320 USHORT InPort,
321 char *LocUser,
322 char *RemUser,
323 char *Cmd,
324 int *Fd2p)
325 {
326 OutputDebugStringW(L"w32sock rcmd stub called\n");
327
328 return INVALID_SOCKET;
329 }
330
331
332 /*
333 * @unimplemented
334 */
335 SOCKET
336 WINAPI
337 rexec(char **AHost,
338 int InPort,
339 char *User,
340 char *Passwd,
341 char *Cmd,
342 int *Fd2p)
343 {
344 OutputDebugStringW(L"w32sock rexec stub called\n");
345
346 return INVALID_SOCKET;
347 }
348
349
350 /*
351 * @unimplemented
352 */
353 SOCKET
354 WINAPI
355 rresvport(int *port)
356 {
357 OutputDebugStringW(L"w32sock rresvport stub called\n");
358
359 return INVALID_SOCKET;
360 }
361
362
363 /*
364 * @unimplemented
365 */
366 void
367 WINAPI
368 s_perror(const char *str)
369 {
370 OutputDebugStringW(L"w32sock s_perror stub called\n");
371 }
372
373
374 /*
375 * @unimplemented
376 */
377 int
378 WINAPI
379 sethostname(char *Name, int NameLen)
380 {
381 OutputDebugStringW(L"w32sock sethostname stub called\n");
382
383 return SOCKET_ERROR;
384 }
385
386
387 /*
388 * @unimplemented
389 */
390 BOOL
391 WINAPI
392 DllMain(HINSTANCE InstDLL,
393 DWORD Reason,
394 LPVOID Reserved)
395 {
396 return TRUE;
397 }
398
399
400 /*
401 * @unimplemented
402 */
403 INT
404 WINAPI
405 GetNameByTypeA(LPGUID lpServiceType,LPSTR lpServiceName,DWORD dwNameLength)
406 {
407 OutputDebugStringW(L"w32sock GetNameByTypeA stub called\n");
408 return TRUE;
409 }
410
411
412 /*
413 * @unimplemented
414 */
415 INT
416 WINAPI
417 GetNameByTypeW(LPGUID lpServiceType,LPWSTR lpServiceName,DWORD dwNameLength)
418 {
419 OutputDebugStringW(L"w32sock GetNameByTypeW stub called\n");
420 return TRUE;
421 }
422
423
424 /*
425 * @unimplemented
426 */
427 INT
428 WINAPI
429 NSPStartup(
430 LPGUID lpProviderId,
431 LPNSP_ROUTINE lpnspRoutines
432 )
433 {
434 return TRUE;
435 }
436
437
438 /*
439 * @unimplemented
440 */
441 int
442 WINAPI
443 WSPStartup(
444 IN WORD wVersionRequested,
445 OUT LPWSPDATA lpWSPData,
446 IN LPWSAPROTOCOL_INFOW lpProtocolInfo,
447 IN WSPUPCALLTABLE UpcallTable,
448 OUT LPWSPPROC_TABLE lpProcTable
449 )
450 {
451 return TRUE;
452 }
453
454
455 /*
456 * @unimplemented
457 */
458 INT
459 WINAPI
460 NPLoadNameSpaces(
461 IN OUT LPDWORD lpdwVersion,
462 IN OUT LPNS_ROUTINE nsrBuffer,
463 IN OUT LPDWORD lpdwBufferLength
464 )
465 {
466 OutputDebugStringW(L"mswsock NPLoadNameSpaces stub called\n");
467
468 *lpdwVersion = 1;
469
470 return TRUE;
471 }
472
473
474 /*
475 * @unimplemented
476 */
477 VOID
478 WINAPI
479 StartWsdpService()
480 {
481 OutputDebugStringW(L"mswsock StartWsdpService stub called\n");
482 }
483
484
485 /*
486 * @unimplemented
487 */
488 VOID
489 WINAPI
490 StopWsdpService()
491 {
492 OutputDebugStringW(L"mswsock StopWsdpService stub called\n");
493 }
494
495
496 /*
497 * @unimplemented
498 */
499 DWORD
500 WINAPI
501 SvchostPushServiceGlobals(DWORD Value)
502 {
503 OutputDebugStringW(L"mswsock SvchostPushServiceGlobals stub called\n");
504
505 return 0;
506 }
507
508
509 /*
510 * @unimplemented
511 */
512 VOID
513 WINAPI
514 ServiceMain(DWORD Unknown1, DWORD Unknown2)
515 {
516 OutputDebugStringW(L"mswsock ServiceMain stub called\n");
517 }