WDK 10.0.15063.0: InterruptRaw , InterruptTranslated when compiling for Windows 7-64

Hello,

I’m using V.S 2015 to build the driver.
The driver should run under Win7-64.
Should I set Driver Settings - >General according to the following snapshot ?

When I tried this settings, I got a compilation error in the attached code in the lines:

InterruptConfig.InterruptRaw = InterruptResourceRaw;
InterruptConfig.InterruptTranslated = InterruptResourceTranslated;

Can you please tell why am I getting the compilation error?
I think those lines are mandatory for MSI-X.

Thank you,
Zvika

What compilation errors are you seeing? According to the docs, InterruptRaw and InterruptTranslated were added in KMDF 1.11, so make sure you are building against at least this version of KMDF

d

Even after you fix that, you have another bug here that will cause a BSOD.
WDFINTERRUPT* InterruptToCreate;

status = WdfInterruptCreate(DevExt->Device,
&InterruptConfig,
&Attributes/WDF_NO_OBJECT_ATTRIBUTES/,
InterruptToCreate);

InterruptToCreate is an output parameter. You don’t pass it a pointer, you pass it the address of a variable, into which it will store the handle.
WDFINTERRUPT InterruptToCreate;

status = WdfInterruptCreate( …
&InterruptToCreate);

Hello,

Sorry - Very basic question:
How can I know the KMDF version I’m using in WDK 10.0.15063.0 ?

In case driver will be installed under Win7-64, should I set:
Target OS Version: Windows 7
Target Platform: Desktop ?

Thank you,
Zvika

It is a setting in the project config outside of the target OS and platform. LMBTFY, http://www.bing.lmgtfy.com/?s=b&q=set+kmdf+version+in+vs

First link in the query:

https://docs.microsoft.com/en-us/windows-hardware/drivers/wdf/building-and-loading-a-kmdf-driver

d

Hi Doron, All,

I checked the build log and found:
… /D KMDF_VERSION_MAJOR=1 /D KMDF_VERSION_MINOR=15 …

This version (1.15) should support the fields InterruptRaw, InterruptTranslated in WDF_INTERRUPT_CONFIG
When I set to :
Target OS Version: Windows 7
Target Platform: Desktop

I got the following compilation error:
Error C2039 ‘InterruptRaw’: is not a member of ‘_WDF_INTERRUPT_CONFIG’
Error C2039 ‘InterruptTranslated’: is not a member of ‘_WDF_INTERRUPT_CONFIG’

When I set to:
Target OS Version: Windows 10 or higher
Target Platform: Desktop

There was no compilation error.

Can you please explain this ?

Thank you,
Zvika

Hi Doron, All,

When I set this:

I got no compilation error.

Thank you,
Zvika