How to access I/O ports in Windows NT / WinXP

The theory that I know:
A VDD must install I/O port handlers (also known as I/O hooks) within the VDD initialization routine for the ports used by its application.
RegisterModule loads and installs the 32-bit VDD.
Initialize a VDD_IO_HANDLERS structure with pointers to the VDD?s I/O port handlers, specifying one or more ranges of I/O ports the VDD responds to, and call the VDDInstallIOHook function.
The handlers are called each time there is an IN or OUT instruction on one of the designated ports.
VDDDeinstallIOHook unhoooks the I/O ports previously hooked by a VDD, when the VDD is about to be terminated.

There is always a wide gap between theory and practice?
The question is how to implement it in MASM?
(How to assemble a VDD module, how to use DispatchCall, lots of questions?)

Please, does anyone know any examples?
Or maybe there is another way to access I/O ports (registers, memory) under WinNT?
Any ideas, samples would be highly appreciated.

Posted on 2001-12-13 12:57:19 by Ola