ReactOS  0.4.15-dev-1068-g467feb9
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 ERROR_INVALID_PARAMETER
Definition: compat.h:101
struct _SPOOLSS_PRINTER_HANDLE * PSPOOLSS_PRINTER_HANDLE
#define FALSE
Definition: types.h:117
#define SetLastError(x)
Definition: compat.h:500
PRINTPROVIDOR PrintProvider
Definition: precomp.h:36
PSPOOLSS_PRINT_PROVIDER pPrintProvider
Definition: precomp.h:46

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;
70  pFileInfo->dwOptions = DUPLICATE_CLOSE_SOURCE;
71 
72  return pHandle->pPrintProvider->PrintProvider.fpCommitSpoolData( hPrinter, cbCommit );
73 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define DUPLICATE_CLOSE_SOURCE
HANDLE hSpoolFileHandle
Definition: spoolss.h:78
#define TRUE
Definition: types.h:120
DWORD dwOptions
Definition: spoolss.h:79
#define INVALID_HANDLE_VALUE
Definition: compat.h:479
struct _SPOOLSS_PRINTER_HANDLE * PSPOOLSS_PRINTER_HANDLE
#define FALSE
Definition: types.h:117
#define SetLastError(x)
Definition: compat.h:500
PRINTPROVIDOR PrintProvider
Definition: precomp.h:36
BOOL bInheritHandle
Definition: spoolss.h:77
PSPOOLSS_PRINT_PROVIDER pPrintProvider
Definition: precomp.h:46

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;
43  pFileInfo->dwOptions = DUPLICATE_CLOSE_SOURCE;
44  }
45 
46  return Ret;
47 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define DUPLICATE_CLOSE_SOURCE
HANDLE hSpoolFileHandle
Definition: spoolss.h:78
#define TRUE
Definition: types.h:120
DWORD dwOptions
Definition: spoolss.h:79
struct _SPOOLSS_PRINTER_HANDLE * PSPOOLSS_PRINTER_HANDLE
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define SetLastError(x)
Definition: compat.h:500
#define GetCurrentProcess()
Definition: compat.h:507
PRINTPROVIDOR PrintProvider
Definition: precomp.h:36
BOOL bInheritHandle
Definition: spoolss.h:77
PSPOOLSS_PRINT_PROVIDER pPrintProvider
Definition: precomp.h:46

Referenced by _RpcGetSpoolFileInfo(), and _RpcGetSpoolFileInfo2().