13 const DWORD cchMaxJobIdDigits = 5;
14 const WCHAR wszJobAppendix[] =
L", Job ";
16 const WCHAR wszPortAppendix[] =
L", Port";
28 TRACE(
"PrintingThreadProc(%p)\n", pJob);
37 ERR(
"DllAllocSplMem failed!\n");
42 CopyMemory(&pwszPrinterPort[cchPortName], wszPortAppendix,
sizeof(wszPortAppendix));
63 ERR(
"OpenPrintProcessor failed with error %lu!\n", dwErrorCode);
72 pwszPrinterAndJob =
DllAllocSplMem((cchPrinterName + cchJobAppendix + cchMaxJobIdDigits + 1) *
sizeof(
WCHAR));
73 if (!pwszPrinterAndJob)
76 ERR(
"DllAllocSplMem failed!\n");
81 CopyMemory(&pwszPrinterAndJob[cchPrinterName], wszJobAppendix, cchJobAppendix *
sizeof(
WCHAR));
82 _ultow(OpenData.
JobId, &pwszPrinterAndJob[cchPrinterName + cchJobAppendix], 10);
92 ERR(
"PrintDocumentOnPrintProcessor failed with error %lu!\n", dwErrorCode);
98 hPrintProcessor =
NULL;
105 ERR(
"DllAllocSplMem failed!\n");
122 if (pwszPrinterAndJob)
#define ERROR_NOT_ENOUGH_MEMORY
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
_ACRTIMP wchar_t *__cdecl _ultow(__msvcrt_ulong, wchar_t *, int)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
static const WCHAR Cleanup[]
DWORD WINAPI PrintingThreadProc(PLOCAL_JOB pJob)
DWORD GetJobFilePath(PCWSTR pwszExtension, DWORD dwJobID, PWSTR pwszOutput)
PLOCAL_PRINT_PROCESSOR pPrintProcessor
PWSTR pwszPrintProcessorParameters
PLOCAL_JOB pNextJobToProcess
PPrintDocumentOnPrintProcessor pfnPrintDocumentOnPrintProcessor
PClosePrintProcessor pfnClosePrintProcessor
POpenPrintProcessor pfnOpenPrintProcessor
BOOL WINAPI DllFreeSplMem(PVOID pMem)
PVOID WINAPI DllAllocSplMem(DWORD dwBytes)
DWORD WINAPI GetLastError(void)
#define JOB_STATUS_PRINTING