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.

351 lines
10 KiB

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