If you are using a Win98 OS (Win98, 98SE, ME) you can access your
hardware using _outp() and _inp() functions.
If, however, you are using an NT-based OS (NT, 2000, XP) you need to
write a device driver to do this. You need Microsoft's DDK (this used to
be free but you now need to buy it) to write the driver and I think
there is sample code for a simple driver that will support memory-mapped
IO as you require so you can customise this for your own use quite easily.
In your driver, you then use DeviceIoControl() calls to do your ins and
outs as required.