粮食计划署的实际运作方式 [英] How WFP actually works?

查看:53
本文介绍了粮食计划署的实际运作方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道某些用户模式使用WFP API。我将通过它实现防火墙系统。我有一个问题或疑问。 

I knew some  User mode uses of WFP API. I am going to implement a firewall system through it. I have a issue or question. 

当我向过滤机器添加过滤器时,我知道我可以使用"enum handle"删除它。和deletebykey。哪两个都需要engineHandle作为参数。对于防火墙系统,我需要使用用户模式对过滤引擎应用永久过滤器。 (可以使用 持久标志来完成
)。

When I add a filter to filtering machine I knew i can delete by using "enum handle" and deletebykey. Which both require engineHandle as the argument. For a firewall system I need to apply a permanent filter to filtering engine using user mode. (Can be done by using Persistent flag).

现在我的问题是:

1。当我关闭我的程序时,我将丢失engineHandle,那么如何删除过滤器。

1. When one closes my program the I will lost engineHandle, So how can I delete a filter.

2。如果我让我的程序在后台运行,那么程序就会关闭,所以现在我也丢失了我的engineHandle。 

2. If I make my program run in background then the program closes, so now also  I lost my engineHandle. 

所以如何删除过滤器。 

So how to delete a filter. 

我想问:

>我可以将WFP与Metro Apps一起使用吗?  

>Can I use WFP with Metro Apps.??  

>写入有关过滤器键的文件中的日志是否合适,以便我可以在以后删除它?

>Is it good to write logs in files about the filter keys so that i can delete it later??

我正在做一个很快就要完成的项目。请帮助。

I am doing a project which have very soon deadline. Please Help.

RBN

推荐答案

1)你只需创建一个new engineHandle。 如果你正确地添加了对象(即你用你的提供商标记了它,并使其持久化等),那么你创建一个新的engineHandle,枚举你的过滤器,并删除你想要的那些。

1) You would just create a new engineHandle.  If you added the object correctly (i.e. you tagged it with your provider, and made it persistent, etc.) then you create a new engineHandle, enum your filters, and delete the ones you want.

2)如果程序在后台运行,那么engineHandle仍在那里(你的程序仍在运行或者我误解了这个问题)。

2) If the program is running in the background, then the engineHandle is still there (your program is still running or am I misunderstanding the question).

3)WFP不是针对现代应用程序。 它需要管理员权限和对Modern Apps无权访问的资源的访问权限。 这并不是说您无法将应用程序设计为具有现代应用程序空间中存在的UI,以便
以某种方式与Modern App sapce之外的服务进行通信,这将完成所有策略管道等。

3) WFP is not targeted for Modern Apps.  It requires Administrative privileges and access to resources that Modern Apps do not have access to.  This is not to say you couldn't design your app to have a UI that exists in the Modern App space that somehow communicates to a service outside the Modern App sapce which does all of your policy plumbing etc.

4)这取决于你的设计。 它的可扩展性不高。 枚举过滤器是最好的方法。

4) It really depends on your design.  Its not very scalable.  Enumerating your filters is the best approach.

希望这有帮助,


这篇关于粮食计划署的实际运作方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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