{
DOC_INFO_1 DocInfo;
static int first;
+ DWORD error = 0;
closeprinter ();
if (!currprefs.prtname[0])
DocInfo.pDatatype = (currprefs.parallel_matrix_emulation || currprefs.parallel_postscript_detection) ? _T("TEXT") : _T("RAW");
// Inform the spooler the document is beginning.
if ((dwJob = StartDocPrinter (hPrt, 1, (LPBYTE)&DocInfo)) == 0) {
+ error = GetLastError();
ClosePrinter (hPrt );
hPrt = INVALID_HANDLE_VALUE;
} else if (StartPagePrinter (hPrt)) {
if (hPrt != INVALID_HANDLE_VALUE) {
write_log (_T("PRINTER: Opening printer \"%s\" with handle 0x%x.\n"), currprefs.prtname, hPrt);
} else if (*currprefs.prtname) {
- write_log (_T("PRINTER: ERROR - Couldn't open printer \"%s\" for output.\n"), currprefs.prtname);
+ write_log (_T("PRINTER: ERROR - Couldn't open printer \"%s\" for output. Error %08x\n"), currprefs.prtname, error);
}
}