ReactOS  0.4.15-dev-2993-g14fbe80
precomp.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Spooler API
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Precompiled Header for all source files
5  * COPYRIGHT: Copyright 2015-2017 Colin Finck (colin@reactos.org)
6  */
7 
8 #ifndef _PRECOMP_H
9 #define _PRECOMP_H
10 
11 #define WIN32_NO_STATUS
12 #include <windef.h>
13 #include <winbase.h>
14 #include <winuser.h>
15 #include <wingdi.h>
16 #include <winreg.h>
17 #include <winspool.h>
18 #include <winspool_c.h>
19 #include <winsplp.h>
20 #include <winddiui.h>
21 #include <ndk/rtlfuncs.h>
22 #include <strsafe.h>
23 
24 #include <spoolss.h>
26 
27 #include "wspool.h"
28 
29 #include <wine/debug.h>
31 
32 #define SPOOLER_HANDLE_SIG 'gg'
33 
34 // Structures
35 /*
36  * Describes a handle returned by AddPrinterW or OpenPrinterW.
37  */
38 typedef struct _SPOOLER_HANDLE
39 {
42  BOOL bJob : 1;
43  BOOL bAnsi : 1;
55 }
57 
58 // main.c
59 extern HANDLE hProcessHeap;
61 
62 // utils.c
68 VOID UpdateTrayIcon(HANDLE hPrinter, DWORD JobId);
69 
70 // devmode.c
71 extern void RosConvertAnsiDevModeToUnicodeDevmode(PDEVMODEA pDevModeInput, PDEVMODEW *pDevModeOutput);
72 
73 extern void RosConvertUnicodeDevModeToAnsiDevmode(PDEVMODEW pDevModeInput, PDEVMODEA pDevModeOutput);
74 
75 //
76 // [MS-EMF] 2.2.27 UniversalFontId Object
77 //
78 typedef struct _UNIVERSAL_FONT_ID
79 {
81  ULONG Index;
83 
85 
86 /* RtlCreateUnicodeStringFromAsciiz will return an empty string in the buffer
87  if passed a NULL string. This returns NULLs to the result.
88 */
89 static inline PWSTR AsciiToUnicode( UNICODE_STRING * usBufferPtr, LPCSTR src )
90 {
91  if ( (src) )
92  {
94  return usBufferPtr->Buffer;
95  }
96  usBufferPtr->Buffer = NULL; /* so that RtlFreeUnicodeString won't barf */
97  return NULL;
98 }
99 
100 #endif
VOID UpdateTrayIcon(HANDLE hPrinter, DWORD JobId)
Definition: utils.c:344
CRITICAL_SECTION rtlCritSec
Definition: main.c:13
DWORD dwOptions
Definition: precomp.h:54
uint16_t * PWSTR
Definition: typedefs.h:56
void RosConvertAnsiDevModeToUnicodeDevmode(PDEVMODEA pDevModeInput, PDEVMODEW *pDevModeOutput)
Definition: devmode.c:285
HANDLE hProcessHeap
Definition: kbswitch.c:25
BOOL bShared
Definition: precomp.h:47
void RosConvertUnicodeDevModeToAnsiDevmode(PDEVMODEW pDevModeInput, PDEVMODEA pDevModeOutput)
Definition: devmode.c:353
BOOL WINAPI IntUnprotectHandle(HANDLE)
Definition: utils.c:171
LONG WINAPI IntProtectHandle(HANDLE, BOOL)
Definition: utils.c:107
BOOL bStartedDoc
Definition: precomp.h:41
DWORD dwJobID
Definition: precomp.h:49
struct _UNIVERSAL_FONT_ID * PUNIVERSAL_FONT_ID
DWORD cCount
Definition: precomp.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
const char * LPCSTR
Definition: xmlstorage.h:183
wstring AsciiToUnicode(const char *AsciiString)
Definition: tools.cpp:220
DWORD UnicodeToAnsiZZInPlace(PWSTR pwszzField)
Definition: utils.c:78
WINE_DEFAULT_DEBUG_CHANNEL(cmd)
HANDLE hSPLFile
Definition: precomp.h:51
GLsizeiptr size
Definition: glext.h:5919
DWORD_PTR Sig
Definition: precomp.h:40
HANDLE hSpoolFileHandle
Definition: precomp.h:53
BOOL bDocEvent
Definition: precomp.h:44
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD UnicodeToAnsiInPlace(PWSTR pwszField)
Definition: utils.c:28
static const WCHAR sd[]
Definition: suminfo.c:287
BOOL bClosed
Definition: precomp.h:48
BOOL bNoColorProfile
Definition: precomp.h:46
GLenum src
Definition: glext.h:6340
uint32_t DWORD_PTR
Definition: typedefs.h:65
struct _SPOOLER_HANDLE SPOOLER_HANDLE
SECURITY_DESCRIPTOR * get_sd(SECURITY_DESCRIPTOR *sd, DWORD *size)
Definition: utils.c:285
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
struct _SPOOLER_HANDLE * PSPOOLER_HANDLE
BOOL bTrayIcon
Definition: precomp.h:45
BOOL WINAPI IsValidDevmodeNoSizeW(PDEVMODEW pDevmode)
Definition: devmode.c:238
HANDLE hPrinter
Definition: precomp.h:50
struct _UNIVERSAL_FONT_ID UNIVERSAL_FONT_ID