00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#include <nt.h>
00022
#include <ntrtl.h>
00023
#include <nturtl.h>
00024
00025
#include <windows.h>
00026
00027
#include <stdio.h>
00028
#include <stdlib.h>
00029
#include <errno.h>
00030
#include <ctype.h>
00031
#include <string.h>
00032
00033
#include <fcntl.h>
00034
#include <malloc.h>
00035
#include <sys\types.h>
00036
#include <sys\stat.h>
00037
00038
00039 #define VALUE_BUFFER_SIZE (4096 * 100)
00040
00041
void
00042
RegInitialize(
void );
00043
00044 typedef struct _REG_UNICODE_FILE {
00045 LARGE_INTEGER
LastWriteTime;
00046 PWSTR
FileContents;
00047 PWSTR
EndOfFile;
00048 PWSTR
BeginLine;
00049 PWSTR
EndOfLine;
00050 PWSTR
NextLine;
00051 }
REG_UNICODE_FILE, *
PREG_UNICODE_FILE;
00052
00053
NTSTATUS
00054
RegReadBinaryFile(
00055 IN PUNICODE_STRING FileName,
00056 OUT PVOID *ValueBuffer,
00057 OUT PULONG ValueLength
00058 );
00059
00060
NTSTATUS
00061
RegLoadAsciiFileAsUnicode(
00062 IN PUNICODE_STRING FileName,
00063 OUT PREG_UNICODE_FILE UnicodeFile
00064 );
00065
00066 BOOLEAN
DebugOutput;
00067 BOOLEAN
SummaryOutput;
00068
00069 BOOLEAN
00070
RegGetNextLine(
00071 IN OUT PREG_UNICODE_FILE UnicodeFile,
00072 OUT PULONG IndentAmount,
00073 OUT PWSTR *FirstEqual
00074 );
00075
00076 BOOLEAN
00077
RegGetKeyValue(
00078 IN PUNICODE_STRING KeyValue,
00079 IN OUT PREG_UNICODE_FILE UnicodeFile,
00080 OUT PULONG ValueType,
00081 OUT PVOID *ValueBuffer,
00082 OUT PULONG ValueLength
00083 );
00084
00085 BOOLEAN
00086
RegGetMultiString(
00087 IN OUT PUNICODE_STRING ValueString,
00088 OUT PUNICODE_STRING MultiString
00089 );
00090
00091
void
00092
RegDumpKeyValue(
00093 FILE *fh,
00094 PKEY_VALUE_FULL_INFORMATION KeyValueInformation,
00095 ULONG IndentLevel
00096 );
00097
00098
00099
00100
00101
00102 BOOLEAN
00103
RegInitializeSecurity(
00104 VOID
00105 );
00106
00107 BOOLEAN
00108
RegCreateSecurity(
00109 IN PUNICODE_STRING Description,
00110 OUT PSECURITY_DESCRIPTOR SecurityDescriptor
00111 );
00112
00113
VOID
00114
RegDestroySecurity(
00115 IN PSECURITY_DESCRIPTOR SecurityDescriptor
00116 );
00117
00118
00119