ReactOS 0.4.16-dev-117-g38f21f9
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 <ws2spi.h>
13#include <nspapi.h>
14#include <svc.h>
15
16typedef DWORD (* LPFN_NSPAPI)(VOID);
17typedef struct _NS_ROUTINE {
23
24
25/*
26 * @unimplemented
27 */
28INT
30EnumProtocolsA(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 */
43INT
45EnumProtocolsW(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 */
58INT
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 */
80INT
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 */
102INT
103WINAPI
105 LPGUID Guid,
107 DWORD Properties,
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 */
121INT
122WINAPI
124 LPGUID Guid,
126 DWORD Properties,
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 */
140INT
141WINAPI
143 LPGUID ServiceType)
144{
145 OutputDebugStringW(L"w32sock GetTypeByNameA stub called\n");
146
147 return SOCKET_ERROR;
148}
149
150
151/*
152 * @unimplemented
153 */
154INT
155WINAPI
157 LPGUID ServiceType)
158{
159 OutputDebugStringW(L"w32sock GetTypeByNameW stub called\n");
160
161 return SOCKET_ERROR;
162}
163
164
165/*
166 * @unimplemented
167 */
168INT
169WINAPI
171 DWORD Unknown2,
173{
174 OutputDebugStringW(L"w32sock MigrateWinsockConfiguration stub called\n");
175
176 return SOCKET_ERROR;
177}
178
179
180/*
181 * @unimplemented
182 */
183INT
184WINAPI
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 */
201INT
202WINAPI
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 */
219int
220WINAPI
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 */
235int
236WINAPI
237dn_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 */
252struct netent *
253WINAPI
254getnetbyname(const char *name)
255{
256 OutputDebugStringW(L"w32sock getnetbyname stub called\n");
257
258 return NULL;
259}
260
261
262/*
263 * @unimplemented
264 */
265UINT
266WINAPI
267inet_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 */
278SOCKET
279WINAPI
280rcmd(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 */
296SOCKET
297WINAPI
298rexec(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 */
314SOCKET
315WINAPI
317{
318 OutputDebugStringW(L"w32sock rresvport stub called\n");
319
320 return INVALID_SOCKET;
321}
322
323
324/*
325 * @unimplemented
326 */
327void
328WINAPI
329s_perror(const char *str)
330{
331 OutputDebugStringW(L"w32sock s_perror stub called\n");
332}
333
334
335/*
336 * @unimplemented
337 */
338int
339WINAPI
340sethostname(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 */
351BOOL
352WINAPI
356{
357 return TRUE;
358}
359
360
361/*
362 * @unimplemented
363 */
364INT
365WINAPI
366GetNameByTypeA(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 */
376INT
377WINAPI
378GetNameByTypeW(LPGUID lpServiceType,LPWSTR lpServiceName,DWORD dwNameLength)
379{
380 OutputDebugStringW(L"w32sock GetNameByTypeW stub called\n");
381 return TRUE;
382}
383
384/*
385 * @unimplemented
386 */
387int
388WINAPI
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 */
404INT
405WINAPI
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 */
423VOID
424WINAPI
426{
427 OutputDebugStringW(L"mswsock StartWsdpService stub called\n");
428}
429
430
431/*
432 * @unimplemented
433 */
434VOID
435WINAPI
437{
438 OutputDebugStringW(L"mswsock StopWsdpService stub called\n");
439}
440
441
442/*
443 * @unimplemented
444 *
445 * See https://www.geoffchappell.com/studies/windows/win32/services/svchost/dll/svchostpushserviceglobals.htm
446 */
447VOID
448WINAPI
450{
451 OutputDebugStringW(L"mswsock SvchostPushServiceGlobals stub called\n");
452}
453
454
455/*
456 * @unimplemented
457 */
458VOID
459WINAPI
460ServiceMain(DWORD Unknown1, DWORD Unknown2)
461{
462 OutputDebugStringW(L"mswsock ServiceMain stub called\n");
463}
#define VOID
Definition: acefi.h:82
#define INADDR_NONE
Definition: tcp.c:42
static WCHAR ServiceName[]
Definition: browser.c:19
Definition: bufpool.h:45
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:37
#define Len
Definition: deflate.h:82
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FAR
Definition: zlib.h:34
int WINAPI WSPStartup(IN WORD wVersionRequested, OUT LPWSPDATA lpWSPData, IN LPWSAPROTOCOL_INFOW lpProtocolInfo, IN WSPUPCALLTABLE UpcallTable, OUT LPWSPPROC_TABLE lpProcTable)
Definition: stubs.c:389
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 EnumProtocolsW(LPINT ProtocolCount, LPVOID ProtocolBuffer, LPDWORD BufferLength)
Definition: stubs.c:45
SOCKET WINAPI rresvport(int *port)
Definition: stubs.c:316
struct netent *WINAPI getnetbyname(const char *name)
Definition: stubs.c:254
int WINAPI WSARecvEx(SOCKET Sock, char *Buf, int Len, int *Flags)
Definition: stubs.c:221
VOID WINAPI StopWsdpService()
Definition: stubs.c:436
int WINAPI sethostname(char *Name, int NameLen)
Definition: stubs.c:340
INT WINAPI MigrateWinsockConfiguration(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3)
Definition: stubs.c:170
SOCKET WINAPI rcmd(char **AHost, USHORT InPort, char *LocUser, char *RemUser, char *Cmd, int *Fd2p)
Definition: stubs.c:280
INT WINAPI SetServiceA(DWORD NameSpace, DWORD Operation, DWORD Flags, LPSERVICE_INFOA ServiceInfo, LPSERVICE_ASYNC_INFO ServiceAsyncInfo, LPDWORD dwStatusFlags)
Definition: stubs.c:185
INT WINAPI GetTypeByNameA(LPSTR ServiceName, LPGUID ServiceType)
Definition: stubs.c:142
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
VOID WINAPI SvchostPushServiceGlobals(PSVCHOST_GLOBAL_DATA lpGlobals)
Definition: stubs.c:449
INT WINAPI GetTypeByNameW(LPWSTR ServiceName, LPGUID ServiceType)
Definition: stubs.c:156
struct _NS_ROUTINE NS_ROUTINE
INT WINAPI GetNameByTypeA(LPGUID lpServiceType, LPSTR lpServiceName, DWORD dwNameLength)
Definition: stubs.c:366
BOOL WINAPI DllMain(HINSTANCE InstDLL, DWORD Reason, LPVOID Reserved)
Definition: stubs.c:353
DWORD(* LPFN_NSPAPI)(VOID)
Definition: stubs.c:16
INT WINAPI SetServiceW(DWORD NameSpace, DWORD Operation, DWORD Flags, LPSERVICE_INFOW ServiceInfo, LPSERVICE_ASYNC_INFO ServiceAsyncInfo, LPDWORD dwStatusFlags)
Definition: stubs.c:203
INT WINAPI GetServiceA(DWORD NameSpace, LPGUID Guid, LPSTR ServiceName, DWORD Properties, LPVOID Buffer, LPDWORD BufferSize, LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
Definition: stubs.c:104
VOID WINAPI ServiceMain(DWORD Unknown1, DWORD Unknown2)
Definition: stubs.c:460
SOCKET WINAPI rexec(char **AHost, int InPort, char *User, char *Passwd, char *Cmd, int *Fd2p)
Definition: stubs.c:298
struct _NS_ROUTINE * PNS_ROUTINE
VOID WINAPI StartWsdpService()
Definition: stubs.c:425
int WINAPI dn_expand(unsigned char *MessagePtr, unsigned char *EndofMesOrig, unsigned char *CompDomNam, unsigned char *ExpandDomNam, int Length)
Definition: stubs.c:237
INT WINAPI GetServiceW(DWORD NameSpace, LPGUID Guid, LPWSTR ServiceName, DWORD Properties, LPVOID Buffer, LPDWORD BufferSize, LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
Definition: stubs.c:123
INT WINAPI GetNameByTypeW(LPGUID lpServiceType, LPWSTR lpServiceName, DWORD dwNameLength)
Definition: stubs.c:378
INT WINAPI NPLoadNameSpaces(IN OUT LPDWORD lpdwVersion, IN OUT LPNS_ROUTINE nsrBuffer, IN OUT LPDWORD lpdwBufferLength)
Definition: stubs.c:406
INT WINAPI EnumProtocolsA(LPINT ProtocolCount, LPVOID ProtocolBuffer, LPDWORD BufferLength)
Definition: stubs.c:30
UINT WINAPI inet_network(const char *cp)
Definition: stubs.c:267
void WINAPI s_perror(const char *str)
Definition: stubs.c:329
struct _NS_ROUTINE LPNS_ROUTINE
USHORT port
Definition: uri.c:228
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
FP_OP Operation
Definition: fpcontrol.c:150
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
POINT cp
Definition: magnifier.c:59
PVOID PVOID PWCHAR PVOID USHORT PULONG Reason
Definition: env.c:47
DWORD(* LPFN_NSPAPI)(VOID)
Definition: mswinsock.h:10
unsigned int UINT
Definition: ndis.h:50
#define DWORD
Definition: nt_native.h:44
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
const WCHAR * str
@ Cmd
Definition: sacdrv.h:278
Definition: ws2spi.h:46
LPFN_NSPAPI * alpfnFunctions
Definition: stubs.c:19
DWORD dwFunctionCount
Definition: stubs.c:18
DWORD dwNameSpace
Definition: stubs.c:20
DWORD dwPriority
Definition: stubs.c:21
Definition: name.c:39
static BYTE Resolution
Definition: mouse.c:35
uint32_t * LPDWORD
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
JS_SERVICE_STATE ServiceInfo(LPCTSTR ServiceName)
Return service status by service name.
Definition: user_lib.cpp:157
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
int * LPINT
Definition: windef.h:178
#define WINAPI
Definition: msvc.h:6
_In_ _In_opt_ _Out_writes_bytes_to_opt_ lpdwBufferLength _Inout_ LPDWORD lpdwBufferLength
Definition: winhttp.h:675
#define INVALID_SOCKET
Definition: winsock.h:332
UINT_PTR SOCKET
Definition: winsock.h:47
#define SOCKET_ERROR
Definition: winsock.h:333
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
char * LPSTR
Definition: xmlstorage.h:182
WCHAR * LPWSTR
Definition: xmlstorage.h:184