StartDocPrinter


DWORD StartDocPrinter(
  HANDLE hPrinter,  /* handle of printer object           */
  DWORD dwLevel,    /* structure level                    */
  LPBYTE lpbDocInfo     /* address of structure               */
);

Informs the print spooler that a document is to be spooled for printing.

hPrinter

Identifies the printer.

dwLevel

Specifies the version of the structure to which lpbDocInfo points. This value must be 1 or 2.

lpbDocInfo

Points to a DOC_INFO_1 structure.


The printer handle hPrinter is obtained by calling the OpenPrinter function.

Although the value of the dwLevel parameter may be 1 or 2, the DOC_INFO_1 structure is always used. The members of that structure are all this function needs.

The return value will never be greater than ((2^ 31) - 1).