From: Rams on
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



From: Don Burn on
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(a)discussions.microsoft.com> wrote in message
news:3CD7BAE1-56CF-41B6-A27A-1C32EF608DDC(a)microsoft.com...
>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
>
>
>


From: Rams on
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" <Rams(a)discussions.microsoft.com> wrote in message
> news:3CD7BAE1-56CF-41B6-A27A-1C32EF608DDC(a)microsoft.com...
> >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
> >
> >
> >
>
>
>
From: Pavel A. on
"Rams" <Rams(a)discussions.microsoft.com> wrote in message news:A02E3198-4CB2-4BFF-9562-AFEE444C9091(a)microsoft.com...
> 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" <Rams(a)discussions.microsoft.com> wrote in message
>> news:3CD7BAE1-56CF-41B6-A27A-1C32EF608DDC(a)microsoft.com...
>> >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
>> >
>> >
>> >
>>
>>
>>


From: matt_sykes on
On 20 Mar, 10:59, Rams <R...(a)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.

 |  Next  |  Last
Pages: 1 2
Prev: Virtual Audio Device Driver Question
Next: Winusb c#