Sample Code
Windows Driver Samples/ PCIDRV - WDF Driver for PCI Device/ C++/ kmdf/ genpci.inx/
;/*++ ; ;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: ; ; GenPCI.INF ; ;Abstract: ; INF file for a generic PCI device. ; ;--*/ [Version] Signature = "$WINDOWS NT$" Class = Sample ClassGuid = {78A1C341-4539-11d3-B88D-00C04FAD5171} Provider = %MSFT% DriverVer = 03/20/2003,5.00.3788 CatalogFile = KmdfSamples.cat [DestinationDirs] DefaultDestDir = 12 ;------------------------------------------------------------------------- ; Class Section ;------------------------------------------------------------------------- [ClassInstall32] Addreg = SampleClassReg [SampleClassReg] HKR,,,0,%ClassName% HKR,,Icon,,-5 HKR,,DeviceCharacteristics,0x10001,0x100 ;Use same security checks on relative opens HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)" ;Allow generic all access to system and built-in Admin. ;------------------------------------------------------------------------- ; Device Install Section ;------------------------------------------------------------------------- [ControlFlags] ExcludeFromSelect = * [Manufacturer] %MSFT%=MSFT,NT$ARCH$ [SourceDisksFiles] pcidrv.sys = 1 [SourceDisksNames] 1=%DISK_NAME%, ; For Win2K [MSFT] ; DisplayName Section DeviceId ; ----------- ------- -------- %GenPCI.DRVDESC%=GenPCI_Inst, PCI\VEN_8086&DEV_1229 %GenPCI.DRVDESC%=GenPCI_Inst, PCI\VEN_8086&DEV_103D %GenPCI.DRVDESC%=GenPCI_Inst, PCI\VEN_8086&DEV_1031 %GenPCI.DRVDESC%=GenPCI_Inst, PCI\VEN_8086&DEV_1038 ; For XP and later [MSFT.NT$ARCH$] ; DisplayName Section DeviceId ; ----------- ------- -------- %GenPCI.DRVDESC%=GenPCI_Inst, PCI\VEN_8086&DEV_1229 %GenPCI.DRVDESC%=GenPCI_Inst, PCI\VEN_8086&DEV_103D %GenPCI.DRVDESC%=GenPCI_Inst, PCI\VEN_8086&DEV_1031 %GenPCI.DRVDESC%=GenPCI_Inst, PCI\VEN_8086&DEV_1038 [GenPCI_Inst.NT] CopyFiles = GenPCI.CopyFiles [GenPCI.CopyFiles] pcidrv.sys [GenPCI_Inst.NT.Services] AddService = GenPCI,0x00000002,GenPCI_Service [GenPCI_Service] DisplayName = %GenPCI.SVCDESC% ServiceType = 1 ; SERVICE_KERNEL_DRIVER StartType = 3 ; SERVICE_DEMAND_START ErrorControl = 1 ; SERVICE_ERROR_NORMAL ServiceBinary = %12%\pcidrv.sys ;------------------------------------------------------------------------- ; WDF Coinstaller installation ;------------------------------------------------------------------------- [DestinationDirs] CoInstaller_CopyFiles = 11 [GenPCI_Inst.NT.CoInstallers] AddReg = CoInstaller_AddReg CopyFiles = CoInstaller_CopyFiles [CoInstaller_CopyFiles] WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll [SourceDisksFiles] WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll = 1 ; make sure the number matches with SourceDisksNames [CoInstaller_AddReg] HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller" [GenPCI_Inst.NT.Wdf] KmdfService = GenPCI, GenPCI_wdfsect [GenPCI_wdfsect] KmdfLibraryVersion = $KMDFVERSION$ ;------------------------------------------------------------------------------ ; String Definitions ;------------------------------------------------------------------------------ [Strings] MSFT = "Microsoft" ClassName = "Sample Device" GenPCI.SVCDESC = "Sample WDF PCI Driver Service for Intel 8255x Ethernet Controller" GenPCI.DRVDESC = "Sample WDF PCI Driver for Intel 8255x Ethernet Controller" DISK_NAME = "GenPCI Sample Install Disk"
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