WSAStartup
The first call to WSAStartup initiates the use of RT-TCP/IP by an RTSS process. Subsequent calls to WSAStartup increment a startup count. An application must perform an equal number of WSACleanup calls, which would decrement a startup count. The final call performs an actual cleanup.
Syntax
int WSAStartup( WORD wVersionRequested, LPWSADATA lpWSAData );
Parameters
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.
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
One of these error codes if the function fails:
Error Code |
Description |
---|---|
WSAEFAULT |
The lpWSAData parameter is an invalid pointer. |
WSAVERNOTSUPPORTED |
The version of WinSock support requested is not provided by this particular WinSock implementation. |
WSASYSNOTREADY |
Network subsystem is not ready for network communications. |
Remarks
The WSAStartup function should only be called once within an RTSS process.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | Winsock2.h |
Library | RtTcpip.lib |