ReactOS  0.4.15-dev-439-g292f67a
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 #include <svc.h>
16 
17 typedef DWORD (* LPFN_NSPAPI)(VOID);
18 typedef struct _NS_ROUTINE {
24 
25 
26 /*
27  * @unimplemented
28  */
29 INT
30 WINAPI
31 EnumProtocolsA(LPINT ProtocolCount,
32  LPVOID ProtocolBuffer,
34 {
35  OutputDebugStringW(L"w32sock EnumProtocolsA stub called\n");
36 
37  return SOCKET_ERROR;
38 }
39 
40 
41 /*
42  * @unimplemented
43  */
44 INT
45 WINAPI
46 EnumProtocolsW(LPINT ProtocolCount,
47  LPVOID ProtocolBuffer,
49 {
50  OutputDebugStringW(L"w32sock EnumProtocolsW stub called\n");
51 
52  return SOCKET_ERROR;
53 }
54 
55 
56 /*
57  * @unimplemented
58  */
59 INT
60 WINAPI
62  LPGUID ServiceType,
64  LPINT Protocols,
66  LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
67  LPVOID CsaddrBuffer,
69  LPSTR AliasBuffer,
70  LPDWORD AliasBufferLength)
71 {
72  OutputDebugStringW(L"w32sock GetAddressByNameA stub called\n");
73 
74  return SOCKET_ERROR;
75 }
76 
77 
78 /*
79  * @unimplemented
80  */
81 INT
82 WINAPI
84  LPGUID ServiceType,
86  LPINT Protocols,
88  LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
89  LPVOID CsaddrBuffer,
91  LPWSTR AliasBuffer,
92  LPDWORD AliasBufferLength)
93 {
94  OutputDebugStringW(L"w32sock GetAddressByNameW stub called\n");
95 
96  return SOCKET_ERROR;
97 }
98 
99 
100 /*
101  * @unimplemented
102  */
103 INT
104 WINAPI
105 GetServiceA(DWORD NameSpace,
106  LPGUID Guid,
108  DWORD Properties,
109  LPVOID Buffer,
111  LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
112 {
113  OutputDebugStringW(L"w32sock GetServiceA stub called\n");
114 
115  return SOCKET_ERROR;
116 }
117 
118 
119 /*
120  * @unimplemented
121  */
122 INT
123 WINAPI
124 GetServiceW(DWORD NameSpace,
125  LPGUID Guid,
127  DWORD Properties,
128  LPVOID Buffer,
130  LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
131 {
132  OutputDebugStringW(L"w32sock GetServiceW stub called\n");
133 
134  return SOCKET_ERROR;
135 }
136 
137 
138 /*
139  * @unimplemented
140  */
141 INT
142 WINAPI
144  LPGUID ServiceType)
145 {
146  OutputDebugStringW(L"w32sock GetTypeByNameA stub called\n");
147 
148  return SOCKET_ERROR;
149 }
150 
151 
152 /*
153  * @unimplemented
154  */
155 INT
156 WINAPI
158  LPGUID ServiceType)
159 {
160  OutputDebugStringW(L"w32sock GetTypeByNameW stub called\n");
161 
162  return SOCKET_ERROR;
163 }
164 
165 
166 /*
167  * @unimplemented
168  */
169 INT
170 WINAPI
172  DWORD Unknown2,
173  DWORD Unknown3)
174 {
175  OutputDebugStringW(L"w32sock MigrateWinsockConfiguration stub called\n");
176 
177  return SOCKET_ERROR;
178 }
179 
180 
181 /*
182  * @unimplemented
183  */
184 INT
185 WINAPI
186 SetServiceA(DWORD NameSpace,
188  DWORD Flags,
190  LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
191  LPDWORD dwStatusFlags)
192 {
193  OutputDebugStringW(L"w32sock SetServiceA stub called\n");
194 
195  return SOCKET_ERROR;
196 }
197 
198 
199 /*
200  * @unimplemented
201  */
202 INT
203 WINAPI
204 SetServiceW(DWORD NameSpace,
206  DWORD Flags,
208  LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
209  LPDWORD dwStatusFlags)
210 {
211  OutputDebugStringW(L"w32sock SetServiceW stub called\n");
212 
213  return SOCKET_ERROR;
214 }
215 
216 
217 /*
218  * @unimplemented
219  */
220 int
221 WINAPI
223  char *Buf,
224  int Len,
225  int *Flags)
226 {
227  OutputDebugStringW(L"w32sock WSARecvEx stub called\n");
228 
229  return SOCKET_ERROR;
230 }
231 
232 
233 /*
234  * @unimplemented
235  */
236 int
237 WINAPI
238 dn_expand(unsigned char *MessagePtr,
239  unsigned char *EndofMesOrig,
240  unsigned char *CompDomNam,
241  unsigned char *ExpandDomNam,
242  int Length)
243 {
244  OutputDebugStringW(L"w32sock dn_expand stub called\n");
245 
246  return SOCKET_ERROR;
247 }
248 
249 
250 /*
251  * @unimplemented
252  */
253 struct netent *
254 WINAPI
255 getnetbyname(const char *name)
256 {
257  OutputDebugStringW(L"w32sock getnetbyname stub called\n");
258 
259  return NULL;
260 }
261 
262 
263 /*
264  * @unimplemented
265  */
266 UINT
267 WINAPI
268 inet_network(const char *cp)
269 {
270  OutputDebugStringW(L"w32sock inet_network stub called\n");
271 
272  return INADDR_NONE;
273 }
274 
275 
276 /*
277  * @unimplemented
278  */
279 SOCKET
280 WINAPI
281 rcmd(char **AHost,
282  USHORT InPort,
283  char *LocUser,
284  char *RemUser,
285  char *Cmd,
286  int *Fd2p)
287 {
288  OutputDebugStringW(L"w32sock rcmd stub called\n");
289 
290  return INVALID_SOCKET;
291 }
292 
293 
294 /*
295  * @unimplemented
296  */
297 SOCKET
298 WINAPI
299 rexec(char **AHost,
300  int InPort,
301  char *User,
302  char *Passwd,
303  char *Cmd,
304  int *Fd2p)
305 {
306  OutputDebugStringW(L"w32sock rexec stub called\n");
307 
308  return INVALID_SOCKET;
309 }
310 
311 
312 /*
313  * @unimplemented
314  */
315 SOCKET
316 WINAPI
318 {
319  OutputDebugStringW(L"w32sock rresvport stub called\n");
320 
321  return INVALID_SOCKET;
322 }
323 
324 
325 /*
326  * @unimplemented
327  */
328 void
329 WINAPI
330 s_perror(const char *str)
331 {
332  OutputDebugStringW(L"w32sock s_perror stub called\n");
333 }
334 
335 
336 /*
337  * @unimplemented
338  */
339 int
340 WINAPI
341 sethostname(char *Name, int NameLen)
342 {
343  OutputDebugStringW(L"w32sock sethostname stub called\n");
344 
345  return SOCKET_ERROR;
346 }
347 
348 
349 /*
350  * @unimplemented
351  */
352 BOOL
353 WINAPI
355  DWORD Reason,
357 {
358  return TRUE;
359 }
360 
361 
362 /*
363  * @unimplemented
364  */
365 INT
366 WINAPI
367 GetNameByTypeA(LPGUID lpServiceType,LPSTR lpServiceName,DWORD dwNameLength)
368 {
369  OutputDebugStringW(L"w32sock GetNameByTypeA stub called\n");
370  return TRUE;
371 }
372 
373 
374 /*
375  * @unimplemented
376  */
377 INT
378 WINAPI
379 GetNameByTypeW(LPGUID lpServiceType,LPWSTR lpServiceName,DWORD dwNameLength)
380 {
381  OutputDebugStringW(L"w32sock GetNameByTypeW stub called\n");
382  return TRUE;
383 }
384 
385 /*
386  * @unimplemented
387  */
388 int
389 WINAPI
391  IN WORD wVersionRequested,
392  OUT LPWSPDATA lpWSPData,
393  IN LPWSAPROTOCOL_INFOW lpProtocolInfo,
394  IN WSPUPCALLTABLE UpcallTable,
395  OUT LPWSPPROC_TABLE lpProcTable
396  )
397 {
398  return TRUE;
399 }
400 
401 
402 /*
403  * @unimplemented
404  */
405 INT
406 WINAPI
408  IN OUT LPDWORD lpdwVersion,
409  IN OUT LPNS_ROUTINE nsrBuffer,
411  )
412 {
413  OutputDebugStringW(L"mswsock NPLoadNameSpaces stub called\n");
414 
415  *lpdwVersion = 1;
416 
417  return TRUE;
418 }
419 
420 
421 /*
422  * @unimplemented
423  */
424 VOID
425 WINAPI
427 {
428  OutputDebugStringW(L"mswsock StartWsdpService stub called\n");
429 }
430 
431 
432 /*
433  * @unimplemented
434  */
435 VOID
436 WINAPI
438 {
439  OutputDebugStringW(L"mswsock StopWsdpService stub called\n");
440 }
441 
442 
443 /*
444  * @unimplemented
445  *
446  * See https://www.geoffchappell.com/studies/windows/win32/services/svchost/dll/svchostpushserviceglobals.htm
447  */
448 VOID
449 WINAPI
451 {
452  OutputDebugStringW(L"mswsock SvchostPushServiceGlobals stub called\n");
453 }
454 
455 
456 /*
457  * @unimplemented
458  */
459 VOID
460 WINAPI
461 ServiceMain(DWORD Unknown1, DWORD Unknown2)
462 {
463  OutputDebugStringW(L"mswsock ServiceMain stub called\n");
464 }
#define SOCKET_ERROR
Definition: winsock.h:333
DWORD(* LPFN_NSPAPI)(VOID)
Definition: stubs.c:17
#define IN
Definition: typedefs.h:39
int WINAPI WSPStartup(IN WORD wVersionRequested, OUT LPWSPDATA lpWSPData, IN LPWSAPROTOCOL_INFOW lpProtocolInfo, IN WSPUPCALLTABLE UpcallTable, OUT LPWSPPROC_TABLE lpProcTable)
Definition: stubs.c:390
#define TRUE
Definition: types.h:120
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:35
DWORD dwNameSpace
Definition: stubs.c:21
struct netent *WINAPI getnetbyname(const char *name)
Definition: stubs.c:255
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:124
#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:61
int WINAPI WSARecvEx(SOCKET Sock, char *Buf, int Len, int *Flags)
Definition: stubs.c:222
INT WINAPI EnumProtocolsW(LPINT ProtocolCount, LPVOID ProtocolBuffer, LPDWORD BufferLength)
Definition: stubs.c:46
INT WINAPI GetNameByTypeA(LPGUID lpServiceType, LPSTR lpServiceName, DWORD dwNameLength)
Definition: stubs.c:367
void WINAPI s_perror(const char *str)
Definition: stubs.c:330
char * LPSTR
Definition: xmlstorage.h:182
struct _NS_ROUTINE NS_ROUTINE
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:57
SOCKET WINAPI rcmd(char **AHost, USHORT InPort, char *LocUser, char *RemUser, char *Cmd, int *Fd2p)
Definition: stubs.c:281
int WINAPI sethostname(char *Name, int NameLen)
Definition: stubs.c:341
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:379
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:19
static GUID * Guid
Definition: apphelp.c:93
smooth NULL
Definition: ftsmooth.c:416
VOID WINAPI SvchostPushServiceGlobals(SVCHOST_GLOBALS *lpGlobals)
Definition: stubs.c:450
VOID WINAPI ServiceMain(DWORD Unknown1, DWORD Unknown2)
Definition: stubs.c:461
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
Definition: bufpool.h:45
INT WINAPI EnumProtocolsA(LPINT ProtocolCount, LPVOID ProtocolBuffer, LPDWORD BufferLength)
Definition: stubs.c:31
int WINAPI dn_expand(unsigned char *MessagePtr, unsigned char *EndofMesOrig, unsigned char *CompDomNam, unsigned char *ExpandDomNam, int Length)
Definition: stubs.c:238
BOOL WINAPI DllMain(HINSTANCE InstDLL, DWORD Reason, LPVOID Reserved)
Definition: stubs.c:354
LPTSTR ServiceName
Definition: ServiceMain.c:15
#define INVALID_SOCKET
Definition: winsock.h:332
INT WINAPI GetTypeByNameW(LPWSTR ServiceName, LPGUID ServiceType)
Definition: stubs.c:157
INT WINAPI GetTypeByNameA(LPSTR ServiceName, LPGUID ServiceType)
Definition: stubs.c:143
#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:426
_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:83
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:407
struct _NS_ROUTINE LPNS_ROUTINE
LPFN_NSPAPI * alpfnFunctions
Definition: stubs.c:20
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:299
INT WINAPI SetServiceA(DWORD NameSpace, DWORD Operation, DWORD Flags, LPSERVICE_INFOA ServiceInfo, LPSERVICE_ASYNC_INFO ServiceAsyncInfo, LPDWORD dwStatusFlags)
Definition: stubs.c:186
VOID WINAPI StopWsdpService()
Definition: stubs.c:437
unsigned int UINT
Definition: ndis.h:50
POINT cp
Definition: magnifier.c:59
Definition: name.c:38
#define OUT
Definition: typedefs.h:40
static BYTE Resolution
Definition: mouse.c:35
uint32_t * LPDWORD
Definition: typedefs.h:58
DWORD dwPriority
Definition: stubs.c:22
_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:105
INT WINAPI MigrateWinsockConfiguration(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3)
Definition: stubs.c:171
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:268
INT WINAPI SetServiceW(DWORD NameSpace, DWORD Operation, DWORD Flags, LPSERVICE_INFOW ServiceInfo, LPSERVICE_ASYNC_INFO ServiceAsyncInfo, LPDWORD dwStatusFlags)
Definition: stubs.c:204
int * LPINT
Definition: windef.h:178
SOCKET WINAPI rresvport(int *port)
Definition: stubs.c:317