2.2.2.9.3 _PRINTER_INFO_2

The _PRINTER_INFO_2 structure specifies printer information. It is a custom-marshaled form of the _PRINTER_INFO_2 (section 2.2.1.10.3) 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

ServerNameOffset

PrinterNameOffset

ShareNameOffset

PortNameOffset

DriverNameOffset

CommentOffset

LocationOffset

DevModeOffset

SepFileOffset

PrintProcessorOffset

DatatypeOffset

ParametersOffset

SecurityDescriptorOffset

Attributes

Priority

DefaultPriority

StartTime

UntilTime

Status

cJobs

AveragePPM

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

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

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

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.

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

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

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

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

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

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

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

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

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

Attributes (4 bytes): Specifies printer attributes. It is the result of a bitwise OR of zero or more printer attribute values (section 2.2.3.12).

Priority (4 bytes): Specifies information about job priority as a decimal number from 0 through 99, inclusive.

DefaultPriority (4 bytes): Specifies the default priority value assigned to each print job. The value of this member MUST be from 0 through 99, inclusive.

StartTime (4 bytes): Specifies the earliest time that a job can be printed. The time is expressed as the number of minutes after 12:00 AM GMT within a 24-hour boundary.

UntilTime (4 bytes): Specifies the latest time that a job can be printed. The time is expressed as the number of minutes after 12:00 AM GMT within a 24-hour boundary.

cJobs (4 bytes): The number of jobs that are currently in the print queue.

AveragePPM (4 bytes): Specifies the average pages per minute that have been printed on the printer.

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

SecurityDescriptorArray (variable)

...

ParametersArray (variable)

...

DatatypeArray (variable)

...

PrintProcessorArray (variable)

...

SepFileArray (variable)

...

DevModeArray (variable)

...

LocationArray (variable)

...

CommentArray (variable)

...

DriverNameArray (variable)

...

PortNameArray (variable)

...

ShareNameArray (variable)

...

PrinterNameArray (variable)

...

ServerNameArray (variable)

...

SecurityDescriptorArray (variable): A SECURITY_DESCRIPTOR structure that specifies the security information of the printer. The location of this buffer is determined by the value of the SecurityDescriptorOffset member.

ParametersArray (variable): A string that specifies the printer’s parameters. The location of this buffer is determined by the value of the ParametersOffset member.

DatatypeArray (variable): A string that specifies the datatype of the printer. The location of this buffer is determined by the value of the Datatype member.

PrintProcessorArray (variable): A string that specifies the name of the print processor. The location of this buffer is determined by the value of the PrintProcesorOffset member.

SepFileArray (variable): A string that specifies the name of the separator file. The location of this buffer is determined by the value of the SepFileOffset member.

DevModeArray (variable): A DevMode structure that specifies the printer’s DevMode information. The location of this buffer is determined by the value of the DevModeOffset member.

LocationArray (variable): A string that specifies the location of the printer. The location of this buffer is determined by the value of the LocationOffset member.

CommentArray (variable): A string that specifies a comment associated with the printer. The location of this buffer is determined by the value of the CommentOffset member.

DriverNameArray (variable): A string that specifies the name of the driver. The location of this buffer is determined by the value of the DriverNameOffset 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.

ShareNameArray (variable): A string that specifies the share name of the printer. The location of this buffer is determined by the value of the ShareNameOffset member.

PrinterNameArray (variable): A string that specifies the name of the printer. The location of this buffer is determined by the value of the PrinterNameOffset member.

ServerNameArray (variable): A string that specifies the name of the server. The location of this buffer is determined by the value of the ServerNameOffser member.