在内核驱动程序中使用 Windows 过滤平台

发布于 2024-12-25 03:05:49 字数 299 浏览 1 评论 0原文

我们最近向我们的驱动程序添加了 Windows 过滤平台功能。

我们设法毫无问题地从 wfp 获取所需的信息,但问题出在启动过程中 - 自从我们添加了 wfp 功能后,使用驱动程序的机器就无法启动 - 它们陷入死锁(计算机“卡在”启动画面)。

我们认为这可能是因为我们的驱动程序仅依赖于 FltMgr,并且可能在加载 wfp 框架之前加载(TcpStack?)。

我的问题是 - 有没有办法询问服务经理或任何其他机构是否加载了 wfp 框架?甚至更进一步 - 驱动程序 wfp 依赖什么? (所以我可以在开始使用之前检查它们是否已加载)

We recently added Windows Filtering Platform capabilities to our driver.

We managed to get the information we required from the wfp with no problem, but the problem is during the boot process - eversince we added the wfp capabilities, machines using the driver cannot boot - they get a deadlock (the computer's "stuck" in the splash screen).

We figured its probably because our driver is dependent only on FltMgr and is probably loaded before the wfp framework is loaded (TcpStack?).

My question is - is there a way to ask the Service Manager or any other authority whether or not the wfp framework is loaded? or even further - what is the drivers wfp is dependent on? (so I could check if they are loaded before starting using it)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

与他有关 2025-01-01 03:05:49

这是我在 DriverEntry 中所做的事情。

//
// Wait for the WFP engine to be ready.
//

FWPM_SERVICE_STATE  bfeState;

bfeState = FwpmBfeStateGet0();
if (bfeState != FWPM_SERVICE_RUNNING) 
{
    WaitTime.QuadPart = (-5000000);   // wait 500000us (500ms) relative
    do {
        KeDelayExecutionThread (KernelMode, FALSE, &WaitTime);
        bfeState = FwpmBfeStateGet0();
        WaitCycles--;
    } while (bfeState != FWPM_SERVICE_RUNNING && WaitCycles > 0);
}

if (bfeState != FWPM_SERVICE_RUNNING)
{
    // log and error handling
}

Here is what I do in DriverEntry.

//
// Wait for the WFP engine to be ready.
//

FWPM_SERVICE_STATE  bfeState;

bfeState = FwpmBfeStateGet0();
if (bfeState != FWPM_SERVICE_RUNNING) 
{
    WaitTime.QuadPart = (-5000000);   // wait 500000us (500ms) relative
    do {
        KeDelayExecutionThread (KernelMode, FALSE, &WaitTime);
        bfeState = FwpmBfeStateGet0();
        WaitCycles--;
    } while (bfeState != FWPM_SERVICE_RUNNING && WaitCycles > 0);
}

if (bfeState != FWPM_SERVICE_RUNNING)
{
    // log and error handling
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文