Description This command is used to get the extents of the media inserted in the physical device. The input parameter specifies the base unit and fractions in which the media extent values will be returned. If no media is present, the device waits for the period of time specified by the dwTimeOut parameter in the WFSExecute call for media to be inserted.
Input Param LPWFSPTRMEDIAUNIT lpMediaUnit;
typedef struct _wfs_ptr_media_unit
{
WORD wBase;
WORD wUnitX;
WORD wUnitY;
} WFSPTRMEDIAUNIT, * LPWFSPTRMEDIAUNIT;
wBase
Specifies the base unit of measurement of the media 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.
Output Param LPWFSPTRMEDIAEXT lpMediaExt;
typedef struct _wfs_ptr_media_ext
{
ULONG ulSizeX;
ULONG ulSizeY;
} WFSPTRMEDIAEXT, * LPWFSPTRMEDIAEXT;
ulSizeX
Specifies the width of the media in terms of the base horizontal resolution.
ulSizeY
Specifies the height of the media in terms of the base vertical resolution.
Error Codes The following additional error codes can be generated by this command:
Value Meaning
WFS_ERR_PTR_EXTENTNOTSUPPORTED The device cannot report extent(s).
Events The following additional events can be generated by this command:
Value Meaning
WFS_EXEE_PTR_NOMEDIA No media is present in the device.
WFS_EXEE_PTR_MEDIAINSERTED Media has been inserted into the device.
Comments None.