Having trouble with serial ports lazarus / 34-Windows ---------------------------------------------------------------------- zogtrog · 2013-11-15 03:44 Hi,      I am using syanasers TBlockSerial to open a serial port with lazarus on win xp 32 bits. The strange thing is that the port won't open until I open and close the port using another program such as hyperterminal. After I open and close the port using hyperterminal everything works.  The problem reappears if the computer hiberates or my usb to serial converter is unplugged. My original vb6 program and hyperterminal program are unaffected by these actions.  I have examined the TDCB structure within lazarus and it appears to be an old version of the structure and does not correspond with the one given within the current windows api.  I am trying to port an old VB6 program to lazarus on windows and then recompile this program under linux I also tried to find where TDCB was defined and I couldn't locate it. Jack Taylor aka zog ---------------------------------------------------------------------- bambamns · 2013-11-15 04:02 Try with 5dpo http://wiki.freepascal.org/5dpo - I use it and it works ---------------------------------------------------------------------- avra · 2013-11-15 09:26 Maybe this might be related to your problem: http://forum.lazarus.freepascal.org/index.php/topic,21552.msg126248.ht ml#msg126248 http://forum.lazarus.freepascal.org/index.php/topic,20201.msg116294.ht ml#msg116294 For serial port alternative take a look here: http://forum.lazarus.freepascal.org/index.php/topic,20481.0.html There are things that might be useful to you in converting VB6 code: http://forum.lazarus.freepascal.org/index.php/topic,12763.msg66330.htm l#msg66330 Not fully automated tools, but big time savers. ---------------------------------------------------------------------- zogtrog · 2013-11-15 11:36 Thanks bambamns I replaced TBlockSerial with TsdpoSerial and it works now! Tsdposerial has a very simple interface compared to TBlockSerial which it wraps making it a doddle to program with compared to TBlockSerial.  Thanks a million for informing me about this component.