ReactOS  0.4.15-dev-341-g17c5fb8
precomp.h File Reference
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winreg.h>
#include <winspool.h>
#include <winspool_c.h>
#include <winddiui.h>
#include <ndk/rtlfuncs.h>
#include <strsafe.h>
#include <spoolss.h>
#include <marshalling/marshalling.h>
#include <wine/debug.h>
Include dependency graph for precomp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _SPOOLER_HANDLE
 

Macros

#define WIN32_NO_STATUS
 

Typedefs

typedef struct _SPOOLER_HANDLE SPOOLER_HANDLE
 
typedef struct _SPOOLER_HANDLEPSPOOLER_HANDLE
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (winspool)
 
DWORD UnicodeToAnsiInPlace (PWSTR pwszField)
 
void RosConvertAnsiDevModeToUnicodeDevmode (PDEVMODEA pDevModeInput, PDEVMODEW pDevModeOutput)
 
void RosConvertUnicodeDevModeToAnsiDevmode (PDEVMODEW pDevModeInput, PDEVMODEA pDevModeOutput)
 

Variables

HANDLE hProcessHeap
 

Macro Definition Documentation

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 11 of file precomp.h.

Typedef Documentation

◆ PSPOOLER_HANDLE

◆ SPOOLER_HANDLE

Function Documentation

◆ RosConvertAnsiDevModeToUnicodeDevmode()

void RosConvertAnsiDevModeToUnicodeDevmode ( PDEVMODEA  pDevModeInput,
PDEVMODEW  pDevModeOutput 
)

Definition at line 237 of file devmode.c.

238 {
239  // FIXME: This function should become ConvertAnsiDevModeToUnicodeDevmode when its parameters are known!
240 
241  // Check if a pDevModeInput and pDevModeOutput are both not NULL.
242  if (!pDevModeInput || !pDevModeOutput)
243  return;
244 
245  pDevModeOutput = GdiConvertToDevmodeW(pDevModeInput);
246 }
DEVMODEW *WINAPI GdiConvertToDevmodeW(const DEVMODEA *)
Definition: misc.c:969

Referenced by DocumentPropertiesA().

◆ RosConvertUnicodeDevModeToAnsiDevmode()

void RosConvertUnicodeDevModeToAnsiDevmode ( PDEVMODEW  pDevModeInput,
PDEVMODEA  pDevModeOutput 
)

Definition at line 305 of file devmode.c.

306 {
307  // FIXME: This function should become ConvertUnicodeDevModeToAnsiDevmode when its parameters are known!
308 
309  // Check if a pDevModeInput and pDevModeOutput are both not NULL.
310  if (!pDevModeInput || !pDevModeOutput)
311  return;
312 
313  pDevModeOutput = _ConvertToDevmodeA(pDevModeInput);
314 }
static __inline DEVMODEA * _ConvertToDevmodeA(const DEVMODEW *dmW)
Definition: devmode.c:250

Referenced by DocumentPropertiesA().

◆ UnicodeToAnsiInPlace()

DWORD UnicodeToAnsiInPlace ( PWSTR  pwszField)

Definition at line 18 of file utils.c.

19 {
20  PSTR pszTemp;
21  DWORD cch;
22 
23  /*
24  * Map the incoming Unicode pwszField string to an ANSI one here so that we can do
25  * in-place conversion. We read the Unicode input and then we write back the ANSI
26  * conversion into the same buffer for use with our GetPrinterDriverA function
27  */
28  PSTR pszField = (PSTR)pwszField;
29 
30  if (!pwszField)
31  {
32  return ERROR_SUCCESS;
33  }
34 
35  cch = wcslen(pwszField);
36  if (cch == 0)
37  {
38  return ERROR_SUCCESS;
39  }
40 
41  pszTemp = HeapAlloc(hProcessHeap, 0, (cch + 1) * sizeof(CHAR));
42  if (!pszTemp)
43  {
44  ERR("HeapAlloc failed!\n");
46  }
47 
48  WideCharToMultiByte(CP_ACP, 0, pwszField, -1, pszTemp, cch + 1, NULL, NULL);
49  StringCchCopyA(pszField, cch + 1, pszTemp);
50 
51  HeapFree(hProcessHeap, 0, pszTemp);
52 
53  return ERROR_SUCCESS;
54 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define WideCharToMultiByte
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:99
char CHAR
Definition: xmlstorage.h:175
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:201
smooth NULL
Definition: ftsmooth.c:416
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ERR(fmt,...)
Definition: debug.h:110
STRSAFEAPI StringCchCopyA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
Definition: strsafe.h:145
signed char * PSTR
Definition: retypes.h:7
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define HeapFree(x, y, z)
Definition: compat.h:403
HANDLE hProcessHeap
Definition: kbswitch.c:25

Referenced by GetPrinterDriverA().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( winspool  )

Variable Documentation

◆ hProcessHeap