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
)(HANDLE hMonitor
, LPCWSTR pszObject
,
75 ACCESS_MASK GrantedAccess
, PHANDLE phXcv
);
76 DWORD (WINAPI
*pfnXcvDataPort
)(HANDLE hXcv
, LPCWSTR pszDataName
,
77 PBYTE pInputData
, DWORD cbInputData
,
78 PBYTE pOutputData
, DWORD cbOutputData
, PDWORD pcbOutputNeeded
);
79 BOOL (WINAPI
*pfnXcvClosePort
)(HANDLE hXcv
);
80 } MONITOR
, *LPMONITOR
;
82 typedef struct _MONITOR2
{
84 BOOL (WINAPI
*pfnEnumPorts
)(LPWSTR pName
, DWORD Level
, LPBYTE pPorts
,
85 DWORD cbBuf
, LPDWORD pcbNeeded
, LPDWORD pcReturned
);
86 BOOL (WINAPI
*pfnOpenPort
)(LPWSTR pName
, PHANDLE pHandle
);
87 BOOL (WINAPI
*pfnOpenPortEx
)(LPWSTR pPortName
, LPWSTR pPrinterName
,
88 PHANDLE pHandle
, struct _MONITOR2
*pMonitor2
);
89 BOOL (WINAPI
*pfnStartDocPort
)(HANDLE hPort
, LPWSTR pPrinterName
,
90 DWORD JobId
, DWORD Level
, LPBYTE pDocInfo
);
91 BOOL (WINAPI
*pfnWritePort
)(HANDLE hPort
, LPBYTE pBuffer
, DWORD cbBuf
,
93 BOOL (WINAPI
*pfnReadPort
)(HANDLE hPort
, LPBYTE pBuffer
, DWORD cbBuffer
,
95 BOOL (WINAPI
*pfnEndDocPort
)(HANDLE hPort
);
96 BOOL (WINAPI
*pfnClosePort
)(HANDLE hPort
);
97 BOOL (WINAPI
*pfnAddPort
)(LPWSTR pName
, HWND hWnd
, LPWSTR pMonitorName
);
98 BOOL (WINAPI
*pfnAddPortEx
)(LPWSTR pName
, DWORD Level
, LPBYTE lpBuffer
,
99 LPWSTR lpMonitorName
);
100 BOOL (WINAPI
*pfnConfigurePort
)(LPWSTR pName
, HWND hWnd
, LPWSTR pPortName
);
101 BOOL (WINAPI
*pfnDeletePort
)(LPWSTR pName
, HWND hWnd
, LPWSTR pPortName
);
102 BOOL (WINAPI
*pfnGetPrinterDataFromPort
)(HANDLE hPort
, DWORD ControlID
,
103 LPWSTR pValueName
, LPWSTR lpInBuffer
, DWORD cbInBuffer
,
104 LPWSTR lpOutBuffer
, DWORD cbOutBuffer
, LPDWORD lpcbReturned
);
105 BOOL (WINAPI
*pfnSetPortTimeOuts
)(HANDLE hPort
, LPCOMMTIMEOUTS lpCTO
,
107 BOOL (WINAPI
*pfnXcvOpenPort
)(HANDLE hMonitor
, LPCWSTR pszObject
,
108 ACCESS_MASK GrantedAccess
, PHANDLE phXcv
);
109 DWORD (WINAPI
*pfnXcvDataPort
)(HANDLE hXcv
, LPCWSTR pszDataName
,
110 PBYTE pInputData
, DWORD cbInputData
,
111 PBYTE pOutputData
, DWORD cbOutputData
, PDWORD pcbOutputNeeded
);
112 BOOL (WINAPI
*pfnXcvClosePort
)(HANDLE hXcv
);
113 /* Additions from MONITOR to MONITOR2 */
114 VOID (WINAPI
*pfnShutdown
)(HANDLE hMonitor
);
115 DWORD (WINAPI
*pfnSendRecvBidiDataFromPort
)(HANDLE hPort
, DWORD dwAccessBit
,
116 LPCWSTR pAction
, PBIDI_REQUEST_CONTAINER pReqData
,
117 PBIDI_RESPONSE_CONTAINER
*ppResData
);
118 } MONITOR2
, *LPMONITOR2
, *PMONITOR2
;
120 typedef struct _MONITOREX
{
123 } MONITOREX
, *LPMONITOREX
;
125 typedef struct _MONITORREG
{
127 LONG (WINAPI
*fpCreateKey
)(HANDLE hcKey
, LPCWSTR pszSubKey
, DWORD dwOptions
,
128 REGSAM samDesired
, PSECURITY_ATTRIBUTES pSecurityAttributes
,
129 PHANDLE phckResult
, PDWORD pdwDisposition
, HANDLE hSpooler
);
130 LONG (WINAPI
*fpOpenKey
)(HANDLE hcKey
, LPCWSTR pszSubKey
, REGSAM samDesired
,
131 PHANDLE phkResult
, HANDLE hSpooler
);
132 LONG (WINAPI
*fpCloseKey
)(HANDLE hcKey
, HANDLE hSpooler
);
133 LONG (WINAPI
*fpDeleteKey
)(HANDLE hcKey
, LPCWSTR pszSubKey
, HANDLE hSpooler
);
134 LONG (WINAPI
*fpEnumKey
)(HANDLE hcKey
, DWORD dwIndex
, LPWSTR pszName
,
135 PDWORD pcchName
, PFILETIME pftLastWriteTime
, HANDLE hSpooler
);
136 LONG (WINAPI
*fpQueryInfoKey
)(HANDLE hcKey
, PDWORD pcSubKeys
, PDWORD pcbKey
,
137 PDWORD pcValues
, PDWORD pcbValue
, PDWORD pcbData
,
138 PDWORD pcbSecurityDescriptor
, PFILETIME pftLastWriteTime
,
140 LONG (WINAPI
*fpSetValue
)(HANDLE hcKey
, LPCWSTR pszValue
, DWORD dwType
,
141 const BYTE
* pData
, DWORD cbData
, HANDLE hSpooler
);
142 LONG (WINAPI
*fpDeleteValue
)(HANDLE hcKey
, LPCWSTR pszValue
, HANDLE hSpooler
);
143 LONG (WINAPI
*fpEnumValue
)(HANDLE hcKey
, DWORD dwIndex
, LPWSTR pszValue
,
144 PDWORD pcbValue
, PDWORD pType
, PBYTE pData
, PDWORD pcbData
,
146 LONG (WINAPI
*fpQueryValue
)(HANDLE hcKey
, LPCWSTR pszValue
, PDWORD pType
,
147 PBYTE pData
, PDWORD pcbData
, HANDLE hSpooler
);
148 } MONITORREG
, *PMONITORREG
;
150 typedef struct _MONITORINIT
{
153 HANDLE hckRegistryRoot
;
154 PMONITORREG pMonitorReg
;
156 } MONITORINIT
, *PMONITORINIT
;
158 typedef struct _MONITORUI
{
159 DWORD dwMonitorUISize
;
160 BOOL (WINAPI
*pfnAddPortUI
)(PCWSTR pszServer
, HWND hWnd
,
161 PCWSTR pszPortNameIn
, PWSTR
*ppszPortNameOut
);
162 BOOL (WINAPI
*pfnConfigurePortUI
)(PCWSTR pName
, HWND hWnd
, PCWSTR pPortName
);
163 BOOL (WINAPI
*pfnDeletePortUI
)(PCWSTR pszServer
, HWND hWnd
, PCWSTR pszPortName
);
164 }MONITORUI
, *PMONITORUI
;
166 typedef struct _PRINTER_NOTIFY_INIT
{
170 } PRINTER_NOTIFY_INIT
, *LPPRINTER_NOTIFY_INIT
, *PPRINTER_NOTIFY_INIT
;
172 typedef struct _PRINTPROCESSOROPENDATA
{
176 LPWSTR pDocumentName
;
180 } PRINTPROCESSOROPENDATA
, *LPPRINTPROCESSOROPENDATA
, *PPRINTPROCESSOROPENDATA
;
184 * WARNING: Many Functions are declared as "BOOL", but return ROUTER_*
187 typedef struct _PRINTPROVIDOR
{
188 BOOL (WINAPI
*fpOpenPrinter
)(LPWSTR lpPrinterName
, HANDLE
*phPrinter
,
189 LPPRINTER_DEFAULTSW pDefault
);
190 BOOL (WINAPI
*fpSetJob
)(HANDLE hPrinter
, DWORD JobID
, DWORD Level
,
191 LPBYTE pJob
, DWORD Command
);
192 BOOL (WINAPI
*fpGetJob
)(HANDLE hPrinter
, DWORD JobID
, DWORD Level
,
193 LPBYTE pJob
, DWORD cbBuf
, LPDWORD pcbNeeded
);
194 BOOL (WINAPI
*fpEnumJobs
)(HANDLE hPrinter
, DWORD FirstJob
, DWORD NoJobs
,
195 DWORD Level
, LPBYTE pJob
, DWORD cbBuf
, LPDWORD pcbNeeded
,
197 HANDLE (WINAPI
*fpAddPrinter
)(LPWSTR pName
, DWORD Level
, LPBYTE pPrinter
);
198 BOOL (WINAPI
*fpDeletePrinter
)(HANDLE hPrinter
);
199 BOOL (WINAPI
*fpSetPrinter
)(HANDLE hPrinter
, DWORD Level
, LPBYTE pPrinter
,
201 BOOL (WINAPI
*fpGetPrinter
)(HANDLE hPrinter
, DWORD Level
, LPBYTE pPrinter
,
202 DWORD cbBuf
, LPDWORD pcbNeeded
);
203 BOOL (WINAPI
*fpEnumPrinters
)(DWORD dwType
, LPWSTR lpszName
, DWORD dwLevel
,
204 LPBYTE lpbPrinters
, DWORD cbBuf
, LPDWORD lpdwNeeded
,
205 LPDWORD lpdwReturned
);
206 BOOL (WINAPI
*fpAddPrinterDriver
)(LPWSTR pName
, DWORD Level
,
208 BOOL (WINAPI
*fpEnumPrinterDrivers
)(LPWSTR pName
, LPWSTR pEnvironment
,
209 DWORD Level
, LPBYTE pDriverInfo
, DWORD cbBuf
,
210 LPDWORD pcbNeeded
, LPDWORD pcbReturned
);
211 BOOL (WINAPI
*fpGetPrinterDriver
)(HANDLE hPrinter
, LPWSTR pEnvironment
,
212 DWORD Level
, LPBYTE pDriverInfo
, DWORD cbBuf
,
214 BOOL (WINAPI
*fpGetPrinterDriverDirectory
)(LPWSTR pName
, LPWSTR pEnvironment
,
215 DWORD Level
, LPBYTE pDriverDirectory
, DWORD cbBuf
,
217 BOOL (WINAPI
*fpDeletePrinterDriver
)(LPWSTR pName
, LPWSTR pEnvironment
,
219 BOOL (WINAPI
*fpAddPrintProcessor
)(LPWSTR pName
, LPWSTR pEnvironment
,
220 LPWSTR pPathName
, LPWSTR pPrintProcessorName
);
221 BOOL (WINAPI
*fpEnumPrintProcessors
)(LPWSTR pName
, LPWSTR pEnvironment
,
222 DWORD Level
, LPBYTE pPrintProcessorInfo
, DWORD cbBuf
,
223 LPDWORD pcbNeeded
, LPDWORD pcbReturned
);
224 BOOL (WINAPI
*fpGetPrintProcessorDirectory
)(LPWSTR pName
, LPWSTR pEnvironment
,
225 DWORD Level
, LPBYTE pPrintProcessorInfo
, DWORD cbBuf
,
227 BOOL (WINAPI
*fpDeletePrintProcessor
)(LPWSTR pName
, LPWSTR pEnvironment
,
228 LPWSTR pPrintProcessorName
);
229 BOOL (WINAPI
*fpEnumPrintProcessorDatatypes
)(LPWSTR pName
,
230 LPWSTR pPrintProcessorName
, DWORD Level
, LPBYTE pDatatypes
,
231 DWORD cbBuf
, LPDWORD pcbNeeded
, LPDWORD pcbReturned
);
232 DWORD (WINAPI
*fpStartDocPrinter
)(HANDLE hPrinter
, DWORD Level
, LPBYTE pDocInfo
);
233 BOOL (WINAPI
*fpStartPagePrinter
)(HANDLE hPrinter
);
234 BOOL (WINAPI
*fpWritePrinter
)(HANDLE hPrinter
, LPVOID pBuf
, DWORD cbBuf
,
236 BOOL (WINAPI
*fpEndPagePrinter
)(HANDLE hPrinter
);
237 BOOL (WINAPI
*fpAbortPrinter
)(HANDLE hPrinter
);
238 BOOL (WINAPI
*fpReadPrinter
)(HANDLE hPrinter
, LPVOID pBuf
, DWORD cbBuf
,
239 LPDWORD pNoBytesRead
);
240 BOOL (WINAPI
*fpEndDocPrinter
)(HANDLE hPrinter
);
241 BOOL (WINAPI
*fpAddJob
)(HANDLE hPrinter
, DWORD Level
, LPBYTE pData
,
242 DWORD cbBuf
, LPDWORD pcbNeeded
);
243 BOOL (WINAPI
*fpScheduleJob
)(HANDLE hPrinter
, DWORD JobID
);
244 DWORD (WINAPI
*fpGetPrinterData
)(HANDLE hPrinter
, LPWSTR pValueName
,
245 LPDWORD pType
, LPBYTE pData
, DWORD nSize
, LPDWORD pcbNeeded
);
246 DWORD (WINAPI
*fpSetPrinterData
)(HANDLE hPrinter
, LPWSTR pValueName
,
247 DWORD Type
, LPBYTE pData
, DWORD cbData
);
248 DWORD (WINAPI
*fpWaitForPrinterChange
)(HANDLE hPrinter
, DWORD Flags
);
249 BOOL (WINAPI
*fpClosePrinter
)(HANDLE phPrinter
);
250 BOOL (WINAPI
*fpAddForm
)(HANDLE hPrinter
, DWORD Level
, LPBYTE pForm
);
251 BOOL (WINAPI
*fpDeleteForm
)(HANDLE hPrinter
, LPWSTR pFormName
);
252 BOOL (WINAPI
*fpGetForm
)(HANDLE hPrinter
, LPWSTR pFormName
, DWORD Level
,
253 LPBYTE pForm
, DWORD cbBuf
, LPDWORD pcbNeeded
);
254 BOOL (WINAPI
*fpSetForm
)(HANDLE hPrinter
, LPWSTR pFormName
, DWORD Level
,
256 BOOL (WINAPI
*fpEnumForms
)(HANDLE hPrinter
, DWORD Level
, LPBYTE pForm
,
257 DWORD cbBuf
, LPDWORD pcbNeeded
, LPDWORD pcReturned
);
258 BOOL (WINAPI
*fpEnumMonitors
)(LPWSTR pName
, DWORD Level
, LPBYTE pMonitors
,
259 DWORD cbBuf
, LPDWORD pcbNeeded
, LPDWORD pcReturned
);
260 BOOL (WINAPI
*fpEnumPorts
)(LPWSTR pName
, DWORD Level
, LPBYTE pPorts
,
261 DWORD cbBuf
, LPDWORD pcbNeeded
, LPDWORD pcReturned
);
262 BOOL (WINAPI
*fpAddPort
)(LPWSTR pName
, HWND hWnd
, LPWSTR pMonitorName
);
263 BOOL (WINAPI
*fpConfigurePort
)(LPWSTR pName
, HWND hWnd
, LPWSTR pPortName
);
264 BOOL (WINAPI
*fpDeletePort
)(LPWSTR pName
, HWND hWnd
, LPWSTR pPortName
);
265 HANDLE (WINAPI
*fpCreatePrinterIC
)(HANDLE hPrinter
, LPDEVMODEW pDevMode
);
266 BOOL (WINAPI
*fpPlayGdiScriptOnPrinterIC
)(HANDLE hPrinterIC
, LPBYTE pIn
,
267 DWORD cIn
, LPBYTE pOut
, DWORD cOut
, DWORD ul
);
268 BOOL (WINAPI
*fpDeletePrinterIC
)(HANDLE hPrinterIC
);
269 BOOL (WINAPI
*fpAddPrinterConnection
)(LPWSTR pName
);
270 BOOL (WINAPI
*fpDeletePrinterConnection
)(LPWSTR pName
);
271 DWORD (WINAPI
*fpPrinterMessageBox
)(HANDLE hPrinter
, DWORD Error
, HWND hWnd
,
272 LPWSTR pText
, LPWSTR pCaption
, DWORD dwType
);
273 BOOL (WINAPI
*fpAddMonitor
)(LPWSTR pName
, DWORD Level
, LPBYTE pMonitors
);
274 BOOL (WINAPI
*fpDeleteMonitor
)(LPWSTR pName
, LPWSTR pEnvironment
,
275 LPWSTR pMonitorName
);
276 BOOL (WINAPI
*fpResetPrinter
)(HANDLE hPrinter
, LPPRINTER_DEFAULTSW pDefault
);
277 BOOL (WINAPI
*fpGetPrinterDriverEx
)(HANDLE hPrinter
, LPWSTR pEnvironment
,
278 DWORD Level
, LPBYTE pDriverInfo
, DWORD cbBuf
, LPDWORD pcbNeeded
,
279 DWORD dwClientMajorVersion
, DWORD dwClientMinorVersion
,
280 PDWORD pdwServerMajorVersion
, PDWORD pdwServerMinorVersion
);
281 HANDLE (WINAPI
*fpFindFirstPrinterChangeNotification
)(HANDLE hPrinter
,
282 DWORD fdwFlags
, DWORD fdwOptions
, LPVOID pPrinterNotifyOptions
);
283 BOOL (WINAPI
*fpFindClosePrinterChangeNotification
)(HANDLE hChange
);
284 BOOL (WINAPI
*fpAddPortEx
)(HANDLE hMonitor
, LPWSTR pName
, DWORD Level
,
285 LPBYTE lpBuffer
, LPWSTR lpMonitorName
);
286 BOOL (WINAPI
*fpShutDown
)(LPVOID pvReserved
);
287 BOOL (WINAPI
*fpRefreshPrinterChangeNotification
)(HANDLE hPrinter
,
288 DWORD Reserved
, PVOID pvReserved
, PVOID pPrinterNotifyInfo
);
289 BOOL (WINAPI
*fpOpenPrinterEx
)(LPWSTR pPrinterName
, LPHANDLE phPrinter
,
290 LPPRINTER_DEFAULTSW pDefault
, LPBYTE pClientInfo
, DWORD Level
);
291 HANDLE (WINAPI
*fpAddPrinterEx
)(LPWSTR pName
, DWORD Level
, LPBYTE pPrinter
,
292 LPBYTE pClientInfo
, DWORD ClientInfoLevel
);
293 BOOL (WINAPI
*fpSetPort
)(LPWSTR pName
, LPWSTR pPortName
, DWORD dwLevel
,
295 DWORD (WINAPI
*fpEnumPrinterData
)( HANDLE hPrinter
, DWORD dwIndex
,
296 LPWSTR pValueName
, DWORD cbValueName
, LPDWORD pcbValueName
,
297 LPDWORD pType
, LPBYTE pData
, DWORD cbData
, LPDWORD pcbData
);
298 DWORD (WINAPI
*fpDeletePrinterData
)(HANDLE hPrinter
, LPWSTR pValueName
);
299 DWORD (WINAPI
*fpClusterSplOpen
)(LPCWSTR pszServer
, LPCWSTR pszResource
,
300 PHANDLE phSpooler
, LPCWSTR pszName
, LPCWSTR pszAddress
);
301 DWORD (WINAPI
*fpClusterSplClose
)(HANDLE hSpooler
);
302 DWORD (WINAPI
*fpClusterSplIsAlive
)(HANDLE hSpooler
);
303 DWORD (WINAPI
*fpSetPrinterDataEx
)(HANDLE hPrinter
, LPCWSTR pKeyName
,
304 LPCWSTR pValueName
, DWORD Type
, LPBYTE pData
, DWORD cbData
);
305 DWORD (WINAPI
*fpGetPrinterDataEx
)(HANDLE hPrinter
, LPCWSTR pKeyName
,
306 LPCWSTR pValueName
, LPDWORD pType
, LPBYTE pData
, DWORD nSize
,
308 DWORD (WINAPI
*fpEnumPrinterDataEx
)(HANDLE hPrinter
, LPCWSTR pKeyName
,
309 LPBYTE pEnumValues
, DWORD cbEnumValues
, LPDWORD pcbEnumValues
,
310 LPDWORD pnEnumValues
);
311 DWORD (WINAPI
*fpEnumPrinterKey
)(HANDLE hPrinter
, LPCWSTR pKeyName
,
312 LPWSTR pSubkey
, DWORD cbSubkey
, LPDWORD pcbSubkey
);
313 DWORD (WINAPI
*fpDeletePrinterDataEx
)(HANDLE hPrinter
, LPCWSTR pKeyName
,
315 DWORD (WINAPI
*fpDeletePrinterKey
)(HANDLE hPrinter
, LPCWSTR pKeyName
);
316 BOOL (WINAPI
*fpSeekPrinter
)(HANDLE hPrinter
, LARGE_INTEGER liDistanceToMove
,
317 PLARGE_INTEGER pliNewPointer
, DWORD dwMoveMethod
, BOOL bWrite
);
318 BOOL (WINAPI
*fpDeletePrinterDriverEx
)(LPWSTR pName
, LPWSTR pEnvironment
,
319 LPWSTR pDriverName
, DWORD dwDeleteFlag
, DWORD dwVersionNum
);
320 BOOL (WINAPI
*fpAddPerMachineConnection
)(LPCWSTR pServer
,
321 LPCWSTR pPrinterName
, LPCWSTR pPrintServer
, LPCWSTR pProvider
);
322 BOOL (WINAPI
*fpDeletePerMachineConnection
)(LPCWSTR pServer
,
323 LPCWSTR pPrinterName
);
324 BOOL (WINAPI
*fpEnumPerMachineConnections
)(LPCWSTR pServer
,
325 LPBYTE pPrinterEnum
, DWORD cbBuf
, LPDWORD pcbNeeded
,
327 BOOL (WINAPI
*fpXcvData
)(HANDLE hXcv
, LPCWSTR pszDataName
, PBYTE pInputData
,
328 DWORD cbInputData
, PBYTE pOutputData
, DWORD cbOutputData
,
329 PDWORD pcbOutputNeeded
, PDWORD pdwStatus
);
330 BOOL (WINAPI
*fpAddPrinterDriverEx
)(LPWSTR pName
, DWORD Level
,
331 LPBYTE pDriverInfo
, DWORD dwFileCopyFlags
);
332 BOOL (WINAPI
*fpSplReadPrinter
)(HANDLE hPrinter
, LPBYTE
*pBuf
, DWORD cbBuf
);
333 BOOL (WINAPI
*fpDriverUnloadComplete
)(LPWSTR pDriverFile
);
334 BOOL (WINAPI
*fpGetSpoolFileInfo
)(HANDLE hPrinter
, LPWSTR
*pSpoolDir
,
335 LPHANDLE phFile
, HANDLE hSpoolerProcess
, HANDLE hAppProcess
);
336 BOOL (WINAPI
*fpCommitSpoolData
)(HANDLE hPrinter
, DWORD cbCommit
);
337 BOOL (WINAPI
*fpCloseSpoolFileHandle
)(HANDLE hPrinter
);
338 BOOL (WINAPI
*fpFlushPrinter
)(HANDLE hPrinter
, LPBYTE pBuf
, DWORD cbBuf
,
339 LPDWORD pcWritten
, DWORD cSleep
);
340 DWORD (WINAPI
*fpSendRecvBidiData
)(HANDLE hPort
, LPCWSTR pAction
,
341 LPBIDI_REQUEST_CONTAINER pReqData
,
342 LPBIDI_RESPONSE_CONTAINER
*ppResData
);
343 BOOL (WINAPI
*fpAddDriverCatalog
)(HANDLE hPrinter
, DWORD dwLevel
,
344 VOID
*pvDriverInfCatInfo
, DWORD dwCatalogCopyFlags
);
345 } PRINTPROVIDOR
, *LPPRINTPROVIDOR
;
347 typedef struct _SPLCLIENT_INFO_1
{
352 DWORD dwMajorVersion
;
353 DWORD dwMinorVersion
;
354 WORD wProcessorArchitecture
;
355 } SPLCLIENT_INFO_1
, *LPSPLCLIENT_INFO_1
, *PSPLCLIENT_INFO_1
;
359 HANDLE WINAPI
CreatePrinterIC(HANDLE hPrinter
, LPDEVMODEW pDevMode
);
360 BOOL WINAPI
PlayGdiScriptOnPrinterIC(HANDLE hPrinterIC
, LPBYTE pIn
,
361 DWORD cIn
, LPBYTE pOut
, DWORD cOut
, DWORD ul
);
362 BOOL WINAPI
DeletePrinterIC(HANDLE hPrinterIC
);
363 BOOL WINAPI
DevQueryPrint(HANDLE hPrinter
, LPDEVMODEW pDevMode
, DWORD
*pResID
);
365 /* Security and Access */
366 HANDLE WINAPI
RevertToPrinterSelf(VOID
);
367 BOOL WINAPI
ImpersonatePrinterClient(HANDLE hToken
);
368 BOOL WINAPI
OpenPrinterToken(PHANDLE phToken
);
369 BOOL WINAPI
SetPrinterToken(HANDLE hToken
);
370 BOOL WINAPI
ClosePrinterToken(HANDLE hToken
);
373 BOOL WINAPI
ReplyPrinterChangeNotification(HANDLE hNotify
, DWORD fdwFlags
,
374 PDWORD pdwResult
, PVOID pPrinterNotifyInfo
);
375 BOOL WINAPI
PartialReplyPrinterChangeNotification(HANDLE hNotify
,
376 PPRINTER_NOTIFY_INFO_DATA pInfoDataSrc
);
377 PPRINTER_NOTIFY_INFO
RouterAllocPrinterNotifyInfo(DWORD cPrinterNotifyInfoData
);
378 BOOL WINAPI
RouterFreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO pInfo
);
379 BOOL WINAPI
AppendPrinterNotifyInfoData(PPRINTER_NOTIFY_INFO pInfoDest
,
380 PPRINTER_NOTIFY_INFO_DATA pInfoDataSrc
, DWORD fdwFlags
);
381 DWORD WINAPI
CallRouterFindFirstPrinterChangeNotification(HANDLE hPrinter
,
382 DWORD fdwFlags
, DWORD fdwOptions
, HANDLE hNotify
, PVOID pvReserved
);
384 /* Port monitor / Language monitor / Print monitor */
385 LPMONITOR2 WINAPI
InitializePrintMonitor2(PMONITORINIT pMonitorInit
,
387 PMONITORUI WINAPI
InitializePrintMonitorUI(VOID
);
388 LPMONITOREX WINAPI
InitializePrintMonitor(LPWSTR pRegistryRoot
);
389 BOOL WINAPI
InitializeMonitorEx(LPWSTR pRegistryRoot
, LPMONITOR pMonitor
);
390 BOOL WINAPI
InitializeMonitor(LPWSTR pRegistryRoot
);
392 BOOL WINAPI
OpenPort(LPWSTR pName
, PHANDLE pHandle
);
393 BOOL WINAPI
WritePort(HANDLE hPort
, LPBYTE pBuffer
, DWORD cbBuf
,
395 BOOL WINAPI
ReadPort(HANDLE hPort
, LPBYTE pBuffer
, DWORD cbBuffer
,
397 BOOL WINAPI
ClosePort(HANDLE hPort
);
399 /* Print processor */
400 HANDLE WINAPI
OpenPrintProcessor(LPWSTR pPrinterName
,
401 PPRINTPROCESSOROPENDATA pPrintProcessorOpenData
);
402 BOOL WINAPI
PrintDocumentOnPrintProcessor(HANDLE hPrintProcessor
,
403 LPWSTR pDocumentName
);
404 BOOL WINAPI
ClosePrintProcessor(HANDLE hPrintProcessor
);
405 BOOL WINAPI
ControlPrintProcessor(HANDLE hPrintProcessor
, DWORD Command
);
406 BOOL WINAPI
InstallPrintProcessor(HWND hWnd
);
409 BOOL WINAPI
InitializePrintProvidor(LPPRINTPROVIDOR pPrintProvidor
,
410 DWORD cbPrintProvidor
, LPWSTR pFullRegistryPath
);
411 BOOL WINAPI
ProvidorFindFirstPrinterChangeNotification(HANDLE hPrinter
,
412 DWORD fdwFlags
, DWORD fdwOptions
, HANDLE hNotify
,
413 PVOID pvReserved0
, PVOID pvReserved1
);
414 BOOL WINAPI
ProvidorFindClosePrinterChangeNotification(HANDLE hPrinter
);
417 BOOL WINAPI
SpoolerFindFirstPrinterChangeNotification(HANDLE hPrinter
,
418 DWORD fdwFlags
, DWORD fdwOptions
, PHANDLE phEvent
,
419 PVOID pPrinterNotifyOptions
, PVOID pvReserved
);
420 BOOL WINAPI
SpoolerFindNextPrinterChangeNotification(HANDLE hPrinter
,
421 LPDWORD pfdwChange
, PVOID pvReserved0
, PVOID ppPrinterNotifyInfo
);
422 VOID WINAPI
SpoolerFreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO pInfo
);
423 BOOL WINAPI
SpoolerFindClosePrinterChangeNotification(HANDLE hPrinter
);
429 #endif /* _WINSPLP_ */