2 * PROJECT: ReactOS Printing Include files
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Undocumented APIs of the Spooler Router "spoolss.dll" and internally shared interfaces
5 * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin@reactos.org)
8 #ifndef _REACTOS_SPOOLSS_H
9 #define _REACTOS_SPOOLSS_H
11 #define RESETPRINTERDEFAULTDATATYPE 0x0001
12 #define RESETPRINTERDEFAULTDEVMODE 0x0002
14 #define PORT_IS_UNKNOWN 0
17 #define PORT_IS_FILE 3
18 #define PORT_IS_FILENAME 4
19 #define PORT_IS_WINE 5
20 #define PORT_IS_UNIXNAME 5
21 #define PORT_IS_PIPE 6
22 #define PORT_IS_VNET 7
27 #define MAX_PRINTER_NAME 220
29 typedef struct _MARSHALL_DOWN_INFO
31 DWORD dwOffset
; /** Byte offset of this element within the structure or MAXDWORD to indicate the end of the array */
32 DWORD cbSize
; /** Total size of this element in bytes under Windows. Unused here, I don't know what we need this number for. */
33 DWORD cbPerElementSize
; /** If this element is a structure itself, this field gives the size in bytes of each element of the structure.
34 Otherwise, this is the same as cbTotalSize. E.g. for SYSTEMTIME, cbSize would be 16 and cbPerElementSize would be 2.
35 Unused here, I don't know what we need this number for. */
36 BOOL bAdjustAddress
; /** TRUE if MarshallDownStructure shall adjust the address of this element, FALSE if it shall leave this element untouched. */
38 MARSHALL_DOWN_INFO
, *PMARSHALL_DOWN_INFO
;
40 /** From MS-RPRN, 2.2.1.10.1 */
41 typedef struct _PRINTER_INFO_STRESS
50 DWORD cTotalPagesPrinted
;
56 DWORD cErrorOutOfPaper
;
59 DWORD dwNumberOfProcessors
;
60 DWORD dwProcessorType
;
61 DWORD dwHighPartTotalBytes
;
65 DWORD cEnumerateNetworkPrinters
;
66 DWORD cAddNetPrinters
;
67 USHORT wProcessorArchitecture
;
68 USHORT wProcessorLevel
;
73 PRINTER_INFO_STRESS
, *PPRINTER_INFO_STRESS
;
75 typedef struct _FILE_INFO_1
78 HANDLE hSpoolFileHandle
;
80 } FILE_INFO_1
, *PFILE_INFO_1
;
82 BOOL WINAPI
AddPortExW(LPWSTR
, DWORD
, LPBYTE
, LPWSTR
);
83 PVOID WINAPI
AlignRpcPtr(PVOID pBuffer
, PDWORD pcbBuffer
);
84 PWSTR WINAPI
AllocSplStr(PCWSTR pwszInput
);
85 PVOID WINAPI
DllAllocSplMem(DWORD dwBytes
);
86 BOOL WINAPI
DllFreeSplMem(PVOID pMem
);
87 BOOL WINAPI
DllFreeSplStr(PWSTR pwszString
);
88 BOOL WINAPI
InitializeRouter(HANDLE SpoolerStatusHandle
);
89 PBYTE WINAPI
PackStrings(PCWSTR
* pSource
, PBYTE pDest
, const DWORD
* DestOffsets
, PBYTE pEnd
);
90 PVOID WINAPI
ReallocSplMem(PVOID pOldMem
, DWORD cbOld
, DWORD cbNew
);
91 BOOL WINAPI
ReallocSplStr(PWSTR
* ppwszString
, PCWSTR pwszInput
);
92 BOOL WINAPI
SeekPrinter(HANDLE hPrinter
,LARGE_INTEGER liDistanceToMove
,PLARGE_INTEGER pliNewPointer
,DWORD dwMoveMethod
,BOOL bWrite
);
93 BOOL WINAPI
SplInitializeWinSpoolDrv(PVOID
* pTable
);
94 BOOL WINAPI
SpoolerInit(VOID
);
95 PDWORD WINAPI
UndoAlignRpcPtr(PVOID pDestinationBuffer
, PVOID pSourceBuffer
, DWORD cbBuffer
, PDWORD pcbNeeded
);
96 BOOL WINAPI
SplGetSpoolFileInfo(HANDLE hPrinter
,HANDLE hProcessHandle
,DWORD Level
,FILE_INFO_1
*pFileInfo
,DWORD dwSize
,DWORD
* dwNeeded
);
97 BOOL WINAPI
SplCommitSpoolData(HANDLE hPrinter
,HANDLE hProcessHandle
,DWORD cbCommit
,DWORD Level
,FILE_INFO_1
*pFileInfo
,DWORD dwSize
,DWORD
* dwNeeded
);
98 BOOL WINAPI
SplCloseSpoolFileHandle( HANDLE hPrinter
);
99 BOOL WINAPI
GetPrinterDriverExW(HANDLE hPrinter
,LPWSTR pEnvironment
,DWORD Level
,LPBYTE pDriverInfo
,DWORD cbBuf
,LPDWORD pcbNeeded
,DWORD dwClientMajorVersion
,DWORD dwClientMinorVersion
,PDWORD pdwServerMajorVersion
,PDWORD pdwServerMinorVersion
);