This method retrieves a list of ports
Parameters
Name | Explanation |
---|---|
PortNames | A string containing the retrieved port names |
Return Value
The number of retrieved ports
Explanation
The EnumPorts method retrieves a list of ports. If the return value is 1 or more, then list of retrieved port names will be set in the PortNames parameter.
The PortNames string will be returned as "xxxxx,xxxxx,xxxxx,¥¥¥¥¥¥¥¥," (delimited by commas and ends with a comma).
For scripting languages and other programs that require variant types, please refer to the EnumPortsVariant method.
Visual Basic.NET
Dim Ports As String = Nothing
Dim Nums As Integer
Nums = ImageKit1.PrintDraw.EnumPorts(Ports)
If Nums = 0 Then Exit Sub
' various programming code
..........
Visual C#.NET
string Ports = null;
int Nums = ImageKit1.PrintDraw.EnumPorts(ref Ports);
if (Nums == 0) return;
// various programming code
..........