struttura PORT_INFO_2

La struttura PORT_INFO_2 identifica una porta della stampante supportata.

Sintassi

typedef struct _PORT_INFO_2 {
  LPTSTR pPortName;
  LPTSTR pMonitorName;
  LPTSTR pDescription;
  DWORD  fPortType;
  DWORD  Reserved;
} PORT_INFO_2, *PPORT_INFO_2;

Members

pPortName

Puntatore a una stringa con terminazione Null che identifica una porta della stampante supportata ,ad esempio "LPT1:".

pMonitorName

Puntatore a una stringa con terminazione Null che identifica un monitor installato (ad esempio, "monitor PJL"). Può essere NULL.

pDescription

Puntatore a una stringa con terminazione Null che descrive più dettagliatamente la porta(ad esempio, se pPortName è "LPT1:", pDescription è "porta stampante"). Può essere NULL.

fPortType

Maschera di bit che descrive il tipo di porta. Questo membro può essere una combinazione dei valori seguenti:

PORT_TYPE_WRITE

PORT_TYPE_READ

PORT_TYPE_REDIRECTED

PORT_TYPE_NET_ATTACHED

Reserved

Riservati; deve essere zero.

Commenti

Usare la struttura PORT_INFO_2 quando si chiama EnumPorts se sono installati più monitor che supportano le stesse porte.

È possibile eseguire una query sul membro fPortType per determinare le informazioni sulla porta. Si noti che le impostazioni della porta non influiscono sugli attributi della stampante (come restituito dal membro Attributes di PRINTER_INFO_2).

Requisiti

Requisito Valore
Client minimo supportato
Windows 2000 Professional [solo app desktop]
Server minimo supportato
Windows 2000 Server [solo app desktop]
Intestazione
Winspool.h (include Windows.h)
Nomi Unicode e ANSI
_PORT_INFO_2W (Unicode) e _PORT_INFO_2A (ANSI)

Vedi anche

Stampa

Stampare le strutture dell'API Spooler

EnumPorts