You cannot. The OS which are capable of running CLR do not allow setting ISR on the application level. Moreover, ISR is the concept of
real mode. In
protected mode, you would have to set up a separate descriptor segment for interrupt processing.
Please see:
http://en.wikipedia.org/wiki/Protection_ring[
^],
http://en.wikipedia.org/wiki/Protected_mode[
^].
[EDIT]
Please see my comments to the question. To solve such problems, you need to learn WDK and protected-mode programming. Please see:
http://en.wikipedia.org/wiki/Windows_Driver_Kit[
^],
http://www.microsoft.com/whdc/devtools/wdk/default.mspx[
^],
http://msdn.microsoft.com/en-us/library/windows/hardware/hh852365.aspx[
^].
No, you cannot do it in C#. Not for present-day Windows system. Not only this is native programming only, this is also kernel-mode programming. These days, some Assembly Language will be required, in addition to the native code targeted high-level programming language.
—SA