Jump to content

vb


milo

Recommended Posts

This forum is supported by the 12ozProphet Shop, so go buy a shirt and help support!
This forum is brought to you by the 12ozProphet Shop.
This forum is brought to you by the 12oz Shop.

Dim sockin As sockaddrT

Dim s%, SelectOps%, dummy%

SockReadBuffer$ = ""

sockin = saZero

sockin.sin_family = AF_INET

 

sockin.sin_port = htons(Port%)

If sockin.sin_port = INVALID_PORT Then

ConnectSock% = INVALID_SOCKET

Exit Function

End If

 

sockin.sin_addr = GetHostByNameAlias(host$)

If sockin.sin_addr = INADDR_NONE Then

ConnectSock% = INVALID_SOCKET

Exit Function

End If

retIpPort$ = getascip$(sockin.sin_addr) & ":" & ntohs%(sockin.sin_port)

 

s% = Socket%(PF_INET, SOCK_STREAM, IPPROTO_TCP)

If s% < 0 Then

ConnectSock% = INVALID_SOCKET

Exit Function

End If

If SetSockLinger(s%, 1, 0) = SOCKET_ERROR Then

If s% > 0 Then

dummy% = closesocket(s%)

End If

ConnectSock = INVALID_SOCKET

Exit Function

End If

If Not Async% Then

If connect%(s%, sockin, sockaddr_size) <> 0 Then

If s% > 0 Then

dummy = closesocket(s%)

End If

ConnectSock% = INVALID_SOCKET

Exit Function

End If

SelectOps = FD_READ Or FD_WRITE Or FD_CONNECT Or FD_CLOSE

If WSAAsyncSelect(s%, HWndToMsg%, ByVal 1025, ByVal SelectOps) Then

If s% > 0 Then

dummy% = closesocket(s%)

End If

ConnectSock = INVALID_SOCKET

Exit Function

End If

Else

SelectOps = FD_READ Or FD_WRITE Or FD_CONNECT Or FD_CLOSE

If WSAAsyncSelect(s%, HWndToMsg%, ByVal 1025, ByVal SelectOps) Then

If s% > 0 Then

dummy% = closesocket(s%)

End If

ConnectSock = INVALID_SOCKET

Exit Function

End If

If connect%(s%, sockin, sockaddr_size) <> -1 Then

If s% > 0 Then

dummy = closesocket(s%)

End If

ConnectSock% = INVALID_SOCKET

Exit Function

End If

End If

ConnectSock% = s%

End Function

Link to comment
Share on other sites

Originally posted by HESHIANDET

dingus, try it in php......;)

 

MsgBox " I aint no dingus", vbOkOnly, "I think?"

 

 

 

dim strGraffiti as string

if I = "suck at VB" then thread "VB" = waste of time else if I = "kick VB's ass" then thread "VB" = "still a waste of time" end if 

Link to comment
Share on other sites

Originally posted by dosoner

yea, vbscript and visual basic coding is diffrent stuff, although i really dont belive either one to be all that usefull, allthough, vb6 can be use to make rather entertaining addons for many chat programs, such as aim ,irc, aol, you get the idea

 

 

ohhhhhhhh uneducated in the difference.. so vb6 is shit in here alghough i did get some pretty colors off that one post. and i can use vb6.0 on aim to make funny as programs?? werd up.. vb6.0 is usefull for an Associates of Applied Science degree in Info Systems Technology... C++ is next whopee!!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...