Home > database >  O pbws32. DLL
O pbws32. DLL

Time:09-23

O pbws32. DLL, pb to obtain IP address

CodePudding user response:

File:
http://www.allpos.cn/csdn/pbws32.zip
Code:
Winsock ws
String sHostName, ls_iplist
Ulong ulAddr
Pbhostent iHostent
Int li_i

Ws=create winsock
SHostName=space (255)
Ws. GetHostName (sHostName, len (sHostName))

IHostent=ws. GetHostByName (sHostName)
If IsNull (iHostent) then
MessageBox (" server "and" err!" )
Return
End the if

For li_i=1 to upperbound (iHostent h_addr_list)
UlAddr=iHostent. H_addr_list [li_i]
Ls_iplist +=ws. Inet_ntoa (ulAddr) + '; '
Next
Messagebox (' iplist 'ls_iplist)

Destroy the ws


  • Related