Important: The information in this document is obsolete and should not be used for new development.
PrValidate
When you have aTPrint
record, whether an existing one from the current document or a new one you have just created, you can use thePrValidate
function to ensure that the contents of the specifiedTPrint
record are compatible with the current version of the printer driver for the current printer.
FUNCTION PrValidate (hPrint: THPrint): Boolean;
hPrint
- A handle to a
TPrint
record, which may be a new record or an existing one from a document.DESCRIPTION
If theTPrint
record is valid, thePrValidate
function returnsFALSE
, meaning there is no change. If the record is invalid, the function returnsTRUE
and the Printing Manager adjusts the record with the default values stored in the printer resource file for the current printer.The
PrValidate
function also makes sure that all the information in theTPrint
record is internally self-consistent and updates theTPrint
record as necessary. These changes do not affect the function's Boolean result.If you have just created a
TPrint
record by using thePrintDefault
procedure, you do not need to callPrValidate
. ThePrintDefault
procedure does this automatically.SPECIAL CONSIDERATIONS
You should never callPrValidate
between the pages of a document. This restriction holds as well for thePrStlDialog
andPrJobDialog
functions (described on page 9-58 and page 9-59, respectively) and thePrintDefault
procedure (described on page 9-56), which callPrValidate
.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for thePrValidate
function are
Trap macro Selector _PrGlue $52040498 SEE ALSO
For examples of the use ofPrValidate
, see Listing 9-1 on page 9-15 and Listing 9-2 on page 9-18.