Windows设备驱动程序

时间:2014-01-09 07:43:21

标签: windows driver

我正在尝试编写一个简单的驱动程序。使用此Hello World代码:

#include <ntddk.h>     
NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
{
    UNREFERENCED_PARAMETER(DriverObject);
    UNREFERENCED_PARAMETER(RegistryPath);
    DbgPrint("Hello World\n");
    return STATUS_SUCCESS;
}

但是我收到了这个错误:

Error   1   error -2: "Inf2Cat, signability test failed." Double click to see the tool output.  

我不确定这意味着什么。 我使用Win7 Debug配置设置。

2 个答案:

答案 0 :(得分:2)

我制作了类似的程序,它对win7 debug config

完全正常
#include "ntddk.h"
#include "stdio.h"
#include "stdlib.h"
void DriverUnload( 
PDRIVER_OBJECT pDriverObject) 
{  
DbgPrint("Driver unloading\n"); 
} 
NTSTATUS DriverEntry( 
PDRIVER_OBJECT DriverObject, 
PUNICODE_STRING RegistryPath) 
{ 
PDEVICE_OBJECT pdo;
DriverObject->DriverUnload = DriverUnload; 
DbgPrint("Hello, World\n"); 
return STATUS_SUCCESS; 
}

还可以检查cat文件是否有任何64位装饰错误

答案 1 :(得分:0)

解决方案是项目 - &gt; propeties-&gt; ConfigurationProperties-&gt; inf2Cat-&gt; General-&gt; UseLocalTime-&gt;是

相关问题