Sync with trunk rev.61910 to get latest improvements and bugfixes.
[reactos.git] / dll / win32 / localspl / localspl_private.h
1 /*
2 * Implementation of the Local Printmonitor: internal include file
3 *
4 * Copyright 2006 Detlef Riekenberg
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #ifndef __WINE_LOCALSPL_PRIVATE__
22 #define __WINE_LOCALSPL_PRIVATE__
23
24 #include <stdarg.h>
25
26 #define WIN32_NO_STATUS
27 #define _INC_WINDOWS
28 #define COM_NO_WINDOWS_H
29
30 #define COBJMACROS
31 #define NONAMELESSUNION
32
33 #include <windef.h>
34 #include <winbase.h>
35 #include <wingdi.h>
36 #include <winuser.h>
37 #include <winreg.h>
38 #include <winspool.h>
39
40 #include <wine/list.h>
41 #include <wine/unicode.h>
42 #include <ddk/winsplp.h>
43
44 #include <wine/debug.h>
45 WINE_DEFAULT_DEBUG_CHANNEL(localspl);
46
47 /* ## DLL-wide Globals ## */
48 extern HINSTANCE LOCALSPL_hInstance DECLSPEC_HIDDEN;
49 void setup_provider(void) DECLSPEC_HIDDEN;
50
51 /* ## Type of Ports ## */
52 /* windows types */
53 #define PORT_IS_UNKNOWN 0
54 #define PORT_IS_LPT 1
55 #define PORT_IS_COM 2
56 #define PORT_IS_FILE 3
57 #define PORT_IS_FILENAME 4
58
59 /* wine extensions */
60 #define PORT_IS_WINE 5
61 #define PORT_IS_UNIXNAME 5
62 #define PORT_IS_PIPE 6
63 #define PORT_IS_CUPS 7
64 #define PORT_IS_LPR 8
65
66
67 /* ## Memory allocation functions ## */
68
69 static inline void * __WINE_ALLOC_SIZE(1) heap_alloc( size_t len )
70 {
71 return HeapAlloc( GetProcessHeap(), 0, len );
72 }
73
74 static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero( size_t len )
75 {
76 return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, len );
77 }
78
79 static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero( void * mem, size_t len )
80 {
81 return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len );
82 }
83
84 static inline BOOL heap_free( void *mem )
85 {
86 return HeapFree( GetProcessHeap(), 0, mem );
87 }
88
89 #endif /* __WINE_LOCALSPL_PRIVATE__ */