pPrinter->pwszPrinterName = AllocSplStr(wszPrinterName);
pPrinter->pPrintProcessor = pPrintProcessor;
+ pPrinter->pPort = pPort;
InitializePrinterJobList(pPrinter);
// Get the printer driver.
if (cchFirstParameter)
{
// Yes, extract it.
+ // No null-termination is necessary here, because DllAllocSplMem returns a zero-initialized buffer.
pwszFirstParameter = DllAllocSplMem((cchFirstParameter + 1) * sizeof(WCHAR));
CopyMemory(pwszFirstParameter, lpPrinterName, cchFirstParameter * sizeof(WCHAR));
- pwszFirstParameter[cchFirstParameter] = 0;
}
// Do we have a second parameter?