?
Solved

Using VB6, How do I detect whether a certain port is closed on Windows XP Internet Connection Firewall?

Posted on 2004-10-09
4
Medium Priority
?
364 Views
Last Modified: 2006-11-17
I need to be able to have my Visual Basic 6 (VB6) application detect whether the machine it is running on has Windows XP Internet Connection Firewall (even better - any software firewall (e.g., ZoneLabs)) blocking inbound UDP traffic on port 8473.
0
Comment
Question by:samuel999
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 1000 total points
ID: 12268012
If you just wanted to test XP's firewall I'd recommend Microsoft's Firewall API (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ics/ics/windows_firewall_start_page.asp?frame=true).  Since you want to test for ports against any frewall, then I recommend a port scanner.  Here's a link to a VB port scanner: http://www.planet-source-code.com/URLSEO/vb/scripts/ShowCode!asp/txtCodeId!56397/lngWid!1/anyname.htm
0
 
LVL 3

Expert Comment

by:owitte
ID: 12268287
Hello samuel999,

how about sending a UDP request on port 8473 and wait for a certain time for an answer? If it times out, you can tell the user that the program didn't get a response and all firewalls should be turned off (or to change the configuration to let these requests through)...
0
 

Author Comment

by:samuel999
ID: 12268990
I'm trying to detect if a UDP packet on port 8473 sent from OUTSIDE this user's computer can be received by my application listening to that port while running locally on this user's computer.  

BlueDevilFan:  I like your first suggestion.  The API works well.  Your second suggestion, a port scanner:  Can that test my own computer as to whether certain ports are open to access FROM the OUTSIDE on the computer I'm running on, or will that just allow me to test whether ports on OTHER computers are open?

owitte:  A firewall doesn't necessarily block OUTBOUND traffic, just incoming traffic.  I'm trying to detect if I can receive incoming traffic on 8473, not if I can send outbound traffic.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month13 days, 14 hours left to enroll

801 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