如何将过滤器驱动程序添加到其他驱动程序(如HID迷你端口驱动程序)? [英] How do I add a filter driver to other driver which is like a HID mini-port driver?

查看:467
本文介绍了如何将过滤器驱动程序添加到其他驱动程序(如HID迷你端口驱动程序)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 


我有一个项目需要为HID迷你端口驱动程序添加过滤器。  第三方驱动程序不是MSFT收件箱驱动程序。 


由于我已成功向HIDI2C设备添加过滤器驱动程序,因此INF的内容可能如下所示 


[MyFilter_Inst.NT]

包含= HIDI2C.INF

需要= HIDI2C_Device.NT

CopyFiles = MyFilter_Inst_CopyFiles .NT



[MyFilter_Inst.NT.HW]

包含= HIDI2C.INF

需要= HIDI2C_Device。 NT.HW

AddReg = MyFilter_Inst_HWAddReg.NT.HW



[MyFilter_Inst_HWAddReg.NT.HW]

HKR ,,"UpperFilters",0x00010000," MyFilter"



[MyFilter_Inst.NT.Services]

Include = HIDI2C.INF < br $>
需要= HIDI2C_Device.NT.Services

AddService = MyFilter ,, MyFilter_Service_Inst



; -------------------------------------------------- -------
$


; -------------------------------------------------- -------

[MyFilter_Inst_CopyFiles.NT]


MyFilter.sys



[MyFilter_Service_Inst]
$
DisplayName    =%MyFilter.SvcDesc%

ServiceType    = 1  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP ;; SERVICE_KERNEL_DRIVER

StartType  &NBSP;   = 3  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP ;; SERVICE_DEMAND_START

ErrorControl  = 1  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP ;; SERVICE_ERROR_NORMAL

ServiceBinary  =%12%\ MyFilter.sys


驱动程序hidi2c.sys是一个Hid迷你端口驱动程序。  现在,还有另一个第三个驱动程序也是一个Hid迷你端口驱动程序。 


第三方驱动程序已安装在系统中。我需要将MyFilter添加到此驱动程序。 


我的第一个用途是替换这些项目"包括"和"需要" 


包含= HIDI2C.INF

需要= HIDI2C_Device.NT


我能找到第三方驱动程序的INF,如oem45.inf。  即使我可以将oem45.in添加到inculde中,编译过程也可以。但是对于Windows来说,inf看起来无效。 


那么,有人能告诉我如何将MyFilter添加到迷你端口驱动程序中吗?  



BR


Caro Lin

解决方案

听起来你问的是如何安装特定于设备的过滤器驱动程序,请查看文档:

https://docs.microsoft.com/en-us/windows-hardware/drivers/install/安装过滤器驱动程序



Hi, 

I has one project need to add a filter to a HID mini-port driver.  The 3rd party driver is not MSFT inbox driver. 

Since I has successfully add a filter driver to HIDI2C device, the content of INF may be like the following 

[MyFilter_Inst.NT]
Include = HIDI2C.INF
Needs = HIDI2C_Device.NT
CopyFiles = MyFilter_Inst_CopyFiles.NT

[MyFilter_Inst.NT.HW]
Include = HIDI2C.INF
Needs = HIDI2C_Device.NT.HW
AddReg = MyFilter_Inst_HWAddReg.NT.HW

[MyFilter_Inst_HWAddReg.NT.HW]
HKR,,"UpperFilters",0x00010000,"MyFilter"

[MyFilter_Inst.NT.Services]
Include = HIDI2C.INF
Needs = HIDI2C_Device.NT.Services
AddService = MyFilter, , MyFilter_Service_Inst

; ---------------------------------------------------------

; ---------------------------------------------------------
[MyFilter_Inst_CopyFiles.NT]

MyFilter.sys

[MyFilter_Service_Inst]
DisplayName    = %MyFilter.SvcDesc%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\MyFilter.sys

The driver hidi2c.sys is a Hid mini-port driver.  Now, there is another 3rd driver which is also a Hid mini-port driver. 

The 3rd party driver is already installed in the system. I need to add MyFilter to this driver. 

My first through is to replace those items "Include" and "Needs" 

Include = HIDI2C.INF
Needs = HIDI2C_Device.NT

I can find the INF of 3rd party driver, like oem45.inf.  Even I can add the oem45.in to the inculde, the compile procedure is ok. But the inf looks like invalid for windows. 

So, could anyone tell me how to add MyFilter to a mini port driver?  

B.R.

Caro Lin

解决方案

It sounds like you are asking how to install a device specific filter driver, take a look at the documentation: https://docs.microsoft.com/en-us/windows-hardware/drivers/install/installing-a-filter-driver


这篇关于如何将过滤器驱动程序添加到其他驱动程序(如HID迷你端口驱动程序)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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