mirror of
https://github.com/reactos/reactos.git
synced 2024-11-03 05:18:55 +00:00
f3ea8225cb
PDBs reveal that these functions are also used in winspool.drv, but not imported from spoolss.dll to retain the client/server architecture. As winspool.drv highly benefits from the MarshallUp* functions, I put them in a source file shared between spoolss.dll and winspool.drv. The added API Tests cover my testing and all implemented features. One more item done from https://reactos.org/wiki/Printing !
36 lines
1.8 KiB
C
36 lines
1.8 KiB
C
/*
|
|
* PROJECT: ReactOS Printing Stack Marshalling Functions
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
* PURPOSE: Marshalling definitions
|
|
* COPYRIGHT: Copyright 2015-2018 Colin Finck (colin@reactos.org)
|
|
*/
|
|
|
|
|
|
#ifndef _MARSHALLING_H
|
|
#define _MARSHALLING_H
|
|
|
|
typedef struct _MARSHALLING_INFO
|
|
{
|
|
DWORD dwOffset; /** Byte offset of this element within the structure or MAXDWORD to indicate the end of the array */
|
|
DWORD cbSize; /** Total size of this element in bytes under Windows. Unused here, I don't know what we need this number for. */
|
|
DWORD cbPerElementSize; /** If this element is a structure itself, this field gives the size in bytes of each element of the structure.
|
|
Otherwise, this is the same as cbTotalSize. E.g. for SYSTEMTIME, cbSize would be 16 and cbPerElementSize would be 2.
|
|
Unused here, I don't know what we need this number for. */
|
|
BOOL bAdjustAddress; /** TRUE if MarshallDownStructure shall adjust the address of this element, FALSE if it shall leave this element untouched. */
|
|
}
|
|
MARSHALLING_INFO;
|
|
|
|
typedef struct _MARSHALLING
|
|
{
|
|
DWORD cbStructureSize;
|
|
MARSHALLING_INFO pInfo[];
|
|
}
|
|
MARSHALLING;
|
|
|
|
BOOL WINAPI MarshallDownStructure(PVOID pStructure, const MARSHALLING_INFO* pInfo, DWORD cbStructureSize, BOOL bSomeBoolean);
|
|
BOOL WINAPI MarshallDownStructuresArray(PVOID pStructuresArray, DWORD cElements, const MARSHALLING_INFO* pInfo, DWORD cbStructureSize, BOOL bSomeBoolean);
|
|
BOOL WINAPI MarshallUpStructure(DWORD cbSize, PVOID pStructure, const MARSHALLING_INFO* pInfo, DWORD cbStructureSize, BOOL bSomeBoolean);
|
|
BOOL WINAPI MarshallUpStructuresArray(DWORD cbSize, PVOID pStructuresArray, DWORD cElements, const MARSHALLING_INFO* pInfo, DWORD cbStructureSize, BOOL bSomeBoolean);
|
|
|
|
#endif
|