 |
WSAStartup ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The WSAStartup function initiates use of Ws2_32.dll by a process. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
int WSAStartup(
WORD wVersionRequested,
LPWSADATA lpWSAData
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER WSAStartup IN ws2_32;
INTEGER wVerRq,;
STRING @ lpWSAData
|
 |
 |
 |
| Parameters: |
 |
wVersionRequested
[in] Highest version of Windows Sockets 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
[out] Pointer to the WSADATA data structure that is to receive details of the Windows Sockets implementation.
|
 |
 |
| Return value: |
 |
| The WSAStartup function returns zero if successful. Otherwise, it returns one of the predefined error codes. |
 |
 |
| Usage: |
 |
#DEFINE WSADATA_SIZE 398
#DEFINE WS_VERSION 0x0202
cWSADATA = Repli(Chr(0), WSADATA_SIZE)
= WSAStartup(WS_VERSION, @cWSADATA)
* ...
= WSACleanup()
|
 |
 |
| My comment: |
 |
MSDN: An application cannot call WSAGetLastError to determine the error code as is normally done in Windows Sockets if WSAStartup fails.
See also: WSACleanup |
 |
 |
| Word Index links for the WSAStartup : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-12-13 21:13:28 | | Modified: | 2007-06-11 16:24:13 | Visited in last 7 days: 113 |