The entry point to LPTPort properties and methods.
Returns the number of bytes written in the previous Write operation.
object.BytesWritten
Long.
Read-only.
This example returns the number of bytes written in the previous Write operation.
Set Lpt=createobject ("UCX:LPTPort")
Lpt.port = LPT1
Lpt.open()
if(Lpt.Ready) then
Lpt.Write("Once again, NetWare leads the way")
print(Lpt.BytesWritten)
endif
Lpt.Close()
Sets or returns the port number of the printer.
object.Port[=Number As Integer]
Integer.
Read/write.
Number is an optional parameter that sets the printer's port number.
The Example returns the prot number of the printer.
Determines whether or not the LPT port is ready.
object.Ready
Boolean.
Read-only.
The Example returns TRUE if LPT1 is ready; otherwise, FALSE.
Closes a parallel port.
object.Close()
None.
Boolean. Returns TRUE if the Close operation is successful; otherwise, FALSE.
This property closes the parallel port that was opened by the Open method. If Close is not called, the object destructor will close the parallel port.
The Example closes the parallel port LPT1.
Opens the parallel port specified by the Port property.
object.Open()
None.
Boolean. Returns TRUE if the Open operation is successful; otherwise, FALSE.
The port number is specified by the Port property. When the data transfer is finished, the Close method must be issued to properly close the parallel port. The port number cannot be changed in between.
The Example opens the parallel port LPT1.
Writes to a parallel port.
object.Write(
Data As String)
Boolean. Returns TRUE if the Write operation is successful; otherwise, FALSE.
This property writes to the parallel port that was opened by the Open method.
The Example writes the data "Once again, NetWare leads the way" to parallel port LPT1.