- Update address of Free Software Foundation.
[reactos.git] / reactos / tools / mkhive / mkhive.h
1 /*
2 * ReactOS kernel
3 * Copyright (C) 2003, 2006 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 /* COPYRIGHT: See COPYING in the top level directory
20 * PROJECT: ReactOS hive maker
21 * FILE: tools/mkhive/mkhive.h
22 * PURPOSE: Hive maker
23 * PROGRAMMER: Eric Kohl
24 * Hervé Poussineau
25 */
26
27 #ifndef __MKHIVE_H__
28 #define __MKHIVE_H__
29
30 #include <stdio.h>
31 #include <stdlib.h>
32
33 #include <host/typedefs.h>
34
35 #define USE_HOST_WCSFUNCS
36 #include <host/wcsfuncs.h>
37
38 // Definitions copied from <ntstatus.h>
39 // We only want to include host headers, so we define them manually
40 #define STATUS_SUCCESS ((NTSTATUS)0x00000000)
41 #define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001)
42 #define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002)
43 #define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000D)
44 #define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017)
45 #define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009A)
46 #define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034)
47 #define STATUS_INVALID_PARAMETER_2 ((NTSTATUS)0xC00000F0)
48 #define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005)
49
50 NTSTATUS NTAPI
51 RtlAnsiStringToUnicodeString(
52 IN OUT PUNICODE_STRING UniDest,
53 IN PANSI_STRING AnsiSource,
54 IN BOOLEAN AllocateDestinationString);
55 VOID NTAPI
56 RtlInitAnsiString(
57 IN OUT PANSI_STRING DestinationString,
58 IN PCSTR SourceString);
59 VOID NTAPI
60 RtlInitUnicodeString(
61 IN OUT PUNICODE_STRING DestinationString,
62 IN PCWSTR SourceString);
63 WCHAR NTAPI
64 RtlUpcaseUnicodeChar(
65 IN WCHAR Source);
66
67 #define CMLIB_HOST
68 #include <cmlib.h>
69 #include <infhost.h>
70 #include "reginf.h"
71 #include "cmi.h"
72 #include "registry.h"
73 #include "binhive.h"
74
75 #define HIVE_NO_FILE 2
76 #define VERIFY_REGISTRY_HIVE(hive)
77 extern LIST_ENTRY CmiHiveListHead;
78 #define ABS_VALUE(V) (((V) < 0) ? -(V) : (V))
79
80 #ifndef max
81 #define max(a, b) (((a) > (b)) ? (a) : (b))
82 #endif
83
84 #ifndef min
85 #define min(a, b) (((a) < (b)) ? (a) : (b))
86 #endif
87
88 #ifdef _WIN32
89 #define strncasecmp _strnicmp
90 #define strcasecmp _stricmp
91 #else
92 #include <string.h>
93 #endif//_WIN32
94
95 #ifdef _MSC_VER
96 #define GCC_PACKED
97 #define inline
98 #else//_MSC_VER
99 #define GCC_PACKED __attribute__((packed))
100 #endif//_MSC_VER
101
102 #endif /* __MKHIVE_H__ */
103
104 /* EOF */