GdiGetDC function

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

Syntax


HDC GdiGetDC(
   HANDLE SpoolFileHandle
);

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.

Requirements

Target platform

Universal

Header

Winppi.h (include Winppi.h)

Library

Gdi32.Lib

DLL

Gdi32.dll

 

 

Send comments about this topic to Microsoft

Show: