Omega wrote:
Hi
In serveral firewall softwares you can block network traffic quickly with
one click, can I do the same in c# ?
Thanks
If you build a firewall in C#, yes.
Although I think it is possible, building the necessary driver-level
software in C or C++ would probably be a lot easier.
In any case, building a working firewall application is not an easy task
in any language. You need specific knowledge about how to hook into the
network subsystem and how to handle the flow of traffic properly at that
level.
If, on the other hand, you're asking if you can "press that button" in
the firewall software from C#, you might be able to but I doubt it.
Usually the interaction with the firewall software is only possible
through the GUI for the application so that malicious programs can't
interfere with its operation. In any case, that's probably a question
you need to ask the makers of the firewall program you want to control.
--
Lasse Vågsæther Karlsen
http://www.vkarlsen.no/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2