6.6 WFS_INF_PTR_QUERY_MEDIA

Description This command is used to retrieve details of the definition of a specified media.

Input Param LPSTR lpszMediaName;

lpszMediaName
Pointer to the null-terminated media name about which to retrieve details.

Output Param LPWFSFRMMEDIA lpMedia;

typedef struct _wfs_frm_media
{
WORD fwMediaType;
WORD wBase;
WORD wUnitX;
WORD wUnitY;
WORD wSizeWidth;
WORD wSizeHeight;
WORD wPageCount;
WORD wLineCount;
WORD wPrintAreaX;
WORD wPrintAreaY;
WORD wPrintAreaWidth;
WORD wPrintAreaHeight;
WORD wRestrictedAreaX;
WORD wRestrictedAreaY;
WORD wRestrictedAreaWidth;
WORD wRestrictedAreaHeight;
WORD wStagger;
WORD wFoldType;
} WFSFRMMEDIA, * LPWFSFRMMEDIA;

fwMediaType
Specifies the type of media as one of the following flags:

Value Meaning

WFS_FRM_MEDIAGENERIC Generic media, i.e., single sheet.

WFS_FRM_MEDIAMULTIPART Multipart media.

WFS_FRM_MEDIAPASSBOOK Passbook media.

wBase
Specifies the base unit of measurement of the form and can be one of the following:

Value Meaning

WFS_FRM_INCH The base unit is inches.

WFS_FRM_MM The base unit is millimeters.

WFS_FRM_ROWCOLUMN The base unit is rows and columns.

wUnitX
Specifies the horizontal resolution of the base units as a fraction of the wBase value. For example, a value of 16 applied to the base unit WFS_FRM_INCH means that the base horizontal resolution is 1/16".

wUnitY
Specifies the vertical resolution of the base units as a fraction of the wBase value. For example, a value of 10 applied to the base unit WFS_FRM_MM means that the base vertical resolution is 0.1 mm.

wSizeWidth
Specifies the width of the media in terms of the base horizontal resolution.

wSizeHeight
Specifies the height of the media in terms of the base vertical resolution.

wPageCount
Specifies the number of pages in a media of type WFS_FRM_MEDIAPASSBOOK.

wLineCount
Specifies the number of lines on a page for a media of type WFS_FRM_MEDIAPASSBOOK.

wPrintAreaX
Specifies the horizontal offset of the printable area relative to the top left corner of the media in terms of the base horizontal resolution.

wPrintAreaY
Specifies the vertical offset of the printable area relative to the top left corner of the media in terms of the base vertical resolution.

wPrintAreaWidth
Specifies the printable area width of the media in terms of the base horizontal resolution.

wPrintAreaHeight
Specifies the printable area height of the media in terms of the base vertical resolution.

wRestrictedAreaX
Specifies the horizontal offset of the restricted area relative to the top left corner of the media in terms of the base horizontal resolution.

wRestrictedAreaY
Specifies the vertical offset of the restricted area relative to the top left corner of the media in terms of the base vertical resolution.

wRestrictedAreaWidth
Specifies the restricted area width of the media in terms of the base horizontal resolution.

wRestrictedAreaHeight
Specifies the restricted area height of the media in terms of the base vertical resolution.

wStagger
Specifies the staggering from the top in terms of the base vertical resolution for a media of type WFS_FRM_MEDIAPASSBOOK.

wFoldType
Specified the type of fold (vertical, horizontal or none) for a media of type WFS_FRM_MEDIAPASSBOOK.

Value Meaning

WFS_FRM_FOLDNONE Passbook has no fold.

WFS_FRM_FOLDHORIZONTAL Passbook has a horizontal fold.

WFS_FRM_FOLDVERTICAL Passbook has a vertical fold.

Error Codes The following additional error codes can be generated by this command:

Value Meaning

WFS_ERR_PTR_MEDIANOTFOUND The specified media definition cannot be found.

WFS_ERR_PTR_MEDIAINVALID The specified media definition is invalid.

Comments None.