Look at me.. I know something... ;)
Have you tried using the MSWinsock Component?
sample:
Public function Scan_IP()
dim myPort as integer
dim myHost as string
myPort = 1002
set myWinsock = creatobject("MSWinsock.Winsock")
for a = 0 to 255
myHost = "10.0.0." & a
myWinsock.RemoteHost = myHost
myWinsock.RemotePort = myPort
myWinsock.Connect
s = DoEvents
Do While myWinsock.State = 4
s = DoEvents()
Loop
Do While myWinsock.State = 6
s = DoEvents()
Loop
If myWinsock.State <> 7 Then GoTo nosend 'If we couldn't connect the we won't send anything, just move on to the next IP.
lstAvaliableIP.additem myHost
GoTo ending
nosend:
ending:
s = DoEvents
myWinsock.Close
next a
End Function
I think that should take care of your Buffer problem.