Partager via


2.2.2.8.2 _PORT_INFO_2

The _PORT_INFO_2 structure specifies information about a printer port. It is a custom-marshaled form of the _PORT_INFO_2 (section 2.2.1.9.2) structure.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Fixed_Portion (variable)

...

Variable_Data (variable)

...

Fixed_Portion (variable): An array of one or more groups of fixed-size fields, which are defined as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

PortNameOffset

MonitorNameOffset

DescriptionOffset

fPortType

Reserved

PortNameOffset (4 bytes): An unsigned integer that specifies the number of bytes from the start of the structure to the start of the PortNameArray member.

MonitorNameOffset (4 bytes): An unsigned integer that specifies the number of bytes from the start of the structure to the start of the MonitorNameArray member.

DescriptionOffset (4 bytes): An unsigned integer that specifies the number of bytes from the start of the structure to the start of the DescriptionArray member.

fPortType (4 bytes): A bit field that specifies attributes of the printer port. These flags can be combined to specify multiple attributes. See section 2.2.1.9.2 for the flag values.

Reserved (4 bytes): This member is reserved for future use. The value of this member SHOULD be set to zero when sent and MUST be ignored on receipt.

Variable_Data (variable): An array of zero or more groups of optional, variable-size fields, which are defined as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

DescriptionArray (variable)

...

MonitorNameArray (variable)

...

PortNameArray (variable)

...

DescriptionArray (variable): A string that specifies the port description. The location of this buffer is determined by the value of the DescriptionOffset member.

MonitorNameArray (variable): A string that specifies the monitor’s name. The location of this buffer is determined by the value of the MonitorNameOffset member.

PortNameArray (variable): A string that specifies the name of the port. The location of this buffer is determined by the value of the PortNameOffset member.