Need info. on WDFINTERRUPT object

Hi All,

Please provide info WDFINTERRUPT object for the below event
Xxx_ EvtInterruptIsr(IN WDFINTERRUPT Interrupt, IN ULONG MessageID)

When an hardware interrupt occurs WDF will invoke the callback function registerd “Xxx_EvtInterruptIsr”,
So, what exactly the argument ’ Interrupt’ contains and how do I extract interrupt information from it…?

I am begineer to windows device drivers… Please provide some good knowledge on it.

Thanks & Regards,
Prakash

The WDFINTERRUPT is opaque. You can add a context for your own information
or use the WdfInterruptXXX calls to access some data in the structure.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Monday, June 24, 2013 9:06 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Need info. on WDFINTERRUPT object

Hi All,

Please provide info WDFINTERRUPT object for the below event
Xxx_ EvtInterruptIsr(IN WDFINTERRUPT Interrupt, IN ULONG MessageID)

When an hardware interrupt occurs WDF will invoke the callback function
registerd “Xxx_EvtInterruptIsr”, So, what exactly the argument ’ Interrupt’
contains and how do I extract interrupt information from it…?

I am begineer to windows device drivers… Please provide some good knowledge
on it.

Thanks & Regards,
Prakash


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

It’s a handle to a WDFINTERRUPT object, representing the interrupt connected to the ISR that’s running. It’s opaque, as Mr. Burn said, just like the handle to every other WDF Object (WDFDEVICE, WDFREQUEST, etc).

What, specifically, do you need to do… and what, specific, information is it that you’re missing?

Peter
OSR

> Hi All,

Please provide info WDFINTERRUPT object for the below event
Xxx_ EvtInterruptIsr(IN WDFINTERRUPT Interrupt, IN ULONG MessageID)

When an hardware interrupt occurs WDF will invoke the callback function
registerd “Xxx_EvtInterruptIsr”,
So, what exactly the argument ’ Interrupt’ contains and how do I extract
interrupt information from it…?

I am begineer to windows device drivers… Please provide some good
knowledge on it.

Thanks & Regards,
Prakash

The answer is simple: you ignore it, except in those cases where you must
pass it to some other function.
joe


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

xxxxx@gmail.com wrote:

Please provide info WDFINTERRUPT object for the below event
Xxx_ EvtInterruptIsr(IN WDFINTERRUPT Interrupt, IN ULONG MessageID)

When an hardware interrupt occurs WDF will invoke the callback function registerd “Xxx_EvtInterruptIsr”,
So, what exactly the argument ’ Interrupt’ contains and how do I extract interrupt information from it…?

The WDFINTERRUPT object will be the one that you created when you called
WdfInterruptCreate. You don’t need to “extract interrupt information”
from it. You can get the WDFDEVICE from it by calling
WdfInterruptGetDevice, and from that you can get your device context.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks Don Burn, Tim Roberts , Peter, Joe for all your valuable response.

I am using the WdfInterruptGetXXX to get my device context. I was looking is there any other way to extract this ‘WDFINTERRUPT’ handle in WDF.

xxxxx@gmail.com wrote:

I am using the WdfInterruptGetXXX to get my device context. I was looking is there any other way to extract this ‘WDFINTERRUPT’ handle in WDF.

Extract it from what? Usually, when you create your interrupt, you save
the WDFINTERRUPT object in your device context. So, as long as you have
your device context, you can get the WDFINTERRUPT.

However, the WDFINTERRUPT object isn’t very useful. What are you really
trying to do here? What’s the larger problem you are trying to solve?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Given that he said he was a beginner, he suspects that there might be
useful information in the WDFINTERRUPT object. There is, but not of any
value to the coder of the ISR. I suspect that in addition to the
interrupt spin lock, there are other internal state bits used by
KiInterruptDispatch and friends, and for the WDFINTERRUPT, quite possibly
bits useful to the framework. Lacking source access, I’m only guessing at
things beyond the interrupt spin lock… He is acting on the premise that
if it is coming in as a parameter, surely it must have value to the ISR
coder. But it doesn’t.
joe

xxxxx@gmail.com wrote:
> I am using the WdfInterruptGetXXX to get my device context. I was
> looking is there any other way to extract this ‘WDFINTERRUPT’ handle in
> WDF.

Extract it from what? Usually, when you create your interrupt, you save
the WDFINTERRUPT object in your device context. So, as long as you have
your device context, you can get the WDFINTERRUPT.

However, the WDFINTERRUPT object isn’t very useful. What are you really
trying to do here? What’s the larger problem you are trying to solve?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer