简体   繁体   中英

An error occurred while creating the driver. The device driver is not installed on any device, use a primitive driver if provided

I cannot create a kernel driver because of this error. "The device driver is not installed on any device, use a primitive driver if provided" It looks like my inf file contains something wrong, although I haven't changed anything. Help me please)))

INF FILE

    ;
; hellodriver.inf
;
 
[Version]
Signature="$WINDOWS NT$"
Class=System
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
Provider=%ManufacturerName%
DriverVer=
CatalogFile=hellodriver.cat
PnpLockDown=1
 
[DestinationDirs]
DefaultDestDir = 12
 
 
[SourceDisksNames]
1 = %DiskName%,,,""
 
[SourceDisksFiles]
 
 
[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$
 
[Standard.NT$ARCH$]
 
 
[Strings]
ManufacturerName="<Your manufacturer name>" ;TODO: Replace with your manufacturer name
ClassName=""
DiskName="hellodriver Source Disk"

My driver code

[#include "ntddk.h"
 
 
VOID Unload(IN PDRIVER_OBJECT DriverObject) {
    DbgPrint("driver unload \r\n");
 
}
 
 
 
NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
{
    DriverObject->DriverUnload = Unload;
 
    DbgPrint("hello\r\n");
    return STATUS_SUCCESS;
}][1]

enter image description here

In INF File, you have

[Manufacturer] %ManufacturerName%=Standard,NT$ARCH$

Just keep [Manufacturer] and remove line there after.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM