none
WinDDK API: UsbBuildGetDescriptorRequest() fails to compile RRS feed

  • Question

  • I am trying to compile this code and it is failing with the following errors.

    #include <windows.h>
    #include <Usb.h>
    #include <Usbdlib.h>

    int main()
    {
        USB_DEVICE_DESCRIPTOR dd;
        URB urb;
        UsbBuildGetDescriptorRequest(&urb,
            sizeof(_URB_CONTROL_DESCRIPTOR_REQUEST),
            USB_DEVICE_DESCRIPTOR_TYPE, 0, 0, &dd, NULL,
            sizeof(dd), NULL);
        return 0;
    }

    1>------ Build started: Project: USBDeviceDescriptor, Configuration: Release Win32 ------
    1>  Source.c
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usbdlib.h(432): error C2146: syntax error: missing ')' before identifier 'DeviceObject'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usbdlib.h(432): error C2061: syntax error: identifier 'DeviceObject'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usbdlib.h(432): error C2059: syntax error: ';'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usbdlib.h(432): error C2059: syntax error: ','
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usbdlib.h(434): error C2059: syntax error: ')'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usbdlib.h(458): error C2146: syntax error: missing ')' before identifier 'PhysicalDeviceObject'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usbdlib.h(458): error C2061: syntax error: identifier 'PhysicalDeviceObject'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usbdlib.h(458): error C2059: syntax error: ';'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usbdlib.h(458): error C2059: syntax error: ','

    The file it is showing as errors is part of the WinDDK. May I know what I have to do build the above code successfully.

    Thanks in advance.

    Wednesday, December 11, 2019 10:58 AM

All replies

  • Hello,

    the error means that the type for DeviceObject is unknown. I think it is struct DEVICE_OBJECT.

    This is defined in wdm.h

    https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_device_object

    So you should include at least

    #include <windows.h>
    #include <wdm.h>
    #include <Usb.h>
    #include <Usbdlib.h>

    Regards, Guido

    Edit: But in the link it is said: "Requirements: wdm.h (include Wdm.h, Ntddk.h, Ntifs.h, Fltkernel.h)"
    Maybe you must include all the files.

    Wednesday, December 11, 2019 11:17 AM
  • Hello,

    If your issue is solved, please "Mark as answer" or "Vote as helpful" post to the appropriate answer , so that it will help other members to find solution quickly if they faces similar issue.

    Best Regards,

    Suarez Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 13, 2019 2:45 AM
  • Hi Guido,

    Thanks for your reply.

    After adding the suggested header files (Wdm.h, Ntddk.h, Ntifs.h, Fltkernel.h) I am getting similar errors from other header files.

    C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(139): warning C4005: 'MAX_NATURAL_ALIGNMENT': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(118): note: see previous definition of 'MAX_NATURAL_ALIGNMENT'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(163): warning C4005: 'PROBE_ALIGNMENT': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(142): note: see previous definition of 'PROBE_ALIGNMENT'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(687): error C2011: '_PROCESSOR_NUMBER': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(549): note: see declaration of '_PROCESSOR_NUMBER'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(698): error C2011: '_GROUP_AFFINITY': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(560): note: see declaration of '_GROUP_AFFINITY'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(992): error C2011: '_FLOAT128': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(710): note: see declaration of '_FLOAT128'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1043): error C2011: '_LARGE_INTEGER': 'union' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(757): note: see declaration of '_LARGE_INTEGER'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1061): error C2011: '_ULARGE_INTEGER': 'union' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(775): note: see declaration of '_ULARGE_INTEGER'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1090): error C2011: '_LUID': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(804): note: see declaration of '_LUID'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1191): error C2084: function 'ULONGLONG Int64ShllMod32(ULONGLONG,DWORD)' already has a body
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(884): note: see previous definition of 'Int64ShllMod32'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1207): error C2084: function 'LONGLONG Int64ShraMod32(LONGLONG,DWORD)' already has a body
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(900): note: see previous definition of 'Int64ShraMod32'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1223): error C2084: function 'ULONGLONG Int64ShrlMod32(ULONGLONG,DWORD)' already has a body
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(916): note: see previous definition of 'Int64ShrlMod32'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1446): warning C4005: 'UNICODE_STRING_MAX_BYTES': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1040): note: see previous definition of 'UNICODE_STRING_MAX_BYTES'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1490): error C2011: '_LIST_ENTRY': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1500): error C2011: '_SINGLE_LIST_ENTRY': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(17493): note: see declaration of '_SINGLE_LIST_ENTRY'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1545): error C2011: 'LIST_ENTRY32': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1070): note: see declaration of 'LIST_ENTRY32'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1551): error C2011: 'LIST_ENTRY64': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1076): note: see declaration of 'LIST_ENTRY64'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1571): error C2027: use of undefined type 'LIST_ENTRY64'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1076): note: see declaration of 'LIST_ENTRY64'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1571): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1571): error C2027: use of undefined type 'LIST_ENTRY32'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1070): note: see declaration of 'LIST_ENTRY32'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1572): error C2027: use of undefined type 'LIST_ENTRY64'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1076): note: see declaration of 'LIST_ENTRY64'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1572): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1572): error C2027: use of undefined type 'LIST_ENTRY32'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1070): note: see declaration of 'LIST_ENTRY32'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1582): error C2027: use of undefined type 'LIST_ENTRY32'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1070): note: see declaration of 'LIST_ENTRY32'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1582): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1582): error C2027: use of undefined type 'LIST_ENTRY64'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1076): note: see declaration of 'LIST_ENTRY64'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1583): error C2027: use of undefined type 'LIST_ENTRY32'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1070): note: see declaration of 'LIST_ENTRY32'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1583): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(1583): error C2027: use of undefined type 'LIST_ENTRY64'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1076): note: see declaration of 'LIST_ENTRY64'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2732): warning C4005: 'MAKELANGID': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1962): note: see previous definition of 'MAKELANGID'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2733): warning C4005: 'PRIMARYLANGID': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1963): note: see previous definition of 'PRIMARYLANGID'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2734): warning C4005: 'SUBLANGID': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1964): note: see previous definition of 'SUBLANGID'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2767): warning C4005: 'MAKELCID': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1997): note: see previous definition of 'MAKELCID'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2770): warning C4005: 'MAKESORTLCID': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2000): note: see previous definition of 'MAKESORTLCID'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2771): warning C4005: 'LANGIDFROMLCID': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2001): note: see previous definition of 'LANGIDFROMLCID'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2772): warning C4005: 'SORTIDFROMLCID': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2002): note: see previous definition of 'SORTIDFROMLCID'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2773): warning C4005: 'SORTVERSIONFROMLCID': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2003): note: see previous definition of 'SORTVERSIONFROMLCID'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2928): error C2766: explicit specialization; '_ENUM_FLAG_INTEGER_FOR_SIZE<1>' has already been defined
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2156): note: see previous definition of '_ENUM_FLAG_INTEGER_FOR_SIZE<1>'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2934): error C2766: explicit specialization; '_ENUM_FLAG_INTEGER_FOR_SIZE<2>' has already been defined
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2162): note: see previous definition of '_ENUM_FLAG_INTEGER_FOR_SIZE<2>'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2940): error C2766: explicit specialization; '_ENUM_FLAG_INTEGER_FOR_SIZE<4>' has already been defined
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2168): note: see previous definition of '_ENUM_FLAG_INTEGER_FOR_SIZE<4>'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2947): error C2953: '_ENUM_FLAG_SIZED_INTEGER': class template has already been defined
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(2944): note: see declaration of '_ENUM_FLAG_SIZED_INTEGER'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(66): warning C4005: 'STATUS_WAIT_0': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2210): note: see previous definition of 'STATUS_WAIT_0'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(212): warning C4005: 'STATUS_ABANDONED_WAIT_0': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2211): note: see previous definition of 'STATUS_ABANDONED_WAIT_0'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(235): warning C4005: 'STATUS_USER_APC': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2212): note: see previous definition of 'STATUS_USER_APC'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(262): warning C4005: 'STATUS_TIMEOUT': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2213): note: see previous definition of 'STATUS_TIMEOUT'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(271): warning C4005: 'STATUS_PENDING': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2214): note: see previous definition of 'STATUS_PENDING'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(682): warning C4005: 'DBG_EXCEPTION_HANDLED': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2215): note: see previous definition of 'DBG_EXCEPTION_HANDLED'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(691): warning C4005: 'DBG_CONTINUE': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2216): note: see previous definition of 'DBG_CONTINUE'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(766): warning C4005: 'STATUS_SEGMENT_NOTIFICATION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2217): note: see previous definition of 'STATUS_SEGMENT_NOTIFICATION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(929): warning C4005: 'STATUS_FATAL_APP_EXIT': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2218): note: see previous definition of 'STATUS_FATAL_APP_EXIT'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1258): warning C4005: 'DBG_TERMINATE_THREAD': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2219): note: see previous definition of 'DBG_TERMINATE_THREAD'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1267): warning C4005: 'DBG_TERMINATE_PROCESS': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2220): note: see previous definition of 'DBG_TERMINATE_PROCESS'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1276): warning C4005: 'DBG_CONTROL_C': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2221): note: see previous definition of 'DBG_CONTROL_C'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1285): warning C4005: 'DBG_PRINTEXCEPTION_C': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2222): note: see previous definition of 'DBG_PRINTEXCEPTION_C'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1294): warning C4005: 'DBG_RIPEXCEPTION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2223): note: see previous definition of 'DBG_RIPEXCEPTION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1303): warning C4005: 'DBG_CONTROL_BREAK': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2224): note: see previous definition of 'DBG_CONTROL_BREAK'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1312): warning C4005: 'DBG_COMMAND_EXCEPTION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2225): note: see previous definition of 'DBG_COMMAND_EXCEPTION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1344): warning C4005: 'STATUS_GUARD_PAGE_VIOLATION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2226): note: see previous definition of 'STATUS_GUARD_PAGE_VIOLATION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1355): warning C4005: 'STATUS_DATATYPE_MISALIGNMENT': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2227): note: see previous definition of 'STATUS_DATATYPE_MISALIGNMENT'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1366): warning C4005: 'STATUS_BREAKPOINT': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2228): note: see previous definition of 'STATUS_BREAKPOINT'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1377): warning C4005: 'STATUS_SINGLE_STEP': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2229): note: see previous definition of 'STATUS_SINGLE_STEP'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1680): warning C4005: 'STATUS_LONGJUMP': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2230): note: see previous definition of 'STATUS_LONGJUMP'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1707): warning C4005: 'STATUS_UNWIND_CONSOLIDATE': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2231): note: see previous definition of 'STATUS_UNWIND_CONSOLIDATE'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1784): warning C4005: 'DBG_EXCEPTION_NOT_HANDLED': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2232): note: see previous definition of 'DBG_EXCEPTION_NOT_HANDLED'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1913): warning C4005: 'STATUS_ACCESS_VIOLATION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2233): note: see previous definition of 'STATUS_ACCESS_VIOLATION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1922): warning C4005: 'STATUS_IN_PAGE_ERROR': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2234): note: see previous definition of 'STATUS_IN_PAGE_ERROR'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1940): warning C4005: 'STATUS_INVALID_HANDLE': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2235): note: see previous definition of 'STATUS_INVALID_HANDLE'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(1985): warning C4005: 'STATUS_INVALID_PARAMETER': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2236): note: see previous definition of 'STATUS_INVALID_PARAMETER'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(2085): warning C4005: 'STATUS_NO_MEMORY': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2237): note: see previous definition of 'STATUS_NO_MEMORY'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(2142): warning C4005: 'STATUS_ILLEGAL_INSTRUCTION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2238): note: see previous definition of 'STATUS_ILLEGAL_INSTRUCTION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(2223): warning C4005: 'STATUS_NONCONTINUABLE_EXCEPTION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2239): note: see previous definition of 'STATUS_NONCONTINUABLE_EXCEPTION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(2232): warning C4005: 'STATUS_INVALID_DISPOSITION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2240): note: see previous definition of 'STATUS_INVALID_DISPOSITION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3155): warning C4005: 'STATUS_ARRAY_BOUNDS_EXCEEDED': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2241): note: see previous definition of 'STATUS_ARRAY_BOUNDS_EXCEEDED'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3165): warning C4005: 'STATUS_FLOAT_DENORMAL_OPERAND': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2242): note: see previous definition of 'STATUS_FLOAT_DENORMAL_OPERAND'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3175): warning C4005: 'STATUS_FLOAT_DIVIDE_BY_ZERO': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2243): note: see previous definition of 'STATUS_FLOAT_DIVIDE_BY_ZERO'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3185): warning C4005: 'STATUS_FLOAT_INEXACT_RESULT': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2244): note: see previous definition of 'STATUS_FLOAT_INEXACT_RESULT'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3195): warning C4005: 'STATUS_FLOAT_INVALID_OPERATION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2245): note: see previous definition of 'STATUS_FLOAT_INVALID_OPERATION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3205): warning C4005: 'STATUS_FLOAT_OVERFLOW': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2246): note: see previous definition of 'STATUS_FLOAT_OVERFLOW'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3215): warning C4005: 'STATUS_FLOAT_STACK_CHECK': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2247): note: see previous definition of 'STATUS_FLOAT_STACK_CHECK'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3225): warning C4005: 'STATUS_FLOAT_UNDERFLOW': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2248): note: see previous definition of 'STATUS_FLOAT_UNDERFLOW'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3235): warning C4005: 'STATUS_INTEGER_DIVIDE_BY_ZERO': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2249): note: see previous definition of 'STATUS_INTEGER_DIVIDE_BY_ZERO'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3245): warning C4005: 'STATUS_INTEGER_OVERFLOW': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2250): note: see previous definition of 'STATUS_INTEGER_OVERFLOW'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(3255): warning C4005: 'STATUS_PRIVILEGED_INSTRUCTION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2251): note: see previous definition of 'STATUS_PRIVILEGED_INSTRUCTION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(4201): warning C4005: 'STATUS_STACK_OVERFLOW': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2252): note: see previous definition of 'STATUS_STACK_OVERFLOW'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(4718): warning C4005: 'STATUS_DLL_NOT_FOUND': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2253): note: see previous definition of 'STATUS_DLL_NOT_FOUND'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(4747): warning C4005: 'STATUS_ORDINAL_NOT_FOUND': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2254): note: see previous definition of 'STATUS_ORDINAL_NOT_FOUND'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(4757): warning C4005: 'STATUS_ENTRYPOINT_NOT_FOUND': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2255): note: see previous definition of 'STATUS_ENTRYPOINT_NOT_FOUND'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(4767): warning C4005: 'STATUS_CONTROL_C_EXIT': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2256): note: see previous definition of 'STATUS_CONTROL_C_EXIT'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(4845): warning C4005: 'STATUS_DLL_INIT_FAILED': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2257): note: see previous definition of 'STATUS_DLL_INIT_FAILED'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(7319): warning C4005: 'STATUS_FLOAT_MULTIPLE_FAULTS': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2258): note: see previous definition of 'STATUS_FLOAT_MULTIPLE_FAULTS'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(7329): warning C4005: 'STATUS_FLOAT_MULTIPLE_TRAPS': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2259): note: see previous definition of 'STATUS_FLOAT_MULTIPLE_TRAPS'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(7461): warning C4005: 'STATUS_REG_NAT_CONSUMPTION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2260): note: see previous definition of 'STATUS_REG_NAT_CONSUMPTION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(8435): warning C4005: 'STATUS_HEAP_CORRUPTION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2261): note: see previous definition of 'STATUS_HEAP_CORRUPTION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(8663): warning C4005: 'STATUS_STACK_BUFFER_OVERRUN': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2262): note: see previous definition of 'STATUS_STACK_BUFFER_OVERRUN'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(8790): warning C4005: 'STATUS_INVALID_CRUNTIME_PARAMETER': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2263): note: see previous definition of 'STATUS_INVALID_CRUNTIME_PARAMETER'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(8853): warning C4005: 'STATUS_ASSERTION_FAILURE': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2264): note: see previous definition of 'STATUS_ASSERTION_FAILURE'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(12894): warning C4005: 'STATUS_SXS_EARLY_DEACTIVATION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2266): note: see previous definition of 'STATUS_SXS_EARLY_DEACTIVATION'
    1>C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntstatus.h(12903): warning C4005: 'STATUS_SXS_INVALID_DEACTIVATION': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(2267): note: see previous definition of 'STATUS_SXS_INVALID_DEACTIVATION'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\mce.h(118): error C2079: '_MCA_EXCEPTION::TimeStamp' uses undefined union '_LARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(231): error C2079: '_KAPC::ApcListEntry' uses undefined struct '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(326): error C2079: '_KDPC::DpcListEntry' uses undefined struct '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(414): error C2371: 'PMDL': redefinition; different basic types
    1>  C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\Usb.h(45): note: see declaration of 'PMDL'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(470): error C2079: '_DISPATCHER_HEADER::WaitListHead' uses undefined struct '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(487): error C2079: '_KTIMER::DueTime' uses undefined union '_ULARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(488): error C2079: '_KTIMER::TimerListEntry' uses undefined struct '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(758): error C2011: '_GENERIC_MAPPING': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(9149): note: see declaration of '_GENERIC_MAPPING'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(779): error C2011: '_LUID_AND_ATTRIBUTES': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(9170): note: see declaration of '_LUID_AND_ATTRIBUTES'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(803): error C2011: '_ACL': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(9845): note: see declaration of '_ACL'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(842): error C2011: '_PRIVILEGE_SET': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(10472): note: see declaration of '_PRIVILEGE_SET'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(891): error C2011: '_SECURITY_IMPERSONATION_LEVEL': 'enum' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(10664): note: see declaration of '_SECURITY_IMPERSONATION_LEVEL'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(918): error C2011: '_SECURITY_QUALITY_OF_SERVICE': 'struct' type redefinition
    1>  C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(49): note: see declaration of '_SECURITY_QUALITY_OF_SERVICE'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(930): error C2011: '_SE_IMPERSONATION_STATE': 'struct' type redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(11245): note: see declaration of '_SE_IMPERSONATION_STATE'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1153): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1153): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1153): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1177): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1177): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1178): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1178): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1179): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1179): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1180): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1180): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1192): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1192): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1193): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1193): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1194): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1194): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1195): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1195): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1210): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1210): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1211): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1211): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1212): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1212): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1213): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1213): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1227): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1227): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1228): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1228): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1229): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1229): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1230): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1230): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1231): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1231): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1244): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1244): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1245): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1245): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1246): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1246): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1247): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1247): error C2227: left of '->Blink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1248): error C2027: use of undefined type '_LIST_ENTRY'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(1049): note: see declaration of '_LIST_ENTRY'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1248): error C2227: left of '->Flink' must point to class/struct/union/generic type
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1836): error C2027: use of undefined type '_LARGE_INTEGER'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(757): note: see declaration of '_LARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1837): error C2079: 'Sum' uses undefined union '_LARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1839): error C2228: left of '.QuadPart' must have class/struct/union
    1>  C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1839): note: type is 'int'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1839): error C2027: use of undefined type '_LARGE_INTEGER'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(757): note: see declaration of '_LARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1855): error C2027: use of undefined type '_LARGE_INTEGER'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(757): note: see declaration of '_LARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1856): error C2079: 'Product' uses undefined union '_LARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1858): error C2228: left of '.QuadPart' must have class/struct/union
    1>  C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1858): note: type is 'int'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1874): error C2027: use of undefined type '_LARGE_INTEGER'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(757): note: see declaration of '_LARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1875): error C2079: 'Product' uses undefined union '_LARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1877): error C2228: left of '.QuadPart' must have class/struct/union
    1>  C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1877): note: type is 'int'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1897): error C2027: use of undefined type '_ULARGE_INTEGER'
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(775): note: see declaration of '_ULARGE_INTEGER'
    1>C:\WinDDK\2600.1106\inc\ddk\wdm\wxp\wdm.h(1897): fatal error C1003: error count exceeds 100; stopping compilation
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Friday, December 13, 2019 4:27 AM
  • After adding the suggested header files (Wdm.h, Ntddk.h, Ntifs.h, Fltkernel.h) I am getting similar errors from other header files.

    C:\Program Files (x86)\Windows Kits\8.1\Include\shared\ntdef.h(139): warning C4005: 'MAX_NATURAL_ALIGNMENT': macro redefinition
    1>  C:\Program Files (x86)\Windows Kits\8.1\Include\um\winnt.h(118): note: see previous definition of 'MAX_NATURAL_ALIGNMENT'
    ...
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    I found out that windows.h is a user space include file, wdm.h is a kernel space include file. They cannot be used together. So don't include "windows.h".

    #include <wdm.h>
    #include <Usb.h>
    #include <Usbdlib.h>

    Regards, Guido

    Friday, December 13, 2019 7:40 AM
  • What are you really trying to do here?  UsbBuildGetDescriptorRequest is a kernel API, designed to be used from inside a USB device's own kernel driver.  Unless you're writing a driver, you can't use it.

    I also need to point out that you are mixing the 20-year-old Windows XP DDK with the relatively recent Windows 8.1 DDK.  THAT is a recipe for disaster.  As long as you have the 8.1 DDK, just delete the antique one.



    Tim Roberts | Driver MVP Emeritus | Providenza &amp; Boekelheide, Inc.

    Friday, December 13, 2019 11:22 PM
  • Removing the header file <windows.h> also didn't helped me. Let me know if you I can do something additionally to fix this issue. Here my question is the header files which are giving errors are not using by me directly. They are used by the headfiles included by me, so I am expecting it should not give errors to me.
    Monday, December 16, 2019 4:06 AM
  • ok. Thanks for the information Tim.
    Monday, December 16, 2019 4:06 AM
  • Removing the header file <windows.h> also didn't helped me. Let me know if you I can do something additionally to fix this issue. Here my question is the header files which are giving errors are not using by me directly. They are used by the headfiles included by me, so I am expecting it should not give errors to me.

    I don't understand what you are talking about.

    In your source, you are using UsbBuildGetDescriptorRequest, which is a macro defined in usbdlib.h : https://docs.microsoft.com/en-us/previous-versions/ff538943(v%3Dvs.85)

    So you must include usbdlib.h in your source code. The macro uses URB structure, which is declared in usb.h . So it's no error to include usb.h (if usbdlib.h doesn't already include usb.h) . https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/usb/ns-usb-_urb?redirectedfrom=MSDN

    And there is kernel stuff which is declared in wdm.h . Since the compiler doesn't know DeviceObject (look at your origin question), you must include wdm.h . And wdm.h cannot be used with windows.h as I wrote before.

    So the only question now is: why didn't removing the <windows.h>-include help you?


    Monday, December 16, 2019 10:18 AM