Unable to build WDK 10 samples with VC2015 without modifying Windows headers
<p>I am running a fresh installation of Windows. No other programs installed except VC and SDK's</p>

<ul>
<li><p>Include Directories</p>

<p><strong>C:\WinSDK10\Include\10.0.10586.0\shared;<br/>
C:\WinSDK10\Include\10.0.10586.0\km;<br/>
C:\WinSDK10\Include\10.0.10586.0\km\crt;<br/>
C:\WinSDK10\Include\wdf\kmdf\1.11</strong><br/></p></li>
<li><p>Target OS Version</p>

<p><strong>Windows 8.1</strong></p></li>
<li><p>Target Platform</p>

<p><strong>Desktop</strong></p></li>
<li><p>Run Wpp Tracing</p>

<p><strong>No</strong></p></li>
<li><p>Enable minimal rebuild</p>

<p><strong>No</strong></p></li>
</ul>

<p><hr/>
<strong><em>Source:</em></strong></p>

<pre><code>#include &lt;ntddk.h&gt;
#include &lt;wdf.h&gt;
DRIVER_INITIALIZE DriverEntry;
EVT_WDF_DRIVER_DEVICE_ADD KmdfHelloWorldEvtDeviceAdd;

NTSTATUS DriverEntry(_In_ PDRIVER_OBJECT  DriverObject, _In_ PUNICODE_STRING RegistryPath)
{
    NTSTATUS status;
    WDF_DRIVER_CONFIG config;

    KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "KmdfHelloWorld: DriverEntry\n"));
    WDF_DRIVER_CONFIG_INIT(&amp;config, KmdfHelloWorldEvtDeviceAdd);
    status = WdfDriverCreate(DriverObject, RegistryPath, WDF_NO_OBJECT_ATTRIBUTES, &amp;config, WDF_NO_HANDLE);
    return status;
}

NTSTATUS KmdfHelloWorldEvtDeviceAdd(_In_ WDFDRIVER Driver, _Inout_ PWDFDEVICE_INIT DeviceInit)
{
    NTSTATUS status;
    WDFDEVICE hDevice;
    UNREFERENCED_PARAMETER(Driver);

    KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "KmdfHelloWorld: KmdfHelloWorldEvtDeviceAdd\n"));
    status = WdfDeviceCreate(&amp;DeviceInit, WDF_NO_OBJECT_ATTRIBUTES, &amp;hDevice);
    return status;
}
</code></pre>

<hr/>

<pre><code>Severity    Code    Description Project File    Line    Suppression State
Error   C2146   syntax error: missing ')' before identifier 'InformationClass'  Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
Error   C2146   syntax error: missing ')' before identifier 'InformationClass'  Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
Error   C2061   syntax error: identifier 'InformationClass' Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
Error   C2061   syntax error: identifier 'InformationClass' Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
Error   C2059   syntax error: ';'   Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
Error   C2059   syntax error: ';'   Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
Error   C2059   syntax error: ','   Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
Error   C2059   syntax error: ','   Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
Error   C2059   syntax error: ')'   Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31792   
Error   C2059   syntax error: ')'   Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31792   
Error   C2081   'EVENT_INFO_CLASS': name in formal parameter list illegal   Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
Error   C2081   'EVENT_INFO_CLASS': name in formal parameter list illegal   Test1   C:\WinSDK10\Include\10.0.10586.0\km\wdm.h   31789   
</code></pre>

<hr/>

<p><strong><em>Hack: The driver builds successfully if I edit <code>wdm.h</code> and remove <code>#define _ETW_KM_</code></em></strong></p>

<p><strong><em>wdm.h</em></strong></p>

<pre><code>#ifndef _ETW_KM_
#define _ETW_KM_
#endif

#include &lt;evntprov.h&gt;


//
// Optional callback function that users provide.
//

typedef
_IRQL_requires_max_(PASSIVE_LEVEL)
_IRQL_requires_same_
VOID
NTAPI 
ETWENABLECALLBACK (
    _In_ LPCGUID SourceId,
    _In_ ULONG ControlCode,
    _In_ UCHAR Level,
    _In_ ULONGLONG MatchAnyKeyword,
    _In_ ULONGLONG MatchAllKeyword,
    _In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData,
    _Inout_opt_ PVOID CallbackContext
    );

typedef ETWENABLECALLBACK *PETWENABLECALLBACK;
</code></pre>

<hr/>

<p>Sorry for the length of this post!!<br/>
I'm pretty sure I am doing something wrong while following this <a href="https://msdn.microsoft.com/en-us/library/windows/hardware/hh439665%28v=vs.85%29.aspx" rel="nofollow">MSDN Driver Example Link</a> but I can't figure out what.<br/><br/></p>

<p>Thanks for your time,</p>

<p>Kris</p>