2 * Definitions for print provider, monitor, processor and spooler
4 * Copyright 2005 Detlef Riekenberg
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 * "providor" is not a spelling error in this file. It's the real name.
34 #define PRINTER_NOTIFY_STATUS_ENDPOINT 1
35 #define PRINTER_NOTIFY_STATUS_POLL 2
36 #define PRINTER_NOTIFY_STATUS_INFO 4
39 #define ROUTER_UNKNOWN 0
40 #define ROUTER_SUCCESS 1
41 #define ROUTER_STOP_ROUTING 2
44 * WARNING: Many Functions are declared as "BOOL", but return ROUTER_*
50 typedef struct _MONITOR {
51 BOOL (WINAPI *pfnEnumPorts)(LPWSTR pName, DWORD Level, LPBYTE pPorts,
52 DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned);
53 BOOL (WINAPI *pfnOpenPort)(LPWSTR pName, PHANDLE pHandle);
54 BOOL (WINAPI *pfnOpenPortEx)(LPWSTR pPortName, LPWSTR pPrinterName,
55 PHANDLE pHandle, struct _MONITOR *pMonitor);
56 BOOL (WINAPI *pfnStartDocPort)(HANDLE hPort, LPWSTR pPrinterName,
57 DWORD JobId, DWORD Level, LPBYTE pDocInfo);
58 BOOL (WINAPI *pfnWritePort)(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuf,
60 BOOL (WINAPI *pfnReadPort)(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuffer,
62 BOOL (WINAPI *pfnEndDocPort)(HANDLE hPort);
63 BOOL (WINAPI *pfnClosePort)(HANDLE hPort);
64 BOOL (WINAPI *pfnAddPort)(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName);
65 BOOL (WINAPI *pfnAddPortEx)(LPWSTR pName, DWORD Level, LPBYTE lpBuffer,
66 LPWSTR lpMonitorName);
67 BOOL (WINAPI *pfnConfigurePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
68 BOOL (WINAPI *pfnDeletePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
69 BOOL (WINAPI *pfnGetPrinterDataFromPort)(HANDLE hPort, DWORD ControlID,
70 LPWSTR pValueName, LPWSTR lpInBuffer, DWORD cbInBuffer,
71 LPWSTR lpOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbReturned);
72 BOOL (WINAPI *pfnSetPortTimeOuts)(HANDLE hPort, LPCOMMTIMEOUTS lpCTO,
74 BOOL (WINAPI *pfnXcvOpenPort)(LPCWSTR pszObject, ACCESS_MASK GrantedAccess, PHANDLE phXcv);
75 DWORD (WINAPI *pfnXcvDataPort)(HANDLE hXcv, LPCWSTR pszDataName,
76 PBYTE pInputData, DWORD cbInputData,
77 PBYTE pOutputData, DWORD cbOutputData, PDWORD pcbOutputNeeded);
78 BOOL (WINAPI *pfnXcvClosePort)(HANDLE hXcv);
79 } MONITOR, *LPMONITOR;
81 typedef struct _MONITOR2 {
83 BOOL (WINAPI *pfnEnumPorts)(LPWSTR pName, DWORD Level, LPBYTE pPorts,
84 DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned);
85 BOOL (WINAPI *pfnOpenPort)(LPWSTR pName, PHANDLE pHandle);
86 BOOL (WINAPI *pfnOpenPortEx)(LPWSTR pPortName, LPWSTR pPrinterName,
87 PHANDLE pHandle, struct _MONITOR2 *pMonitor2);
88 BOOL (WINAPI *pfnStartDocPort)(HANDLE hPort, LPWSTR pPrinterName,
89 DWORD JobId, DWORD Level, LPBYTE pDocInfo);
90 BOOL (WINAPI *pfnWritePort)(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuf,
92 BOOL (WINAPI *pfnReadPort)(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuffer,
94 BOOL (WINAPI *pfnEndDocPort)(HANDLE hPort);
95 BOOL (WINAPI *pfnClosePort)(HANDLE hPort);
96 BOOL (WINAPI *pfnAddPort)(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName);
97 BOOL (WINAPI *pfnAddPortEx)(LPWSTR pName, DWORD Level, LPBYTE lpBuffer,
98 LPWSTR lpMonitorName);
99 BOOL (WINAPI *pfnConfigurePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
100 BOOL (WINAPI *pfnDeletePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
101 BOOL (WINAPI *pfnGetPrinterDataFromPort)(HANDLE hPort, DWORD ControlID,
102 LPWSTR pValueName, LPWSTR lpInBuffer, DWORD cbInBuffer,
103 LPWSTR lpOutBuffer, DWORD cbOutBuffer, LPDWORD lpcbReturned);
104 BOOL (WINAPI *pfnSetPortTimeOuts)(HANDLE hPort, LPCOMMTIMEOUTS lpCTO,
106 BOOL (WINAPI *pfnXcvOpenPort)(HANDLE hMonitor, LPCWSTR pszObject,
107 ACCESS_MASK GrantedAccess, PHANDLE phXcv);
108 DWORD (WINAPI *pfnXcvDataPort)(HANDLE hXcv, LPCWSTR pszDataName,
109 PBYTE pInputData, DWORD cbInputData,
110 PBYTE pOutputData, DWORD cbOutputData, PDWORD pcbOutputNeeded);
111 BOOL (WINAPI *pfnXcvClosePort)(HANDLE hXcv);
112 /* Additions from MONITOR to MONITOR2 */
113 VOID (WINAPI *pfnShutdown)(HANDLE hMonitor);
114 DWORD (WINAPI *pfnSendRecvBidiDataFromPort)(HANDLE hPort, DWORD dwAccessBit,
115 LPCWSTR pAction, PBIDI_REQUEST_CONTAINER pReqData,
116 PBIDI_RESPONSE_CONTAINER *ppResData);
117 } MONITOR2, *LPMONITOR2, *PMONITOR2;
119 typedef struct _MONITOREX {
122 } MONITOREX, *LPMONITOREX;
124 typedef struct _MONITORREG {
126 LONG (WINAPI *fpCreateKey)(HANDLE hcKey, LPCWSTR pszSubKey, DWORD dwOptions,
127 REGSAM samDesired, PSECURITY_ATTRIBUTES pSecurityAttributes,
128 PHANDLE phckResult, PDWORD pdwDisposition, HANDLE hSpooler);
129 LONG (WINAPI *fpOpenKey)(HANDLE hcKey, LPCWSTR pszSubKey, REGSAM samDesired,
130 PHANDLE phkResult, HANDLE hSpooler);
131 LONG (WINAPI *fpCloseKey)(HANDLE hcKey, HANDLE hSpooler);
132 LONG (WINAPI *fpDeleteKey)(HANDLE hcKey, LPCWSTR pszSubKey, HANDLE hSpooler);
133 LONG (WINAPI *fpEnumKey)(HANDLE hcKey, DWORD dwIndex, LPWSTR pszName,
134 PDWORD pcchName, PFILETIME pftLastWriteTime, HANDLE hSpooler);
135 LONG (WINAPI *fpQueryInfoKey)(HANDLE hcKey, PDWORD pcSubKeys, PDWORD pcbKey,
136 PDWORD pcValues, PDWORD pcbValue, PDWORD pcbData,
137 PDWORD pcbSecurityDescriptor, PFILETIME pftLastWriteTime,
139 LONG (WINAPI *fpSetValue)(HANDLE hcKey, LPCWSTR pszValue, DWORD dwType,
140 const BYTE* pData, DWORD cbData, HANDLE hSpooler);
141 LONG (WINAPI *fpDeleteValue)(HANDLE hcKey, LPCWSTR pszValue, HANDLE hSpooler);
142 LONG (WINAPI *fpEnumValue)(HANDLE hcKey, DWORD dwIndex, LPWSTR pszValue,
143 PDWORD pcbValue, PDWORD pType, PBYTE pData, PDWORD pcbData,
145 LONG (WINAPI *fpQueryValue)(HANDLE hcKey, LPCWSTR pszValue, PDWORD pType,
146 PBYTE pData, PDWORD pcbData, HANDLE hSpooler);
147 } MONITORREG, *PMONITORREG;
149 typedef struct _MONITORINIT {
152 HANDLE hckRegistryRoot;
153 PMONITORREG pMonitorReg;
155 } MONITORINIT, *PMONITORINIT;
157 typedef struct _MONITORUI {
158 DWORD dwMonitorUISize;
159 BOOL (WINAPI *pfnAddPortUI)(PCWSTR pszServer, HWND hWnd,
160 PCWSTR pszPortNameIn, PWSTR *ppszPortNameOut);
161 BOOL (WINAPI *pfnConfigurePortUI)(PCWSTR pName, HWND hWnd, PCWSTR pPortName);
162 BOOL (WINAPI *pfnDeletePortUI)(PCWSTR pszServer, HWND hWnd, PCWSTR pszPortName);
163 }MONITORUI, *PMONITORUI;
165 typedef struct _PRINTER_NOTIFY_INIT {
169 } PRINTER_NOTIFY_INIT, *LPPRINTER_NOTIFY_INIT, *PPRINTER_NOTIFY_INIT;
171 typedef struct _PRINTPROCESSOROPENDATA {
175 LPWSTR pDocumentName;
179 } PRINTPROCESSOROPENDATA, *LPPRINTPROCESSOROPENDATA, *PPRINTPROCESSOROPENDATA;
183 * WARNING: Many Functions are declared as "BOOL", but return ROUTER_*
186 typedef struct _PRINTPROVIDOR {
187 BOOL (WINAPI *fpOpenPrinter)(LPWSTR lpPrinterName, HANDLE *phPrinter,
188 LPPRINTER_DEFAULTSW pDefault);
189 BOOL (WINAPI *fpSetJob)(HANDLE hPrinter, DWORD JobID, DWORD Level,
190 LPBYTE pJob, DWORD Command);
191 BOOL (WINAPI *fpGetJob)(HANDLE hPrinter, DWORD JobID, DWORD Level,
192 LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded);
193 BOOL (WINAPI *fpEnumJobs)(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs,
194 DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded,
196 HANDLE (WINAPI *fpAddPrinter)(LPWSTR pName, DWORD Level, LPBYTE pPrinter);
197 BOOL (WINAPI *fpDeletePrinter)(HANDLE hPrinter);
198 BOOL (WINAPI *fpSetPrinter)(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
200 BOOL (WINAPI *fpGetPrinter)(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
201 DWORD cbBuf, LPDWORD pcbNeeded);
202 BOOL (WINAPI *fpEnumPrinters)(DWORD dwType, LPWSTR lpszName, DWORD dwLevel,
203 LPBYTE lpbPrinters, DWORD cbBuf, LPDWORD lpdwNeeded,
204 LPDWORD lpdwReturned);
205 BOOL (WINAPI *fpAddPrinterDriver)(LPWSTR pName, DWORD Level,
207 BOOL (WINAPI *fpEnumPrinterDrivers)(LPWSTR pName, LPWSTR pEnvironment,
208 DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf,
209 LPDWORD pcbNeeded, LPDWORD pcbReturned);
210 BOOL (WINAPI *fpGetPrinterDriver)(HANDLE hPrinter, LPWSTR pEnvironment,
211 DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf,
213 BOOL (WINAPI *fpGetPrinterDriverDirectory)(LPWSTR pName, LPWSTR pEnvironment,
214 DWORD Level, LPBYTE pDriverDirectory, DWORD cbBuf,
216 BOOL (WINAPI *fpDeletePrinterDriver)(LPWSTR pName, LPWSTR pEnvironment,
218 BOOL (WINAPI *fpAddPrintProcessor)(LPWSTR pName, LPWSTR pEnvironment,
219 LPWSTR pPathName, LPWSTR pPrintProcessorName);
220 BOOL (WINAPI *fpEnumPrintProcessors)(LPWSTR pName, LPWSTR pEnvironment,
221 DWORD Level, LPBYTE pPrintProcessorInfo, DWORD cbBuf,
222 LPDWORD pcbNeeded, LPDWORD pcbReturned);
223 BOOL (WINAPI *fpGetPrintProcessorDirectory)(LPWSTR pName, LPWSTR pEnvironment,
224 DWORD Level, LPBYTE pPrintProcessorInfo, DWORD cbBuf,
226 BOOL (WINAPI *fpDeletePrintProcessor)(LPWSTR pName, LPWSTR pEnvironment,
227 LPWSTR pPrintProcessorName);
228 BOOL (WINAPI *fpEnumPrintProcessorDatatypes)(LPWSTR pName,
229 LPWSTR pPrintProcessorName, DWORD Level, LPBYTE pDatatypes,
230 DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcbReturned);
231 DWORD (WINAPI *fpStartDocPrinter)(HANDLE hPrinter, DWORD Level, LPBYTE pDocInfo);
232 BOOL (WINAPI *fpStartPagePrinter)(HANDLE hPrinter);
233 BOOL (WINAPI *fpWritePrinter)(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf,
235 BOOL (WINAPI *fpEndPagePrinter)(HANDLE hPrinter);
236 BOOL (WINAPI *fpAbortPrinter)(HANDLE hPrinter);
237 BOOL (WINAPI *fpReadPrinter)(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf,
238 LPDWORD pNoBytesRead);
239 BOOL (WINAPI *fpEndDocPrinter)(HANDLE hPrinter);
240 BOOL (WINAPI *fpAddJob)(HANDLE hPrinter, DWORD Level, LPBYTE pData,
241 DWORD cbBuf, LPDWORD pcbNeeded);
242 BOOL (WINAPI *fpScheduleJob)(HANDLE hPrinter, DWORD JobID);
243 DWORD (WINAPI *fpGetPrinterData)(HANDLE hPrinter, LPWSTR pValueName,
244 LPDWORD pType, LPBYTE pData, DWORD nSize, LPDWORD pcbNeeded);
245 DWORD (WINAPI *fpSetPrinterData)(HANDLE hPrinter, LPWSTR pValueName,
246 DWORD Type, LPBYTE pData, DWORD cbData);
247 DWORD (WINAPI *fpWaitForPrinterChange)(HANDLE hPrinter, DWORD Flags);
248 BOOL (WINAPI *fpClosePrinter)(HANDLE phPrinter);
249 BOOL (WINAPI *fpAddForm)(HANDLE hPrinter, DWORD Level, LPBYTE pForm);
250 BOOL (WINAPI *fpDeleteForm)(HANDLE hPrinter, LPWSTR pFormName);
251 BOOL (WINAPI *fpGetForm)(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
252 LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded);
253 BOOL (WINAPI *fpSetForm)(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
255 BOOL (WINAPI *fpEnumForms)(HANDLE hPrinter, DWORD Level, LPBYTE pForm,
256 DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned);
257 BOOL (WINAPI *fpEnumMonitors)(LPWSTR pName, DWORD Level, LPBYTE pMonitors,
258 DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned);
259 BOOL (WINAPI *fpEnumPorts)(LPWSTR pName, DWORD Level, LPBYTE pPorts,
260 DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned);
261 BOOL (WINAPI *fpAddPort)(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName);
262 BOOL (WINAPI *fpConfigurePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
263 BOOL (WINAPI *fpDeletePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
264 HANDLE (WINAPI *fpCreatePrinterIC)(HANDLE hPrinter, LPDEVMODEW pDevMode);
265 BOOL (WINAPI *fpPlayGdiScriptOnPrinterIC)(HANDLE hPrinterIC, LPBYTE pIn,
266 DWORD cIn, LPBYTE pOut, DWORD cOut, DWORD ul);
267 BOOL (WINAPI *fpDeletePrinterIC)(HANDLE hPrinterIC);
268 BOOL (WINAPI *fpAddPrinterConnection)(LPWSTR pName);
269 BOOL (WINAPI *fpDeletePrinterConnection)(LPWSTR pName);
270 DWORD (WINAPI *fpPrinterMessageBox)(HANDLE hPrinter, DWORD Error, HWND hWnd,
271 LPWSTR pText, LPWSTR pCaption, DWORD dwType);
272 BOOL (WINAPI *fpAddMonitor)(LPWSTR pName, DWORD Level, LPBYTE pMonitors);
273 BOOL (WINAPI *fpDeleteMonitor)(LPWSTR pName, LPWSTR pEnvironment,
274 LPWSTR pMonitorName);
275 BOOL (WINAPI *fpResetPrinter)(HANDLE hPrinter, LPPRINTER_DEFAULTSW pDefault);
276 BOOL (WINAPI *fpGetPrinterDriverEx)(HANDLE hPrinter, LPWSTR pEnvironment,
277 DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf, LPDWORD pcbNeeded,
278 DWORD dwClientMajorVersion, DWORD dwClientMinorVersion,
279 PDWORD pdwServerMajorVersion, PDWORD pdwServerMinorVersion);
280 HANDLE (WINAPI *fpFindFirstPrinterChangeNotification)(HANDLE hPrinter,
281 DWORD fdwFlags, DWORD fdwOptions, LPVOID pPrinterNotifyOptions);
282 BOOL (WINAPI *fpFindClosePrinterChangeNotification)(HANDLE hChange);
283 BOOL (WINAPI *fpAddPortEx)(HANDLE hMonitor, LPWSTR pName, DWORD Level,
284 LPBYTE lpBuffer, LPWSTR lpMonitorName);
285 BOOL (WINAPI *fpShutDown)(LPVOID pvReserved);
286 BOOL (WINAPI *fpRefreshPrinterChangeNotification)(HANDLE hPrinter,
287 DWORD Reserved, PVOID pvReserved, PVOID pPrinterNotifyInfo);
288 BOOL (WINAPI *fpOpenPrinterEx)(LPWSTR pPrinterName, LPHANDLE phPrinter,
289 LPPRINTER_DEFAULTSW pDefault, LPBYTE pClientInfo, DWORD Level);
290 HANDLE (WINAPI *fpAddPrinterEx)(LPWSTR pName, DWORD Level, LPBYTE pPrinter,
291 LPBYTE pClientInfo, DWORD ClientInfoLevel);
292 BOOL (WINAPI *fpSetPort)(LPWSTR pName, LPWSTR pPortName, DWORD dwLevel,
294 DWORD (WINAPI *fpEnumPrinterData)( HANDLE hPrinter, DWORD dwIndex,
295 LPWSTR pValueName, DWORD cbValueName, LPDWORD pcbValueName,
296 LPDWORD pType, LPBYTE pData, DWORD cbData, LPDWORD pcbData);
297 DWORD (WINAPI *fpDeletePrinterData)(HANDLE hPrinter, LPWSTR pValueName);
298 DWORD (WINAPI *fpClusterSplOpen)(LPCWSTR pszServer, LPCWSTR pszResource,
299 PHANDLE phSpooler, LPCWSTR pszName, LPCWSTR pszAddress);
300 DWORD (WINAPI *fpClusterSplClose)(HANDLE hSpooler);
301 DWORD (WINAPI *fpClusterSplIsAlive)(HANDLE hSpooler);
302 DWORD (WINAPI *fpSetPrinterDataEx)(HANDLE hPrinter, LPCWSTR pKeyName,
303 LPCWSTR pValueName, DWORD Type, LPBYTE pData, DWORD cbData);
304 DWORD (WINAPI *fpGetPrinterDataEx)(HANDLE hPrinter, LPCWSTR pKeyName,
305 LPCWSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD nSize,
307 DWORD (WINAPI *fpEnumPrinterDataEx)(HANDLE hPrinter, LPCWSTR pKeyName,
308 LPBYTE pEnumValues, DWORD cbEnumValues, LPDWORD pcbEnumValues,
309 LPDWORD pnEnumValues);
310 DWORD (WINAPI *fpEnumPrinterKey)(HANDLE hPrinter, LPCWSTR pKeyName,
311 LPWSTR pSubkey, DWORD cbSubkey, LPDWORD pcbSubkey);
312 DWORD (WINAPI *fpDeletePrinterDataEx)(HANDLE hPrinter, LPCWSTR pKeyName,
314 DWORD (WINAPI *fpDeletePrinterKey)(HANDLE hPrinter, LPCWSTR pKeyName);
315 BOOL (WINAPI *fpSeekPrinter)(HANDLE hPrinter, LARGE_INTEGER liDistanceToMove,
316 PLARGE_INTEGER pliNewPointer, DWORD dwMoveMethod, BOOL bWrite);
317 BOOL (WINAPI *fpDeletePrinterDriverEx)(LPWSTR pName, LPWSTR pEnvironment,
318 LPWSTR pDriverName, DWORD dwDeleteFlag, DWORD dwVersionNum);
319 BOOL (WINAPI *fpAddPerMachineConnection)(LPCWSTR pServer,
320 LPCWSTR pPrinterName, LPCWSTR pPrintServer, LPCWSTR pProvider);
321 BOOL (WINAPI *fpDeletePerMachineConnection)(LPCWSTR pServer,
322 LPCWSTR pPrinterName);
323 BOOL (WINAPI *fpEnumPerMachineConnections)(LPCWSTR pServer,
324 LPBYTE pPrinterEnum, DWORD cbBuf, LPDWORD pcbNeeded,
326 BOOL (WINAPI *fpXcvData)(HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData,
327 DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData,
328 PDWORD pcbOutputNeeded, PDWORD pdwStatus);
329 BOOL (WINAPI *fpAddPrinterDriverEx)(LPWSTR pName, DWORD Level,
330 LPBYTE pDriverInfo, DWORD dwFileCopyFlags);
331 BOOL (WINAPI *fpSplReadPrinter)(HANDLE hPrinter, LPBYTE *pBuf, DWORD cbBuf);
332 BOOL (WINAPI *fpDriverUnloadComplete)(LPWSTR pDriverFile);
333 BOOL (WINAPI *fpGetSpoolFileInfo)(HANDLE hPrinter, LPWSTR *pSpoolDir,
334 LPHANDLE phFile, HANDLE hSpoolerProcess, HANDLE hAppProcess);
335 BOOL (WINAPI *fpCommitSpoolData)(HANDLE hPrinter, DWORD cbCommit);
336 BOOL (WINAPI *fpCloseSpoolFileHandle)(HANDLE hPrinter);
337 BOOL (WINAPI *fpFlushPrinter)(HANDLE hPrinter, LPBYTE pBuf, DWORD cbBuf,
338 LPDWORD pcWritten, DWORD cSleep);
339 DWORD (WINAPI *fpSendRecvBidiData)(HANDLE hPort, LPCWSTR pAction,
340 LPBIDI_REQUEST_CONTAINER pReqData,
341 LPBIDI_RESPONSE_CONTAINER *ppResData);
342 BOOL (WINAPI *fpAddDriverCatalog)(HANDLE hPrinter, DWORD dwLevel,
343 VOID *pvDriverInfCatInfo, DWORD dwCatalogCopyFlags);
344 } PRINTPROVIDOR, *LPPRINTPROVIDOR;
346 typedef struct _SPLCLIENT_INFO_1 {
351 DWORD dwMajorVersion;
352 DWORD dwMinorVersion;
353 WORD wProcessorArchitecture;
354 } SPLCLIENT_INFO_1, *LPSPLCLIENT_INFO_1, *PSPLCLIENT_INFO_1;
358 HANDLE WINAPI CreatePrinterIC(HANDLE hPrinter, LPDEVMODEW pDevMode);
359 BOOL WINAPI PlayGdiScriptOnPrinterIC(HANDLE hPrinterIC, LPBYTE pIn,
360 DWORD cIn, LPBYTE pOut, DWORD cOut, DWORD ul);
361 BOOL WINAPI DeletePrinterIC(HANDLE hPrinterIC);
362 BOOL WINAPI DevQueryPrint(HANDLE hPrinter, LPDEVMODEW pDevMode, DWORD *pResID);
364 /* Security and Access */
365 HANDLE WINAPI RevertToPrinterSelf(VOID);
366 BOOL WINAPI ImpersonatePrinterClient(HANDLE hToken);
367 BOOL WINAPI OpenPrinterToken(PHANDLE phToken);
368 BOOL WINAPI SetPrinterToken(HANDLE hToken);
369 BOOL WINAPI ClosePrinterToken(HANDLE hToken);
372 BOOL WINAPI ReplyPrinterChangeNotification(HANDLE hNotify, DWORD fdwFlags,
373 PDWORD pdwResult, PVOID pPrinterNotifyInfo);
374 BOOL WINAPI PartialReplyPrinterChangeNotification(HANDLE hNotify,
375 PPRINTER_NOTIFY_INFO_DATA pInfoDataSrc);
376 PPRINTER_NOTIFY_INFO RouterAllocPrinterNotifyInfo(DWORD cPrinterNotifyInfoData);
377 BOOL WINAPI RouterFreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO pInfo);
378 BOOL WINAPI AppendPrinterNotifyInfoData(PPRINTER_NOTIFY_INFO pInfoDest,
379 PPRINTER_NOTIFY_INFO_DATA pInfoDataSrc, DWORD fdwFlags);
380 DWORD WINAPI CallRouterFindFirstPrinterChangeNotification(HANDLE hPrinter,
381 DWORD fdwFlags, DWORD fdwOptions, HANDLE hNotify, PVOID pvReserved);
383 /* Port monitor / Language monitor / Print monitor */
384 LPMONITOR2 WINAPI InitializePrintMonitor2(PMONITORINIT pMonitorInit,
386 PMONITORUI WINAPI InitializePrintMonitorUI(VOID);
387 LPMONITOREX WINAPI InitializePrintMonitor(LPWSTR pRegistryRoot);
388 BOOL WINAPI InitializeMonitorEx(LPWSTR pRegistryRoot, LPMONITOR pMonitor);
389 BOOL WINAPI InitializeMonitor(LPWSTR pRegistryRoot);
391 BOOL WINAPI OpenPort(LPWSTR pName, PHANDLE pHandle);
392 BOOL WINAPI WritePort(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuf,
394 BOOL WINAPI ReadPort(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuffer,
396 BOOL WINAPI ClosePort(HANDLE hPort);
398 /* Print processor */
399 HANDLE WINAPI OpenPrintProcessor(LPWSTR pPrinterName,
400 PPRINTPROCESSOROPENDATA pPrintProcessorOpenData);
401 BOOL WINAPI PrintDocumentOnPrintProcessor(HANDLE hPrintProcessor,
402 LPWSTR pDocumentName);
403 BOOL WINAPI ClosePrintProcessor(HANDLE hPrintProcessor);
404 BOOL WINAPI ControlPrintProcessor(HANDLE hPrintProcessor, DWORD Command);
405 BOOL WINAPI InstallPrintProcessor(HWND hWnd);
408 BOOL WINAPI InitializePrintProvidor(LPPRINTPROVIDOR pPrintProvidor,
409 DWORD cbPrintProvidor, LPWSTR pFullRegistryPath);
410 BOOL WINAPI ProvidorFindFirstPrinterChangeNotification(HANDLE hPrinter,
411 DWORD fdwFlags, DWORD fdwOptions, HANDLE hNotify,
412 PVOID pvReserved0, PVOID pvReserved1);
413 BOOL WINAPI ProvidorFindClosePrinterChangeNotification(HANDLE hPrinter);
416 BOOL WINAPI SpoolerFindFirstPrinterChangeNotification(HANDLE hPrinter,
417 DWORD fdwFlags, DWORD fdwOptions, PHANDLE phEvent,
418 PVOID pPrinterNotifyOptions, PVOID pvReserved);
419 BOOL WINAPI SpoolerFindNextPrinterChangeNotification(HANDLE hPrinter,
420 LPDWORD pfdwChange, PVOID pvReserved0, PVOID ppPrinterNotifyInfo);
421 VOID WINAPI SpoolerFreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO pInfo);
422 BOOL WINAPI SpoolerFindClosePrinterChangeNotification(HANDLE hPrinter);
428 #endif /* _WINSPLP_ */