int StartDoc(hdc, lpdi) | |||||
HDC hdc; | /* handle of device context | */ | |||
LPDOCINFO lpdi; | /* pointer to DOCINFO structure | */ |
The StartDoc function starts a print job. This function replaces the STARTDOC printer escape.
hdc
Identifies the device context for the print job.
lpdi
Points to a DOCINFO structure containing the name of the document file and the name of the output file. The DOCINFO structure has the following form:
typedef struct { /* di */
int cbSize;
PSTR lpszDocName;
PSTR pszOutput;
} DOCINFO;
The return value is positive if the function is successful. Otherwise, it is SP_ERROR. Use the GetLastError function to obtain extended error information.
Applications should call the StartDoc function immediately before beginning a print job. Using this function ensures that documents containing more than one page are not interspersed with other print jobs.
EndDoc, Escape