C# 防火墙在 Windows 7 上不起作用 [英] C# Firewall not working at Windows 7

查看:39
本文介绍了C# 防火墙在 Windows 7 上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我在一个防火墙项目中工作.首先我从 codeproject http://www.codeproject.com/KB/cpp 下载了一个防火墙项目/firewallpapi.aspx 这是在 C++ 中.所以我从该代码制作了一个 dll 并从 C# 项目中调用它.它的工作完美.但在 Windows 7 中它不起作用.谁能给我任何提示,为什么它在 Windows 7 上不起作用.

Presently I am working in a Firewall project. First I downloaded a Firewall project from codeproject http://www.codeproject.com/KB/cpp/firewallpapi.aspx which was in C++. So I made a dll from that code and called it from C# project. Its working perfectly . But in Windows 7 it is not working. Can anyone give me any hint, why it is not working at windows 7.

谢谢.

推荐答案

也许是因为 API 已更改:

"通过提供更简单的开发平台,Windows 过滤平台旨在取代以前的数据包过滤技术,例如传输驱动程序接口 (TDI)过滤器,网络驱动程序接口规范 (NDIS) 过滤器,以及Winsock 分层服务提供者(LSP).从 Windows Server 2008 开始和 Windows Vista,防火墙钩子并且过滤器钩子驱动程序不是可用的;应用程序使用这些驱动程序应该使用 Windows改为过滤平台."

"By providing a simpler development platform, Windows Filtering Platform is designed to replace previous packet filtering technologies such as Transport Driver Interface (TDI) filters, Network Driver Interface Specification (NDIS) filters, and Winsock Layered Service Providers (LSP). Starting in Windows Server 2008 and Windows Vista, the firewall hook and the filter hook drivers are not available; applications that were using these drivers should use Windows Filtering Platform instead."

这篇关于C# 防火墙在 Windows 7 上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆