00042 :
00043
00044 This routine creates alpha specific entries in
the registry.
00045
00046 Arguments:
00047
00048 LoaderBlock - supplies a pointer to
the LoaderBlock passed in from
the
00049 OS Loader.
00050
00051 Returns:
00052
00053
NTSTATUS code
for sucess or
reason of
failure.
00054
00055 --*/
00056
00057 {
00058
00059
NTSTATUS Status;
00060 UNICODE_STRING
KeyName;
00061 UNICODE_STRING
ValueName;
00062 UNICODE_STRING ValueData;
00063 ANSI_STRING AnsiString;
00064 OBJECT_ATTRIBUTES
ObjectAttributes;
00065 HANDLE ParentHandle;
00066
00067 InitializeObjectAttributes(&ObjectAttributes,
00068 &CmRegistryMachineHardwareDescriptionSystemName,
00069 OBJ_CASE_INSENSITIVE,
00070 NULL,
00071 NULL);
00072
00073
Status =
NtOpenKey(&ParentHandle,
00074 KEY_READ,
00075 &ObjectAttributes);
00076
00077
if (
NT_SUCCESS(Status)) {
00078
RtlInitUnicodeString(&ValueName,
00079 L
"SystemBiosVersion");
00080
00081
RtlInitAnsiString(&AnsiString,
00082 &LoaderBlock->u.Alpha.FirmwareVersion[0]);
00083
00084
RtlAnsiStringToUnicodeString(&ValueData,
00085 &AnsiString,
00086 TRUE);
00087
00088
Status =
NtSetValueKey(ParentHandle,
00089 &ValueName,
00090 TITLE_INDEX_VALUE,
00091 REG_SZ,
00092 ValueData.Buffer,
00093 ValueData.Length +
sizeof(UNICODE_NULL));
00094
00095
RtlFreeUnicodeString(&ValueData);
00096
00097
00098
00099
00100
00101
00102
if (LoaderBlock->u.Alpha.FirmwareBuildTimeStamp[0] != 0 ) {
00103
RtlInitUnicodeString(&ValueName,
00104 L
"SystemBiosDate");
00105
00106
RtlInitAnsiString(&AnsiString,
00107 &LoaderBlock->u.Alpha.FirmwareBuildTimeStamp[0]);
00108
00109
RtlAnsiStringToUnicodeString(&ValueData,
00110 &AnsiString,
00111 TRUE);
00112
00113
Status =
NtSetValueKey(ParentHandle,
00114 &ValueName,
00115 TITLE_INDEX_VALUE,
00116 REG_SZ,
00117 ValueData.Buffer,
00118 ValueData.Length +
sizeof(UNICODE_NULL));
00119
00120
RtlFreeUnicodeString(&ValueData);
00121 }
00122 }
00123
00124
return STATUS_SUCCESS;
00125 }
}