IRQL in IRP_MJ_XXX routines

Q

QuasiCodo

I had a person ask me about the IRLQ at which the IRP_MJ_XXX routines
were called. I said I wasn't sure, but they can be called at
DISPATCH_LEVEL and PASSIVE_LEVEL. I look at the on line MSDN Lib and
found that the IRP_MJ_CLOSE is the only one that specifically says it is
called at PASSIVE_LEVEL.

Can anyone enlighten me on the details?

((&->
 
G

Gary G. Little

The general rule of thumb is that they are called at PASSIVE_LEVEL, but ...
I think you will find the wise choice is to code like they have been called
at > PASSIVE, if you can. The reason is that someone who "knows what they
are doing, and of course knows better" may call you from another device
driver at DISPATCH_LEVEL. A check for IRQL and an ASSERT is one means I have
seen to protect against such "know-it-alls". :)

There is no hard and fast rule that IRP_MJ_XXXX routines will be called at
PASSIVE. They should be, but you can get surprised.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top