Stalling execution of the Print Processor under Windows reveals that the status flag JOB_STATUS_PRINTING is only set right before calling PrintDocumentOnPrintProcessor.
svn path=/branches/colins-printing-for-freedom/; revision=68549
- // Switch from spooling to printing.
+ // Spooling is finished at this point.
pJob->dwStatus &= ~JOB_STATUS_SPOOLING;
pJob->dwStatus &= ~JOB_STATUS_SPOOLING;
- pJob->dwStatus |= JOB_STATUS_PRINTING;
// Write the job data into the shadow file.
wcscpy(wcsrchr(wszFullPath, L'.'), L".SHD");
// Write the job data into the shadow file.
wcscpy(wcsrchr(wszFullPath, L'.'), L".SHD");
CopyMemory(&pwszPrinterAndJob[cchPrinterName], wszJobAppendix, cchJobAppendix * sizeof(WCHAR));
_ultow(OpenData.JobId, &pwszPrinterAndJob[cchPrinterName + cchJobAppendix], 10);
CopyMemory(&pwszPrinterAndJob[cchPrinterName], wszJobAppendix, cchJobAppendix * sizeof(WCHAR));
_ultow(OpenData.JobId, &pwszPrinterAndJob[cchPrinterName + cchJobAppendix], 10);
+ // Printing starts here.
+ pJob->dwStatus |= JOB_STATUS_PRINTING;
+
// Print the document.
// Note that pJob is freed after this function, so we may not access it anymore.
if (!pPrintProcessor->pfnPrintDocumentOnPrintProcessor(hPrintProcessor, pwszPrinterAndJob))
// Print the document.
// Note that pJob is freed after this function, so we may not access it anymore.
if (!pPrintProcessor->pfnPrintDocumentOnPrintProcessor(hPrintProcessor, pwszPrinterAndJob))