SetPrinterPort method
SetPrinterPort(port$)
SetPrinterPort
The SetPrinterPort(name) method is specific to Windows CE based devices. It allows a specific serial or parallel port to be selected for print output (KClient printing under CE simply writes raw data to a port). The port name is in the format LPTn: for a parallel port and COMn: for a serial port. In the case of a serial port the name can also include specifiers to control baud rate etc.
The format is SetPrinterPort("port:[baudrate][,bits/char][,parity][,stop bits][,flow control]"). If optional specifiers are not provided the default settings string is "COMn:9600,8,N,1,N"
Possible values are given in the following table
Option | Possible Values | Default Value |
---|---|---|
baudrate | Any Supported | 9600 |
bits/char | 7, 8 | 8 |
parity | [E]ven, [O]dd, [M]ark, [N]one | N |
stop bits | 1, 1.5, 2 | 1 |
flow control | [N]one, [X]on/Xoff, [H]ardware, [B]oth | N |
Client.SetPrinterPort("COM2:9600,8,N,1,H") $OPEN /204 SELECT PRINT /204 PRINT "Hello" SELECT PRINT /005 $CLOSE /204