Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

OSR Seminars


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 4  
10 Jul 18 23:14
coder lizzoe
xxxxxx@sina.com
Join Date: 12 Oct 2016
Posts To This List: 18
Device specific filter driver does not take effect

Hi All, I write a pci bus filter driver, but it's not working correctly. Using command line "rundll32.exe setupapi.dll,InstallHinfSection myifilter_Win10_install 132 .\\myfilter.inf" to install. After installation, ths .sys file goes to system32/dirvers/ , and service registerd in HKLM/SYSTEM/CurrentControlSet/Control/Services successful. But the "HKR,,"UpperFilters"" has gone! Query for all registry keys do not find a key named "UpperFilters" and value is "mypcifilter", so I supposed that the driver has problem with installation, but I dont't know how to resolve it. My inf configuration: [Manufacturer] %ManufacturerName%= Win10, NT$ARCH$ [Win10.NT$ARCH$] %mypcifilter.DeviceDesc0%=myifilter_Win10_install, PCI\CC_0604 ; PCI-PCI BRIDGE %mypcifilter.DeviceDesc1%=myifilter_Win10_install, PCI\CC_0604&DT_4 ; PCI Express Root Port %mypcifilter.DeviceDesc2%=myifilter_Win10_install, PCI\CC_0604&DT_5 ; PCI Express Upstream Switch Port %mypcifilter.DeviceDesc3%=myifilter_Win10_install, PCI\CC_0604&DT_6 ; PCI Express Downstream Switch Port %mypcifilter.DeviceDesc4%=myifilter_Win10_install, PCI\CC_0604&DT_7 ; PCI Express to PCI(-X) Bridge %mypcifilter.DeviceDesc5%=myifilter_Win10_install, PCI\CC_0604&DT_8 ; PCI(-X) to PCI Express Bridge [myifilter_Win10_install.NT] Include = pci.inf Needs = PCI_DRV CopyFiles = Drivers_Dir [myifilter_Win10_install.NT.HW] Include = pci.inf Needs = PCI_DRV.HW AddReg = mypcifilter_reg [myifilter_Win10_install.NT.Services] Include = pci.inf Needs = PCI_DRV.Services AddService = mypcifilter,%SPSVCINST_ASSOCSERVICE%, mypcifilter_Service_Inst [Drivers_Dir] mypcifilter.sys ;mypcifilter.sys,,,0x00004000 ; COPYFLG_IN_USE_RENAME [mypcifilter_reg] ; append this service to existing REG_MULTI_SZ list, if any HKR,,"UpperFilters",0x00010008,"mypcifilter" ; -------------- mypcifilter driver install sections [mypcifilter_Service_Inst] DisplayName = %mypcifilter.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\mypcifilter.sys LoadOrderGroup = Extended Base xxxxx@sina.com
  Message 2 of 4  
11 Jul 18 00:12
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10220
Device specific filter driver does not take effect

What does setupapi.dev.log say? Which device did it install on? The log should indicate if the upperfilter was added. I would assume that the install requires a reboot as the boot stack is downstream of the root port. Bent from my phone ________________________________ From: 30171415500n behalf of Sent: Tuesday, July 10, 2018 8:14 PM To: Windows System Software Devs Interest List Subject: [ntdev] Device specific filter driver does not take effect Hi All, I write a pci bus filter driver, but it's not working correctly. Using command line "rundll32.exe setupapi.dll,InstallHinfSection myifilter_Win10_install 132 .\\myfilter.inf" to install. After installation, ths .sys file goes to system32/dirvers/ , and service registerd in HKLM/SYSTEM/CurrentControlSet/Control/Services successful. But the "HKR,,"UpperFilters"" has gone! Query for all registry keys do not find a key named "UpperFilters" and value is "mypcifilter", so I supposed that the driver has problem with installation, but I dont't know how to resolve it. My inf configuration: [Manufacturer] %ManufacturerName%= Win10, NT$ARCH$ [Win10.NT$ARCH$] %mypcifilter.DeviceDesc0%=myifilter_Win10_install, PCI\CC_0604 ; PCI-PCI BRIDGE %mypcifilter.DeviceDesc1%=myifilter_Win10_install, PCI\CC_0604&DT_4 ; PCI Express Root Port %mypcifilter.DeviceDesc2%=myifilter_Win10_install, PCI\CC_0604&DT_5 ; PCI Express Upstream Switch Port %mypcifilter.DeviceDesc3%=myifilter_Win10_install, PCI\CC_0604&DT_6 ; PCI Express Downstream Switch Port %mypcifilter.DeviceDesc4%=myifilter_Win10_install, PCI\CC_0604&DT_7 ; PCI Express to PCI(-X) Bridge %mypcifilter.DeviceDesc5%=myifilter_Win10_install, PCI\CC_0604&DT_8 ; PCI(-X) to PCI Express Bridge [myifilter_Win10_install.NT] Include = pci.inf Needs = PCI_DRV CopyFiles = Drivers_Dir [myifilter_Win10_install.NT.HW] Include = pci.inf Needs = PCI_DRV.HW AddReg = mypcifilter_reg [myifilter_Win10_install.NT.Services] Include = pci.inf Needs = PCI_DRV.Services AddService = mypcifilter,%SPSVCINST_ASSOCSERVICE%, mypcifilter_Service_Inst [Drivers_Dir] mypcifilter.sys ;mypcifilter.sys,,,0x00004000 ; COPYFLG_IN_USE_RENAME [mypcifilter_reg] ; append this service to existing REG_MULTI_SZ list, if any HKR,,"UpperFilters",0x00010008,"mypcifilter" ; -------------- mypcifilter driver install sections [mypcifilter_Service_Inst] DisplayName = %mypcifilter.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\mypcifilter.sys LoadOrderGroup = Extended Base ________________________________ xxxxx@sina.com --- NTDEV is sponsored by OSR Visit the list online at: <http://www.osronline.com/showlists.cfm?list=ntdev> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <http://www.osr.com/seminars> To unsubscribe, visit the List Server section of OSR Online at <http://www.osronline.com/page.cfm?name=ListServer> --
  Message 3 of 4  
11 Jul 18 02:37
coder lizzoe
xxxxxx@sina.com
Join Date: 12 Oct 2016
Posts To This List: 18
Device specific filter driver does not take effect

It seems to be successful from the setuplog. The msdn doc says that Addreg in DDInstall.HW should add the reg to the device's hardware key, so I add the "UpperFilters" key to HKLM/SYSTEM/CurrentControlSet/Enum/PCI/{specific-hardwareID} manually, it works! Log: >>> [Install INF Section (InstallHInfSection) - myfilter.inf] >>> Section start 2018/07/11 11:54:19.122 cmd: rundll32 setupapi.dll, InstallHinfSection myifilter_Win10_install 132 .\\myfilter.inf inf: INF - .\\myfilter.inf inf: Section - myifilter_Win10_install inf: Mode - 132 inf: Opened INF: 'F:\lizzoe\mypcifilter\myfilter.inf' ([strings]) inf: Opened PNF: 'C:\Windows\INF\pci.inf' ([strings.0804]) dvi: Included pci.inf under [myifilter_Win10_install.NT]. dvi: Needs [PCI_DRV] under [myifilter_Win10_install.NT]. inf: Installing section [myifilter_Win10_install.NT] from '.\\myfilter.inf'. inf: {Install Inf Section [myifilter_Win10_install.NT]} inf: CopyFiles=Drivers_Dir (myfilter.inf line 73) flq: QueueSingleCopy... flq: Inf : 'F:\lizzoe\mypcifilter\myfilter.inf' flq: SourceInf: 'F:\lizzoe\mypcifilter\myfilter.inf' flq: SourceSection: [sourcedisksfiles] flq: SourceRootPath: 'F:\lizzoe\mypcifilter\' flq: {FILE_QUEUE_COPY} flq: CopyStyle - 0x00000024 flq: {FILE_QUEUE_COPY} flq: CopyStyle - 0x00000024 flq: SourceRootPath - 'F:\lizzoe\mypcifilter\' flq: SourceFilename - 'mypcifilter.sys' flq: TargetDirectory- 'C:\Windows\system32\DRIVERS' flq: TargetFilename - 'mypcifilter.sys' flq: SourceDesc - 'mypcifilter Installation Disk' flq: {FILE_QUEUE_COPY exit(0x00000000)} flq: {FILE_QUEUE_COPY exit(0x00000000)} inf: {Install Inf Section [myifilter_Win10_install.NT] exit (0x00000000)} inf: {Install Inf Section [PCI_DRV]} inf: {Install Inf Section [PCI_DRV] exit (0x00000000)} flq: {FILE_QUEUE_COMMIT} 11:54:19.151 flq: {SPFILENOTIFY_STARTQUEUE} flq: {SPFILENOTIFY_STARTQUEUE - exit(0x00000001)} flq: {FILE_QUEUE_COMMIT_COPY_SUBQUEUE} flq: {SPFILENOTIFY_STARTSUBQUEUE} flq: {SPFILENOTIFY_STARTSUBQUEUE - exit(0x00000001)} flq: Source Media: flq: Description - [mypcifilter Installation Disk] flq: SourcePath - [F:\lizzoe\mypcifilter] flq: SourceFile - [mypcifilter.sys] flq: Flags - 0x00000000 flq: {SPFQNOTIFY_NEEDMEDIA} flq: {SPFILENOTIFY_NEEDMEDIA} flq: {SPFILENOTIFY_NEEDMEDIA - exit(0x00000001)} flq: {SPFQNOTIFY_NEEDMEDIA - returned 0x00000001} flq: Source Media: SPFQOPERATION_DOIT flq: {FILE_QUEUE_COMMIT_COPY_FILE} flq: {SPFILENOTIFY_STARTCOPY} flq: {SPFILENOTIFY_STARTCOPY - exit(0x00000001)} flq: Copying 'F:\lizzoe\mypcifilter\mypcifilter.sys' to 'C:\Windows\system32\DRIVERS\mypcifilter.sys'. flq: CopyFile: 'F:\lizzoe\mypcifilter\mypcifilter.sys' to 'C:\Windows\system32\DRIVERS\SET9A5A.tmp' cpy: CopyFile Drp is NOT active flq: MoveFile: 'C:\Windows\system32\DRIVERS\SET9A5A.tmp' to 'C:\Windows\system32\DRIVERS\mypcifilter.sys' flq: {SPFILENOTIFY_ENDCOPY} flq: {SPFILENOTIFY_ENDCOPY - exit(0x00000001)} flq: {FILE_QUEUE_COMMIT_COPY_FILE exit OK} flq: {SPFILENOTIFY_ENDSUBQUEUE} flq: {SPFILENOTIFY_ENDSUBQUEUE - exit(0x00000001)} flq: {FILE_QUEUE_COMMIT_COPY_SUBQUEUE exit OK} flq: {SPFILENOTIFY_ENDQUEUE} flq: {SPFILENOTIFY_ENDQUEUE - exit(0x00000001)} flq: {FILE_QUEUE_COMMIT exit OK} 11:54:19.238 inf: {Install Inf Section [myifilter_Win10_install.NT]} inf: {Install from INF Section - myifilter_Win10_install.NT} 11:54:19.239 inf: Flags - 0x000007ef inf: Reference Key - 0 inf: Source root - (null) inf: Copy flags - 0x000007ef inf: {Install from INF Section - exit(0x00000000)} 11:54:19.242 inf: {Install Inf Section [myifilter_Win10_install.NT] exit (0x00000000)} inf: {Install Inf Section [PCI_DRV]} inf: {Install from INF Section - PCI_DRV} 11:54:19.243 inf: Flags - 0x000007ef inf: Reference Key - 0 inf: Source root - (null) inf: Copy flags - 0x000007ef inf: {Install from INF Section - exit(0x00000000)} 11:54:19.245 inf: {Install Inf Section [PCI_DRV] exit (0x00000000)} dvi: Included pci.inf under [myifilter_Win10_install.NT.Services]. dvi: Needs [PCI_DRV.Services] under [myifilter_Win10_install.NT.Services]. inf: {Install Inf Section [myifilter_Win10_install.NT.Services]} inf: AddService=mypcifilter,0x00000002,mypcifilter_Service_Inst (myfilter.inf line 83) inf: ServiceType=1 (myfilter.inf line 96) inf: StartType=3 (myfilter.inf line 97) inf: ErrorControl=1 (myfilter.inf line 98) inf: ServiceBinary=C:\Windows\system32\DRIVERS\mypcifilter.sys (myfilter.inf line 99) inf: DisplayName="mypcifilter Service" (myfilter.inf line 95) inf: LoadOrderGroup="Extended Base" (myfilter.inf line 100) dvi: Add Service: Created service 'mypcifilter'. inf: {Install from INF Section - mypcifilter_Service_Inst} 11:54:19.282 inf: Flags - 0x00100004 inf: Reference Key - 3 inf: Source root - (null) inf: Copy flags - 0x00100004 inf: {Install from INF Section - exit(0x00000000)} 11:54:19.286 inf: {Install Inf Section [myifilter_Win10_install.NT.Services] exit(0x00000000)} <<< Section end 2018/07/11 11:54:19.750 <<< [Exit status: SUCCESS] xxxxx@sina.com From: xxxxx@microsoft.com Date: 2018-07-11 12:11 To: Windows System Software Devs Interest List Subject: Re: [ntdev] Device specific filter driver does not take effect What does setupapi.dev.log say? Which device did it install on? The log should indicate if the upperfilter was added. I would assume that the install requires a reboot as the boot stack is downstream of the root port. Bent from my phone From: 30171415500n behalf of Sent: Tuesday, July 10, 2018 8:14 PM To: Windows System Software Devs Interest List Subject: [ntdev] Device specific filter driver does not take effect Hi All, I write a pci bus filter driver, but it's not working correctly. Using command line "rundll32.exe setupapi.dll,InstallHinfSection myifilter_Win10_install 132 .\\myfilter.inf" to install. After installation, ths .sys file goes to system32/dirvers/ , and service registerd in HKLM/SYSTEM/CurrentControlSet/Control/Services successful. But the "HKR,,"UpperFilters"" has gone! Query for all registry keys do not find a key named "UpperFilters" a��
  Message 4 of 4  
11 Jul 18 02:50
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 12008
Device specific filter driver does not take effect

On Jul 10, 2018, at 11:37 PM, xxxxx@sina.com <xxxxx@lists.osr.com> wrote: > > It seems to be successful from the setuplog. > > The msdn doc says that Addreg in DDInstall.HW should add the reg to the device's hardware key, It will. But you didn't ask it to run the DDInstall.HW section. You specifically asked it to run the DDInstall section. The automatic execution of the other sections only happens if you do a genuine PnP install, by pre-installing the driver package and triggering a reload of the affected devices. Without that, the system doesn't have any idea what hardware keys are supposed to be involved. ??? Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc. --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 19:29.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license