WSAStartup

The first call to WSAStartup initiates the use of TCP/IP by an RTSS process. Subsequent calls to WSAStartup increase a startup count. An application must perform an equal number of WSACleanup calls, which would decrease a startup count. The final call performs an actual cleanup.

Syntax

Copy
int WSAStartup(
    [in]    WORD wVersionRequested,
    [out]   LPWSADATA lpWSAData
);

Parameters

[in] wVersionRequested

The highest version of Winsock support that the caller can use. The high order byte specifies the minor version (revision) number; the low-order byte specifies the major version number.

[out] lpWSAData

A pointer to the WSADATA data structure that is to receive details of the Winsock implementation.

Return Value

0 (zero) if the function succeeds.

If the function succeeds, it returns 0 (zero). If the function fails, it returns one of the following error codes:

Error code

Description

WSAEFAULT

The lpWSAData parameter is an invalid pointer.

WSAVERNOTSUPPORTED

The version of Winsock support requested is not provided by this Winsock implementation.

WSASYSNOTREADY

Network Subsystem is not ready for network communications.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

winsock2.h

RttcpipApi.lib