none
How do I add a filter driver to other driver which is like a HID mini-port driver? RRS feed

  • Question

  • 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

    Thursday, August 17, 2017 12:31 PM

All replies