[WINSPOOL]
[reactos.git] / reactos / win32ss / printing / base / winspool / printprocessors.c
1 /*
2 * PROJECT: ReactOS Spooler API
3 * LICENSE: GNU LGPL v2.1 or any later version as published by the Free Software Foundation
4 * PURPOSE: Functions related to Print Processors
5 * COPYRIGHT: Copyright 2015 Colin Finck <colin@reactos.org>
6 */
7
8 #include "precomp.h"
9
10 BOOL WINAPI
11 EnumPrintProcessorDatatypesA(LPSTR pName, LPSTR pPrintProcessorName, DWORD Level, LPBYTE pDatatypes, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
12 {
13 return FALSE;
14 }
15
16 BOOL WINAPI
17 EnumPrintProcessorDatatypesW(LPWSTR pName, LPWSTR pPrintProcessorName, DWORD Level, LPBYTE pDatatypes, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
18 {
19 BOOL bReturnValue = FALSE;
20 DWORD dwErrorCode;
21
22 // Do the RPC call
23 RpcTryExcept
24 {
25 dwErrorCode = _RpcEnumPrintProcessorDatatypes(pName, pPrintProcessorName, Level, pDatatypes, cbBuf, pcbNeeded, pcReturned);
26 SetLastError(dwErrorCode);
27 bReturnValue = (dwErrorCode == ERROR_SUCCESS);
28 }
29 RpcExcept(EXCEPTION_EXECUTE_HANDLER)
30 {
31 ERR("_RpcEnumPrintProcessorDatatypes failed with exception code %lu!\n", RpcExceptionCode());
32 }
33 RpcEndExcept;
34
35 return bReturnValue;
36 }
37
38 BOOL WINAPI
39 EnumPrintProcessorsW(LPWSTR pName, LPWSTR pEnvironment, DWORD Level, LPBYTE pPrintProcessorInfo, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
40 {
41 BOOL bReturnValue = FALSE;
42 DWORD dwErrorCode;
43
44 // Do the RPC call
45 RpcTryExcept
46 {
47 dwErrorCode = _RpcEnumPrintProcessors(pName, pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded, pcReturned);
48 SetLastError(dwErrorCode);
49 bReturnValue = (dwErrorCode == ERROR_SUCCESS);
50 }
51 RpcExcept(EXCEPTION_EXECUTE_HANDLER)
52 {
53 ERR("_RpcEnumPrintProcessors failed with exception code %lu!\n", RpcExceptionCode());
54 }
55 RpcEndExcept;
56
57 return bReturnValue;
58 }
59
60 BOOL WINAPI
61 GetPrintProcessorDirectoryW(LPWSTR pName, LPWSTR pEnvironment, DWORD Level, LPBYTE pPrintProcessorInfo, DWORD cbBuf, LPDWORD pcbNeeded)
62 {
63 BOOL bReturnValue = FALSE;
64 DWORD dwErrorCode;
65
66 // Do the RPC call
67 RpcTryExcept
68 {
69 dwErrorCode = _RpcGetPrintProcessorDirectory(pName, pEnvironment, Level, pPrintProcessorInfo, cbBuf, pcbNeeded);
70 SetLastError(dwErrorCode);
71 bReturnValue = (dwErrorCode == ERROR_SUCCESS);
72 }
73 RpcExcept(EXCEPTION_EXECUTE_HANDLER)
74 {
75 ERR("_RpcGetPrintProcessorDirectory failed with exception code %lu!\n", RpcExceptionCode());
76 }
77 RpcEndExcept;
78
79 return bReturnValue;
80 }