Sample Code

Windows Driver Samples/ Sample UMDF Filter above KMDF Function Driver for OSR USB-FX2 (UMDF Version 1)/ C++/ umdf_filter/ WUDFOsrUsbFilterOnKmDriver.inx/

;
; INF for installing OSR USB user-mode filter driver on top of OSR USB KMDF (final) sample driver
; You will need to have the user-mode filter driver and KMDF function driver in one install location
; The KMDF files needed are:
;     osrusbfx2.sys (final version)
;     WdfCoInstallerxxxx.dll (the KMDF coinstaller)
;

[Version]
Signature="$WINDOWS NT$"
Class=Sample
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171}
Provider=%MSFT%
DriverVer=10/01/2002,6.0.5058.0
CatalogFile=wudf.cat


; ================= Class section =====================

[ClassInstall32]
Addreg=SampleClassReg     

[SampleClassReg]
HKR,,,0,%ClassName%
HKR,,Icon,,-5


; ================= Device section =====================

[Manufacturer]
%MfgName%=Microsoft,NT$ARCH$

; For XP and later
[Microsoft.NT$ARCH$]
%USB\VID_045E&PID_930A.DeviceDesc%=osrusbfx2, USB\VID_0547&PID_1002

[osrusbfx2.NT]
CopyFiles=osrusbfx2.Files.Ext,UMDriverCopy

[osrusbfx2.NT.hw]
AddReg=OsrUsb_AddReg


[osrusbfx2.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[osrusbfx2.NT.Services]
AddService=WUDFRd,0x000001f8,WUDFRD_ServiceInstall  
AddService=osrusbfx2, 0x000001fa, osrusbfx2.AddService ;flag 0x2 sets this as the service for the device

[osrusbfx2.NT.Wdf]
KmdfService=osrusbfx2, osrusbfx2_wdfsect
UmdfService="WUDFOsrUsbFilter", WudfOsrUsbFilter_Install
UmdfServiceOrder=WUDFOsrUsbFilter

[OsrUsb_AddReg]
HKR,,"UpperFilters",0x00010008,"WUDFRd" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND


[WudfOsrUsbFilter_Install]
UmdfLibraryVersion=$UMDFVERSION$
DriverCLSID = "{422d8dbc-520d-4d7e-8f53-920e5c867e6c}"
ServiceBinary = "%12%\UMDF\WUDFOsrUsbFilter.dll"

[osrusbfx2_wdfsect]
KmdfLibraryVersion=$KMDFVERSION$

[WUDFRD_ServiceInstall]
DisplayName = %WudfRdDisplayName%
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\WUDFRd.sys
LoadOrderGroup = Base


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

[osrusbfx2.Files.Ext]
osrusbfx2.sys

[UMDriverCopy]
WudfOsrUsbFilter.dll

[SourceDisksNames]
1=%Disk_Description%,,,

[SourceDisksFiles]
osrusbfx2.sys = 1
WudfOsrUsbFilter.dll=1
WudfUpdate_$UMDFCOINSTALLERVERSION$.dll=1

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf
DefaultDestDir = 12

;-------------- WDF Coinstaller installation

[DestinationDirs]
CoInstaller_CopyFiles = 11

[CoInstaller_CopyFiles]
WudfUpdate_$UMDFCOINSTALLERVERSION$.dll

[CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000,"WudfUpdate_$UMDFCOINSTALLERVERSION$.dll"

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

[Strings]
MSFT="Microsoft"
MfgName="OSR"
Disk_Description="OSRUSBFX2 Installation Disk"
USB\VID_045E&PID_930A.DeviceDesc="Microsoft UMDF OSR Usb Sample Device With Filter on kernel-mode Driver"
osrusbfx2.SvcDesc="WDF Sample Driver for OSR USB-FX2 Learning Kit"
ClassName       = "Sample Device"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"

Our Services

  • What our customers say about us?

© 2011-2024 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS