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.

258 lines
8.0 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. modules.h
  5. Abstract:
  6. Base definitions for the Intermediate State Manager.
  7. Author:
  8. Calin Negreanu (calinn) 15-Nov-1999
  9. Revision History:
  10. <alias> <date> <comments>
  11. --*/
  12. #pragma once
  13. //
  14. // Includes
  15. //
  16. #include "ism.h"
  17. //
  18. // Strings
  19. //
  20. // None
  21. //
  22. // Constants
  23. //
  24. // messages from 0x0001 to 0x000F are reserved by the engine
  25. #define TRANSPORTMESSAGE_IMAGE_EXISTS 0x0010
  26. #define TRANSPORTMESSAGE_IMAGE_LOCKED 0x0011
  27. #define TRANSPORTMESSAGE_SIZE_SAVED 0x0012
  28. #define TRANSPORTMESSAGE_RMEDIA_SAVE 0x0013
  29. #define TRANSPORTMESSAGE_RMEDIA_LOAD 0x0014
  30. #define TRANSPORTMESSAGE_MULTIPLE_DESTS 0x0015 // return TRUE if multiple dests are resolved
  31. #define TRANSPORTMESSAGE_READY_TO_CONNECT 0x0016
  32. #define TRANSPORTMESSAGE_SRC_COPY_ERROR 0x0017
  33. #define TRANSPORTMESSAGE_OLD_STORAGE 0x0018
  34. #define TRANSPORTMESSAGE_NET_DISPLAY_PASSWORD 0x0019
  35. #define TRANSPORTMESSAGE_NET_GATHER_PASSWORD 0x001A
  36. #define MODULEMESSAGE_DISPLAYERROR 0x001B
  37. #define MODULEMESSAGE_DISPLAYWARNING 0x001C
  38. #define MODULEMESSAGE_ASKQUESTION 0x001D
  39. #define APPRESPONSE_NONE 0
  40. #define APPRESPONSE_SUCCESS 1
  41. #define APPRESPONSE_FAIL 2
  42. #define APPRESPONSE_IGNORE 3
  43. //
  44. // Known attributes
  45. //
  46. #define S_ATTRIBUTE_FIXEDPATH TEXT("FixedPath")
  47. #define S_OBJECTTYPE_FILE TEXT("File")
  48. #define S_OBJECTTYPE_REGISTRY TEXT("Registry")
  49. #define S_ATTRIBUTE_V1 TEXT("v1")
  50. #define S_ATTRIBUTE_OSFILE TEXT("OSFILE")
  51. #define S_ATTRIBUTE_COPYIFRELEVANT TEXT("CopyIfRelevant")
  52. #define S_ATTRIBUTE_PARTITIONLOCK TEXT("PartitionLock")
  53. //
  54. // Known properties
  55. //
  56. #define S_PROPERTY_FILEMOVE TEXT("Move.FileMove")
  57. #define S_PROPERTY_FILEMOVE_HINT TEXT("Move.FileMove.Hint")
  58. //
  59. // known operations
  60. //
  61. #define S_OPERATION_MOVE TEXT("Move.General")
  62. #define S_OPERATION_ENHANCED_MOVE TEXT("Move.Ex")
  63. #define S_OPERATION_V1_FILEMOVEEX TEXT("Move.V1FileMoveEx")
  64. #define S_OPERATION_V1_FILEMOVE TEXT("Move.V1FileMove")
  65. #define S_OPERATION_ENHANCED_FILEMOVE TEXT("Move.FileMoveEx")
  66. #define S_OPERATION_PARTITION_MOVE TEXT("Move.Partition")
  67. #define S_OPERATION_DELETE TEXT("Delete")
  68. #define S_OPERATION_LNKMIG_FIXCONTENT TEXT("Content.LnkMigFixContent")
  69. #define S_OPERATION_DEFICON_FIXCONTENT TEXT("Content.DefaultIcon")
  70. #define S_OPERATION_DRIVEMAP_FIXCONTENT TEXT("Content.MappedDrive")
  71. #define S_OPERATION_DESTADDOBJ TEXT("Content.DestAddObject")
  72. #define S_OPERATION_REG_AUTO_FILTER TEXT("Content.RegAutoFilter")
  73. //
  74. // known environment groups
  75. //
  76. #define S_SYSENVVAR_GROUP TEXT("SysEnvVar")
  77. //
  78. // v1 functionality attributes and environment variables
  79. //
  80. #define S_GLOBAL_INF_HANDLE TEXT("GlobalInfHandle")
  81. #define S_ENV_HKCU_V1 TEXT("HKCU_V1")
  82. #define S_ENV_HKCU_ON TEXT("HKCU_ON")
  83. #define S_ENV_HKLM_ON TEXT("HKLM_ON")
  84. #define S_ENV_ALL_FILES TEXT("FILES_ON")
  85. #define S_INF_FILE_MULTISZ TEXT("INF_FILES")
  86. #define S_ENV_CREATE_USER TEXT("CreateUser")
  87. #define S_ENV_ICONLIB TEXT("IconLib")
  88. #define S_ENV_SAVE_ICONLIB TEXT("SaveIconLib")
  89. #define S_ENV_DEST_DELREG TEXT("DelDestReg")
  90. #define S_ENV_DEST_DELREGEX TEXT("DelDestRegEx")
  91. #define S_ENV_DEST_RESTORE TEXT("RestoreCallback")
  92. #define S_ENV_SCRIPT_EXECUTE TEXT("ScriptExecute")
  93. #define S_ENV_DEST_ADDOBJECT TEXT("DestAddObject")
  94. #define S_ENV_DEST_CHECKDETECT TEXT("DestCheckDetect")
  95. //
  96. // module-to-app environment variables
  97. //
  98. #define S_REQUIRE_DOMAIN_USER TEXT("RequireDomainUser")
  99. // component groups
  100. #define COMPONENT_NAME 5
  101. #define COMPONENT_SUBCOMPONENT 4
  102. #define COMPONENT_EXTENSION 3
  103. #define COMPONENT_FILE 2
  104. #define COMPONENT_FOLDER 1
  105. //
  106. // strings shared between apps
  107. //
  108. #define S_INF_OBJECT_NAME TEXT("inf")
  109. //
  110. // Macros
  111. //
  112. // None
  113. //
  114. // Types
  115. //
  116. //
  117. // Types for errors to be presented to the user
  118. //
  119. typedef enum {
  120. ERRUSER_ERROR_UNKNOWN = 0, // Unknown error
  121. ERRUSER_ERROR_NOTRANSPORTPATH, // Transport path is not selected. Don't know where to write or where to read from
  122. ERRUSER_ERROR_TRANSPORTPATHBUSY, // Transport path is in use. Cannot save there.
  123. ERRUSER_ERROR_CANTEMPTYDIR, // USMT dir inside transport path could not be erased.
  124. ERRUSER_ERROR_ALREADYEXISTS, // USMT dir inside transport path already exists. Cannot override.
  125. ERRUSER_ERROR_CANTCREATEDIR, // USMT dir inside transport path could not be created.
  126. ERRUSER_ERROR_CANTCREATESTATUS, // USMT status file inside transport path could not be created.
  127. ERRUSER_ERROR_CANTCREATETEMPDIR, // Transport can't create temp dir to prepare for save.
  128. ERRUSER_ERROR_CANTCREATECABFILE, // Transport can't create cabinet file to prepare for save.
  129. ERRUSER_ERROR_CANTSAVEOBJECT, // Transport can't save a particular object
  130. ERRUSER_ERROR_CANTSAVEINTERNALDATA, // Transport can't save it's internal data
  131. ERRUSER_ERROR_CANTWRITETODESTPATH, // Transport can't write to destination path
  132. ERRUSER_ERROR_TRANSPORTINVALIDIMAGE,// Transport image is invalid. Cannot read data.
  133. ERRUSER_ERROR_CANTOPENSTATUS, // USMT status file inside transport path could not be opened.
  134. ERRUSER_ERROR_CANTREADIMAGE, // Transport can't read the saved image. The image may be corrupt.
  135. ERRUSER_ERROR_CANTFINDDESTINATION, // HomeNet transport can't find the destination machine
  136. ERRUSER_ERROR_CANTSENDTODEST, // HomeNet transport can't send to the destination machine
  137. ERRUSER_ERROR_CANTFINDSOURCE, // HomeNet transport can't find the source machine
  138. ERRUSER_ERROR_CANTRECEIVEFROMSOURCE,// HomeNet transport can't receive from the source machine
  139. ERRUSER_ERROR_INVALIDDATARECEIVED, // HomeNet transport received invalid data from the source machine
  140. ERRUSER_ERROR_CANTUNPACKIMAGE, // Transport can't unpack loaded image. This might be a disk space problem.
  141. ERRUSER_ERROR_CANTRESTOREOBJECT, // Failed to restore some object on the destination machine.
  142. ERRUSER_ERROR_DISKSPACE, // The user might not have enough disk space.
  143. ERRUSER_ERROR_NOENCRYPTION, // There is no encryption available. HomeNet won't work.
  144. ERRUSER_WARNING_OUTLOOKRULES, // The user must retouch their Outlook message rules.
  145. ERRUSER_WARNING_OERULES, // The user must retouch their Outlook Express message rules.
  146. } ERRUSER_ERROR, *PERRUSER_ERROR;
  147. typedef enum {
  148. ERRUSER_AREA_UNKNOWN = 0,
  149. ERRUSER_AREA_INIT,
  150. ERRUSER_AREA_GATHER,
  151. ERRUSER_AREA_SAVE,
  152. ERRUSER_AREA_LOAD,
  153. ERRUSER_AREA_RESTORE,
  154. } ERRUSER_AREA, *PERRUSER_AREA;
  155. typedef struct {
  156. ERRUSER_ERROR Error;
  157. ERRUSER_AREA ErrorArea;
  158. MIG_OBJECTTYPEID ObjectTypeId;
  159. MIG_OBJECTSTRINGHANDLE ObjectName;
  160. } ERRUSER_EXTRADATA, *PERRUSER_EXTRADATA;
  161. typedef struct {
  162. PSTR Key;
  163. UINT KeySize;
  164. HANDLE Event;
  165. } PASSWORD_DATA, *PPASSWORD_DATA;
  166. typedef struct {
  167. PCTSTR Question;
  168. UINT MessageStyle;
  169. INT WantedResult;
  170. } QUESTION_DATA, *PQUESTION_DATA;
  171. // These are the subphases for the transport phase. They are
  172. // used to update the app about the transport modules status.
  173. #define SUBPHASE_CONNECTING1 1
  174. #define SUBPHASE_CONNECTING2 2
  175. #define SUBPHASE_NETPREPARING 3
  176. #define SUBPHASE_PREPARING 4
  177. #define SUBPHASE_COMPRESSING 5
  178. #define SUBPHASE_TRANSPORTING 6
  179. #define SUBPHASE_MEDIAWRITING 7
  180. #define SUBPHASE_FINISHING 8
  181. #define SUBPHASE_CABLETRANS 9
  182. #define SUBPHASE_UNCOMPRESSING 10
  183. //
  184. // Globals
  185. //
  186. // None
  187. //
  188. // Macro expansion list
  189. //
  190. // None
  191. //
  192. // Macro expansion definition
  193. //
  194. // None
  195. //
  196. // Public function declarations
  197. //
  198. // None
  199. //
  200. // ANSI/UNICODE macros
  201. //
  202. // None