PORT_INFO_2

The PORT_INFO_2 structure identifies a supported printer port.

typedef struct _PORT_INFO_2 { // pi2 
    LPSTR pPortName; 
    LPSTR pMonitorName 
    LPSTR pDescription; 
    DWORD fPortType; 
    DWORD Reserved; 
} PORT_INFO_2; 
 

Members

pPortName
Pointer to a null-terminated string that identifies a supported printer port (for example, "LPT1:").
pMonitorName
Pointer to a null-terminated string that identifies an installed monitor (for example, "PJL monitor").
pDescription
Pointer to a null-terminated string that describes the port in more detail (for example, if pPortName is "LPT1:", pDescription is "printer port").
fPortType
Handle to the type of port. Can be one of these values:
PORT_TYPE_WRITE
PORT_TYPE_READ
PORT_TYPE_REDIRECTED
PORT_TYPE_NET_ATTACHED

Reserved
Reserved; must be zero.

Remarks

Use the PORT_INFO_2 structure when calling EnumPorts if there are multiple monitors installed that support the same ports.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winspool.h.
  Unicode: Defined as Unicode and ANSI structures.

See Also

Printing and Print Spooler Overview, Printing and Print Spooler Structures, EnumPorts