Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > DDK installation & Build environment in Visual Studio

Reply
Thread Tools Display Modes

DDK installation & Build environment in Visual Studio

 
 
Rams
Guest
Posts: n/a

 
      03-20-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



 
Reply With Quote
 
 
 
 
Don Burn
Guest
Posts: n/a

 
      03-20-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" <> wrote in message
news:3CD7BAE1-56CF-41B6-A27A-...
>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
>
>
>



 
Reply With Quote
 
Rams
Guest
Posts: n/a

 
      03-20-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:

> 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" <> wrote in message
> news:3CD7BAE1-56CF-41B6-A27A-...
> >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
> >
> >
> >

>
>
>

 
Reply With Quote
 
Pavel A.
Guest
Posts: n/a

 
      03-20-2007
"Rams" <> wrote in message news:A02E3198-4CB2-4BFF-9562-...
> Hi Thanks for the reply. I am not developing driver. It is an exisiting code
> which queries USB Printer and sends some escape codes.


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


>
> "Don Burn" wrote:
>
>> 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" <> wrote in message
>> news:3CD7BAE1-56CF-41B6-A27A-...
>> >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
>> >
>> >
>> >

>>
>>
>>



 
Reply With Quote
 
matt_sykes
Guest
Posts: n/a

 
      03-21-2007
On 20 Mar, 10:59, Rams <R...@discussions.microsoft.com> wrote:
> 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


You probably lost some environmental vars. Somewhere in the VS dir
is a setenv.bat or some such. Try running it a restarting VS.

 
Reply With Quote
 
Ali
Guest
Posts: n/a

 
      03-21-2007
On Mar 20, 10:29 pm, "Don Burn" <b...@stopspam.windrvr.com> wrote:
> 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 fromhttp://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" <R...@discussions.microsoft.com> wrote in message
>
> news:3CD7BAE1-56CF-41B6-A27A-...
>
> >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


Snip from Don:
> 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.


Well! that was quite scary;-)

ali

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation problem Visual Studio Pat Kelly Windows Vista Installation 1 10-30-2007 09:44 PM
WDK build 6000 under Visual Studio theo Windows Vista Drivers 3 02-20-2007 10:45 AM
Windows DDK build with Visual Studio 2005? ttan Windows Vista Drivers 2 07-25-2006 08:22 PM
Installing Visual Studio .NET 2003 on Vista Build 5456 James Simpson Windows Vista General Discussion 1 07-17-2006 04:00 PM
NDIS + Visual Studio 6 (C++ environment) - raw ethernet packet send/receive GeLLcheN Windows Vista Drivers 3 04-10-2006 08:26 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59