[PRINTING] Implement the undocumented MarshallDownStructure, MarshallDownStructuresAr...
[reactos.git] / win32ss / printing / include / marshalling / marshalling.h
1 /*
2 * PROJECT: ReactOS Printing Stack Marshalling Functions
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Marshalling definitions
5 * COPYRIGHT: Copyright 2015-2018 Colin Finck (colin@reactos.org)
6 */
7
8
9 #ifndef _MARSHALLING_H
10 #define _MARSHALLING_H
11
12 typedef struct _MARSHALLING_INFO
13 {
14 DWORD dwOffset; /** Byte offset of this element within the structure or MAXDWORD to indicate the end of the array */
15 DWORD cbSize; /** Total size of this element in bytes under Windows. Unused here, I don't know what we need this number for. */
16 DWORD cbPerElementSize; /** If this element is a structure itself, this field gives the size in bytes of each element of the structure.
17 Otherwise, this is the same as cbTotalSize. E.g. for SYSTEMTIME, cbSize would be 16 and cbPerElementSize would be 2.
18 Unused here, I don't know what we need this number for. */
19 BOOL bAdjustAddress; /** TRUE if MarshallDownStructure shall adjust the address of this element, FALSE if it shall leave this element untouched. */
20 }
21 MARSHALLING_INFO;
22
23 typedef struct _MARSHALLING
24 {
25 DWORD cbStructureSize;
26 MARSHALLING_INFO pInfo[];
27 }
28 MARSHALLING;
29
30 BOOL WINAPI MarshallDownStructure(PVOID pStructure, const MARSHALLING_INFO* pInfo, DWORD cbStructureSize, BOOL bSomeBoolean);
31 BOOL WINAPI MarshallDownStructuresArray(PVOID pStructuresArray, DWORD cElements, const MARSHALLING_INFO* pInfo, DWORD cbStructureSize, BOOL bSomeBoolean);
32 BOOL WINAPI MarshallUpStructure(DWORD cbSize, PVOID pStructure, const MARSHALLING_INFO* pInfo, DWORD cbStructureSize, BOOL bSomeBoolean);
33 BOOL WINAPI MarshallUpStructuresArray(DWORD cbSize, PVOID pStructuresArray, DWORD cElements, const MARSHALLING_INFO* pInfo, DWORD cbStructureSize, BOOL bSomeBoolean);
34
35 #endif