- Add RPC calls, proper marshalling and exports for all implemented functions.
- Move the spoolsv stubs into categories, so that future implementations in winspool, spoolsv, spoolss and localspl can follow a consistent naming scheme.
svn path=/branches/colins-printing-for-freedom/; revision=68408
add_rpc_files(server ${REACTOS_SOURCE_DIR}/include/reactos/idl/winspool.idl)
list(APPEND SOURCE
+ forms.c
init.c
jobs.c
main.c
monitors.c
+ notifications.c
ports.c
+ precomp.h
+ printerdata.c
+ printerdrivers.c
printers.c
printprocessors.c
- precomp.h
+ printproviders.c
rpcserver.c
rpcstubs.c
+ xcv.c
${CMAKE_CURRENT_BINARY_DIR}/winspool_s.c)
add_executable(spoolsv ${SOURCE} spoolsv.rc)
--- /dev/null
+/*
+ * PROJECT: ReactOS Print Spooler Service
+ * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
+ * PURPOSE: Functions related to Forms
+ * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
+ */
+
+#include "precomp.h"
+
+DWORD
+_RpcAddForm(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_FORM_CONTAINER* pFormInfoContainer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcDeleteForm(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR* pFormName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcEnumForms(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Level, BYTE* pForm, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcGetForm(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR* pFormName, DWORD Level, BYTE* pForm, DWORD cbBuf, DWORD* pcbNeeded)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcSetForm(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR* pFormName, WINSPOOL_FORM_CONTAINER* pFormInfoContainer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
#include "precomp.h"
+static void
+_MarshallDownMonitorInfo(PBYTE pMonitorInfo, DWORD Level)
+{
+ PMONITOR_INFO_2W pMonitorInfo2 = (PMONITOR_INFO_2W)pMonitorInfo; // MONITOR_INFO_1W is a subset of MONITOR_INFO_2W
+
+ // Replace absolute pointer addresses in the output by relative offsets.
+ pMonitorInfo2->pName = (PWSTR)((ULONG_PTR)pMonitorInfo2->pName - (ULONG_PTR)pMonitorInfo2);
+
+ if (Level == 2)
+ {
+ pMonitorInfo2->pDLLName = (PWSTR)((ULONG_PTR)pMonitorInfo2->pDLLName - (ULONG_PTR)pMonitorInfo2);
+ pMonitorInfo2->pEnvironment = (PWSTR)((ULONG_PTR)pMonitorInfo2->pEnvironment - (ULONG_PTR)pMonitorInfo2);
+ }
+}
+
+DWORD
+_RpcAddMonitor(WINSPOOL_HANDLE pName, WINSPOOL_MONITOR_CONTAINER* pMonitorContainer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcDeleteMonitor(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, WCHAR* pMonitorName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
DWORD
_RpcEnumMonitors(WINSPOOL_HANDLE pName, DWORD Level, BYTE* pMonitor, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
{
DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pMonitor;
dwErrorCode = RpcImpersonateClient(NULL);
if (dwErrorCode != ERROR_SUCCESS)
EnumMonitorsW(pName, Level, pMonitor, cbBuf, pcbNeeded, pcReturned);
dwErrorCode = GetLastError();
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace absolute pointer addresses in the output by relative offsets.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallDownMonitorInfo(p, Level);
+
+ if (Level == 1)
+ p += sizeof(MONITOR_INFO_1W);
+ else if (Level == 2)
+ p += sizeof(MONITOR_INFO_2W);
+ }
+ }
+
RpcRevertToSelf();
return dwErrorCode;
}
--- /dev/null
+/*
+ * PROJECT: ReactOS Print Spooler Service
+ * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
+ * PURPOSE: Functions related to Printer Configuration Data
+ * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
+ */
+
+#include "precomp.h"
+
+DWORD
+_RpcClientFindFirstPrinterChangeNotification()
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcFindClosePrinterChangeNotification()
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcFindNextPrinterChangeNotification()
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcRemoteFindFirstPrinterChangeNotification(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD fdwFlags, DWORD fdwOptions, WCHAR* pszLocalMachine, DWORD dwPrinterLocal, DWORD cbBuffer, BYTE* pBuffer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcRemoteFindFirstPrinterChangeNotificationEx(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD fdwFlags, DWORD fdwOptions, WCHAR* pszLocalMachine, DWORD dwPrinterLocal, WINSPOOL_V2_NOTIFY_OPTIONS* pOptions)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcReplyClosePrinter(WINSPOOL_PRINTER_HANDLE* phNotify)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcReplyOpenPrinter(WINSPOOL_HANDLE pMachine, WINSPOOL_PRINTER_HANDLE* phPrinterNotify, DWORD dwPrinterRemote, DWORD dwType, DWORD cbBuffer, BYTE* pBuffer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcRouterFindFirstPrinterChangeNotificationOld()
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcRouterRefreshPrinterChangeNotification(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD dwColor, WINSPOOL_V2_NOTIFY_OPTIONS* pOptions, WINSPOOL_V2_NOTIFY_INFO** ppInfo)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcRouterReplyPrinter(WINSPOOL_PRINTER_HANDLE hNotify, DWORD fdwFlags, DWORD cbBuffer, BYTE* pBuffer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcRouterReplyPrinterEx(WINSPOOL_PRINTER_HANDLE hNotify, DWORD dwColor, DWORD fdwFlags, DWORD* pdwResult, DWORD dwReplyType, WINSPOOL_V2_UREPLY_PRINTER Reply)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcWaitForPrinterChange(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Flags, DWORD* pFlags)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
#include "precomp.h"
+static void
+_MarshallDownPortInfo(PBYTE pPortInfo, DWORD Level)
+{
+ PPORT_INFO_2W pPortInfo2 = (PPORT_INFO_2W)pPortInfo; // PORT_INFO_1W is a subset of PORT_INFO_2W
+
+ // Replace absolute pointer addresses in the output by relative offsets.
+ pPortInfo2->pPortName = (PWSTR)((ULONG_PTR)pPortInfo2->pPortName - (ULONG_PTR)pPortInfo2);
+
+ if (Level == 2)
+ {
+ pPortInfo2->pDescription = (PWSTR)((ULONG_PTR)pPortInfo2->pDescription - (ULONG_PTR)pPortInfo2);
+ pPortInfo2->pMonitorName = (PWSTR)((ULONG_PTR)pPortInfo2->pMonitorName - (ULONG_PTR)pPortInfo2);
+ }
+}
+
+DWORD
+_RpcAddPort(WINSPOOL_HANDLE pName, ULONG_PTR hWnd, WCHAR* pMonitorName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcAddPortEx(WINSPOOL_HANDLE pName, WINSPOOL_PORT_CONTAINER* pPortContainer, WINSPOOL_PORT_VAR_CONTAINER* pPortVarContainer, WCHAR* pMonitorName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcConfigurePort(WINSPOOL_HANDLE pName, ULONG_PTR hWnd, WCHAR* pPortName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcDeletePort(WINSPOOL_HANDLE pName, ULONG_PTR hWnd, WCHAR* pPortName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
DWORD
_RpcEnumPorts(WINSPOOL_HANDLE pName, DWORD Level, BYTE* pPort, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
{
DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pPort;
dwErrorCode = RpcImpersonateClient(NULL);
if (dwErrorCode != ERROR_SUCCESS)
EnumPortsW(pName, Level, pPort, cbBuf, pcbNeeded, pcReturned);
dwErrorCode = GetLastError();
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace absolute pointer addresses in the output by relative offsets.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallDownPortInfo(p, Level);
+
+ if (Level == 1)
+ p += sizeof(PORT_INFO_1W);
+ else if (Level == 2)
+ p += sizeof(PORT_INFO_2W);
+ }
+ }
+
RpcRevertToSelf();
return dwErrorCode;
}
+
+DWORD
+_RpcSetPort(WINSPOOL_HANDLE pName, WCHAR* pPortName, WINSPOOL_PORT_CONTAINER* pPortContainer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
--- /dev/null
+/*
+ * PROJECT: ReactOS Print Spooler Service
+ * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
+ * PURPOSE: Functions related to Printer Configuration Data
+ * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
+ */
+
+#include "precomp.h"
+
+DWORD
+_RpcDeletePrinterData(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR* pValueName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcDeletePrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR* pKeyName, const WCHAR* pValueName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcDeletePrinterKey(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR* pKeyName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcEnumPrinterData(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD dwIndex, WCHAR* pValueName, DWORD cbValueName, DWORD* pcbValueName, DWORD* pType, BYTE* pData, DWORD cbData, DWORD* pcbData)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcEnumPrinterKey(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR* pKeyName, WCHAR* pSubkey, DWORD cbSubkey, DWORD* pcbSubkey)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcEnumPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR* pKeyName, BYTE* pEnumValues, DWORD cbEnumValues, DWORD* pcbEnumValues, DWORD* pnEnumValues)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcGetPrinterData(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR* pValueName, DWORD* pType, BYTE* pData, DWORD nSize, DWORD* pcbNeeded)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcGetPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR* pKeyName, const WCHAR* pValueName, DWORD* pType, BYTE* pData, DWORD nSize, DWORD* pcbNeeded)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcSetPrinterData(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR* pValueName, DWORD Type, BYTE* pData, DWORD cbData)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcSetPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR* pKeyName, const WCHAR* pValueName, DWORD Type, BYTE* pData, DWORD cbData)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
--- /dev/null
+/*
+ * PROJECT: ReactOS Print Spooler Service
+ * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
+ * PURPOSE: Functions related to Printer Drivers
+ * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
+ */
+
+#include "precomp.h"
+
+DWORD
+_RpcAddPrinterDriver(WINSPOOL_HANDLE pName, WINSPOOL_DRIVER_CONTAINER* pDriverContainer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcAddPrinterDriverEx(WINSPOOL_HANDLE pName, WINSPOOL_DRIVER_CONTAINER* pDriverContainer, DWORD dwFileCopyFlags)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcDeletePrinterDriver(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, WCHAR* pDriverName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcDeletePrinterDriverEx(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, WCHAR* pDriverName, DWORD dwDeleteFlag, DWORD dwVersionNum)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcEnumPrinterDrivers(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, DWORD Level, BYTE* pDrivers, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcGetPrinterDriver(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR* pEnvironment, DWORD Level, BYTE* pDriver, DWORD cbBuf, DWORD* pcbNeeded)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcGetPrinterDriver2(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR* pEnvironment, DWORD Level, BYTE* pDriver, DWORD cbBuf, DWORD* pcbNeeded, DWORD dwClientMajorVersion, DWORD dwClientMinorVersion, DWORD* pdwServerMaxVersion, DWORD* pdwServerMinVersion)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcGetPrinterDriverDirectory(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, DWORD Level, BYTE* pDriverDirectory, DWORD cbBuf, DWORD* pcbNeeded)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
#include "precomp.h"
+static void
+_MarshallDownPrinterInfo(PBYTE pPrinterInfo, DWORD Level)
+{
+ PPRINTER_INFO_1W pPrinterInfo1;
+ PPRINTER_INFO_2W pPrinterInfo2;
+
+ // Replace absolute pointer addresses in the output by relative offsets.
+ if (Level == 1)
+ {
+ pPrinterInfo1 = (PPRINTER_INFO_1W)pPrinterInfo;
+
+ pPrinterInfo1->pName = (PWSTR)((ULONG_PTR)pPrinterInfo1->pName - (ULONG_PTR)pPrinterInfo1);
+ pPrinterInfo1->pDescription = (PWSTR)((ULONG_PTR)pPrinterInfo1->pDescription - (ULONG_PTR)pPrinterInfo1);
+ pPrinterInfo1->pComment = (PWSTR)((ULONG_PTR)pPrinterInfo1->pComment - (ULONG_PTR)pPrinterInfo1);
+ }
+ else if (Level == 2)
+ {
+ pPrinterInfo2 = (PPRINTER_INFO_2W)pPrinterInfo;
+
+ pPrinterInfo2->pPrinterName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pPrinterName - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pShareName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pShareName - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pPortName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pPortName - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pDriverName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pDriverName - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pComment = (PWSTR)((ULONG_PTR)pPrinterInfo2->pComment - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pLocation = (PWSTR)((ULONG_PTR)pPrinterInfo2->pLocation - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pDevMode = (PDEVMODEW)((ULONG_PTR)pPrinterInfo2->pDevMode - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pSepFile = (PWSTR)((ULONG_PTR)pPrinterInfo2->pSepFile - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pPrintProcessor = (PWSTR)((ULONG_PTR)pPrinterInfo2->pPrintProcessor - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pDatatype = (PWSTR)((ULONG_PTR)pPrinterInfo2->pDatatype - (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pParameters = (PWSTR)((ULONG_PTR)pPrinterInfo2->pParameters - (ULONG_PTR)pPrinterInfo2);
+
+ if (pPrinterInfo2->pServerName)
+ pPrinterInfo2->pServerName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pServerName - (ULONG_PTR)pPrinterInfo2);
+
+ if (pPrinterInfo2->pSecurityDescriptor)
+ pPrinterInfo2->pSecurityDescriptor = (PWSTR)((ULONG_PTR)pPrinterInfo2->pSecurityDescriptor - (ULONG_PTR)pPrinterInfo2);
+ }
+}
+
+DWORD
+_RpcAbortPrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcAddPrinter(WINSPOOL_HANDLE pName, WINSPOOL_PRINTER_CONTAINER* pPrinterContainer, WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, WINSPOOL_SECURITY_CONTAINER* pSecurityContainer, WINSPOOL_PRINTER_HANDLE* pHandle)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcAddPrinterEx(WINSPOOL_HANDLE pName, WINSPOOL_PRINTER_CONTAINER* pPrinterContainer, WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, WINSPOOL_SECURITY_CONTAINER* pSecurityContainer, WINSPOOL_SPLCLIENT_CONTAINER* pClientInfo, WINSPOOL_PRINTER_HANDLE* pHandle)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
DWORD
-_RpcClosePrinter(WINSPOOL_PRINTER_HANDLE *phPrinter)
+_RpcClosePrinter(WINSPOOL_PRINTER_HANDLE* phPrinter)
{
DWORD dwErrorCode;
return dwErrorCode;
}
+DWORD
+_RpcDeletePrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
DWORD
_RpcEndDocPrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
{
_RpcEnumPrinters(DWORD Flags, WINSPOOL_HANDLE Name, DWORD Level, BYTE* pPrinterEnum, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
{
DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pPrinterEnum;
dwErrorCode = RpcImpersonateClient(NULL);
if (dwErrorCode != ERROR_SUCCESS)
EnumPrintersW(Flags, Name, Level, pPrinterEnum, cbBuf, pcbNeeded, pcReturned);
dwErrorCode = GetLastError();
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace absolute pointer addresses in the output by relative offsets.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallDownPrinterInfo(p, Level);
+
+ if (Level == 1)
+ p += sizeof(PRINTER_INFO_1W);
+ else if (Level == 2)
+ p += sizeof(PRINTER_INFO_2W);
+ }
+ }
+
RpcRevertToSelf();
return dwErrorCode;
}
+DWORD
+_RpcFlushPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, BYTE* pBuf, DWORD cbBuf, DWORD* pcWritten, DWORD cSleep)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcGetPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Level, BYTE* pPrinter, DWORD cbBuf, DWORD* pcbNeeded)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
DWORD
_RpcOpenPrinter(WINSPOOL_HANDLE pPrinterName, WINSPOOL_PRINTER_HANDLE* phPrinter, WCHAR* pDatatype, WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, DWORD AccessRequired)
{
}
DWORD
-_RpcReadPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, BYTE *pBuf, DWORD cbBuf, DWORD *pcNoBytesRead)
+_RpcOpenPrinterEx(WINSPOOL_HANDLE pPrinterName, WINSPOOL_PRINTER_HANDLE* pHandle, WCHAR* pDatatype, WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, DWORD AccessRequired, WINSPOOL_SPLCLIENT_CONTAINER* pClientInfo)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcReadPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, BYTE* pBuf, DWORD cbBuf, DWORD* pcNoBytesRead)
{
DWORD dwErrorCode;
return dwErrorCode;
}
+DWORD
+_RpcResetPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR* pDatatype, WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcResetPrinterEx()
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcSeekPrinter()
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcSetPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_PRINTER_CONTAINER* pPrinterContainer, WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer, WINSPOOL_SECURITY_CONTAINER* pSecurityContainer, DWORD Command)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
DWORD
_RpcStartDocPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_DOC_INFO_CONTAINER* pDocInfoContainer, DWORD* pJobId)
{
}
DWORD
-_RpcWritePrinter(WINSPOOL_PRINTER_HANDLE hPrinter, BYTE *pBuf, DWORD cbBuf, DWORD *pcWritten)
+_RpcWritePrinter(WINSPOOL_PRINTER_HANDLE hPrinter, BYTE* pBuf, DWORD cbBuf, DWORD* pcWritten)
{
DWORD dwErrorCode;
#include "precomp.h"
+static void
+_MarshallDownDatatypesInfo(PDATATYPES_INFO_1W pDatatypesInfo1)
+{
+ // Replace absolute pointer addresses in the output by relative offsets.
+ pDatatypesInfo1->pName = (PWSTR)((ULONG_PTR)pDatatypesInfo1->pName - (ULONG_PTR)pDatatypesInfo1);
+}
+
+static void
+_MarshallDownPrintProcessorInfo(PPRINTPROCESSOR_INFO_1W pPrintProcessorInfo1)
+{
+ // Replace absolute pointer addresses in the output by relative offsets.
+ pPrintProcessorInfo1->pName = (PWSTR)((ULONG_PTR)pPrintProcessorInfo1->pName - (ULONG_PTR)pPrintProcessorInfo1);
+}
+
+DWORD
+_RpcAddPrintProcessor(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, WCHAR* pPathName, WCHAR* pPrintProcessorName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
DWORD
-_RpcAddPrintProcessor(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, WCHAR *pPathName, WCHAR *pPrintProcessorName)
+_RpcDeletePrintProcessor(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, WCHAR* pPrintProcessorName)
{
UNIMPLEMENTED;
return ERROR_INVALID_FUNCTION;
}
DWORD
-_RpcEnumPrintProcessorDatatypes(WINSPOOL_HANDLE pName, WCHAR *pPrintProcessorName, DWORD Level, BYTE *pDatatypes, DWORD cbBuf, DWORD *pcbNeeded, DWORD *pcReturned)
+_RpcEnumPrintProcessorDatatypes(WINSPOOL_HANDLE pName, WCHAR* pPrintProcessorName, DWORD Level, BYTE* pDatatypes, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
{
DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pDatatypes;
dwErrorCode = RpcImpersonateClient(NULL);
if (dwErrorCode != ERROR_SUCCESS)
EnumPrintProcessorDatatypesW(pName, pPrintProcessorName, Level, pDatatypes, cbBuf, pcbNeeded, pcReturned);
dwErrorCode = GetLastError();
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace absolute pointer addresses in the output by relative offsets.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallDownDatatypesInfo((PDATATYPES_INFO_1W)p);
+ p += sizeof(DATATYPES_INFO_1W);
+ }
+ }
+
RpcRevertToSelf();
return dwErrorCode;
}
DWORD
-_RpcEnumPrintProcessors(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, DWORD Level, BYTE *pPrintProcessorInfo, DWORD cbBuf, DWORD *pcbNeeded, DWORD *pcReturned)
+_RpcEnumPrintProcessors(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, DWORD Level, BYTE* pPrintProcessorInfo, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
{
DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pPrintProcessorInfo;
dwErrorCode = RpcImpersonateClient(NULL);
if (dwErrorCode != ERROR_SUCCESS)
EnumPrintProcessorsW(pName, pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded, pcReturned);
dwErrorCode = GetLastError();
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace absolute pointer addresses in the output by relative offsets.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallDownPrintProcessorInfo((PPRINTPROCESSOR_INFO_1W)p);
+ p += sizeof(PRINTPROCESSOR_INFO_1W);
+ }
+ }
+
RpcRevertToSelf();
return dwErrorCode;
}
DWORD
-_RpcGetPrintProcessorDirectory(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, DWORD Level, BYTE *pPrintProcessorDirectory, DWORD cbBuf, DWORD *pcbNeeded)
+_RpcGetPrintProcessorDirectory(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, DWORD Level, BYTE* pPrintProcessorDirectory, DWORD cbBuf, DWORD* pcbNeeded)
{
DWORD dwErrorCode;
--- /dev/null
+/*
+ * PROJECT: ReactOS Print Spooler Service
+ * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
+ * PURPOSE: Functions related to Print Providers
+ * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
+ */
+
+#include "precomp.h"
+
+DWORD
+_RpcAddPrintProvidor(WINSPOOL_HANDLE pName, WINSPOOL_PROVIDOR_CONTAINER* pProvidorContainer)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
+
+DWORD
+_RpcDeletePrintProvidor(WINSPOOL_HANDLE pName, WCHAR* pEnvironment, WCHAR* pPrintProviderName)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
#include "precomp.h"
DWORD
-_RpcAddPrinter(WINSPOOL_HANDLE pName, WINSPOOL_PRINTER_CONTAINER *pPrinterContainer, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, WINSPOOL_SECURITY_CONTAINER *pSecurityContainer, WINSPOOL_PRINTER_HANDLE *pHandle)
+_RpcCreatePrinterIC(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_GDI_HANDLE* pHandle, WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer)
{
UNIMPLEMENTED;
return ERROR_INVALID_FUNCTION;
}
DWORD
-_RpcDeletePrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
+_RpcPlayGdiScriptOnPrinterIC(WINSPOOL_GDI_HANDLE hPrinterIC, BYTE* pIn, DWORD cIn, BYTE* pOut, DWORD cOut, DWORD ul)
{
UNIMPLEMENTED;
return ERROR_INVALID_FUNCTION;
}
DWORD
-_RpcSetPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_PRINTER_CONTAINER *pPrinterContainer, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, WINSPOOL_SECURITY_CONTAINER *pSecurityContainer, DWORD Command)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcGetPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Level, BYTE *pPrinter, DWORD cbBuf, DWORD *pcbNeeded)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAddPrinterDriver(WINSPOOL_HANDLE pName, WINSPOOL_DRIVER_CONTAINER *pDriverContainer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcEnumPrinterDrivers(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, DWORD Level, BYTE *pDrivers, DWORD cbBuf, DWORD *pcbNeeded, DWORD *pcReturned)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcGetPrinterDriver(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pEnvironment, DWORD Level, BYTE *pDriver, DWORD cbBuf, DWORD *pcbNeeded)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcGetPrinterDriverDirectory(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, DWORD Level, BYTE *pDriverDirectory, DWORD cbBuf, DWORD *pcbNeeded)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeletePrinterDriver(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, WCHAR *pDriverName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAbortPrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcGetPrinterData(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pValueName, DWORD *pType, BYTE *pData, DWORD nSize, DWORD *pcbNeeded)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcSetPrinterData(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pValueName, DWORD Type, BYTE *pData, DWORD cbData)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcWaitForPrinterChange(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Flags, DWORD *pFlags)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAddForm(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_FORM_CONTAINER *pFormInfoContainer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeleteForm(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pFormName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcGetForm(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pFormName, DWORD Level, BYTE *pForm, DWORD cbBuf, DWORD *pcbNeeded)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcSetForm(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pFormName, WINSPOOL_FORM_CONTAINER *pFormInfoContainer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcEnumForms(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Level, BYTE *pForm, DWORD cbBuf, DWORD *pcbNeeded, DWORD *pcReturned)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAddPort(WINSPOOL_HANDLE pName, ULONG_PTR hWnd, WCHAR *pMonitorName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcConfigurePort(WINSPOOL_HANDLE pName, ULONG_PTR hWnd, WCHAR *pPortName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeletePort(WINSPOOL_HANDLE pName, ULONG_PTR hWnd, WCHAR *pPortName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcCreatePrinterIC(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_GDI_HANDLE *pHandle, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcPlayGdiScriptOnPrinterIC(WINSPOOL_GDI_HANDLE hPrinterIC, BYTE *pIn, DWORD cIn, BYTE *pOut, DWORD cOut, DWORD ul)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeletePrinterIC(WINSPOOL_GDI_HANDLE *phPrinterIC)
+_RpcDeletePrinterIC(WINSPOOL_GDI_HANDLE* phPrinterIC)
{
UNIMPLEMENTED;
return ERROR_INVALID_FUNCTION;
}
DWORD
-_RpcPrinterMessageBox(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Error, ULONG_PTR hWnd, WCHAR *pText, WCHAR *pCaption, DWORD dwType)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAddMonitor(WINSPOOL_HANDLE pName, WINSPOOL_MONITOR_CONTAINER *pMonitorContainer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeleteMonitor(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, WCHAR *pMonitorName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeletePrintProcessor(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, WCHAR *pPrintProcessorName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAddPrintProvidor(WINSPOOL_HANDLE pName, WINSPOOL_PROVIDOR_CONTAINER *pProvidorContainer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeletePrintProvidor(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, WCHAR *pPrintProviderName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcResetPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pDatatype, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcGetPrinterDriver2(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pEnvironment, DWORD Level, BYTE *pDriver, DWORD cbBuf, DWORD *pcbNeeded, DWORD dwClientMajorVersion, DWORD dwClientMinorVersion, DWORD *pdwServerMaxVersion, DWORD *pdwServerMinVersion)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcClientFindFirstPrinterChangeNotification()
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcFindNextPrinterChangeNotification()
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcFindClosePrinterChangeNotification()
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcRouterFindFirstPrinterChangeNotificationOld()
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcReplyOpenPrinter(WINSPOOL_HANDLE pMachine, WINSPOOL_PRINTER_HANDLE *phPrinterNotify, DWORD dwPrinterRemote, DWORD dwType, DWORD cbBuffer, BYTE *pBuffer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcRouterReplyPrinter(WINSPOOL_PRINTER_HANDLE hNotify, DWORD fdwFlags, DWORD cbBuffer, BYTE *pBuffer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcReplyClosePrinter(WINSPOOL_PRINTER_HANDLE *phNotify)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAddPortEx(WINSPOOL_HANDLE pName, WINSPOOL_PORT_CONTAINER *pPortContainer, WINSPOOL_PORT_VAR_CONTAINER *pPortVarContainer, WCHAR *pMonitorName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcRemoteFindFirstPrinterChangeNotification(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD fdwFlags, DWORD fdwOptions, WCHAR *pszLocalMachine, DWORD dwPrinterLocal, DWORD cbBuffer, BYTE *pBuffer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcResetPrinterEx()
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcRemoteFindFirstPrinterChangeNotificationEx(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD fdwFlags, DWORD fdwOptions, WCHAR *pszLocalMachine, DWORD dwPrinterLocal, WINSPOOL_V2_NOTIFY_OPTIONS *pOptions)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcRouterReplyPrinterEx(WINSPOOL_PRINTER_HANDLE hNotify, DWORD dwColor, DWORD fdwFlags, DWORD *pdwResult, DWORD dwReplyType, WINSPOOL_V2_UREPLY_PRINTER Reply)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcRouterRefreshPrinterChangeNotification(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD dwColor, WINSPOOL_V2_NOTIFY_OPTIONS *pOptions, WINSPOOL_V2_NOTIFY_INFO **ppInfo)
+_RpcPrinterMessageBox(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Error, ULONG_PTR hWnd, WCHAR* pText, WCHAR* pCaption, DWORD dwType)
{
UNIMPLEMENTED;
return ERROR_INVALID_FUNCTION;
return ERROR_INVALID_FUNCTION;
}
-DWORD
-_RpcOpenPrinterEx(WINSPOOL_HANDLE pPrinterName, WINSPOOL_PRINTER_HANDLE *pHandle, WCHAR *pDatatype, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, DWORD AccessRequired, WINSPOOL_SPLCLIENT_CONTAINER *pClientInfo)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAddPrinterEx(WINSPOOL_HANDLE pName, WINSPOOL_PRINTER_CONTAINER *pPrinterContainer, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, WINSPOOL_SECURITY_CONTAINER *pSecurityContainer, WINSPOOL_SPLCLIENT_CONTAINER *pClientInfo, WINSPOOL_PRINTER_HANDLE *pHandle)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcSetPort(WINSPOOL_HANDLE pName, WCHAR *pPortName, WINSPOOL_PORT_CONTAINER *pPortContainer)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcEnumPrinterData(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD dwIndex, WCHAR *pValueName, DWORD cbValueName, DWORD *pcbValueName, DWORD *pType, BYTE *pData, DWORD cbData, DWORD *pcbData)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeletePrinterData(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pValueName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
DWORD
_RpcClusterSplOpen()
{
}
DWORD
-_RpcSetPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, const WCHAR *pValueName, DWORD Type, BYTE *pData, DWORD cbData)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcGetPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, const WCHAR *pValueName, DWORD *pType, BYTE *pData, DWORD nSize, DWORD *pcbNeeded)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcEnumPrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, BYTE *pEnumValues, DWORD cbEnumValues, DWORD *pcbEnumValues, DWORD *pnEnumValues)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcEnumPrinterKey(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, WCHAR *pSubkey, DWORD cbSubkey, DWORD *pcbSubkey)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeletePrinterDataEx(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName, const WCHAR *pValueName)
+_RpcAddPerMachineConnection(WINSPOOL_HANDLE pServer, const WCHAR* pPrinterName, const WCHAR* pPrintServer, const WCHAR* pProvider)
{
UNIMPLEMENTED;
return ERROR_INVALID_FUNCTION;
}
DWORD
-_RpcDeletePrinterKey(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pKeyName)
+_RpcDeletePerMachineConnection(WINSPOOL_HANDLE pServer, const WCHAR* pPrinterName)
{
UNIMPLEMENTED;
return ERROR_INVALID_FUNCTION;
}
DWORD
-_RpcSeekPrinter()
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeletePrinterDriverEx(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, WCHAR *pDriverName, DWORD dwDeleteFlag, DWORD dwVersionNum)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAddPerMachineConnection(WINSPOOL_HANDLE pServer, const WCHAR *pPrinterName, const WCHAR *pPrintServer, const WCHAR *pProvider)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcDeletePerMachineConnection(WINSPOOL_HANDLE pServer, const WCHAR *pPrinterName)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcEnumPerMachineConnections(WINSPOOL_HANDLE pServer, BYTE *pPrinterEnum, DWORD cbBuf, DWORD *pcbNeeded, DWORD *pcReturned)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcXcvData(WINSPOOL_PRINTER_HANDLE hXcv, const WCHAR *pszDataName, BYTE *pInputData, DWORD cbInputData, BYTE *pOutputData, DWORD cbOutputData, DWORD *pcbOutputNeeded, DWORD *pdwStatus)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcAddPrinterDriverEx(WINSPOOL_HANDLE pName, WINSPOOL_DRIVER_CONTAINER *pDriverContainer, DWORD dwFileCopyFlags)
+_RpcEnumPerMachineConnections(WINSPOOL_HANDLE pServer, BYTE* pPrinterEnum, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
{
UNIMPLEMENTED;
return ERROR_INVALID_FUNCTION;
}
DWORD
-_RpcFlushPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, BYTE *pBuf, DWORD cbBuf, DWORD *pcWritten, DWORD cSleep)
-{
- UNIMPLEMENTED;
- return ERROR_INVALID_FUNCTION;
-}
-
-DWORD
-_RpcSendRecvBidiData(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR *pAction, WINSPOOL_BIDI_REQUEST_CONTAINER *pReqData, WINSPOOL_BIDI_RESPONSE_CONTAINER **ppRespData)
+_RpcSendRecvBidiData(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR* pAction, WINSPOOL_BIDI_REQUEST_CONTAINER* pReqData, WINSPOOL_BIDI_RESPONSE_CONTAINER** ppRespData)
{
UNIMPLEMENTED;
return ERROR_INVALID_FUNCTION;
--- /dev/null
+/*
+ * PROJECT: ReactOS Print Spooler Service
+ * LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
+ * PURPOSE: Xcv* functions
+ * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
+ */
+
+#include "precomp.h"
+
+DWORD
+_RpcXcvData(WINSPOOL_PRINTER_HANDLE hXcv, const WCHAR* pszDataName, BYTE* pInputData, DWORD cbInputData, BYTE* pOutputData, DWORD cbOutputData, DWORD* pcbOutputNeeded, DWORD* pdwStatus)
+{
+ UNIMPLEMENTED;
+ return ERROR_INVALID_FUNCTION;
+}
list(APPEND SOURCE
jobs.c
main.c
+ monitors.c
+ ports.c
precomp.h
printers.c
printprocessors.c
PJOB_INFO_1W pJobInfo1;
PJOB_INFO_2W pJobInfo2;
- // Replace absolute pointer addresses in the output by relative offsets.
+ // Replace relative offset addresses in the output by absolute pointers.
if (Level == 1)
{
pJobInfo1 = (PJOB_INFO_1W)pJobInfo;
--- /dev/null
+/*
+ * PROJECT: ReactOS Spooler API
+ * LICENSE: GNU LGPL v2.1 or any later version as published by the Free Software Foundation
+ * PURPOSE: Functions related to Print Monitors
+ * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
+ */
+
+#include "precomp.h"
+
+static void
+_MarshallUpMonitorInfo(PBYTE pMonitorInfo, DWORD Level)
+{
+ PMONITOR_INFO_2W pMonitorInfo2 = (PMONITOR_INFO_2W)pMonitorInfo; // MONITOR_INFO_1W is a subset of MONITOR_INFO_2W
+
+ // Replace relative offset addresses in the output by absolute pointers.
+ pMonitorInfo2->pName = (PWSTR)((ULONG_PTR)pMonitorInfo2->pName + (ULONG_PTR)pMonitorInfo2);
+
+ if (Level == 2)
+ {
+ pMonitorInfo2->pDLLName = (PWSTR)((ULONG_PTR)pMonitorInfo2->pDLLName + (ULONG_PTR)pMonitorInfo2);
+ pMonitorInfo2->pEnvironment = (PWSTR)((ULONG_PTR)pMonitorInfo2->pEnvironment + (ULONG_PTR)pMonitorInfo2);
+ }
+}
+
+BOOL WINAPI
+EnumMonitorsW(PWSTR pName, DWORD Level, PBYTE pMonitors, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
+{
+ DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pMonitors;
+
+ // Do the RPC call
+ RpcTryExcept
+ {
+ dwErrorCode = _RpcEnumMonitors(pName, Level, pMonitors, cbBuf, pcbNeeded, pcReturned);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwErrorCode = RpcExceptionCode();
+ ERR("_RpcEnumPorts failed with exception code %lu!\n", dwErrorCode);
+ }
+ RpcEndExcept;
+
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace relative offset addresses in the output by absolute pointers.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallUpMonitorInfo(p, Level);
+
+ if (Level == 1)
+ p += sizeof(MONITOR_INFO_1W);
+ else if (Level == 2)
+ p += sizeof(MONITOR_INFO_2W);
+ }
+ }
+
+ SetLastError(dwErrorCode);
+ return (dwErrorCode == ERROR_SUCCESS);
+}
--- /dev/null
+/*
+ * PROJECT: ReactOS Spooler API
+ * LICENSE: GNU LGPL v2.1 or any later version as published by the Free Software Foundation
+ * PURPOSE: Functions related to Ports
+ * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
+ */
+
+#include "precomp.h"
+
+static void
+_MarshallUpPortInfo(PBYTE pPortInfo, DWORD Level)
+{
+ PPORT_INFO_2W pPortInfo2 = (PPORT_INFO_2W)pPortInfo; // PORT_INFO_1W is a subset of PORT_INFO_2W
+
+ // Replace relative offset addresses in the output by absolute pointers.
+ pPortInfo2->pPortName = (PWSTR)((ULONG_PTR)pPortInfo2->pPortName + (ULONG_PTR)pPortInfo2);
+
+ if (Level == 2)
+ {
+ pPortInfo2->pDescription = (PWSTR)((ULONG_PTR)pPortInfo2->pDescription + (ULONG_PTR)pPortInfo2);
+ pPortInfo2->pMonitorName = (PWSTR)((ULONG_PTR)pPortInfo2->pMonitorName + (ULONG_PTR)pPortInfo2);
+ }
+}
+
+BOOL WINAPI
+EnumPortsW(PWSTR pName, DWORD Level, PBYTE pPorts, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
+{
+ DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pPorts;
+
+ // Do the RPC call
+ RpcTryExcept
+ {
+ dwErrorCode = _RpcEnumPorts(pName, Level, pPorts, cbBuf, pcbNeeded, pcReturned);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwErrorCode = RpcExceptionCode();
+ ERR("_RpcEnumPorts failed with exception code %lu!\n", dwErrorCode);
+ }
+ RpcEndExcept;
+
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace relative offset addresses in the output by absolute pointers.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallUpPortInfo(p, Level);
+
+ if (Level == 1)
+ p += sizeof(PORT_INFO_1W);
+ else if (Level == 2)
+ p += sizeof(PORT_INFO_2W);
+ }
+ }
+
+ SetLastError(dwErrorCode);
+ return (dwErrorCode == ERROR_SUCCESS);
+}
#include "precomp.h"
+static void
+_MarshallUpPrinterInfo(PBYTE pPrinterInfo, DWORD Level)
+{
+ PPRINTER_INFO_1W pPrinterInfo1;
+ PPRINTER_INFO_2W pPrinterInfo2;
+
+ // Replace relative offset addresses in the output by absolute pointers.
+ if (Level == 1)
+ {
+ pPrinterInfo1 = (PPRINTER_INFO_1W)pPrinterInfo;
+
+ pPrinterInfo1->pName = (PWSTR)((ULONG_PTR)pPrinterInfo1->pName + (ULONG_PTR)pPrinterInfo1);
+ pPrinterInfo1->pDescription = (PWSTR)((ULONG_PTR)pPrinterInfo1->pDescription + (ULONG_PTR)pPrinterInfo1);
+ pPrinterInfo1->pComment = (PWSTR)((ULONG_PTR)pPrinterInfo1->pComment + (ULONG_PTR)pPrinterInfo1);
+ }
+ else if (Level == 2)
+ {
+ pPrinterInfo2 = (PPRINTER_INFO_2W)pPrinterInfo;
+
+ pPrinterInfo2->pPrinterName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pPrinterName + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pShareName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pShareName + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pPortName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pPortName + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pDriverName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pDriverName + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pComment = (PWSTR)((ULONG_PTR)pPrinterInfo2->pComment + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pLocation = (PWSTR)((ULONG_PTR)pPrinterInfo2->pLocation + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pDevMode = (PDEVMODEW)((ULONG_PTR)pPrinterInfo2->pDevMode + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pSepFile = (PWSTR)((ULONG_PTR)pPrinterInfo2->pSepFile + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pPrintProcessor = (PWSTR)((ULONG_PTR)pPrinterInfo2->pPrintProcessor + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pDatatype = (PWSTR)((ULONG_PTR)pPrinterInfo2->pDatatype + (ULONG_PTR)pPrinterInfo2);
+ pPrinterInfo2->pParameters = (PWSTR)((ULONG_PTR)pPrinterInfo2->pParameters + (ULONG_PTR)pPrinterInfo2);
+
+ if (pPrinterInfo2->pServerName)
+ pPrinterInfo2->pServerName = (PWSTR)((ULONG_PTR)pPrinterInfo2->pServerName + (ULONG_PTR)pPrinterInfo2);
+
+ if (pPrinterInfo2->pSecurityDescriptor)
+ pPrinterInfo2->pSecurityDescriptor = (PWSTR)((ULONG_PTR)pPrinterInfo2->pSecurityDescriptor + (ULONG_PTR)pPrinterInfo2);
+ }
+}
+
static DWORD
_StartDocPrinterSpooled(PSPOOLER_HANDLE pHandle, PDOC_INFO_1W pDocInfo1, PADDJOB_INFO_1W pAddJobInfo1)
{
return dwErrorCode;
}
-BOOL WINAPI
-EnumPrintersA(DWORD Flags, LPSTR Name, DWORD Level, LPBYTE pPrinterEnum, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
-{
- return FALSE;
-}
-
-BOOL WINAPI
-EnumPrintersW(DWORD Flags, LPWSTR Name, DWORD Level, LPBYTE pPrinterEnum, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
-{
- DWORD dwErrorCode;
-
- // Do the RPC call
- RpcTryExcept
- {
- dwErrorCode = _RpcEnumPrinters(Flags, Name, Level, pPrinterEnum, cbBuf, pcbNeeded, pcReturned);
- }
- RpcExcept(EXCEPTION_EXECUTE_HANDLER)
- {
- dwErrorCode = RpcExceptionCode();
- ERR("_RpcEnumPrinters failed with exception code %lu!\n", dwErrorCode);
- }
- RpcEndExcept;
-
- SetLastError(dwErrorCode);
- return (dwErrorCode == ERROR_SUCCESS);
-}
-
BOOL WINAPI
ClosePrinter(HANDLE hPrinter)
{
return (dwErrorCode == ERROR_SUCCESS);
}
+BOOL WINAPI
+EnumPrintersA(DWORD Flags, PSTR Name, DWORD Level, PBYTE pPrinterEnum, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
+{
+ return FALSE;
+}
+
+BOOL WINAPI
+EnumPrintersW(DWORD Flags, PWSTR Name, DWORD Level, PBYTE pPrinterEnum, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
+{
+ DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pPrinterEnum;
+
+ // Do the RPC call
+ RpcTryExcept
+ {
+ dwErrorCode = _RpcEnumPrinters(Flags, Name, Level, pPrinterEnum, cbBuf, pcbNeeded, pcReturned);
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ dwErrorCode = RpcExceptionCode();
+ ERR("_RpcEnumPrinters failed with exception code %lu!\n", dwErrorCode);
+ }
+ RpcEndExcept;
+
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace relative offset addresses in the output by absolute pointers.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallUpPrinterInfo(p, Level);
+
+ if (Level == 1)
+ p += sizeof(PRINTER_INFO_1W);
+ else if (Level == 2)
+ p += sizeof(PRINTER_INFO_2W);
+ }
+ }
+
+ SetLastError(dwErrorCode);
+ return (dwErrorCode == ERROR_SUCCESS);
+}
+
BOOL WINAPI
GetDefaultPrinterA(LPSTR pszBuffer, LPDWORD pcchBuffer)
{
#include "precomp.h"
+static void
+_MarshallUpDatatypesInfo(PDATATYPES_INFO_1W pDatatypesInfo1)
+{
+ // Replace relative offset addresses in the output by absolute pointers.
+ pDatatypesInfo1->pName = (PWSTR)((ULONG_PTR)pDatatypesInfo1->pName + (ULONG_PTR)pDatatypesInfo1);
+}
+
+static void
+_MarshallUpPrintProcessorInfo(PPRINTPROCESSOR_INFO_1W pPrintProcessorInfo1)
+{
+ // Replace relative offset addresses in the output by absolute pointers.
+ pPrintProcessorInfo1->pName = (PWSTR)((ULONG_PTR)pPrintProcessorInfo1->pName + (ULONG_PTR)pPrintProcessorInfo1);
+}
+
BOOL WINAPI
-EnumPrintProcessorDatatypesA(LPSTR pName, LPSTR pPrintProcessorName, DWORD Level, LPBYTE pDatatypes, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
+EnumPrintProcessorDatatypesA(PSTR pName, LPSTR pPrintProcessorName, DWORD Level, PBYTE pDatatypes, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
{
return FALSE;
}
BOOL WINAPI
-EnumPrintProcessorDatatypesW(LPWSTR pName, LPWSTR pPrintProcessorName, DWORD Level, LPBYTE pDatatypes, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
+EnumPrintProcessorDatatypesW(PWSTR pName, LPWSTR pPrintProcessorName, DWORD Level, PBYTE pDatatypes, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
{
- BOOL bReturnValue = FALSE;
DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pDatatypes;
// Do the RPC call
RpcTryExcept
{
dwErrorCode = _RpcEnumPrintProcessorDatatypes(pName, pPrintProcessorName, Level, pDatatypes, cbBuf, pcbNeeded, pcReturned);
- SetLastError(dwErrorCode);
- bReturnValue = (dwErrorCode == ERROR_SUCCESS);
}
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
{
- ERR("_RpcEnumPrintProcessorDatatypes failed with exception code %lu!\n", RpcExceptionCode());
+ dwErrorCode = RpcExceptionCode();
+ ERR("_RpcEnumPrintProcessorDatatypes failed with exception code %lu!\n", dwErrorCode);
}
RpcEndExcept;
- return bReturnValue;
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace relative offset addresses in the output by absolute pointers.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallUpDatatypesInfo((PDATATYPES_INFO_1W)p);
+ p += sizeof(DATATYPES_INFO_1W);
+ }
+ }
+
+ SetLastError(dwErrorCode);
+ return (dwErrorCode == ERROR_SUCCESS);
}
BOOL WINAPI
-EnumPrintProcessorsW(LPWSTR pName, LPWSTR pEnvironment, DWORD Level, LPBYTE pPrintProcessorInfo, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
+EnumPrintProcessorsW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pPrintProcessorInfo, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
{
- BOOL bReturnValue = FALSE;
DWORD dwErrorCode;
+ DWORD i;
+ PBYTE p = pPrintProcessorInfo;
// Do the RPC call
RpcTryExcept
{
dwErrorCode = _RpcEnumPrintProcessors(pName, pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded, pcReturned);
- SetLastError(dwErrorCode);
- bReturnValue = (dwErrorCode == ERROR_SUCCESS);
}
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
{
- ERR("_RpcEnumPrintProcessors failed with exception code %lu!\n", RpcExceptionCode());
+ dwErrorCode = RpcExceptionCode();
+ ERR("_RpcEnumPrintProcessors failed with exception code %lu!\n", dwErrorCode);
}
RpcEndExcept;
- return bReturnValue;
+ if (dwErrorCode == ERROR_SUCCESS)
+ {
+ // Replace relative offset addresses in the output by absolute pointers.
+ for (i = 0; i < *pcReturned; i++)
+ {
+ _MarshallUpPrintProcessorInfo((PPRINTPROCESSOR_INFO_1W)p);
+ p += sizeof(PRINTPROCESSOR_INFO_1W);
+ }
+ }
+
+ SetLastError(dwErrorCode);
+ return (dwErrorCode == ERROR_SUCCESS);
}
BOOL WINAPI
-GetPrintProcessorDirectoryW(LPWSTR pName, LPWSTR pEnvironment, DWORD Level, LPBYTE pPrintProcessorInfo, DWORD cbBuf, LPDWORD pcbNeeded)
+GetPrintProcessorDirectoryW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pPrintProcessorInfo, DWORD cbBuf, PDWORD pcbNeeded)
{
BOOL bReturnValue = FALSE;
DWORD dwErrorCode;
185 stdcall EnumJobsA(long long long long ptr long ptr ptr)
186 stdcall EnumJobsW(long long long long ptr long ptr ptr)
187 stub EnumMonitorsA
-188 stub EnumMonitorsW
+188 stdcall EnumMonitorsW(wstr long ptr long ptr ptr)
189 stub EnumPortsA
-190 stub EnumPortsW
+190 stdcall EnumPortsW(wstr long ptr long ptr ptr)
191 stdcall EnumPrintProcessorDatatypesA(ptr ptr long ptr long ptr ptr)
192 stdcall EnumPrintProcessorDatatypesW(ptr ptr long ptr long ptr ptr)
193 stub EnumPrintProcessorsA