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.
|
|
|
|
|
*
|
2009-10-27 10:34:16 +00:00
|
|
|
|
* 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.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2003-04-14 17:19:42 +00:00
|
|
|
|
*/
|
2016-01-17 00:50:03 +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
|
2017-06-02 00:34:10 +00:00
|
|
|
|
* PROGRAMMERS: Eric Kohl
|
2006-09-10 15:39:11 +00:00
|
|
|
|
* Herv<EFBFBD> Poussineau
|
2003-04-14 17:19:42 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2010-02-26 11:43:19 +00:00
|
|
|
|
#pragma once
|
2003-04-14 17:19:42 +00:00
|
|
|
|
|
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
|
|
|
|
|
2011-06-15 10:30:03 +00:00
|
|
|
|
#include <typedefs.h>
|
2008-06-22 20:58:56 +00:00
|
|
|
|
|
2017-06-02 00:34:10 +00:00
|
|
|
|
#ifndef _MSC_VER
|
|
|
|
|
#ifndef _countof
|
|
|
|
|
#define _countof(_Array) (sizeof(_Array) / sizeof(_Array[0]))
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-09-14 18:55:43 +00:00
|
|
|
|
// 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)
|
2018-10-14 15:10:04 +00:00
|
|
|
|
// #define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002)
|
|
|
|
|
// #define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000D)
|
|
|
|
|
// #define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017)
|
|
|
|
|
// #define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009A)
|
2007-09-14 18:55:43 +00:00
|
|
|
|
#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034)
|
2018-10-14 15:10:04 +00:00
|
|
|
|
// #define STATUS_INVALID_PARAMETER_2 ((NTSTATUS)0xC00000F0)
|
|
|
|
|
// #define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005)
|
2006-09-11 12:42:35 +00:00
|
|
|
|
|
2011-05-14 08:29:48 +00:00
|
|
|
|
unsigned char BitScanForward(ULONG * Index, unsigned long Mask);
|
|
|
|
|
unsigned char BitScanReverse(ULONG * const Index, unsigned long Mask);
|
2009-12-08 01:02:36 +00:00
|
|
|
|
#define RtlFillMemoryUlong(dst, len, val) memset(dst, val, len)
|
|
|
|
|
|
2012-06-23 18:08:09 +00:00
|
|
|
|
#ifdef _M_AMD64
|
|
|
|
|
#define BitScanForward64 _BitScanForward64
|
|
|
|
|
#define BitScanReverse64 _BitScanReverse64
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-10-05 21:30:57 +00:00
|
|
|
|
typedef DWORD REGSAM;
|
|
|
|
|
typedef LPVOID LPSECURITY_ATTRIBUTES;
|
2016-01-17 00:50:03 +00:00
|
|
|
|
typedef HANDLE HKEY, *PHKEY;
|
2014-10-05 21:30:57 +00:00
|
|
|
|
|
2007-08-27 09:32:52 +00:00
|
|
|
|
VOID NTAPI
|
|
|
|
|
RtlInitUnicodeString(
|
|
|
|
|
IN OUT PUNICODE_STRING DestinationString,
|
|
|
|
|
IN PCWSTR SourceString);
|
2018-10-14 14:28:13 +00:00
|
|
|
|
|
2007-08-27 09:32:52 +00:00
|
|
|
|
WCHAR NTAPI
|
|
|
|
|
RtlUpcaseUnicodeChar(
|
|
|
|
|
IN WCHAR Source);
|
2007-08-18 10:27:23 +00:00
|
|
|
|
|
2011-05-14 08:29:48 +00:00
|
|
|
|
LONG WINAPI
|
|
|
|
|
RegQueryValueExW(
|
|
|
|
|
IN HKEY hKey,
|
|
|
|
|
IN LPCWSTR lpValueName,
|
|
|
|
|
IN PULONG lpReserved,
|
2016-01-17 01:29:43 +00:00
|
|
|
|
OUT PULONG lpType OPTIONAL,
|
|
|
|
|
OUT PUCHAR lpData OPTIONAL,
|
|
|
|
|
IN OUT PULONG lpcbData OPTIONAL);
|
2011-05-14 08:29:48 +00:00
|
|
|
|
|
|
|
|
|
LONG WINAPI
|
|
|
|
|
RegSetValueExW(
|
|
|
|
|
IN HKEY hKey,
|
|
|
|
|
IN LPCWSTR lpValueName OPTIONAL,
|
|
|
|
|
IN ULONG Reserved,
|
|
|
|
|
IN ULONG dwType,
|
|
|
|
|
IN const UCHAR* lpData,
|
2016-01-17 01:29:43 +00:00
|
|
|
|
IN ULONG cbData);
|
2011-05-14 08:29:48 +00:00
|
|
|
|
|
2018-10-13 22:29:04 +00:00
|
|
|
|
LONG WINAPI
|
|
|
|
|
RegCloseKey(
|
|
|
|
|
IN HKEY hKey);
|
|
|
|
|
|
2011-05-14 08:29:48 +00:00
|
|
|
|
LONG WINAPI
|
|
|
|
|
RegDeleteKeyW(
|
|
|
|
|
IN HKEY hKey,
|
|
|
|
|
IN LPCWSTR lpSubKey);
|
|
|
|
|
|
|
|
|
|
LONG WINAPI
|
|
|
|
|
RegDeleteValueW(
|
|
|
|
|
IN HKEY hKey,
|
|
|
|
|
IN LPCWSTR lpValueName OPTIONAL);
|
|
|
|
|
|
|
|
|
|
LONG WINAPI
|
|
|
|
|
RegCreateKeyW(
|
|
|
|
|
IN HKEY hKey,
|
|
|
|
|
IN LPCWSTR lpSubKey,
|
|
|
|
|
OUT PHKEY phkResult);
|
|
|
|
|
|
|
|
|
|
LONG WINAPI
|
|
|
|
|
RegOpenKeyW(
|
|
|
|
|
IN HKEY hKey,
|
|
|
|
|
IN LPCWSTR lpSubKey,
|
|
|
|
|
OUT PHKEY phkResult);
|
|
|
|
|
|
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"
|
|
|
|
|
|
2014-10-03 13:15:10 +00:00
|
|
|
|
#define OBJ_NAME_PATH_SEPARATOR ((WCHAR)L'\\')
|
|
|
|
|
|
2006-09-10 15:39:11 +00:00
|
|
|
|
extern LIST_ENTRY CmiHiveListHead;
|
|
|
|
|
#define ABS_VALUE(V) (((V) < 0) ? -(V) : (V))
|
2014-10-03 13:15:10 +00:00
|
|
|
|
#define PAGED_CODE()
|
2003-04-14 17:19:42 +00:00
|
|
|
|
|
|
|
|
|
/* EOF */
|