Posted on 1999-07-22
I admit I am new to programming comms - but this isn't exactly rocket science!
I have been given this gizmo to communicate with which should be straightforward (It comes with a DOS program which needs to be rewritten in Win32). I am running Win95, VB5 (SP3).
I have 2 comm ports on the PC with this gizmo plugged into com1 I find that the the command "mscomm.portopen = true" gives me an error claiming "port is already open" (Err 8005) yet when I write to it it says "operation only valid when port is open" (Err 8018). If I break the program and look at the value then sure enough mscomm.portopen IS false!!
If I change the mscomm.commport to com2 then there is no such problem... ie. port starts off closed, then it is opened, then it is written to.
I want to keep it in com1 for now - and at least offer a choice. But the DOS program I am converting is hardcoded to com1.