[PRINTING] Implement the undocumented MarshallDownStructure, MarshallDownStructuresAr...
[reactos.git] / win32ss / printing / include / spoolss.h
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 PBYTE WINAPI PackStrings(PWSTR* pSource, PBYTE pDest, const DWORD* DestOffsets, PBYTE pEnd);
67 PVOID WINAPI ReallocSplMem(PVOID pOldMem, DWORD cbOld, DWORD cbNew);
68 BOOL WINAPI ReallocSplStr(PWSTR* ppwszString, PCWSTR pwszInput);
69 BOOL WINAPI SplInitializeWinSpoolDrv(PVOID* pTable);
70 BOOL WINAPI SpoolerInit(VOID);
71 PDWORD WINAPI UndoAlignRpcPtr(PVOID pDestinationBuffer, PVOID pSourceBuffer, DWORD cbBuffer, PDWORD pcbNeeded);
72
73 #endif