【发布时间】:2012-02-04 22:50:14
【问题描述】:
我创建了简单的“Hello world”Windows 驱动程序。
hello.c
#include <ntddk.h>
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DbgPrint("Hello, World\n");
return STATUS_SUCCESS;
}
制作文件
!INCLUDE $(NTMAKEENV)\makefile.def
来源
TARGETNAME = hello
TARGETPATH = obj
TARGETTYPE = DRIVER
INCLUDES = %BUILD%\inc
LIBS = %BUILD%\lib
SOURCES = hello.c
如果我通过 Checked Build Environment 构建驱动程序,我会得到:
错误 C1083:无法打开包含文件:'codeanalysis\sourceannotations.h':没有这样的文件或目录
sourceannotations.h 包含在 C:\WinDDK\7600.16385.1\inc\crt 和 C:\Program Files\Microsoft Visual Studio 10.0\VC\include\CodeAnalysis 中,但我只能使用 Winddk 目录中的包含文件。
你有什么建议吗?
【问题讨论】:
标签: c driver device-driver wdk