Iasphelp::get_PageRateUnit method
The PageRateUnit enables an ASP Web page to determine the units in which the page rate is expressed.
Syntax
HRESULT get_PageRateUnit(
[out] long *pVal
);
Parameters
pVal [out]
A caller-supplied pointer to a memory location that receives a value that indicates the units used in the page rate. The four possible values are shown in the following table.
Value | Meaning |
---|---|
1 | Print rate units are pages per minute. |
2 | Print rate units are characters per second. |
3 | Print rate units are lines per minute. |
4 | Print rate units are inches per minute. |
These values correspond to the constants PRINTRATEUNIT_PPM, PRINTRATEUNIT_CPS, PRINTRATEUNIT_LPM, and PRINTRATEUNIT_IPM, which are defined in the Wingdi.h header file. For more information about these constants, see the description of the DeviceCapabilities function in the Windows SDK documentation.
Return value
This property returns one of the values in the following table.
Return code | Description |
---|---|
S_OK | The operation succeeded. |
E_HANDLE | The Iasphelp::Open method has not been called. |
E_OUTOFMEMORY | Out of memory. |
VBScript Example
Query this property to determine the units in which the Iasphelp::PageRate property value is expressed.
The Iasphelp::Open method must be called before the Iasphelp::PageRateUnit property can be queried.
Dim objPrinter, PtrPageRateUnit
strPrinter = Session("MS_printer")
Set objPrinter = Server.CreateObject ("OlePrn.AspHelp")
objPrinter.Open strPrinter
PtrPageRate = objPrinter.PageRateUnit
Requirements
Target platform: Desktop