GdiGetDC - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// winppi.h

HDC GdiGetDC(
  HANDLE SpoolFileHandle
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-winppi-gdigetdc)

GdiGetDC function

Description

The GdiGetDC function returns a handle to a printer's device context.

Parameters

SpoolFileHandle

Caller-supplied spool file handle, obtained by a previous call to GdiGetSpoolFileHandle.

Return value

If the operation succeeds, the function returns a device context handle. Otherwise the function returns NULL.

Remarks

The GdiGetDC function is exported by gdi32.dll for use within a print processor's PrintDocumentOnPrintProcessor function.

A print processor can call GdiGetDC to obtain a printer's device context handle anytime after calling GdiGetSpoolFileHandle. The print processor can use the context handle to call Win32 device context functions, in order to perform such operations as applying transformations on the print image.

For additional information, see Using GDI Functions in Print Processors.