Link to home
Start Free TrialLog in
Avatar of maxsimpson
maxsimpson

asked on

VB API to check if a port is open

I am looking for a VB API to test if a remote port is open.
I currently use VB to generate a batch file and shell the batch file but there must be an API that could make the process a lot easier.

Any help or coding examples will be appreciated.
Avatar of berylwilson
berylwilson

u can do this using winsock api...

The code loos roughly like this...

Public Sub CheckRmPort()
     StartWinsock vbNullString
     theSocket = ConnectSock("SERVER_IP", SERVER_PORT, vbNullString, Me.hwnd, False)

end sub
ASKER CERTIFIED SOLUTION
Avatar of shijaz_a
shijaz_a

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial