Important: The information in this document is obsolete and should not be used for new development.
PrOpenDocfunction to initialize a printing graphics port for use in printing a document.
FUNCTION PrOpenDoc (hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: Ptr): TPPrPort;
- A handle to a
TPrintrecord (described on page 9-41), which may be a new record or an existing one from a document. You should call the
PrintDefaultprocedure (described on page 9-56) or the
PrValidatefunction (described on page 9-57) for this
TPrintrecord before calling
- A pointer to a printing graphics port. If you set this parameter to
PrOpenDocallocates a new printing graphics port in the heap.
- A pointer to an area of memory to be used as an input and output buffer. If you set this parameter to
PrOpenDocuses the volume buffer for the deferred spool file's volume. If you allocate your own buffer, it must be exactly 522 bytes.
PrOpenDocfunction initializes and returns a pointer to a printing graphics port for use in printing a document. (The
TPrPortrecord that defines a printing graphics port is described on page 9-48.) The
PrOpenDocfunction also sets the current graphics port to the printing graphics port.
Because both the printing graphics port and input and output buffer are nonrelocatable objects, you may want to allocate them yourself using the
pIOBufparameters (to avoid fragmenting the heap).
SPECIAL CONSIDERATIONSYou must balance a call to
PrOpenDocwith a call to the
PrCloseDocprocedure, which is described in the next section.
ASSEMBLY-LANGUAGE INFORMATIONThe trap macro and routine selector for the
Trap macro Selector _PrGlue $04000C00
SEE ALSOFor an example of the use of
PrOpenDoc, see Listing 9-2 beginning on page 9-18. For a description of the
PrintDefaultprocedure, see page 9-57 and page 9-56, respectively.