LinePrinter.Open (string, int) Method

Opens the communications connection between the mobile computer and the printer. Use this method if the Port Type specified in the configuration file is WIFI or SOCKET.

Syntax

[Visual Basic]
Public Function Open( portString As string, newPort as int ) As void
[C#]
public void Open( string portString, int newPort );

Parameters

portString
If the Port Type specified in the configuration file is WIFI, this value replaces ADDRESS in the configuration file.

If the Port Type specified in the configuration file is SOCKET, this value can be any of the following:

newPort
If the Port Type specified in the configuration file is WIFI, this value replaces IPPORT as specified in the configuration file. Many Wi-Fi printers use either port 515 or 9100 by default.

If the Port Type specified in the configuration file is SOCKET, this value can be any of the following:

Return Values

Void.

Remarks

Actions taken during Open include:

The portString and newPort parameters replace the network address and port specified in the configuration file, allowing easier programmatic determination of the network printer target. This method may be used only for Wi-Fi communications.

Exceptions

LinePrinterException

More Information

LinePrinter Class