- Compilation Erro
- Posted by pgems on February 7th, 2007
I'm writing a legacy driver. I'm getting error FILE_DEVICE_UNKNOWN not
defined error. I'm using Visual Studio 2005 as Development Eng. Please Help
me to build my driver successfully.
- Posted by Don Burn on February 7th, 2007
NEVER, NEVER, NEVER, NEVER, NEVER, NEVER, NEVER, NEVER, NEVER, NEVER,
NEVER, NEVER, NEVER, NEVER, NEVER, NEVER, NEVER, NEVER, NEVER, NEVER,
NEVER, NEVER, NEVER, NEVER, NEVER, NEVER USE ANY COMPILER FOR DRIVER
DEVELOPMENT OTHER THAN THE ONE IN THE DDK/WDK.
Go back and create a build environment for you driver and invoke the
compiler that way. If you want a GUI build environment, get DDKbuild from
http://www.hollistech.com/
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply
"pgems" <pgems@discussions.microsoft.com> wrote in message
news:0A1C74BB-43DE-4FDB-B17A-CA4A0D83CF19@microsoft.com...
- Posted by Gianluca Varenni on February 7th, 2007
Are you trying to compile your driver with Visual Studio?
You need to use the compiler shipped with the DDK to compile the driver, so
either opening one of the DDK/WDK build environments (command line), or
eventually using DDKBUILD (and integrate it with Visual Studio 2005).
DDKBUILD is a freely available batch script to compile drivers making use of
the DDK environment.
Trying to compile a driver with the VS compiler is just asking for trouble.
Have a nice day
GV
"pgems" <pgems@discussions.microsoft.com> wrote in message
news:0A1C74BB-43DE-4FDB-B17A-CA4A0D83CF19@microsoft.com...
- Posted by Matthew Carter on February 10th, 2007
#include <ntddk.h>
That's the usual way to get the definition for FILE_DEVICE_UNKNOWN. If you
have included ntddk.h in the c source code file and you still get that error
then you don't have the include file path set correctly. Visual Studio 2005
doesn't come with the ntddk.h or put it in the include file directory since
that is part of the Windows DDK, not part of the VS IDE. The only fail-safe
way to build a driver with Visual Studio's GUI is to make a batch file that
calls the DDK's setenv.bat to set up the proper build environment, then
executes the appropriate command-line tools to build your driver. You would
then use a custom build step to call that script and disable all the other
build steps.
"pgems" <pgems@discussions.microsoft.com> wrote in message
news:0A1C74BB-43DE-4FDB-B17A-CA4A0D83CF19@microsoft.com...
- nothing to do folder erro (Microsoft Windows) by godzflava
- Erro Msg (Mobile Devices) by Lavida
- Debuglog.Log erro fix (Help and Support) by dekkerenator@gmail.com
- Start-Up Erro Message (Windows ME) by Dan Bilitz
- NT4.0 Server erro msg (Windows NT) by Dan

