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.

133 lines
2.5 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. winasr.h
  5. Abstract:
  6. Public header file for Windows Automated System Recovery (ASR)
  7. interfaces and definitions.
  8. --*/
  9. #ifndef _INC_WINASR_H
  10. #define _INC_WINASR_H
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. //
  15. // Automated System Recovery API
  16. //
  17. BOOL
  18. AsrCreateStateFileA(
  19. IN LPCSTR lpFilePath,
  20. IN LPCSTR lpProviderName,
  21. IN CONST BOOL bEnableAutoExtend,
  22. IN LPCSTR mszCriticalVolumes,
  23. OUT DWORD_PTR *lpAsrContext
  24. );
  25. BOOL
  26. AsrCreateStateFileW(
  27. IN PCWSTR lpFilePath,
  28. IN PCWSTR lpProviderName,
  29. IN CONST BOOL bEnableAutoExtend,
  30. IN PCWSTR mszCriticalVolumes,
  31. OUT DWORD_PTR *lpAsrContext
  32. );
  33. #ifdef UNICODE
  34. #define AsrCreateStateFile AsrCreateStateFileW
  35. #else
  36. #define AsrCreateStateFile AsrCreateStateFileA
  37. #endif
  38. BOOL
  39. AsrAddSifEntryA(
  40. IN DWORD_PTR AsrContext,
  41. IN LPCSTR lpSectionName,
  42. IN LPCSTR lpSifEntry
  43. );
  44. BOOL
  45. AsrAddSifEntryW(
  46. IN DWORD_PTR AsrContext,
  47. IN PCWSTR lpSectionName,
  48. IN PCWSTR lpSifEntry
  49. );
  50. #ifdef UNICODE
  51. #define AsrAddSifEntry AsrAddSifEntryW
  52. #else
  53. #define AsrAddSifEntry AsrAddSifEntryA
  54. #endif
  55. BOOL
  56. AsrRestorePlugPlayRegistryData(
  57. IN HKEY SourceSystemKey,
  58. IN HKEY TargetSystemKey,
  59. IN DWORD Flags,
  60. IN PVOID Reserved
  61. );
  62. BOOL
  63. AsrFreeContext(
  64. IN DWORD_PTR *lpAsrContext
  65. );
  66. //
  67. // Pre-defined constants
  68. //
  69. #define ASR_SIF_ENTRY_MAX_CHARS 4096
  70. //
  71. // Recognized section names in the ASR state file.
  72. //
  73. #define ASR_SIF_SECTION_COMMANDS_A "[COMMANDS]"
  74. #define ASR_SIF_SECTION_COMMANDS_W L"[COMMANDS]"
  75. #ifdef UNICODE
  76. #define ASR_SIF_SECTION_COMMANDS ASR_SIF_SECTION_COMMANDS_W
  77. #else
  78. #define ASR_SIF_SECTION_COMMANDS ASR_SIF_SECTION_COMMANDS_A
  79. #endif
  80. #define ASR_SIF_SECTION_INSTALLFILES_A "[INSTALLFILES]"
  81. #define ASR_SIF_SECTION_INSTALLFILES_W L"[INSTALLFILES]"
  82. #ifdef UNICODE
  83. #define ASR_SIF_SECTION_INSTALLFILES ASR_SIF_SECTION_INSTALLFILES_W
  84. #else
  85. #define ASR_SIF_SECTION_INSTALLFILES ASR_SIF_SECTION_INSTALLFILES_A
  86. #endif
  87. //
  88. // Flags for the INSTALLFILES section
  89. //
  90. #define ASR_SIF_INSTALLFILES_MEDIA_PROMPT_ALWAYS 0x00000001
  91. #define ASR_SIF_INSTALLFILES_MEDIA_PROMPT_ON_ERROR 0x00000002
  92. #define ASR_SIF_INSTALLFILES_REQUIRED_FILE 0x00000006
  93. #define ASR_SIF_INSTALLFILES_OVERWRITE_IF_FILE_EXISTS 0x00000010
  94. #define ASR_SIF_INSTALLFILES_PROMPT_IF_FILE_EXISTS 0x00000020
  95. #ifdef __cplusplus
  96. }
  97. #endif // __cplusplus
  98. #endif // _INC_WINASR_H