FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Serial Printer
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM

Serial Printer

Posted: Sun Feb 06, 2011 04:44 PM
Hi,

I am using the following code to print to a serial printer on the pocket pc (FWPPC) and was wondering if there are compatible commands for FWH ?

Code (fw): Select all Collapse
Local cPrnCom:="COM"+ALLTRIM(STR(nPrtCom))+":"
Local cStrip
hOut := CreateFile( cPrnCom,GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL )
IF hOut==-1
   MsgInfo("Error......")
ELSE
   cStrip := Time()+Space(3)+"SPO2 = " +PADL(alltrim(cSat),3," ")+space(3)+"HR = "+PADL(alltrim(cHR),3," ")
   FOR i = 1 TO Len( cStrip )
       WriteByte( hOut, Asc(SubStr( cStrip, i, 1 ) ) )
   NEXT
ENDIF
CloseHandle( hOut )
Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM

Re: Serial Printer

Posted: Sun Feb 06, 2011 10:09 PM

I figured it out. :D

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)

Continue the discussion