ReactOS 0.4.16-dev-237-gd6eebaa
printprocessors.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Spooler Router
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Functions related to Print Processors
5 * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin@reactos.org)
6 */
7
8#include "precomp.h"
9#include <prtprocenv.h>
10
12AddPrintProcessorW(PWSTR pName, PWSTR pEnvironment, PWSTR pPathName, PWSTR pPrintProcessorName)
13{
14 if (!pEnvironment || !*pEnvironment)
15 pEnvironment = (PWSTR)wszCurrentEnvironment;
16 return FALSE;
17}
18
20DeletePrintProcessorW(PWSTR pName, PWSTR pEnvironment, PWSTR pPrintProcessorName)
21{
22 if (!pEnvironment || !*pEnvironment)
23 pEnvironment = (PWSTR)wszCurrentEnvironment;
24 return FALSE;
25}
26
28EnumPrintProcessorDatatypesW(PWSTR pName, PWSTR pPrintProcessorName, DWORD Level, PBYTE pDatatypes, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
29{
30 PSPOOLSS_PRINT_PROVIDER pPrintProvider;
31
32 // Sanity checks
33 if (cbBuf && !pDatatypes)
34 {
36 return FALSE;
37 }
38
39 if ( cbBuf && !pDatatypes )
40 {
42 return FALSE;
43 }
44
45 // Always call this function on the Local Spooler.
47 return pPrintProvider->PrintProvider.fpEnumPrintProcessorDatatypes(pName, pPrintProcessorName, Level, pDatatypes, cbBuf, pcbNeeded, pcReturned);
48}
49
51EnumPrintProcessorsW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pPrintProcessorInfo, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
52{
53 // Always call this function on the Local Spooler.
55
56 if ( cbBuf && !pPrintProcessorInfo )
57 {
59 return FALSE;
60 }
61
62 return pPrintProvider->PrintProvider.fpEnumPrintProcessors(pName, pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded, pcReturned);
63}
64
66GetPrintProcessorDirectoryW(PWSTR pName, PWSTR pEnvironment, DWORD Level, PBYTE pPrintProcessorInfo, DWORD cbBuf, PDWORD pcbNeeded)
67{
68 PSPOOLSS_PRINT_PROVIDER pPrintProvider;
69
70 // Sanity checks
71 if (cbBuf && !pPrintProcessorInfo)
72 {
74 return FALSE;
75 }
76
77 if ( cbBuf && !pPrintProcessorInfo )
78 {
80 return FALSE;
81 }
82
83 // Always call this function on the Local Spooler.
85 return pPrintProvider->PrintProvider.fpGetPrintProcessorDirectory(pName, pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded);
86}
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)
const WCHAR wszCurrentEnvironment[]
Definition: prtprocenv.h:11
#define FALSE
Definition: types.h:117
#define SetLastError(x)
Definition: compat.h:752
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static LPSTR pName
Definition: security.c:75
BYTE * PBYTE
Definition: pedump.c:66
DWORD * PDWORD
Definition: pedump.c:68
base of all file and directory entries
Definition: entries.h:83
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
PRINTPROVIDOR PrintProvider
Definition: precomp.h:36
uint16_t * PWSTR
Definition: typedefs.h:56
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
LIST_ENTRY PrintProviderList
Definition: main.c:12
_In_ DWORD _Out_ PDWORD pcbNeeded
Definition: winddi.h:3828
#define WINAPI
Definition: msvc.h:6
#define ERROR_INVALID_USER_BUFFER
Definition: winerror.h:1091
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56