?
Solved

VB API to check if a port is open

Posted on 2003-03-11
2
Medium Priority
?
245 Views
Last Modified: 2013-11-13
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.
0
Comment
Question by:maxsimpson
2 Comments
 

Expert Comment

by:berylwilson
ID: 8117201
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
0
 

Accepted Solution

by:
shijaz_a earned 225 total points
ID: 8117424
Download the API Guide from www.allapi.net
Its a freeware app. that lists out around 925 APIs along with comments on how to use them as well as numerous examples. It's great and I'm sure it has the answer to ur problem.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question