From: Luis Lavena Date: 2006-04-19T23:13:23+09:00 Subject: Re: Win32 Serial Communications, maybe using mscomm.ocx John Johnson wrote: > Luis, > > Thanks for the suggestions! > > The printer can user DTR or XOn/XOff. The ruby-serialport package > doesn't support DTR on Windows, and the XOn/XOff doesn't seem to work. > The symptom is, when I send labels without a sleep(3.5) between each, > it prints the first few, the buffer fills, several labels are dropped, > and it continues printing, the cycle repeats. > > I'll look into FreeBasic. I had downloaded it, but never got around to > looking into it. If I could write a DLL or spooler program with it, > that would be great. > > Thanks again! > > Regards, > JJ So you're using control lines then... we managed to create a spooler, but for a null-modem (tx-rx only) serial printer. At which speed are you working? at 19200 we: Send the command (39 bytes), wait 30ms (the lowest is 15ms, windows timer resolution) and get the answer (other 39 bytes). In our spooler, we don't need ot feed the answers to the program, so our spooler is a linked list of commands and a thread that pop these messages and perform the actions... Sound complicated, but in your ruby side you have Spooler::PushMessage(msg) and the dll do everything for you. Please mail me, I'll glad to help you with freebasic (it also have a nice and colaborative community). Regards, Luis -- Posted via http://www.ruby-forum.com/.