Flushing device output buffers without closing handles
Posted: Mon Jan 10, 2005 9:03 pm
Hello,
I am writing data to a dot matrix printer on lpt1 using open for output / close statements. I have found that the data is not actually sent to the printer until either the port is closed or some buffer behind the scenes fills up.
I realize I can simply close the port and reopen it whenever I want to flush the contents of whatever buffer is holding my data, but is there a more elegant way to flush the data? I found some DOS interrupts that look like they are supposed to work, but apparently (from minimal messing around with them) they only work for files and not physical ports. Thanks for your help.
Jeremy Rosenberg
blandestvertigo@yahoo.com
I am writing data to a dot matrix printer on lpt1 using open for output / close statements. I have found that the data is not actually sent to the printer until either the port is closed or some buffer behind the scenes fills up.
I realize I can simply close the port and reopen it whenever I want to flush the contents of whatever buffer is holding my data, but is there a more elegant way to flush the data? I found some DOS interrupts that look like they are supposed to work, but apparently (from minimal messing around with them) they only work for files and not physical ports. Thanks for your help.
Jeremy Rosenberg
blandestvertigo@yahoo.com