Leaked source code of windows server 2003
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.

108 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. Spupgcfg.h
  5. Abstract:
  6. Configuration routines for the upgrade case
  7. Author:
  8. Sunil Pai (sunilp) 18-Nov-1993
  9. Revision History:
  10. --*/
  11. #pragma once
  12. //
  13. // data types
  14. //
  15. typedef struct {
  16. PWSTR SectionName;
  17. DWORD SectionFlags;
  18. DWORD VerLow;
  19. DWORD VerHigh;
  20. } RootDevnodeSectionNamesType;
  21. #define RootDevnodeSectionNamesType_NTUPG (0x0001)
  22. #define RootDevnodeSectionNamesType_W9xUPG (0x0002)
  23. #define RootDevnodeSectionNamesType_CLEAN (0x0004)
  24. #define RootDevnodeSectionNamesType_ALL (0x0007)
  25. //
  26. // Public routines
  27. //
  28. NTSTATUS
  29. SpUpgradeNTRegistry(
  30. IN PVOID SifHandle,
  31. IN HANDLE *HiveRootKeys,
  32. IN LPCWSTR SetupSourceDevicePath,
  33. IN LPCWSTR DirectoryOnSourceDevice,
  34. IN HANDLE hKeyCCSet
  35. );
  36. BOOLEAN
  37. SpHivesFromInfs(
  38. IN PVOID SifHandle,
  39. IN LPCWSTR SectionName,
  40. IN LPCWSTR SourcePath1,
  41. IN LPCWSTR SourcePath2, OPTIONAL
  42. IN HANDLE SystemHiveRoot,
  43. IN HANDLE SoftwareHiveRoot,
  44. IN HANDLE DefaultUserHiveRoot,
  45. IN HANDLE HKR
  46. );
  47. VOID
  48. SpDeleteRootDevnodeKeys(
  49. IN PVOID SifHandle,
  50. IN HANDLE hKeyCCSet,
  51. IN PWSTR DevicesToDelete,
  52. IN RootDevnodeSectionNamesType *DeviceClassesToDelete
  53. );
  54. //
  55. // Private routines
  56. //
  57. NTSTATUS
  58. SppDeleteKeyRecursive(
  59. HANDLE hKeyRoot,
  60. PWSTR Key,
  61. BOOLEAN ThisKeyToo
  62. );
  63. NTSTATUS
  64. SppCopyKeyRecursive(
  65. HANDLE hKeyRootSrc,
  66. HANDLE hKeyRootDst,
  67. PWSTR SrcKeyPath,
  68. PWSTR DstKeyPath,
  69. BOOLEAN CopyAlways,
  70. BOOLEAN ApplyACLsAlways
  71. );
  72. //
  73. // Callback routine for SpApplyFunctionToDeviceInstanceKeys
  74. //
  75. typedef VOID (*PSPP_INSTANCEKEY_CALLBACK_ROUTINE) (
  76. IN HANDLE SetupInstanceKeyHandle,
  77. IN HANDLE UpgradeInstanceKeyHandle,
  78. IN BOOLEAN RootEnumerated,
  79. IN OUT PVOID Context
  80. );
  81. VOID
  82. SpApplyFunctionToDeviceInstanceKeys(
  83. IN HANDLE hKeyCCSet,
  84. IN PSPP_INSTANCEKEY_CALLBACK_ROUTINE InstanceKeyCallbackRoutine,
  85. IN OUT PVOID Context
  86. );