The StartDocPrinter function informs the print spooler that a document is to be spooled for printing.
DWORD StartDocPrinter(
HANDLE hPrinter, // handle to printer object
DWORD Level, // structure level
LPBYTE pDocInfo // address of structure
);
Windows NT: This value must be 1.
Windows 95: This value can be 1 or 2.
Windows NT: pDocInfo is a pointer to a DOC_INFO_1 structure.
Windows 95: pDocInfo is a pointer to a DOC_INFO_1 or a DOC_INFO_2 structure.
If the function succeeds, the return value identifies the print job.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The printer handle identified by the hPrinter parameter is obtained by calling the OpenPrinter function.
The return value will never be greater than 2^31 – 1.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winspool.h.
Import Library: Use winspool.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Printing and Print Spooler Overview, Printing and Print Spooler Functions, DOC_INFO_1, DOC_INFO_2, OpenPrinter