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.

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