The following example uses the BuildCommDCB and SetCommState functions (Windows API calls) to set up COM1 at 9600 baud, no parity, 8 data bits, and 1 stop bit. These instructions are by no means complete; ie: variables haven't been declared, etc. <br>
<br>
<br>
<br>
idComDev = OpenComm("COM1", 1024, 128);<br>
if (idComDev < 0) {<br>
ShowError(idComDev, "OpenComm"

;<br>
return 0;<br>
}<br>
<br>
err = BuildCommDCB("COM1:9600,n,8,1", &dcb);<br>
if (err < 0) {<br>
ShowError(err, "BuildCommDCB"

;<br>
return 0;<br>
}<br>
<br>
err = SetCommState(&dcb);<br>
if (err < 0) {<br>
ShowError(err, "SetCommState"

;<br>
return 0;<br>
}<br>
<br>
Let me know if you need more detailed info.<br>