If you want to go the way of reading/writing I/O ports, you need to be able to write them. The .net framework (the microsoft one on windows atleast) does not support this directly.
For reading/writing to parallel ports i'm having great success with the InOut32 library (link). This means you will have to use PInvoke to make it work. For me this code works:
[DllImport("inpoutx64.dll", EntryPoint = "Out32")]
private static extern void OutputImpl(int adress, int value);
[DllImport("inpoutx64.dll", EntryPoint = "Inp32")]
private static extern int InputImpl(int adress);
public static void Output(int adress, int value)
{
// I use this wrapper to set debug breakpoints so I can see what's going on
OutputImpl(adress, value);
}
public static int Input(int adress)
{
int ret = InputImpl(adress);
return ret;
}
Note that if you are running a 32 bit application you will need to referrence the "InOut32.dll" library. I am unsure about the specific ports you need to use, but I imagine you can either find them on the internet, or give it a few tries some from your PCI cards configured IO address range (see the deveice's properties in the device manager).