Filter Driver is not loading

Hi Experts,

I am trying a filter driver for OSR sample for USB in DDK under
C:\WinDDK\7600.16385.1\src\usb\usbsamp\sys.

For filter driver I am using a sample from DDK available in toaster under
toaster\kmdf\filter\generic. I am modifing USBSAMP.inf for loading generic
filter.

here is inf content:


;/*++
;
;Copyright (c) Microsoft Corporation. All rights reserved.
;
; THIS CODE AND INFORMATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY
; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
; PURPOSE.
;
;Module Name:
;
; USBSamp.INF
;
;Abstract:
; Installation inf for the Intel 82930 USB Test Board
;
;–*/
[Version]
Signature=“$WINDOWS NT$”
Class=Sample
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
Provider=%MSFT%
DriverVer=05/17/2012,6.1.7600.16385
CatalogFile=KmdfSamples.cat

; ================= Class section =====================
[ClassInstall32]
Addreg=SampleClassReg
[SampleClassReg]
HKR,0,%ClassName%
HKR,Icon,-5
[DestinationDirs]
DefaultDestDir = 12
; ================= Device section =====================
[Manufacturer]
%MfgName%=Microsoft,NTx86
; For Win2K
[Microsoft]
%USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002 ;
OSR USB-FX
%USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ;
Intel 82930
%USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ;
Intel 82930
; For XP and later
[Microsoft.NTx86]
%USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002 ;
OSR USB-FX
%USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ;
Intel 82930
%USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ;
Intel 82930

[usbsamp.Dev.NT]
CopyFiles=usbsamp.Files.Ext
*[usbsamp.Dev.NT.Services]
AddService = USBSampfilter, USBSampfilter.AddService
Addservice = usbsamp, 0x00000002, usbsamp.AddService*
*[USBSampfilter.AddService]
DisplayName = %filter.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
*ServiceBinary = %10%\System32\Drivers\USBSampfilter.sys
[usbsamp.AddService]
DisplayName = %usbsamp.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\usbsamp.sys
AddReg = usbsamp.AddReg
LoadOrderGroup = Base

[usbsamp.AddReg]
HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
HKR,“Parameters”,“DebugLevel”,0x10001,2
*HKR,“LowerFilters”,0x00010000,“UsbsampLower”*
[usbsamp.Files.Ext]
usbsamp.sys
USBSampfilter.sys
[SourceDisksNames]
1=%Disk_Description%,
[SourceDisksFiles]
usbsamp.sys = 1
USBSampfilter.sys = 1
;-------------- WDF Coinstaller installation
[DestinationDirs]
CoInstaller_CopyFiles = 11
[usbsamp.Dev.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
[CoInstaller_CopyFiles]
WdfCoInstaller01009.dll
[SourceDisksFiles]
WdfCoInstaller01009.dll=1 ; make sure the number matches with
SourceDisksNames
[CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”
*[usbsamp.Dev.NT.Wdf]
KmdfService = USBSampfilter, USBSampfilter_wdfsect
KmdfService = usbsamp, usbsamp_wdfsect*

[USBSampfilter_wdfsect]
KmdfLibraryVersion = 1.9
[usbsamp_wdfsect]
KmdfLibraryVersion = 1.9
;---------------------------------------------------------------;
[Strings]
MSFT = “Microsoft”
MfgName = “Intel/OSR”
Disk_Description= “usbsamp Installation Disk”
usbsamp.SvcDesc = “WDF Sample Driver for Intel 82930 USB Test Board”
ClassName = “Sample Device”
USB\VID_0547&PID_1002.DeviceDesc=“WDF Sample for OSR USB-FX2 Learning Kit”
USB\VID_045E&PID_930A.DeviceDesc=“WDF Sample for Intel 82930 USB Test Board”
USB\VID_13CF&PID_2200.DeviceDesc=“Test USB Device”
filter.SvcDesc = “Microsoft Toaster Filter Driver Refactored”
_________________________________________________________________________________________________\

Service for filter is being created but not getting started by enviornment
onm checking error it says “error 1077. Service never started”. Command
with USBSAMP.EXE
works fine but only osr sample gets all communication.

Wht could be the cause? Is my inf wrong or my approach is wrong? Can
anybody suggest correct approach?

Thanks
Sunil

[usbsamp.AddReg]
HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
HKR,“Parameters”,“DebugLevel”,0x10001,2
HKR,“LowerFilters”,0x00010000,“UsbsampLower”

Needs to be referenced by a DD_install.hw section, not a service add section

[usbsamp.Dev.NT.HW]
AddReg = usbsamp.AddReg

d

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Sunil Kumar
Sent: Thursday, May 17, 2012 7:41 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Filter Driver is not loading

Hi Experts,

I am trying a filter driver for OSR sample for USB in DDK under C:\WinDDK\7600.16385.1\src\usb\usbsamp\sys.

For filter driver I am using a sample from DDK available in toaster under toaster\kmdf\filter\generic. I am modifing USBSAMP.inf for loading generic filter.

here is inf content:


;/*++
;
;Copyright (c) Microsoft Corporation. All rights reserved.
;
; THIS CODE AND INFORMATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY
; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
; PURPOSE.
;
;Module Name:
;
; USBSamp.INF
;
;Abstract:
; Installation inf for the Intel 82930 USB Test Board
;
;–*/
[Version]
Signature=“$WINDOWS NT$”
Class=Sample
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
Provider=%MSFT%
DriverVer=05/17/2012,6.1.7600.16385
CatalogFile=KmdfSamples.cat

; ================= Class section =====================
[ClassInstall32]
Addreg=SampleClassReg
[SampleClassReg]
HKR,0,%ClassName%
HKR,Icon,-5
[DestinationDirs]
DefaultDestDir = 12
; ================= Device section =====================
[Manufacturer]
%MfgName%=Microsoft,NTx86
; For Win2K
[Microsoft]
%USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002 ; OSR USB-FX
%USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ; Intel 82930
%USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ; Intel 82930
; For XP and later
[Microsoft.NTx86]
%USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002 ; OSR USB-FX
%USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ; Intel 82930
%USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ; Intel 82930

[usbsamp.Dev.NT]
CopyFiles=usbsamp.Files.Ext
[usbsamp.Dev.NT.Services]
AddService = USBSampfilter, USBSampfilter.AddService
Addservice = usbsamp, 0x00000002, usbsamp.AddService
[USBSampfilter.AddService]
DisplayName = %filter.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\USBSampfilter.sys
[usbsamp.AddService]
DisplayName = %usbsamp.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\usbsamp.sys
AddReg = usbsamp.AddReg
LoadOrderGroup = Base

[usbsamp.AddReg]
HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
HKR,“Parameters”,“DebugLevel”,0x10001,2
HKR,“LowerFilters”,0x00010000,“UsbsampLower”
[usbsamp.Files.Ext]
usbsamp.sys
USBSampfilter.sys
[SourceDisksNames]
1=%Disk_Description%,
[SourceDisksFiles]
usbsamp.sys = 1
USBSampfilter.sys = 1
;-------------- WDF Coinstaller installation
[DestinationDirs]
CoInstaller_CopyFiles = 11
[usbsamp.Dev.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
[CoInstaller_CopyFiles]
WdfCoInstaller01009.dll
[SourceDisksFiles]
WdfCoInstaller01009.dll=1 ; make sure the number matches with SourceDisksNames
[CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”
[usbsamp.Dev.NT.Wdf]
KmdfService = USBSampfilter, USBSampfilter_wdfsect
KmdfService = usbsamp, usbsamp_wdfsect

[USBSampfilter_wdfsect]
KmdfLibraryVersion = 1.9
[usbsamp_wdfsect]
KmdfLibraryVersion = 1.9
;---------------------------------------------------------------;
[Strings]
MSFT = “Microsoft”
MfgName = “Intel/OSR”
Disk_Description= “usbsamp Installation Disk”
usbsamp.SvcDesc = “WDF Sample Driver for Intel 82930 USB Test Board”
ClassName = “Sample Device”
USB\VID_0547&PID_1002.DeviceDesc=“WDF Sample for OSR USB-FX2 Learning Kit”
USB\VID_045E&PID_930A.DeviceDesc=“WDF Sample for Intel 82930 USB Test Board”
USB\VID_13CF&PID_2200.DeviceDesc=“Test USB Device”
filter.SvcDesc = “Microsoft Toaster Filter Driver Refactored”
_________________________________________________________________________________________________\

Service for filter is being created but not getting started by enviornment onm checking error it says “error 1077. Service never started”. Command with USBSAMP.EXE
works fine but only osr sample gets all communication.

Wht could be the cause? Is my inf wrong or my approach is wrong? Can anybody suggest correct approach?

Thanks
Sunil
— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Sunil Kumar wrote:

Hi Experts,

I am trying a filter driver for OSR sample for USB in DDK under
C:\WinDDK\7600.16385.1\src\usb\usbsamp\sys.

For filter driver I am using a sample from DDK available in toaster
under toaster\kmdf\filter\generic. I am modifing USBSAMP.inf for
loading generic filter.

[usbsamp.AddService]
DisplayName = %usbsamp.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\usbsamp.sys
AddReg = usbsamp.AddReg
LoadOrderGroup = Base

[usbsamp.AddReg]
HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
HKR,“Parameters”,“DebugLevel”,0x10001,2
*HKR,“LowerFilters”,0x00010000,“UsbsampLower”*

That line in the wrong place. It needs to be in the hardware key for
the device, not in the service key for the driver. You need this:
[usbsamp.Dev.HW.NT]
AddReg = usbsamp.AddFilter
[usbsamp.AddFilter]
HKR,LowerFilters,0x00010008,“UsbsampLower”


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Doron, Tim,

I modified inf as per your suggestions but not much progress.

By doing so Filter driver getting listed in System\enum\usb%VIDnPID% but
now none of driver or filter are getting started.

Here is inf again

[Version]
Signature=“$WINDOWS NT$”
Class=Sample
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
Provider=%MSFT%
DriverVer=05/17/2012,6.1.7600.16385
CatalogFile=KmdfSamples.cat

; ================= Class section =====================
[ClassInstall32]
Addreg=SampleClassReg
[SampleClassReg]
HKR,0,%ClassName%
HKR,Icon,-5
[DestinationDirs]
DefaultDestDir = 12
; ================= Device section =====================
[Manufacturer]
%MfgName%=Microsoft,NTx86
; For Win2K
[Microsoft]
%USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002 ;
OSR USB-FX
%USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ;
Intel 82930
%USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ;
Intel 82930
; For XP and later
[Microsoft.NTx86]
%USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002 ;
OSR USB-FX
%USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ;
Intel 82930
%USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ;
Intel 82930
[usbsamp.Dev.NT]
CopyFiles=usbsamp.Files.Ext
[usbsamp.Dev.NT.Services]
AddService = USBSampfilter, USBSampfilter.AddService
Addservice = usbsamp, 0x00000002, usbsamp.AddService
[USBSampfilter.AddService]
DisplayName = %filter.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\UsbsampLower.sys
LoadOrderGroup = PNP Filter
[usbsamp.AddService]
DisplayName = %usbsamp.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %10%\System32\Drivers\usbsamp.sys
AddReg = usbsamp.AddReg
LoadOrderGroup = Base
[usbsamp.Dev.NT.HW]
AddReg = usbsamp.AddFilter
[usbsamp.AddReg]
HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
HKR,“Parameters”,“DebugLevel”,0x10001,2
[usbsamp.AddFilter]
HKR,“LowerFilters”,0x00010000,“UsbsampLower”
[usbsamp.Files.Ext]
usbsamp.sys
UsbsampLower.sys
[SourceDisksNames]
1=%Disk_Description%,
[SourceDisksFiles]
usbsamp.sys = 1
UsbsampLower.sys = 1
;-------------- WDF Coinstaller installation
[DestinationDirs]
CoInstaller_CopyFiles = 11
[usbsamp.Dev.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles
[CoInstaller_CopyFiles]
WdfCoInstaller01009.dll
[SourceDisksFiles]
WdfCoInstaller01009.dll=1 ; make sure the number matches with
SourceDisksNames
[CoInstaller_AddReg]
HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”
[usbsamp.Dev.NT.Wdf]
KmdfService = USBSampfilter, USBSampfilter_wdfsect
KmdfService = usbsamp, usbsamp_wdfsect

[USBSampfilter_wdfsect]
KmdfLibraryVersion = 1.9
[usbsamp_wdfsect]
KmdfLibraryVersion = 1.9
;---------------------------------------------------------------;
[Strings]
MSFT = “Microsoft”
MfgName = “Intel/OSR”
Disk_Description= “usbsamp Installation Disk”
usbsamp.SvcDesc = “WDF Sample Driver for Intel 82930 USB Test Board”
ClassName = “Sample Device”
USB\VID_0547&PID_1002.DeviceDesc=“WDF Sample for OSR USB-FX2 Learning Kit”
USB\VID_045E&PID_930A.DeviceDesc=“WDF Sample for Intel 82930 USB Test Board”
USB\VID_13CF&PID_2200.DeviceDesc=“Test USB Device”
filter.SvcDesc = “Test filter”

How could be wrong this time?

Thanks
Sunil

On Thu, May 17, 2012 at 9:42 AM, Tim Roberts wrote:

> Sunil Kumar wrote:
> > Hi Experts,
> >
> > I am trying a filter driver for OSR sample for USB in DDK under
> > C:\WinDDK\7600.16385.1\src\usb\usbsamp\sys.
> >
> > For filter driver I am using a sample from DDK available in toaster
> > under toaster\kmdf\filter\generic. I am modifing USBSAMP.inf for
> > loading generic filter.
> > …
> > [usbsamp.AddService]
> > DisplayName = %usbsamp.SvcDesc%
> > ServiceType = 1 ; SERVICE_KERNEL_DRIVER
> > StartType = 3 ; SERVICE_DEMAND_START
> > ErrorControl = 1 ; SERVICE_ERROR_NORMAL
> > ServiceBinary = %10%\System32\Drivers\usbsamp.sys
> > AddReg = usbsamp.AddReg
> > LoadOrderGroup = Base
> >
> > [usbsamp.AddReg]
> > HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
> > HKR,“Parameters”,“DebugLevel”,0x10001,2
> > HKR,“LowerFilters”,0x00010000,“UsbsampLower”
>
> That line in the wrong place. It needs to be in the hardware key for
> the device, not in the service key for the driver. You need this:
> [usbsamp.Dev.HW.NT]
> AddReg = usbsamp.AddFilter
> [usbsamp.AddFilter]
> HKR,LowerFilters,0x00010008,“UsbsampLower”
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

I am getting following log from setupApis:

@ 23:58:27.406 #T217 Install Device: Restarting device completed.
@ 23:58:27.531 #I163 Device not started: Device has problem: 0x13:
CM_PROB_REGISTRY.
@ 23:58:27.578 #T222 Install Device: Calling ‘RUNONCE’/‘GRPCONV’ items.
@ 23:58:27.609 #I138 Executing ‘RUNONCE’ to process 5 ‘RUNONCE’ entries.
@ 23:58:27.671 #I121 Device install of “USB\VID_13CF&PID_2200\0123456789”
finished successfully.
@ 23:58:27.703 #T201 Install Device: End.

Thanks
sunil

On Thu, May 17, 2012 at 10:07 PM, Sunil Kumar wrote:

> Thanks Doron, Tim,
>
> I modified inf as per your suggestions but not much progress.
>
> By doing so Filter driver getting listed in System\enum\usb%VIDnPID% but
> now none of driver or filter are getting started.
>
> Here is inf again
>
> ---------------------------------------------------------------------------------------------------------------------------------------
> [Version]
> Signature=“$WINDOWS NT$”
> Class=Sample
> ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
> Provider=%MSFT%
> DriverVer=05/17/2012,6.1.7600.16385
> CatalogFile=KmdfSamples.cat
>
> ; ================= Class section =====================
> [ClassInstall32]
> Addreg=SampleClassReg
> [SampleClassReg]
> HKR,0,%ClassName%
> HKR,Icon,-5
> [DestinationDirs]
> DefaultDestDir = 12
> ; ================= Device section =====================
> [Manufacturer]
> %MfgName%=Microsoft,NTx86
> ; For Win2K
> [Microsoft]
> %USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002 ;
> OSR USB-FX
> %USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ;
> Intel 82930
> %USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ;
> Intel 82930
> ; For XP and later
> [Microsoft.NTx86]
> %USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002 ;
> OSR USB-FX
> %USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ;
> Intel 82930
> %USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ;
> Intel 82930
> [usbsamp.Dev.NT]
> CopyFiles=usbsamp.Files.Ext
> [usbsamp.Dev.NT.Services]
> AddService = USBSampfilter, USBSampfilter.AddService
> Addservice = usbsamp, 0x00000002, usbsamp.AddService
> [USBSampfilter.AddService]
> DisplayName = %filter.SvcDesc%
> ServiceType = 1 ; SERVICE_KERNEL_DRIVER
> StartType = 3 ; SERVICE_DEMAND_START
> ErrorControl = 1 ; SERVICE_ERROR_NORMAL
> ServiceBinary = %10%\System32\Drivers\UsbsampLower.sys
> LoadOrderGroup = PNP Filter
> [usbsamp.AddService]
> DisplayName = %usbsamp.SvcDesc%
> ServiceType = 1 ; SERVICE_KERNEL_DRIVER
> StartType = 3 ; SERVICE_DEMAND_START
> ErrorControl = 1 ; SERVICE_ERROR_NORMAL
> ServiceBinary = %10%\System32\Drivers\usbsamp.sys
> AddReg = usbsamp.AddReg
> LoadOrderGroup = Base
> [usbsamp.Dev.NT.HW]
> AddReg = usbsamp.AddFilter
> [usbsamp.AddReg]
> HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
> HKR,“Parameters”,“DebugLevel”,0x10001,2
> [usbsamp.AddFilter]
> HKR,“LowerFilters”,0x00010000,“UsbsampLower”
> [usbsamp.Files.Ext]
> usbsamp.sys
> UsbsampLower.sys
> [SourceDisksNames]
> 1=%Disk_Description%,
> [SourceDisksFiles]
> usbsamp.sys = 1
> UsbsampLower.sys = 1
> ;-------------- WDF Coinstaller installation
> [DestinationDirs]
> CoInstaller_CopyFiles = 11
> [usbsamp.Dev.NT.CoInstallers]
> AddReg=CoInstaller_AddReg
> CopyFiles=CoInstaller_CopyFiles
> [CoInstaller_CopyFiles]
> WdfCoInstaller01009.dll
> [SourceDisksFiles]
> WdfCoInstaller01009.dll=1 ; make sure the number matches with
> SourceDisksNames
> [CoInstaller_AddReg]
> HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”
> [usbsamp.Dev.NT.Wdf]
> KmdfService = USBSampfilter, USBSampfilter_wdfsect
> KmdfService = usbsamp, usbsamp_wdfsect
>
> [USBSampfilter_wdfsect]
> KmdfLibraryVersion = 1.9
> [usbsamp_wdfsect]
> KmdfLibraryVersion = 1.9
> ;---------------------------------------------------------------;
> [Strings]
> MSFT = “Microsoft”
> MfgName = “Intel/OSR”
> Disk_Description= “usbsamp Installation Disk”
> usbsamp.SvcDesc = “WDF Sample Driver for Intel 82930 USB Test Board”
> ClassName = “Sample Device”
> USB\VID_0547&PID_1002.DeviceDesc=“WDF Sample for OSR USB-FX2 Learning Kit”
> USB\VID_045E&PID_930A.DeviceDesc=“WDF Sample for Intel 82930 USB Test
> Board”
> USB\VID_13CF&PID_2200.DeviceDesc=“Test USB Device”
> filter.SvcDesc = “Test filter”
>
> ---------------------------------------------------------------------------------------------------------------------------------------
>
> How could be wrong this time?
>
> Thanks
> Sunil
>
>
> On Thu, May 17, 2012 at 9:42 AM, Tim Roberts wrote:
>
>> Sunil Kumar wrote:
>> > Hi Experts,
>> >
>> > I am trying a filter driver for OSR sample for USB in DDK under
>> > C:\WinDDK\7600.16385.1\src\usb\usbsamp\sys.
>> >
>> > For filter driver I am using a sample from DDK available in toaster
>> > under toaster\kmdf\filter\generic. I am modifing USBSAMP.inf for
>> > loading generic filter.
>> > …
>> > [usbsamp.AddService]
>> > DisplayName = %usbsamp.SvcDesc%
>> > ServiceType = 1 ; SERVICE_KERNEL_DRIVER
>> > StartType = 3 ; SERVICE_DEMAND_START
>> > ErrorControl = 1 ; SERVICE_ERROR_NORMAL
>> > ServiceBinary = %10%\System32\Drivers\usbsamp.sys
>> > AddReg = usbsamp.AddReg
>> > LoadOrderGroup = Base
>> >
>> > [usbsamp.AddReg]
>> > HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
>> > HKR,“Parameters”,“DebugLevel”,0x10001,2
>> > HKR,“LowerFilters”,0x00010000,“UsbsampLower”
>>
>> That line in the wrong place. It needs to be in the hardware key for
>> the device, not in the service key for the driver. You need this:
>> [usbsamp.Dev.HW.NT]
>> AddReg = usbsamp.AddFilter
>> [usbsamp.AddFilter]
>> HKR,LowerFilters,0x00010008,“UsbsampLower”
>>
>> –
>> Tim Roberts, xxxxx@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
>

Thanks for help, I am able to filter client driver now both ways upper and
lower.

There was error while giving error in INF
[usbsamp.Dev.NT.Services]
AddService = *USBSampfilter*, USBSampfilter.AddService
[usbsamp.AddFilter]
HKR,“LowerFilters”,0x00010000,“*UsbsampLower*”

Name in bold should have been sample.

Thanks
Sunil

On Fri, May 18, 2012 at 11:56 AM, Sunil Kumar wrote:

> I am getting following log from setupApis:
>
> @ 23:58:27.406 #T217 Install Device: Restarting device completed.
> @ 23:58:27.531 #I163 Device not started: Device has problem: 0x13:
> CM_PROB_REGISTRY.
> @ 23:58:27.578 #T222 Install Device: Calling ‘RUNONCE’/‘GRPCONV’ items.
> @ 23:58:27.609 #I138 Executing ‘RUNONCE’ to process 5 ‘RUNONCE’ entries.
> @ 23:58:27.671 #I121 Device install of “USB\VID_13CF&PID_2200\0123456789”
> finished successfully.
> @ 23:58:27.703 #T201 Install Device: End.
>
> Thanks
> sunil
>
> On Thu, May 17, 2012 at 10:07 PM, Sunil Kumar wrote:
>
>> Thanks Doron, Tim,
>>
>> I modified inf as per your suggestions but not much progress.
>>
>> By doing so Filter driver getting listed in System\enum\usb%VIDnPID% but
>> now none of driver or filter are getting started.
>>
>> Here is inf again
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------
>> [Version]
>> Signature=“$WINDOWS NT$”
>> Class=Sample
>> ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
>> Provider=%MSFT%
>> DriverVer=05/17/2012,6.1.7600.16385
>> CatalogFile=KmdfSamples.cat
>>
>> ; ================= Class section =====================
>> [ClassInstall32]
>> Addreg=SampleClassReg
>> [SampleClassReg]
>> HKR,0,%ClassName%
>> HKR,Icon,-5
>> [DestinationDirs]
>> DefaultDestDir = 12
>> ; ================= Device section =====================
>> [Manufacturer]
>> %MfgName%=Microsoft,NTx86
>> ; For Win2K
>> [Microsoft]
>> %USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002
>> ; OSR USB-FX
>> %USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ;
>> Intel 82930
>> %USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ;
>> Intel 82930
>> ; For XP and later
>> [Microsoft.NTx86]
>> %USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev, USB\VID_0547&PID_1002
>> ; OSR USB-FX
>> %USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev, USB\VID_13CF&PID_2200 ;
>> Intel 82930
>> %USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev, USB\VID_045E&PID_930A ;
>> Intel 82930
>> [usbsamp.Dev.NT]
>> CopyFiles=usbsamp.Files.Ext
>> [usbsamp.Dev.NT.Services]
>> AddService = USBSampfilter, USBSampfilter.AddService
>> Addservice = usbsamp, 0x00000002, usbsamp.AddService
>> [USBSampfilter.AddService]
>> DisplayName = %filter.SvcDesc%
>> ServiceType = 1 ; SERVICE_KERNEL_DRIVER
>> StartType = 3 ; SERVICE_DEMAND_START
>> ErrorControl = 1 ; SERVICE_ERROR_NORMAL
>> ServiceBinary = %10%\System32\Drivers\UsbsampLower.sys
>> LoadOrderGroup = PNP Filter
>> [usbsamp.AddService]
>> DisplayName = %usbsamp.SvcDesc%
>> ServiceType = 1 ; SERVICE_KERNEL_DRIVER
>> StartType = 3 ; SERVICE_DEMAND_START
>> ErrorControl = 1 ; SERVICE_ERROR_NORMAL
>> ServiceBinary = %10%\System32\Drivers\usbsamp.sys
>> AddReg = usbsamp.AddReg
>> LoadOrderGroup = Base
>> [usbsamp.Dev.NT.HW]
>> AddReg = usbsamp.AddFilter
>> [usbsamp.AddReg]
>> HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
>> HKR,“Parameters”,“DebugLevel”,0x10001,2
>> [usbsamp.AddFilter]
>> HKR,“LowerFilters”,0x00010000,“UsbsampLower”
>> [usbsamp.Files.Ext]
>> usbsamp.sys
>> UsbsampLower.sys
>> [SourceDisksNames]
>> 1=%Disk_Description%,
>> [SourceDisksFiles]
>> usbsamp.sys = 1
>> UsbsampLower.sys = 1
>> ;-------------- WDF Coinstaller installation
>> [DestinationDirs]
>> CoInstaller_CopyFiles = 11
>> [usbsamp.Dev.NT.CoInstallers]
>> AddReg=CoInstaller_AddReg
>> CopyFiles=CoInstaller_CopyFiles
>> [CoInstaller_CopyFiles]
>> WdfCoInstaller01009.dll
>> [SourceDisksFiles]
>> WdfCoInstaller01009.dll=1 ; make sure the number matches with
>> SourceDisksNames
>> [CoInstaller_AddReg]
>> HKR,CoInstallers32,0x00010000, “WdfCoInstaller01009.dll,WdfCoInstaller”
>> [usbsamp.Dev.NT.Wdf]
>> KmdfService = USBSampfilter, USBSampfilter_wdfsect
>> KmdfService = usbsamp, usbsamp_wdfsect
>>
>> [USBSampfilter_wdfsect]
>> KmdfLibraryVersion = 1.9
>> [usbsamp_wdfsect]
>> KmdfLibraryVersion = 1.9
>> ;---------------------------------------------------------------;
>> [Strings]
>> MSFT = “Microsoft”
>> MfgName = “Intel/OSR”
>> Disk_Description= “usbsamp Installation Disk”
>> usbsamp.SvcDesc = “WDF Sample Driver for Intel 82930 USB Test Board”
>> ClassName = “Sample Device”
>> USB\VID_0547&PID_1002.DeviceDesc=“WDF Sample for OSR USB-FX2 Learning Kit”
>> USB\VID_045E&PID_930A.DeviceDesc=“WDF Sample for Intel 82930 USB Test
>> Board”
>> USB\VID_13CF&PID_2200.DeviceDesc=“Test USB Device”
>> filter.SvcDesc = “Test filter”
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------
>>
>> How could be wrong this time?
>>
>> Thanks
>> Sunil
>>
>>
>> On Thu, May 17, 2012 at 9:42 AM, Tim Roberts wrote:
>>
>>> Sunil Kumar wrote:
>>> > Hi Experts,
>>> >
>>> > I am trying a filter driver for OSR sample for USB in DDK under
>>> > C:\WinDDK\7600.16385.1\src\usb\usbsamp\sys.
>>> >
>>> > For filter driver I am using a sample from DDK available in toaster
>>> > under toaster\kmdf\filter\generic. I am modifing USBSAMP.inf for
>>> > loading generic filter.
>>> > …
>>> > [usbsamp.AddService]
>>> > DisplayName = %usbsamp.SvcDesc%
>>> > ServiceType = 1 ; SERVICE_KERNEL_DRIVER
>>> > StartType = 3 ; SERVICE_DEMAND_START
>>> > ErrorControl = 1 ; SERVICE_ERROR_NORMAL
>>> > ServiceBinary = %10%\System32\Drivers\usbsamp.sys
>>> > AddReg = usbsamp.AddReg
>>> > LoadOrderGroup = Base
>>> >
>>> > [usbsamp.AddReg]
>>> > HKR,“Parameters”,“MaximumTransferSize”,0x10001,65536
>>> > HKR,“Parameters”,“DebugLevel”,0x10001,2
>>> > HKR,“LowerFilters”,0x00010000,“UsbsampLower”
>>>
>>> That line in the wrong place. It needs to be in the hardware key for
>>> the device, not in the service key for the driver. You need this:
>>> [usbsamp.Dev.HW.NT]
>>> AddReg = usbsamp.AddFilter
>>> [usbsamp.AddFilter]
>>> HKR,LowerFilters,0x00010008,“UsbsampLower”
>>>
>>> –
>>> Tim Roberts, xxxxx@probo.com
>>> Providenza & Boekelheide, Inc.
>>>
>>>
>>> —
>>> NTDEV is sponsored by OSR
>>>
>>> For our schedule of WDF, WDM, debugging and other seminars visit:
>>> http://www.osr.com/seminars
>>>
>>> To unsubscribe, visit the List Server section of OSR Online at
>>> http://www.osronline.com/page.cfm?name=ListServer
>>>
>>
>>
>

Sunil Kumar wrote:

Thanks Doron, Tim,

I modified inf as per your suggestions but not much progress.

By doing so Filter driver getting listed in System\enum\usb%VIDnPID%
but now none of driver or filter are getting started.

Do you actually have one of these devices? How are you installing this
INF? You aren’t using “devcon install”, are you?

[usbsamp.AddFilter]
HKR,“LowerFilters”,0x00010000,“UsbsampLower”

I told you to use 0x00010008 here. If you use 0x00010000, you will
replace the entire list of filters with yours alone. When you use
0x00010008, your filter is added to the list, if not already present.
It doesn’t particularly matter in this specific case, but you need to
get into that habit.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Sunil Kumar wrote:

Thanks for help, I am able to filter client driver now both ways upper
and lower.

There was error while giving error in INF
[usbsamp.Dev.NT.Services]
AddService = *USBSampfilter*, USBSampfilter.AddService
[usbsamp.AddFilter]
HKR,“LowerFilters”,0x00010000,“*UsbsampLower*”

Name in bold should have been sample.

Good catch. Let me point out a couple of additional things.

; ================= Device section =====================
[Manufacturer]
%MfgName%=Microsoft,NTx86
; For Win2K
[Microsoft]
%USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev,
USB\VID_0547&PID_1002 ; OSR USB-FX
%USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev,
USB\VID_045E&PID_930A ; Intel 82930
%USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev,
USB\VID_13CF&PID_2200 ; Intel 82930

You’re never going to run this on Windows 2000. You might as well
delete those last 4 lines.

[USBSampfilter.AddService]

LoadOrderGroup = PNP Filter
[usbsamp.AddService]

LoadOrderGroup = Base

LoadOrderGroup is completely useless in a PnP driver. It only has
meaning for legacy drivers that are started at boot time. You should
remove these.

[usbsamp.AddFilter]
HKR,“LowerFilters”,0x00010000,“UsbsampLower”

Please – 0x00010008.

[Strings]
MSFT = “Microsoft”
MfgName = “Intel/OSR”

You are not Microsoft, nor Intel, nor OSR. Please change these names.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Tim for so helpful.

I will take care points listed by you.

Thanks
Sunil

On Fri, May 18, 2012 at 10:03 PM, Tim Roberts wrote:

> Sunil Kumar wrote:
> > Thanks for help, I am able to filter client driver now both ways upper
> > and lower.
> >
> > There was error while giving error in INF
> > [usbsamp.Dev.NT.Services]
> > AddService = USBSampfilter, USBSampfilter.AddService
> > [usbsamp.AddFilter]
> > HKR,“LowerFilters”,0x00010000,“UsbsampLower
> >
> > Name in bold should have been sample.
>
> Good catch. Let me point out a couple of additional things.
>
>
> > ; ================= Device section =====================
> > [Manufacturer]
> > %MfgName%=Microsoft,NTx86
> > ; For Win2K
> > [Microsoft]
> > %USB\VID_0547&PID_1002.DeviceDesc%=usbsamp.Dev,
> > USB\VID_0547&PID_1002 ; OSR USB-FX
> > %USB\VID_045E&PID_930A.DeviceDesc%=usbsamp.Dev,
> > USB\VID_045E&PID_930A ; Intel 82930
> > %USB\VID_13CF&PID_2200.DeviceDesc%=usbsamp.Dev,
> > USB\VID_13CF&PID_2200 ; Intel 82930
> >
>
> You’re never going to run this on Windows 2000. You might as well
> delete those last 4 lines.
>
> > [USBSampfilter.AddService]
> > …
> > LoadOrderGroup = PNP Filter
> > [usbsamp.AddService]
> > …
> > LoadOrderGroup = Base
> >
>
> LoadOrderGroup is completely useless in a PnP driver. It only has
> meaning for legacy drivers that are started at boot time. You should
> remove these.
>
>
> > [usbsamp.AddFilter]
> > HKR,“LowerFilters”,0x00010000,“UsbsampLower”
> >
>
> Please – 0x00010008.
>
>
> > [Strings]
> > MSFT = “Microsoft”
> > MfgName = “Intel/OSR”
> >
>
> You are not Microsoft, nor Intel, nor OSR. Please change these names.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>