I created simple "Hello world" windows driver.
hello.c
#include <ntddk.h>
NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
{
DbgPrint("Hello, World\n");
return STATUS_SUCCESS;
}
makefile
!INCLUDE $(NTMAKEENV)\makefile.def
sources
TARGETNAME = hello
TARGETPATH = obj
TARGETTYPE = DRIVER
INCLUDES = %BUILD%\inc
LIBS = %BUILD%\lib
SOURCES = hello.c
If I build driver by Checked Build Environment, I get:
error C1083: Cannot open include file: 'codeanalysis\sourceannotations.h': No such file or directory
sourceannotations.h
is included in C:\WinDDK\7600.16385.1\inc\crt
and C:\Program Files\Microsoft Visual Studio 10.0\VC\include\CodeAnalysis
, but I can only use included files from Winddk directory.
Do you have any suggestion what should I do?
Maybe I incorrectly installed the DDK, because after reinstalling DDK I compiled files without problems.