xref: /reactos/win32ss/printing/include/spoolss.h (revision 80774a2f)
1 /*
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)
6  */
7 
8 #ifndef _REACTOS_SPOOLSS_H
9 #define _REACTOS_SPOOLSS_H
10 
11 // Constants
12 #define MAX_PRINTER_NAME        220
13 
14 typedef struct _MARSHALL_DOWN_INFO
15 {
16     DWORD dwOffset;             /** Byte offset of this element within the structure or MAXDWORD to indicate the end of the array */
17     DWORD cbSize;               /** Total size of this element in bytes under Windows. Unused here, I don't know what we need this number for. */
18     DWORD cbPerElementSize;     /** If this element is a structure itself, this field gives the size in bytes of each element of the structure.
19                                     Otherwise, this is the same as cbTotalSize. E.g. for SYSTEMTIME, cbSize would be 16 and cbPerElementSize would be 2.
20                                     Unused here, I don't know what we need this number for. */
21     BOOL bAdjustAddress;        /** TRUE if MarshallDownStructure shall adjust the address of this element, FALSE if it shall leave this element untouched. */
22 }
23 MARSHALL_DOWN_INFO, *PMARSHALL_DOWN_INFO;
24 
25 /** From MS-RPRN, 2.2.1.10.1 */
26 typedef struct _PRINTER_INFO_STRESS
27 {
28     PWSTR pPrinterName;
29     PWSTR pServerName;
30     DWORD cJobs;
31     DWORD cTotalJobs;
32     DWORD cTotalBytes;
33     SYSTEMTIME stUpTime;
34     DWORD MaxcRef;
35     DWORD cTotalPagesPrinted;
36     DWORD dwGetVersion;
37     DWORD fFreeBuild;
38     DWORD cSpooling;
39     DWORD cMaxSpooling;
40     DWORD cRef;
41     DWORD cErrorOutOfPaper;
42     DWORD cErrorNotReady;
43     DWORD cJobError;
44     DWORD dwNumberOfProcessors;
45     DWORD dwProcessorType;
46     DWORD dwHighPartTotalBytes;
47     DWORD cChangeID;
48     DWORD dwLastError;
49     DWORD Status;
50     DWORD cEnumerateNetworkPrinters;
51     DWORD cAddNetPrinters;
52     USHORT wProcessorArchitecture;
53     USHORT wProcessorLevel;
54     DWORD cRefIC;
55     DWORD dwReserved2;
56     DWORD dwReserved3;
57 }
58 PRINTER_INFO_STRESS, *PPRINTER_INFO_STRESS;
59 
60 PVOID WINAPI AlignRpcPtr(PVOID pBuffer, PDWORD pcbBuffer);
61 PWSTR WINAPI AllocSplStr(PCWSTR pwszInput);
62 PVOID WINAPI DllAllocSplMem(DWORD dwBytes);
63 BOOL WINAPI DllFreeSplMem(PVOID pMem);
64 BOOL WINAPI DllFreeSplStr(PWSTR pwszString);
65 BOOL WINAPI InitializeRouter(HANDLE SpoolerStatusHandle);
66 BOOL WINAPI MarshallDownStructure(PVOID pStructure, PMARSHALL_DOWN_INFO pParameters, DWORD cbStructureSize, BOOL bSomeBoolean);
67 PBYTE WINAPI PackStrings(PWSTR* pSource, PBYTE pDest, const DWORD* DestOffsets, PBYTE pEnd);
68 PVOID WINAPI ReallocSplMem(PVOID pOldMem, DWORD cbOld, DWORD cbNew);
69 BOOL WINAPI ReallocSplStr(PWSTR* ppwszString, PCWSTR pwszInput);
70 BOOL WINAPI SplInitializeWinSpoolDrv(PVOID* pTable);
71 BOOL WINAPI SpoolerInit(VOID);
72 PDWORD WINAPI UndoAlignRpcPtr(PVOID pDestinationBuffer, PVOID pSourceBuffer, DWORD cbBuffer, PDWORD pcbNeeded);
73 
74 #endif
75