Author: akhaldi
Date: Mon Aug 26 14:14:47 2013
New Revision: 59836
URL:
http://svn.reactos.org/svn/reactos?rev=59836&view=rev
Log:
[PSDK]
* Annotate winsplp.h.
Modified:
trunk/reactos/include/psdk/winsplp.h
Modified: trunk/reactos/include/psdk/winsplp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winsplp.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/winsplp.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winsplp.h [iso-8859-1] Mon Aug 26 14:14:47 2013
@@ -20,6 +20,9 @@
#pragma once
+#ifndef _WINSPLP_
+#define _WINSPLP_
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -86,183 +89,557 @@
} SPLCLIENT_INFO_2_LONGHORN;
typedef struct _PRINTPROVIDOR {
- BOOL (WINAPI *fpOpenPrinter)(PWSTR lpPrinterName, HANDLE *phPrinter,
- PPRINTER_DEFAULTSW pDefault);
- BOOL (WINAPI *fpSetJob)(HANDLE hPrinter, DWORD JobID, DWORD Level,
- LPBYTE pJob, DWORD Command);
- BOOL (WINAPI *fpGetJob)(HANDLE hPrinter, DWORD JobID, DWORD Level,
- LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded);
- BOOL (WINAPI *fpEnumJobs)(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs,
- DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded,
- LPDWORD pcReturned);
- HANDLE (WINAPI *fpAddPrinter)(LPWSTR pName, DWORD Level, LPBYTE pPrinter);
- BOOL (WINAPI *fpDeletePrinter)(HANDLE hPrinter);
- BOOL (WINAPI *fpSetPrinter)(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
- DWORD Command);
- BOOL (WINAPI *fpGetPrinter)(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
- DWORD cbBuf, LPDWORD pcbNeeded);
- BOOL (WINAPI *fpEnumPrinters)(DWORD dwType, LPWSTR lpszName, DWORD dwLevel,
- LPBYTE lpbPrinters, DWORD cbBuf, LPDWORD lpdwNeeded,
- LPDWORD lpdwReturned);
- BOOL (WINAPI *fpAddPrinterDriver)(LPWSTR pName, DWORD Level, LPBYTE pDriverInfo);
- BOOL (WINAPI *fpEnumPrinterDrivers)(LPWSTR pName, LPWSTR pEnvironment,
- DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf,
- LPDWORD pcbNeeded, LPDWORD pcbReturned);
- BOOL (WINAPI *fpGetPrinterDriver)(HANDLE hPrinter, LPWSTR pEnvironment,
- DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf,
- LPDWORD pcbNeeded);
- BOOL (WINAPI *fpGetPrinterDriverDirectory)(LPWSTR pName, LPWSTR pEnvironment,
- DWORD Level, LPBYTE pDriverDirectory,
- DWORD cbBuf, LPDWORD pcbNeeded);
- BOOL (WINAPI *fpDeletePrinterDriver)(LPWSTR pName, LPWSTR pEnvironment,
- LPWSTR pDriverName);
- BOOL (WINAPI *fpAddPrintProcessor)(LPWSTR pName, LPWSTR pEnvironment,
- LPWSTR pPathName, LPWSTR pPrintProcessorName);
- BOOL (WINAPI *fpEnumPrintProcessors)(LPWSTR pName, LPWSTR pEnvironment,
- DWORD Level, LPBYTE pPrintProcessorInfo,
- DWORD cbBuf, LPDWORD pcbNeeded,
- LPDWORD pcbReturned);
- BOOL (WINAPI *fpGetPrintProcessorDirectory)(LPWSTR pName, LPWSTR pEnvironment,
- DWORD Level, LPBYTE pPrintProcessorInfo,
- DWORD cbBuf, LPDWORD pcbNeeded);
- BOOL (WINAPI *fpDeletePrintProcessor)(LPWSTR pName, LPWSTR pEnvironment,
- LPWSTR pPrintProcessorName);
- BOOL (WINAPI *fpEnumPrintProcessorDatatypes)(LPWSTR pName,
- LPWSTR pPrintProcessorName,
- DWORD Level, LPBYTE pDatatypes,
- DWORD cbBuf, LPDWORD pcbNeeded,
- LPDWORD pcbReturned);
- DWORD (WINAPI *fpStartDocPrinter)(HANDLE hPrinter, DWORD Level, LPBYTE pDocInfo);
- BOOL (WINAPI *fpStartPagePrinter)(HANDLE hPrinter);
- BOOL (WINAPI *fpWritePrinter)(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf,
- LPDWORD pcWritten);
- BOOL (WINAPI *fpEndPagePrinter)(HANDLE hPrinter);
- BOOL (WINAPI *fpAbortPrinter)(HANDLE hPrinter);
- BOOL (WINAPI *fpReadPrinter)(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf,
- LPDWORD pNoBytesRead);
- BOOL (WINAPI *fpEndDocPrinter)(HANDLE hPrinter);
- BOOL (WINAPI *fpAddJob)(HANDLE hPrinter, DWORD Level, LPBYTE pData,
- DWORD cbBuf, LPDWORD pcbNeeded);
- BOOL (WINAPI *fpScheduleJob)(HANDLE hPrinter, DWORD JobID);
- DWORD (WINAPI *fpGetPrinterData)(HANDLE hPrinter, LPWSTR pValueName,
- LPDWORD pType, LPBYTE pData, DWORD nSize,
- LPDWORD pcbNeeded);
- DWORD (WINAPI *fpSetPrinterData)(HANDLE hPrinter, LPWSTR pValueName,
- DWORD Type, LPBYTE pData, DWORD cbData);
- DWORD (WINAPI *fpWaitForPrinterChange)(HANDLE hPrinter, DWORD Flags);
- BOOL (WINAPI *fpClosePrinter)(HANDLE phPrinter);
- BOOL (WINAPI *fpAddForm)(HANDLE hPrinter, DWORD Level, LPBYTE pForm);
- BOOL (WINAPI *fpDeleteForm)(HANDLE hPrinter, LPWSTR pFormName);
- BOOL (WINAPI *fpGetForm)(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
- LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded);
- BOOL (WINAPI *fpSetForm)(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
- LPBYTE pForm);
- BOOL (WINAPI *fpEnumForms)(HANDLE hPrinter, DWORD Level, LPBYTE pForm,
- DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned);
- BOOL (WINAPI *fpEnumMonitors)(LPWSTR pName, DWORD Level, LPBYTE pMonitors,
- DWORD cbBuf, LPDWORD pcbNeeded,
- LPDWORD pcReturned);
- BOOL (WINAPI *fpEnumPorts)(LPWSTR pName, DWORD Level, LPBYTE pPorts,
- DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned);
- BOOL (WINAPI *fpAddPort)(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName);
- BOOL (WINAPI *fpConfigurePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
- BOOL (WINAPI *fpDeletePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
- HANDLE (WINAPI *fpCreatePrinterIC)(HANDLE hPrinter, LPDEVMODEW pDevMode);
- BOOL (WINAPI *fpPlayGdiScriptOnPrinterIC)(HANDLE hPrinterIC, LPBYTE pIn,
- DWORD cIn, LPBYTE pOut, DWORD cOut,
- DWORD ul);
- BOOL (WINAPI *fpDeletePrinterIC)(HANDLE hPrinterIC);
- BOOL (WINAPI *fpAddPrinterConnection)(LPWSTR pName);
- BOOL (WINAPI *fpDeletePrinterConnection)(LPWSTR pName);
- DWORD (WINAPI *fpPrinterMessageBox)(HANDLE hPrinter, DWORD Error, HWND hWnd,
- LPWSTR pText, LPWSTR pCaption,
- DWORD dwType);
- BOOL (WINAPI *fpAddMonitor)(LPWSTR pName, DWORD Level, LPBYTE pMonitors);
- BOOL (WINAPI *fpDeleteMonitor)(LPWSTR pName, LPWSTR pEnvironment,
- LPWSTR pMonitorName);
- BOOL (WINAPI *fpResetPrinter)(HANDLE hPrinter, LPPRINTER_DEFAULTSW pDefault);
- BOOL (WINAPI *fpGetPrinterDriverEx)(HANDLE hPrinter, LPWSTR pEnvironment,
- DWORD Level, LPBYTE pDriverInfo,
- DWORD cbBuf, LPDWORD pcbNeeded,
- DWORD dwClientMajorVersion,
- DWORD dwClientMinorVersion,
- PDWORD pdwServerMajorVersion,
- PDWORD pdwServerMinorVersion);
+
+ BOOL
+ (WINAPI *fpOpenPrinter)(
+ _In_opt_ PWSTR lpPrinterName,
+ _Out_ HANDLE *phPrinter,
+ _In_opt_ PPRINTER_DEFAULTSW pDefault);
+
+ BOOL
+ (WINAPI *fpSetJob)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD JobID,
+ _In_ DWORD Level,
+ _In_reads_opt_(_Inexpressible_(0)) LPBYTE pJob,
+ _In_ DWORD Command);
+
+ BOOL
+ (WINAPI *fpGetJob)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD JobID,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pJob,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded);
+
+ BOOL
+ (WINAPI *fpEnumJobs)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD FirstJob,
+ _In_ DWORD NoJobs,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pJob,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcReturned);
+
+ HANDLE
+ (WINAPI *fpAddPrinter)(
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pPrinter);
+
+ BOOL (WINAPI *fpDeletePrinter)(_In_ HANDLE hPrinter);
+
+ BOOL
+ (WINAPI *fpSetPrinter)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pPrinter,
+ _In_ DWORD Command);
+
+ BOOL
+ (WINAPI *fpGetPrinter)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pPrinter,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded);
+
+ BOOL
+ (WINAPI *fpEnumPrinters)(
+ _In_ DWORD dwType,
+ _In_opt_ LPWSTR lpszName,
+ _In_ DWORD dwLevel,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE lpbPrinters,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD lpdwNeeded,
+ _Out_ LPDWORD lpdwReturned);
+
+ BOOL
+ (WINAPI *fpAddPrinterDriver)(
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pDriverInfo);
+
+ BOOL
+ (WINAPI *fpEnumPrinterDrivers)(
+ _In_opt_ LPWSTR pName,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pDriverInfo,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcbReturned);
+
+ BOOL
+ (WINAPI *fpGetPrinterDriver)(
+ _In_ HANDLE hPrinter,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pDriverInfo,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded);
+
+ BOOL
+ (WINAPI *fpGetPrinterDriverDirectory)(
+ _In_opt_ LPWSTR pName,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pDriverDirectory,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded);
+
+ BOOL
+ (WINAPI *fpDeletePrinterDriver)(
+ _In_opt_ LPWSTR pName,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ LPWSTR pDriverName);
+
+ BOOL
+ (WINAPI *fpAddPrintProcessor)(
+ _In_opt_ LPWSTR pName,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ LPWSTR pPathName,
+ _In_ LPWSTR pPrintProcessorName);
+
+ BOOL
+ (WINAPI *fpEnumPrintProcessors)(
+ _In_opt_ LPWSTR pName,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pPrintProcessorInfo,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcbReturned);
+
+ BOOL
+ (WINAPI *fpGetPrintProcessorDirectory)(
+ _In_opt_ LPWSTR pName,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pPrintProcessorInfo,
+ _In_ DWORD cbBuf,
+ _In_ LPDWORD pcbNeeded);
+
+ BOOL
+ (WINAPI *fpDeletePrintProcessor)(
+ _In_opt_ LPWSTR pName,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ LPWSTR pPrintProcessorName);
+
+ BOOL
+ (WINAPI *fpEnumPrintProcessorDatatypes)(
+ _In_opt_ LPWSTR pName,
+ _In_ LPWSTR pPrintProcessorName,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pDatatypes,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcbReturned);
+
+ DWORD
+ (WINAPI *fpStartDocPrinter)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pDocInfo);
+
+ BOOL (WINAPI *fpStartPagePrinter)(_In_ HANDLE hPrinter);
+
+ BOOL
+ (WINAPI *fpWritePrinter)(
+ _In_ HANDLE hPrinter,
+ _In_reads_bytes_(cbBuf) LPVOID pBuf,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcWritten);
+
+ BOOL (WINAPI *fpEndPagePrinter)(_In_ HANDLE hPrinter);
+
+ BOOL (WINAPI *fpAbortPrinter)(_In_ HANDLE hPrinter);
+
+ BOOL
+ (WINAPI *fpReadPrinter)(
+ _In_ HANDLE hPrinter,
+ _Out_writes_bytes_to_opt_(cbBuf, *pNoBytesRead) LPVOID pBuf,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pNoBytesRead);
+
+ BOOL (WINAPI *fpEndDocPrinter)(_In_ HANDLE hPrinter);
+
+ BOOL
+ (WINAPI *fpAddJob)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pData,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded);
+
+ BOOL (WINAPI *fpScheduleJob)(_In_ HANDLE hPrinter, _In_ DWORD JobID);
+
+ DWORD
+ (WINAPI *fpGetPrinterData)(
+ _In_ HANDLE hPrinter,
+ _In_ LPWSTR pValueName,
+ _Out_opt_ LPDWORD pType,
+ _Out_writes_bytes_to_opt_(nSize, *pcbNeeded) LPBYTE pData,
+ _In_ DWORD nSize,
+ _Out_ LPDWORD pcbNeeded);
+
+ DWORD
+ (WINAPI *fpSetPrinterData)(
+ _In_ HANDLE hPrinter,
+ _In_ LPWSTR pValueName,
+ _In_ DWORD Type,
+ _In_reads_bytes_(cbData) LPBYTE pData,
+ _In_ DWORD cbData);
+
+ DWORD
+ (WINAPI *fpWaitForPrinterChange)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD Flags);
+
+ BOOL (WINAPI *fpClosePrinter)(_In_ HANDLE phPrinter);
+
+ BOOL
+ (WINAPI *fpAddForm)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pForm);
+
+ BOOL (WINAPI *fpDeleteForm)(_In_ HANDLE hPrinter, _In_ LPWSTR pFormName);
+
+ BOOL
+ (WINAPI *fpGetForm)(
+ _In_ HANDLE hPrinter,
+ _In_ LPWSTR pFormName,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pForm,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded);
+
+ BOOL
+ (WINAPI *fpSetForm)(
+ _In_ HANDLE hPrinter,
+ _In_ LPWSTR pFormName,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pForm);
+
+ BOOL
+ (WINAPI *fpEnumForms)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pForm,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcReturned);
+
+ BOOL
+ (WINAPI *fpEnumMonitors)(
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pMonitors,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcReturned);
+
+ BOOL
+ (WINAPI *fpEnumPorts)(
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pPorts,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcReturned);
+
+ BOOL
+ (WINAPI *fpAddPort)(
+ _In_opt_ LPWSTR pName,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pMonitorName);
+
+ BOOL
+ (WINAPI *fpConfigurePort)(
+ _In_opt_ LPWSTR pName,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pPortName);
+
+ BOOL
+ (WINAPI *fpDeletePort)(
+ _In_opt_ LPWSTR pName,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pPortName);
+
+ HANDLE
+ (WINAPI *fpCreatePrinterIC)(
+ _In_ HANDLE hPrinter,
+ _In_opt_ LPDEVMODEW pDevMode);
+
+ BOOL
+ (WINAPI *fpPlayGdiScriptOnPrinterIC)(
+ _In_ HANDLE hPrinterIC,
+ _In_reads_bytes_(cIn) LPBYTE pIn,
+ _In_ DWORD cIn,
+ _Out_writes_bytes_(cOut) LPBYTE pOut,
+ _In_ DWORD cOut,
+ _In_ DWORD ul);
+
+ BOOL (WINAPI *fpDeletePrinterIC)(_In_ HANDLE hPrinterIC);
+
+ BOOL (WINAPI *fpAddPrinterConnection)(_In_ LPWSTR pName);
+
+ BOOL (WINAPI *fpDeletePrinterConnection)(_In_ LPWSTR pName);
+
+ DWORD
+ (WINAPI *fpPrinterMessageBox)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD Error,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pText,
+ _In_ LPWSTR pCaption,
+ _In_ DWORD dwType);
+
+ BOOL
+ (WINAPI *fpAddMonitor)(
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pMonitors);
+
+ BOOL
+ (WINAPI *fpDeleteMonitor)(
+ _In_ LPWSTR pName,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ LPWSTR pMonitorName);
+
+ BOOL
+ (WINAPI *fpResetPrinter)(
+ _In_ HANDLE hPrinter,
+ _In_ LPPRINTER_DEFAULTSW pDefault);
+
+ BOOL
+ (WINAPI *fpGetPrinterDriverEx)(
+ _In_ HANDLE hPrinter,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pDriverInfo,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _In_ DWORD dwClientMajorVersion,
+ _In_ DWORD dwClientMinorVersion,
+ _Out_ PDWORD pdwServerMajorVersion,
+ _Out_ PDWORD pdwServerMinorVersion);
+
HANDLE (WINAPI *fpFindFirstPrinterChangeNotification)(HANDLE hPrinter,
DWORD fdwFlags,
DWORD fdwOptions,
LPVOID pPrinterNotifyOptions);
- BOOL (WINAPI *fpFindClosePrinterChangeNotification)(HANDLE hChange);
- BOOL (WINAPI *fpAddPortEx)(LPWSTR pName, DWORD Level, LPBYTE lpBuffer,
- LPWSTR lpMonitorName);
- BOOL (WINAPI *fpShutDown)(LPVOID pvReserved);
- BOOL (WINAPI *fpRefreshPrinterChangeNotification)(HANDLE hPrinter,
- DWORD Reserved,
- PVOID pvReserved,
- PVOID pPrinterNotifyInfo);
- BOOL (WINAPI *fpOpenPrinterEx)(LPWSTR pPrinterName, LPHANDLE phPrinter,
- LPPRINTER_DEFAULTSW pDefault, LPBYTE pClientInfo,
- DWORD Level);
- HANDLE (WINAPI *fpAddPrinterEx)(LPWSTR pName, DWORD Level, LPBYTE pPrinter,
- LPBYTE pClientInfo, DWORD ClientInfoLevel);
- BOOL (WINAPI *fpSetPort)(LPWSTR pName, LPWSTR pPortName, DWORD dwLevel,
- LPBYTE pPortInfo);
- DWORD (WINAPI *fpEnumPrinterData)(HANDLE hPrinter, DWORD dwIndex,
- LPWSTR pValueName, DWORD cbValueName,
- LPDWORD pcbValueName, LPDWORD pType,
- LPBYTE pData, DWORD cbData, LPDWORD pcbData);
- DWORD (WINAPI *fpDeletePrinterData)(HANDLE hPrinter, LPWSTR pValueName);
- DWORD (WINAPI *fpClusterSplOpen)(LPCWSTR pszServer, LPCWSTR pszResource,
- PHANDLE phSpooler, LPCWSTR pszName,
- LPCWSTR pszAddress);
- DWORD (WINAPI *fpClusterSplClose)(HANDLE hSpooler);
- DWORD (WINAPI *fpClusterSplIsAlive)(HANDLE hSpooler);
- DWORD (WINAPI *fpSetPrinterDataEx)(HANDLE hPrinter, LPCWSTR pKeyName,
- LPCWSTR pValueName, DWORD Type,
- LPBYTE pData, DWORD cbData);
- DWORD (WINAPI *fpGetPrinterDataEx)(HANDLE hPrinter, LPCWSTR pKeyName,
- LPCWSTR pValueName, LPDWORD pType,
- LPBYTE pData, DWORD nSize, LPDWORD pcbNeeded);
- DWORD (WINAPI *fpEnumPrinterDataEx)(HANDLE hPrinter, LPCWSTR pKeyName,
- LPBYTE pEnumValues, DWORD cbEnumValues,
- LPDWORD pcbEnumValues, LPDWORD pnEnumValues);
- DWORD (WINAPI *fpEnumPrinterKey)(HANDLE hPrinter, LPCWSTR pKeyName,
- LPWSTR pSubkey, DWORD cbSubkey, LPDWORD pcbSubkey);
- DWORD (WINAPI *fpDeletePrinterDataEx)(HANDLE hPrinter, LPCWSTR pKeyName,
- LPCWSTR pValueName);
- DWORD (WINAPI *fpDeletePrinterKey)(HANDLE hPrinter, LPCWSTR pKeyName);
- BOOL (WINAPI *fpSeekPrinter)(HANDLE hPrinter, LARGE_INTEGER liDistanceToMove,
- PLARGE_INTEGER pliNewPointer, DWORD dwMoveMethod,
- BOOL bWrite);
- BOOL (WINAPI *fpDeletePrinterDriverEx)(LPWSTR pName, LPWSTR pEnvironment,
- LPWSTR pDriverName, DWORD dwDeleteFlag,
- DWORD dwVersionNum);
- BOOL (WINAPI *fpAddPerMachineConnection)(LPCWSTR pServer,
- LPCWSTR pPrinterName, LPCWSTR pPrintServer,
- LPCWSTR pProvider);
- BOOL (WINAPI *fpDeletePerMachineConnection)(LPCWSTR pServer,
- LPCWSTR pPrinterName);
- BOOL (WINAPI *fpEnumPerMachineConnections)(LPCWSTR pServer,
- LPBYTE pPrinterEnum, DWORD cbBuf,
- LPDWORD pcbNeeded,
- LPDWORD pcReturned);
- BOOL (WINAPI *fpXcvData)(HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData,
- DWORD cbInputData, PBYTE pOutputData, DWORD cbOutputData,
- PDWORD pcbOutputNeeded, PDWORD pdwStatus);
- BOOL (WINAPI *fpAddPrinterDriverEx)(LPWSTR pName, DWORD Level,
- LPBYTE pDriverInfo, DWORD dwFileCopyFlags);
- BOOL (WINAPI *fpSplReadPrinter)(HANDLE hPrinter, LPBYTE *pBuf, DWORD cbBuf);
- BOOL (WINAPI *fpDriverUnloadComplete)(LPWSTR pDriverFile);
- BOOL (WINAPI *fpGetSpoolFileInfo)(HANDLE hPrinter, LPWSTR *pSpoolDir,
- LPHANDLE phFile, HANDLE hSpoolerProcess,
- HANDLE hAppProcess);
- BOOL (WINAPI *fpCommitSpoolData)(HANDLE hPrinter, DWORD cbCommit);
- BOOL (WINAPI *fpCloseSpoolFileHandle)(HANDLE hPrinter);
- BOOL (WINAPI *fpFlushPrinter)(HANDLE hPrinter, LPBYTE pBuf, DWORD cbBuf,
- LPDWORD pcWritten, DWORD cSleep);
- DWORD (WINAPI *fpSendRecvBidiData)(HANDLE hPort, LPCWSTR pAction,
- LPBIDI_REQUEST_CONTAINER pReqData,
- LPBIDI_RESPONSE_CONTAINER *ppResData);
+
+ BOOL (WINAPI *fpFindClosePrinterChangeNotification)(_In_ HANDLE hChange);
+
+ BOOL
+ (WINAPI *fpAddPortEx)(
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE lpBuffer,
+ _In_ LPWSTR lpMonitorName);
+
+ BOOL (WINAPI *fpShutDown)(_In_opt_ LPVOID pvReserved);
+
+ BOOL
+ (WINAPI *fpRefreshPrinterChangeNotification)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD Reserved,
+ _In_opt_ PVOID pvReserved,
+ _In_ PVOID pPrinterNotifyInfo);
+
+ BOOL
+ (WINAPI *fpOpenPrinterEx)(
+ _In_opt_ LPWSTR pPrinterName,
+ _Out_ LPHANDLE phPrinter,
+ _In_opt_ LPPRINTER_DEFAULTSW pDefault,
+ _In_reads_opt_(_Inexpressible_(0)) LPBYTE pClientInfo,
+ _In_ DWORD Level);
+
+ HANDLE
+ (WINAPI *fpAddPrinterEx)(
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pPrinter,
+ _In_reads_opt_(_Inexpressible_(0)) LPBYTE pClientInfo,
+ _In_ DWORD ClientInfoLevel);
+
+ BOOL
+ (WINAPI *fpSetPort)(
+ _In_opt_ LPWSTR pName,
+ _In_ LPWSTR pPortName,
+ _In_ DWORD dwLevel,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pPortInfo);
+
+ DWORD
+ (WINAPI *fpEnumPrinterData)(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD dwIndex,
+ _Out_writes_bytes_to_opt_(cbValueName, *pcbValueName) LPWSTR pValueName,
+ _In_ DWORD cbValueName,
+ _Out_ LPDWORD pcbValueName,
+ _Out_opt_ LPDWORD pType,
+ _Out_writes_bytes_to_opt_(cbData, *pcbData) LPBYTE pData,
+ _In_ DWORD cbData,
+ _Out_ LPDWORD pcbData);
+
+ DWORD
+ (WINAPI *fpDeletePrinterData)(
+ _In_ HANDLE hPrinter,
+ _In_ LPWSTR pValueName);
+
+ DWORD
+ (WINAPI *fpClusterSplOpen)(
+ _In_ LPCWSTR pszServer,
+ _In_ LPCWSTR pszResource,
+ _Out_ PHANDLE phSpooler,
+ _In_ LPCWSTR pszName,
+ _In_ LPCWSTR pszAddress);
+
+ DWORD (WINAPI *fpClusterSplClose)(_In_ HANDLE hSpooler);
+
+ DWORD (WINAPI *fpClusterSplIsAlive)(_In_ HANDLE hSpooler);
+
+ DWORD
+ (WINAPI *fpSetPrinterDataEx)(
+ _In_ HANDLE hPrinter,
+ _In_ LPCWSTR pKeyName,
+ _In_ LPCWSTR pValueName,
+ _In_ DWORD Type,
+ _In_reads_bytes_(cbData) LPBYTE pData,
+ _In_ DWORD cbData);
+
+ DWORD
+ (WINAPI *fpGetPrinterDataEx)(
+ _In_ HANDLE hPrinter,
+ _In_ LPCWSTR pKeyName,
+ _In_ LPCWSTR pValueName,
+ _Out_opt_ LPDWORD pType,
+ _Out_writes_bytes_to_opt_(nSize, *pcbNeeded) LPBYTE pData,
+ _In_ DWORD nSize,
+ _Out_ LPDWORD pcbNeeded);
+
+ DWORD
+ (WINAPI *fpEnumPrinterDataEx)(
+ _In_ HANDLE hPrinter,
+ _In_ LPCWSTR pKeyName,
+ _Out_writes_bytes_to_opt_(cbEnumValues, *pcbEnumValues) LPBYTE pEnumValues,
+ _In_ DWORD cbEnumValues,
+ _Out_ LPDWORD pcbEnumValues,
+ _Out_ LPDWORD pnEnumValues);
+
+ DWORD
+ (WINAPI *fpEnumPrinterKey)(
+ _In_ HANDLE hPrinter,
+ _In_ LPCWSTR pKeyName,
+ _Out_writes_bytes_to_opt_(cbSubkey, *pcbSubkey) LPWSTR pSubkey,
+ _In_ DWORD cbSubkey,
+ _Out_ LPDWORD pcbSubkey);
+
+ DWORD
+ (WINAPI *fpDeletePrinterDataEx)(
+ _In_ HANDLE hPrinter,
+ _In_ LPCWSTR pKeyName,
+ _In_ LPCWSTR pValueName);
+
+ DWORD
+ (WINAPI *fpDeletePrinterKey)(
+ _In_ HANDLE hPrinter,
+ _In_ LPCWSTR pKeyName);
+
+ BOOL
+ (WINAPI *fpSeekPrinter)(
+ _In_ HANDLE hPrinter,
+ _In_ LARGE_INTEGER liDistanceToMove,
+ _Out_ PLARGE_INTEGER pliNewPointer,
+ _In_ DWORD dwMoveMethod,
+ _In_ BOOL bWrite);
+
+ BOOL
+ (WINAPI *fpDeletePrinterDriverEx)(
+ _In_opt_ LPWSTR pName,
+ _In_opt_ LPWSTR pEnvironment,
+ _In_ LPWSTR pDriverName,
+ _In_ DWORD dwDeleteFlag,
+ _In_ DWORD dwVersionNum);
+
+ BOOL
+ (WINAPI *fpAddPerMachineConnection)(
+ _In_opt_ LPCWSTR pServer,
+ _In_ LPCWSTR pPrinterName,
+ _In_ LPCWSTR pPrintServer,
+ _In_ LPCWSTR pProvider);
+
+ BOOL
+ (WINAPI *fpDeletePerMachineConnection)(
+ _In_opt_ LPCWSTR pServer,
+ _In_ LPCWSTR pPrinterName);
+
+ BOOL
+ (WINAPI *fpEnumPerMachineConnections)(
+ _In_opt_ LPCWSTR pServer,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pPrinterEnum,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcReturned);
+
+ BOOL
+ (WINAPI *fpXcvData)(
+ _In_ HANDLE hXcv,
+ _In_ LPCWSTR pszDataName,
+ _In_reads_bytes_(cbInputData) PBYTE pInputData,
+ _In_ DWORD cbInputData,
+ _Out_writes_bytes_to_opt_(cbOutputData, *pcbOutputNeeded) PBYTE pOutputData,
+ _In_ DWORD cbOutputData,
+ _Out_ PDWORD pcbOutputNeeded,
+ _Out_ PDWORD pdwStatus);
+
+ BOOL
+ (WINAPI *fpAddPrinterDriverEx)(
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pDriverInfo,
+ _In_ DWORD dwFileCopyFlags);
+
+ BOOL
+ (WINAPI *fpSplReadPrinter)(
+ _In_ HANDLE hPrinter,
+ _Out_writes_bytes_(cbBuf) LPBYTE *pBuf,
+ _In_ DWORD cbBuf);
+
+ BOOL (WINAPI *fpDriverUnloadComplete)(_In_ LPWSTR pDriverFile);
+
+ BOOL
+ (WINAPI *fpGetSpoolFileInfo)(
+ _In_ HANDLE hPrinter,
+ _Outptr_result_maybenull_ LPWSTR *pSpoolDir,
+ _Out_ LPHANDLE phFile,
+ _In_ HANDLE hSpoolerProcess,
+ _In_ HANDLE hAppProcess);
+
+ BOOL (WINAPI *fpCommitSpoolData)(_In_ HANDLE hPrinter, _In_ DWORD cbCommit);
+
+ BOOL (WINAPI *fpCloseSpoolFileHandle)(_In_ HANDLE hPrinter);
+
+ BOOL
+ (WINAPI *fpFlushPrinter)(
+ _In_ HANDLE hPrinter,
+ _In_reads_bytes_(cbBuf) LPBYTE pBuf,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcWritten,
+ _In_ DWORD cSleep);
+
+ DWORD
+ (WINAPI *fpSendRecvBidiData)(
+ _In_ HANDLE hPort,
+ _In_ LPCWSTR pAction,
+ _In_ LPBIDI_REQUEST_CONTAINER pReqData,
+ _Outptr_ LPBIDI_RESPONSE_CONTAINER *ppResData);
+
BOOL (WINAPI *fpAddDriverCatalog)(HANDLE hPrinter, DWORD dwLevel,
VOID *pvDriverInfCatInfo, DWORD dwCatalogCopyFlags);
} PRINTPROVIDOR, *LPPRINTPROVIDOR;
@@ -279,31 +656,90 @@
typedef struct _MONITORREG {
DWORD cbSize;
- LONG (WINAPI *fpCreateKey)(HANDLE hcKey, LPCWSTR pszSubKey, DWORD dwOptions,
- REGSAM samDesired,
- PSECURITY_ATTRIBUTES pSecurityAttributes,
- PHANDLE phckResult, PDWORD pdwDisposition,
- HANDLE hSpooler);
- LONG (WINAPI *fpOpenKey)(HANDLE hcKey, LPCWSTR pszSubKey, REGSAM samDesired,
- PHANDLE phkResult, HANDLE hSpooler);
- LONG (WINAPI *fpCloseKey)(HANDLE hcKey, HANDLE hSpooler);
- LONG (WINAPI *fpDeleteKey)(HANDLE hcKey, LPCWSTR pszSubKey, HANDLE hSpooler);
- LONG (WINAPI *fpEnumKey)(HANDLE hcKey, DWORD dwIndex, LPWSTR pszName,
- PDWORD pcchName, PFILETIME pftLastWriteTime,
- HANDLE hSpooler);
- LONG (WINAPI *fpQueryInfoKey)(HANDLE hcKey, PDWORD pcSubKeys, PDWORD pcbKey,
- PDWORD pcValues, PDWORD pcbValue, PDWORD pcbData,
- PDWORD pcbSecurityDescriptor,
- PFILETIME pftLastWriteTime,
- HANDLE hSpooler);
- LONG (WINAPI *fpSetValue)(HANDLE hcKey, LPCWSTR pszValue, DWORD dwType,
- const BYTE* pData, DWORD cbData, HANDLE hSpooler);
- LONG (WINAPI *fpDeleteValue)(HANDLE hcKey, LPCWSTR pszValue, HANDLE hSpooler);
- LONG (WINAPI *fpEnumValue)(HANDLE hcKey, DWORD dwIndex, LPWSTR pszValue,
- PDWORD pcbValue, PDWORD pType, PBYTE pData, PDWORD pcbData,
- HANDLE hSpooler);
- LONG (WINAPI *fpQueryValue)(HANDLE hcKey, LPCWSTR pszValue, PDWORD pType,
- PBYTE pData, PDWORD pcbData, HANDLE hSpooler);
+
+ LONG
+ (WINAPI *fpCreateKey)(
+ _In_ HANDLE hcKey,
+ _In_ LPCWSTR pszSubKey,
+ _In_ DWORD dwOptions,
+ _In_ REGSAM samDesired,
+ _In_opt_ PSECURITY_ATTRIBUTES pSecurityAttributes,
+ _Out_ PHANDLE phckResult,
+ _Out_opt_ PDWORD pdwDisposition,
+ _In_ HANDLE hSpooler);
+
+ LONG
+ (WINAPI *fpOpenKey)(
+ _In_ HANDLE hcKey,
+ _In_ LPCWSTR pszSubKey,
+ _In_ REGSAM samDesired,
+ _Out_ PHANDLE phkResult,
+ _In_ HANDLE hSpooler);
+
+ LONG (WINAPI *fpCloseKey)(_In_ HANDLE hcKey, _In_ HANDLE hSpooler);
+
+ LONG
+ (WINAPI *fpDeleteKey)(
+ _In_ HANDLE hcKey,
+ _In_ LPCWSTR pszSubKey,
+ _In_ HANDLE hSpooler);
+
+ LONG
+ (WINAPI *fpEnumKey)(
+ _In_ HANDLE hcKey,
+ _In_ DWORD dwIndex,
+ _Inout_updates_to_(*pcchName, *pcchName) LPWSTR pszName,
+ _Inout_ PDWORD pcchName,
+ _Out_opt_ PFILETIME pftLastWriteTime,
+ _In_ HANDLE hSpooler);
+
+ LONG
+ (WINAPI *fpQueryInfoKey)(
+ _In_ HANDLE hcKey,
+ _Out_opt_ PDWORD pcSubKeys,
+ _Out_opt_ PDWORD pcbKey,
+ _Out_opt_ PDWORD pcValues,
+ _Out_opt_ PDWORD pcbValue,
+ _Out_opt_ PDWORD pcbData,
+ _Out_opt_ PDWORD pcbSecurityDescriptor,
+ _Out_opt_ PFILETIME pftLastWriteTime,
+ _In_ HANDLE hSpooler);
+
+ LONG
+ (WINAPI *fpSetValue)(
+ _In_ HANDLE hcKey,
+ _In_ LPCWSTR pszValue,
+ _In_ DWORD dwType,
+ _In_reads_bytes_(cbData) const BYTE *pData,
+ _In_ DWORD cbData,
+ _In_ HANDLE hSpooler);
+
+ LONG
+ (WINAPI *fpDeleteValue)(
+ _In_ HANDLE hcKey,
+ _In_ LPCWSTR pszValue,
+ _In_ HANDLE hSpooler);
+
+ LONG
+ (WINAPI *fpEnumValue)(
+ _In_ HANDLE hcKey,
+ _In_ DWORD dwIndex,
+ _Inout_updates_to_(*pcbValue, *pcbValue) LPWSTR pszValue,
+ _Inout_ PDWORD pcbValue,
+ _Out_opt_ PDWORD pType,
+ _Out_writes_bytes_to_opt_(*pcbData, *pcbData) PBYTE pData,
+ _Inout_ PDWORD pcbData,
+ _In_ HANDLE hSpooler);
+
+ LONG
+ (WINAPI *fpQueryValue)(
+ _In_ HANDLE hcKey,
+ _In_ LPCWSTR pszValue,
+ _Out_opt_ PDWORD pType,
+ _Out_writes_bytes_to_opt_(*pcbData, *pcbData) PBYTE pData,
+ _Inout_ PDWORD pcbData,
+ _In_ HANDLE hSpooler);
+
} MONITORREG, *PMONITORREG;
typedef struct _MONITORINIT {
@@ -316,36 +752,111 @@
} MONITORINIT, *PMONITORINIT;
typedef struct _MONITOR {
- BOOL (WINAPI *pfnEnumPorts)(LPWSTR pName, DWORD Level, LPBYTE pPorts,
- DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned);
- BOOL (WINAPI *pfnOpenPort)(LPWSTR pName, PHANDLE pHandle);
- BOOL (WINAPI *pfnOpenPortEx)(LPWSTR pPortName, LPWSTR pPrinterName,
- PHANDLE pHandle, struct _MONITOR *pMonitor);
- BOOL (WINAPI *pfnStartDocPort)(HANDLE hPort, LPWSTR pPrinterName,
- DWORD JobId, DWORD Level, LPBYTE pDocInfo);
- BOOL (WINAPI *pfnWritePort)(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuf,
- LPDWORD pcbWritten);
- BOOL (WINAPI *pfnReadPort)(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuffer,
- LPDWORD pcbRead);
- BOOL (WINAPI *pfnEndDocPort)(HANDLE hPort);
- BOOL (WINAPI *pfnClosePort)(HANDLE hPort);
- BOOL (WINAPI *pfnAddPort)(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName);
- BOOL (WINAPI *pfnAddPortEx)(LPWSTR pName, DWORD Level, LPBYTE lpBuffer,
- LPWSTR lpMonitorName);
- BOOL (WINAPI *pfnConfigurePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
- BOOL (WINAPI *pfnDeletePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
- BOOL (WINAPI *pfnGetPrinterDataFromPort)(HANDLE hPort, DWORD ControlID,
- LPWSTR pValueName, LPWSTR lpInBuffer,
- DWORD cbInBuffer, LPWSTR lpOutBuffer,
- DWORD cbOutBuffer, LPDWORD lpcbReturned);
- BOOL (WINAPI *pfnSetPortTimeOuts)(HANDLE hPort, LPCOMMTIMEOUTS lpCTO,
- DWORD reserved);
- BOOL (WINAPI *pfnXcvOpenPort)(LPCWSTR pszObject, ACCESS_MASK GrantedAccess, PHANDLE
phXcv);
- DWORD (WINAPI *pfnXcvDataPort)(HANDLE hXcv, LPCWSTR pszDataName,
- PBYTE pInputData, DWORD cbInputData,
- PBYTE pOutputData, DWORD cbOutputData,
- PDWORD pcbOutputNeeded);
- BOOL (WINAPI *pfnXcvClosePort)(HANDLE hXcv);
+
+ BOOL
+ (WINAPI *pfnEnumPorts)(
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pPorts,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcReturned);
+
+ BOOL (WINAPI *pfnOpenPort)(_In_ LPWSTR pName, _Out_ PHANDLE pHandle);
+
+ BOOL
+ (WINAPI *pfnOpenPortEx)(
+ _In_ LPWSTR pPortName,
+ _In_ LPWSTR pPrinterName,
+ _Out_ PHANDLE pHandle,
+ _In_ struct _MONITOR *pMonitor);
+
+ BOOL
+ (WINAPI *pfnStartDocPort)(
+ _In_ HANDLE hPort,
+ _In_ LPWSTR pPrinterName,
+ _In_ DWORD JobId,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pDocInfo);
+
+ BOOL
+ (WINAPI *pfnWritePort)(
+ _In_ HANDLE hPort,
+ _In_reads_bytes_(cbBuf) LPBYTE pBuffer,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbWritten);
+
+ BOOL
+ (WINAPI *pfnReadPort)(
+ _In_ HANDLE hPort,
+ _Out_writes_bytes_to_(cbBuffer, *pcbRead) LPBYTE pBuffer,
+ _In_ DWORD cbBuffer,
+ _Out_ LPDWORD pcbRead);
+
+ BOOL (WINAPI *pfnEndDocPort)(_In_ HANDLE hPort);
+
+ BOOL (WINAPI *pfnClosePort)(_In_ HANDLE hPort);
+
+ BOOL
+ (WINAPI *pfnAddPort)(
+ _In_ LPWSTR pName,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pMonitorName);
+
+ BOOL
+ (WINAPI *pfnAddPortEx)(
+ _In_ LPWSTR pName,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE lpBuffer,
+ _In_ LPWSTR lpMonitorName);
+
+ BOOL
+ (WINAPI *pfnConfigurePort)(
+ _In_ LPWSTR pName,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pPortName);
+
+ BOOL
+ (WINAPI *pfnDeletePort)(
+ _In_ LPWSTR pName,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pPortName);
+
+ BOOL
+ (WINAPI *pfnGetPrinterDataFromPort)(
+ _In_ HANDLE hPort,
+ _In_ DWORD ControlID,
+ _In_ LPWSTR pValueName,
+ _In_reads_bytes_(cbInBuffer) LPWSTR lpInBuffer,
+ _In_ DWORD cbInBuffer,
+ _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbReturned) LPWSTR lpOutBuffer,
+ _In_ DWORD cbOutBuffer,
+ _Out_ LPDWORD lpcbReturned);
+
+ BOOL
+ (WINAPI *pfnSetPortTimeOuts)(
+ _In_ HANDLE hPort,
+ _In_ LPCOMMTIMEOUTS lpCTO,
+ _In_ DWORD reserved);
+
+ BOOL
+ (WINAPI *pfnXcvOpenPort)(
+ _In_ LPCWSTR pszObject,
+ _In_ ACCESS_MASK GrantedAccess,
+ _Out_ PHANDLE phXcv);
+
+ DWORD
+ (WINAPI *pfnXcvDataPort)(
+ _In_ HANDLE hXcv,
+ _In_ LPCWSTR pszDataName,
+ _In_reads_bytes_(cbInputData) PBYTE pInputData,
+ _In_ DWORD cbInputData,
+ _Out_writes_bytes_to_opt_(cbOutputData, *pcbOutputNeeded) PBYTE pOutputData,
+ _In_ DWORD cbOutputData,
+ _Out_ PDWORD pcbOutputNeeded);
+
+ BOOL (WINAPI *pfnXcvClosePort)(_In_ HANDLE hXcv);
+
} MONITOR, *LPMONITOR;
typedef struct _MONITOREX {
@@ -355,60 +866,175 @@
typedef struct _MONITOR2 {
DWORD cbSize;
- BOOL (WINAPI *pfnEnumPorts)(LPWSTR pName, DWORD Level, LPBYTE pPorts,
- DWORD cbBuf, LPDWORD pcbNeeded,
- LPDWORD pcReturned);
- BOOL (WINAPI *pfnOpenPort)(LPWSTR pName, PHANDLE pHandle);
- BOOL (WINAPI *pfnOpenPortEx)(LPWSTR pPortName, LPWSTR pPrinterName,
- PHANDLE pHandle, struct _MONITOR2 *pMonitor2);
- BOOL (WINAPI *pfnStartDocPort)(HANDLE hPort, LPWSTR pPrinterName,
- DWORD JobId, DWORD Level, LPBYTE pDocInfo);
- BOOL (WINAPI *pfnWritePort)(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuf,
- LPDWORD pcbWritten);
- BOOL (WINAPI *pfnReadPort)(HANDLE hPort, LPBYTE pBuffer, DWORD cbBuffer,
- LPDWORD pcbRead);
- BOOL (WINAPI *pfnEndDocPort)(HANDLE hPort);
- BOOL (WINAPI *pfnClosePort)(HANDLE hPort);
- BOOL (WINAPI *pfnAddPort)(LPWSTR pName, HWND hWnd, LPWSTR pMonitorName);
- BOOL (WINAPI *pfnAddPortEx)(LPWSTR pName, DWORD Level, LPBYTE lpBuffer,
- LPWSTR lpMonitorName);
- BOOL (WINAPI *pfnConfigurePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
- BOOL (WINAPI *pfnDeletePort)(LPWSTR pName, HWND hWnd, LPWSTR pPortName);
- BOOL (WINAPI *pfnGetPrinterDataFromPort)(HANDLE hPort, DWORD ControlID,
- LPWSTR pValueName, LPWSTR lpInBuffer,
- DWORD cbInBuffer, LPWSTR lpOutBuffer,
- DWORD cbOutBuffer, LPDWORD lpcbReturned);
- BOOL (WINAPI *pfnSetPortTimeOuts)(HANDLE hPort, LPCOMMTIMEOUTS lpCTO,
- DWORD reserved);
- BOOL (WINAPI *pfnXcvOpenPort)(HANDLE hMonitor, LPCWSTR pszObject,
- ACCESS_MASK GrantedAccess, PHANDLE phXcv);
- DWORD (WINAPI *pfnXcvDataPort)(HANDLE hXcv, LPCWSTR pszDataName,
- PBYTE pInputData, DWORD cbInputData,
- PBYTE pOutputData, DWORD cbOutputData,
- PDWORD pcbOutputNeeded);
- BOOL (WINAPI *pfnXcvClosePort)(HANDLE hXcv);
- VOID (WINAPI *pfnShutdown)(HANDLE hMonitor);
+
+ BOOL
+ (WINAPI *pfnEnumPorts)(
+ _In_ HANDLE hMonitor,
+ _In_opt_ LPWSTR pName,
+ _In_ DWORD Level,
+ _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pPorts,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbNeeded,
+ _Out_ LPDWORD pcReturned);
+
+ BOOL
+ (WINAPI *pfnOpenPort)(
+ _In_ HANDLE hMonitor,
+ _In_ LPWSTR pName,
+ _Out_ PHANDLE pHandle);
+
+ BOOL
+ (WINAPI *pfnOpenPortEx)(
+ _In_ HANDLE hMonitor,
+ _In_ HANDLE hMonitorPort,
+ _In_ LPWSTR pPortName,
+ _In_ LPWSTR pPrinterName,
+ _Out_ PHANDLE pHandle,
+ _In_ struct _MONITOR2 *pMonitor2);
+
+ BOOL
+ (WINAPI *pfnStartDocPort)(
+ _In_ HANDLE hPort,
+ _In_ LPWSTR pPrinterName,
+ _In_ DWORD JobId,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE pDocInfo);
+
+ BOOL
+ (WINAPI *pfnWritePort)(
+ _In_ HANDLE hPort,
+ _In_reads_bytes_(cbBuf) LPBYTE pBuffer,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbWritten);
+
+ BOOL
+ (WINAPI *pfnReadPort)(
+ _In_ HANDLE hPort,
+ _Out_writes_bytes_to_opt_(cbBuffer, *pcbRead) LPBYTE pBuffer,
+ _In_ DWORD cbBuffer,
+ _Out_ LPDWORD pcbRead);
+
+ BOOL (WINAPI *pfnEndDocPort)(_In_ HANDLE hPort);
+
+ BOOL (WINAPI *pfnClosePort)(_In_ HANDLE hPort);
+
+ BOOL
+ (WINAPI *pfnAddPort)(
+ _In_ HANDLE hMonitor,
+ _In_ LPWSTR pName,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pMonitorName);
+
+ BOOL
+ (WINAPI *pfnAddPortEx)(
+ _In_ HANDLE hMonitor,
+ _In_ LPWSTR pName,
+ _In_ DWORD Level,
+ _In_reads_(_Inexpressible_(0)) LPBYTE lpBuffer,
+ _In_ LPWSTR lpMonitorName);
+
+ BOOL
+ (WINAPI *pfnConfigurePort)(
+ _In_ HANDLE hMonitor,
+ _In_ LPWSTR pName,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pPortName);
+
+ BOOL
+ (WINAPI *pfnDeletePort)(
+ _In_ HANDLE hMonitor,
+ _In_ LPWSTR pName,
+ _In_ HWND hWnd,
+ _In_ LPWSTR pPortName);
+
+ BOOL
+ (WINAPI *pfnGetPrinterDataFromPort)(
+ _In_ HANDLE hPort,
+ _In_ DWORD ControlID,
+ _In_ LPWSTR pValueName,
+ _In_reads_bytes_(cbInBuffer) LPWSTR lpInBuffer,
+ _In_ DWORD cbInBuffer,
+ _Out_writes_bytes_to_opt_(cbOutBuffer, *lpcbReturned) LPWSTR lpOutBuffer,
+ _In_ DWORD cbOutBuffer,
+ _Out_ LPDWORD lpcbReturned);
+
+ BOOL
+ (WINAPI *pfnSetPortTimeOuts)(
+ _In_ HANDLE hPort,
+ _In_ LPCOMMTIMEOUTS lpCTO,
+ _In_ DWORD reserved);
+
+ BOOL
+ (WINAPI *pfnXcvOpenPort)(
+ _In_ HANDLE hMonitor,
+ _In_ LPCWSTR pszObject,
+ _In_ ACCESS_MASK GrantedAccess,
+ _Out_ PHANDLE phXcv);
+
+ DWORD
+ (WINAPI *pfnXcvDataPort)(
+ _In_ HANDLE hXcv,
+ _In_ LPCWSTR pszDataName,
+ _In_reads_bytes_(cbInputData) PBYTE pInputData,
+ _In_ DWORD cbInputData,
+ _Out_writes_bytes_to_opt_(cbOutputData, *pcbOutputNeeded) PBYTE pOutputData,
+ _In_ DWORD cbOutputData,
+ _Out_ PDWORD pcbOutputNeeded);
+
+ BOOL (WINAPI *pfnXcvClosePort)(_In_ HANDLE hXcv);
+
+ VOID (WINAPI *pfnShutdown)(_In_ HANDLE hMonitor);
+
#if (NTDDI_VERSION >= NTDDI_WINXP)
- DWORD (WINAPI *pfnSendRecvBidiDataFromPort)(HANDLE hPort, DWORD dwAccessBit,
- LPCWSTR pAction,
- PBIDI_REQUEST_CONTAINER pReqData,
- PBIDI_RESPONSE_CONTAINER *ppResData);
+ DWORD
+ (WINAPI *pfnSendRecvBidiDataFromPort)(
+ _In_ HANDLE hPort,
+ _In_ DWORD dwAccessBit,
+ _In_ LPCWSTR pAction,
+ _In_ PBIDI_REQUEST_CONTAINER pReqData,
+ _Outptr_ PBIDI_RESPONSE_CONTAINER *ppResData);
#endif
+
#if (NTDDI_VERSION >= NTDDI_WIN7)
- DWORD (WINAPI *pfnNotifyUsedPorts)(HANDLE hMonitor, DWORD cPorts,
- PCWSTR *ppszPorts);
-
- DWORD (WINAPI *pfnNotifyUnusedPorts)(HANDLE hMonitor, DWORD cPorts,
- PCWSTR *ppszPorts);
+
+ DWORD
+ (WINAPI *pfnNotifyUsedPorts)(
+ _In_ HANDLE hMonitor,
+ _In_ DWORD cPorts,
+ _In_reads_(cPorts) PCWSTR *ppszPorts);
+
+ DWORD
+ (WINAPI *pfnNotifyUnusedPorts)(
+ _In_ HANDLE hMonitor,
+ _In_ DWORD cPorts,
+ _In_reads_(cPorts) PCWSTR *ppszPorts);
+
#endif
+
} MONITOR2, *LPMONITOR2, *PMONITOR2;
typedef struct _MONITORUI {
DWORD dwMonitorUISize;
- BOOL (WINAPI *pfnAddPortUI)(PCWSTR pszServer, HWND hWnd,
- PCWSTR pszPortNameIn, PWSTR *ppszPortNameOut);
- BOOL (WINAPI *pfnConfigurePortUI)(PCWSTR pName, HWND hWnd, PCWSTR pPortName);
- BOOL (WINAPI *pfnDeletePortUI)(PCWSTR pszServer, HWND hWnd, PCWSTR pszPortName);
+
+ BOOL
+ (WINAPI *pfnAddPortUI)(
+ _At_(return, _Success_(return != 0)) _In_opt_ PCWSTR pszServer,
+ _In_ HWND hWnd,
+ _In_ PCWSTR pszPortNameIn,
+ _Out_opt_ PWSTR *ppszPortNameOut);
+
+ BOOL
+ (WINAPI *pfnConfigurePortUI)(
+ _In_opt_ PCWSTR pName,
+ _In_ HWND hWnd,
+ _In_ PCWSTR pPortName);
+
+ BOOL
+ (WINAPI *pfnDeletePortUI)(
+ _In_opt_ PCWSTR pszServer,
+ _In_ HWND hWnd,
+ _In_ PCWSTR pszPortName);
+
} MONITORUI, *PMONITORUI;
#if (NTDDI_VERSION >= NTDDI_WINXP)
@@ -455,12 +1081,12 @@
typedef BOOL
(CALLBACK *ROUTER_NOTIFY_CALLBACK)(
- IN DWORD dwCommand,
- IN PVOID pContext,
- IN DWORD dwColor,
- IN PPRINTER_NOTIFY_INFO pNofityInfo,
- IN DWORD fdwFlags,
- OUT PDWORD pdwResult);
+ _In_ DWORD dwCommand,
+ _In_ PVOID pContext,
+ _In_ DWORD dwColor,
+ _In_ PPRINTER_NOTIFY_INFO pNofityInfo,
+ _In_ DWORD fdwFlags,
+ _Out_ PDWORD pdwResult);
typedef enum _NOTIFICATION_CALLBACK_COMMANDS {
NOTIFICATION_COMMAND_NOTIFY,
@@ -542,182 +1168,236 @@
BOOL
WINAPI
InitializePrintProvidor(
- OUT LPPRINTPROVIDOR pPrintProvidor,
- IN DWORD cbPrintProvidor,
- IN LPWSTR pFullRegistryPath OPTIONAL);
+ _Out_writes_bytes_(cbPrintProvidor) LPPRINTPROVIDOR pPrintProvidor,
+ _In_ DWORD cbPrintProvidor,
+ _In_opt_ LPWSTR pFullRegistryPath);
HANDLE
WINAPI
OpenPrintProcessor(
- IN LPWSTR pPrinterName,
- IN PPRINTPROCESSOROPENDATA pPrintProcessorOpenData);
+ _In_ LPWSTR pPrinterName,
+ _In_ PPRINTPROCESSOROPENDATA pPrintProcessorOpenData);
BOOL
WINAPI
PrintDocumentOnPrintProcessor(
- IN HANDLE hPrintProcessor,
- IN LPWSTR pDocumentName);
+ _In_ HANDLE hPrintProcessor,
+ _In_ LPWSTR pDocumentName);
BOOL
WINAPI
ClosePrintProcessor(
- IN OUT HANDLE hPrintProcessor);
+ _Inout_ HANDLE hPrintProcessor);
BOOL
WINAPI
ControlPrintProcessor(
- IN HANDLE hPrintProcessor,
- IN DWORD Command);
+ _In_ HANDLE hPrintProcessor,
+ _In_ DWORD Command);
DWORD
WINAPI
GetPrintProcessorCapabilities(
- IN LPTSTR pValueName,
- IN DWORD dwAttributes,
- OUT LPBYTE pData,
- IN DWORD nSize,
- OUT LPDWORD pcbNeeded);
+ _In_ LPTSTR pValueName,
+ _In_ DWORD dwAttributes,
+ _Out_writes_bytes_(nSize) LPBYTE pData,
+ _In_ DWORD nSize,
+ _Out_ LPDWORD pcbNeeded);
BOOL
WINAPI
InitializeMonitor(
- IN LPWSTR pRegistryRoot);
+ _In_ LPWSTR pRegistryRoot);
BOOL
WINAPI
OpenPort(
- IN LPWSTR pName,
- OUT PHANDLE pHandle);
+ _In_ LPWSTR pName,
+ _Out_ PHANDLE pHandle);
BOOL
WINAPI
WritePort(
- HANDLE hPort,
- LPBYTE pBuffer,
- DWORD cbBuf,
- LPDWORD pcbWritten);
+ _In_ HANDLE hPort,
+ _In_reads_bytes_(cbBuf) LPBYTE pBuffer,
+ _In_ DWORD cbBuf,
+ _Out_ LPDWORD pcbWritten);
BOOL
WINAPI
ReadPort(
- HANDLE hPort,
- LPBYTE pBuffer,
- DWORD cbBuffer,
- LPDWORD pcbRead);
+ _In_ HANDLE hPort,
+ _Out_writes_bytes_(cbBuffer) LPBYTE pBuffer,
+ _In_ DWORD cbBuffer,
+ _Out_ LPDWORD pcbRead);
BOOL
WINAPI
ClosePort(
- IN HANDLE hPort);
+ _In_ HANDLE hPort);
BOOL
WINAPI
XcvOpenPort(
- LPCWSTR pszObject,
- ACCESS_MASK GrantedAccess,
- PHANDLE phXcv);
+ _In_ LPCWSTR pszObject,
+ _In_ ACCESS_MASK GrantedAccess,
+ _Out_ PHANDLE phXcv);
DWORD
WINAPI
XcvDataPort(
- HANDLE hXcv,
- LPCWSTR pszDataName,
- PBYTE pInputData,
- DWORD cbInputData,
- PBYTE pOutputData,
- DWORD cbOutputData,
- PDWORD pcbOutputNeeded);
+ _In_ HANDLE hXcv,
+ _In_ LPCWSTR pszDataName,
+ _In_reads_bytes_(cbInputData) PBYTE pInputData,
+ _In_ DWORD cbInputData,
+ _Out_writes_bytes_(cbOutputData) PBYTE pOutputData,
+ _In_ DWORD cbOutputData,
+ _Out_ PDWORD pcbOutputNeeded);
BOOL
WINAPI
XcvClosePort(
- IN HANDLE hXcv);
-
+ _In_ HANDLE hXcv);
+
+_Success_(return != 0)
BOOL
WINAPI
AddPortUI(
- IN PCWSTR pszServer OPTIONAL,
- IN HWND hWnd,
- IN PCWSTR pszMonitorNameIn,
- OUT PWSTR *ppszPortNameOut OPTIONAL);
+ _In_opt_ PCWSTR pszServer,
+ _In_ HWND hWnd,
+ _In_ PCWSTR pszMonitorNameIn,
+ _Out_opt_ PWSTR *ppszPortNameOut);
BOOL
WINAPI
ConfigurePortUI(
- IN PCWSTR pszServer,
- IN HWND hWnd,
- IN PCWSTR pszPortName);
+ _In_ PCWSTR pszServer,
+ _In_ HWND hWnd,
+ _In_ PCWSTR pszPortName);
BOOL
WINAPI
DeletePortUI(
- IN PCWSTR pszServer,
- IN HWND hWnd,
- IN PCWSTR pszPortName);
+ _In_ PCWSTR pszServer,
+ _In_ HWND hWnd,
+ _In_ PCWSTR pszPortName);
BOOL
WINAPI
SplDeleteSpoolerPortStart(
- IN PCWSTR pPortName);
+ _In_ PCWSTR pPortName);
BOOL
WINAPI
SplDeleteSpoolerPortEnd(
- IN PCWSTR pName,
- IN BOOL bDeletePort);
+ _In_ PCWSTR pName,
+ _In_ BOOL bDeletePort);
BOOL
WINAPI
SpoolerCopyFileEvent(
- IN LPWSTR pszPrinterName,
- IN LPWSTR pszKey,
- IN DWORD dwCopyFileEvent);
+ _In_ LPWSTR pszPrinterName,
+ _In_ LPWSTR pszKey,
+ _In_ DWORD dwCopyFileEvent);
DWORD
WINAPI
GenerateCopyFilePaths(
- IN LPCWSTR pszPrinterName,
- IN LPCWSTR pszDirectory,
- IN LPBYTE pSplClientInfo,
- IN DWORD dwLevel,
- IN OUT LPWSTR pszSourceDir,
- IN OUT LPDWORD pcchSourceDirSize,
- IN OUT LPWSTR pszTargetDir,
- IN OUT LPDWORD pcchTargetDirSize,
- IN DWORD dwFlags);
-
-HANDLE WINAPI CreatePrinterIC(HANDLE hPrinter, LPDEVMODEW pDevMode);
-BOOL WINAPI PlayGdiScriptOnPrinterIC(HANDLE hPrinterIC, LPBYTE pIn,
- DWORD cIn, LPBYTE pOut, DWORD cOut, DWORD ul);
-BOOL WINAPI DeletePrinterIC(HANDLE hPrinterIC);
-BOOL WINAPI DevQueryPrint(HANDLE hPrinter, LPDEVMODEW pDevMode, DWORD *pResID);
+ _In_ LPCWSTR pszPrinterName,
+ _In_ LPCWSTR pszDirectory,
+ _In_ LPBYTE pSplClientInfo,
+ _In_ DWORD dwLevel,
+ _Inout_updates_(*pcchSourceDirSize) LPWSTR pszSourceDir,
+ _Inout_ LPDWORD pcchSourceDirSize,
+ _Inout_updates_(*pcchTargetDirSize) LPWSTR pszTargetDir,
+ _Inout_ LPDWORD pcchTargetDirSize,
+ _In_ DWORD dwFlags);
+
+HANDLE
+WINAPI
+CreatePrinterIC(
+ _In_ HANDLE hPrinter,
+ _In_opt_ LPDEVMODEW pDevMode);
+
+BOOL
+WINAPI
+PlayGdiScriptOnPrinterIC(
+ _In_ HANDLE hPrinterIC,
+ _In_reads_bytes_(cIn) LPBYTE pIn,
+ _In_ DWORD cIn,
+ _Out_writes_bytes_(cOut) LPBYTE pOut,
+ _In_ DWORD cOut,
+ _In_ DWORD ul);
+
+BOOL WINAPI DeletePrinterIC(_In_ HANDLE hPrinterIC);
+
+BOOL
+WINAPI
+DevQueryPrint(
+ _In_ HANDLE hPrinter,
+ _In_ LPDEVMODEW pDevMode,
+ _Out_ DWORD *pResID);
+
HANDLE WINAPI RevertToPrinterSelf(VOID);
-BOOL WINAPI ImpersonatePrinterClient(HANDLE hToken);
-BOOL WINAPI ReplyPrinterChangeNotification(HANDLE hNotify, DWORD fdwFlags,
- PDWORD pdwResult, PVOID pPrinterNotifyInfo);
-BOOL WINAPI ReplyPrinterChangeNotificationEx(HANDLE hNotify, DWORD dwColor,
- DWORD fdwFlags, PDWORD pdwResult,
- PVOID pPrinterNotifyInfo);
-BOOL WINAPI PartialReplyPrinterChangeNotification(HANDLE hNotify,
- PPRINTER_NOTIFY_INFO_DATA
pInfoDataSrc);
-PPRINTER_NOTIFY_INFO WINAPI RouterAllocPrinterNotifyInfo(DWORD cPrinterNotifyInfoData);
-BOOL WINAPI RouterFreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO pInfo);
-
-BOOL WINAPI AppendPrinterNotifyInfoData(PPRINTER_NOTIFY_INFO pInfoDest,
- PPRINTER_NOTIFY_INFO_DATA pInfoDataSrc,
- DWORD fdwFlags);
-DWORD WINAPI CallRouterFindFirstPrinterChangeNotification(HANDLE hPrinter,
- DWORD fdwFlags,
- DWORD fdwOptions,
- HANDLE hNotify,
- PPRINTER_NOTIFY_OPTIONS
pPrinterNotifyOptions);
-BOOL WINAPI ProvidorFindFirstPrinterChangeNotification(HANDLE hPrinter,
- DWORD fdwFlags,
- DWORD fdwOptions,
- HANDLE hNotify,
- PVOID pvReserved0,
- PVOID pvReserved1);
-BOOL WINAPI ProvidorFindClosePrinterChangeNotification(HANDLE hPrinter);
+BOOL WINAPI ImpersonatePrinterClient(_In_ HANDLE hToken);
+
+BOOL
+WINAPI
+ReplyPrinterChangeNotification(
+ _In_ HANDLE hNotify,
+ _In_ DWORD fdwFlags,
+ _Out_opt_ PDWORD pdwResult,
+ _In_opt_ PVOID pPrinterNotifyInfo);
+
+BOOL
+WINAPI
+ReplyPrinterChangeNotificationEx(
+ _In_ HANDLE hNotify,
+ _In_ DWORD dwColor,
+ _In_ DWORD fdwFlags,
+ _Out_ PDWORD pdwResult,
+ _In_ PVOID pPrinterNotifyInfo);
+
+BOOL
+WINAPI
+PartialReplyPrinterChangeNotification(
+ _In_ HANDLE hNotify,
+ _In_opt_ PPRINTER_NOTIFY_INFO_DATA pInfoDataSrc);
+
+PPRINTER_NOTIFY_INFO
+WINAPI
+RouterAllocPrinterNotifyInfo(
+ _In_ DWORD cPrinterNotifyInfoData);
+
+BOOL WINAPI RouterFreePrinterNotifyInfo(_In_opt_ PPRINTER_NOTIFY_INFO pInfo);
+
+BOOL
+WINAPI
+AppendPrinterNotifyInfoData(
+ _In_ PPRINTER_NOTIFY_INFO pInfoDest,
+ _In_opt_ PPRINTER_NOTIFY_INFO_DATA pInfoDataSrc,
+ _In_ DWORD fdwFlags);
+
+DWORD
+WINAPI
+CallRouterFindFirstPrinterChangeNotification(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD fdwFlags,
+ _In_ DWORD fdwOptions,
+ _In_ HANDLE hNotify,
+ _In_ PPRINTER_NOTIFY_OPTIONS pPrinterNotifyOptions);
+
+BOOL
+WINAPI
+ProvidorFindFirstPrinterChangeNotification(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD fdwFlags,
+ _In_ DWORD fdwOptions,
+ _In_ HANDLE hNotify,
+ _In_opt_ PVOID pvReserved0,
+ _Out_opt_ PVOID pvReserved1);
+
+BOOL WINAPI ProvidorFindClosePrinterChangeNotification(_In_ HANDLE hPrinter);
/* Spooler */
BOOL WINAPI SpoolerFindFirstPrinterChangeNotification(HANDLE hPrinter,
@@ -726,41 +1406,65 @@
PHANDLE phEvent,
PVOID pPrinterNotifyOptions,
PVOID pvReserved);
-BOOL WINAPI SpoolerFindNextPrinterChangeNotification(HANDLE hPrinter,
- LPDWORD pfdwChange,
- PVOID pvReserved0,
- PVOID ppPrinterNotifyInfo);
-VOID WINAPI SpoolerFreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO pInfo);
-BOOL WINAPI SpoolerFindClosePrinterChangeNotification(HANDLE hPrinter);
+
+BOOL
+WINAPI
+SpoolerFindNextPrinterChangeNotification(
+ _In_ HANDLE hPrinter,
+ _Out_ LPDWORD pfdwChange,
+ _In_opt_ LPVOID pPrinterNotifyOptions,
+ _Inout_opt_ LPVOID *ppPrinterNotifyInfo);
+
+VOID WINAPI SpoolerFreePrinterNotifyInfo(_In_ PPRINTER_NOTIFY_INFO pInfo);
+BOOL WINAPI SpoolerFindClosePrinterChangeNotification(_In_ HANDLE hPrinter);
/* Port monitor / Language monitor / Print monitor */
-LPMONITOR2 WINAPI InitializePrintMonitor2(PMONITORINIT pMonitorInit,
- PHANDLE phMonitor);
+
+LPMONITOR2
+WINAPI
+InitializePrintMonitor2(
+ _In_ PMONITORINIT pMonitorInit,
+ _Out_ PHANDLE phMonitor);
+
PMONITORUI WINAPI InitializePrintMonitorUI(VOID);
-LPMONITOREX WINAPI InitializePrintMonitor(LPWSTR pRegistryRoot);
-BOOL WINAPI InitializeMonitorEx(LPWSTR pRegistryRoot, LPMONITOR pMonitor);
+LPMONITOREX WINAPI InitializePrintMonitor(_In_ LPWSTR pRegistryRoot);
+
+BOOL
+WINAPI
+InitializeMonitorEx(
+ _In_ LPWSTR pRegistryRoot,
+ _Out_ LPMONITOR pMonitor);
#if (NTDDI_VERSION >= NTDDI_WINXP)
-PBIDI_RESPONSE_CONTAINER WINAPI RouterAllocBidiResponseContainer(DWORD Count);
-PVOID WINAPI RouterAllocBidiMem(size_t NumBytes);
-DWORD WINAPI RouterFreeBidiResponseContainer(PBIDI_RESPONSE_CONTAINER pData);
-VOID WINAPI RouterFreeBidiMem(PVOID pMemPointer);
+PBIDI_RESPONSE_CONTAINER
+WINAPI
+RouterAllocBidiResponseContainer(
+ _In_ DWORD Count);
+
+PVOID WINAPI RouterAllocBidiMem(_In_ size_t NumBytes);
+
+DWORD
+WINAPI
+RouterFreeBidiResponseContainer(
+ _In_ PBIDI_RESPONSE_CONTAINER pData);
+
+VOID WINAPI RouterFreeBidiMem(_In_ PVOID pMemPointer);
BOOL
WINAPI
SplPromptUIInUsersSession(
- IN HANDLE hPrinter,
- IN DWORD JobId,
- IN PSHOWUIPARAMS pUIParams,
- OUT DWORD *pResponse);
+ _In_ HANDLE hPrinter,
+ _In_ DWORD JobId,
+ _In_ PSHOWUIPARAMS pUIParams,
+ _Out_ DWORD *pResponse);
DWORD
WINAPI
SplIsSessionZero(
- IN HANDLE hPrinter,
- IN DWORD JobId,
- OUT BOOL *pIsSessionZero);
+ _In_ HANDLE hPrinter,
+ _In_ DWORD JobId,
+ _Out_ BOOL *pIsSessionZero);
#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
@@ -768,9 +1472,9 @@
BOOL
WINAPI
GetJobAttributes(
- IN LPWSTR pPrinterName,
- IN LPDEVMODEW pDevmode,
- OUT PATTRIBUTE_INFO_3 pAttributeInfo);
+ _In_ LPWSTR pPrinterName,
+ _In_ LPDEVMODEW pDevmode,
+ _Out_ PATTRIBUTE_INFO_3 pAttributeInfo);
#endif
#if (NTDDI_VERSION >= NTDDI_VISTA)
@@ -780,17 +1484,20 @@
BOOL
WINAPI
GetJobAttributesEx(
- IN LPWSTR pPrinterName,
- IN LPDEVMODEW pDevmode,
- IN DWORD dwLevel,
- OUT LPBYTE pAttributeInfo,
- IN DWORD nSize,
- IN DWORD dwFlags);
-
-BOOL WINAPI SpoolerRefreshPrinterChangeNotification(HANDLE hPrinter,
- DWORD dwColor,
- PPRINTER_NOTIFY_OPTIONS pOptions,
- PPRINTER_NOTIFY_INFO *ppInfo);
+ _In_ LPWSTR pPrinterName,
+ _In_ LPDEVMODEW pDevmode,
+ _In_ DWORD dwLevel,
+ _Out_writes_bytes_(nSize) LPBYTE pAttributeInfo,
+ _In_ DWORD nSize,
+ _In_ DWORD dwFlags);
+
+BOOL
+WINAPI
+SpoolerRefreshPrinterChangeNotification(
+ _In_ HANDLE hPrinter,
+ _In_ DWORD dwColor,
+ _In_ PPRINTER_NOTIFY_OPTIONS pOptions,
+ _Inout_opt_ PPRINTER_NOTIFY_INFO *ppInfo);
#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
@@ -804,3 +1511,5 @@
#ifdef __cplusplus
}
#endif
+
+#endif /* _WINSPLP_ */