From: DPM on
After a few false starts, we've finally got the environment in place, but
we're still getting some odd errors.

Below are the first few lines of our build. fd10capi.c includes winusb.h,
which in turn includes usb.h which includes usb100.h. The fact that usb.h
and usb100.h are throwing these errors (I've only shown the first half-dozen
or so - there are over 100 in all) seems to indicate that we're not
including other header files we should.

fd10capi.c is basically the example shown in WinUSB_HowTo.docx. In the
section "How to Use the WinUSB API" we're instructed to include winusb.h,
but I'm convinced there must be other includes we're missing. Can anyone
suggest any others we should be using?

Thanks for your help.


C:\WINDDK\6000\src\usb\fd10c>build -cZg
BUILD: Compile and Link for x86
BUILD: Start time: Tue Apr 15 16:21:01 2008
BUILD: Examining c:\winddk\6000\src\usb\fd10c directory for files to
compile.
BUILD: Compiling and Linking c:\winddk\6000\src\usb\fd10c directory
_NT_TARGET_VERSION SET TO WINXP
Compiling - usbview.rc
Compiling - usbview.c
Compiling - display.c
Compiling - enum.c
Compiling - debug.c
Compiling - devnode.c
Compiling - dispaud.c
Compiling - fd10capi.c
errors in directory c:\winddk\6000\src\usb\fd10c
c:\winddk\6000\inc\api\usb.h(41) : error C2061: syntax error : identifier
'PIRP'
c:\winddk\6000\inc\api\usb.h(41) : error C2059: syntax error : ';'
c:\winddk\6000\inc\api\usb.h(42) : error C2061: syntax error : identifier
'PMDL'
c:\winddk\6000\inc\api\usb.h(42) : error C2059: syntax error : ';'
c:\winddk\6000\inc\api\usb100.h(136) : error C2061: syntax error :
identifier 'UCHAR'
c:\winddk\6000\inc\api\usb100.h(137) : error C2061: syntax error :
identifier 'bDescriptorType'
c:\winddk\6000\inc\api\usb100.h(137) : error C2059: syntax error : ';'
c:\winddk\6000\inc\api\usb100.h(138) : error C2061: syntax error :
identifier 'bcdUSB'
c:\winddk\6000\inc\api\usb100.h(138) : error C2059: syntax error : ';'
c:\winddk\6000\inc\api\usb100.h(139) : error C2061: syntax error :
identifier 'bDeviceClass'
c:\winddk\6000\inc\api\usb100.h(139) : error C2059: syntax error : ';'
c:\winddk\6000\inc\api\usb100.h(140) : error C2061: syntax error :
identifier 'bDeviceSubClass'
--
Regards,
Dean


From: chris.aseltine on
On Apr 16, 7:08 am, "DPM" <d...(a)junk.com> wrote:

> After a few false starts, we've finally got the environment in place, but
> we're still getting some odd errors.

Are you including ntddk.h? Which build environment are you using?
(2K, XP, Vista, x86, x64, free, checked, ...)