mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:12:59 +00:00
[PRINTING] Implement the undocumented MarshallDownStructure, MarshallDownStructuresArray, MarshallUpStructure, and MarshallUpStructuresArray to the extent I need and could find out through black-box testing.
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 !
This commit is contained in:
parent
2ae756a4e5
commit
f3ea8225cb
15 changed files with 445 additions and 55 deletions
35
win32ss/printing/include/marshalling/marshalling.h
Normal file
35
win32ss/printing/include/marshalling/marshalling.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* 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
|
Loading…
Add table
Add a link
Reference in a new issue