I’m having trouble building, what seems to be, the most bare bones driver possible. I’m new to driver development so I’m trying to keep it simple, but I get a build error when I try to include wdf.h. It seems weird to me because it doesn’t complain about the ntddk.h include even though they are in the same include folder. I would appreciate any help.
Thank you.
I get one error:
1>c:\testdrv\pathtest\test.c(1) : error C1083: Cannot open include file: ‘wdf.h’: No such file or directory
The full path of these two .h files is:
C:\WinDDK\7600.16385.1\inc\ddk\ntddk.h
C:\WinDDK\7600.16385.1\inc\wdf\kmdf\1.9\wdf.h
-----Original Message-----
From: xxxxx@hotmail.com Sent: May 17, 2010 7:10 AM To: Windows System Software Devs Interest List Subject: [ntdev] Cannot open include file: ‘wdf.h’
Hello all.
I’m having trouble building, what seems to be, the most bare bones driver possible. I’m new to driver development so I’m trying to keep it simple, but I get a build error when I try to include wdf.h. It seems weird to me because it doesn’t complain about the ntddk.h include even though they are in the same include folder. I would appreciate any help.
Thank you.
I get one error: 1>c:\testdrv\pathtest\test.c(1) : error C1083: Cannot open include file: ‘wdf.h’: No such file or directory
The full path of these two .h files is: C:\WinDDK\7600.16385.1\inc\ddk\ntddk.h C:\WinDDK\7600.16385.1\inc\wdf\kmdf\1.9\wdf.h
Here is my source (test.c): <br>#include <ntddk.h><br>#include <wdf.h><br><br>NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)<br>{<br> return STATUS_SUCCESS;<br>}<br>
Here is my sources file: <br>TARGETNAME = test<br>TARGETPATH = obj<br>TARGETTYPE = DRIVER<br><br>INCLUDES = %BUILD%\inc<br><br>LIBS = %BUILD%\lib<br><br>SOURCES = test.c<br>
I just realized that although adding the KMDF version to the sources file fixed my build errors, now when I try to start the service on my virtual PC using OSR Driver Loader I get an error that says “The system cannot find the file specified.”
Any thoughts as to why this might be happening? Is there something I should install on my virtual PC? My virtual PC is running Windows XP SP2. I am building using the Windows XP x86 Checked Build Environment.
In most cases a KMDF driver is a PnP driver, and cannot be loaded with
API’s the driver loader. In the case of the non-pnp there is still the
need to load the correct KMDF co-installer which AFAIK the OSR driver
loader does not support.
-----Original Message-----
From: xxxxx@hotmail.com [mailto:xxxxx@hotmail.com]
Posted At: Tuesday, May 18, 2010 10:08 AM
Posted To: ntdev
Conversation: Cannot open include file: ‘wdf.h’
Subject: RE: Cannot open include file: ‘wdf.h’
I just realized that although adding the KMDF version to the sources
file
fixed my build errors, now when I try to start the service on my
virtual PC
using OSR Driver Loader I get an error that says “The system cannot
find the
file specified.”
Any thoughts as to why this might be happening? Is there something I
should
install on my virtual PC? My virtual PC is running Windows XP SP2. I
am
building using the Windows XP x86 Checked Build Environment.
__________ Information from ESET Smart Security, version of virus
signature
database 5124 (20100518) __________
Have you checked the registry entrys for your driver and verified that the
SYS file is indeed where the ImagePath entry says it is? As to the image
path: I’ve recently noted that instead of \systemroot\system32.…,
ImagePath may be set to ??\C:\Windows\system32.… and that can indeed
confuse the heck out of .kdfiles which may be set to C:.… . If you are not
using .kdfiles then that may not be an issue but you do indeed need to know
WHERE your driver is on disk and if ImagePath is pointing to it correctly.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Tuesday, May 18, 2010 9:08 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Cannot open include file: ‘wdf.h’
I just realized that although adding the KMDF version to the sources file
fixed my build errors, now when I try to start the service on my virtual PC
using OSR Driver Loader I get an error that says “The system cannot find the
file specified.”
Any thoughts as to why this might be happening? Is there something I should
install on my virtual PC? My virtual PC is running Windows XP SP2. I am
building using the Windows XP x86 Checked Build Environment.
I just realized that although adding the KMDF version to the sources file fixed my build errors, now when I try to start the service on my virtual PC using OSR Driver Loader I get an error that says “The system cannot find the file specified.”
Any thoughts as to why this might be happening? Is there something I should install on my virtual PC? My virtual PC is running Windows XP SP2. I am building using the Windows XP x86 Checked Build Environment.
Are you installing KMDF? XP does not include it. If there are no other
KMDF drivers, then you are responsible for installing the KMDF runtime.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.