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

Home NTDEV

Before Posting...

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

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


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

zviveredzvivered Member Posts: 118

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,828
    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: 14,832

    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]
    Software Wizard Emeritus

  • zviveredzvivered Member Posts: 118

    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,828
    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: 118

    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: 118

    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. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online