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.

183 lines
4.1 KiB

  1. #ifndef __WIZARD_H
  2. #define __WIZARD_H
  3. #include "resource.h"
  4. //////////////////////// Defines //////////////////////////////////////////////
  5. // The maximum number of files that can be added when we are using auto-generate
  6. #define MAX_AUTO_MATCH 7
  7. ///////////////////////////////////////////////////////////////////////////////
  8. //////////////////////// Enums /////////////////////////////////////////////
  9. /*++
  10. The types of wizards for making fixes or apphelp
  11. --*/
  12. enum {
  13. TYPE_FIXWIZARD = 0, // The wizard is used for creating an app-fix
  14. TYPE_APPHELPWIZARD // The wizard is used for creatign an app help
  15. };
  16. ///////////////////////////////////////////////////////////////////////////////
  17. /*++
  18. class CShimWizard
  19. Desc: The shim wizard. The apphelp wizard is subclasses from this.
  20. Make a object of this and call BeginWizard() to start the wizard
  21. Members:
  22. UINT m_uType: The type of the wizard, one of TYPE_FIXWIZARD or TYPE_APPHELPWIZARD
  23. DBENTRY m_Entry: This will be entry on which the wizard works.
  24. If we are creating a new fix, then after the wizard ends, we create a new entry and assign m_Entry
  25. to that. If we are editing an existing wizard we first of all assign the entry being
  26. edited to m_Entry. The assignment operator for DBENTRY is overloaded
  27. BOOL m_bEditing: Are we creating a new entry or editing an existing one?
  28. DWORD dwMaskOfMainEntry: Matching attributes used for the main entry
  29. PDATABASE m_pDatabase: The presently selected database. The entry being
  30. edited lives here or if we are creatign a new fix or apphelp then the new
  31. entry will be placed here
  32. --*/
  33. class CShimWizard {
  34. public:
  35. UINT m_uType;
  36. DBENTRY m_Entry;
  37. BOOL m_bEditing;
  38. DWORD dwMaskOfMainEntry;
  39. PDATABASE m_pDatabase;
  40. public:
  41. void WipeEntry(BOOL bMatching, BOOL bShims, BOOL bLayers, BOOL bFlags);
  42. void GrabMatchingInfo(HWND hdlg);
  43. void WalkDirectory(PMATCHINGFILE* pMatchileFileListHead,LPCTSTR szDirectory, int nDepth);
  44. BOOL BeginWizard(HWND hParent, PDBENTRY pEntry, PDATABASE pDatabase, PBOOL pbShouldStartLUAWizard);
  45. BOOL CheckAndSetLongFilename(HWND hDlg, INT iStrID);
  46. CShimWizard();
  47. };
  48. BOOL
  49. CALLBACK
  50. GetAppName(
  51. HWND hWnd,
  52. UINT uMsg,
  53. WPARAM wParam,
  54. LPARAM lParam
  55. );
  56. BOOL
  57. CALLBACK
  58. GetFixes(
  59. HWND hDlg,
  60. UINT uMsg,
  61. WPARAM wParam,
  62. LPARAM lParam
  63. );
  64. INT_PTR
  65. CALLBACK
  66. SelectFiles(
  67. HWND hWnd,
  68. UINT uMsg,
  69. WPARAM wParam,
  70. LPARAM lParam
  71. );
  72. INT_PTR
  73. CALLBACK
  74. ParamsDlgProc(
  75. HWND hdlg,
  76. UINT uMsg,
  77. WPARAM wParam,
  78. LPARAM lParam
  79. );
  80. void
  81. ShowSelected(
  82. HWND hdlg
  83. );
  84. BOOL
  85. HandleShimsNext(
  86. HWND hdlg
  87. );
  88. BOOL
  89. ShimPresentInLayersOfEntry(
  90. PDBENTRY pEntry,
  91. PSHIM_FIX psf,
  92. PSHIM_FIX_LIST* ppsfList = NULL,
  93. PLAYER_FIX_LIST* pplfList = NULL
  94. );
  95. BOOL
  96. FlagPresentInLayersOfEntry(
  97. PDBENTRY pEntry,
  98. PFLAG_FIX pff,
  99. PFLAG_FIX_LIST* ppffList = NULL,
  100. PLAYER_FIX_LIST* pplfl = NULL
  101. );
  102. void
  103. ShowItems(
  104. HWND hDlg
  105. );
  106. INT_PTR
  107. CALLBACK
  108. SelectLayer(
  109. HWND hDlg,
  110. UINT uMsg,
  111. WPARAM wParam,
  112. LPARAM lParam
  113. );
  114. BOOL
  115. HandleLayersNext(
  116. HWND hdlg,
  117. BOOL bCheckAndAddLua,
  118. CSTRINGLIST* pstrlShimsAdded = NULL
  119. );
  120. void
  121. SetMask(
  122. HWND hwndTree
  123. );
  124. void
  125. CheckLayers(
  126. HWND hwndList
  127. );
  128. void
  129. ChangeShimFlagIcons(
  130. HWND hdlg,
  131. PLAYER_FIX_LIST plfl
  132. );
  133. BOOL
  134. HandleShimDeselect(
  135. HWND hdlg,
  136. INT iIndex
  137. );
  138. BOOL
  139. HandleLayerListNotification(
  140. HWND hdlg,
  141. LPARAM lParam
  142. );
  143. #endif