// winppi.h
BOOL GdiGetDevmodeForPage(
HANDLE SpoolFileHandle,
DWORD dwPageNumber,
PDEVMODEW *pCurrDM,
PDEVMODEW *pLastDM
);
View the official Windows Driver Kit DDI referenceNo description available.
The GdiGetDevmodeForPage function returns DEVMODEW structures for the specified and previous pages of a print job.
SpoolFileHandleCaller-supplied spool file handle, obtained by a previous call to GdiGetSpoolFileHandle.
dwPageNumberCaller-supplied number of the page for which DEVMODEW contents are to be returned.
pCurrDMCaller-supplied location to receive a pointer to a DEVMODE structure for the page specified by dwPageNumber.
pLastDMCaller-supplied location to receive a pointer to a DEVMODE structure for the page previous to the one specified by dwPageNumber.
If the operation succeeds, the function returns TRUE. Otherwise it returns FALSE.
The GdiGetDevmodeForPage function is exported by gdi32.dll for use within a print processor's PrintDocumentOnPrintProcessor function.
Before calling GdiPlayPageEMF to execute a page's EMF instructions, a print processor must call GdiGetDevmodeForPage to determine if the DEVMODE structure associated with the page to be printed is the same as that of the last page printed. If the two returned DEVMODE structures are not identical, the print processor must perform the following steps, in order, before calling GdiPlayPageEMF for the page:
For additional information, see Using GDI Functions in Print Processors.