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

init.c

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1990, 1991 Microsoft Corporation 00004 00005 00006 Module Name: 00007 00008 init.c 00009 00010 Abstract: 00011 00012 This module is responsible to build any mips specific entries in 00013 the hardware tree of registry which the arc environment doesn't 00014 normally provide for. 00015 00016 Author: 00017 00018 Ken Reneris (kenr) 04-Aug-1992 00019 00020 00021 Environment: 00022 00023 Kernel mode. 00024 00025 Revision History: 00026 00027 Nigel Haslock 10-Oct-1995 00028 Set up firmware version and possibly date in the registry. 00029 00030 --*/ 00031 00032 #include "cmp.h" 00033 00034 #define TITLE_INDEX_VALUE 0 00035 00036 NTSTATUS 00037 CmpInitializeMachineDependentConfiguration( 00038 IN PLOADER_PARAMETER_BLOCK LoaderBlock 00039 ) 00040 /*++ 00041 00042 Routine Description: 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 // If the firmware build number is included in the loader block, 00099 // then store it in the registry. 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 }

Generated on Sat May 15 19:40:21 2004 for test by doxygen 1.3.7