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.

450 lines
19 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1999 **
  4. //*********************************************************************
  5. //
  6. // APPDEFS.H - Header for application wide defines, typedefs, etc
  7. //
  8. // HISTORY:
  9. //
  10. // 1/27/99 a-jaswed Created.
  11. //
  12. // Header for application wide defines, typedefs, etc
  13. #ifndef _APPDEFS_H_
  14. #define _APPDEFS_H_
  15. #include <windows.h>
  16. #include <wtypes.h>
  17. #include <oleauto.h>
  18. #include <malloc.h>
  19. #define OOBE_DIR L"\\OOBE"
  20. #define OOBE_SHELL_DLL L"MSOBSHEL.DLL"
  21. #define OOBE_MAIN_DLL L"MSOBMAIN.DLL"
  22. #define OOBE_WEB_DLL L"MSOBWEB.DLL"
  23. #define OOBE_COMM_DLL L"MSOBCOMM.DLL"
  24. #define OOBE_EXE L"MSOOBE.EXE"
  25. #define OOBEBALN_EXE L"OOBEBALN.EXE"
  26. #define ICW_APP_TITLE L"INETWIZ.EXE"
  27. #define OOBE_MAIN_CLASSNAME L"MSOBMAIN_AppWindow"
  28. #define OOBE_MAIN_WINDOWNAME L"Microsoft Out of Box Experience"
  29. #define OBSHEL_MAINPANE_CLASSNAME L"MSOBSHEL_MainPane"
  30. #define OBSHEL_MAINPANE_WINDOWNAME L"ObShellMainPane"
  31. #define OBSHEL_STATUSPANE_CLASSNAME L"MSOBSHEL_StatPane"
  32. #define OBSHEL_STATUSPANE_WINDOWNAME L"CObShellStatusPane"
  33. #define OBSHEL_STATUSPANE_MINITEM 0
  34. #define OBSHEL_STATUSPANE_MAXITEM 8
  35. //Window size for standalone operation
  36. #define MSN_WIDTH 640
  37. #define MSN_HEIGHT 530
  38. //These MUST be ANSI for GetProcAddress
  39. #define MSOBMAIN_ENTRY "LaunchMSOOBE"
  40. #define REG_SERVER "DllRegisterServer"
  41. #define UNREG_SERVER "DllUnregisterServer"
  42. #define DEFAULT_FRAME_NAME L"msoobeMain"
  43. #define DEFAULT_FRAME_PAGE L"msobshel.htm"
  44. #define MSN_FRAME_PAGE L"dtsgnup.htm"
  45. #define REG_FRAME_PAGE L"regshell.htm"
  46. #define ISP_FRAME_PAGE L"ispshell.htm"
  47. #define ACT_FRAME_PAGE L"actshell.htm"
  48. #define DEFAULT_START_PAGE L"\\setup\\welcome.htm"
  49. #define DEFAULT_STATUS_PAGE L"/STATPANE_RESOURCE"
  50. #define IFRMSTATUSPANE L"ifrmStatusPane"
  51. #define WINNT_INF_FILENAME L"\\$winnt$.inf"
  52. #define OOBE_PATH L"\\oobe\\msoobe.exe"
  53. #define OOBE_BALLOON_REMINDER L"\\oobe\\oobebaln.exe"
  54. #define DATA_SECTION L"data"
  55. #define WINNT_UPGRADE L"winntupgrade"
  56. #define WIN9X_UPGRADE L"win9xupgrade"
  57. #define YES_ANSWER L"yes"
  58. #define OOBE_PROXY_SECTION L"OobeProxy"
  59. #define OOBE_ENABLE_OOBY_PROXY L"Enable"
  60. #define OOBE_FLAGS L"Flags"
  61. #define OOBE_PROXY_SERVER L"Proxy_Server"
  62. #define OOBE_PROXY_BYPASS L"Proxy_Bypass"
  63. #define OOBE_AUTOCONFIG_URL L"Autoconfig_URL"
  64. #define OOBE_AUTODISCOVERY_FLAGS L"Autodiscovery_Flag"
  65. #define OOBE_AUTOCONFIG_SECONDARY_URL L"Autoconfig_Secondary_URL"
  66. #define OOBE_MAIN_REG_KEY L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\OOBE"
  67. #define REG_KEY_OOBE_TEMP L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\OOBE\\Temp"
  68. #define REG_KEY_OOBE_CKPT L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\OOBE\\CKPT"
  69. #define REG_KEY_OOBE_ICS L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\OOBE\\ics"
  70. #define REG_KEY_OOBE_STATUS L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\OOBE\\status"
  71. #define REG_KEY_WINDOWS L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion"
  72. #define REG_KEY_WINDOWSNT L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"
  73. #define REG_KEY_SETUP L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup"
  74. #define RUNONCE_REGKEY L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce"
  75. #define IE_APP_PATH_REGKEY L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\IEXPLORE.EXE"
  76. #define NOEULA_REGKEY L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion"
  77. #define REG_KEY_CONFIG_DISPLAY L"Config\\0001\\Display\\Settings"
  78. #define RUNONCE_IE_ENTRY L"^BrowseNow"
  79. #define OOBE_OEMDEBUG_REG_VAL L"OEMDebug"
  80. #define OOBE_MSDEBUG_REG_VAL L"MsDebug"
  81. #define REG_VAL_OOBE L"OOBE"
  82. #define REG_VAL_REBOOT L"DontReboot"
  83. #define REG_VAL_RES L"Resolution"
  84. #define REG_VAL_ISPSIGNUP L"ISPSignup"
  85. #define REG_VAL_NOEULA L"WelcomeHelpString"
  86. #define OOBE_SKIP_EULA_VAL L"Welcome to Microsoft Windows."
  87. #define REG_VAL_COMPUTERDESCRIPTION L"ComputerDescription"
  88. #define REG_VAL_PRODUCTID L"ProductId"
  89. #define OOBE_EVENT_NOEXITCODE L"OOBE_Event_NoExitCode"
  90. ////////////////////////////////////////////////////////////////
  91. //??????????????????????????????????????????????????????????????
  92. //??? This is for OOBEINFO.INI
  93. #define INI_SETTINGS_FILENAME L"\\oobe\\OOBEINFO.INI"
  94. #define OEMINFO_INI_FILENAME INI_SETTINGS_FILENAME
  95. #define DEFAULT_WINDOW_TEXT L"Microsoft Out of Box Experience"
  96. #define MSN_WINDOW_TEXT L"MSN Setup"
  97. ////////////////////////////////////
  98. ////////////////////////////////////
  99. //SECTION :: StartupOptions
  100. #define STARTUP_OPTIONS_SECTION L"StartupOptions"
  101. //KEYS:
  102. #define OOBE_FULLSCREEN_MODE L"FullScreenMode"
  103. #define OOBE_FULLSCREEN_MODE_DEFAULT 1
  104. #define OOBE_DESKTOP_URL L"DesktopStartUrl"
  105. #define OOBE_DESKTOP_URL_DEFAULT MSN_FRAME_PAGE
  106. #define OOBE_DESKTOP_TITLE L"DesktopWindowTitle"
  107. #define OOBE_DESKTOP_TITLE_DEFAULT DEFAULT_WINDOW_TEXT
  108. #define OOBE_DESKTOP_HEIGHT L"DesktopWindowHeight"
  109. #define OOBE_DESKTOP_HEIGHT_DEFAULT MSN_HEIGHT
  110. #define OOBE_DESKTOP_WIDTH L"DesktopWindowWidth"
  111. #define OOBE_DESKTOP_WIDTH_DEFAULT MSN_WIDTH
  112. #define OOBE_SCREEN_RES_CHECK L"ScreenResolutionCheck"
  113. #define OOBE_SCREEN_RES_CHECK_DEFAULT 1
  114. #define OOBE_OEMAUDITBOOT L"OEMAuditBoot"
  115. ////////////////////////////////////
  116. ////////////////////////////////////
  117. //SECTION :: StartupOptions
  118. #define STATUS_PANE_SECTION L"StatusPane"
  119. //KEYS:
  120. #define STATUS_PANE_ITEM L"Item_text_%d"
  121. #define STATUS_PANE_LOGO L"Logo"
  122. #define STATUS_PANE_LOGO_BACKGROUND L"LogoBackground"
  123. #define REGISTRATION L"Registration"
  124. ////////////////////////////////////
  125. ////////////////////////////////////
  126. //SECTION :: WindowsLogon
  127. #define WINDOWS_LOGON_SECTION L"WindowsLogon"
  128. //KEYS:
  129. #define AUTOLOGON L"AutoLogon"
  130. #define DEFAULT_USER_NAME L"DefaultUserName"
  131. ////////////////////////////////////
  132. ////////////////////////////////////
  133. //SECTION :: HardwareOptions
  134. #define OPTIONS_SECTION L"Options"
  135. //KEYS:
  136. #define TONEPULSE L"TonePulse"
  137. #define CHECK_KEYBOARD L"USBKeyboard"
  138. #define CHECK_MOUSE L"USBMouse"
  139. #define AREACODE L"Areacode"
  140. #define OUTSIDELINE L"OutsideLine"
  141. #define DISABLECALLWAITING L"DisableCallWaiting"
  142. #define DEFAULT_REGION L"DefaultRegion"
  143. #define DEFAULT_LANGUAGE L"DefaultLanguage"
  144. #define DEFAULT_KEYBOARD L"DefaultKeyboard"
  145. #define CHECK_MODEMGCI L"CheckModemGCI"
  146. #define OOBE_KEEPCURRENTTIME L"KeepCurrentTime"
  147. #define USE_1394_AS_LAN L"Use1394AsLan"
  148. #define NOUSBKBD_FILENAME L"\\oobe\\setup\\nousbkbd.htm"
  149. #define NOUSBMS_FILENAME L"\\oobe\\setup\\nousbms.htm"
  150. #define NOUSBKM_FILENAME L"\\oobe\\setup\\nousbkm.htm"
  151. ////////////////////////////////////
  152. ////////////////////////////////////
  153. //SECTION :: DesktopReminders
  154. #define DESKTOPREMINDERS_SECTION L"DesktopReminders"
  155. //KEYS:
  156. #define REGREMINDERX L"RegRemind%1d"
  157. #define ISPREMINDERX L"ISPRemind%1d"
  158. ////////////////////////////////////
  159. ////////////////////////////////////
  160. //SECTION :: UserInfo
  161. #define USER_INFO_KEYNAME L"UserInfo"
  162. ////////////////////////////////////////////////////////////////
  163. //??????????????????????????????????????????????????????????????
  164. //??? ISP file
  165. ////////////////////////////////////
  166. ////////////////////////////////////
  167. //SECTION :: URL
  168. #define ISP_FILE_URL_SECTION L"URL"
  169. //KEYS:
  170. #define ISP_FILE_SIGNUP_URL L"Signup"
  171. ////////////////////////////////////////////////////////////////
  172. //??????????????????????????????????????????????????????????????
  173. // These are the command line option used by MSoobe.exe
  174. #define CMD_FULLSCREENMODE L"/F"
  175. #define CMD_MSNMODE L"/x"
  176. #define CMD_ICWMODE L"/xicw"
  177. #define CMD_PRECONFIG L"/preconfig"
  178. #define CMD_OFFLINE L"/offline"
  179. #define CMD_SHELLNEXT L"/shellnext"
  180. #define CMD_SETPWD L"/setpwd"
  181. #define CMD_OOBE L"/oobe"
  182. #define CMD_REG L"/r"
  183. #define CMD_ISP L"/i"
  184. #define CMD_ACTIVATE L"/a"
  185. #define CMD_1 L"/1"
  186. #define CMD_2 L"/2"
  187. #define CMD_3 L"/3"
  188. #define CMD_RETAIL L"/retail"
  189. #define CMD_2NDINSTANCE L"/2ND"
  190. const WCHAR cszEquals[] = L"=";
  191. const WCHAR cszAmpersand[] = L"&";
  192. const WCHAR cszPlus[] = L"+";
  193. const WCHAR cszQuestion[] = L"?";
  194. const WCHAR cszFormNamePAGEID[] = L"PAGEID";
  195. const WCHAR cszFormNameBACK[] = L"BACK";
  196. const WCHAR cszFormNamePAGETYPE[] = L"PAGETYPE";
  197. const WCHAR cszFormNameNEXT[] = L"NEXT";
  198. const WCHAR cszFormNamePAGEFLAG[] = L"PAGEFLAG";
  199. const WCHAR cszPageTypeTERMS[] = L"TERMS";
  200. const WCHAR cszPageTypeCUSTOMFINISH[] = L"CUSTOMFINISH";
  201. const WCHAR cszPageTypeFINISH[] = L"FINISH";
  202. const WCHAR cszPageTypeNORMAL[] = L"";
  203. const WCHAR cszOLSRegEntries[] = L"regEntries";
  204. const WCHAR cszKeyName[] = L"KeyName";
  205. const WCHAR cszEntry_Name[] = L"Entry_Name";
  206. const WCHAR cszEntryName[] = L"EntryName";
  207. const WCHAR cszEntryValue[] = L"EntryValue";
  208. const WCHAR cszOLSDesktopShortcut[] = L"DesktopShortcut";
  209. const WCHAR cszSourceName[] = L"SourceName";
  210. const WCHAR cszTargetName[] = L"TargetName";
  211. //Htm pagetype flags
  212. #define PAGETYPE_UNDEFINED E_FAIL
  213. #define PAGETYPE_NOOFFERS 0x00000001
  214. #define PAGETYPE_MARKETING 0x00000002
  215. #define PAGETYPE_BRANDED 0x00000004
  216. #define PAGETYPE_BILLING 0x00000008
  217. #define PAGETYPE_CUSTOMPAY 0x00000010
  218. #define PAGETYPE_ISP_NORMAL 0x00000020
  219. #define PAGETYPE_ISP_TOS 0x00000040
  220. #define PAGETYPE_ISP_FINISH 0x00000080
  221. #define PAGETYPE_ISP_CUSTOMFINISH 0x00000100
  222. #define PAGETYPE_OLS_FINISH 0x00000200
  223. //Htm page flags
  224. #define PAGEFLAG_SAVE_CHKBOX 0x00000001 // Display ISP HTML with checkbox to save info at the bottom
  225. //??????????????????????????????????????????????????????????????
  226. ////////////////////////////////////////////////////////////////
  227. #define WM_OBCOMM_ONDIALERROR WM_USER + 42
  228. #define WM_OBCOMM_ONDIALING WM_USER + 43
  229. #define WM_OBCOMM_ONCONNECTING WM_USER + 44
  230. #define WM_OBCOMM_ONCONNECTED WM_USER + 45
  231. #define WM_OBCOMM_ONDISCONNECT WM_USER + 46
  232. #define WM_OBCOMM_ONSERVERERROR WM_USER + 47
  233. #define WM_OBCOMM_DOWNLOAD_PROGRESS WM_USER + 50
  234. #define WM_OBCOMM_DOWNLOAD_DONE WM_USER + 51
  235. #define WM_AGENT_HELP WM_USER + 52
  236. #define WM_OBCOMM_ONICSCONN_STATUS WM_USER + 53
  237. #define WM_OBCOMM_DIAL_DONE WM_USER + 54
  238. #define WM_OBCOMM_NETCHECK_DONE WM_USER + 56
  239. #define WM_OBMAIN_QUIT WM_USER + 48
  240. #define WM_OBMAIN_SERVICESSTART_DONE WM_USER + 55
  241. #define WM_OBMAIN_ASYNCINVOKE_DONE WM_USER + 57
  242. #define WM_OBMAIN_ASYNCINVOKE_FAILED WM_USER + 58
  243. #define WM_OBBACKGROUND_EXIT WM_USER + 60
  244. #define WM_OBMY_STATUS WM_USER + 61
  245. #define WM_SKIP WM_USER + 0x3000
  246. #define TIMER_DELAY 100
  247. #define IDT_OBMAIN_HANDSHAKE_TIMER 1001
  248. #define IDT_OBMAIN_LICENSE_TIMER 1002
  249. #define MAX_DISP_NAME 50
  250. #define MAX_RES_LEN 256
  251. // APP Mode enumeration.
  252. typedef enum
  253. {
  254. APMD_DEFAULT,
  255. APMD_OOBE,
  256. APMD_REG,
  257. APMD_ISP,
  258. APMD_MSN,
  259. APMD_ACT
  260. } APMD;
  261. // APP properties
  262. #define PROP_FULLSCREEN 0x80000000
  263. #define PROP_OOBE_OEM 0x00000001
  264. #define PROP_SETCONNECTIOD 0x10000000
  265. #define PROP_2NDINSTANCE 0x20000000
  266. #define PROP_CALLFROM_MSN 0x40000000
  267. // Registration post defines.
  268. #define POST_TO_OEM 0x0000001
  269. #define POST_TO_MS 0x0000002
  270. // reminder types.
  271. #define REMIND_REG 0
  272. #define REMIND_ISP 1
  273. // Activation errors
  274. #define ERR_ACT_UNINITIALIZED -1
  275. #define ERR_ACT_SUCCESS 0
  276. #define ERR_ACT_INACCESSIBLE 1
  277. #define ERR_ACT_INVALID_PID 2
  278. #define ERR_ACT_USED_PID 3
  279. #define ERR_ACT_INTERNAL_WINDOWS_ERR 4
  280. #define ERR_ACT_BLOCKED_PID 5
  281. #define ERR_ACT_CORRUPTED_PID 6
  282. #define ERR_ACT_NETWORK_FAILURE 7
  283. // Audit mode values
  284. #define NO_AUDIT 0
  285. #define NONE_RESTORE_AUDIT 1
  286. #define RESTORE_AUDIT 2
  287. #define SIMULATE_ENDUSER 3
  288. #define ICW_OS_VER L"01"
  289. #define ICW_ISPINFOPath L"download\\ispinfo.csv"
  290. //various flags for the icw including branding stuff
  291. #define ICW_CFGFLAG_OFFERS 0x00000001 // 0 = No offer; 1 = offers
  292. #define ICW_CFGFLAG_AUTOCONFIG 0x00000002 // 0 = No; 1 = Yes
  293. #define ICW_CFGFLAG_CNS 0x00000004 // 0 = No star; 1 = Star
  294. #define ICW_CFGFLAG_SIGNUP_PATH 0x00000008 // 0 = Jump to Finish; 1 = Continue down sign up path
  295. #define ICW_CFGFLAG_USERINFO 0x00000010 // 0 = Hide name/addr; 1 = Show name/addr page
  296. #define ICW_CFGFLAG_BILL 0x00000020 // 0 = Hide bill 1 = Show bill page
  297. #define ICW_CFGFLAG_PAYMENT 0x00000040 // 0 = Hide payment; 1 = Show payment page
  298. #define ICW_CFGFLAG_SECURE 0x00000080 // 0 = Not secure; 1 = Secure
  299. #define ICW_CFGFLAG_IEAKMODE 0x00000100 // 0 = No IEAK; 1 = IEAK
  300. #define ICW_CFGFLAG_BRANDED 0x00000200 // 0 = No branding; 1 = Branding
  301. #define ICW_CFGFLAG_SBS 0x00000400 // 0 = No SBS 1 = SBS
  302. #define ICW_CFGFLAG_ALLOFFERS 0x00000800 // 0 = Not all offers 1 = All offers
  303. #define ICW_CFGFLAG_USE_COMPANYNAME 0x00001000 // 0 = Not use 1 = Use company name
  304. #define ICW_CFGFLAG_ISDN_OFFER 0x00002000 // 0 = Non-ISDN offer 1 = ISDN offer
  305. #define ICW_CFGFLAG_OEM_SPECIAL 0x00004000 // 0 = non OEM special offer 1 = OEM special offer
  306. #define ICW_CFGFLAG_OEM 0x00008000 // 0 = non OEM offer 1 = OEM offer
  307. #define ICW_CFGFLAG_MODEMOVERRIDE 0x00010000
  308. #define ICW_CFGFLAG_ISPURLOVERRIDE 0x00020000
  309. #define ICW_CFGFLAG_PRODCODE_FROM_CMDLINE 0x00040000
  310. #define ICW_CFGFLAG_PROMOCODE_FROM_CMDLINE 0x00080000
  311. #define ICW_CFGFLAG_OEMCODE_FROM_CMDLINE 0x00100000
  312. #define ICW_CFGFLAG_SMARTREBOOT_NEWISP 0x00200000
  313. #define ICW_CFGFLAG_SMARTREBOOT_AUTOCONFIG 0x00400000 // this is seperate from ICW_CFGFLAG_AUTOCONFIG so as not to confuse function of flag
  314. #define ICW_CFGFLAG_SMARTREBOOT_MANUAL 0x00800000
  315. #define ICW_CFGFLAG_DO_NOT_OVERRIDE_ALLOFFERS 0x01000000
  316. #define ICW_CFGFLAG_SMARTREBOOT_LAN 0x02000000
  317. #define CONNECTED_REFFERAL 0x00000001
  318. #define CONNECTED_ISP_SIGNUP 0x00000002
  319. #define CONNECTED_ISP_MIGRATE 0x00000003
  320. #define CONNECTED_REGISTRATION 0x00000004
  321. #define CONNECTED_TYPE_MAX 5
  322. // Default strings for oem, prod, and promo code
  323. #define DEFAULT_OEMCODE L"Default"
  324. #define DEFAULT_PRODUCTCODE L"Desktop"
  325. #define DEFAULT_PROMOCODE L"Default"
  326. #define UPGRADETYPE_NONE 0
  327. #define UPGRADETYPE_WIN9X 1
  328. #define UPGRADETYPE_WINNT 2
  329. const UINT MAXSTATUSITEMS = 10;
  330. typedef struct dispatchList_tag
  331. {
  332. WCHAR szName [MAX_DISP_NAME];
  333. DWORD dwDispID;
  334. } DISPATCHLIST;
  335. // These macros calculate the bytes required by a string. The null-terminator
  336. // is accounted for.
  337. //
  338. #define BYTES_REQUIRED_BY_CCH(cch) ((cch + 1) * sizeof(WCHAR))
  339. #define BYTES_REQUIRED_BY_SZ(sz) ((lstrlen(sz) + 1) * sizeof(WCHAR))
  340. // These macros calculate the number of characters that will fit in a buffer.
  341. // The null-terminator is accounted for.
  342. //
  343. #define MAX_CHARS_IN_BUFFER(buf) ((sizeof(buf) / sizeof(WCHAR)) - 1)
  344. #define MAX_CHARS_IN_CB(cb) (((cb) / sizeof(WCHAR)) - 1)
  345. #define ARRAYSIZE(a) (sizeof(a) / sizeof(a[0]))
  346. #define SZ_EMPTY L"\0"
  347. ///////////////////////////////////////////////////////////////////////
  348. ///////////////////////////////////////////////////////////////////////
  349. ////////
  350. //////// A2W -- AnsiToWide Helper
  351. ////////
  352. ////////
  353. #define USES_CONVERSION int _convert = 0
  354. inline LPWSTR WINAPI A2WHelper(LPWSTR lpw, LPCSTR lpa, int nChars)
  355. {
  356. lpw[0] = L'\0';
  357. MultiByteToWideChar(CP_ACP, 0, lpa, -1, lpw, nChars);
  358. return lpw;
  359. }
  360. inline LPSTR WINAPI W2AHelper(LPSTR lpa, LPCWSTR lpw, int nChars)
  361. {
  362. lpa[0] = '\0';
  363. WideCharToMultiByte(CP_ACP, 0, lpw, -1, lpa, nChars, NULL, NULL);
  364. return lpa;
  365. }
  366. #define A2WHELPER A2WHelper
  367. #define W2AHELPER W2AHelper
  368. #define W2A(lpw) (\
  369. ((LPCWSTR)lpw == NULL) ? NULL : (\
  370. _convert = (lstrlenW(lpw)+1)*2,\
  371. W2AHELPER((LPSTR) alloca(_convert), lpw, _convert)))
  372. #define A2W(lpa) (\
  373. ((LPCSTR)lpa == NULL) ? NULL : (\
  374. _convert = (lstrlenA((LPSTR)lpa)+1),\
  375. A2WHELPER((LPWSTR) alloca(_convert*2), (LPSTR)lpa, _convert)))
  376. #define A2CW(lpa) ((LPCWSTR)A2W(lpa))
  377. #define A2COLE A2CW
  378. #endif //_APPDEFS_H_