Sample Code
Windows Driver Samples/ WDF Sample Driver Learning Lab for OSR USB-FX2/ C++/ umdf/ step2/ WUDFOsrUsbFx2_2.inx/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | ; ; WUDFOsrUsbFx2_2.inf - Install the OSR USB user-mode driver ; [Version] Signature= "$Windows NT$" Class=Sample ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} Provider=%MSFTUMDF% DriverVer=03/25/2005,0.0.0.1 CatalogFile=wudf.cat [Manufacturer] %MSFTUMDF%=Microsoft,NT$ARCH$ [Microsoft.NT$ARCH$] %OsrUsbDeviceName%=OsrUsb_Install, USB\Vid_045e&Pid_94aa&mi_00 %OsrUsbDeviceName%=OsrUsb_Install, USB\VID_0547&PID_1002 [ClassInstall32] AddReg=SampleClass_RegistryAdd [SampleClass_RegistryAdd] HKR,,,,%ClassName% HKR,,Icon,, "-10" [SourceDisksFiles] WUDFOsrUsbFx2_2.dll=1 WudfUpdate_$UMDFCOINSTALLERVERSION$.dll=1 [SourceDisksNames] 1 = %MediaDescription% ; =================== UMDF OsrUsb Device ================================== [OsrUsb_Install.NT] CopyFiles=UMDriverCopy Include=WINUSB.INF ; Import sections from WINUSB.INF Needs=WINUSB.NT ; Run the CopyFiles & AddReg directives for WinUsb.INF [OsrUsb_Install.NT.hw] AddReg=OsrUsb_Device_AddReg [OsrUsb_Install.NT.Services] AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall ; flag 0x2 sets this as the service for the device AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall ; this service is installed because its a filter. [OsrUsb_Install.NT.Wdf] KmdfService=WINUSB, WinUsb_Install UmdfDispatcher=WinUsb UmdfService=WUDFOsrUsbFx2, WUDFOsrUsbFx2_Install UmdfServiceOrder=WUDFOsrUsbFx2 [OsrUsb_Install.NT.CoInstallers] AddReg=CoInstallers_AddReg CopyFiles=CoInstallers_CopyFiles [WinUsb_Install] KmdfLibraryVersion = $KMDFVERSION$ [WUDFOsrUsbFx2_Install] UmdfLibraryVersion=$UMDFVERSION$ DriverCLSID = "{0865b2b0-6b73-428f-a3ea-2172832d6bfc}" ServiceBinary = "%12%\UMDF\WUDFOsrUsbFx2_2.dll" [OsrUsb_Device_AddReg] HKR,, "LowerFilters" ,0x00010008, "WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND [WUDFRD_ServiceInstall] DisplayName = %WudfRdDisplayName% ServiceType = 1 StartType = 3 ErrorControl = 1 ServiceBinary = %12%\WUDFRd.sys LoadOrderGroup = Base [WinUsb_ServiceInstall] DisplayName = %WinUsb_SvcDesc% ServiceType = 1 StartType = 3 ErrorControl = 1 ServiceBinary = %12%\WinUSB.sys [CoInstallers_AddReg] HKR,,CoInstallers32,0x00010000, "WudfUpdate_$UMDFCOINSTALLERVERSION$.dll" [CoInstallers_CopyFiles] WudfUpdate_$UMDFCOINSTALLERVERSION$.dll [DestinationDirs] UMDriverCopy=12,UMDF ; copy to driversMdf CoInstallers_CopyFiles=11 [UMDriverCopy] WUDFOsrUsbFx2_2.dll ; =================== Generic ================================== [Strings] MSFTUMDF= "Microsoft Internal (WDF:UMDF)" MediaDescription= "Microsoft Sample Driver Installation Media" ClassName= "Sample Device" WudfRdDisplayName= "Windows Driver Foundation - User-mode Driver Framework Reflector" OsrUsbDeviceName= "UMDF Sample Driver for OSR USB Fx2 Learning Kit - Step2" WinUsb_SvcDesc= "WinUSB Driver" |
Our Services
-
What our customers say about us?
Read our customer testimonials to find out why our clients keep returning for their projects.
View Testimonials