21#define WsStartupLock() EnterCriticalSection(&WsStartupLock)
22#define WsStartupUnlock() LeaveCriticalSection(&WsStartupLock)
50 DPRINT(
"WSApSetPostRoutine: %p\n", Routine);
86 DPRINT(
"WSACleanup RefCount = %ld\n", RefCount);
95 DPRINT(
"WSACleanup uninitialized\n");
116 WORD VersionReturned = 0;
119 DPRINT(
"WSAStartup: %wx %d.%d\n", wVersionRequested,
LOBYTE(wVersionRequested),
HIBYTE(wVersionRequested));
125 switch (
LOBYTE(wVersionRequested))
136 if (
HIBYTE(wVersionRequested) <= 1)
150 if (
HIBYTE(wVersionRequested) <= 2)
169 if (lpWSAData ==
NULL)
176 lpWSAData->wVersion = VersionReturned;
179 lpWSAData->wHighVersion =
MAKEWORD(2,2);
180 lstrcpy(lpWSAData->szDescription,
"WinSock 2.0");
181 lstrcpy(lpWSAData->szSystemStatus,
"Running");
187 if (
LOBYTE(wVersionRequested) == 1)
189 lpWSAData->iMaxSockets = 32767;
190 lpWSAData->iMaxUdpDg = 65467;
194 lpWSAData->iMaxSockets = 0;
195 lpWSAData->iMaxUdpDg = 0;
213 if (CurrentProcess)
break;
#define InterlockedIncrement
#define InterlockedDecrement
#define WsStartupUnlock()
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
VOID WSAAPI WsDestroyStartupSynchronization(VOID)
VOID WSAAPI WsCreateStartupSynchronization(VOID)
BOOL WSAAPI WSApSetPostRoutine(PVOID Routine)
PWS_SOCK_POST_ROUTINE WsSockPostRoutine
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
_In_ NDIS_ERROR_CODE ErrorCode
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define WSANOTINITIALISED
#define WSAVERNOTSUPPORTED
int PASCAL FAR WSACleanup(void)
INT WSAAPI WsSockStartup(VOID)
DWORD WSAAPI WsThreadStartup(VOID)
VOID WSAAPI WsAsyncTerminateThread(VOID)
FORCEINLINE PWSPROCESS WsGetProcess(VOID)
VOID WSAAPI WsProcDelete(IN PWSPROCESS Process)
BOOLEAN WsAsyncThreadInitialized
INT WSAAPI WsProcStartup(VOID)
VOID WSAAPI WsProcSetVersion(IN PWSPROCESS Process, IN WORD VersionRequested)
INT WSAAPI WsApiProlog(OUT PWSPROCESS *Process, OUT PWSTHREAD *Thread)
BOOL(WINAPI * PWS_SOCK_POST_ROUTINE)(IN HWND hWnd, IN UINT wMsg, IN WPARAM wParam, IN LPARAM lParam)