Sample Code
Windows Driver Samples/ HID Minidriver Sample (UMDF Version 1)/ C++/ driver/ Wudfvhidmini.inx/
;/*++ ; ;Copyright (c) Microsoft Corporation All rights Reserved ; ;Module Name: ; ; WUDFVHIDMINI.INF ; ;Abstract: ; INF file for installing UMDF HID minidriver ; ;Installation Notes: ; Using Devcon: Type "devcon install Wudfvhidmini.inf root\Wudfvhidmini" to install ; ;--*/ [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$, NT$ARCH$.6.2 ; For XP and later [Microsoft.NT$ARCH$] %DeviceDesc%=hidumdf, root\wudfvhidmini ; For Win8 and later so we can use inbox HID-UMDF mapper [Microsoft.NT$ARCH$.6.2] %DeviceDesc%=hidumdf.win8, root\wudfvhidmini ;=============================================================== ; vhidmini for pre-win8 (uses developer-provided HID-UMDF mapper) ;=============================================================== [hidumdf.NT] CopyFiles=hidumdf.Files.Ext,UMDriverCopy [hidumdf.NT.hw] AddReg=WudfVhidmini_AddReg [hidumdf.NT.CoInstallers] AddReg=CoInstaller_AddReg CopyFiles=CoInstaller_CopyFiles [hidumdf.NT.Services] AddService=WUDFRd,0x000001f8,WUDFRD_ServiceInstall AddService=hidumdf, 0x000001fa, hidumdf.AddService ;flag 0x2 sets this as the service for the device [hidumdf.AddService] DisplayName = %hidumdf.SvcDesc% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %10%\System32\Drivers\hidumdf.sys LoadOrderGroup = Base [hidumdf.NT.Wdf] UmdfService="WUDFVhidmini", Wudfvhidmini_Install UmdfServiceOrder=WUDFVhidmini UmdfKernelModeClientPolicy=AllowKernelModeClients UmdfFileObjectPolicy=AllowNullAndUnknownFileObjects UmdfMethodNeitherAction=Copy ;=============================================================== ; vhidmini for win8 and newer (uses inbox HID-UMDF mapper) ;=============================================================== [hidumdf.win8.NT] CopyFiles=UMDriverCopy [hidumdf.win8.NT.hw] AddReg=WudfVhidmini_AddReg [hidumdf.win8.NT.CoInstallers] AddReg=CoInstaller_AddReg CopyFiles=CoInstaller_CopyFiles [hidumdf.win8.NT.Services] AddService=WUDFRd,0x000001f8,WUDFRD_ServiceInstall AddService=mshidumdf, 0x000001fa, mshidumdf.AddService ;flag 0x2 sets this as the service for the device [mshidumdf.AddService] ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %10%\System32\Drivers\mshidumdf.sys [hidumdf.win8.NT.Wdf] UmdfService="WUDFVhidmini", Wudfvhidmini_Install UmdfServiceOrder=WUDFVhidmini UmdfKernelModeClientPolicy=AllowKernelModeClients UmdfFileObjectPolicy=AllowNullAndUnknownFileObjects UmdfMethodNeitherAction=Copy UmdfFsContextUsePolicy=CanUseFsContext2 ; ================= common section ===================== [WudfVhidmini_AddReg] HKR,,"LowerFilters",0x00010008,"WUDFRd" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND [WUDFRD_ServiceInstall] DisplayName = %WudfRdDisplayName% ServiceType = 1 StartType = 3 ErrorControl = 1 ServiceBinary = %12%\WUDFRd.sys LoadOrderGroup = Base [Wudfvhidmini_Install] UmdfLibraryVersion=$UMDFVERSION$ DriverCLSID = "{522d8dbc-520d-4d7e-8f53-920e5c867e6c}" ServiceBinary = "%12%\UMDF\WUDFvhidmini.dll" ; ================= copy files ===================== [hidumdf.Files.Ext] hidumdf.sys [UMDriverCopy] WUDFvhidmini.dll [SourceDisksNames] 1=%Disk_Description%,,, [SourceDisksFiles] hidumdf.sys = 1 WudfVhidmini.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="Microsoft" Disk_Description="WUDFVhidmini Installation Disk" DeviceDesc="UMDF HID minidriver Sample Device (Wudfvhidmini)" hidumdf.SvcDesc="Service for Vhidmini Sample Device" ClassName = "Sample Device" WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
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