Reading data from outside world(plz help)
i have a hardware which reads the temperature and displays..... i want to display this reading in the computer....I already controlled the Parallel port, small harwares have been controlled but this reading problem never solved
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Raaj KumarRank #7,836 · 233 reputationPosted Feb 15, 2010, 8:04 PM EST
For reading data from parallel port you need to import COM dll Input32.dll which should be inside C:\Windows\System32. The following is the code for importing the DLL
using System.Runtime.InteropServices; public class PortOperation { [DllImport("inpout32.dll", EntryPoint = "Out32")] public static extern void Output(int address, int data);//Send Data to Parallel port [DllImport("inpout32.dll", EntryPoint = "Inp32")] public static extern int Input(int address);//Read Data from Parallel port public void ReadDataFromport() { int data = Input(889);//889 integer valued address for parallel used for reading } public void WriteToPort() { Output(888, 64); //888 integer valued address for parallel used for writing to port } } Try this and please let me know you have any problem. Regards, Raaj