473,563 Members | 2,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use WINDOWS FIREWALL API?

Hello!

Could someone kindly show me how to use WINDOWS FIREWALL API in visual basic
6.0

Some snippets of code may help me with some basic documentation.

Lets assume i want to block a port using the firewall api provided by
windows, how would i do it using visual basic.

I am currently trying to develop a firewall, but as i am a newbie programmer
to visual basic i am not able to figure anything out. I am also trying to
figure out usage of EASYSEC FIREWALL SDK, but i don't know how to use it with
visual basic, some info on that would also help me.

Thanks.

Documentation read :

[link]http://msdn.microsoft. com/library/default.asp?url =/library/en-us/ics/ics/using_windows_f irewall.asp[/link]

[link]http://msdn2.microsoft .com/en-us/library/aa366415.aspx[/link]

and

some part of this blog explaing some concepts.

[link]http://blogs.msdn.com/larryosterman/archive/tags/Nifty+Win32+tri cks_2E00_/Fascinating+gee k+stuff/default.aspx[/link]
Apr 1 '07 #1
2 6153
I also used this article and tried the code here

http://www.codeproject.com/useritems...e_firewall.asp

but i keep on getting errors....

I did this am i correct?

First i opened a vb project, then clicked the project then selected the
references tab and added the Hnetcfg.dll. After this when i try to add
NetFwTypeLib from the components(COM) , it wont show up!!!

Am i doing some mistake?

please guide me. Thanks.
Apr 2 '07 #2
Moa,

As this newsgroup is the last sample special for VB.Net a quiet different
program language from VB6. Those newsgroups you find by instance with a name
as

microsoft.publi c.vb.general.di scussions.

Cor
"m0a" <m0*@discussion s.microsoft.com schreef in bericht
news:BE******** *************** ***********@mic rosoft.com...
>I also used this article and tried the code here

http://www.codeproject.com/useritems...e_firewall.asp

but i keep on getting errors....

I did this am i correct?

First i opened a vb project, then clicked the project then selected the
references tab and added the Hnetcfg.dll. After this when i try to add
NetFwTypeLib from the components(COM) , it wont show up!!!

Am i doing some mistake?

please guide me. Thanks.

Apr 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4757
by: Timothy Parez | last post by:
Hello, I've seen some front-ends for the windows firewall api (for example: http://www.codeproject.com/internet/drvfltip.asp) but I'm not familiar with C++. Now I wonder if someone can show me some examples/documents/tutorials/... on how to use this api with C# All I want to do is create a small front-end which for example
0
1432
by: Nate Hekman | last post by:
I've been trying to use WebClient to download a file from an ftp server, but kept getting this exception during the call to DownloadData: An existing connection was forcibly closed by the remote host. After much hair-pulling I finally figured out that if I disable Windows Firewall the error goes away. I imagine I should be able to add...
2
2951
by: Lars Netzel | last post by:
Hi How do i (in vb.net) get the information if the windows firewall is turned on or off? best regards /Lars
0
1328
by: APA | last post by:
I have a desktop application (.NET 1.1) that accesses a web service. Many users now have XP and the Windows Firewall and sometimes when the application first starts that don't properly get the app in the exception list. So, is there a way to find out if an application is in the firewall exception list, probably a registry key or something
1
3199
by: chris.dannemiller | last post by:
I am looking to perform the following actions 1. Detect if the Windows Firewall exists, and is enabled, if it is not the case no action will be taken. 2. See if the application and ports are already Exceptions if so do nothing. 3. Post a message to the user that the firewall will block the application and allow the user to decide if he...
2
2281
by: kimster | last post by:
I was wondering if there is a way to detect if the Windows firewall is turned on for the machine in which the script is running? If so, is there a way to detect the firewall's settings? Thanks!
2
2359
by: snowman984 | last post by:
The problem is this, all of our laptops are running windows xp with the sp2 update. When the laptops were originally setup they were joined to our domain controller. Once joined, it seems, the windows firewall was automatically disabled, since then we have been unable to reactivate it. Is it possible to restore windows firewall when a PC is...
2
1478
by: =?Utf-8?B?YnJpZ2Fkb29t?= | last post by:
windows firewall not working at all. i need to access windows firewall program but when i click icon in control panel box pops up stating "Due to an unidentified problem,windows cannot display windows firewall settings." thats it no explanation or hint as to what is wrong just that it doesnt work, so how do you fix it ????
2
29547
by: buddhika1984 | last post by:
Hi, I am going to make WMI connection to a remote computer. here, i want to know which ports should be opened in windows firewall (Windows server 2008) to do that. I tested with two machines by opening two ports (rather than creating rules). For a successful WMI connection, I had to open following ports. First machine: TCP 135, TCP...
0
7877
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7631
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7943
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6238
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5479
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5204
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3631
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2077
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.