2013-03-16 20:41:13 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS WinSock DLL
|
|
|
|
* FILE: stubs.c
|
|
|
|
* PURPOSE: Stub functions
|
|
|
|
* PROGRAMMERS: Ge van Geldorp (ge@gse.nl)
|
2006-02-17 00:04:10 +00:00
|
|
|
* REVISIONS:
|
|
|
|
*/
|
|
|
|
|
2011-08-11 15:07:19 +00:00
|
|
|
#include "precomp.h"
|
2006-02-17 00:04:10 +00:00
|
|
|
|
2016-09-18 21:21:28 +00:00
|
|
|
#include <windef.h>
|
2014-01-24 18:18:39 +00:00
|
|
|
#include <ws2spi.h>
|
|
|
|
#include <nspapi.h>
|
2020-06-18 18:06:34 +00:00
|
|
|
#include <svc.h>
|
2014-01-24 18:18:39 +00:00
|
|
|
|
2006-02-17 00:04:10 +00:00
|
|
|
typedef DWORD (* LPFN_NSPAPI)(VOID);
|
|
|
|
typedef struct _NS_ROUTINE {
|
|
|
|
DWORD dwFunctionCount;
|
|
|
|
LPFN_NSPAPI *alpfnFunctions;
|
|
|
|
DWORD dwNameSpace;
|
|
|
|
DWORD dwPriority;
|
|
|
|
} NS_ROUTINE, *PNS_ROUTINE, * FAR LPNS_ROUTINE;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
EnumProtocolsA(LPINT ProtocolCount,
|
|
|
|
LPVOID ProtocolBuffer,
|
|
|
|
LPDWORD BufferLength)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock EnumProtocolsA stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
EnumProtocolsW(LPINT ProtocolCount,
|
|
|
|
LPVOID ProtocolBuffer,
|
|
|
|
LPDWORD BufferLength)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock EnumProtocolsW stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
GetAddressByNameA(DWORD NameSpace,
|
|
|
|
LPGUID ServiceType,
|
|
|
|
LPSTR ServiceName,
|
|
|
|
LPINT Protocols,
|
|
|
|
DWORD Resolution,
|
|
|
|
LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
|
|
|
|
LPVOID CsaddrBuffer,
|
|
|
|
LPDWORD BufferLength,
|
|
|
|
LPSTR AliasBuffer,
|
|
|
|
LPDWORD AliasBufferLength)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock GetAddressByNameA stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
GetAddressByNameW(DWORD NameSpace,
|
|
|
|
LPGUID ServiceType,
|
|
|
|
LPWSTR ServiceName,
|
|
|
|
LPINT Protocols,
|
|
|
|
DWORD Resolution,
|
|
|
|
LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
|
|
|
|
LPVOID CsaddrBuffer,
|
|
|
|
LPDWORD BufferLength,
|
|
|
|
LPWSTR AliasBuffer,
|
|
|
|
LPDWORD AliasBufferLength)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock GetAddressByNameW stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
GetServiceA(DWORD NameSpace,
|
|
|
|
LPGUID Guid,
|
|
|
|
LPSTR ServiceName,
|
|
|
|
DWORD Properties,
|
|
|
|
LPVOID Buffer,
|
|
|
|
LPDWORD BufferSize,
|
|
|
|
LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock GetServiceA stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
GetServiceW(DWORD NameSpace,
|
|
|
|
LPGUID Guid,
|
|
|
|
LPWSTR ServiceName,
|
|
|
|
DWORD Properties,
|
|
|
|
LPVOID Buffer,
|
|
|
|
LPDWORD BufferSize,
|
|
|
|
LPSERVICE_ASYNC_INFO ServiceAsyncInfo)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock GetServiceW stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
GetTypeByNameA(LPSTR ServiceName,
|
|
|
|
LPGUID ServiceType)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock GetTypeByNameA stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
GetTypeByNameW(LPWSTR ServiceName,
|
|
|
|
LPGUID ServiceType)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock GetTypeByNameW stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
MigrateWinsockConfiguration(DWORD Unknown1,
|
|
|
|
DWORD Unknown2,
|
|
|
|
DWORD Unknown3)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock MigrateWinsockConfiguration stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
SetServiceA(DWORD NameSpace,
|
|
|
|
DWORD Operation,
|
|
|
|
DWORD Flags,
|
|
|
|
LPSERVICE_INFOA ServiceInfo,
|
|
|
|
LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
|
|
|
|
LPDWORD dwStatusFlags)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock SetServiceA stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
SetServiceW(DWORD NameSpace,
|
|
|
|
DWORD Operation,
|
|
|
|
DWORD Flags,
|
|
|
|
LPSERVICE_INFOW ServiceInfo,
|
|
|
|
LPSERVICE_ASYNC_INFO ServiceAsyncInfo,
|
|
|
|
LPDWORD dwStatusFlags)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock SetServiceW stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
int
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
WSARecvEx(SOCKET Sock,
|
|
|
|
char *Buf,
|
|
|
|
int Len,
|
|
|
|
int *Flags)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock WSARecvEx stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
int
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
dn_expand(unsigned char *MessagePtr,
|
|
|
|
unsigned char *EndofMesOrig,
|
|
|
|
unsigned char *CompDomNam,
|
|
|
|
unsigned char *ExpandDomNam,
|
|
|
|
int Length)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock dn_expand stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
struct netent *
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
getnetbyname(const char *name)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock getnetbyname stub called\n");
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
UINT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
inet_network(const char *cp)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock inet_network stub called\n");
|
|
|
|
|
|
|
|
return INADDR_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
SOCKET
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
rcmd(char **AHost,
|
|
|
|
USHORT InPort,
|
|
|
|
char *LocUser,
|
|
|
|
char *RemUser,
|
|
|
|
char *Cmd,
|
|
|
|
int *Fd2p)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock rcmd stub called\n");
|
|
|
|
|
|
|
|
return INVALID_SOCKET;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
SOCKET
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
rexec(char **AHost,
|
|
|
|
int InPort,
|
|
|
|
char *User,
|
|
|
|
char *Passwd,
|
|
|
|
char *Cmd,
|
|
|
|
int *Fd2p)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock rexec stub called\n");
|
|
|
|
|
|
|
|
return INVALID_SOCKET;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
SOCKET
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
rresvport(int *port)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock rresvport stub called\n");
|
|
|
|
|
|
|
|
return INVALID_SOCKET;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
void
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
s_perror(const char *str)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock s_perror stub called\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
int
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
sethostname(char *Name, int NameLen)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock sethostname stub called\n");
|
|
|
|
|
|
|
|
return SOCKET_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
BOOL
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
DllMain(HINSTANCE InstDLL,
|
|
|
|
DWORD Reason,
|
|
|
|
LPVOID Reserved)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
GetNameByTypeA(LPGUID lpServiceType,LPSTR lpServiceName,DWORD dwNameLength)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock GetNameByTypeA stub called\n");
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
GetNameByTypeW(LPGUID lpServiceType,LPWSTR lpServiceName,DWORD dwNameLength)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"w32sock GetNameByTypeW stub called\n");
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
int
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
WSPStartup(
|
|
|
|
IN WORD wVersionRequested,
|
|
|
|
OUT LPWSPDATA lpWSPData,
|
|
|
|
IN LPWSAPROTOCOL_INFOW lpProtocolInfo,
|
|
|
|
IN WSPUPCALLTABLE UpcallTable,
|
|
|
|
OUT LPWSPPROC_TABLE lpProcTable
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
INT
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
NPLoadNameSpaces(
|
|
|
|
IN OUT LPDWORD lpdwVersion,
|
|
|
|
IN OUT LPNS_ROUTINE nsrBuffer,
|
|
|
|
IN OUT LPDWORD lpdwBufferLength
|
|
|
|
)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"mswsock NPLoadNameSpaces stub called\n");
|
|
|
|
|
|
|
|
*lpdwVersion = 1;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
StartWsdpService()
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"mswsock StartWsdpService stub called\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
StopWsdpService()
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"mswsock StopWsdpService stub called\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
2020-06-18 18:06:34 +00:00
|
|
|
*
|
|
|
|
* See https://www.geoffchappell.com/studies/windows/win32/services/svchost/dll/svchostpushserviceglobals.htm
|
2006-02-17 00:04:10 +00:00
|
|
|
*/
|
2020-06-18 18:06:34 +00:00
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2020-06-18 18:06:34 +00:00
|
|
|
SvchostPushServiceGlobals(SVCHOST_GLOBALS *lpGlobals)
|
2006-02-17 00:04:10 +00:00
|
|
|
{
|
|
|
|
OutputDebugStringW(L"mswsock SvchostPushServiceGlobals stub called\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
VOID
|
2008-11-30 11:42:05 +00:00
|
|
|
WINAPI
|
2006-02-17 00:04:10 +00:00
|
|
|
ServiceMain(DWORD Unknown1, DWORD Unknown2)
|
|
|
|
{
|
|
|
|
OutputDebugStringW(L"mswsock ServiceMain stub called\n");
|
|
|
|
}
|