* PROJECT: ReactOS Local Spooler
* LICENSE: GNU LGPL v2.1 or any later version as published by the Free Software Foundation
* PURPOSE: Functions related to Ports of the Print Monitors
- * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
+ * COPYRIGHT: Copyright 2015-2017 Colin Finck <colin@reactos.org>
*/
#include "precomp.h"
if (!pPortInfo1)
{
dwErrorCode = ERROR_NOT_ENOUGH_MEMORY;
- ERR("DllAllocSplMem failed with error %lu!\n", GetLastError());
+ ERR("DllAllocSplMem failed!\n");
goto Cleanup;
}
if (!pPort)
{
dwErrorCode = ERROR_NOT_ENOUGH_MEMORY;
- ERR("DllAllocSplMem failed with error %lu!\n", GetLastError());
+ ERR("DllAllocSplMem failed!\n");
goto Cleanup;
}
pPrintMonitor = CONTAINING_RECORD(pEntry, LOCAL_PRINT_MONITOR, Entry);
// Call the EnumPorts function of this Print Monitor.
+ cbNeeded = 0;
+ dwReturned = 0;
+
if (pPrintMonitor->bIsLevel2)
bReturnValue = ((PMONITOR2)pPrintMonitor->pMonitor)->pfnEnumPorts(pPrintMonitor->hMonitor, pName, Level, pCallBuffer, cbCallBuffer, &cbNeeded, &dwReturned);
else