2003-04-14 17:19:42 +00:00
|
|
|
|
/*
|
|
|
|
|
* ReactOS kernel
|
2006-09-10 15:39:11 +00:00
|
|
|
|
* Copyright (C) 2003, 2006 ReactOS Team
|
2003-04-14 17:19:42 +00:00
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
*/
|
2006-09-10 15:39:11 +00:00
|
|
|
|
/* COPYRIGHT: See COPYING in the top level directory
|
2003-04-14 17:19:42 +00:00
|
|
|
|
* PROJECT: ReactOS hive maker
|
|
|
|
|
* FILE: tools/mkhive/mkhive.h
|
|
|
|
|
* PURPOSE: Hive maker
|
|
|
|
|
* PROGRAMMER: Eric Kohl
|
2006-09-10 15:39:11 +00:00
|
|
|
|
* Herv<EFBFBD> Poussineau
|
2003-04-14 17:19:42 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __MKHIVE_H__
|
|
|
|
|
#define __MKHIVE_H__
|
|
|
|
|
|
2006-09-10 15:39:11 +00:00
|
|
|
|
#include <stdio.h>
|
2006-10-02 13:29:55 +00:00
|
|
|
|
#include <stdlib.h>
|
2003-04-14 17:19:42 +00:00
|
|
|
|
|
2007-09-14 18:55:43 +00:00
|
|
|
|
#include <host/typedefs.h>
|
|
|
|
|
|
|
|
|
|
// Definitions copied from <ntstatus.h>
|
|
|
|
|
// We only want to include host headers, so we define them manually
|
|
|
|
|
#define STATUS_SUCCESS ((NTSTATUS)0x00000000)
|
|
|
|
|
#define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001)
|
|
|
|
|
#define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002)
|
|
|
|
|
#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000D)
|
|
|
|
|
#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017)
|
|
|
|
|
#define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009A)
|
|
|
|
|
#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034)
|
|
|
|
|
#define STATUS_INVALID_PARAMETER_2 ((NTSTATUS)0xC00000F0)
|
|
|
|
|
#define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005)
|
2006-09-11 12:42:35 +00:00
|
|
|
|
|
2007-08-27 09:32:52 +00:00
|
|
|
|
NTSTATUS NTAPI
|
|
|
|
|
RtlAnsiStringToUnicodeString(
|
|
|
|
|
IN OUT PUNICODE_STRING UniDest,
|
|
|
|
|
IN PANSI_STRING AnsiSource,
|
|
|
|
|
IN BOOLEAN AllocateDestinationString);
|
|
|
|
|
VOID NTAPI
|
|
|
|
|
RtlInitAnsiString(
|
|
|
|
|
IN OUT PANSI_STRING DestinationString,
|
|
|
|
|
IN PCSTR SourceString);
|
|
|
|
|
VOID NTAPI
|
|
|
|
|
RtlInitUnicodeString(
|
|
|
|
|
IN OUT PUNICODE_STRING DestinationString,
|
|
|
|
|
IN PCWSTR SourceString);
|
|
|
|
|
WCHAR NTAPI
|
|
|
|
|
RtlUpcaseUnicodeChar(
|
|
|
|
|
IN WCHAR Source);
|
2007-08-18 10:27:23 +00:00
|
|
|
|
|
2007-08-27 09:32:52 +00:00
|
|
|
|
#define CMLIB_HOST
|
2006-09-10 15:39:11 +00:00
|
|
|
|
#include <cmlib.h>
|
|
|
|
|
#include <infhost.h>
|
|
|
|
|
#include "reginf.h"
|
|
|
|
|
#include "cmi.h"
|
|
|
|
|
#include "registry.h"
|
|
|
|
|
#include "binhive.h"
|
|
|
|
|
|
|
|
|
|
#define HIVE_NO_FILE 2
|
|
|
|
|
#define VERIFY_REGISTRY_HIVE(hive)
|
|
|
|
|
extern LIST_ENTRY CmiHiveListHead;
|
|
|
|
|
#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V))
|
2003-04-14 17:19:42 +00:00
|
|
|
|
|
|
|
|
|
#ifndef max
|
|
|
|
|
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifndef min
|
|
|
|
|
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-08-27 12:47:56 +00:00
|
|
|
|
#ifdef _WIN32
|
2006-09-11 11:04:33 +00:00
|
|
|
|
#define strncasecmp _strnicmp
|
2006-09-10 15:39:11 +00:00
|
|
|
|
#define strcasecmp _stricmp
|
2006-09-11 11:04:33 +00:00
|
|
|
|
#else
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#endif//_WIN32
|
2004-12-30 16:02:12 +00:00
|
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
|
#define GCC_PACKED
|
|
|
|
|
#define inline
|
|
|
|
|
#else//_MSC_VER
|
|
|
|
|
#define GCC_PACKED __attribute__((packed))
|
|
|
|
|
#endif//_MSC_VER
|
2003-04-14 17:19:42 +00:00
|
|
|
|
|
2007-08-19 19:37:47 +00:00
|
|
|
|
/* rtl.c */
|
|
|
|
|
PWSTR
|
|
|
|
|
xwcschr(
|
|
|
|
|
PWSTR String,
|
|
|
|
|
WCHAR Char
|
|
|
|
|
);
|
|
|
|
|
|
2003-04-14 17:19:42 +00:00
|
|
|
|
#endif /* __MKHIVE_H__ */
|
|
|
|
|
|
|
|
|
|
/* EOF */
|