Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

rtdelval.c File Reference

#include "cmp.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Defines

#define WORK_SIZE   1024

Functions

void __cdecl main (int, char *)
void processargs ()
void Delete (HANDLE Handle)
void __cdecl main (int argc, char *argv[])
void processargs (int argc, char *argv[])

Variables

UNICODE_STRING WorkName
WCHAR workbuffer [WORK_SIZE]
UNICODE_STRING ValueName
WCHAR valuebuffer [WORK_SIZE]


Define Documentation

#define WORK_SIZE   1024
 

Definition at line 34 of file rtdelval.c.


Function Documentation

void Delete HANDLE  Handle  ) 
 

void __cdecl main int  argc,
char *  argv[]
 

Definition at line 51 of file rtdelval.c.

References exit, L, NT_SUCCESS, NtClose(), NtDeleteValueKey(), NtOpenKey(), NTSTATUS(), NULL, ObjectAttributes, processargs(), valuebuffer, ValueName, WORK_SIZE, workbuffer, and WorkName.

00055 { 00056 NTSTATUS status; 00057 OBJECT_ATTRIBUTES ObjectAttributes; 00058 HANDLE BaseHandle; 00059 00060 // 00061 // Process args 00062 // 00063 00064 WorkName.MaximumLength = WORK_SIZE; 00065 WorkName.Length = 0L; 00066 WorkName.Buffer = &(workbuffer[0]); 00067 00068 00069 ValueName.MaximumLength = WORK_SIZE; 00070 ValueName.Length = 0L; 00071 ValueName.Buffer = &(valuebuffer[0]); 00072 00073 processargs(argc, argv); 00074 00075 00076 // 00077 // Set up and open KeyPath 00078 // 00079 00080 printf("rtdelval: starting\n"); 00081 00082 InitializeObjectAttributes( 00083 &ObjectAttributes, 00084 &WorkName, 00085 0, 00086 (HANDLE)NULL, 00087 NULL 00088 ); 00089 ObjectAttributes.Attributes |= OBJ_CASE_INSENSITIVE; 00090 00091 status = NtOpenKey( 00092 &BaseHandle, 00093 KEY_SET_VALUE, 00094 &ObjectAttributes 00095 ); 00096 if (!NT_SUCCESS(status)) { 00097 printf("rtdelval: t0: %08lx\n", status); 00098 exit(1); 00099 } 00100 00101 status = NtDeleteValueKey(BaseHandle, &ValueName); 00102 if (!NT_SUCCESS(status)) { 00103 printf("rtdelval: t1: %08lx\n", status); 00104 exit(1); 00105 } 00106 00107 NtClose(BaseHandle); 00108 exit(0); 00109 }

void __cdecl main int  ,
char * 
 

void processargs int  argc,
char *  argv[]
 

Definition at line 112 of file rtdelval.c.

References exit, RtlAnsiStringToUnicodeString(), RtlInitAnsiString(), TRUE, ValueName, and WorkName.

00116 { 00117 ANSI_STRING temp; 00118 00119 if ( (argc != 3) ) 00120 { 00121 printf("Usage: %s <KeyPath> <value entry name>\n", 00122 argv[0]); 00123 exit(1); 00124 } 00125 00126 RtlInitAnsiString( 00127 &temp, 00128 argv[1] 00129 ); 00130 00131 RtlAnsiStringToUnicodeString( 00132 &WorkName, 00133 &temp, 00134 TRUE 00135 ); 00136 00137 RtlInitAnsiString( 00138 &temp, 00139 argv[2] 00140 ); 00141 00142 RtlAnsiStringToUnicodeString( 00143 &ValueName, 00144 &temp, 00145 TRUE 00146 ); 00147 00148 return; 00149 }

void processargs  ) 
 


Variable Documentation

WCHAR valuebuffer[WORK_SIZE]
 

Definition at line 48 of file rtdelval.c.

Referenced by main().

UNICODE_STRING ValueName
 

Definition at line 47 of file rtdelval.c.

Referenced by ArbpGetRegistryValue(), CliReadRegistryValue(), CmDeleteValueKey(), CmpAppendStringToMultiSz(), CmpGetRegistryValue(), CmpInitializeMachineDependentConfiguration(), CmpInitializeRegistryNode(), CmpInitializeValueNameString(), CmpMergeKeyValues(), CmpSetValueKeyNew(), CmQueryMultipleValueKey(), CmQueryValueKey(), CmSetValueKey(), Copy(), EhDeleteValueKey(), EhQueryValueKey(), EhSetValueKey(), ExpGetCurrentUserUILanguage(), ExpSetCurrentUserUILanguage(), FsRtlGetCompatibilityModeValue(), FsRtlGetTunnelParameterValue(), FsRtlInitializeTunnels(), FsRtlInitSystem(), FtDeleteValue(), FtReturnValue(), FtSetValue(), IopAppendStringToValueKey(), IopBootLog(), IopCallDriverAddDeviceQueryRoutine(), IopGetRegistryValue(), IopRemoveStringFromValueKey(), IopSetRegistryStringValue(), KiMoveRegTree(), main(), MyRegQueryValue(), NtDeleteValueKey(), NtQueryValueKey(), NtSetValueKey(), processargs(), RegDumpKeyValue(), RegDumpKeyValueR(), RtlDeleteRegistryValue(), RtlGetNtProductType(), RtlInitializeRXact(), RtlpCallQueryRegistryRoutine(), RtlWriteRegistryValue(), SepAdtInitializeAuditingOptions(), SepAdtInitializeBounds(), SepAdtInitializeCrashOnFail(), SepAdtInitializePrivilegeAuditing(), and SepAuditFailed().

WCHAR workbuffer[WORK_SIZE]
 

Definition at line 45 of file rtdelval.c.

UNICODE_STRING WorkName
 

Definition at line 44 of file rtdelval.c.


Generated on Sat May 15 19:45:30 2004 for test by doxygen 1.3.7