RE: [Newbie] Connecting Interrupt causes protection error

Hi Mark,

“Roddy, Mark” wrote:

Hmmm… must be a WDM driver for 98 or ME or you wouldn’t be getting the
“NTKERN” message. You are not even close to doing the right thing here. You
need to re-read the ddk about configuring your device resources. Well all
righty, the ddk is only understandable if you know what it says to begin
with. So go get Walter Oney’s WDM book (Microsoft Press,) as it is very well
written indeed and just the thing if you are starting out.

I have this book, its very good, but the wizard created a driver which I was not
able to access throught a user test programm.
Thats why I take the ddk “generic” sources and added my functionality.

You cannot invent vector or IRQL values to pass the IoConnectInterrupt. This
is why the ddk says:

Specifies the interrupt vector passed in the interrupt resource at

Specifies the DIRQL passed in the interrupt resource at u.Interrupt.Level.

Specifies the set of processors on which device interrupts can occur in this
platform. This value is passed in the interrupt resource at

handler. See the ddk doc for IRP_MN_START_DEVICE, you need to use the values
in Parameters.StartDevice.AllocatedResourcesTranslated rather than inventing
your own values.

Your INF file for your ISA device, if the device is NOT a PNP_ISA device, is
where you specify the bus interrupt levels the board supports. This is where
your knowledge that “I know that it needs IRQ 10 and 11” gets communicated

to the PnP mechanism of the operating system.

Until now I had not INF file.
I added registry keys like the ones in the ddk sample


Now I create one and it contains following lines



So I hope the PnP manager will save this information somewhere in the registry.
When I define in the BIOS of my system that the IRQ 10 and 11 are assigned by
PnP mechanism,
I get a fatal exception throught the installation process.

When I define the IRQs as ISA then the system sometimes freezes, sometimes get
an exception like above.

The INF file does not contain any registry keys to add, I don’t know if I have
to define them, or if the installer will do this automaticaly.

By the way, an affinity of zero would be requesting that the operating
system not allow ANY processor to service interrupt requests.

> -----Original Message-----
> From: Vasili Goutas []
> Sent: Monday, October 23, 2000 10:06 AM
> To: NT Developers Interest List
> Subject: [ntdev] [Newbie] Connecting Interrupt causes protection error
> Hi,
> I don’t understand why my IoConnectInterrupt call causes a protection
> error.
> This call seems to me error free.
> ntStatus = IoConnectInterrupt(&pDeviceExtension->InterruptObjectOne,
> (PVOID) pDeviceExtension,
> &pDeviceExtension->IRQSpinLock,
> 0x72/*vectorOne*/,
> DISPATCH_LEVEL + 1/*irqlOne*/,
> DISPATCH_LEVEL + 1/*irqlOne*//*max(irqlOne, irqlTwo)*/,
> Latched/*modeOne*/,
> FALSE/*irqshareOne*/,
> 0/*affinityOne*/,
> My card is a standard ISA without PnP functionality. I know that it
> needs IRQ 10 and 11, so I defined
> the vector 0x72 as IRQ10. I’m not sure about the affinity so I tried 0
> and ~0, both get the same result.
> On boottime I get the message
> While initializing device NTKERN:
> Windows protection error. You need to restart your computer.
> Ideas?
> Vasili

You are currently subscribed to ntdev as:
To unsubscribe send a blank email to $subst(‘Email.Unsub’)