#include "cmp.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "ntdskreg.h"
#include "ntddft.h"
Go to the source code of this file.
Defines | |
#define | WORK_BUFFER_SIZE 4096 |
#define | FUDGE 8 |
#define | REGISTRY_BASE "\\REGISTRY\\MACHINE" |
#define | DEFAULT_TYPE REG_SZ |
#define | FT_REGISTRY_ROOT "\\REGISTRY\\MACHINE\\SYSTEM\\NTFT" |
#define | FT_STRIPE_BASE "Stripe%d" |
#define | FT_MIRROR_BASE "Mirror%d" |
#define | FT_VOLSET_BASE "VolSet%d" |
#define | INVALID -1 |
#define | DIR 0 |
#define | CREATE 1 |
#define | LIST 2 |
#define | CHDIR 3 |
#define | HELP 4 |
#define | QUIT 5 |
#define | DDEBUG 6 |
#define | SETVALUE 7 |
#define | DELKEY 8 |
#define | DELVALUE 9 |
#define | DIRLONG 10 |
#define | INLONG 11 |
#define | INSHORT 12 |
#define | INBYTE 13 |
#define | DUMP 14 |
#define | DISKREG 15 |
#define | FIXDISK 16 |
#define | RESTORE 17 |
#define | DRIVERS 18 |
#define | ORPHAN 19 |
#define | REGEN 20 |
#define | INIT 21 |
#define | MAKEFT 22 |
#define | CTRL_C 0x03 |
#define | DRIVER_KEY "\\REGISTRY\\MACHINE\\System\\CurrentControlSet\\Services" |
#define | TYPE_KEY "Type" |
#define | START_KEY "Start" |
#define | GROUP_KEY "Group" |
#define | DEPENDENCIES "DependOnGroup" |
#define | TEMP_BUFFER_SIZE 256 |
Typedefs | |
typedef enum _DUMP_CONTROL | DUMP_CONTROL |
typedef enum _DUMP_CONTROL * | PDUMP_CONTROL |
Enumerations | |
enum | _DUMP_CONTROL { InBytes, InShorts, InLongs } |
Functions | |
NTSTATUS | FtOpenKey (PHANDLE HandlePtr, PUCHAR KeyName) |
NTSTATUS | FtDeleteKey (PUCHAR KeyName) |
NTSTATUS | FtCreateKey (PUCHAR KeyName, PUCHAR KeyClass, ULONG Index) |
NTSTATUS | FtDeleteValue (HANDLE KeyHandle, PUCHAR ValueName) |
NTSTATUS | FtSetValue (HANDLE KeyHandle, PUCHAR ValueName, PVOID DataBuffer, ULONG DataLength, ULONG Type) |
PUCHAR | FindTypeString (ULONG Type) |
BOOLEAN | ProcessHex (PUCHAR String, PULONG Value) |
VOID | Dump (PVOID Buffer, ULONG Length) |
void | UnicodePrint (PUNICODE_STRING UnicodeString) |
NTSTATUS | Directory (HANDLE KeyHandle, BOOLEAN LongListing) |
NTSTATUS | List (HANDLE KeyHandle, PUCHAR ItemName) |
UCHAR | GetCharacter (BOOLEAN Batch) |
PUCHAR | GetArgumentString (BOOLEAN Batch, PUCHAR Prompt, BOOLEAN ConvertToLower) |
ULONG | ParseArgumentNumeric (PUCHAR *ArgumentPtr) |
VOID | PromptUser (BOOLEAN Batch) |
int | GetCommand (BOOLEAN Batch, PUCHAR *ArgumentPtr) |
VOID | NotImplemented () |
NTSTATUS | FtReturnValue (IN HANDLE Handle, IN PUCHAR ValueName, IN PUCHAR Buffer, IN ULONG BufferLength) |
VOID | DiskDump () |
VOID | ChangeMemberState (IN ULONG Type, IN ULONG Group, IN ULONG Member, IN FT_PARTITION_STATE NewState) |
VOID | RestoreOrphan (IN ULONG Type, IN ULONG Group, IN ULONG Member) |
VOID | OrphanMember (IN ULONG Type, IN ULONG Group, IN ULONG Member) |
VOID | RegenerateMember (IN ULONG Type, IN ULONG Group, IN ULONG Member) |
VOID | FixDisk () |
PDISK_CONFIG_HEADER | GetDiskInfo () |
BOOLEAN | CreateFtMember (IN PDISK_CONFIG_HEADER ConfigHeader, IN ULONG Disk, IN ULONG Partition, IN ULONG Type, IN ULONG Group, IN ULONG Member) |
VOID | DisplayLoadInformation (IN PUCHAR DriverKey) |
VOID | ListDrivers () |
VOID | main () |
Variables | |
PUCHAR | TypeNames [] |
ULONG | TypeNumbers [] |
PUCHAR | StartDescription [] |
PUCHAR | TypeDescription [] |
PUCHAR | Commands [] |
int | CommandMap [] |
PUCHAR | CommandHelp [] |
UCHAR | WorkingDirectory [512] |
UCHAR | CurrentDirectory [512] |
UCHAR | CommandLine [512] |
PUCHAR | SetPrompts [] |
PUCHAR | Version = "Version 1.30" |
ULONG | Debug = 0 |
ULONG | ForceDump = 0 |
DUMP_CONTROL | DumpControl = InLongs |
|
Definition at line 157 of file editreg.c. Referenced by main(). |
|
Definition at line 155 of file editreg.c. Referenced by main(). |
|
Definition at line 178 of file editreg.c. Referenced by GetArgumentString(). |
|
Definition at line 160 of file editreg.c. Referenced by main(). |
|
Definition at line 122 of file editreg.c. Referenced by main(). |
|
Definition at line 162 of file editreg.c. Referenced by main(). |
|
Definition at line 163 of file editreg.c. Referenced by main(). |
|
|
|
Definition at line 154 of file editreg.c. Referenced by main(). |
|
Definition at line 164 of file editreg.c. Referenced by main(). |
|
Definition at line 169 of file editreg.c. Referenced by main(). |
|
Definition at line 2279 of file editreg.c. Referenced by ListDrivers(). |
|
Definition at line 172 of file editreg.c. Referenced by main(). |
|
Definition at line 168 of file editreg.c. Referenced by main(). |
|
Definition at line 170 of file editreg.c. Referenced by main(). |
|
|
|
|
|
|
|
|
|
Definition at line 110 of file editreg.c. Referenced by main(). |
|
|
|
Definition at line 158 of file editreg.c. Referenced by main(), and xxxHelpLoop(). |
|
Definition at line 167 of file editreg.c. Referenced by main(). |
|
Definition at line 175 of file editreg.c. Referenced by main(). |
|
Definition at line 165 of file editreg.c. Referenced by main(). |
|
Definition at line 166 of file editreg.c. Referenced by main(). |
|
Definition at line 153 of file editreg.c. Referenced by GetCommand(), IsNumberInUnicodeList(), and main(). |
|
Definition at line 156 of file editreg.c. Referenced by main(). |
|
Definition at line 176 of file editreg.c. Referenced by main(). |
|
Definition at line 173 of file editreg.c. Referenced by main(). |
|
Definition at line 159 of file editreg.c. Referenced by main(). |
|
Definition at line 174 of file editreg.c. Referenced by main(). |
|
Definition at line 116 of file editreg.c. Referenced by main(). |
|
Definition at line 171 of file editreg.c. Referenced by main(). |
|
Definition at line 161 of file editreg.c. Referenced by main(). |
|
|
|
Definition at line 2367 of file editreg.c. Referenced by ListDrivers(). |
|
|
|
Definition at line 104 of file editreg.c. Referenced by ChangeMemberState(), Directory(), DiskDump(), FixDisk(), FtReturnValue(), GetDiskInfo(), List(), ListDrivers(), and UnicodePrint(). |
|
|
|
|
|
Definition at line 344 of file editreg.c.
|
|
Definition at line 1771 of file editreg.c. References FALSE, FtOpenKey(), FtReturnValue(), FtSetValue(), Group, NT_SUCCESS, NtClose(), NTSTATUS(), NULL, TRUE, USHORT, VOID(), and WORK_BUFFER_SIZE. Referenced by main(), OrphanMember(), RegenerateMember(), and RestoreOrphan().
|
|
Definition at line 2210 of file editreg.c. References FALSE, Group, NTSTATUS(), and TRUE. Referenced by main().
|
|
Definition at line 903 of file editreg.c. References NT_SUCCESS, NtEnumerateKey(), NTSTATUS(), TRUE, UnicodePrint(), USHORT, and WORK_BUFFER_SIZE. Referenced by LdrpDphDetectSnapRoutines(), main(), NtCreateDirectoryObject(), NtQueryDirectoryObject(), ObpDeleteDirectoryEntry(), ObpInsertDirectoryEntry(), ObpLookupDirectoryEntry(), ObpLookupObjectName(), and ObpProcessDosDeviceSymbolicLink().
|
|
Definition at line 1597 of file editreg.c. References FtOpenKey(), FtReturnValue(), NT_SUCCESS, NtClose(), NTSTATUS(), NULL, and WORK_BUFFER_SIZE. Referenced by main().
|
|
Definition at line 2357 of file editreg.c. Referenced by ListDrivers().
|
|
Definition at line 772 of file editreg.c. References Buffer, DumpControl, InBytes, InLongs, InShorts, PUSHORT, and sprintf().
|
|
Definition at line 650 of file editreg.c. References NULL, TypeNames, and TypeNumbers. Referenced by List().
|
|
Definition at line 1990 of file editreg.c. References FALSE, FtDeleteValue(), FtOpenKey(), FtReturnValue(), FtSetValue(), GetArgumentString(), NT_SUCCESS, NtClose(), NTSTATUS(), NULL, ProcessHex(), sprintf(), TRUE, and WORK_BUFFER_SIZE. Referenced by main().
|
|
Definition at line 453 of file editreg.c. References ASSERT, Index, KeyName, NT_SUCCESS, NtClose(), NtCreateKey(), NTSTATUS(), NULL, RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitString(), TRUE, and VOID(). Referenced by main().
|
|
Definition at line 411 of file editreg.c. References Debug, FtOpenKey(), KeyName, NT_SUCCESS, NtClose(), NtDeleteKey(), and NTSTATUS(). Referenced by main().
|
|
Definition at line 557 of file editreg.c. References Debug, NT_SUCCESS, NtDeleteValueKey(), NTSTATUS(), RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitString(), TRUE, and ValueName. Referenced by FixDisk(), and main().
|
|
Definition at line 357 of file editreg.c. References Debug, KeyName, NT_SUCCESS, NtOpenKey(), NTSTATUS(), NULL, RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitString(), TRUE, and VOID(). Referenced by ChangeMemberState(), DiskDump(), FixDisk(), FtDeleteKey(), GetDiskInfo(), ListDrivers(), and main().
|
|
Definition at line 1534 of file editreg.c. References Buffer, Handle, NT_SUCCESS, NtQueryValueKey(), NTSTATUS(), NULL, RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitString(), TRUE, ValueName, and WORK_BUFFER_SIZE. Referenced by ChangeMemberState(), DiskDump(), FixDisk(), and GetDiskInfo().
|
|
Definition at line 602 of file editreg.c. References Debug, NT_SUCCESS, NtSetValueKey(), NTSTATUS(), RtlAnsiStringToUnicodeString(), RtlFreeUnicodeString(), RtlInitString(), TRUE, and ValueName. Referenced by ChangeMemberState(), FixDisk(), and main().
|
|
Definition at line 1120 of file editreg.c. References c, CommandLine, CTRL_C, GetCharacter(), NULL, and TRUE. Referenced by FixDisk(), and main().
|
|
Definition at line 1081 of file editreg.c. References c. Referenced by GetArgumentString(), and GetCommand().
|
|
Definition at line 1355 of file editreg.c. References c, CommandLine, CommandMap, Commands, Debug, GetCharacter(), INVALID, NULL, and PromptUser(). Referenced by main().
|
|
Definition at line 2163 of file editreg.c. References FtOpenKey(), FtReturnValue(), NT_SUCCESS, NtClose(), NTSTATUS(), NULL, and WORK_BUFFER_SIZE. Referenced by main().
|
|
Definition at line 966 of file editreg.c. References Dump(), FindTypeString(), ForceDump, NT_SUCCESS, NtEnumerateValueKey(), NTSTATUS(), TRUE, type, UnicodePrint(), USHORT, and WORK_BUFFER_SIZE. Referenced by main().
|
|
Definition at line 2369 of file editreg.c. References DisplayLoadInformation(), DRIVER_KEY, FALSE, FtOpenKey(), L, NT_SUCCESS, NtClose(), NtEnumerateKey(), NTSTATUS(), RtlUnicodeStringToAnsiString(), sprintf(), TEMP_BUFFER_SIZE, TRUE, USHORT, WORK_BUFFER_SIZE, and WorkingDirectory.
|
|
Definition at line 2460 of file editreg.c.
|
|
Definition at line 1523 of file editreg.c. Referenced by main().
|
|
Definition at line 1924 of file editreg.c. References ChangeMemberState(), and Group. Referenced by main().
|
|
Definition at line 1233 of file editreg.c. References c, FALSE, NULL, and TRUE. Referenced by main().
|
|
Definition at line 678 of file editreg.c. References FALSE, NULL, String, and TRUE. Referenced by FixDisk().
|
|
Definition at line 1325 of file editreg.c. References CurrentDirectory. Referenced by GetCommand().
|
|
Definition at line 1957 of file editreg.c. References ChangeMemberState(), and Group. Referenced by main().
|
|
Definition at line 1891 of file editreg.c. References ChangeMemberState(), and Group. Referenced by main().
|
|
Definition at line 866 of file editreg.c. References FALSE, L, RtlUnicodeStringToAnsiString(), and WORK_BUFFER_SIZE. Referenced by Directory(), and List().
|
|
Initial value:
Definition at line 269 of file editreg.c. Referenced by main(). |
|
Definition at line 314 of file editreg.c. Referenced by GetArgumentString(), GetCommand(), LdrpInitializeProcess(), LdrShutdownProcess(), and RtlCreateProcessParameters(). |
|
Definition at line 226 of file editreg.c. Referenced by GetCommand(), and main(). |
|
Definition at line 184 of file editreg.c. Referenced by GetCommand(), GetConsoleCommandHistoryA(), GetConsoleCommandHistoryInternal(), GetConsoleCommandHistoryW(), and main(). |
|
Definition at line 308 of file editreg.c. Referenced by main(), PromptUser(), and RtlCreateProcessParameters(). |
|
Definition at line 338 of file editreg.c. Referenced by FtDeleteKey(), FtDeleteValue(), FtOpenKey(), FtSetValue(), GetCommand(), and main(). |
|
|
|
|
|
Initial value: |
|
Initial value: |
|
Initial value: |
|
Initial value:
Definition at line 46 of file editreg.c. Referenced by FindTypeString(), and main(). |
|
Initial value:
Definition at line 60 of file editreg.c. Referenced by FindTypeString(), and main(). |
|
Definition at line 332 of file editreg.c. Referenced by IopDeviceCapabilitiesToRegistry(), LdrpGetFileVersion(), main(), and WriteBatchResults(). |
|
Definition at line 302 of file editreg.c. Referenced by ListDrivers(), and main(). |