18 TRACE(
"AddPrintProcessorA(%s, %s, %s, %s)\n",
pName, pEnvironment, pPathName, pPrintProcessorName);
40 TRACE(
"AddPrintProcessorW(%S, %S, %S, %S)\n",
pName, pEnvironment, pPathName, pPrintProcessorName);
49 ERR(
"_RpcPrintProcessor failed with exception code %lu!\n", dwErrorCode);
63 TRACE(
"DeletePrintProcessorA(%s, %s, %s)\n",
pName, pEnvironment, pPrintProcessorName);
83 TRACE(
"DeletePrintProcessorW(%S, %S, %S)\n",
pName, pEnvironment, pPrintProcessorName);
92 ERR(
"_RpcDeletePrintProcessor failed with exception code %lu!\n", dwErrorCode);
103 TRACE(
"EnumPrintProcessorDatatypesA(%s, %s, %lu, %p, %lu, %p, %p)\n",
pName, pPrintProcessorName,
Level, pDatatypes, cbBuf,
pcbNeeded, pcReturned);
113 TRACE(
"EnumPrintProcessorDatatypesW(%S, %S, %lu, %p, %lu, %p, %p)\n",
pName, pPrintProcessorName,
Level, pDatatypes, cbBuf,
pcbNeeded, pcReturned);
130 ERR(
"_RpcEnumPrintProcessorDatatypes failed with exception code %lu!\n", dwErrorCode);
153 DWORD numentries = 0;
156 TRACE(
"EnumPrintProcessorsA(%s, %s, %d, %p, %d, %p, %p)\n",
debugstr_a(
pName),
debugstr_a(pEnvironment),
Level, pPrintProcessorInfo, cbBuf,
pcbNeeded, pcReturned);
173 needed = cbBuf *
sizeof(
WCHAR);
187 numentries = pcReturned ? *pcReturned : 0;
202 while (
index < numentries)
230 while ((
index < numentries) && pPrintProcessorInfo)
233 TRACE(
"%p: writing PRINTPROCESSOR_INFO_1A #%d\n", ppia,
index);
247 if (pcReturned) *pcReturned = (
res) ? numentries : 0;
253 TRACE(
"returning %d with %d (%d byte for %d entries)\n", (
res),
GetLastError(), needed, numentries);
264 TRACE(
"EnumPrintProcessorsW(%S, %S, %lu, %p, %lu, %p, %p)\n",
pName, pEnvironment,
Level, pPrintProcessorInfo, cbBuf,
pcbNeeded, pcReturned);
300 TRACE(
"GetPrintProcessorDirectoryA(%s, %s, %lu, %p, %lu, %p)\n",
pName, pEnvironment,
Level, pPrintProcessorInfo, cbBuf,
pcbNeeded);
311 ERR(
"HeapAlloc failed!\n");
324 if (!pwszEnvironment)
327 ERR(
"HeapAlloc failed!\n");
334 if (cbBuf && pPrintProcessorInfo)
340 if (!pwszPrintProcessorInfo)
343 ERR(
"HeapAlloc failed!\n");
363 if (pwszPrintProcessorInfo)
374 TRACE(
"GetPrintProcessorDirectoryW(%S, %S, %lu, %p, %lu, %p)\n",
pName, pEnvironment,
Level, pPrintProcessorInfo, cbBuf,
pcbNeeded);
ACPI_SIZE strlen(const char *String)
static const WCHAR nameW[]
BOOL WINAPI EnumPrintProcessorDatatypesW(PWSTR pName, PWSTR pPrintProcessorName, DWORD Level, PBYTE pDatatypes, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
BOOL WINAPI GetPrintProcessorDirectoryW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pPrintProcessorInfo, DWORD cbBuf, PDWORD pcbNeeded)
BOOL WINAPI AddPrintProcessorW(PWSTR pName, PWSTR pEnvironment, PWSTR pPathName, PWSTR pPrintProcessorName)
BOOL WINAPI DeletePrintProcessorW(PWSTR pName, PWSTR pEnvironment, PWSTR pPrintProcessorName)
BOOL WINAPI EnumPrintProcessorsW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pPrintProcessorInfo, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
DWORD _RpcAddPrintProcessor(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, WCHAR *pPathName, WCHAR *pPrintProcessorName)
DWORD _RpcEnumPrintProcessors(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, DWORD Level, BYTE *pPrintProcessorInfo, DWORD cbBuf, DWORD *pcbNeeded, DWORD *pcReturned)
DWORD _RpcDeletePrintProcessor(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, WCHAR *pPrintProcessorName)
DWORD _RpcGetPrintProcessorDirectory(WINSPOOL_HANDLE pName, WCHAR *pEnvironment, DWORD Level, BYTE *pPrintProcessorDirectory, DWORD cbBuf, DWORD *pcbNeeded)
DWORD _RpcEnumPrintProcessorDatatypes(WINSPOOL_HANDLE pName, WCHAR *pPrintProcessorName, DWORD Level, BYTE *pDatatypes, DWORD cbBuf, DWORD *pcbNeeded, DWORD *pcReturned)
const WCHAR wszCurrentEnvironment[]
BOOL WINAPI EnumPrintProcessorDatatypesA(PSTR pName, LPSTR pPrintProcessorName, DWORD Level, PBYTE pDatatypes, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
BOOL WINAPI EnumPrintProcessorsA(PSTR pName, PSTR pEnvironment, DWORD Level, PBYTE pPrintProcessorInfo, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
BOOL WINAPI DeletePrintProcessorA(PSTR pName, PSTR pEnvironment, PSTR pPrintProcessorName)
BOOL WINAPI AddPrintProcessorA(PSTR pName, PSTR pEnvironment, PSTR pPathName, PSTR pPrintProcessorName)
BOOL WINAPI GetPrintProcessorDirectoryA(PSTR pName, PSTR pEnvironment, DWORD Level, PBYTE pPrintProcessorInfo, DWORD cbBuf, PDWORD pcbNeeded)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR Cleanup[]
#define EXCEPTION_EXECUTE_HANDLER
BOOL WINAPI MarshallUpStructuresArray(DWORD cbSize, PVOID pStructuresArray, DWORD cElements, const MARSHALLING_INFO *pInfo, DWORD cbStructureSize, BOOL bSomeBoolean)
wstring AsciiToUnicode(const char *AsciiString)
static DWORD DWORD void LPSTR DWORD cch
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
static const MARSHALLING DatatypesInfo1Marshalling
static const MARSHALLING PrintProcessorInfo1Marshalling
#define RpcExceptionCode()
DWORD WINAPI GetLastError(void)
_In_ DWORD _Out_ PDWORD pcbNeeded
#define ERROR_INVALID_LEVEL
struct _PRINTPROCESSOR_INFO_1W * PPRINTPROCESSOR_INFO_1W
struct _PRINTPROCESSOR_INFO_1W PRINTPROCESSOR_INFO_1W
struct _PRINTPROCESSOR_INFO_1A * PPRINTPROCESSOR_INFO_1A
struct _PRINTPROCESSOR_INFO_1A PRINTPROCESSOR_INFO_1A
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level