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.

149 lines
4.1 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Copyright (c) 1997-1999 VERITAS Software Corporation
  4. Module Name:
  5. dmrecovr.h
  6. Abstract:
  7. This header file defines the Logical Disk Manager interface
  8. for NT disaster recovery save and restore operations.
  9. Author:
  10. Revision History:
  11. --*/
  12. #ifndef _DMRECOVR_H_
  13. #define _DMRECOVR_H_
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. //
  21. // GetLdmConfiguration():
  22. //
  23. // This function returns a MULTI_SZ string containing a set of
  24. // nul-byte-terminated substrings. These strings should be saved
  25. // by the NT Disaster Recovery mechanism and can be supplied,
  26. // in the exact same order, to RestoreLdmConfiguration() in order
  27. // to restore the LDM configuration back to the saved state.
  28. //
  29. // The size of the string will be returned in configurationSize.
  30. // A pointer to the MULTI_SZ string will be stored in
  31. // mszConfiguration.
  32. //
  33. HRESULT
  34. APIENTRY
  35. GetLdmConfiguration (
  36. OUT PULONG configurationSize,
  37. OUT PWCHAR *mszConfiguration
  38. );
  39. //
  40. // FreeLdmConfiguration():
  41. //
  42. // This function frees the memory associated with the configuration
  43. // that was returned by GetLdmConfiguration. Use of this function
  44. // ensures that a compatible memory free function is used for the
  45. // string memory that was allocated by GetLdmConfiguration().
  46. //
  47. VOID
  48. APIENTRY
  49. FreeLdmConfiguration (
  50. IN PWCHAR mszConfiguration
  51. );
  52. //
  53. // RestoreLdmConfiguration():
  54. //
  55. // This function restores the LDM configuration to the state given
  56. // by the input MULTI_SZ string, which must be the same string
  57. // contents that were returned previously by a call to
  58. // GetLdmConfiguration().
  59. //
  60. // This function requires an environment that allows use of
  61. // standard Windows/NT dialog boxes.
  62. //
  63. HRESULT
  64. APIENTRY
  65. RestoreLdmConfiguration (
  66. IN PWCHAR mszConfiguration
  67. );
  68. //
  69. // GetLdmDrVolumeConfiguration():
  70. //
  71. // This function returns an array of structures that provide
  72. // information on how the NT Disaster Recovery mechanism should
  73. // handle each volume in the LDM configuration that was restored
  74. // by RestoreLdmConfiguration().
  75. //
  76. // Each volume has the following associated state:
  77. //
  78. // wszVolumeDevice - the NT device pathname for the volume.
  79. // wszMountPath - a saved NT mount name associated with the volume.
  80. // A drive letter is of the form "<letter>:".
  81. // VolumeStatus - an enumeration of possible volume conditions.
  82. // Possible conditions are:
  83. //
  84. // Formatted - the volume contents appear to be okay.
  85. // The volume should probably be chkdsk'd.
  86. // Unformatted - the volume does not appear to have
  87. // valid contents. It should be formatted
  88. // by the NT Disaster Recovery mechanism.
  89. // Unusable - the volume cannot be restored to a
  90. // usable condition. File restore to this
  91. // volume will not be possible.
  92. //
  93. typedef struct LdmDrVolumeInformation {
  94. PWCHAR wszVolumeDevice; // NT device object path to volume
  95. PWCHAR wszMountPath; // drive letter or mount point
  96. enum LdmDrVolumeStatus { // resulting volume status:
  97. LdmDrVolumeFormatted, // volume contents should be valid
  98. LdmDrVolumeUnformatted, // volume needs to be formatted
  99. LdmDrVolumeUnusable // volume device not usable
  100. } volumeStatus;
  101. } LDM_DR_VOLUME_INFORMATION, *PLDM_DR_VOLUME_INFORMATION;
  102. HRESULT
  103. APIENTRY
  104. GetLdmDrVolumeInformation (
  105. OUT PULONG volumeCount,
  106. OUT PLDM_DR_VOLUME_INFORMATION *volumes
  107. );
  108. //
  109. // FreeLdmDrVolumeInformation():
  110. //
  111. // This function frees the array of LdmDrVolumeInformation structures
  112. // that was returned by an earlier call to GetLdmDrVolumeInformation().
  113. //
  114. VOID
  115. APIENTRY
  116. FreeLdmDrVolumeInformation (
  117. IN ULONG volumeCount,
  118. IN PLDM_DR_VOLUME_INFORMATION volumes
  119. );
  120. #ifdef __cplusplus
  121. }
  122. #endif
  123. #endif // _DMRECOVR_H_