Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

209 lines
7.4 KiB

  1. /*++
  2. Copyright (c) 1990, 1991 Microsoft Corporation
  3. Module Name:
  4. cmdatini.c
  5. Abstract:
  6. contains code to init static STRING structures for registry name space.
  7. Author:
  8. Andre Vachon (andreva) 08-Apr-1992
  9. Environment:
  10. Kernel mode.
  11. Revision History:
  12. --*/
  13. #include "cmp.h"
  14. #ifdef ALLOC_PRAGMA
  15. #pragma alloc_text(INIT,CmpInitializeRegistryNames)
  16. #endif
  17. extern UNICODE_STRING CmRegistryRootName;
  18. extern UNICODE_STRING CmRegistryMachineName;
  19. extern UNICODE_STRING CmRegistryMachineHardwareName;
  20. extern UNICODE_STRING CmRegistryMachineHardwareDescriptionName;
  21. extern UNICODE_STRING CmRegistryMachineHardwareDescriptionSystemName;
  22. extern UNICODE_STRING CmRegistryMachineHardwareDeviceMapName;
  23. extern UNICODE_STRING CmRegistryMachineHardwareResourceMapName;
  24. extern UNICODE_STRING CmRegistryMachineHardwareOwnerMapName;
  25. extern UNICODE_STRING CmRegistryMachineSystemName;
  26. extern UNICODE_STRING CmRegistryMachineSystemCurrentControlSet;
  27. extern UNICODE_STRING CmRegistryUserName;
  28. extern UNICODE_STRING CmRegistrySystemCloneName;
  29. extern UNICODE_STRING CmpSystemFileName;
  30. extern UNICODE_STRING CmRegistryMachineSystemCurrentControlSetEnumName;
  31. extern UNICODE_STRING CmRegistryMachineSystemCurrentControlSetEnumRootName;
  32. extern UNICODE_STRING CmRegistryMachineSystemCurrentControlSetServices;
  33. extern UNICODE_STRING CmRegistryMachineSystemCurrentControlSetHardwareProfilesCurrent;
  34. extern UNICODE_STRING CmRegistryMachineSystemCurrentControlSetControlClass;
  35. extern UNICODE_STRING CmSymbolicLinkValueName;
  36. #ifdef _WANT_MACHINE_IDENTIFICATION
  37. extern UNICODE_STRING CmRegistryMachineSystemCurrentControlSetControlBiosInfo;
  38. #endif
  39. extern const PWCHAR CmpRegistryRootString;
  40. extern const PWCHAR CmpRegistryMachineString;
  41. extern const PWCHAR CmpRegistryMachineHardwareString;
  42. extern const PWCHAR CmpRegistryMachineHardwareDescriptionString;
  43. extern const PWCHAR CmpRegistryMachineHardwareDescriptionSystemString;
  44. extern const PWCHAR CmpRegistryMachineHardwareDeviceMapString;
  45. extern const PWCHAR CmpRegistryMachineHardwareResourceMapString;
  46. extern const PWCHAR CmpRegistryMachineHardwareOwnerMapString;
  47. extern const PWCHAR CmpRegistryMachineSystemString;
  48. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetString;
  49. extern const PWCHAR CmpRegistryUserString;
  50. extern const PWCHAR CmpRegistrySystemCloneString;
  51. extern const PWCHAR CmpRegistrySystemFileNameString;
  52. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetEnumString;
  53. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetEnumRootString;
  54. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetServicesString;
  55. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetHardwareProfilesCurrentString;
  56. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetControlClassString;
  57. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetControlSafeBootString;
  58. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetControlSessionManagerMemoryManagementString;
  59. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetControlBootLogString;
  60. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetServicesEventLogString;
  61. extern const PWCHAR CmpSymbolicLinkValueName;
  62. #ifdef _WANT_MACHINE_IDENTIFICATION
  63. extern const PWCHAR CmpRegistryMachineSystemCurrentControlSetControlBiosInfoString;
  64. #endif
  65. VOID
  66. CmpInitializeRegistryNames(
  67. VOID
  68. )
  69. /*++
  70. Routine Description:
  71. This routine creates all the Unicode strings for the various names used
  72. in and by the registry
  73. Arguments:
  74. None.
  75. Returns:
  76. None.
  77. --*/
  78. {
  79. ULONG i;
  80. RtlInitUnicodeString( &CmRegistryRootName,
  81. CmpRegistryRootString );
  82. RtlInitUnicodeString( &CmRegistryMachineName,
  83. CmpRegistryMachineString );
  84. RtlInitUnicodeString( &CmRegistryMachineHardwareName,
  85. CmpRegistryMachineHardwareString );
  86. RtlInitUnicodeString( &CmRegistryMachineHardwareDescriptionName,
  87. CmpRegistryMachineHardwareDescriptionString );
  88. RtlInitUnicodeString( &CmRegistryMachineHardwareDescriptionSystemName,
  89. CmpRegistryMachineHardwareDescriptionSystemString );
  90. RtlInitUnicodeString( &CmRegistryMachineHardwareDeviceMapName,
  91. CmpRegistryMachineHardwareDeviceMapString );
  92. RtlInitUnicodeString( &CmRegistryMachineHardwareResourceMapName,
  93. CmpRegistryMachineHardwareResourceMapString );
  94. RtlInitUnicodeString( &CmRegistryMachineHardwareOwnerMapName,
  95. CmpRegistryMachineHardwareOwnerMapString );
  96. RtlInitUnicodeString( &CmRegistryMachineSystemName,
  97. CmpRegistryMachineSystemString );
  98. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSet,
  99. CmpRegistryMachineSystemCurrentControlSetString);
  100. RtlInitUnicodeString( &CmRegistryUserName,
  101. CmpRegistryUserString );
  102. RtlInitUnicodeString( &CmRegistrySystemCloneName,
  103. CmpRegistrySystemCloneString );
  104. RtlInitUnicodeString( &CmpSystemFileName,
  105. CmpRegistrySystemFileNameString );
  106. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetEnumName,
  107. CmpRegistryMachineSystemCurrentControlSetEnumString);
  108. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetEnumRootName,
  109. CmpRegistryMachineSystemCurrentControlSetEnumRootString);
  110. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetServices,
  111. CmpRegistryMachineSystemCurrentControlSetServicesString);
  112. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetHardwareProfilesCurrent,
  113. CmpRegistryMachineSystemCurrentControlSetHardwareProfilesCurrentString);
  114. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetControlClass,
  115. CmpRegistryMachineSystemCurrentControlSetControlClassString);
  116. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetControlSafeBoot,
  117. CmpRegistryMachineSystemCurrentControlSetControlSafeBootString);
  118. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetControlSessionManagerMemoryManagement,
  119. CmpRegistryMachineSystemCurrentControlSetControlSessionManagerMemoryManagementString);
  120. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetControlBootLog,
  121. CmpRegistryMachineSystemCurrentControlSetControlBootLogString);
  122. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetServicesEventLog,
  123. CmpRegistryMachineSystemCurrentControlSetServicesEventLogString);
  124. RtlInitUnicodeString( &CmSymbolicLinkValueName,
  125. CmpSymbolicLinkValueName);
  126. #ifdef _WANT_MACHINE_IDENTIFICATION
  127. RtlInitUnicodeString( &CmRegistryMachineSystemCurrentControlSetControlBiosInfo,
  128. CmpRegistryMachineSystemCurrentControlSetControlBiosInfoString);
  129. #endif
  130. //
  131. // Initialize the type names for the hardware tree.
  132. //
  133. for (i = 0; i <= MaximumType; i++) {
  134. RtlInitUnicodeString( &(CmTypeName[i]),
  135. CmTypeString[i] );
  136. }
  137. //
  138. // Initialize the class names for the hardware tree.
  139. //
  140. for (i = 0; i <= MaximumClass; i++) {
  141. RtlInitUnicodeString( &(CmClassName[i]),
  142. CmClassString[i] );
  143. }
  144. return;
  145. }