Tech Support > Microsoft Windows > Drivers > DDK installation & Build environment in Visual Studio
DDK installation & Build environment in Visual Studio
Posted by Rams on March 20th, 2007


I just setup latest Windows DDK When I tried to build my code it throws an
error.

stdafx.h(26) : fatal error C1083: Cannot open include file: 'usbioctl.h': No
such file or directory

fatal error C1083: Cannot open include file: 'winddi.h': No such file or
directory

I have the following message too:

WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)

It looks like some problem with include files or Build environment. Can you
tell me how do I resolve?

Note that I am building from Visual Studio. Not DOS Command prompt.

Thanks



Posted by Don Burn on March 20th, 2007


This has been answer numerous times, you cannot reliably build s driver
without invoking the command prompt model. Using Visual Studio directly
will just cause bugs, and disable a number of tools you want to be using
for good quality code. If you want to develop in a Visual Studio GUI, use
DDKBUILD from http://www.hollistech.com/.

From, your error messages (stdafx is a huge hint), you need to step back
and take a clanss or at a minimum go read a good book such as Walter Oney's
"Programming the Windows Driver Model, Second Edition" before even going
near the kernel.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

"Rams" <Rams@discussions.microsoft.com> wrote in message
news:3CD7BAE1-56CF-41B6-A27A-1C32EF608DDC@microsoft.com...


Posted by Rams on March 20th, 2007


Hi Thanks for the reply. I am not developing driver. It is an exisiting code
which queries USB Printer and sends some escape codes.


"Don Burn" wrote:

Posted by Pavel A. on March 21st, 2007


"Rams" <Rams@discussions.microsoft.com> wrote in message news:A02E3198-4CB2-4BFF-9562-AFEE444C9091@microsoft.com...
Is your Visual Studio v6, by chance? The new WDK header files are
no longer compatible with VC6, and VC6 header files may conflict with WDK headers.

Regards,
--PA




Posted by matt_sykes on March 21st, 2007


On 20 Mar, 10:59, Rams <R...@discussions.microsoft.com> wrote:
You probably lost some environmental vars. Somewhere in the VS dir
is a setenv.bat or some such. Try running it a restarting VS.


Posted by Ali on March 21st, 2007


On Mar 20, 10:29 pm, "Don Burn" <b...@stopspam.windrvr.com> wrote:
Snip from Don:
Well! that was quite scary;-)

ali



Similar Posts