19 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
52 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
73 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
92 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
111 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
126 PBYTE pPrinterEnumAligned;
131 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
135 pPrinterEnumAligned =
AlignRpcPtr(pPrinterEnum, &cbBuf);
165 PBYTE pPrinterAligned;
170 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
202 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
206 Default.DesiredAccess = AccessRequired;
207 Default.pDatatype = pDatatype;
232 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
236 if (!
ReadPrinter(hPrinter, pBuf, cbBuf, pcNoBytesRead))
281 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
300 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
304 if (!
SeekPrinter(hPrinter, liDistanceToMove, pliNewPointer, dwMoveMethod, bWrite))
326 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
345 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
364 ERR(
"RpcImpersonateClient failed with error %lu!\n", dwErrorCode);
BOOL WINAPI DeletePrinter(HANDLE hPrinter)
DWORD WINAPI StartDocPrinterW(HANDLE hPrinter, DWORD Level, PBYTE pDocInfo)
BOOL WINAPI GetPrinterW(HANDLE hPrinter, DWORD Level, PBYTE pPrinter, DWORD cbBuf, PDWORD pcbNeeded)
BOOL WINAPI EnumPrintersW(DWORD Flags, PWSTR Name, DWORD Level, PBYTE pPrinterEnum, DWORD cbBuf, PDWORD pcbNeeded, PDWORD pcReturned)
BOOL WINAPI EndDocPrinter(HANDLE hPrinter)
BOOL WINAPI WritePrinter(HANDLE hPrinter, PVOID pBuf, DWORD cbBuf, PDWORD pcWritten)
BOOL WINAPI ClosePrinter(HANDLE hPrinter)
BOOL WINAPI AbortPrinter(HANDLE hPrinter)
BOOL WINAPI ReadPrinter(HANDLE hPrinter, PVOID pBuf, DWORD cbBuf, PDWORD pNoBytesRead)
BOOL WINAPI OpenPrinterW(PWSTR pPrinterName, PHANDLE phPrinter, PPRINTER_DEFAULTSW pDefault)
BOOL WINAPI EndPagePrinter(HANDLE hPrinter)
BOOL WINAPI SeekPrinter(HANDLE hPrinter, LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER pliNewPointer, DWORD dwMoveMethod, BOOL bWrite)
BOOL WINAPI StartPagePrinter(HANDLE hPrinter)
DWORD _RpcSetPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_PRINTER_CONTAINER *pPrinterContainer, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, WINSPOOL_SECURITY_CONTAINER *pSecurityContainer, DWORD Command)
DWORD _RpcAddPrinterEx(WINSPOOL_HANDLE pName, WINSPOOL_PRINTER_CONTAINER *pPrinterContainer, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, WINSPOOL_SECURITY_CONTAINER *pSecurityContainer, WINSPOOL_SPLCLIENT_CONTAINER *pClientInfo, WINSPOOL_PRINTER_HANDLE *pHandle)
DWORD _RpcReadPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, BYTE *pBuf, DWORD cbBuf, DWORD *pcNoBytesRead)
DWORD _RpcOpenPrinterEx(WINSPOOL_HANDLE pPrinterName, WINSPOOL_PRINTER_HANDLE *pHandle, WCHAR *pDatatype, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, DWORD AccessRequired, WINSPOOL_SPLCLIENT_CONTAINER *pClientInfo)
DWORD _RpcSeekPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, LARGE_INTEGER liDistanceToMove, PLARGE_INTEGER pliNewPointer, DWORD dwMoveMethod, BOOL bWrite)
DWORD _RpcEndDocPrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
DWORD _RpcAbortPrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
DWORD _RpcStartDocPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, WINSPOOL_DOC_INFO_CONTAINER *pDocInfoContainer, DWORD *pJobId)
DWORD _RpcGetPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, DWORD Level, BYTE *pPrinter, DWORD cbBuf, DWORD *pcbNeeded)
DWORD _RpcResetPrinterEx(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pDatatype, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, DWORD dwFlags)
DWORD _RpcOpenPrinter(WINSPOOL_HANDLE pPrinterName, WINSPOOL_PRINTER_HANDLE *phPrinter, WCHAR *pDatatype, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, DWORD AccessRequired)
DWORD _RpcFlushPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, BYTE *pBuf, DWORD cbBuf, DWORD *pcWritten, DWORD cSleep)
DWORD _RpcStartPagePrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
DWORD _RpcAddPrinter(WINSPOOL_HANDLE pName, WINSPOOL_PRINTER_CONTAINER *pPrinterContainer, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer, WINSPOOL_SECURITY_CONTAINER *pSecurityContainer, WINSPOOL_PRINTER_HANDLE *pHandle)
DWORD _RpcResetPrinter(WINSPOOL_PRINTER_HANDLE hPrinter, WCHAR *pDatatype, WINSPOOL_DEVMODE_CONTAINER *pDevModeContainer)
DWORD _RpcClosePrinter(WINSPOOL_PRINTER_HANDLE *phPrinter)
DWORD _RpcDeletePrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
DWORD _RpcEnumPrinters(DWORD Flags, WINSPOOL_HANDLE Name, DWORD Level, BYTE *pPrinterEnum, DWORD cbBuf, DWORD *pcbNeeded, DWORD *pcReturned)
DWORD _RpcEndPagePrinter(WINSPOOL_PRINTER_HANDLE hPrinter)
DWORD _RpcWritePrinter(WINSPOOL_PRINTER_HANDLE hPrinter, BYTE *pBuf, DWORD cbBuf, DWORD *pcWritten)
#define ERROR_INVALID_FUNCTION
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)
static const MARSHALLING * pPrinterInfoMarshalling[]
RPC_STATUS WINAPI RpcRevertToSelf(void)
RPC_STATUS WINAPI RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle)
#define RESETPRINTERDEFAULTDATATYPE
#define RESETPRINTERDEFAULTDEVMODE
ACCESS_MASK DesiredAccess
WINSPOOL_DOC_INFO_1 * pDocInfo1
union _WINSPOOL_DOC_INFO_CONTAINER::@3434 DocInfo
PVOID WINAPI AlignRpcPtr(PVOID pBuffer, PDWORD pcbBuffer)
PDWORD WINAPI UndoAlignRpcPtr(PVOID pDestinationBuffer, PVOID pSourceBuffer, DWORD cbBuffer, PDWORD pcbNeeded)
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ DWORD _Out_ PDWORD pcbNeeded
struct _devicemodeW * PDEVMODEW
WINBOOL WINAPI ResetPrinterW(HANDLE hPrinter, LPPRINTER_DEFAULTSW pDefault)
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
_Must_inspect_result_ _In_ ULONG Flags