1

I have been going through the tutorial at Microsoft.I have compiled the KMDFSmall Kernel device driver on Windows 7 64 bit. I have completed the programming portion of the tutorial, my code compiled successfully and I have the KmdfSmall.inf file, the KmdfSmall.sys file, the KmdfSmall.cer file, the WdfCoinstaller01011.dll file, the kmdfsmall.cat file too.

However, I don't have a test machine to run this on. I just want to install this toy driver into my own machine. I read here how to install it using add hardware wizard. I went through the steps, but I am running into problem right.

So, I click start and type hdwwiz and run the Add Harware Wizard. I do the manual install, choose the INF file where it says Have Disk, the KmdfSmall Device appears, I click next, but I get the following error message.

The following hardware was not installed. KmdfSmall Device

An error occurred during the installation of the device.

The system cannot find the file specified.

I don't know what file isn't being found?

Here is my INF file:

;
; KmdfSmall.inf
;

[Version]
Signature="$WINDOWS NT$"
Class=Sample ; TODO: edit Class
ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} ; TODO: edit ClassGuid
Provider=%ManufacturerName%
CatalogFile=KmdfSmall.cat
DriverVer=02/22/2014,19.58.50.950

[DestinationDirs]
DefaultDestDir = 12

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

[ClassInstall32]
Addreg=SampleClassReg

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

[SourceDisksNames]
1 = %DiskName%,,,""

[SourceDisksFiles]
KmdfSmall.sys  = 1,,

;*****************************************
; Install Section
;*****************************************

[Manufacturer]
%ManufacturerName%=Standard,NTamd64

[Standard.NTamd64]
%KmdfSmall.DeviceDesc%=KmdfSmall_Device, Root\KmdfSmall ; TODO: edit hw-id

[KmdfSmall_Device.NT]
CopyFiles=Drivers_Dir

[Drivers_Dir]
KmdfSmall.sys

;-------------- Service installation
[KmdfSmall_Device.NT.Services]
AddService = KmdfSmall,%SPSVCINST_ASSOCSERVICE%, KmdfSmall_Service_Inst

; -------------- KmdfSmall driver install sections
[KmdfSmall_Service_Inst]
DisplayName    = %KmdfSmall.SVCDESC%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\KmdfSmall.sys
LoadOrderGroup = Extended Base

;
;--- KmdfSmall_Device Coinstaller installation ------
;

[DestinationDirs]
KmdfSmall_Device_CoInstaller_CopyFiles = 11

[KmdfSmall_Device.NT.CoInstallers]
AddReg=KmdfSmall_Device_CoInstaller_AddReg
CopyFiles=KmdfSmall_Device_CoInstaller_CopyFiles

[KmdfSmall_Device_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01011.dll,WdfCoInstaller"

[KmdfSmall_Device_CoInstaller_CopyFiles]
WdfCoInstaller01011.dll

[SourceDisksFiles]
WdfCoInstaller01011.dll=1 ; make sure the number matches with SourceDisksNames

[KmdfSmall_Device.NT.Wdf]
KmdfService =  KmdfSmall, KmdfSmall_wdfsect
[KmdfSmall_wdfsect]
KmdfLibraryVersion = 1.11

[Strings]
SPSVCINST_ASSOCSERVICE= 0x00000002
ManufacturerName="" ; TODO: add ManufacturerName
ClassName="Samples" ; TODO: edit ClassName
DiskName = "KmdfSmall Installation Disk"
KmdfSmall.DeviceDesc = "KmdfSmall Device"
KmdfSmall.SVCDESC = "KmdfSmall Service"

0 Answers0