Mogulbasher
10-17-2007, 07:31 PM
Ok, I have looked at the DDK and the sample files. I was wondering when it came to the section where it says initialize COMx stuff here. Typically if trying to open a port I would use System.IO and do something like this
// Instantiate the communications port with some basic settings
SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
// Open the port for communications
port.Open();
//Do something with the port
// Close the port
port.Close();
In this case I am creating a new serialport object. Is this how you expect to do it or have you created somewhere an object within a class that I should be using for this.
Can you provide a sample working DLL file (source code) that I can use as a reference or alternatively suggest whether there is anything in the files htat I should be using specifically. I see that the port name is defined as base.Port
// Instantiate the communications port with some basic settings
SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);
// Open the port for communications
port.Open();
//Do something with the port
// Close the port
port.Close();
In this case I am creating a new serialport object. Is this how you expect to do it or have you created somewhere an object within a class that I should be using for this.
Can you provide a sample working DLL file (source code) that I can use as a reference or alternatively suggest whether there is anything in the files htat I should be using specifically. I see that the port name is defined as base.Port