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.

223 lines
6.3 KiB

  1. //
  2. // APPWIZ.H -- App install wizard header file
  3. //
  4. // Copyright (C) Microsoft, 1994,1995 All Rights Reserved.
  5. //
  6. // History:
  7. // ral 5/23/94 - Copied from INTL CPL
  8. // 3/20/95 [stevecat] - NT port & real clean up, unicode, etc.
  9. // 3/14/98 [scotth] - reworked into shell 5 project
  10. //
  11. #ifndef _APPWIZ_H_
  12. #define _APPWIZ_H_
  13. #include <pif.h> // for PROPPRG
  14. #include <apwizhlp.h>
  15. #include "appwizid.h"
  16. #include <shsemip.h> // for RestartDialog
  17. #define CPLMODE_NORMAL 0
  18. #define CPLMODE_AUTOMSDOS 1
  19. #define CPLMODE_PROPWIZ 2
  20. #define MAX_PAGES 15 // limit on number of pages we can have
  21. #define WDFLAG_NOBROWSEPAGE 0x00000001 // Don't let user pick exe name
  22. #define WDFLAG_APPKNOWN 0x00000002 // Finish after selecting folder
  23. #define WDFLAG_DOSAPP 0x00000004 // Exe is a DOS program
  24. // -- notused 0x00000008
  25. // -- notused 0x00000010
  26. #define WDFLAG_LINKHEREWIZ 0x00000020 // Create empty link (NOT IMPLEMENTED!)
  27. #define WDFLAG_INEDITMODE 0x00000040 // Editing a folder label
  28. #define WDFLAG_DONTOPENFLDR 0x00000080 // Don't open folder when link made
  29. #define WDFLAG_REALMODEONLY 0x00000100 // Don't use any prot mode drivers
  30. #define WDFLAG_COPYLINK 0x00000200 // Copy link, don't create new one.
  31. #define WDFLAG_SETUPWIZ 0x00000400 // Setup from disk wizard
  32. #define WDFLAG_READOPTFLAGS 0x00000800 // Value in dwDosOptGlobalFlags is valid
  33. #define WDFLAG_NOAUTORUN 0x00001000 // Disable autorun while wizard is running
  34. #define WDFLAG_AUTOTSINSTALLUI 0x00002000 // Automate Install Mode (For people double clicking or calling ShellExecute() on setup programs)
  35. #define WDFLAG_EXPSZ 0x10000000 // WizData contains expanded strings
  36. typedef struct _DOSOPT {
  37. HKEY hk;
  38. DWORD dwFlags;
  39. UINT uOrder;
  40. DWORD dwStdOpt;
  41. } DOSOPT, FAR * LPDOSOPT;
  42. //////////////////////////////////////////////////////////////////////////////
  43. //
  44. // UNINSTALL_ITEM -- more info kept in an array paralell to the listbox
  45. //
  46. //////////////////////////////////////////////////////////////////////////////
  47. typedef struct
  48. {
  49. TCHAR command[ MAX_PATH ]; // command to run which will nuke the app
  50. } UNINSTALL_ITEM, FAR * LPUNINSTALL_ITEM;
  51. typedef struct _WIZDATA {
  52. HWND hwnd;
  53. DWORD dwFlags;
  54. TCHAR szExeName[MAX_PATH];
  55. TCHAR szExpExeName[MAX_PATH];
  56. TCHAR szParams[MAX_PATH];
  57. TCHAR szProgDesc[MAX_PATH];
  58. TCHAR szWorkingDir[MAX_PATH];
  59. HBITMAP hbmpWizard;
  60. HIMAGELIST himl;
  61. LPTSTR lpszFolder;
  62. PROPPRG PropPrg;
  63. LPTSTR lpszOriginalName; // if non-null then link exists already
  64. LPUNINSTALL_ITEM lpUItem;
  65. #ifndef NO_NEW_SHORTCUT_HOOK
  66. INewShortcutHook *pnshhk;
  67. TCHAR szExt[MAX_PATH];
  68. INewShortcutHookA *pnshhkA;
  69. #endif
  70. BOOL bTermSrvAndAdmin;
  71. BOOL bPrevMode;
  72. } WIZDATA, FAR * LPWIZDATA;
  73. //
  74. // Private messages
  75. //
  76. #define WMPRIV_POKEFOCUS WM_APP+0
  77. //
  78. // Wizard entry points.
  79. //
  80. BOOL LinkWizard(LPWIZDATA);
  81. BOOL SetupWizard(LPWIZDATA);
  82. //
  83. // Main appwiz property sheet
  84. //
  85. BOOL_PTR CALLBACK AppListDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  86. BOOL_PTR CALLBACK InstallUninstallDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  87. //
  88. // Pushes the "OK" button on a property sheet.
  89. //
  90. void DismissCPL(LPWIZDATA);
  91. //
  92. // Setup wizard pages
  93. //
  94. BOOL_PTR CALLBACK SetupDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  95. BOOL_PTR CALLBACK ChgusrDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  96. BOOL_PTR CALLBACK ChgusrFinishDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  97. BOOL_PTR CALLBACK ChgusrFinishPrevDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  98. //
  99. // Shortcut wizard pages
  100. //
  101. BOOL_PTR CALLBACK BrowseDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  102. BOOL_PTR CALLBACK SetupBrowseDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  103. BOOL_PTR CALLBACK PickFolderDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  104. BOOL_PTR CALLBACK GetTitleDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  105. BOOL_PTR CALLBACK PickIconDlgProc(HWND hDlg, UINT message , WPARAM wParam, LPARAM lParam);
  106. //
  107. // Function in Folder.C that is used for removing folders from the task bar
  108. // property sheet.
  109. //
  110. BOOL RemoveItemsDialog(HWND hParent);
  111. //
  112. // Strips "@" characters from a string resource and replaces them with NULLs
  113. // Returns TRUE if succeeded
  114. //
  115. EXTERN_C BOOL LoadAndStrip(int id, LPTSTR lpsz, int cbstr);
  116. //
  117. // Exec the program. Used by Setup and AppList
  118. //
  119. BOOL ExecSetupProg(LPWIZDATA lpwd, BOOL ForceWx86, BOOL bMinWiz);
  120. //
  121. // Skip to next string in doubly null terminated string
  122. //
  123. LPTSTR SkipStr(LPTSTR);
  124. //
  125. // Used by all wizard sheets at WM_INITDIALOG
  126. //
  127. LPWIZDATA InitWizSheet(HWND hDlg, LPARAM lParam, DWORD dwFlags);
  128. //
  129. // Used by all wizard sheets at PSN_RESET
  130. //
  131. void CleanUpWizData(LPWIZDATA lpwd);
  132. //
  133. // Thunked exports for 16-bit apps/dlls
  134. //
  135. void InstallCPL(HWND hwnd, UINT nStartPage);
  136. //
  137. // Functions for links
  138. //
  139. BOOL CreateLink(LPWIZDATA);
  140. BOOL GetLinkName(LPTSTR, UINT cch, LPWIZDATA);
  141. //
  142. // Created by the thunk scripts
  143. //
  144. BOOL WINAPI Pif3216_ThunkConnect32(LPCTSTR pszDll16, LPCTSTR pszDll32, HANDLE hIinst, DWORD dwReason);
  145. BOOL WINAPI Pif1632_ThunkConnect32(LPCTSTR pszDll16, LPCTSTR pszDll32, HANDLE hIinst, DWORD dwReason);
  146. BOOL GetSingleAppInfo(LPWIZDATA);
  147. //
  148. // Gets the INF name for install programs. Returns false if none.
  149. //
  150. BOOL AppListGetInfName(LPWIZDATA);
  151. //
  152. // Functions determine info about lpwd->szExeName
  153. //
  154. void DetermineExeType(LPWIZDATA);
  155. //
  156. // Fills in the szProgDesc field of the wizdata structure.
  157. //
  158. BOOL DetermineDefaultTitle(LPWIZDATA);
  159. //
  160. // Strip the extension off of a file name.
  161. //
  162. void StripExt(LPTSTR lpsz);
  163. //
  164. // Global data
  165. //
  166. extern int g_cxIcon;
  167. extern int g_cyIcon;
  168. extern TCHAR const c_szPIF[];
  169. extern TCHAR const c_szLNK[];
  170. #ifdef WX86
  171. //
  172. // from uninstal.c
  173. //
  174. extern BOOL bWx86Enabled;
  175. extern BOOL bForceX86Env;
  176. extern const WCHAR ProcArchName[];
  177. #endif
  178. #endif // _APPWIZ_H_