Fix MSVC build

svn path=/trunk/; revision=55384
This commit is contained in:
Timo Kreuzer 2012-02-02 20:50:22 +00:00
parent 46ba8b17cc
commit 4895b9388e

View file

@ -447,8 +447,8 @@ SmpInitializeKnownDllPath(IN PUNICODE_STRING DllPath,
if (DllPath->Buffer) if (DllPath->Buffer)
{ {
/* Fill out the rest of the string */ /* Fill out the rest of the string */
DllPath->MaximumLength = Length; DllPath->MaximumLength = (USHORT)Length;
DllPath->Length = Length - sizeof(UNICODE_NULL); DllPath->Length = (USHORT)Length - sizeof(UNICODE_NULL);
/* Copy the actual path and return success */ /* Copy the actual path and return success */
RtlCopyMemory(DllPath->Buffer, Buffer, Length); RtlCopyMemory(DllPath->Buffer, Buffer, Length);
@ -1261,7 +1261,7 @@ SmpInitializeKnownDllsInternal(IN PUNICODE_STRING Directory,
ULONG_PTR ErrorParameters[3]; ULONG_PTR ErrorParameters[3];
UNICODE_STRING ErrorResponse; UNICODE_STRING ErrorResponse;
IO_STATUS_BLOCK IoStatusBlock; IO_STATUS_BLOCK IoStatusBlock;
ULONG OldFlag = 0; SECURITY_DESCRIPTOR_CONTROL OldFlag = 0;
USHORT ImageCharacteristics; USHORT ImageCharacteristics;
/* Initialize to NULL */ /* Initialize to NULL */
@ -1546,7 +1546,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
/* We'll be writing all these environment variables over here */ /* We'll be writing all these environment variables over here */
RtlInitUnicodeString(&DestinationString, RtlInitUnicodeString(&DestinationString,
L"\\Registry\\Machine\\System\\CurrentControlSet\\" L"\\Registry\\Machine\\System\\CurrentControlSet\\"
"Control\\Session Manager\\Environment"); L"Control\\Session Manager\\Environment");
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&DestinationString, &DestinationString,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
@ -1636,7 +1636,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
/* Now open the hardware CPU key */ /* Now open the hardware CPU key */
RtlInitUnicodeString(&DestinationString, RtlInitUnicodeString(&DestinationString,
L"\\Registry\\Machine\\Hardware\\Description\\System\\" L"\\Registry\\Machine\\Hardware\\Description\\System\\"
"CentralProcessor\\0"); L"CentralProcessor\\0");
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&DestinationString, &DestinationString,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
@ -1764,7 +1764,7 @@ SmpCreateDynamicEnvironmentVariables(VOID)
/* Now we need to write the safeboot option key in a different format */ /* Now we need to write the safeboot option key in a different format */
RtlInitUnicodeString(&DestinationString, RtlInitUnicodeString(&DestinationString,
L"\\Registry\\Machine\\System\\CurrentControlSet\\" L"\\Registry\\Machine\\System\\CurrentControlSet\\"
"Control\\Safeboot\\Option"); L"Control\\Safeboot\\Option");
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&DestinationString, &DestinationString,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
@ -1879,7 +1879,7 @@ SmpLoadDataFromRegistry(OUT PUNICODE_STRING InitialCommand)
/* Check if we were booted in PE mode (LiveCD should have this) */ /* Check if we were booted in PE mode (LiveCD should have this) */
RtlInitUnicodeString(&DestinationString, RtlInitUnicodeString(&DestinationString,
L"\\Registry\\Machine\\System\\CurrentControlSet\\" L"\\Registry\\Machine\\System\\CurrentControlSet\\"
"Control\\MiniNT"); L"Control\\MiniNT");
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&DestinationString, &DestinationString,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,
@ -1899,7 +1899,7 @@ SmpLoadDataFromRegistry(OUT PUNICODE_STRING InitialCommand)
/* Open the environment key to see if we are booted in safe mode */ /* Open the environment key to see if we are booted in safe mode */
RtlInitUnicodeString(&DestinationString, RtlInitUnicodeString(&DestinationString,
L"\\Registry\\Machine\\System\\CurrentControlSet\\" L"\\Registry\\Machine\\System\\CurrentControlSet\\"
"Control\\Session Manager\\Environment"); L"Control\\Session Manager\\Environment");
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&DestinationString, &DestinationString,
OBJ_CASE_INSENSITIVE, OBJ_CASE_INSENSITIVE,