ReactOS  0.4.14-dev-838-g99f979d
stubs.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS WinSock DLL
4  * FILE: stubs.c
5  * PURPOSE: Stub functions
6  * PROGRAMMERS: Ge van Geldorp (ge@gse.nl)
7  * REVISIONS:
8  */
9 
10 #include "precomp.h"
11 
12 #include <windef.h>
13 #include <ws2spi.h>
14 #include <nspapi.h>
15 
16 typedef DWORD (* LPFN_NSPAPI)(VOID);
17 typedef struct _NS_ROUTINE {
23 
24 
25 /*
26  * @unimplemented
27  */
28 INT
29 WINAPI
30 EnumProtocolsA(LPINT ProtocolCount,
31  LPVOID ProtocolBuffer,
33 {
34  OutputDebugStringW(L"w32sock EnumProtocolsA stub called\n");
35 
36  return SOCKET_ERROR;
37 }
38 
39 
40 /*
41  * @unimplemented
42  */
43 INT
44 WINAPI
45 EnumProtocolsW(LPINT ProtocolCount,
46  LPVOID ProtocolBuffer,
48 {
49  OutputDebugStringW(L"w32sock EnumProtocolsW stub called\n");
50 
51  return SOCKET_ERROR;
52 }
53 
54 
55 /*
56  * @unimplemented
57  */
58 INT
59 WINAPI
61  LPGUID ServiceType,
63  LPINT Protocols,
65  LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
66  LPVOID CsaddrBuffer,
68  LPSTR AliasBuffer,
69  LPDWORD AliasBufferLength)
70 {
71  OutputDebugStringW(L"w32sock GetAddressByNameA stub called\n");
72 
73  return SOCKET_ERROR;
74 }
75 
76 
77 /*
78  * @unimplemented
79  */
80 INT
81 WINAPI
83  LPGUID ServiceType,
85  LPINT Protocols,
87  LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
88  LPVOID CsaddrBuffer,
90  LPWSTR AliasBuffer,
91  LPDWORD AliasBufferLength)
92 {
93  OutputDebugStringW(L"w32sock GetAddressByNameW stub called\n");
94 
95  return SOCKET_ERROR;
96 }
97 
98 
99 /*
100  * @unimplemented
101  */
102 INT
103 WINAPI
104 GetServiceA(DWORD NameSpace,
105  LPGUID Guid,
107  DWORD Properties,
108  LPVOID Buffer,
110  LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
111 {
112  OutputDebugStringW(L"w32sock GetServiceA stub called\n");
113 
114  return SOCKET_ERROR;
115 }
116 
117 
118 /*
119  * @unimplemented
120  */
121 INT
122 WINAPI
123 GetServiceW(DWORD NameSpace,
124  LPGUID Guid,
126  DWORD Properties,
127  LPVOID Buffer,
129  LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
130 {
131  OutputDebugStringW(L"w32sock GetServiceW stub called\n");
132 
133  return SOCKET_ERROR;
134 }
135 
136 
137 /*
138  * @unimplemented
139  */
140 INT
141 WINAPI
143  LPGUID ServiceType)
144 {
145  OutputDebugStringW(L"w32sock GetTypeByNameA stub called\n");
146 
147  return SOCKET_ERROR;
148 }
149 
150 
151 /*
152  * @unimplemented
153  */
154 INT
155 WINAPI
157  LPGUID ServiceType)
158 {
159  OutputDebugStringW(L"w32sock GetTypeByNameW stub called\n");
160 
161  return SOCKET_ERROR;
162 }
163 
164 
165 /*
166  * @unimplemented
167  */
168 INT
169 WINAPI
171  DWORD Unknown2,
172  DWORD Unknown3)
173 {
174  OutputDebugStringW(L"w32sock MigrateWinsockConfiguration stub called\n");
175 
176  return SOCKET_ERROR;
177 }
178 
179 
180 /*
181  * @unimplemented
182  */
183 INT
184 WINAPI
185 SetServiceA(DWORD NameSpace,
187  DWORD Flags,
189  LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
190  LPDWORD dwStatusFlags)
191 {
192  OutputDebugStringW(L"w32sock SetServiceA stub called\n");
193 
194  return SOCKET_ERROR;
195 }
196 
197 
198 /*
199  * @unimplemented
200  */
201 INT
202 WINAPI
203 SetServiceW(DWORD NameSpace,
205  DWORD Flags,
207  LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
208  LPDWORD dwStatusFlags)
209 {
210  OutputDebugStringW(L"w32sock SetServiceW stub called\n");
211 
212  return SOCKET_ERROR;
213 }
214 
215 
216 /*
217  * @unimplemented
218  */
219 int
220 WINAPI
222  char *Buf,
223  int Len,
224  int *Flags)
225 {
226  OutputDebugStringW(L"w32sock WSARecvEx stub called\n");
227 
228  return SOCKET_ERROR;
229 }
230 
231 
232 /*
233  * @unimplemented
234  */
235 int
236 WINAPI
237 dn_expand(unsigned char *MessagePtr,
238  unsigned char *EndofMesOrig,
239  unsigned char *CompDomNam,
240  unsigned char *ExpandDomNam,
241  int Length)
242 {
243  OutputDebugStringW(L"w32sock dn_expand stub called\n");
244 
245  return SOCKET_ERROR;
246 }
247 
248 
249 /*
250  * @unimplemented
251  */
252 struct netent *
253 WINAPI
254 getnetbyname(const char *name)
255 {
256  OutputDebugStringW(L"w32sock getnetbyname stub called\n");
257 
258  return NULL;
259 }
260 
261 
262 /*
263  * @unimplemented
264  */
265 UINT
266 WINAPI
267 inet_network(const char *cp)
268 {
269  OutputDebugStringW(L"w32sock inet_network stub called\n");
270 
271  return INADDR_NONE;
272 }
273 
274 
275 /*
276  * @unimplemented
277  */
278 SOCKET
279 WINAPI
280 rcmd(char **AHost,
281  USHORT InPort,
282  char *LocUser,
283  char *RemUser,
284  char *Cmd,
285  int *Fd2p)
286 {
287  OutputDebugStringW(L"w32sock rcmd stub called\n");
288 
289  return INVALID_SOCKET;
290 }
291 
292 
293 /*
294  * @unimplemented
295  */
296 SOCKET
297 WINAPI
298 rexec(char **AHost,
299  int InPort,
300  char *User,
301  char *Passwd,
302  char *Cmd,
303  int *Fd2p)
304 {
305  OutputDebugStringW(L"w32sock rexec stub called\n");
306 
307  return INVALID_SOCKET;
308 }
309 
310 
311 /*
312  * @unimplemented
313  */
314 SOCKET
315 WINAPI
317 {
318  OutputDebugStringW(L"w32sock rresvport stub called\n");
319 
320  return INVALID_SOCKET;
321 }
322 
323 
324 /*
325  * @unimplemented
326  */
327 void
328 WINAPI
329 s_perror(const char *str)
330 {
331  OutputDebugStringW(L"w32sock s_perror stub called\n");
332 }
333 
334 
335 /*
336  * @unimplemented
337  */
338 int
339 WINAPI
340 sethostname(char *Name, int NameLen)
341 {
342  OutputDebugStringW(L"w32sock sethostname stub called\n");
343 
344  return SOCKET_ERROR;
345 }
346 
347 
348 /*
349  * @unimplemented
350  */
351 BOOL
352 WINAPI
354  DWORD Reason,
356 {
357  return TRUE;
358 }
359 
360 
361 /*
362  * @unimplemented
363  */
364 INT
365 WINAPI
366 GetNameByTypeA(LPGUID lpServiceType,LPSTR lpServiceName,DWORD dwNameLength)
367 {
368  OutputDebugStringW(L"w32sock GetNameByTypeA stub called\n");
369  return TRUE;
370 }
371 
372 
373 /*
374  * @unimplemented
375  */
376 INT
377 WINAPI
378 GetNameByTypeW(LPGUID lpServiceType,LPWSTR lpServiceName,DWORD dwNameLength)
379 {
380  OutputDebugStringW(L"w32sock GetNameByTypeW stub called\n");
381  return TRUE;
382 }
383 
384 /*
385  * @unimplemented
386  */
387 int
388 WINAPI
390  IN WORD wVersionRequested,
391  OUT LPWSPDATA lpWSPData,
392  IN LPWSAPROTOCOL_INFOW lpProtocolInfo,
393  IN WSPUPCALLTABLE UpcallTable,
394  OUT LPWSPPROC_TABLE lpProcTable
395  )
396 {
397  return TRUE;
398 }
399 
400 
401 /*
402  * @unimplemented
403  */
404 INT
405 WINAPI
407  IN OUT LPDWORD lpdwVersion,
408  IN OUT LPNS_ROUTINE nsrBuffer,
410  )
411 {
412  OutputDebugStringW(L"mswsock NPLoadNameSpaces stub called\n");
413 
414  *lpdwVersion = 1;
415 
416  return TRUE;
417 }
418 
419 
420 /*
421  * @unimplemented
422  */
423 VOID
424 WINAPI
426 {
427  OutputDebugStringW(L"mswsock StartWsdpService stub called\n");
428 }
429 
430 
431 /*
432  * @unimplemented
433  */
434 VOID
435 WINAPI
437 {
438  OutputDebugStringW(L"mswsock StopWsdpService stub called\n");
439 }
440 
441 
442 /*
443  * @unimplemented
444  */
445 DWORD
446 WINAPI
448 {
449  OutputDebugStringW(L"mswsock SvchostPushServiceGlobals stub called\n");
450 
451  return 0;
452 }
453 
454 
455 /*
456  * @unimplemented
457  */
458 VOID
459 WINAPI
460 ServiceMain(DWORD Unknown1, DWORD Unknown2)
461 {
462  OutputDebugStringW(L"mswsock ServiceMain stub called\n");
463 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2374
#define SOCKET_ERROR
Definition: winsock.h:333
DWORD(* LPFN_NSPAPI)(VOID)
Definition: stubs.c:16
#define IN
Definition: typedefs.h:38
int WINAPI WSPStartup(IN WORD wVersionRequested, OUT LPWSPDATA lpWSPData, IN LPWSAPROTOCOL_INFOW lpProtocolInfo, IN WSPUPCALLTABLE UpcallTable, OUT LPWSPPROC_TABLE lpProcTable)
Definition: stubs.c:389
#define TRUE
Definition: types.h:120
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:35
DWORD dwNameSpace
Definition: stubs.c:20
struct netent *WINAPI getnetbyname(const char *name)
Definition: stubs.c:254
JS_SERVICE_STATE ServiceInfo(LPCTSTR ServiceName)
Return service status by service name.
Definition: user_lib.cpp:157
INT WINAPI GetServiceW(DWORD NameSpace, LPGUID Guid, LPWSTR ServiceName, DWORD Properties, LPVOID Buffer, LPDWORD BufferSize, LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
Definition: stubs.c:123
#define INADDR_NONE
Definition: tcp.c:42
INT WINAPI GetAddressByNameA(DWORD NameSpace, LPGUID ServiceType, LPSTR ServiceName, LPINT Protocols, DWORD Resolution, LPSERVICE_ASYNC_INFO ServiceAsyncInfo, LPVOID CsaddrBuffer, LPDWORD BufferLength, LPSTR AliasBuffer, LPDWORD AliasBufferLength)
Definition: stubs.c:60
int WINAPI WSARecvEx(SOCKET Sock, char *Buf, int Len, int *Flags)
Definition: stubs.c:221
INT WINAPI EnumProtocolsW(LPINT ProtocolCount, LPVOID ProtocolBuffer, LPDWORD BufferLength)
Definition: stubs.c:45
INT WINAPI GetNameByTypeA(LPGUID lpServiceType, LPSTR lpServiceName, DWORD dwNameLength)
Definition: stubs.c:366
void WINAPI s_perror(const char *str)
Definition: stubs.c:329
char * LPSTR
Definition: xmlstorage.h:182
struct _NS_ROUTINE NS_ROUTINE
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:56
SOCKET WINAPI rcmd(char **AHost, USHORT InPort, char *LocUser, char *RemUser, char *Cmd, int *Fd2p)
Definition: stubs.c:280
int WINAPI sethostname(char *Name, int NameLen)
Definition: stubs.c:340
DWORD WINAPI SvchostPushServiceGlobals(DWORD Value)
Definition: stubs.c:447
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
INT WINAPI GetNameByTypeW(LPGUID lpServiceType, LPWSTR lpServiceName, DWORD dwNameLength)
Definition: stubs.c:378
unsigned int BOOL
Definition: ntddk_ex.h:94
_In_ ULONG BufferLength
Definition: usbdlib.h:225
#define FAR
Definition: guiddef.h:36
Definition: ws2spi.h:46
const WCHAR * str
DWORD dwFunctionCount
Definition: stubs.c:18
static GUID * Guid
Definition: apphelp.c:93
smooth NULL
Definition: ftsmooth.c:416
VOID WINAPI ServiceMain(DWORD Unknown1, DWORD Unknown2)
Definition: stubs.c:460
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
Definition: bufpool.h:45
INT WINAPI EnumProtocolsA(LPINT ProtocolCount, LPVOID ProtocolBuffer, LPDWORD BufferLength)
Definition: stubs.c:30
int WINAPI dn_expand(unsigned char *MessagePtr, unsigned char *EndofMesOrig, unsigned char *CompDomNam, unsigned char *ExpandDomNam, int Length)
Definition: stubs.c:237
BOOL WINAPI DllMain(HINSTANCE InstDLL, DWORD Reason, LPVOID Reserved)
Definition: stubs.c:353
LPTSTR ServiceName
Definition: ServiceMain.c:15
#define INVALID_SOCKET
Definition: winsock.h:332
INT WINAPI GetTypeByNameW(LPWSTR ServiceName, LPGUID ServiceType)
Definition: stubs.c:156
INT WINAPI GetTypeByNameA(LPSTR ServiceName, LPGUID ServiceType)
Definition: stubs.c:142
#define WINAPI
Definition: msvc.h:6
#define BufferSize
Definition: classpnp.h:419
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define Len
Definition: deflate.h:82
VOID WINAPI StartWsdpService()
Definition: stubs.c:425
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
INT WINAPI GetAddressByNameW(DWORD NameSpace, LPGUID ServiceType, LPWSTR ServiceName, LPINT Protocols, DWORD Resolution, LPSERVICE_ASYNC_INFO ServiceAsyncInfo, LPVOID CsaddrBuffer, LPDWORD BufferLength, LPWSTR AliasBuffer, LPDWORD AliasBufferLength)
Definition: stubs.c:82
struct _NS_ROUTINE * PNS_ROUTINE
static const WCHAR L[]
Definition: oid.c:1250
Definition: sacdrv.h:277
#define VOID
Definition: acefi.h:82
INT WINAPI NPLoadNameSpaces(IN OUT LPDWORD lpdwVersion, IN OUT LPNS_ROUTINE nsrBuffer, IN OUT LPDWORD lpdwBufferLength)
Definition: stubs.c:406
struct _NS_ROUTINE LPNS_ROUTINE
LPFN_NSPAPI * alpfnFunctions
Definition: stubs.c:19
unsigned short USHORT
Definition: pedump.c:61
SOCKET WINAPI rexec(char **AHost, int InPort, char *User, char *Passwd, char *Cmd, int *Fd2p)
Definition: stubs.c:298
INT WINAPI SetServiceA(DWORD NameSpace, DWORD Operation, DWORD Flags, LPSERVICE_INFOA ServiceInfo, LPSERVICE_ASYNC_INFO ServiceAsyncInfo, LPDWORD dwStatusFlags)
Definition: stubs.c:185
VOID WINAPI StopWsdpService()
Definition: stubs.c:436
unsigned int UINT
Definition: ndis.h:50
POINT cp
Definition: magnifier.c:59
Definition: name.c:38
#define OUT
Definition: typedefs.h:39
static BYTE Resolution
Definition: mouse.c:35
uint32_t * LPDWORD
Definition: typedefs.h:57
DWORD dwPriority
Definition: stubs.c:21
_In_ FLT_SET_CONTEXT_OPERATION Operation
Definition: fltkernel.h:1468
UINT_PTR SOCKET
Definition: winsock.h:47
_In_ _In_opt_ _Out_writes_bytes_to_opt_ lpdwBufferLength _Inout_ LPDWORD lpdwBufferLength
Definition: winhttp.h:675
WCHAR * LPWSTR
Definition: xmlstorage.h:184
INT WINAPI GetServiceA(DWORD NameSpace, LPGUID Guid, LPSTR ServiceName, DWORD Properties, LPVOID Buffer, LPDWORD BufferSize, LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
Definition: stubs.c:104
INT WINAPI MigrateWinsockConfiguration(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3)
Definition: stubs.c:170
PVOID PVOID PWCHAR PVOID USHORT PULONG Reason
Definition: env.c:45
USHORT port
Definition: uri.c:228
UINT WINAPI inet_network(const char *cp)
Definition: stubs.c:267
INT WINAPI SetServiceW(DWORD NameSpace, DWORD Operation, DWORD Flags, LPSERVICE_INFOW ServiceInfo, LPSERVICE_ASYNC_INFO ServiceAsyncInfo, LPDWORD dwStatusFlags)
Definition: stubs.c:203
int * LPINT
Definition: windef.h:178
SOCKET WINAPI rresvport(int *port)
Definition: stubs.c:316