1 /*
2  * PROJECT:     ReactOS Print Spooler Service
3  * LICENSE:     GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE:     Unimplemented RPC calls
5  * COPYRIGHT:   Copyright 2015 Colin Finck (colin@reactos.org)
6  */
7 
8 #include "precomp.h"
9 
10 DWORD
_RpcCreatePrinterIC(WINSPOOL_PRINTER_HANDLE hPrinter,WINSPOOL_GDI_HANDLE * pHandle,WINSPOOL_DEVMODE_CONTAINER * pDevModeContainer)11 _RpcCreatePrinterIC(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_GDI_HANDLE* pHandle, WINSPOOL_DEVMODE_CONTAINER* pDevModeContainer)
12 {
13     UNIMPLEMENTED;
14     return ERROR_INVALID_FUNCTION;
15 }
16 
17 DWORD
_RpcPlayGdiScriptOnPrinterIC(WINSPOOL_GDI_HANDLE hPrinterIC,BYTE * pIn,DWORD cIn,BYTE * pOut,DWORD cOut,DWORD ul)18 _RpcPlayGdiScriptOnPrinterIC(WINSPOOL_GDI_HANDLE hPrinterIC, BYTE* pIn, DWORD cIn, BYTE* pOut, DWORD cOut, DWORD ul)
19 {
20     UNIMPLEMENTED;
21     return ERROR_INVALID_FUNCTION;
22 }
23 
24 DWORD
_RpcDeletePrinterIC(WINSPOOL_GDI_HANDLE * phPrinterIC)25 _RpcDeletePrinterIC(WINSPOOL_GDI_HANDLE* phPrinterIC)
26 {
27     UNIMPLEMENTED;
28     return ERROR_INVALID_FUNCTION;
29 }
30 
31 DWORD
_RpcAddPrinterConnection(WINSPOOL_HANDLE pName)32 _RpcAddPrinterConnection(WINSPOOL_HANDLE pName)
33 {
34     UNIMPLEMENTED;
35     return ERROR_INVALID_FUNCTION;
36 }
37 
38 DWORD
_RpcDeletePrinterConnection(WINSPOOL_HANDLE pName)39 _RpcDeletePrinterConnection(WINSPOOL_HANDLE pName)
40 {
41     UNIMPLEMENTED;
42     return ERROR_INVALID_FUNCTION;
43 }
44 
45 //
46 // Forward Dead API....
47 //
48 DWORD
_RpcPrinterMessageBox(WINSPOOL_PRINTER_HANDLE hPrinter,DWORD Error,ULONG_PTR hWnd,WCHAR * pText,WCHAR * pCaption,DWORD dwType)49 _RpcPrinterMessageBox(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Error, ULONG_PTR hWnd, WCHAR* pText, WCHAR* pCaption, DWORD dwType)
50 {
51     DWORD dwErrorCode;
52 
53     dwErrorCode = RpcImpersonateClient(NULL);
54     if (dwErrorCode != ERROR_SUCCESS)
55     {
56         ERR("RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
57         return dwErrorCode;
58     }
59 
60     PrinterMessageBoxW(hPrinter, Error, (HWND)hWnd, pText, pCaption, dwType);
61     dwErrorCode = GetLastError();
62 
63     RpcRevertToSelf();
64     return dwErrorCode;
65 }
66 
67 DWORD
_RpcSetAllocFailCount(VOID)68 _RpcSetAllocFailCount(VOID)
69 {
70     UNIMPLEMENTED;
71     return ERROR_INVALID_FUNCTION;
72 }
73 
74 DWORD
_RpcClusterSplOpen(VOID)75 _RpcClusterSplOpen(VOID)
76 {
77     UNIMPLEMENTED;
78     return ERROR_INVALID_FUNCTION;
79 }
80 
81 DWORD
_RpcClusterSplClose(VOID)82 _RpcClusterSplClose(VOID)
83 {
84     UNIMPLEMENTED;
85     return ERROR_INVALID_FUNCTION;
86 }
87 
88 DWORD
_RpcClusterSplIsAlive(VOID)89 _RpcClusterSplIsAlive(VOID)
90 {
91     UNIMPLEMENTED;
92     return ERROR_INVALID_FUNCTION;
93 }
94 
95 DWORD
_RpcAddPerMachineConnection(WINSPOOL_HANDLE pServer,const WCHAR * pPrinterName,const WCHAR * pPrintServer,const WCHAR * pProvider)96 _RpcAddPerMachineConnection(WINSPOOL_HANDLE pServer, const WCHAR* pPrinterName, const WCHAR* pPrintServer, const WCHAR* pProvider)
97 {
98     UNIMPLEMENTED;
99     return ERROR_INVALID_FUNCTION;
100 }
101 
102 DWORD
_RpcDeletePerMachineConnection(WINSPOOL_HANDLE pServer,const WCHAR * pPrinterName)103 _RpcDeletePerMachineConnection(WINSPOOL_HANDLE pServer, const WCHAR* pPrinterName)
104 {
105     UNIMPLEMENTED;
106     return ERROR_INVALID_FUNCTION;
107 }
108 
109 DWORD
_RpcEnumPerMachineConnections(WINSPOOL_HANDLE pServer,BYTE * pPrinterEnum,DWORD cbBuf,DWORD * pcbNeeded,DWORD * pcReturned)110 _RpcEnumPerMachineConnections(WINSPOOL_HANDLE pServer, BYTE* pPrinterEnum, DWORD cbBuf, DWORD* pcbNeeded, DWORD* pcReturned)
111 {
112     UNIMPLEMENTED;
113     return ERROR_INVALID_FUNCTION;
114 }
115 
116 DWORD
_RpcSplOpenPrinter(VOID)117 _RpcSplOpenPrinter(VOID)
118 {
119     UNIMPLEMENTED;
120     return ERROR_INVALID_FUNCTION;
121 }
122 
123 DWORD
_RpcSendRecvBidiData(WINSPOOL_PRINTER_HANDLE hPrinter,const WCHAR * pAction,WINSPOOL_BIDI_REQUEST_CONTAINER * pReqData,WINSPOOL_BIDI_RESPONSE_CONTAINER ** ppRespData)124 _RpcSendRecvBidiData(WINSPOOL_PRINTER_HANDLE hPrinter, const WCHAR* pAction, WINSPOOL_BIDI_REQUEST_CONTAINER* pReqData, WINSPOOL_BIDI_RESPONSE_CONTAINER** ppRespData)
125 {
126     UNIMPLEMENTED;
127     return ERROR_INVALID_FUNCTION;
128 }
129 
130 DWORD
_RpcAddDriverCatalog(VOID)131 _RpcAddDriverCatalog(VOID)
132 {
133     UNIMPLEMENTED;
134     return ERROR_INVALID_FUNCTION;
135 }
136