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:
Winsock: connecting to a news server (NNTP, port 119)
WSAConnect
..msdn    Add comment     W32 Constants      Translate this page
Establishes a connection to another socket application, exchanges connect data, and specifies required quality of service based on the specified FLOWSPEC structure.
Code examples:
Winsock: connecting to a news server (NNTP, port 119)
Declaration:
int WSAConnect(
  SOCKET s,
  const struct sockaddr* name,
  int namelen,
  LPWSABUF lpCallerData,
  LPWSABUF lpCalleeData,
  LPQOS lpSQOS,
  LPQOS lpGQOS
);
FoxPro declaration:
DECLARE INTEGER WSAConnect IN ws2_32;
    INTEGER s,;
    STRING @sname,;
    INTEGER namelen,;
    INTEGER lpCallerData,;
    INTEGER lpCalleeData,;
    INTEGER lpSQOS,;
    INTEGER lpGQOS
Parameters:
s
[in] Descriptor identifying an unconnected socket.

name
[in] Name of the socket in a sockaddr structure in the other application to which to connect.

namelen
[in] Length of name, in bytes.

lpCallerData
[in] Pointer to the user data that is to be transferred to the other socket during connection establishment. See Remarks.

lpCalleeData
[out] Pointer to the user data that is to be transferred back from the other socket during connection establishment. See Remarks.

lpSQOS
[in] Pointer to the FLOWSPEC structures for socket s, one for each direction.

lpGQOS
[in] Reserved for future use with socket groups. A pointer to the FLOWSPEC structures for the socket group (if applicable). Should be NULL.
Return value:
If no error occurs, WSAConnect returns zero. Otherwise, it returns SOCKET_ERROR, and a specific error code can be retrieved by calling WSAGetLastError.
Usage:
cBuffer = num2word(AF_INET) +;
    num2word(htons(m.nPort)) +;
    num2dword(inet_addr(m.cIP)) +;
    Repli(CHR(0),8)

= WSAConnect(m.hSocket, @cBuffer,;
    Len(m.cBuffer), 0,0,0,0)
Word Index links for the WSAConnect :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-05-15 16:13:21
Modified: 2007-06-11 16:23:14
Visited in last 7 days: 11
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.158.214.111)
2 sec.Function: 'CertCloseStore'
Function group: 'Cryptography Reference'
3 sec.Function: 'GdipGetMatrixElements'
Function group: 'GDI+ Matrix'
8 sec.Project
10 sec.Function: 'CryptCreateHash'
Function group: 'Cryptography Reference'
12 sec.Function: 'AVIFileInfo'
Function group: 'Windows Multimedia'
14 sec.Function: 'SCardDisconnect'
18 sec.Function: 'SetupDiGetClassImageIndex'
Function group: 'Setup API functions'
20 sec.Articles
21 sec.Function: 'waveOutUnprepareHeader'
Function group: 'Windows Multimedia'
23 sec.Function: 'GdipCreateBitmapFromHBITMAP'
Function group: 'GDI+ Bitmap'
Google
Advertise here!