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.

123 lines
3.6 KiB

  1. // devdrvpg.h : header file
  2. //
  3. #ifndef __DEVDRVPG_H__
  4. #define __DEVDRVPG_H__
  5. /*++
  6. Copyright (C) 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. );
  61. protected:
  62. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  63. virtual void UpdateControls(LPARAM lParam = 0);
  64. virtual BOOL OnHelp(LPHELPINFO pHelpInfo);
  65. virtual BOOL OnContextMenu(HWND hWnd, WORD xPos, WORD yPos);
  66. BOOL LaunchTroubleShooter(CDevice* pDevice, HWND hDlg, BOOL *pfChanged);
  67. private:
  68. void InitializeDriver();
  69. CDriver* m_pDriver;
  70. CDevice* m_pDevice;
  71. HWND m_hwndDigitalSignerTip;
  72. };
  73. /////////////////////////////////////////////////////////////////////////////
  74. // CDriverFilesDlg dialog
  75. class CDriverFilesDlg : public CDialog
  76. {
  77. public:
  78. CDriverFilesDlg(CDevice* pDevice, CDriver* pDriver)
  79. : CDialog(IDD_DRIVERFILES),
  80. m_pDriver(pDriver),
  81. m_pDevice(pDevice),
  82. m_ImageList(NULL)
  83. {}
  84. virtual BOOL OnInitDialog();
  85. virtual void OnCommand(WPARAM wParam, LPARAM lParam);
  86. virtual BOOL OnNotify(LPNMHDR pnmhdr);
  87. virtual BOOL OnDestroy();
  88. virtual BOOL OnHelp(LPHELPINFO pHelpInfo);
  89. virtual BOOL OnContextMenu(HWND hWnd, WORD xPos, WORD yPos);
  90. private:
  91. void ShowCurDriverFileDetail();
  92. void LaunchHelpForBlockedDriver();
  93. CDriver* m_pDriver;
  94. CDevice* m_pDevice;
  95. HIMAGELIST m_ImageList;
  96. };
  97. #endif // _DEVDRVPG_H__