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
347 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 250 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

717 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