https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1f6f08eca09a5071efe08…
commit 1f6f08eca09a5071efe08a7046fd4412737143e0
Author: Colin Finck <colin(a)reactos.org>
AuthorDate: Sat Dec 9 12:00:09 2017 +0100
[WINSPOOL] Add tracing to all exported APIs.
---
win32ss/printing/base/winspool/devmode.c | 6 +++-
win32ss/printing/base/winspool/jobs.c | 16 ++++++++-
win32ss/printing/base/winspool/main.c | 6 +++-
win32ss/printing/base/winspool/monitors.c | 6 +++-
win32ss/printing/base/winspool/ports.c | 7 +++-
win32ss/printing/base/winspool/printerdata.c | 13 +++++++
win32ss/printing/base/winspool/printerdrivers.c | 6 +++-
win32ss/printing/base/winspool/printers.c | 44 ++++++++++++++++++++++++
win32ss/printing/base/winspool/printprocessors.c | 11 ++++++
win32ss/printing/base/winspool/printproviders.c | 4 ++-
10 files changed, 112 insertions(+), 7 deletions(-)
diff --git a/win32ss/printing/base/winspool/devmode.c
b/win32ss/printing/base/winspool/devmode.c
index 231badc28c..b75932a313 100644
--- a/win32ss/printing/base/winspool/devmode.c
+++ b/win32ss/printing/base/winspool/devmode.c
@@ -2,7 +2,7 @@
* PROJECT: ReactOS Spooler API
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Functions giving information about DEVMODE structures
- * COPYRIGHT: Copyright 2016 Colin Finck (colin(a)reactos.org)
+ * COPYRIGHT: Copyright 2016-2017 Colin Finck (colin(a)reactos.org)
*/
#include "precomp.h"
@@ -136,6 +136,8 @@ IsValidDevmodeA(PDEVMODEA pDevmode, size_t DevmodeSize)
PMINIMUM_SIZE_TABLE pTable = MinimumSizeA;
WORD wRequiredSize;
+ TRACE("IsValidDevmodeA(%p, %lu)\n", pDevmode, DevmodeSize);
+
// Check if a Devmode was given at all.
if (!pDevmode)
goto Failure;
@@ -186,6 +188,8 @@ IsValidDevmodeW(PDEVMODEW pDevmode, size_t DevmodeSize)
PMINIMUM_SIZE_TABLE pTable = MinimumSizeW;
WORD wRequiredSize;
+ TRACE("IsValidDevmodeW(%p, %lu)\n", pDevmode, DevmodeSize);
+
// Check if a Devmode was given at all.
if (!pDevmode)
goto Failure;
diff --git a/win32ss/printing/base/winspool/jobs.c
b/win32ss/printing/base/winspool/jobs.c
index f8cb65a64f..7551a30b33 100644
--- a/win32ss/printing/base/winspool/jobs.c
+++ b/win32ss/printing/base/winspool/jobs.c
@@ -2,7 +2,7 @@
* PROJECT: ReactOS Spooler API
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Functions for managing print jobs
- * COPYRIGHT: Copyright 2015 Colin Finck (colin(a)reactos.org)
+ * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin(a)reactos.org)
*/
#include "precomp.h"
@@ -59,6 +59,7 @@ _MarshallUpJobInfo(PBYTE pJobInfo, DWORD Level)
BOOL WINAPI
AddJobA(HANDLE hPrinter, DWORD Level, PBYTE pData, DWORD cbBuf, PDWORD pcbNeeded)
{
+ TRACE("AddJobA(%p, %lu, %p, %lu, %p)\n", hPrinter, Level, pData, cbBuf,
pcbNeeded);
UNIMPLEMENTED;
return FALSE;
}
@@ -69,6 +70,8 @@ AddJobW(HANDLE hPrinter, DWORD Level, PBYTE pData, DWORD cbBuf, PDWORD
pcbNeeded
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("AddJobW(%p, %lu, %p, %lu, %p)\n", hPrinter, Level, pData, cbBuf,
pcbNeeded);
+
if (!pHandle)
{
dwErrorCode = ERROR_INVALID_HANDLE;
@@ -98,6 +101,7 @@ Cleanup:
BOOL WINAPI
EnumJobsA(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs, DWORD Level, PBYTE pJob, DWORD
cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
{
+ TRACE("EnumJobsA(%p, %lu, %lu, %lu, %p, %lu, %p, %p)\n", hPrinter,
FirstJob, NoJobs, Level, pJob, cbBuf, pcbNeeded, pcReturned);
UNIMPLEMENTED;
return FALSE;
}
@@ -110,6 +114,8 @@ EnumJobsW(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs, DWORD Level,
PBYTE pJob
PBYTE p = pJob;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("EnumJobsW(%p, %lu, %lu, %lu, %p, %lu, %p, %p)\n", hPrinter,
FirstJob, NoJobs, Level, pJob, cbBuf, pcbNeeded, pcReturned);
+
if (!pHandle)
{
dwErrorCode = ERROR_INVALID_HANDLE;
@@ -150,6 +156,7 @@ Cleanup:
BOOL WINAPI
GetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJob, DWORD cbBuf, PDWORD
pcbNeeded)
{
+ TRACE("GetJobA(%p, %lu, %lu, %p, %lu, %p)\n", hPrinter, JobId, Level, pJob,
cbBuf, pcbNeeded);
UNIMPLEMENTED;
return FALSE;
}
@@ -160,6 +167,8 @@ GetJobW(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJob, DWORD
cbBuf, PDWO
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("GetJobW(%p, %lu, %lu, %p, %lu, %p)\n", hPrinter, JobId, Level, pJob,
cbBuf, pcbNeeded);
+
if (!pHandle)
{
dwErrorCode = ERROR_INVALID_HANDLE;
@@ -195,6 +204,8 @@ ScheduleJob(HANDLE hPrinter, DWORD dwJobID)
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("ScheduleJob(%p, %lu)\n", hPrinter, dwJobID);
+
if (!pHandle)
{
dwErrorCode = ERROR_INVALID_HANDLE;
@@ -221,6 +232,7 @@ Cleanup:
BOOL WINAPI
SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo, DWORD Command)
{
+ TRACE("SetJobA(%p, %lu, %lu, %p, %lu)\n", hPrinter, JobId, Level, pJobInfo,
Command);
UNIMPLEMENTED;
return FALSE;
}
@@ -232,6 +244,8 @@ SetJobW(HANDLE hPrinter, DWORD JobId, DWORD Level, PBYTE pJobInfo,
DWORD Command
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
WINSPOOL_JOB_CONTAINER JobContainer;
+ TRACE("SetJobW(%p, %lu, %lu, %p, %lu)\n", hPrinter, JobId, Level, pJobInfo,
Command);
+
if (!pHandle)
{
dwErrorCode = ERROR_INVALID_HANDLE;
diff --git a/win32ss/printing/base/winspool/main.c
b/win32ss/printing/base/winspool/main.c
index 97e09d7009..c4f6f77ad1 100644
--- a/win32ss/printing/base/winspool/main.c
+++ b/win32ss/printing/base/winspool/main.c
@@ -2,7 +2,7 @@
* PROJECT: ReactOS Spooler API
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Main functions
- * COPYRIGHT: Copyright 2015 Colin Finck (colin(a)reactos.org)
+ * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin(a)reactos.org)
*/
#include "precomp.h"
@@ -72,6 +72,8 @@ midl_user_free(void __RPC_FAR* ptr)
BOOL WINAPI
DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
+ TRACE("DllMain(%p, %lu, %p)\n", hinstDLL, fdwReason, lpvReserved);
+
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
@@ -89,6 +91,8 @@ SpoolerInit(VOID)
BOOL bReturnValue = FALSE;
DWORD dwErrorCode;
+ TRACE("SpoolerInit()\n");
+
// Nothing to initialize here yet, but pass this call to the Spool Service as well.
RpcTryExcept
{
diff --git a/win32ss/printing/base/winspool/monitors.c
b/win32ss/printing/base/winspool/monitors.c
index 9d5f4af74f..a5b30fe7f5 100644
--- a/win32ss/printing/base/winspool/monitors.c
+++ b/win32ss/printing/base/winspool/monitors.c
@@ -2,7 +2,7 @@
* PROJECT: ReactOS Spooler API
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Functions related to Print Monitors
- * COPYRIGHT: Copyright 2015 Colin Finck (colin(a)reactos.org)
+ * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin(a)reactos.org)
*/
#include "precomp.h"
@@ -25,6 +25,7 @@ _MarshallUpMonitorInfo(PBYTE pMonitorInfo, DWORD Level)
BOOL WINAPI
AddMonitorW(PWSTR pName, DWORD Level, PBYTE pMonitors)
{
+ TRACE("AddMonitorW(%S, %lu, %p)\n", pName, Level, pMonitors);
UNIMPLEMENTED;
return FALSE;
}
@@ -32,6 +33,7 @@ AddMonitorW(PWSTR pName, DWORD Level, PBYTE pMonitors)
BOOL WINAPI
DeleteMonitorW(PWSTR pName, PWSTR pEnvironment, PWSTR pMonitorName)
{
+ TRACE("DeleteMonitorW(%S, %S, %S)\n", pName, pEnvironment, pMonitorName);
UNIMPLEMENTED;
return FALSE;
}
@@ -43,6 +45,8 @@ EnumMonitorsW(PWSTR pName, DWORD Level, PBYTE pMonitors, DWORD cbBuf,
PDWORD pcb
DWORD i;
PBYTE p = pMonitors;
+ TRACE("EnumMonitorsW(%S, %lu, %p, %lu, %p, %p)\n", pName, Level, pMonitors,
cbBuf, pcbNeeded, pcReturned);
+
// Do the RPC call
RpcTryExcept
{
diff --git a/win32ss/printing/base/winspool/ports.c
b/win32ss/printing/base/winspool/ports.c
index 6fc9d01680..4e8d020e84 100644
--- a/win32ss/printing/base/winspool/ports.c
+++ b/win32ss/printing/base/winspool/ports.c
@@ -2,7 +2,7 @@
* PROJECT: ReactOS Spooler API
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Functions related to Ports
- * COPYRIGHT: Copyright 2015 Colin Finck (colin(a)reactos.org)
+ * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin(a)reactos.org)
*/
#include "precomp.h"
@@ -25,6 +25,7 @@ _MarshallUpPortInfo(PBYTE pPortInfo, DWORD Level)
BOOL WINAPI
AddPortW(PWSTR pName, HWND hWnd, PWSTR pMonitorName)
{
+ TRACE("AddPortW(%S, %p, %S)\n", pName, hWnd, pMonitorName);
UNIMPLEMENTED;
return FALSE;
}
@@ -32,6 +33,7 @@ AddPortW(PWSTR pName, HWND hWnd, PWSTR pMonitorName)
BOOL WINAPI
ConfigurePortW(PWSTR pName, HWND hWnd, PWSTR pPortName)
{
+ TRACE("ConfigurePortW(%S, %p, %S)\n", pName, hWnd, pPortName);
UNIMPLEMENTED;
return FALSE;
}
@@ -39,6 +41,7 @@ ConfigurePortW(PWSTR pName, HWND hWnd, PWSTR pPortName)
BOOL WINAPI
DeletePortW(PWSTR pName, HWND hWnd, PWSTR pPortName)
{
+ TRACE("DeletePortW(%S, %p, %S)\n", pName, hWnd, pPortName);
UNIMPLEMENTED;
return FALSE;
}
@@ -50,6 +53,8 @@ EnumPortsW(PWSTR pName, DWORD Level, PBYTE pPorts, DWORD cbBuf, PDWORD
pcbNeeded
DWORD i;
PBYTE p = pPorts;
+ TRACE("EnumPortsW(%S, %lu, %p, %lu, %p, %p)\n", pName, Level, pPorts,
cbBuf, pcbNeeded, pcReturned);
+
// Do the RPC call
RpcTryExcept
{
diff --git a/win32ss/printing/base/winspool/printerdata.c
b/win32ss/printing/base/winspool/printerdata.c
index e368678736..8904bb74d3 100644
--- a/win32ss/printing/base/winspool/printerdata.c
+++ b/win32ss/printing/base/winspool/printerdata.c
@@ -10,6 +10,7 @@
LONG WINAPI
AdvancedDocumentPropertiesW(HWND hWnd, HANDLE hPrinter, PWSTR pDeviceName, PDEVMODEW
pDevModeOutput, PDEVMODEW pDevModeInput)
{
+ TRACE("AdvancedDocumentPropertiesW(%p, %p, %S, %p, %p)\n", hWnd, hPrinter,
pDeviceName, pDevModeOutput, pDevModeInput);
UNIMPLEMENTED;
return FALSE;
}
@@ -17,6 +18,7 @@ AdvancedDocumentPropertiesW(HWND hWnd, HANDLE hPrinter, PWSTR
pDeviceName, PDEVM
DWORD WINAPI
GetPrinterDataA(HANDLE hPrinter, LPSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD
nSize, LPDWORD pcbNeeded)
{
+ TRACE("GetPrinterDataA(%p, %s, %p, %p, %lu, %p)\n", hPrinter, pValueName,
pType, pData, nSize, pcbNeeded);
return GetPrinterDataExA(hPrinter, "PrinterDriverData", pValueName, pType,
pData, nSize, pcbNeeded);
}
@@ -33,6 +35,8 @@ GetPrinterDataExA(HANDLE hPrinter, LPCSTR pKeyName, LPCSTR pValueName,
LPDWORD p
PWSTR pwszKeyName = NULL;
PWSTR pwszValueName = NULL;
+ TRACE("GetPrinterDataExA(%p, %s, %s, %p, %p, %lu, %p)\n", hPrinter,
pKeyName, pValueName, pType, pData, nSize, pcbNeeded);
+
if (pKeyName)
{
// Convert pKeyName to a Unicode string pwszKeyName
@@ -191,6 +195,8 @@ GetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR
pValueName, LPDWORD
DWORD dwType = REG_NONE;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("GetPrinterDataExW(%p, %S, %S, %p, %p, %lu, %p)\n", hPrinter,
pKeyName, pValueName, pType, pData, nSize, pcbNeeded);
+
// Sanity checks
if (!pHandle)
return ERROR_INVALID_HANDLE;
@@ -223,12 +229,14 @@ GetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR
pValueName, LPDWORD
DWORD WINAPI
GetPrinterDataW(HANDLE hPrinter, LPWSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD
nSize, LPDWORD pcbNeeded)
{
+ TRACE("GetPrinterDataW(%p, %S, %p, %p, %lu, %p)\n", hPrinter, pValueName,
pType, pData, nSize, pcbNeeded);
return GetPrinterDataExW(hPrinter, L"PrinterDriverData", pValueName, pType,
pData, nSize, pcbNeeded);
}
DWORD WINAPI
SetPrinterDataA(HANDLE hPrinter, PSTR pValueName, DWORD Type, PBYTE pData, DWORD cbData)
{
+ TRACE("SetPrinterDataA(%p, %s, %lu, %p, %lu)\n", hPrinter, pValueName,
Type, pData, cbData);
return SetPrinterDataExA(hPrinter, "PrinterDriverData", pValueName, Type,
pData, cbData);
}
@@ -241,6 +249,8 @@ SetPrinterDataExA(HANDLE hPrinter, LPCSTR pKeyName, LPCSTR pValueName,
DWORD Typ
PWSTR pwszValueName = NULL;
PWSTR pUnicodeData = NULL;
+ TRACE("SetPrinterDataExA(%p, %s, %s, %lu, %p, %lu)\n", hPrinter, pKeyName,
pValueName, Type, pData, cbData);
+
if (pKeyName)
{
// Convert pKeyName to a Unicode string pwszKeyName
@@ -313,6 +323,8 @@ SetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR
pValueName, DWORD T
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("SetPrinterDataExW(%p, %S, %S, %lu, %p, %lu)\n", hPrinter, pKeyName,
pValueName, Type, pData, cbData);
+
// Sanity checks
if (!pHandle)
return ERROR_INVALID_HANDLE;
@@ -337,5 +349,6 @@ SetPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName, LPCWSTR
pValueName, DWORD T
DWORD WINAPI
SetPrinterDataW(HANDLE hPrinter, PWSTR pValueName, DWORD Type, PBYTE pData, DWORD
cbData)
{
+ TRACE("SetPrinterDataW(%p, %S, %lu, %p, %lu)\n", hPrinter, pValueName,
Type, pData, cbData);
return SetPrinterDataExW(hPrinter, L"PrinterDriverData", pValueName, Type,
pData, cbData);
}
diff --git a/win32ss/printing/base/winspool/printerdrivers.c
b/win32ss/printing/base/winspool/printerdrivers.c
index e68a5186b4..d35e804571 100644
--- a/win32ss/printing/base/winspool/printerdrivers.c
+++ b/win32ss/printing/base/winspool/printerdrivers.c
@@ -2,7 +2,7 @@
* PROJECT: ReactOS Spooler API
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Functions related to Printer Drivers
- * COPYRIGHT: Copyright 2015 Colin Finck (colin(a)reactos.org)
+ * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin(a)reactos.org)
*/
#include "precomp.h"
@@ -10,6 +10,7 @@
BOOL WINAPI
AddPrinterDriverW(PWSTR pName, DWORD Level, PBYTE pDriverInfo)
{
+ TRACE("AddPrinterDriverW(%S, %lu, %p)\n", pName, Level, pDriverInfo);
UNIMPLEMENTED;
return FALSE;
}
@@ -17,6 +18,7 @@ AddPrinterDriverW(PWSTR pName, DWORD Level, PBYTE pDriverInfo)
BOOL WINAPI
DeletePrinterDriverW(PWSTR pName, PWSTR pEnvironment, PWSTR pDriverName)
{
+ TRACE("DeletePrinterDriverW(%S, %S, %S)\n", pName, pEnvironment,
pDriverName);
UNIMPLEMENTED;
return FALSE;
}
@@ -24,6 +26,7 @@ DeletePrinterDriverW(PWSTR pName, PWSTR pEnvironment, PWSTR
pDriverName)
BOOL WINAPI
EnumPrinterDriversW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pDriverInfo,
DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
{
+ TRACE("EnumPrinterDriversW(%S, %S, %lu, %p, %lu, %p, %p)\n", pName,
pEnvironment, Level, pDriverInfo, cbBuf, pcbNeeded, pcReturned);
UNIMPLEMENTED;
return FALSE;
}
@@ -31,6 +34,7 @@ EnumPrinterDriversW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE
pDriverI
BOOL WINAPI
GetPrinterDriverDirectoryW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE
pDriverDirectory, DWORD cbBuf, PDWORD pcbNeeded)
{
+ TRACE("GetPrinterDriverDirectoryW(%S, %S, %lu, %p, %lu, %p)\n", pName,
pEnvironment, Level, pDriverDirectory, cbBuf, pcbNeeded);
UNIMPLEMENTED;
return FALSE;
}
diff --git a/win32ss/printing/base/winspool/printers.c
b/win32ss/printing/base/winspool/printers.c
index 2abd5c3d0c..7283757098 100644
--- a/win32ss/printing/base/winspool/printers.c
+++ b/win32ss/printing/base/winspool/printers.c
@@ -215,6 +215,7 @@ _StartDocPrinterWithRPC(PSPOOLER_HANDLE pHandle, PDOC_INFO_1W
pDocInfo1)
HANDLE WINAPI
AddPrinterW(PWSTR pName, DWORD Level, PBYTE pPrinter)
{
+ TRACE("AddPrinterW(%S, %lu, %p)\n", pName, Level, pPrinter);
UNIMPLEMENTED;
return NULL;
}
@@ -225,6 +226,8 @@ ClosePrinter(HANDLE hPrinter)
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("ClosePrinter(%p)\n", hPrinter);
+
// Sanity checks.
if (!pHandle)
{
@@ -259,24 +262,28 @@ Cleanup:
DWORD WINAPI
DeviceCapabilitiesA(LPCSTR pDevice, LPCSTR pPort, WORD fwCapability, LPSTR pOutput, const
DEVMODEA* pDevMode)
{
+ TRACE("DeviceCapabilitiesA(%s, %s, %hu, %p, %p)\n", pDevice, pPort,
fwCapability, pOutput, pDevMode);
return 0;
}
DWORD WINAPI
DeviceCapabilitiesW(LPCWSTR pDevice, LPCWSTR pPort, WORD fwCapability, LPWSTR pOutput,
const DEVMODEW* pDevMode)
{
+ TRACE("DeviceCapabilitiesW(%S, %S, %hu, %p, %p)\n", pDevice, pPort,
fwCapability, pOutput, pDevMode);
return 0;
}
LONG WINAPI
DocumentPropertiesA(HWND hWnd, HANDLE hPrinter, LPSTR pDeviceName, PDEVMODEA
pDevModeOutput, PDEVMODEA pDevModeInput, DWORD fMode)
{
+ TRACE("DocumentPropertiesA(%p, %p, %s, %p, %p, %lu)\n", hWnd, hPrinter,
pDeviceName, pDevModeOutput, pDevModeInput, fMode);
return 0;
}
LONG WINAPI
DocumentPropertiesW(HWND hWnd, HANDLE hPrinter, LPWSTR pDeviceName, PDEVMODEW
pDevModeOutput, PDEVMODEW pDevModeInput, DWORD fMode)
{
+ TRACE("DocumentPropertiesW(%p, %p, %S, %p, %p, %lu)\n", hWnd, hPrinter,
pDeviceName, pDevModeOutput, pDevModeInput, fMode);
return 0;
}
@@ -286,6 +293,8 @@ EndDocPrinter(HANDLE hPrinter)
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("EndDocPrinter(%p)\n", hPrinter);
+
// Sanity checks.
if (!pHandle)
{
@@ -339,6 +348,8 @@ EndPagePrinter(HANDLE hPrinter)
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("EndPagePrinter(%p)\n", hPrinter);
+
// Sanity checks.
if (!pHandle)
{
@@ -374,6 +385,7 @@ Cleanup:
BOOL WINAPI
EnumPrintersA(DWORD Flags, PSTR Name, DWORD Level, PBYTE pPrinterEnum, DWORD cbBuf,
PDWORD pcbNeeded, PDWORD pcReturned)
{
+ TRACE("EnumPrintersA(%lu, %s, %lu, %p, %lu, %p, %p)\n", Flags, Name, Level,
pPrinterEnum, cbBuf, pcbNeeded, pcReturned);
return FALSE;
}
@@ -382,6 +394,8 @@ EnumPrintersW(DWORD Flags, PWSTR Name, DWORD Level, PBYTE
pPrinterEnum, DWORD cb
{
DWORD dwErrorCode;
+ TRACE("EnumPrintersW(%lu, %S, %lu, %p, %lu, %p, %p)\n", Flags, Name, Level,
pPrinterEnum, cbBuf, pcbNeeded, pcReturned);
+
// Dismiss invalid levels already at this point.
if (Level == 3 || Level > 5)
{
@@ -424,6 +438,8 @@ GetDefaultPrinterA(LPSTR pszBuffer, LPDWORD pcchBuffer)
DWORD dwErrorCode;
PWSTR pwszBuffer = NULL;
+ TRACE("GetDefaultPrinterA(%p, %p)\n", pszBuffer, pcchBuffer);
+
// Sanity check.
if (!pcchBuffer)
{
@@ -472,6 +488,8 @@ GetDefaultPrinterW(LPWSTR pszBuffer, LPDWORD pcchBuffer)
PWSTR pwszDevice = NULL;
PWSTR pwszComma;
+ TRACE("GetDefaultPrinterW(%p, %p)\n", pszBuffer, pcchBuffer);
+
// Sanity check.
if (!pcchBuffer)
{
@@ -554,18 +572,21 @@ Cleanup:
BOOL WINAPI
GetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter, DWORD cbBuf, LPDWORD
pcbNeeded)
{
+ TRACE("GetPrinterA(%p, %lu, %p, %lu, %p)\n", hPrinter, Level, pPrinter,
cbBuf, pcbNeeded);
return FALSE;
}
BOOL WINAPI
GetPrinterDriverA(HANDLE hPrinter, LPSTR pEnvironment, DWORD Level, LPBYTE pDriverInfo,
DWORD cbBuf, LPDWORD pcbNeeded)
{
+ TRACE("GetPrinterDriverA(%p, %s, %lu, %p, %lu, %p)\n", hPrinter,
pEnvironment, Level, pDriverInfo, cbBuf, pcbNeeded);
return FALSE;
}
BOOL WINAPI
GetPrinterDriverW(HANDLE hPrinter, LPWSTR pEnvironment, DWORD Level, LPBYTE pDriverInfo,
DWORD cbBuf, LPDWORD pcbNeeded)
{
+ TRACE("GetPrinterDriverW(%p, %S, %lu, %p, %lu, %p)\n", hPrinter,
pEnvironment, Level, pDriverInfo, cbBuf, pcbNeeded);
return FALSE;
}
@@ -574,6 +595,8 @@ GetPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter, DWORD
cbBuf, LPDWORD
{
DWORD dwErrorCode;
+ TRACE("GetPrinterW(%p, %lu, %p, %lu, %p)\n", hPrinter, Level, pPrinter,
cbBuf, pcbNeeded);
+
// Dismiss invalid levels already at this point.
if (Level > 9)
{
@@ -615,6 +638,8 @@ OpenPrinterA(LPSTR pPrinterName, LPHANDLE phPrinter,
LPPRINTER_DEFAULTSA pDefaul
PWSTR pwszPrinterName = NULL;
PRINTER_DEFAULTSW wDefault = { 0 };
+ TRACE("OpenPrinterA(%s, %p, %p)\n", pPrinterName, phPrinter, pDefault);
+
if (pPrinterName)
{
// Convert pPrinterName to a Unicode string pwszPrinterName
@@ -680,6 +705,8 @@ OpenPrinterW(LPWSTR pPrinterName, LPHANDLE phPrinter,
LPPRINTER_DEFAULTSW pDefau
WINSPOOL_DEVMODE_CONTAINER DevModeContainer = { 0 };
ACCESS_MASK AccessRequired = 0;
+ TRACE("OpenPrinterW(%S, %p, %p)\n", pPrinterName, phPrinter, pDefault);
+
// Sanity check
if (!phPrinter)
{
@@ -737,6 +764,8 @@ ReadPrinter(HANDLE hPrinter, PVOID pBuf, DWORD cbBuf, PDWORD
pNoBytesRead)
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("ReadPrinter(%p, %p, %lu, %p)\n", hPrinter, pBuf, cbBuf,
pNoBytesRead);
+
// Sanity checks.
if (!pHandle)
{
@@ -764,6 +793,7 @@ Cleanup:
BOOL WINAPI
ResetPrinterW(HANDLE hPrinter, PPRINTER_DEFAULTSW pDefault)
{
+ TRACE("ResetPrinterW(%p, %p)\n", hPrinter, pDefault);
UNIMPLEMENTED;
return FALSE;
}
@@ -775,6 +805,8 @@ SetDefaultPrinterA(LPCSTR pszPrinter)
DWORD cch;
PWSTR pwszPrinter = NULL;
+ TRACE("SetDefaultPrinterA(%s)\n", pszPrinter);
+
if (pszPrinter)
{
// Convert pszPrinter to a Unicode string pwszPrinter
@@ -814,6 +846,8 @@ SetDefaultPrinterW(LPCWSTR pszPrinter)
PWSTR pwszDeviceValueData = NULL;
WCHAR wszPrinter[MAX_PRINTER_NAME + 1];
+ TRACE("SetDefaultPrinterW(%S)\n", pszPrinter);
+
// Open the Devices registry key.
dwErrorCode = (DWORD)RegOpenKeyExW(HKEY_CURRENT_USER, wszDevicesKey, 0, KEY_READ,
&hDevicesKey);
if (dwErrorCode != ERROR_SUCCESS)
@@ -913,6 +947,7 @@ Cleanup:
BOOL WINAPI
SetPrinterW(HANDLE hPrinter, DWORD Level, PBYTE pPrinter, DWORD Command)
{
+ TRACE("SetPrinterW(%p, %lu, %p, %lu)\n", hPrinter, Level, pPrinter,
Command);
UNIMPLEMENTED;
return FALSE;
}
@@ -926,6 +961,8 @@ StartDocPrinterA(HANDLE hPrinter, DWORD Level, PBYTE pDocInfo)
DWORD dwReturnValue = 0;
PDOC_INFO_1A pDocInfo1 = (PDOC_INFO_1A)pDocInfo;
+ TRACE("StartDocPrinterA(%p, %lu, %p)\n", hPrinter, Level, pDocInfo);
+
// Only check the minimum required for accessing pDocInfo.
// Additional sanity checks are done in StartDocPrinterW.
if (!pDocInfo1)
@@ -1016,6 +1053,8 @@ StartDocPrinterW(HANDLE hPrinter, DWORD Level, PBYTE pDocInfo)
PDOC_INFO_1W pDocInfo1 = (PDOC_INFO_1W)pDocInfo;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("StartDocPrinterW(%p, %lu, %p)\n", hPrinter, Level, pDocInfo);
+
// Sanity checks.
if (!pHandle)
{
@@ -1100,6 +1139,8 @@ StartPagePrinter(HANDLE hPrinter)
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("StartPagePrinter(%p)\n", hPrinter);
+
// Sanity checks.
if (!pHandle)
{
@@ -1130,6 +1171,8 @@ WritePrinter(HANDLE hPrinter, PVOID pBuf, DWORD cbBuf, PDWORD
pcWritten)
DWORD dwErrorCode;
PSPOOLER_HANDLE pHandle = (PSPOOLER_HANDLE)hPrinter;
+ TRACE("WritePrinter(%p, %p, %lu, %p)\n", hPrinter, pBuf, cbBuf,
pcWritten);
+
// Sanity checks.
if (!pHandle)
{
@@ -1181,5 +1224,6 @@ Cleanup:
BOOL WINAPI
XcvDataW(HANDLE hXcv, PCWSTR pszDataName, PBYTE pInputData, DWORD cbInputData, PBYTE
pOutputData, DWORD cbOutputData, PDWORD pcbOutputNeeded, PDWORD pdwStatus)
{
+ TRACE("XcvDataW(%p, %S, %p, %lu, %p, %lu, %p, %p)\n", hXcv, pszDataName,
pInputData, cbInputData, pOutputData, cbOutputData, pcbOutputNeeded, pdwStatus);
return FALSE;
}
diff --git a/win32ss/printing/base/winspool/printprocessors.c
b/win32ss/printing/base/winspool/printprocessors.c
index 122cd74d0f..0e5acc7ef6 100644
--- a/win32ss/printing/base/winspool/printprocessors.c
+++ b/win32ss/printing/base/winspool/printprocessors.c
@@ -29,6 +29,7 @@ _MarshallUpPrintProcessorInfo(PPRINTPROCESSOR_INFO_1W*
ppPrintProcessorInfo1)
BOOL WINAPI
AddPrintProcessorW(PWSTR pName, PWSTR pEnvironment, PWSTR pPathName, PWSTR
pPrintProcessorName)
{
+ TRACE("AddPrintProcessorW(%S, %S, %S, %S)\n", pName, pEnvironment,
pPathName, pPrintProcessorName);
UNIMPLEMENTED;
return FALSE;
}
@@ -36,6 +37,7 @@ AddPrintProcessorW(PWSTR pName, PWSTR pEnvironment, PWSTR pPathName,
PWSTR pPrin
BOOL WINAPI
DeletePrintProcessorW(PWSTR pName, PWSTR pEnvironment, PWSTR pPrintProcessorName)
{
+ TRACE("DeletePrintProcessorW(%S, %S, %S)\n", pName, pEnvironment,
pPrintProcessorName);
UNIMPLEMENTED;
return FALSE;
}
@@ -43,6 +45,7 @@ DeletePrintProcessorW(PWSTR pName, PWSTR pEnvironment, PWSTR
pPrintProcessorName
BOOL WINAPI
EnumPrintProcessorDatatypesA(PSTR pName, LPSTR pPrintProcessorName, DWORD Level, PBYTE
pDatatypes, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
{
+ TRACE("EnumPrintProcessorDatatypesA(%s, %s, %lu, %p, %lu, %p, %p)\n",
pName, pPrintProcessorName, Level, pDatatypes, cbBuf, pcbNeeded, pcReturned);
UNIMPLEMENTED;
return FALSE;
}
@@ -52,6 +55,8 @@ EnumPrintProcessorDatatypesW(PWSTR pName, LPWSTR pPrintProcessorName,
DWORD Leve
{
DWORD dwErrorCode;
+ TRACE("EnumPrintProcessorDatatypesW(%S, %S, %lu, %p, %lu, %p, %p)\n",
pName, pPrintProcessorName, Level, pDatatypes, cbBuf, pcbNeeded, pcReturned);
+
// Sanity checks
if (Level != 1)
{
@@ -90,6 +95,8 @@ EnumPrintProcessorsW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE
pPrintP
{
DWORD dwErrorCode;
+ TRACE("EnumPrintProcessorsW(%S, %S, %lu, %p, %lu, %p, %p)\n", pName,
pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded, pcReturned);
+
// Choose our current environment if the caller didn't give any.
if (!pEnvironment)
pEnvironment = (PWSTR)wszCurrentEnvironment;
@@ -127,6 +134,8 @@ GetPrintProcessorDirectoryA(PSTR pName, PSTR pEnvironment, DWORD
Level, PBYTE pP
PWSTR pwszEnvironment = NULL;
PWSTR pwszPrintProcessorInfo = NULL;
+ TRACE("GetPrintProcessorDirectoryA(%s, %s, %lu, %p, %lu, %p)\n", pName,
pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded);
+
if (pName)
{
// Convert pName to a Unicode string pwszName.
@@ -199,6 +208,8 @@ GetPrintProcessorDirectoryW(PWSTR pName, PWSTR pEnvironment, DWORD
Level, PBYTE
{
DWORD dwErrorCode;
+ TRACE("GetPrintProcessorDirectoryW(%S, %S, %lu, %p, %lu, %p)\n", pName,
pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded);
+
// Sanity checks
if (Level != 1)
{
diff --git a/win32ss/printing/base/winspool/printproviders.c
b/win32ss/printing/base/winspool/printproviders.c
index 5ba1929f44..3ad4894bb2 100644
--- a/win32ss/printing/base/winspool/printproviders.c
+++ b/win32ss/printing/base/winspool/printproviders.c
@@ -2,7 +2,7 @@
* PROJECT: ReactOS Spooler API
* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Functions related to Print Providers
- * COPYRIGHT: Copyright 2015 Colin Finck (colin(a)reactos.org)
+ * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin(a)reactos.org)
*/
#include "precomp.h"
@@ -10,6 +10,7 @@
BOOL WINAPI
AddPrintProvidorW(PWSTR pName, DWORD Level, PBYTE pProviderInfo)
{
+ TRACE("AddPrintProvidorW(%S, %lu, %p)\n", pName, Level, pProviderInfo);
UNIMPLEMENTED;
return FALSE;
}
@@ -17,6 +18,7 @@ AddPrintProvidorW(PWSTR pName, DWORD Level, PBYTE pProviderInfo)
BOOL WINAPI
DeletePrintProvidorW(PWSTR pName, PWSTR pEnvironment, PWSTR pPrintProviderName)
{
+ TRACE("DeletePrintProvidorW(%S, %S, %S)\n", pName, pEnvironment,
pPrintProviderName);
UNIMPLEMENTED;
return FALSE;
}