mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Kill warnings.\n Use DbgPrint for debugging registry.
svn path=/trunk/; revision=3046
This commit is contained in:
parent
8bab1a8f2d
commit
65ae3074e9
12 changed files with 142 additions and 120 deletions
|
@ -136,7 +136,7 @@ EXTERN(_GetConventionalMemorySize)
|
|||
|
||||
|
||||
/*
|
||||
* ULONG GetBiosMemoryMap(BIOS_MEMORY_MAP BiosMemoryMap[32]);
|
||||
* ULONG GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap);
|
||||
*/
|
||||
_gbmm_mem_map_length:
|
||||
.long 0
|
||||
|
|
|
@ -24,12 +24,33 @@
|
|||
|
||||
#ifdef DEBUG
|
||||
|
||||
//ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY | DPRINT_FILESYSTEM |
|
||||
// DPRINT_UI | DPRINT_DISK | DPRINT_CACHE | DPRINT_REACTOS |
|
||||
// DPRINT_LINUX;
|
||||
ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_UI | DPRINT_MEMORY |
|
||||
/*DPRINT_CACHE |*/ DPRINT_LINUX;
|
||||
//ULONG DebugPrintMask = DPRINT_INIFILE;
|
||||
//#define DEBUG_ULTRA
|
||||
//#define DEBUG_INIFILE
|
||||
//#define DEBUG_REACTOS
|
||||
//#define DEBUG_CUSTOM
|
||||
#define DEBUG_NONE
|
||||
|
||||
#ifdef DEBUG_ULTRA
|
||||
ULONG DebugPrintMask = DPRINT_WARNING | DPRINT_MEMORY | DPRINT_FILESYSTEM |
|
||||
DPRINT_UI | DPRINT_DISK | DPRINT_CACHE | DPRINT_REACTOS |
|
||||
DPRINT_LINUX;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_INIFILE
|
||||
ULONG DebugPrintMask = DPRINT_INIFILE;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_REACTOS
|
||||
ULONG DebugPrintMask = DPRINT_REACTOS | DPRINT_REGISTRY;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_CUSTOM
|
||||
ULONG DebugPrintMask = 0;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_NONE
|
||||
ULONG DebugPrintMask = 0;
|
||||
#endif
|
||||
|
||||
#define SCREEN 0
|
||||
#define RS232 1
|
||||
|
@ -86,6 +107,10 @@ VOID DebugPrintChar(UCHAR Character)
|
|||
|
||||
VOID DebugPrintHeader(ULONG Mask)
|
||||
{
|
||||
/* No header */
|
||||
if (Mask == 0)
|
||||
return;
|
||||
|
||||
switch (Mask)
|
||||
{
|
||||
case DPRINT_WARNING:
|
||||
|
@ -154,6 +179,18 @@ VOID DebugPrintHeader(ULONG Mask)
|
|||
DebugPrintChar(':');
|
||||
DebugPrintChar(' ');
|
||||
break;
|
||||
case DPRINT_REGISTRY:
|
||||
DebugPrintChar('R');
|
||||
DebugPrintChar('E');
|
||||
DebugPrintChar('G');
|
||||
DebugPrintChar('I');
|
||||
DebugPrintChar('S');
|
||||
DebugPrintChar('T');
|
||||
DebugPrintChar('R');
|
||||
DebugPrintChar('Y');
|
||||
DebugPrintChar(':');
|
||||
DebugPrintChar(' ');
|
||||
break;
|
||||
case DPRINT_REACTOS:
|
||||
DebugPrintChar('R');
|
||||
DebugPrintChar('E');
|
||||
|
|
|
@ -34,7 +34,7 @@ VOID DiskError(PUCHAR ErrorString)
|
|||
{
|
||||
UCHAR ErrorCodeString[80];
|
||||
|
||||
sprintf(ErrorCodeString, "%s\nError Code: 0x%x", ErrorString, BiosInt13GetLastErrorCode());
|
||||
sprintf(ErrorCodeString, "%s\nError Code: 0x%lx", ErrorString, BiosInt13GetLastErrorCode());
|
||||
|
||||
DbgPrint((DPRINT_DISK, "%s\n", ErrorCodeString));
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#ifdef DEBUG
|
||||
|
||||
#define DPRINT_NONE 0x00000000 // Simple debug print
|
||||
#define DPRINT_WARNING 0x00000001 // OR this with DebugPrintMask to enable debugger messages and other misc stuff
|
||||
#define DPRINT_MEMORY 0x00000002 // OR this with DebugPrintMask to enable memory management messages
|
||||
#define DPRINT_FILESYSTEM 0x00000004 // OR this with DebugPrintMask to enable file system messages
|
||||
|
@ -30,15 +31,16 @@
|
|||
#define DPRINT_UI 0x00000010 // OR this with DebugPrintMask to enable user interface messages
|
||||
#define DPRINT_DISK 0x00000020 // OR this with DebugPrintMask to enable disk messages
|
||||
#define DPRINT_CACHE 0x00000040 // OR this with DebugPrintMask to enable cache messages
|
||||
#define DPRINT_REACTOS 0x00000080 // OR this with DebugPrintMask to enable ReactOS messages
|
||||
#define DPRINT_LINUX 0x00000100 // OR this with DebugPrintMask to enable Linux messages
|
||||
#define DPRINT_REGISTRY 0x00000080 // OR this with DebugPrintMask to enable registry messages
|
||||
#define DPRINT_REACTOS 0x00000100 // OR this with DebugPrintMask to enable ReactOS messages
|
||||
#define DPRINT_LINUX 0x00000200 // OR this with DebugPrintMask to enable Linux messages
|
||||
|
||||
VOID DebugInit(VOID);
|
||||
VOID DebugPrint(ULONG Mask, char *format, ...);
|
||||
VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length);
|
||||
|
||||
#define DbgPrint(_x_) DebugPrint _x_
|
||||
#define BugCheck(_x_) { DebugPrint(DPRINT_WARNING, "Fatal Error: %s:%d\n", __FILE__, __LINE__); DebugPrint _x_ ; for (;;); }
|
||||
#define DbgPrint(_x_) { DebugPrint(DPRINT_NONE, "%s:%d(%s)\n", __FILE__, __LINE__, __FUNCTION__); DebugPrint _x_ ; }
|
||||
#define BugCheck(_x_) { DebugPrint(DPRINT_WARNING, "Fatal Error: %s:%d(%s)\n", __FILE__, __LINE__, __FUNCTION__); DebugPrint _x_ ; for (;;); }
|
||||
#define DbgDumpBuffer(_x_, _y_, _z_) DebugDumpBuffer(_x_, _y_, _z_)
|
||||
|
||||
#else
|
||||
|
@ -49,4 +51,6 @@
|
|||
|
||||
#endif // defined DEBUG
|
||||
|
||||
#define UNIMPLEMENTED BugCheck((DPRINT_WARNING, "Unimplemented\n"));
|
||||
|
||||
#endif // defined __DEBUG_H
|
||||
|
|
|
@ -43,7 +43,7 @@ ULONG GetSystemMemorySize(VOID); // Returns the amount of total memory in
|
|||
// These functions are implemented in mem.S
|
||||
ULONG GetExtendedMemorySize(VOID); // Returns extended memory size in KB
|
||||
ULONG GetConventionalMemorySize(VOID); // Returns conventional memory size in KB
|
||||
ULONG GetBiosMemoryMap(BIOS_MEMORY_MAP BiosMemoryMap[32]); // Fills mem_map structure with BIOS memory map and returns length of memory map
|
||||
ULONG GetBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap); // Fills mem_map structure with BIOS memory map and returns length of memory map
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ BOOL IniParseFile(PUCHAR IniFileData, ULONG IniFileSize)
|
|||
// First check to make sure we're inside a [section]
|
||||
if (CurrentSection == NULL)
|
||||
{
|
||||
printf("Error: freeldr.ini:%d: Setting \'%s\' found outside of a [section].\n", CurrentLineNumber, IniFileLine);
|
||||
printf("Error: freeldr.ini:%ld: Setting '%s' found outside of a [section].\n", CurrentLineNumber, IniFileLine);
|
||||
CurrentLineNumber++;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ BOOL MmInitializeMemoryManager(VOID)
|
|||
|
||||
RtlZeroMemory(BiosMemoryMap, sizeof(BIOS_MEMORY_MAP) * 32);
|
||||
|
||||
BiosMemoryMapEntryCount = GetBiosMemoryMap(BiosMemoryMap);
|
||||
BiosMemoryMapEntryCount = GetBiosMemoryMap((PBIOS_MEMORY_MAP)&BiosMemoryMap);
|
||||
ExtendedMemorySize = GetExtendedMemorySize();
|
||||
ConventionalMemorySize = GetConventionalMemorySize();
|
||||
|
||||
|
|
|
@ -391,7 +391,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
|||
mb_info.cmdline = (unsigned long)multiboot_kernel_cmdline;
|
||||
mb_info.mods_count = 0;
|
||||
mb_info.mods_addr = (unsigned long)multiboot_modules;
|
||||
mb_info.mmap_length = GetBiosMemoryMap(&multiboot_memory_map);
|
||||
mb_info.mmap_length = (unsigned long)GetBiosMemoryMap((PBIOS_MEMORY_MAP)&multiboot_memory_map);
|
||||
if (mb_info.mmap_length)
|
||||
{
|
||||
mb_info.mmap_addr = (unsigned long)&multiboot_memory_map;
|
||||
|
|
|
@ -22,17 +22,13 @@
|
|||
#include <freeldr.h>
|
||||
#include <rtl.h>
|
||||
#include <mm.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "registry.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
||||
|
||||
#define REGISTRY_FILE_MAGIC "REGEDIT4"
|
||||
|
||||
#define INVALID_HANDLE_VALUE NULL
|
||||
|
||||
|
||||
static PCHAR
|
||||
checkAndSkipMagic (PCHAR regChunk)
|
||||
{
|
||||
|
@ -40,18 +36,14 @@ checkAndSkipMagic (PCHAR regChunk)
|
|||
REGISTRY_FILE_MAGIC,
|
||||
strlen (REGISTRY_FILE_MAGIC)) != 0)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
printf("incorrect magic number in registry chunk. expected: %s got:%.*s\n",
|
||||
REGISTRY_FILE_MAGIC,
|
||||
strlen (REGISTRY_FILE_MAGIC),
|
||||
regChunk);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Incorrect magic number in registry chunk. Expected: '%s' Got: '%.*s'\n",
|
||||
REGISTRY_FILE_MAGIC, strlen(REGISTRY_FILE_MAGIC), regChunk));
|
||||
|
||||
return 0;
|
||||
}
|
||||
regChunk += strlen (REGISTRY_FILE_MAGIC);
|
||||
#ifndef NDEBUG
|
||||
printf("Found registry chunk magic value\n");
|
||||
#endif
|
||||
|
||||
DbgPrint((DPRINT_REGISTRY, "Found registry chunk magic value\n"));
|
||||
|
||||
return regChunk;
|
||||
}
|
||||
|
@ -128,17 +120,13 @@ createNewKey (PCHAR newKeyName)
|
|||
{
|
||||
HKEY handleToReturn = NULL;
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf("Adding new key '%s'\n", newKeyName);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Adding new key '%s'\n", newKeyName));
|
||||
|
||||
RegCreateKey(NULL,
|
||||
newKeyName,
|
||||
&handleToReturn);
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf(" returned handle: 0x%x\n", handleToReturn);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Returned handle: 0x%x\n", handleToReturn));
|
||||
|
||||
return handleToReturn;
|
||||
}
|
||||
|
@ -360,12 +348,9 @@ setKeyValue (HKEY currentKey,
|
|||
{
|
||||
LONG status;
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf("Adding value (%s) to current key, with data type %d size %d\n",
|
||||
newValueName,
|
||||
(int)keyValueType,
|
||||
(int)dataSize);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Adding value (%s) to current key, with data type %d and size %d\n",
|
||||
newValueName, (int)keyValueType, (int)dataSize));
|
||||
|
||||
status = RegSetValue(currentKey,
|
||||
newValueName,
|
||||
keyValueType,
|
||||
|
@ -373,9 +358,7 @@ setKeyValue (HKEY currentKey,
|
|||
dataSize);
|
||||
if (status != ERROR_SUCCESS)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
printf("could not set key value, rc:%d\n", status);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Could not set key value. status: %d\n", status));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -397,9 +380,7 @@ RegImportHive(PCHAR ChunkBase,
|
|||
PVOID data = 0;
|
||||
PCHAR regChunk;
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf("ChunkBase 0x%x ChunkSize %x\n", ChunkBase, ChunkSize);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "ChunkBase 0x%x ChunkSize %d\n", ChunkBase, ChunkSize));
|
||||
|
||||
regChunk = checkAndSkipMagic (ChunkBase);
|
||||
if (regChunk == 0)
|
||||
|
@ -413,14 +394,12 @@ RegImportHive(PCHAR ChunkBase,
|
|||
|
||||
if (*regChunk == '[')
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
printf("Line: %s\n", regChunk);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Line: %s\n", regChunk));
|
||||
|
||||
if (currentKey != NULL)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
printf("Closing current key: 0x%lx\n", currentKey);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Closing current key: 0x%lx\n", currentKey));
|
||||
|
||||
currentKey = NULL;
|
||||
}
|
||||
|
||||
|
@ -507,9 +486,7 @@ RegImportHive(PCHAR ChunkBase,
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
static PCHAR
|
||||
bprintf(char *buffer, char *format, ... )
|
||||
{
|
||||
|
@ -559,7 +536,7 @@ bprintf(char *buffer, char *format, ... )
|
|||
}
|
||||
return(p);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
BOOL
|
||||
RegExportHive(PCHAR ChunkBase, PULONG ChunkSize)
|
||||
|
|
|
@ -28,11 +28,9 @@
|
|||
#include <freeldr.h>
|
||||
#include <mm.h>
|
||||
#include <rtl.h>
|
||||
#include <debug.h>
|
||||
#include "registry.h"
|
||||
|
||||
#define NDEBUG
|
||||
|
||||
|
||||
static HKEY RootKey;
|
||||
|
||||
|
||||
|
@ -61,7 +59,7 @@ RegCreateKey(HKEY ParentKey,
|
|||
PHKEY Key)
|
||||
{
|
||||
PLIST_ENTRY Ptr;
|
||||
HKEY SearchKey;
|
||||
HKEY SearchKey = INVALID_HANDLE_VALUE;
|
||||
HKEY CurrentKey;
|
||||
HKEY NewKey;
|
||||
PCHAR p;
|
||||
|
@ -69,9 +67,7 @@ RegCreateKey(HKEY ParentKey,
|
|||
int subkeyLength;
|
||||
int stringLength;
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf("RegCreateKey(%s) called\n", KeyName);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "KeyName '%s'\n", KeyName));
|
||||
|
||||
if (*KeyName == '\\')
|
||||
{
|
||||
|
@ -90,9 +86,8 @@ RegCreateKey(HKEY ParentKey,
|
|||
|
||||
while (*KeyName != 0)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
printf("RegCreateKey(): KeyName '%s'\n", KeyName);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "KeyName '%s'\n", KeyName));
|
||||
|
||||
if (*KeyName == '\\')
|
||||
KeyName++;
|
||||
p = strchr(KeyName, '\\');
|
||||
|
@ -112,16 +107,13 @@ RegCreateKey(HKEY ParentKey,
|
|||
Ptr = CurrentKey->SubKeyList.Flink;
|
||||
while (Ptr != &CurrentKey->SubKeyList)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
printf("RegCreateKey(): Ptr 0x%x\n", Ptr);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Ptr 0x%x\n", Ptr));
|
||||
|
||||
SearchKey = CONTAINING_RECORD(Ptr,
|
||||
KEY,
|
||||
KeyList);
|
||||
#ifndef NDEBUG
|
||||
printf("RegCreateKey(): SearchKey 0x%x\n", SearchKey);
|
||||
printf("RegCreateKey(): searching '%s'\n", SearchKey->Name);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "SearchKey 0x%x\n", SearchKey));
|
||||
DbgPrint((DPRINT_REGISTRY, "Searching '%s'\n", SearchKey->Name));
|
||||
if (strncmp(SearchKey->Name, name, subkeyLength) == 0)
|
||||
break;
|
||||
|
||||
|
@ -150,10 +142,8 @@ RegCreateKey(HKEY ParentKey,
|
|||
memcpy(NewKey->Name, name, subkeyLength);
|
||||
NewKey->Name[subkeyLength] = 0;
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf("RegCreateKey(): new key 0x%x\n", NewKey);
|
||||
printf("RegCreateKey(): new key '%s' length %d\n", NewKey->Name, NewKey->NameSize);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "NewKey 0x%x\n", NewKey));
|
||||
DbgPrint((DPRINT_REGISTRY, "NewKey '%s' Length %d\n", NewKey->Name, NewKey->NameSize));
|
||||
|
||||
CurrentKey = NewKey;
|
||||
}
|
||||
|
@ -215,9 +205,7 @@ RegEnumKey(HKEY Key,
|
|||
KEY,
|
||||
KeyList);
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf("RegEnumKey(): name '%s' length %d\n", SearchKey->Name, SearchKey->NameSize);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Name '%s' Length %d\n", SearchKey->Name, SearchKey->NameSize));
|
||||
|
||||
Size = min(SearchKey->NameSize, *NameSize);
|
||||
*NameSize = Size;
|
||||
|
@ -233,16 +221,14 @@ RegOpenKey(HKEY ParentKey,
|
|||
PHKEY Key)
|
||||
{
|
||||
PLIST_ENTRY Ptr;
|
||||
HKEY SearchKey;
|
||||
HKEY SearchKey = INVALID_HANDLE_VALUE;
|
||||
HKEY CurrentKey;
|
||||
PCHAR p;
|
||||
PCHAR name;
|
||||
int subkeyLength;
|
||||
int stringLength;
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf("RegOpenKey(%s) called\n", KeyName);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "KeyName '%s'\n", KeyName));
|
||||
|
||||
*Key = NULL;
|
||||
|
||||
|
@ -263,9 +249,8 @@ RegOpenKey(HKEY ParentKey,
|
|||
|
||||
while (*KeyName != 0)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
printf("RegOpenKey(): KeyName '%s'\n", KeyName);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "KeyName '%s'\n", KeyName));
|
||||
|
||||
if (*KeyName == '\\')
|
||||
KeyName++;
|
||||
p = strchr(KeyName, '\\');
|
||||
|
@ -285,16 +270,15 @@ RegOpenKey(HKEY ParentKey,
|
|||
Ptr = CurrentKey->SubKeyList.Flink;
|
||||
while (Ptr != &CurrentKey->SubKeyList)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
printf("RegCreateKey(): Ptr 0x%x\n", Ptr);
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "Ptr 0x%x\n", Ptr));
|
||||
|
||||
SearchKey = CONTAINING_RECORD(Ptr,
|
||||
KEY,
|
||||
KeyList);
|
||||
#ifndef NDEBUG
|
||||
printf("RegOpenKey(): SearchKey 0x%x\n", SearchKey);
|
||||
printf("RegOpenKey(): searching '%s'\n", SearchKey->Name);
|
||||
#endif
|
||||
|
||||
DbgPrint((DPRINT_REGISTRY, "SearchKey 0x%x\n", SearchKey));
|
||||
DbgPrint((DPRINT_REGISTRY, "Searching '%s'\n", SearchKey->Name));
|
||||
|
||||
if (strncmp(SearchKey->Name, name, subkeyLength) == 0)
|
||||
break;
|
||||
|
||||
|
@ -328,11 +312,11 @@ RegSetValue(HKEY Key,
|
|||
ULONG DataSize)
|
||||
{
|
||||
PLIST_ENTRY Ptr;
|
||||
PVALUE Value;
|
||||
PVALUE Value = NULL;
|
||||
|
||||
DbgPrint((DPRINT_REGISTRY, "Key 0x%x, ValueName '%s', Type %d, Data 0x%x, DataSize %d\n",
|
||||
(int)Key, ValueName, (int)Type, (int)Data, (int)DataSize));
|
||||
|
||||
#ifndef NDEBUG
|
||||
printf("RegSetValue(%x, '%s', %d, %x, %d)\n", (int)Key, ValueName, (int)Type, (int)Data, (int)DataSize);
|
||||
#endif
|
||||
if ((ValueName == NULL) || (*ValueName == 0))
|
||||
{
|
||||
/* set default value */
|
||||
|
@ -352,9 +336,9 @@ RegSetValue(HKEY Key,
|
|||
Value = CONTAINING_RECORD(Ptr,
|
||||
VALUE,
|
||||
ValueList);
|
||||
#ifndef NDEBUG
|
||||
printf("Value->Name: '%s'\n", Value->Name);
|
||||
#endif
|
||||
|
||||
DbgPrint((DPRINT_REGISTRY, "Value->Name '%s'\n", Value->Name));
|
||||
|
||||
if (stricmp(Value->Name, ValueName) == 0)
|
||||
break;
|
||||
|
||||
|
@ -364,9 +348,8 @@ RegSetValue(HKEY Key,
|
|||
if (Ptr == &Key->ValueList)
|
||||
{
|
||||
/* add new value */
|
||||
#ifndef NDEBUG
|
||||
printf("No value found - adding new value\n");
|
||||
#endif
|
||||
DbgPrint((DPRINT_REGISTRY, "No value found - adding new value\n"));
|
||||
|
||||
Value = (PVALUE)MmAllocateMemory(sizeof(VALUE));
|
||||
if (Value == NULL)
|
||||
return(ERROR_OUTOFMEMORY);
|
||||
|
@ -411,7 +394,7 @@ RegQueryValue(HKEY Key,
|
|||
{
|
||||
ULONG Size;
|
||||
PLIST_ENTRY Ptr;
|
||||
PVALUE Value;
|
||||
PVALUE Value = NULL;
|
||||
|
||||
if ((ValueName == NULL) || (*ValueName == 0))
|
||||
{
|
||||
|
@ -437,9 +420,9 @@ RegQueryValue(HKEY Key,
|
|||
Value = CONTAINING_RECORD(Ptr,
|
||||
VALUE,
|
||||
ValueList);
|
||||
#ifndef NDEBUG
|
||||
printf("Name: %s\n", Value->Name);
|
||||
#endif
|
||||
|
||||
DbgPrint((DPRINT_REGISTRY, "Value name '%s'\n", Value->Name));
|
||||
|
||||
if (stricmp(Value->Name, ValueName) == 0)
|
||||
break;
|
||||
|
||||
|
@ -477,7 +460,7 @@ RegDeleteValue(HKEY Key,
|
|||
PCHAR ValueName)
|
||||
{
|
||||
PLIST_ENTRY Ptr;
|
||||
PVALUE Value;
|
||||
PVALUE Value = NULL;
|
||||
|
||||
if ((ValueName == NULL) || (*ValueName == 0))
|
||||
{
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#ifndef __REGISTRY_H
|
||||
#define __REGISTRY_H
|
||||
|
||||
#define INVALID_HANDLE_VALUE NULL
|
||||
|
||||
typedef struct _LIST_ENTRY
|
||||
{
|
||||
struct _LIST_ENTRY *Flink;
|
||||
|
|
|
@ -111,7 +111,7 @@ BOOL UiInitialize(VOID)
|
|||
|
||||
if (!VideoSetMode(VideoMode))
|
||||
{
|
||||
printf("Error: unable to set video display mode 0x%x\n", VideoMode);
|
||||
printf("Error: unable to set video display mode 0x%lx\n", VideoMode);
|
||||
printf("Press any key to continue.\n");
|
||||
getch();
|
||||
}
|
||||
|
@ -202,6 +202,7 @@ VOID UiDrawBackdrop(VOID)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiDrawBackdrop();
|
||||
}
|
||||
}
|
||||
|
@ -214,6 +215,7 @@ VOID UiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiFillArea(Left, Top, Right, Bottom, FillChar, Attr);
|
||||
}
|
||||
}
|
||||
|
@ -226,6 +228,7 @@ VOID UiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiDrawShadow(Left, Top, Right, Bottom);
|
||||
}
|
||||
}
|
||||
|
@ -238,6 +241,7 @@ VOID UiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiDrawBox(Left, Top, Right, Bottom, VertStyle, HorzStyle, Fill, Shadow, Attr);
|
||||
}
|
||||
}
|
||||
|
@ -250,6 +254,7 @@ VOID UiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiDrawText(X, Y, Text, Attr);
|
||||
}
|
||||
}
|
||||
|
@ -262,6 +267,7 @@ VOID UiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PUCHAR
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiDrawCenteredText(Left, Top, Right, Bottom, TextString, Attr);
|
||||
}
|
||||
}
|
||||
|
@ -274,6 +280,7 @@ VOID UiDrawStatusText(PUCHAR StatusText)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiDrawStatusText(StatusText);
|
||||
}
|
||||
}
|
||||
|
@ -286,6 +293,7 @@ VOID UiUpdateDateTime(VOID)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//TuiUpdateDateTime();
|
||||
}
|
||||
}
|
||||
|
@ -313,6 +321,7 @@ VOID UiMessageBox(PUCHAR MessageText)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiMessageBox(UiMessageBoxLineText);
|
||||
}
|
||||
|
||||
|
@ -339,6 +348,7 @@ VOID UiMessageBoxCritical(PUCHAR MessageText)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiMessageBoxCritical(MessageText);
|
||||
}
|
||||
}
|
||||
|
@ -357,6 +367,8 @@ UCHAR UiTextToColor(PUCHAR ColorText)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
return 0;
|
||||
//return GuiTextToColor(ColorText);
|
||||
}
|
||||
}
|
||||
|
@ -369,6 +381,8 @@ UCHAR UiTextToFillStyle(PUCHAR FillStyleText)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
return 0;
|
||||
//return GuiTextToFillStyle(FillStyleText);
|
||||
}
|
||||
}
|
||||
|
@ -381,6 +395,7 @@ VOID UiDrawProgressBarCenter(ULONG Position, ULONG Range)
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiDrawProgressBarCenter(Position, Range);
|
||||
}
|
||||
}
|
||||
|
@ -393,6 +408,7 @@ VOID UiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG P
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
//GuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range);
|
||||
}
|
||||
}
|
||||
|
@ -441,6 +457,7 @@ VOID UiShowMessageBoxesInSection(PUCHAR SectionName)
|
|||
|
||||
VOID UiTruncateStringEllipsis(PUCHAR StringText, ULONG MaxChars)
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
}
|
||||
|
||||
BOOL UiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, PULONG SelectedMenuItem)
|
||||
|
@ -451,6 +468,8 @@ BOOL UiDisplayMenu(PUCHAR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenu
|
|||
}
|
||||
else
|
||||
{
|
||||
UNIMPLEMENTED
|
||||
return FALSE;
|
||||
//return GuiDisplayMenu(MenuItemList, MenuItemCount, DefaultMenuItem, MenuTimeOut, SelectedMenuItem);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue