Поделиться через


StartDoc (Compact 2013)

3/28/2014

This function starts a print job.

Syntax

int StartDoc( 
  HDC hdc, 
  CONST DOCINFO* lpdi
);

Parameters

  • hdc
    [in] Handle to the device context (DC) for the print job.
  • lpdi
    [in] Long pointer to a DOCINFO structure that contains the name of the document file and the name of the output file.

Return Value

A value greater than zero indicates success. This value is the print job identifier for the document. A value less than or equal to zero indicates failure. To get extended error information, call GetLastError.

Remarks

Applications should call this function immediately before beginning a print job. Using this function ensures that multipage documents are not interspersed with other print jobs.

Printing to files is not supported, and the lpszOutputmember of the DOCINFO structure is ignored.

Requirements

Header

wingdi.h

Library

Mgprint.lib

See Also

Reference

Printing Functions
EndDoc
StartPage
DOCINFO