Free Code


All examples include a PB10.5 version and a PB12.6 version if there are Windows API functions. The PB12.6 versions are verified to work in 64bit. If you find this code really useful and would like to donate, click the PayPal button in the upper right corner.

Click here to download an installer for all the free code samples: WebExamples
Click here to download an installer for the old PB8 & PB10 samples: WebExamplesOld


Adapter  

Winsock

This example uses Winsock to send and receive data from one computer to another using TCP or UDP protocols. It could be client to server or client to client communication. It could even be used with a peripheral device. IPv4 and IPv6 are supported.

Win API Functions used:

accept recv
bind recvfrom
closesocket RegisterEventSource
connect ReportEvent
DeregisterEventSource RtlMoveMemory
FormatMessage send
freeaddrinfo sendto
getaddrinfo setsockopt
gethostname shutdown
getpeername socket
getsockname WNetGetUser
getsockopt WSAAddressToString
htons WSAAsyncSelect
inet_ntoa WSACleanup
ioctlsocket WSAGetLastError
listen WSASetLastError
ntohs WSAStartup
OutputDebugString  

Click here to download the PowerBuilder sample : WINSOCK.ZIP

——— Last updated 10/01/2019 ———

Amyuni  
BCrypt  
Bitmap  
Canvas  
ChooseFont  
Colors  
ControlPanel  
Cryptoapi  
DisplayIcon  
DWGridXP  
DynamicMenus  
EmailPOP3  
EmailSMTP  
Filesys  
FTPClient  
GetFileName  
GetFolder  
GetURL  
Icontray  
ImageList  
Indirect  
LDAPQuery  
LineCount  
MessageBox  
Mutex  
ODBC API  
OSVersion  
Outlook  
ParentWindow  
PBDebug  
PBEditor  
Ping  
PrinterInstall  
PSRViewer  
ResizeResponse  
RunAndWait  
Send SMS  
SizeOf  
Splitbars  
Statbar  
String Class  
USPS Barcode  
WebBrowser  
WinHTTP  
Winsock  
XmlHttp  
Zlibwapi