I'm trying to create a simple windows driver, but the FltRegisterFilter is not working ! I got the following error code : 0xc0000034 (I think it refers to the STATUS_OBJECT_NAME_NOT_FOUND error code).
Do you know if the generated INF file is enough ? I just tried to add this line in a driver install section : Dependencies = FltMgr.
Here is the full INF file :
;
; KmdfMiniFilter.inf
;
[Version]
Signature="$WINDOWS NT$"
Class=Sample ; TODO: edit Class
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} ; TODO: edit ClassGuid
Provider=%ManufacturerName%
CatalogFile=KmdfMiniFilter.cat
DriverVer=01/01/2017 ; TODO: set DriverVer in stampinf property pages
[DestinationDirs]
DefaultDestDir = 12
; ================= Class section =====================
[ClassInstall32]
Addreg=SampleClassReg
[SampleClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-5
[SourceDisksNames]
1 = %DiskName%,,,""
[SourceDisksFiles]
KmdfMiniFilter.sys = 1,,
;*****************************************
; Install Section
;*****************************************
[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$
[Standard.NT$ARCH$]
%KmdfMiniFilter.DeviceDesc%=KmdfMiniFilter_Device, Root\KmdfMiniFilter ; TODO: edit hw-id
[KmdfMiniFilter_Device.NT]
CopyFiles=Drivers_Dir
[Drivers_Dir]
KmdfMiniFilter.sys
;-------------- Service installation
[KmdfMiniFilter_Device.NT.Services]
AddService = KmdfMiniFilter,%SPSVCINST_ASSOCSERVICE%, KmdfMiniFilter_Service_Inst
; -------------- KmdfMiniFilter driver install sections
[KmdfMiniFilter_Service_Inst]
DisplayName = %KmdfMiniFilter.SVCDESC%
ServiceBinary = %12%\KmdfMiniFilter.sys
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
LoadOrderGroup = "FSFilter Activity Monitor"
Dependencies = FltMgr
;
;--- KmdfMiniFilter_Device Coinstaller installation ------
;
[DestinationDirs]
KmdfMiniFilter_Device_CoInstaller_CopyFiles = 11
[KmdfMiniFilter_Device.NT.CoInstallers]
AddReg=KmdfMiniFilter_Device_CoInstaller_AddReg
CopyFiles=KmdfMiniFilter_Device_CoInstaller_CopyFiles
[KmdfMiniFilter_Device_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"
HKR,"Instances","DefaultInstance",0x00000000,%DefaultInstance%
HKR,"Instances\"%Instance1.Name%,"Altitude",0x00000000,%Instance1.Altitude%
HKR,"Instances\"%Instance1.Name%,"Flags",0x00010001,%Instance1.Flags%
[KmdfMiniFilter_Device_CoInstaller_CopyFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll
[SourceDisksFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames
[KmdfMiniFilter_Device.NT.Wdf]
KmdfService = KmdfMiniFilter, KmdfMiniFilter_wdfsect
[KmdfMiniFilter_wdfsect]
KmdfLibraryVersion = $KMDFVERSION$
[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
ManufacturerName="<Your manufacturer name>" ;TODO: Replace with your manufacturer name
ClassName="Samples" ; TODO: edit ClassName
DiskName = "KmdfMiniFilter Installation Disk"
KmdfMiniFilter.DeviceDesc = "KmdfMiniFilter Device"
KmdfMiniFilter.SVCDESC = "KmdfMiniFilter Service"
DefaultInstance = "KmdfMiniFilter"
Instance1.Name = "KmdfMiniFilter"
Instance1.Altitude = "370120"
Instance1.Flags = 0x0 ; Allow all attachments
Do you have any idea of what is the problem ?
I finally solved my problème thanks to RbMm !
A minifilter is not a WDM driver, so :
Then, once your filter loaded, you must be able to debug it from Visual !
User contributions licensed under CC BY-SA 3.0