I am trying to compile a file that uses one of the pre-defined IOCTL codes
in usbioctl.h.
I am getting build errors (C2220 and C4200) because this file has some data
type definitions with zero-length arrays. For example, the Data array in the
typed below is zero length, and causes such an error.
typedef struct _USB_DESCRIPTOR_REQUEST {
ULONG ConnectionIndex;
struct {
UCHAR bmRequest;
UCHAR bRequest;
USHORT wValue;
USHORT wIndex;
USHORT wLength;
} SetupPacket;
UCHAR Data[0];
} USB_DESCRIPTOR_REQUEST, *PUSB_DESCRIPTOR_REQUEST;
I also notice a disturbing pragma statement near the beginning of the file:
#pragma message ("warning: using obsolete header file usbioctl.h")
It confuses me further that I don't see this message in my console window
when I do my build.
This version of the header shipped with the latest DDK, so I'm confused.
Can anyone shed some light on this?
FYI: I'm doing a checked build.
Thanks in advance for the help,
Dennis