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.

93 lines
2.1 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 2000
  4. *
  5. * TITLE: Portsel.h
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: KeisukeT
  10. *
  11. * DATE: 27 Mar, 2000
  12. *
  13. * DESCRIPTION:
  14. * Port selection page of WIA class installer.
  15. *
  16. *******************************************************************************/
  17. #ifndef _PORTSEL_H_
  18. #define _PORTSEL_H_
  19. //
  20. // Include
  21. //
  22. #include "wizpage.h"
  23. #include "device.h"
  24. //
  25. // Class
  26. //
  27. class CPortSelectPage : public CInstallWizardPage
  28. {
  29. HDEVINFO m_hDevInfo; // Device info set of installing device.
  30. PSP_DEVINFO_DATA m_pspDevInfoData; // Pointer to Device element structure.
  31. BOOL m_bPortEnumerated; // Inidicate if ports are already enumed.
  32. DWORD m_dwNumberOfPort; // Number of port.
  33. CStringArray m_csaPortName; // All port CreateFile name on the system.
  34. CStringArray m_csaPortFriendlyName; // All port Friendly name on the system.
  35. PINSTALLER_CONTEXT m_pInstallerContext; // Installer context.
  36. CString m_csConnection; // Connection type of installing device.
  37. DWORD m_dwCapabilities; // Capabilities of installing device.
  38. BOOL CreateCDeviceObject();
  39. BOOL EnumPort();
  40. VOID UpdatePortList();
  41. VOID
  42. AddItemToPortList(
  43. LPTSTR szPortFriendlyName,
  44. DWORD Idx
  45. );
  46. BOOL
  47. SetDialogText(
  48. UINT uiMessageId
  49. );
  50. BOOL
  51. ShowControl(
  52. BOOL bShow
  53. );
  54. public:
  55. CPortSelectPage(PINSTALLER_CONTEXT pInstallerContext);
  56. ~CPortSelectPage();
  57. virtual BOOL OnCommand(WORD wItem, WORD wNotifyCode, HWND hwndItem);
  58. virtual BOOL OnNotify(LPNMHDR lpnmh);
  59. };
  60. BOOL
  61. GetPortNamesFromIndex(
  62. HDEVINFO hPortDevInfo,
  63. DWORD dwPortIndex,
  64. LPTSTR szPortName,
  65. LPTSTR szPortFriendlyName
  66. );
  67. BOOL
  68. GetDevinfoFromPortName(
  69. LPTSTR szPortName,
  70. HDEVINFO *phDevInfo,
  71. PSP_DEVINFO_DATA pspDevInfoData
  72. );
  73. #endif // _PORTSEL_H_