mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
Implement the undocumented AlignRpcPtr and UndoAlignRpcPtr functions used by many Rpc* functions in spoolsv according to traced callchains. I could reverse engineer them entirely using rohitab.com's API Monitor and black-box testing. I also add documented tests covering all cases I found out. We now pass 17/17 tests on Windows Server 2003 and ReactOS. Also const-ify a parameter in PackStrings. svn path=/trunk/; revision=74297
35 lines
2.0 KiB
C
35 lines
2.0 KiB
C
/*
|
|
* PROJECT: ReactOS Printing Include files
|
|
* LICENSE: GNU LGPLv2 or any later version as published by the Free Software Foundation
|
|
* PURPOSE: Undocumented APIs of the Spooler Router "spoolss.dll"
|
|
* COPYRIGHT: Copyright 2015-2017 Colin Finck <[email protected]>
|
|
*/
|
|
|
|
#ifndef _REACTOS_SPOOLSS_H
|
|
#define _REACTOS_SPOOLSS_H
|
|
|
|
typedef struct _MARSHALL_DOWN_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. */
|
|
}
|
|
MARSHALL_DOWN_INFO, *PMARSHALL_DOWN_INFO;
|
|
|
|
PVOID WINAPI AlignRpcPtr(PVOID pBuffer, PDWORD pcbBuffer);
|
|
PWSTR WINAPI AllocSplStr(PCWSTR pwszInput);
|
|
PVOID WINAPI DllAllocSplMem(DWORD dwBytes);
|
|
BOOL WINAPI DllFreeSplMem(PVOID pMem);
|
|
BOOL WINAPI DllFreeSplStr(PWSTR pwszString);
|
|
BOOL WINAPI MarshallDownStructure(PVOID pStructure, PMARSHALL_DOWN_INFO pParameters, DWORD cbStructureSize, BOOL bSomeBoolean);
|
|
PBYTE WINAPI PackStrings(PCWSTR* pSource, PBYTE pDest, const DWORD* DestOffsets, PBYTE pEnd);
|
|
PVOID WINAPI ReallocSplMem(PVOID pOldMem, DWORD cbOld, DWORD cbNew);
|
|
BOOL WINAPI ReallocSplStr(PWSTR* ppwszString, PCWSTR pwszInput);
|
|
BOOL WINAPI SplInitializeWinSpoolDrv(PVOID* pTable);
|
|
PDWORD WINAPI UndoAlignRpcPtr(PVOID pDestinationBuffer, PVOID pSourceBuffer, DWORD cbBuffer, PDWORD pcbNeeded);
|
|
|
|
#endif
|