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.

124 lines
3.5 KiB

  1. // devdrvpg.h : header file
  2. //
  3. #ifndef __DEVDRVPG_H__
  4. #define __DEVDRVPG_H__
  5. /*++
  6. Copyright (C) 1997-1999 Microsoft Corporation
  7. Module Name:
  8. devdrvpg.h
  9. Abstract:
  10. header file for devdrvpg.cpp
  11. Author:
  12. William Hsieh (williamh) created
  13. Revision History:
  14. --*/
  15. #include "proppage.h"
  16. //
  17. // help topic ids
  18. //
  19. #define IDH_DISABLEHELP (DWORD(-1))
  20. #define idh_devmgr_driver_copyright 106130 // Driver: "" (Static)
  21. #define idh_devmgr_devdrv_details 400400 // Driver: "Driver Details..." (Button)
  22. #define idh_devmgr_driver_change_driver 106140 // Driver: "&Change Driver..." (Button)
  23. #define idh_devmgr_rollback_button 106129 // Driver: "Roll Back Driver..." (Button)
  24. #define idh_devmgr_devdrv_uninstall 400500 // Driver: "&Uninstall" (Button)
  25. #define idh_devmgr_driver_driver_files 106100 // Driver: "" (ListBox)
  26. #define idh_devmgr_driver_provider 106110 // Driver: "" (Static)
  27. #define idh_devmgr_driver_file_version 106120 // Driver: "" (Static)
  28. #define idh_devmgr_driver_provider_main 106122 // Driver tab static
  29. #define idh_devmgr_driver_date_main 106124 // Driver tab static
  30. #define idh_devmgr_driver_version_main 106126 // Driver tab static
  31. #define idh_devmgr_digital_signer 106127 // Driver tab static- digital signer
  32. class CDeviceDriverPage : public CPropSheetPage
  33. {
  34. public:
  35. CDeviceDriverPage() :
  36. m_pDriver(NULL), m_pDevice(NULL), m_hwndDigitalSignerTip(NULL),
  37. CPropSheetPage(g_hInstance, IDD_DEVDRV_PAGE)
  38. {}
  39. ~CDeviceDriverPage();
  40. HPROPSHEETPAGE Create(CDevice* pDevice)
  41. {
  42. ASSERT(pDevice);
  43. m_pDevice = pDevice;
  44. // override PROPSHEETPAGE structure here...
  45. m_psp.lParam = (LPARAM)this;
  46. return CreatePage();
  47. }
  48. BOOL UpdateDriver(CDevice* pDevice,
  49. HWND hDlg,
  50. BOOL *pfChanged = NULL,
  51. DWORD *pdwReboot = NULL
  52. );
  53. BOOL RollbackDriver(CDevice* pDevice,
  54. HWND hDlg,
  55. BOOL *pfChanged = NULL,
  56. DWORD *pdwReboot = NULL
  57. );
  58. BOOL UninstallDrivers(CDevice* pDevice,
  59. HWND hDlg,
  60. BOOL *pfUninstalled = NULL
  61. );
  62. protected:
  63. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  64. virtual void UpdateControls(LPARAM lParam = 0);
  65. virtual BOOL OnHelp(LPHELPINFO pHelpInfo);
  66. virtual BOOL OnContextMenu(HWND hWnd, WORD xPos, WORD yPos);
  67. BOOL LaunchTroubleShooter(CDevice* pDevice, HWND hDlg, BOOL *pfChanged);
  68. private:
  69. void InitializeDriver();
  70. CDriver* m_pDriver;
  71. CDevice* m_pDevice;
  72. HWND m_hwndDigitalSignerTip;
  73. };
  74. /////////////////////////////////////////////////////////////////////////////
  75. // CDriverFilesDlg dialog
  76. class CDriverFilesDlg : public CDialog
  77. {
  78. public:
  79. CDriverFilesDlg(CDevice* pDevice, CDriver* pDriver)
  80. : CDialog(IDD_DRIVERFILES),
  81. m_pDriver(pDriver),
  82. m_pDevice(pDevice),
  83. m_ImageList(NULL)
  84. {}
  85. virtual BOOL OnInitDialog();
  86. virtual void OnCommand(WPARAM wParam, LPARAM lParam);
  87. virtual BOOL OnNotify(LPNMHDR pnmhdr);
  88. virtual BOOL OnDestroy();
  89. virtual BOOL OnHelp(LPHELPINFO pHelpInfo);
  90. virtual BOOL OnContextMenu(HWND hWnd, WORD xPos, WORD yPos);
  91. private:
  92. void ShowCurDriverFileDetail();
  93. void LaunchHelpForBlockedDriver();
  94. CDriver* m_pDriver;
  95. CDevice* m_pDevice;
  96. HIMAGELIST m_ImageList;
  97. };
  98. #endif // _DEVDRVPG_H__