Using Win32 functions in Visual FoxPro Image Gallery
Windows Sockets 2 (Winsock)
..msdn
accept
bind
closesocket
gethostbyaddr
gethostbyname
gethostname
getnameinfo
getprotobyname
getprotobynumber
getservbyname
getservbyport
getsockopt
htonl
htons
inet_addr
inet_ntoa
listen
ntohl
ntohs
recv
recvfrom
send
sendto
setsockopt
socket
WSACleanup
WSACloseEvent
WSAConnect
WSACreateEvent
WSAEnumProtocols
WSAEventSelect
WSAGetLastError
WSARecv
WSASend
WSAStartup
WSAWaitForMultipleEvents
ws_connect
ws_select
Code examples:
A client for testing non-blocking Winsock server
How to build UDP responder
How to create non-blocking Winsock server
How to ping a remote site using ICMP API calls
How to retrieve network parameters for the local computer (including Host name, Domain name, and DNS Server)
Retrieving the interface–to–IP address mapping table
Retrieving the IP-to-physical address mapping table
Winsock: changing the byte ordering
Winsock: connecting to a news server (NNTP, port 119)
Winsock: creating a socket that is bound to a specific service provider
Winsock: how to retrieve a service information corresponding to a port
Winsock: how to retrieve a service information corresponding to a service name
Winsock: how to retrieve the protocol information corresponding to a protocol name
Winsock: how to retrieve the protocol information corresponding to a protocol number
Winsock: initializing the service in the VFP application
Winsock: reading and setting socket options
Winsock: reading email messages (POP3, port 110)
Winsock: resolving an address to a host name
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Winsock: retrieving information about available transport protocols
Winsock: retrieving information from a host database for a given host name
Winsock: retrieving the host information corresponding to a network address
Winsock: retrieving the standard host name and IP address for the local machine
Winsock: retrieving Web pages using sockets (HTTP, port 80)
Winsock: sending email messages (SMTP, port 25)
WSAStartup
..msdn    Add comment     W32 Constants      Translate this page
The WSAStartup function initiates use of Ws2_32.dll by a process.
Code examples:
Winsock: sending email messages (SMTP, port 25)
Winsock: retrieving Web pages using sockets (HTTP, port 80)
How to ping a remote site using ICMP API calls
How to create non-blocking Winsock server
Winsock: reading email messages (POP3, port 110)
Winsock: how to retrieve the protocol information corresponding to a protocol number
Winsock: connecting to a news server (NNTP, port 119)
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Winsock: reading and setting socket options
Winsock: resolving an address to a host name
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
•
Created: 2001-12-13 21:13:28
Modified: 2007-06-11 16:24:13
Visited in last 7 days: 39
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.227.41.242)
11.48 min.Example: 'Peer-to-peer LAN messenger built with Mailslot API functions'
Google
Advertise here!