This method retrieves a list of ports

[Visual Basic]   [ Long = ]imagekitcontrolname.PrintDraw.EnumPorts(PortNames As String)
[Visual C++]     [ long = ]imagekitcontrolname.GetPrintDraw().EnumPorts(BSTR *PortNames)
[VB.NET]   [ Integer = ]imagekitcontrolname.PrintDraw.EnumPorts(ByRef PortNames As String)
[C#.NET]   [ int = ]imagekitcontrolname.PrintDraw.EnumPorts(ref string PortNames)

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

    ..........

The ImageKit10 ActiveX is a product created by Newtone Corporation