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.

106 lines
3.0 KiB

  1. //
  2. // CListViews -- Class Descriptions for the main list views.
  3. //
  4. //
  5. // File: Globals.h
  6. // Contains Global definitions for the Hotfix OCX
  7. //
  8. #include "Resource.h"
  9. typedef struct _FILELIST
  10. {
  11. _TCHAR FileName[255];
  12. _TCHAR InstallPath[255];
  13. _TCHAR FileVersion[255];
  14. _TCHAR IsCurrent[255];
  15. _TCHAR FileDate[255];
  16. struct _FILELIST * pPrev;
  17. struct _FILELIST * pNext;
  18. } * PFILELIST,FILELIST;
  19. typedef struct _HOTFIXLIST
  20. {
  21. _TCHAR HotfixName[255];
  22. _TCHAR Description[255];
  23. _TCHAR InstalledDate[255];
  24. _TCHAR InstalledBy[255];
  25. _TCHAR Type[255];
  26. _TCHAR Locale[255];
  27. _TCHAR PackageCode[255];
  28. _TCHAR ServicePack[255];
  29. _TCHAR Uninstall[255];
  30. struct _HOTFIXLIST * pPrev;
  31. struct _HOTFIXLIST * pNext;
  32. PFILELIST FileList;
  33. } * PHOTFIXLIST,HOTFIXLIST;
  34. typedef struct _ProductNode {
  35. _TCHAR ProductName[255];
  36. _ProductNode * pPrev;
  37. _ProductNode * pNext;
  38. PHOTFIXLIST HotfixList;
  39. } * PPRODUCT, PRODUCTLIST;
  40. static BOOL m_SortOrder ; // True = Acending false = Decending
  41. static HWND TopList;
  42. class CListViews
  43. {
  44. private:
  45. HWND BottomList;
  46. PPRODUCT DataBase ;
  47. BOOL FreeDatabase();
  48. BOOL FreeHotfixList(PHOTFIXLIST CurrentHotfix);
  49. BOOL FreeFileList(PFILELIST CurrentFile);
  50. // BOOL BuildDataBase(_TCHAR * ComputerName);
  51. PHOTFIXLIST GetHotfixInfo( _TCHAR * pszProductName, HKEY* hUpdateKey );
  52. PPRODUCT BuildDatabase(_TCHAR * lpszComputerName);
  53. PFILELIST GetFileInfo(HKEY* hHotfixKey);
  54. VOID VerifyFiles(PPRODUCT Database);
  55. BOOL AddItemsTop();
  56. BOOL AddItemsBottom ();
  57. BOOL bUserAbort;
  58. HWND hDlgPrint;
  59. _TCHAR m_ProductName[255];
  60. DWORD m_CurrentView; // TRUE = By Hotfix, FALSE = BY File
  61. HINSTANCE m_hInst;
  62. _TCHAR CurrentProductName[255];
  63. _TCHAR CurrentFile[255];
  64. _TCHAR m_ComputerName[255];
  65. HWND m_WebButton;
  66. HWND m_UninstButton;
  67. HWND m_RptButton;
  68. public:
  69. _TCHAR m_CurrentHotfix[255];
  70. BOOL m_bRemoted;
  71. CListViews() {DataBase = NULL; m_CurrentView = VIEW_ALL_HOTFIX; m_SortOrder = TRUE;}
  72. ~CListViews() {;}
  73. BOOL Initialize( HWND ParentWnd, HINSTANCE hInst,_TCHAR *ComputerName,
  74. HWND WebButton, HWND UninstButton, HWND RptButton);
  75. BOOL Initialize( _TCHAR * ComputerName);
  76. BOOL ShowLists(RECT * rc);
  77. BOOL Resize(RECT *rc);
  78. DWORD GetCurrentView () { return m_CurrentView;}
  79. void SetViewMode(DWORD ViewType) ;
  80. /* void RefreshView (BOOL Reload) {;} // TRUE - if we just uninstalled or Refresh option selected
  81. // FALSE - for view and product selection changes. */
  82. void PrintReport();
  83. void SetProductName(_TCHAR * NewName);
  84. DWORD GetState();
  85. LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled, HWND m_hWnd);
  86. _TCHAR * GetCurrentHotfix();
  87. BOOL Uninstall();
  88. HWND GetTopList() { return TopList; }
  89. void SaveToCSV();
  90. static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
  91. // BOOL CALLBACK AbortProc(HDC PrinterDC, int iCode);
  92. // BOOL CALLBACK PrintDlgProc (HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
  93. };