Fix Build

svn path=/trunk/; revision=16113
This commit is contained in:
Alex Ionescu 2005-06-19 21:03:41 +00:00
parent 61eed1a9da
commit 4d69a0fddb
2 changed files with 11 additions and 24 deletions

View file

@ -601,8 +601,9 @@ CmiCreateCurrentControlSetLink(VOID)
RTL_QUERY_REGISTRY_TABLE QueryTable[5]; RTL_QUERY_REGISTRY_TABLE QueryTable[5];
WCHAR TargetNameBuffer[80]; WCHAR TargetNameBuffer[80];
ULONG TargetNameLength; ULONG TargetNameLength;
UNICODE_STRING LinkName; UNICODE_STRING LinkName = RTL_CONSTANT_STRING(
UNICODE_STRING LinkValue; L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet");
UNICODE_STRING LinkValue = RTL_CONSTANT_STRING(L"SymbolicLinkValue");
ULONG CurrentSet; ULONG CurrentSet;
ULONG DefaultSet; ULONG DefaultSet;
ULONG Failed; ULONG Failed;
@ -650,8 +651,6 @@ CmiCreateCurrentControlSetLink(VOID)
DPRINT("Link target '%S'\n", TargetNameBuffer); DPRINT("Link target '%S'\n", TargetNameBuffer);
LinkName = RTL_CONSTANT_STRING(
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet");
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&LinkName, &LinkName,
OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_OPENLINK, OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_OPENLINK,
@ -670,8 +669,6 @@ CmiCreateCurrentControlSetLink(VOID)
return(Status); return(Status);
} }
LinkValue = RTL_CONSTANT_STRING(
L"SymbolicLinkValue");
Status = ZwSetValueKey(KeyHandle, Status = ZwSetValueKey(KeyHandle,
&LinkValue, &LinkValue,
0, 0,
@ -918,15 +915,15 @@ static NTSTATUS
CmiInitControlSetLink (VOID) CmiInitControlSetLink (VOID)
{ {
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING ControlSetKeyName; UNICODE_STRING ControlSetKeyName = RTL_CONSTANT_STRING(
UNICODE_STRING ControlSetLinkName; L"\\Registry\\Machine\\SYSTEM\\ControlSet001");
UNICODE_STRING ControlSetValueName; UNICODE_STRING ControlSetLinkName = RTL_CONSTANT_STRING(
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet");
UNICODE_STRING ControlSetValueName = RTL_CONSTANT_STRING(L"SymbolicLinkValue");
HANDLE KeyHandle; HANDLE KeyHandle;
NTSTATUS Status; NTSTATUS Status;
/* Create 'ControlSet001' key */ /* Create 'ControlSet001' key */
ControlSetKeyName = RTL_CONSTANT_STRING(
L"\\Registry\\Machine\\SYSTEM\\ControlSet001");
InitializeObjectAttributes (&ObjectAttributes, InitializeObjectAttributes (&ObjectAttributes,
&ControlSetKeyName, &ControlSetKeyName,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
@ -947,8 +944,6 @@ CmiInitControlSetLink (VOID)
ZwClose (KeyHandle); ZwClose (KeyHandle);
/* Link 'CurrentControlSet' to 'ControlSet001' key */ /* Link 'CurrentControlSet' to 'ControlSet001' key */
ControlSetLinkName = RTL_CONSTANT_STRING(
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet");
InitializeObjectAttributes (&ObjectAttributes, InitializeObjectAttributes (&ObjectAttributes,
&ControlSetLinkName, &ControlSetLinkName,
OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_OPENLINK, OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_OPENLINK,
@ -967,8 +962,6 @@ CmiInitControlSetLink (VOID)
return Status; return Status;
} }
ControlSetValueName = RTL_CONSTANT_STRING(
L"SymbolicLinkValue");
Status = ZwSetValueKey (KeyHandle, Status = ZwSetValueKey (KeyHandle,
&ControlSetValueName, &ControlSetValueName,
0, 0,
@ -991,8 +984,8 @@ CmiInitHives(BOOLEAN SetupBoot)
PKEY_VALUE_PARTIAL_INFORMATION ValueInfo; PKEY_VALUE_PARTIAL_INFORMATION ValueInfo;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING FileName; UNICODE_STRING FileName;
UNICODE_STRING KeyName; UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\HARDWARE");
UNICODE_STRING ValueName; UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"InstallPath");
HANDLE KeyHandle; HANDLE KeyHandle;
NTSTATUS Status; NTSTATUS Status;
@ -1008,8 +1001,6 @@ CmiInitHives(BOOLEAN SetupBoot)
if (SetupBoot == TRUE) if (SetupBoot == TRUE)
{ {
KeyName = RTL_CONSTANT_STRING(
L"\\Registry\\Machine\\HARDWARE");
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&KeyName, &KeyName,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
@ -1024,9 +1015,6 @@ CmiInitHives(BOOLEAN SetupBoot)
return(Status); return(Status);
} }
ValueName = RTL_CONSTANT_STRING(
L"InstallPath");
BufferSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + 4096; BufferSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + 4096;
ValueInfo = ExAllocatePool(PagedPool, ValueInfo = ExAllocatePool(PagedPool,
BufferSize); BufferSize);

View file

@ -40,7 +40,7 @@ ExpInitializeCallbacks(VOID)
{ {
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status; NTSTATUS Status;
UNICODE_STRING DirName; UNICODE_STRING DirName = RTL_CONSTANT_STRING(L"\\Callback");
UNICODE_STRING CallbackName; UNICODE_STRING CallbackName;
UNICODE_STRING Name; UNICODE_STRING Name;
OBJECT_TYPE_INITIALIZER ObjectTypeInitializer; OBJECT_TYPE_INITIALIZER ObjectTypeInitializer;
@ -65,7 +65,6 @@ ExpInitializeCallbacks(VOID)
} }
/* Initialize the Object */ /* Initialize the Object */
DirName = RTL_CONSTANT_STRING(L"\\Callback" );
InitializeObjectAttributes( InitializeObjectAttributes(
&ObjectAttributes, &ObjectAttributes,
&DirName, &DirName,