Partager via


2.2.2.5.2 _FORM_INFO_2

The _FORM_INFO_2 structure specifies printer media information.<117> It is a custom-marshaled form of the RPC_FORM_INFO_2 (section 2.2.1.6.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

Flags

NameOffset

Size.cx

Size.cy

ImageableArea.left

ImageableArea.top

ImageableArea.right

ImageableArea.bottom

KeywordOffset

StringType

MuiDllOffset

dwResourceId

DisplayNameOffset

wLangID

unused

Flags (4 bytes): The form property from the following table.

Name/value

Description

FORM_USER

0x00000000

The form has been defined by the user and appears in the registry.

FORM_BUILTIN

0x00000001

The form is part of the spooler and does not appear in the registry.

FORM_PRINTER

0x00000002

The form is associated with a particular printer and appears in the registry.

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

Size.cx (4 bytes): A long integer. The form's width in thousandths of millimeters using a SIZE structure, as specified in section 2.2.1.1.6.

Size.cy (4 bytes): A long integer. The form's height in thousandths of millimeters using a SIZE structure, as specified in section 2.2.1.1.6.

ImageableArea: The part of the form that the printer can print on as a rectangle in thousandths of millimeters using a RECTL structure, as specified in section 2.2.1.1.5.

ImageableArea.left (4 bytes): The x-coordinate of the upper-left corner of the rectangle relative to the top edge of the form.

ImageableArea.top (4 bytes): The y-coordinate of the upper-left corner of the rectangle relative to the top edge of the form.

ImageableArea.right (4 bytes): The x-coordinate of the lower-right corner of the rectangle relative to the left edge of the form.

ImageableArea.bottom (4 bytes): The y-coordinate of the lower-right corner of the rectangle relative to the top edge of the form.

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

StringType (4 bytes): A value that specifies how a form's display name is passed. The value of this member MUST be a value from the table in section 2.2.1.6.2.

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

dwResourceId (4 bytes): The value of this member SHOULD be set to zero when sent and ignored on receipt if the value of the StringType member is not equal to STRING_MUIDLL; otherwise, the value of this member specifies the string resource ID of the form name in the library that is identified by the string that is pointed to by the pMuiDll member.

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

wLangID (2 bytes): The value of this member SHOULD be set to zero when sent and ignored on receipt if StringType is not equal to STRING_LANGPAIR; otherwise, the value of this member MUST be the Language Identifier of the pDisplayName member [MS-LCID].

unused (2 bytes): A value that 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

NameArray (variable)

...

KeywordArray (variable)

...

MuiDllArray (variable)

...

DisplayNameArray (variable)

...

NameArray (variable): A string that specifies the data type used to record a print job. The location of this buffer is determined by the value of the NameOffset member. For rules governing data type names, see section 2.2.4.2.

KeywordArray (variable): A string that specifies the form’s unique keyword. The location of this buffer is determined by the value of the KeywordOffset member.

MuiDllArray (variable): A string that specifies the MUI resource DLL name of the form. The location of this buffer is determined by the value of the MuiDllOffset member. 

DisplayNameArray (variable): A string that specifies the localized form name. The location of this buffer is determined by the value of the DisplayNameOffset member.