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.

295 lines
15 KiB

  1. #ifndef __APPDEFS_H_
  2. #define __APPDEFS_H_
  3. //This file is for application wide definitions
  4. //e.g. defs that are in common between the exe and various dlls
  5. #define RECTWIDTH(rc) ((rc).right - (rc).left)
  6. #define RECTHEIGHT(rc) ((rc).bottom - (rc).top)
  7. #define ICW_DOWNLOADABLE_COMPONENT_NAME TEXT("ICWCONN.DLL")
  8. #define ICW_DOWNLOADABLE_COMPONENT_GETVERFUNC "GetICWCONNVersion"
  9. #define ICW_DOWNLOADABLE_COMPONENT_VERSION 500
  10. #define ICW_OS_VER TEXT("01")
  11. #define ID_BUSY_ANIMATION_WINDOW 10000
  12. #define ICW_UTIL TEXT("icwutil.dll")
  13. #define ICW_RESOURCE_ONLY_DLL TEXT("icwres.dll")
  14. #define ICW_HTML_HELP_FILE TEXT("icwdial.chm")
  15. #define ICW_HTML_HELP_TROUBLE_TOPIC TEXT("icwdial.chm::/icw_trb.htm")
  16. #define MAX_TITLE 150
  17. #define MAX_MESSAGE 255
  18. #define MAX_MESSAGE_LEN MAX_RES_LEN * 4
  19. #define MAX_INFO_LEN MAX_RES_LEN * 3
  20. #define LCID_CHT 1028 //CHINESE TRADITIONAL
  21. #define LCID_S_KOR 1042 //SOUTH KOREAN
  22. #define LCID_N_KOR 2066 //NORTH KOREAN
  23. #define LCID_CHS 2052 //CHINESE SIMPLIFIED
  24. #define LCID_JPN 1041 //JAPANESE
  25. //various flags for the icw including branding stuff
  26. #define ICW_CFGFLAG_OFFERS 0x00000001 // 0 = No offer; 1 = offers
  27. #define ICW_CFGFLAG_AUTOCONFIG 0x00000002 // 0 = No; 1 = Yes
  28. #define ICW_CFGFLAG_CNS 0x00000004 // 0 = No star; 1 = Star
  29. #define ICW_CFGFLAG_SIGNUP_PATH 0x00000008 // 0 = Jump to Finish; 1 = Continue down sign up path
  30. #define ICW_CFGFLAG_USERINFO 0x00000010 // 0 = Hide name/addr; 1 = Show name/addr page
  31. #define ICW_CFGFLAG_BILL 0x00000020 // 0 = Hide bill 1 = Show bill page
  32. #define ICW_CFGFLAG_PAYMENT 0x00000040 // 0 = Hide payment; 1 = Show payment page
  33. #define ICW_CFGFLAG_SECURE 0x00000080 // 0 = Not secure; 1 = Secure
  34. #define ICW_CFGFLAG_IEAKMODE 0x00000100 // 0 = No IEAK; 1 = IEAK
  35. #define ICW_CFGFLAG_BRANDED 0x00000200 // 0 = No branding; 1 = Branding
  36. #define ICW_CFGFLAG_SBS 0x00000400 // 0 = No SBS 1 = SBS
  37. #define ICW_CFGFLAG_ALLOFFERS 0x00000800 // 0 = Not all offers 1 = All offers
  38. #define ICW_CFGFLAG_USE_COMPANYNAME 0x00001000 // 0 = Not use 1 = Use company name
  39. #define ICW_CFGFLAG_ISDN_OFFER 0x00002000 // 0 = Non-ISDN offer 1 = ISDN offer
  40. #define ICW_CFGFLAG_OEM_SPECIAL 0x00004000 // 0 = non OEM special offer 1 = OEM special offer
  41. #define ICW_CFGFLAG_OEM 0x00008000 // 0 = non OEM offer 1 = OEM offer
  42. #define ICW_CFGFLAG_MODEMOVERRIDE 0x00010000
  43. #define ICW_CFGFLAG_ISPURLOVERRIDE 0x00020000
  44. #define ICW_CFGFLAG_PRODCODE_FROM_CMDLINE 0x00040000
  45. #define ICW_CFGFLAG_PROMOCODE_FROM_CMDLINE 0x00080000
  46. #define ICW_CFGFLAG_OEMCODE_FROM_CMDLINE 0x00100000
  47. #define ICW_CFGFLAG_SMARTREBOOT_NEWISP 0x00200000
  48. #define ICW_CFGFLAG_SMARTREBOOT_AUTOCONFIG 0x00400000 // this is seperate from ICW_CFGFLAG_AUTOCONFIG so as not to confuse function of flag
  49. #define ICW_CFGFLAG_SMARTREBOOT_MANUAL 0x00800000
  50. #define ICW_CFGFLAG_DO_NOT_OVERRIDE_ALLOFFERS 0x01000000
  51. #define ICW_CFGFLAG_SMARTREBOOT_LAN 0x02000000
  52. //Info required flags
  53. // 1 -- required
  54. // 0 -- optional
  55. //User Info
  56. #define REQUIRE_FE_NAME 0x00000001
  57. #define REQUIRE_FIRSTNAME 0x00000002
  58. #define REQUIRE_LASTNAME 0x00000004
  59. #define REQUIRE_ADDRESS 0x00000008
  60. #define REQUIRE_MOREADDRESS 0x00000010
  61. #define REQUIRE_CITY 0x00000020
  62. #define REQUIRE_STATE 0x00000040
  63. #define REQUIRE_ZIP 0x00000080
  64. #define REQUIRE_PHONE 0x00000100
  65. #define REQUIRE_COMPANYNAME 0x00000200
  66. //Credit Card
  67. #define REQUIRE_CCNAME 0x00000400
  68. #define REQUIRE_CCADDRESS 0x00000800
  69. #define REQUIRE_CCNUMBER 0x00001000
  70. #define REQUIRE_CCZIP REQUIRE_ZIP
  71. //Invoice
  72. #define REQUIRE_IVADDRESS1 REQUIRE_ADDRESS
  73. #define REQUIRE_IVADDRESS2 REQUIRE_MOREADDRESS
  74. #define REQUIRE_IVCITY REQUIRE_CITY
  75. #define REQUIRE_IVSTATE REQUIRE_STATE
  76. #define REQUIRE_IVZIP REQUIRE_ZIP
  77. //Phone
  78. #define REQUIRE_PHONEIV_BILLNAME 0x00002000
  79. #define REQUIRE_PHONEIV_ACCNUM REQUIRE_PHONE
  80. //Htm pagetype flags
  81. #define PAGETYPE_UNDEFINED E_FAIL
  82. #define PAGETYPE_NOOFFERS 0x00000001
  83. #define PAGETYPE_MARKETING 0x00000002
  84. #define PAGETYPE_BRANDED 0x00000004
  85. #define PAGETYPE_BILLING 0x00000008
  86. #define PAGETYPE_CUSTOMPAY 0x00000010
  87. #define PAGETYPE_ISP_NORMAL 0x00000020
  88. #define PAGETYPE_ISP_TOS 0x00000040
  89. #define PAGETYPE_ISP_FINISH 0x00000080
  90. #define PAGETYPE_ISP_CUSTOMFINISH 0x00000100
  91. #define PAGETYPE_OLS_FINISH 0x00000200
  92. //Htm page flags
  93. #define PAGEFLAG_SAVE_CHKBOX 0x00000001 // Display ISP HTML with checkbox to save info at the bottom
  94. //IEAK ICW isp/htm section info
  95. #define ICW_IEAK_SECTION TEXT("ICW_IEAK")
  96. #define ICW_IEAK_USEICW TEXT("Use_ICW")
  97. #define ICW_IEAK_ISPNAME TEXT("Isp_Display_Name")
  98. #define ICW_IEAK_HTML TEXT("Html_Page")
  99. #define ICW_IEAK_TITLE TEXT("TitleBar")
  100. #define ICW_IEAK_HEADER_BMP TEXT("Header_Bitmap")
  101. #define ICW_IEAK_WATERMARK_BMP TEXT("Watermark_Bitmap")
  102. #define ICW_IEAK_USERINFO TEXT("Get_UserInfo")
  103. #define ICW_IEAK_BILLING TEXT("Get_BillingInfo")
  104. #define ICW_IEAK_PAYMENT TEXT("Get_PaymentInfo")
  105. #define ICW_IEAK_BILLINGHTM TEXT("Billing_Options_Page")
  106. #define ICW_IEAK_PAYMENTCSV TEXT("Payment_Csv_File")
  107. #define ICW_IEAK_TUTORCMDLN TEXT("Tutorial_Application_Command_Line")
  108. #define ICW_IEAK_USECOMPANYNAME TEXT("UseCompanyName")
  109. #define ICW_IEAK_VALIDATEFLAGS TEXT("ValidationFlags")
  110. //OEMINFO ICW section info
  111. #define ICW_OEMINFO_FILENAME TEXT("oeminfo.ini")
  112. #define ICW_OEMINFO_OEMSECTION TEXT("General")
  113. #define ICW_OEMINFO_OEMKEY TEXT("Manufacturer")
  114. #define ICW_OEMINFO_ICWSECTION TEXT("ICW")
  115. #define ICW_OEMINFO_PRODUCTCODE TEXT("Product")
  116. #define ICW_OEMINFO_PROMOCODE TEXT("Promo")
  117. #define ICW_OEMINFO_ALLOFFERS TEXT("AllOffers")
  118. #define ICW_OEMINFO_OFFLINEOFFERS TEXT("OfflineOffers")
  119. #define ICW_OEMINFO_TUTORCMDLN ICW_IEAK_TUTORCMDLN
  120. #define ICW_ISPINFOPath TEXT("download\\ispinfo.csv")
  121. #define ICW_OEMINFOPath TEXT("offline\\oeminfo.csv")
  122. #define ICW50_PATHKEY TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\ICWCONN1.EXE")
  123. #define SPECIAL_VAL_NOOFFER 0
  124. #define SPECIAL_VAL_OLS -1
  125. #define EXTERNAL_DLG_START 2300
  126. #ifdef ICWDEBUG
  127. //page index defines for ICWDEBUG.EXE
  128. #define ORD_PAGE_ICWDEBUG_OFFER 0
  129. #define ORD_PAGE_ICWDEBUG_SETTINGS 1
  130. #define ORD_PAGE_END 2
  131. #define EXE_MAX_PAGE_INDEX 2
  132. #define EXE_NUM_WIZARD_PAGES 3 // total number of pages in wizard
  133. #else
  134. // page index defines for ICWCONN1.EXE
  135. #define ORD_PAGE_INTRO 0
  136. #define ORD_PAGE_MANUALOPTIONS 1
  137. #define ORD_PAGE_AREACODE 2
  138. #define ORD_PAGE_REFSERVDIAL 3
  139. #define ORD_PAGE_END 4
  140. #define ORD_PAGE_ENDOEMCUSTOM 5
  141. #define ORD_PAGE_ENDOLS 6
  142. #define ORD_PAGE_REFDIALERROR 7
  143. #define ORD_PAGE_MULTINUMBER 8
  144. #define ORD_PAGE_REFSERVERR 9
  145. #define ORD_PAGE_BRANDEDINTRO 10
  146. #define ORD_PAGE_INTRO2 11
  147. #define ORD_PAGE_DEFAULT 12
  148. #define ORD_PAGE_SBSINTRO 13
  149. #define EXE_MAX_PAGE_INDEX 13
  150. #define EXE_NUM_WIZARD_PAGES 14 // total number of pages in wizard
  151. #endif //ICWDEBUG
  152. // page index defines for ICWCONN.DLL
  153. #define ORD_PAGE_ISPSELECT 0
  154. #define ORD_PAGE_NOOFFER 1
  155. #define ORD_PAGE_USERINFO 2
  156. #define ORD_PAGE_BILLINGOPT 3
  157. #define ORD_PAGE_PAYMENT 4
  158. #define ORD_PAGE_ISPDIAL 5
  159. #define ORD_PAGE_ISPDATA 6
  160. #define ORD_PAGE_OLS 7
  161. #define ORD_PAGE_DIALERROR 8
  162. #define ORD_PAGE_SERVERR 9
  163. #define ORD_PAGE_ISP_AUTOCONFIG 10
  164. #define ORD_PAGE_ISP_AUTOCONFIG_NOOFFER 11
  165. #define ORD_PAGE_ISDN_NOOFFER 12
  166. #define ORD_PAGE_OEMOFFER 13
  167. // Definitions for command line parameters
  168. #define OEMCODE_CMD TEXT("/oem")
  169. #define PRODCODE_CMD TEXT("/prod")
  170. #define PROMO_CMD TEXT("/promo")
  171. #define SHELLNEXT_CMD TEXT("/shellnext")
  172. #define SMARTSTART_CMD TEXT("/smartstart")
  173. #define STARTURL_CMD TEXT("/starturl")
  174. #define UPDATEDESKTOP_CMD TEXT("/desktop")
  175. #define RESTOREDESKTOP_CMD TEXT("/restoredesktop")
  176. #define ICW_IEAK_CMD TEXT("/ieak")
  177. #define BRANDED_CMD TEXT("/branded") // Allow branding
  178. #define RUNONCE_CMD TEXT("/runonce") // Run once only
  179. #define SMARTREBOOT_CMD TEXT("/smartreboot")
  180. #define SHORTCUTENTRY_CMD TEXT("/icon") //changed from /shortcut per simons
  181. #define SKIPINTRO_CMD TEXT("/skipintro") // simulate "next" click right away on intro page
  182. #ifdef DEBUG
  183. #define ICON_CMD TEXT("/puticon") // Debug only
  184. #endif
  185. #define DEBUG_OEMCUSTOM TEXT("/checkoemcustini")
  186. #define PRODCODE_SBS TEXT("sbs") // for /prod sbs
  187. #define NEWISP_SR TEXT("new") // for /smartreboot new
  188. #define AUTO_SR TEXT("auto") // for /smartreboot auto
  189. #define MANUAL_SR TEXT("manual") // for /smartreboot manual
  190. #define LAN_SR TEXT("lan") // for /smartreboot LAN
  191. // Default strings for oem, prod, and promo code
  192. #define DEFAULT_OEMCODE TEXT("Default")
  193. #define DEFAULT_PRODUCTCODE TEXT("Desktop")
  194. #define DEFAULT_PROMOCODE TEXT("Default")
  195. #define WM_RUNICWTUTORAPP ((WM_USER) + 300)
  196. // This takes into account the inital dial for a total of three
  197. #define NUM_MAX_REDIAL 2
  198. // handler proc for OK, cancel, etc button handlers
  199. typedef BOOL (CALLBACK* INITPROC)(HWND,BOOL, UINT *);
  200. typedef BOOL (CALLBACK* POSTINITPROC)(HWND,BOOL, UINT *);
  201. typedef BOOL (CALLBACK* OKPROC)(HWND,BOOL,UINT *,BOOL *);
  202. typedef BOOL (CALLBACK* CANCELPROC)(HWND);
  203. typedef BOOL (CALLBACK* CMDPROC)(HWND,WPARAM,LPARAM);
  204. typedef BOOL (CALLBACK* NOTIFYPROC)(HWND, WPARAM, LPARAM);
  205. #define SetPropSheetResult( hwnd, result ) SetWindowLongPtr(hwnd, DWLP_MSGRESULT, result)
  206. // structure with information for each wizard page
  207. typedef struct tagPAGEINFO
  208. {
  209. UINT uDlgID; // dialog ID to use for page
  210. BOOL bIsHostingWebOC;
  211. // handler procedures for each page-- any of these can be
  212. // NULL in which case the default behavior is used
  213. INITPROC InitProc;
  214. POSTINITPROC PostInitProc;
  215. OKPROC OKProc;
  216. CMDPROC CmdProc;
  217. CANCELPROC CancelProc;
  218. NOTIFYPROC NotifyProc;
  219. int nIdTitle;
  220. int nIdSubTitle;
  221. int idAccel; // ID of the accelerator table
  222. HACCEL hAccel; // Accelerator table
  223. HACCEL hAccelNested; // Accelerator table for nested dialog
  224. } PAGEINFO;
  225. // These are contol defines for controls that have accelerator access.
  226. // They must be defined here, instead of in the DLL, so that the app
  227. // can access the defines
  228. #define IDC_ISPLIST 3000
  229. #define IDC_ISPMARKETING 3001
  230. #define IDC_ISPLIST_INFO 3002
  231. #define IDC_USERINFO_FIRSTNAME 3008
  232. #define IDC_USERINFO_LASTNAME 3009
  233. #define IDC_USERINFO_COMPANYNAME 3068
  234. #define IDC_USERINFO_ADDRESS1 3010
  235. #define IDC_USERINFO_ADDRESS2 3011
  236. #define IDC_USERINFO_CITY 3012
  237. #define IDC_USERINFO_STATE 3013
  238. #define IDC_USERINFO_ZIP 3014
  239. #define IDC_USERINFO_PHONE 3015
  240. #define IDC_USERINFO_FE_NAME 3007
  241. #define IDC_BILLINGOPT_HTML 3017
  242. #define IDC_PAYMENTTYPE 3018
  243. #define IDC_PAYMENT_CCNUMBER 3019
  244. #define IDC_PAYMENT_EXPIREMONTH 3020
  245. #define IDC_PAYMENT_EXPIREYEAR 3021
  246. #define IDC_PAYMENT_CCNAME 3022
  247. #define IDC_PAYMENT_CCADDRESS 3023
  248. #define IDC_PAYMENT_CCZIP 3024
  249. #define IDC_PAYMENT_IVADDRESS1 3040
  250. #define IDC_PAYMENT_IVADDRESS2 3042
  251. #define IDC_PAYMENT_IVCITY 3044
  252. #define IDC_PAYMENT_IVSTATE 3046
  253. #define IDC_PAYMENT_IVZIP 3048
  254. #define IDC_PAYMENT_PHONEIV_BILLNAME 3050
  255. #define IDC_PAYMENT_PHONEIV_ACCNUM 3052
  256. #define IDC_ISPDATA_TOSACCEPT 3037
  257. #define IDC_ISPDATA_TOSDECLINE 3038
  258. #define IDC_ISPDATA_TOSSAVE 3065
  259. #define IDC_DIALERR_PHONENUMBER 3062
  260. #define IDC_DIALERR_PROPERTIES 3088
  261. #define IDC_DIAL_HELP 3071
  262. #define IDC_OEMOFFER_MORE 3202
  263. #endif