Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

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

zviveredzvivered Member Posts: 15

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

Comments

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,435
    via Email
    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
    d
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,006

    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);

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • zviveredzvivered Member Posts: 15

    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

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,435
    via Email
    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
    d
  • zviveredzvivered Member Posts: 15

    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

  • zviveredzvivered Member Posts: 15

    Hi Doron, All,

    When I set this:

    I got no compilation error.

    Thank you,
    Zvika

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA