ReactOS 0.4.15-dev-8245-gd24675b
spoolfile.c File Reference
#include "precomp.h"
Include dependency graph for spoolfile.c:

Go to the source code of this file.

Functions

BOOL WINAPI SplGetSpoolFileInfo (HANDLE hPrinter, HANDLE hProcessHandle, DWORD Level, PFILE_INFO_1 pFileInfo, DWORD dwSize, DWORD *dwNeeded)
 
BOOL WINAPI SplCommitSpoolData (HANDLE hPrinter, HANDLE hProcessHandle, DWORD cbCommit, DWORD Level, PFILE_INFO_1 pFileInfo, DWORD dwSize, DWORD *dwNeeded)
 
BOOL WINAPI SplCloseSpoolFileHandle (HANDLE hPrinter)
 

Function Documentation

◆ SplCloseSpoolFileHandle()

BOOL WINAPI SplCloseSpoolFileHandle ( HANDLE  hPrinter)

Definition at line 76 of file spoolfile.c.

77{
79
80 // Sanity checks.
81 if (!pHandle)
82 {
84 return FALSE;
85 }
86
87 return pHandle->pPrintProvider->PrintProvider.fpCloseSpoolFileHandle( pHandle->hPrinter );
88}
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
PSPOOLSS_PRINT_PROVIDER pPrintProvider
Definition: precomp.h:46
PRINTPROVIDOR PrintProvider
Definition: precomp.h:36
struct _SPOOLSS_PRINTER_HANDLE * PSPOOLSS_PRINTER_HANDLE

Referenced by _RpcCloseSpoolFileHandle().

◆ SplCommitSpoolData()

BOOL WINAPI SplCommitSpoolData ( HANDLE  hPrinter,
HANDLE  hProcessHandle,
DWORD  cbCommit,
DWORD  Level,
PFILE_INFO_1  pFileInfo,
DWORD  dwSize,
DWORD dwNeeded 
)

Definition at line 50 of file spoolfile.c.

58{
60
61 // Sanity checks.
62 if (!pHandle)
63 {
65 return FALSE;
66 }
67
69 pFileInfo->bInheritHandle = TRUE;
71
72 return pHandle->pPrintProvider->PrintProvider.fpCommitSpoolData( hPrinter, cbCommit );
73}
#define TRUE
Definition: types.h:120
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
HANDLE hSpoolFileHandle
Definition: spoolss.h:78
DWORD dwOptions
Definition: spoolss.h:79
BOOL bInheritHandle
Definition: spoolss.h:77
#define DUPLICATE_CLOSE_SOURCE

Referenced by _RpcCommitSpoolData(), and _RpcCommitSpoolData2().

◆ SplGetSpoolFileInfo()

BOOL WINAPI SplGetSpoolFileInfo ( HANDLE  hPrinter,
HANDLE  hProcessHandle,
DWORD  Level,
PFILE_INFO_1  pFileInfo,
DWORD  dwSize,
DWORD dwNeeded 
)

Definition at line 11 of file spoolfile.c.

18{
19 BOOL Ret;
20 HANDLE hHandle, hSourceProcessHandle;
22
23 // Sanity checks.
24 if (!pHandle)
25 {
27 return FALSE;
28 }
29
30 hSourceProcessHandle = GetCurrentProcess();
31
32 // No Local? Ok, what ever...
33
34 Ret = pHandle->pPrintProvider->PrintProvider.fpGetSpoolFileInfo( pHandle->hPrinter,
35 NULL,
36 &hHandle,
37 hProcessHandle,
38 hSourceProcessHandle );
39 if ( Ret )
40 {
41 pFileInfo->hSpoolFileHandle = hHandle;
42 pFileInfo->bInheritHandle = TRUE;
44 }
45
46 return Ret;
47}
#define NULL
Definition: types.h:112
#define GetCurrentProcess()
Definition: compat.h:759
unsigned int BOOL
Definition: ntddk_ex.h:94

Referenced by _RpcGetSpoolFileInfo(), and _RpcGetSpoolFileInfo2().