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.

326 lines
9.1 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. #ifndef _DEF_H_
  3. #define _DEF_H_
  4. #define NO_OF_PAGES 19
  5. #define PG_NDX_WELCOME 0
  6. #define PG_NDX_GETREGMODE 1
  7. #define PG_NDX_CONTACTINFO1 2
  8. #define PG_NDX_CONTACTINFO2 3
  9. #define PG_NDX_CONTINUEREG 4
  10. #define PG_NDX_PROGRESS 5
  11. #define PG_NDX_DLG_PIN 6
  12. #define PG_NDX_CH_REGISTER_SELECT 7
  13. #define PG_NDX_CH_REGISTER_MOLP 8
  14. #define PG_NDX_COUNTRYREGION 9
  15. #define PG_NDX_CH_REGISTER_1 10
  16. #define PG_NDX_RETAILSPK 11
  17. #define PG_NDX_TELREG 12
  18. #define PG_NDX_TELLKP 13
  19. #define PG_NDX_CONFREVOKE 14
  20. #define PG_NDX_TELREG_REISSUE 15
  21. #define PG_NDX_CERTLOG 16
  22. #define PG_NDX_WWWREG 17
  23. #define PG_NDX_WWWLKP 18
  24. // #define PG_NDX_FAX_REG_AGREEMENT 16
  25. // #define PG_NDX_FAX_CONTACTINFO 17
  26. // #define PG_NDX_FAX_CUSTINFO_a 18
  27. // #define PG_NDX_FAX_CUSTINFO_b 19
  28. // #define PG_NDX_PROGRESS_FAX 20
  29. // #define PG_NDX_FAX_LKP_AGREEMENT 21
  30. // #define PG_NDX_FAX_SELECT 22
  31. // #define PG_NDX_FAX_MOLP 23
  32. // #define PG_NDX_FAX_RETAIL 24
  33. // #define PG_NDX_COUNTRYREGION_FAX 26
  34. //
  35. // Dlgs for LS Properties
  36. //
  37. #define PG_NDX_PROP_MODE 0
  38. #define PG_NDX_PROP_PROGRAM 1
  39. #define PG_NDX_PROP_CUSTINFO_a 2
  40. #define PG_NDX_PROP_CUSTINFO_b 3
  41. #define NO_OF_PROP_PAGES 4
  42. // Various Request Types
  43. #define REQUEST_NULL 0
  44. #define REQUEST_CH_PING 1
  45. #define REQUEST_CA_CERTREQUEST 2
  46. #define REQUEST_CA_CERTDOWNLOAD 3
  47. #define REQUEST_CA_CERTSIGNONLY 4
  48. #define REQUEST_CA_REVOKECERT 5
  49. #define REQUEST_CA_UPGRADECERT 6
  50. #define REQUEST_CA_REISSUECERT 7
  51. #define REQUEST_CH_AUTHENTICATE 8
  52. #define REQUEST_CH_LKPREQUEST 9
  53. #define REQUEST_CH_LKPACK 10
  54. #define REQUEST_CH_RETURNLKP 11
  55. #define REQUEST_CH_REISSUELKP 12
  56. //
  57. //LS Registration Modes
  58. //
  59. // Note : LRMODE_CA_ONLINE_REQUEST & LRMODE_REG_REQUEST are both Registration Request
  60. // Online is for Internet and Reg_request is for Telephone/WWW
  61. #define LRMODE_CH_REQUEST 1
  62. #define LRMODE_CA_ONLINE_REQUEST 2
  63. #define LRMODE_CA_ONLINE_DOWNLOAD 3
  64. #define LRMODE_CH_REISSUE_LASTREQUEST 4
  65. #define LRMODE_CA_REVOKECERT 5
  66. #define LRMODE_CA_REISSUECERT 6
  67. #define LRMODE_REG_REQUEST 7
  68. //
  69. // Fax Request Types
  70. //
  71. #define FAX_REQUEST_BOTH 0
  72. #define FAX_REQUEST_REG_ONLY 1
  73. #define FAX_REQUEST_LKP_ONLY 2
  74. #define LR_REGISTRATIONID_LEN 35
  75. #define LR_LICENSESERVERID_LEN 23
  76. #define LR_RETAILSPK_LEN 25
  77. #define LR_CONFIRMATION_LEN 7
  78. #define MAX_RETAILSPKS_IN_BATCH 10
  79. #define BASE24_CHARACTERS _TEXT("BCDFGHJKMPQRTVWXY2346789")
  80. //
  81. //LRWiz States. CR - Certificate Request & LR - LKP Request/LKP Response
  82. // 1 is used to determine whether to display PIN dlg in Online Mode
  83. // 2 & 3 are used to determine which files to expect on the disk in Install from Disk mode
  84. // LRSTATE_NEUTRAL means , end to end cycle is completed
  85. // Like , Online CR created - Cert Downloaded & installed etc.
  86. //
  87. #define LRSTATE_NEUTRAL 0
  88. #define LRSTATE_ONLINE_CR_CREATED 1
  89. #define LRSTATE_FAX_ONE_REQUEST_CREATED 2
  90. #define LRSTATE_FAX_BOTH_REQUEST_CREATED 3
  91. //REG_KEYS
  92. #define REG_LRWIZ_PARAMS L"SOFTWARE\\MICROSOFT\\TermServLicensing\\LrWiz\\Params"
  93. #define REG_LRWIZ_CSNUMBERS L"SOFTWARE\\MICROSOFT\\TermServLicensing\\LrWiz\\CSNumbers"
  94. #define REG_LRWIZ_CSFAX L"SOFTWARE\\MICROSOFT\\TermServLicensing\\LrWiz\\FaxNumbers"
  95. #define REG_LRWIZ_CSFAXREGION "CSRFaxRegion"
  96. #define REG_LRWIZ_CSPHONEREGION "CSRPhoneRegion"
  97. #define REG_LRWIZ_STATE L"State"
  98. #define REG_ROOT_CERT L"Param0"
  99. #define REG_EXCHG_CERT L"Param1"
  100. #define REG_SIGN_CERT L"Param2"
  101. #define REG_RA_URL L"RA_URL"
  102. #define REG_CH_SERVER L"CH_SERVER"
  103. #define REG_CH_EXTENSION L"CH_EXTENSION"
  104. #define REG_LR_COUNT L"LKPRC"
  105. #define REG_WWW_SITE L"WWW"
  106. //General
  107. #define LR_MAX_MSG_TEXT 1024
  108. #define LR_MAX_MSG_CAPTION 64
  109. #define LR_FIELD_DELIMITER "~"
  110. #define LS_SERVICE_NAME L"TermServLicensing"
  111. #define LS_CRYPT_KEY_CONTAINER L"tmpHydraLSKeyContainer"
  112. #define szOID_NULL_EXT "1.3.6.1.4.1.311.18"
  113. //#define szOID_NULL_EXT "1.3.6.1.5.5.7.1.1"
  114. #define MAX_NUM_EXTENSION 4
  115. //Certificate Types
  116. #define CA_CERT_TYPE_SELECT "SELECT"
  117. #define CA_CERT_TYPE_OTHER "BASIC"
  118. //Program names
  119. #define PROGRAM_SELECT _TEXT("SELECT")
  120. #define PROGRAM_MOLP _TEXT("MOLP")
  121. #define PROGRAM_RETAIL _TEXT("OTHER")
  122. //Internal properties
  123. #define _CERTBLOBTAG _TEXT("CERTBLOB")
  124. #define _MFGINFOTAG _TEXT("MFGINFOTAG")
  125. //program tags
  126. #define _PROGRAMNAMETAG _TEXT("REGPROGRAMNAME")
  127. //Contact Information Tags
  128. #define _CONTACTLNAMETAG _TEXT("CONTACTLNAME")
  129. #define _CONTACTFNAMETAG _TEXT("CONTACTFNAME")
  130. #define _CONTACTADDRESSTAG _TEXT("CONTACTADDRESS")
  131. #define _CONTACTPHONETAG _TEXT("CONTACTPHONE")
  132. #define _CONTACTFAXTAG _TEXT("CONTACTFAX")
  133. #define _CONTACTEMAILTAG _TEXT("CONTACTEMAIL")
  134. #define _CONTACTCITYTAG _TEXT("CONTACTCITY")
  135. #define _CONTACTCOUNTRYTAG _TEXT("CONTACTCOUNTRY")
  136. #define _CONTACTSTATE _TEXT("CONTACTSTATE")
  137. #define _CONTACTZIP _TEXT("CONTACTZIP")
  138. //Customer Information Tags
  139. #define _CUSTOMERNAMETAG _TEXT("CUSTOMERNAME")
  140. //Select Information TAGS
  141. #define _SELMASTERAGRNUMBERTAG _TEXT("SELMASTERAGRNUMBERTAG")
  142. #define _SELENROLLNUMBERTAG _TEXT("SELENROLLNUMBER")
  143. #define _SELPRODUCTTYPETAG _TEXT("SELPRODUCTTYPE")
  144. #define _SELQTYTAG _TEXT("SELQTY")
  145. //MOLP information
  146. #define _MOLPAUTHNUMBERTAG _TEXT("MOLPAUTHNUMBER")
  147. #define _MOLPAGREEMENTNUMBERTAG _TEXT("MOLPAGREEMENTNUMBER")
  148. #define _MOLPPRODUCTTYPETAG _TEXT("MOLPPRODUCTTYPE")
  149. #define _MOLPQTYTAG _TEXT("MOLPQTY")
  150. //other (Retail) information
  151. #define _OTHARBLOBTAG _TEXT("OTHARBLOB")
  152. //shipping information - this will be required in case the
  153. //user has not opted to use the same information as
  154. //shown in step 2 of registration.
  155. #define _SHIPINFOPRESENT _TEXT("SHIPINFOPRESENT")
  156. #define _SHIPCONTACTLNAMETAG _TEXT("SHIPCONTACTLNAME")
  157. #define _SHIPCONTACTFNAMETAG _TEXT("SHIPCONTACTFNAME")
  158. #define _SHIPCONTACTADDRESSTAG _TEXT("SHIPCONTACTADDRESS")
  159. #define _SHIPCONTACTADDRESS1TAG _TEXT("SHIPCONTACTADDRESS1")
  160. #define _SHIPCONTACTADDRESS2TAG _TEXT("SHIPCONTACTADDRESS2")
  161. #define _SHIPCONTACTPHONETAG _TEXT("SHIPCONTACTPHONE")
  162. #define _SHIPCONTACTEMAILTAG _TEXT("SHIPCONTACTEMAIL")
  163. #define _SHIPCONTACTCITYTAG _TEXT("SHIPCONTACTCITY")
  164. #define _SHIPCONTACTCOUNTRYTAG _TEXT("SHIPCONTACTCOUNTRY")
  165. #define _SHIPCONTACTSTATE _TEXT("SHIPCONTACTSTATE")
  166. #define _SHIPCONTACTZIP _TEXT("SHIPCONTACTZIP")
  167. #define _SHIPLSNAMETAG _TEXT("SHIPLSNAME")
  168. //Misc Property TAG
  169. #define _OFFLINEREGFILENAMETAG _TEXT("OFFLINEREGFILENAME")
  170. #define _OFFLINESHIPFILENAMETAG _TEXT("OFFLINESHIPFILENAME")
  171. //Field lengths
  172. #define CA_COMPANY_NAME_LEN 60
  173. #define CA_ORG_UNIT_LEN 60
  174. #define CA_ADDRESS_LEN 200
  175. #define CA_CITY_LEN 30
  176. #define CA_STATE_LEN 30
  177. #define CA_COUNTRY_LEN 2
  178. #define CA_ZIP_LEN 16
  179. #define CA_NAME_LEN 30
  180. #define CA_PHONE_LEN 64
  181. #define CA_EMAIL_LEN 64
  182. #define CA_FAX_LEN 64
  183. #define CA_PIN_LEN 42
  184. //CH Field Lengths
  185. #define CH_MOLP_AUTH_NUMBER_LEN 64
  186. #define CH_MOLP_AGREEMENT_NUMBER_LEN 64
  187. #define CH_SELECT_AGREEMENT_NUMBER 64
  188. #define CH_SELECT_ENROLLMENT_NUMBER 64
  189. #define CH_QTY_LEN 4
  190. /*
  191. #define CH_CONTACT_NAME_LEN 64
  192. #define CH_ADDRESS_LEN 64
  193. #define CH_PHONE_LEN 32
  194. #define CH_EMAIL_LEN 64
  195. #define CH_CITY_LEN 64
  196. #define CH_COUNTRY_LEN 32
  197. #define CH_STATE_LEN 32
  198. #define CH_POSTAL_CODE_LEN 32
  199. #define CH_CUSTOMER_NAME_LEN 64
  200. */
  201. #define LR_DRIVE_LEN 5
  202. #define LR_SHIPINFO_LEN 1024
  203. //File Names
  204. #define MFG_FILENAME "mfr.bin"
  205. #define CA_EXCHG_REQ_FILENAME "exchgcert.req"
  206. #define CA_SIG_REQ_FILENAME "sigcert.req"
  207. #define CA_EXCHG_RES_FILENAME "exchgcert.rsp"
  208. #define CA_SIG_RES_FILENAME "sigcert.rsp"
  209. #define CA_ROOT_RES_FILENAME "lsroot.rsp"
  210. #define CH_ROOT_CERT_FILENAME "chroot.crt"
  211. #define CH_EXCHG_CERT_FILENAME "chexchg.crt"
  212. #define CH_SIG_CERT_FILENAME "chsig.crt"
  213. #define CH_LKP_REQ_FILENAME "newlkp.req"
  214. #define CH_LKP_RES_FILENAME "newlkp.rsp"
  215. #define SHIP_INFO_FILENAME "ship.inf"
  216. // LKP ACK statuse
  217. #define LKP_ACK '2'
  218. #define LKP_NACK '3'
  219. //
  220. // Resource Ids for Country Code & Desc
  221. //
  222. #define IDS_COUNTRY_START 500
  223. #define IDS_COUNTRY_END 739
  224. //
  225. // Resource Ids for Product Code & Desc
  226. //
  227. #define IDS_PRODUCT_START 200
  228. #define IDS_PRODUCT_IC 201
  229. #define IDS_PRODUCT_CONCURRENT 202
  230. #define IDS_PRODUCT_WHISTLER 203
  231. #define IDS_PRODUCT_END 204
  232. #define LR_COUNTRY_CODE_LEN 2
  233. #define LR_COUNTRY_DESC_LEN 64
  234. #define IDS_REACT_REASONS_START 100
  235. #define IDS_REACT_REASONS_END 103
  236. #define IDS_DEACT_REASONS_START 150
  237. #define IDS_DEACT_REASONS_END 151
  238. #define CODE_TYPE_REACT 1
  239. #define CODE_TYPE_DEACT 2
  240. #define LR_REASON_CODE_LEN 2
  241. #define LR_REASON_DESC_LEN 128
  242. #define LR_PRODUCT_CODE_LEN 3
  243. #define LR_PRODUCT_DESC_LEN 64
  244. //
  245. // Some constants used for progress bar
  246. //
  247. #define PROGRESS_MAX_VAL 100
  248. #define PROGRESS_STEP_VAL 1
  249. #define PROGRESS_WAIT_TIME 100
  250. //
  251. // Constants required for Email validation
  252. //
  253. #define EMAIL_MIN_LEN 6
  254. #define EMAIL_AT_CHAR '@'
  255. #define EMAIL_DOT_CHAR '.'
  256. #define EMAIL_SPACE_CHAR ' '
  257. #define EMAIL_AT_DOT_STR L"@."
  258. #define EMAIL_DOT_AT_STR L".@"
  259. #define LR_SINGLE_QUOTE '\''
  260. #define LR_INVALID_CHARS "\"~|"
  261. #endif