Hooking the display driver interrupt(Vertical sync interrupt)

I have been developing a device driver, which hooks
the interrupt of the display driver (Vertical Sync interrupt).

The driver is purposed to catch the interrupt
before the display driver do it and after display driver do its own job.

Two approaches were tried, but both of them failed.

The first.
1. Search the IRQ, IRQL, Vector at IDT(interrupt descriptor table)
, Affinity, Level etc. of the Display Card (Matrox G400 AGP).

2. Just use IoConnectInterrupt via the above informations.

3. In inf file. set the LoadGroup with any groups are loaded
before the display driver, such as Keboard Port etc.

=> Result:
I expected the interrupt object would be placed before that of
the display driver. But the my own interrupt service routine
does work while the IoConnectInterrupt returns success.
I Guess my interrupt object is placed lower at the interrupt chain.

The Second.
1. Use the mirror driver in DDK sample.

=> Result:
I can't understand how the miniport driver(mirror.sys) works
Is it possible to hook the interrupt of the original
display driver via the MirrorVidInterrupt routine, which is
transfered to the OS through

hwInitData.HwInterrupt= &MirrorVidInterrupt;
...
initializationStatus = VideoPortInitialize(Context1,
Context2,
&hwInitData,
NULL);

I wonder how the MirrorVidInterrupt routine hooks the original
interrupt service routine of the Display Driver.

Best Free e-Mail Site Orgio.net http://www.orgio.net

?Ŀ??? ??? ???, ???Ȯ??? ???