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.

155 lines
3.8 KiB

  1. //***************************************************************************
  2. //
  3. // CONNECT.H
  4. //
  5. // Module: NLB Manager EXE
  6. //
  7. // Purpose: Interface to the "connect to host" dialog.
  8. //
  9. // Copyright (c)2001 Microsoft Corporation, All Rights Reserved
  10. //
  11. // History:
  12. //
  13. // 07/30/01 JosephJ Created
  14. //
  15. //***************************************************************************
  16. #pragma once
  17. // class ConnectDialog : public CDialog
  18. class ConnectDialog : public CPropertyPage
  19. {
  20. public:
  21. enum
  22. {
  23. IDD = IDD_DIALOG_CONNECT2
  24. };
  25. typedef enum
  26. {
  27. DLGTYPE_NEW_CLUSTER,
  28. DLGTYPE_EXISTING_CLUSTER,
  29. DLGTYPE_ADD_HOST
  30. } DlgType;
  31. ConnectDialog(
  32. CPropertySheet *psh,
  33. Document *pDocument,
  34. NLB_EXTENDED_CLUSTER_CONFIGURATION *pNlbCfg,
  35. ENGINEHANDLE *pehInterface, // IN OUT
  36. DlgType type,
  37. CWnd* parent
  38. );
  39. virtual BOOL OnInitDialog();
  40. virtual void OnOK();
  41. virtual BOOL OnSetActive();
  42. // virtual BOOL OnKillActive();
  43. virtual LRESULT OnWizardNext();
  44. // overrides CDialog -- see SDK documentation on DoDataExchange.
  45. // Used to map controls in resources to corresponding objects in this class.
  46. virtual void DoDataExchange( CDataExchange* pDX );
  47. //
  48. // We don't need these because we use the message map to
  49. // map button pressesdirectly to OnButtonConnect and OnButtonCredentials...
  50. //
  51. // CButton connectButton; // Action: Connect to host
  52. // CButton credentialsButton; // Action: Get non-default credentials.
  53. afx_msg void OnButtonConnect();
  54. afx_msg void OnSelchanged(NMHDR * pNotifyStruct, LRESULT * result );
  55. afx_msg void OnUpdateEditHostAddress();
  56. afx_msg BOOL OnHelpInfo (HELPINFO* helpInfo );
  57. afx_msg void OnContextMenu( CWnd* pWnd, CPoint point );
  58. BOOL m_fOK;
  59. void GetMachineName(_bstr_t &refMachineName)
  60. {
  61. refMachineName = m_MachineName;
  62. }
  63. private:
  64. CEdit hostAddress; // Host network address.
  65. CEdit connectionStatus; // Read-only status display
  66. CEdit listHeading; // Read-only status display
  67. // CListBox interfaceList; // List of interfaces (adapters)
  68. CListCtrl interfaceList;
  69. DlgType m_type;
  70. void
  71. mfn_InitializeListView(void);
  72. void
  73. mfn_InsertBoundInterface(
  74. ENGINEHANDLE ehInterfaceId,
  75. LPCWSTR szClusterName,
  76. LPCWSTR szClusterIp,
  77. LPCWSTR szInterfaceName
  78. );
  79. void
  80. mfn_InsertInterface(
  81. ENGINEHANDLE ehInterfaceId,
  82. LPCWSTR szInterfaceIp,
  83. LPCWSTR szInterfaceName,
  84. LPCWSTR szCluserIp
  85. );
  86. void
  87. mfn_SelectInterfaceIfAlreadyInCluster(
  88. LPCWSTR szClusterIp // OPTIONAL
  89. );
  90. void
  91. mfn_ApplySelectedInterfaceConfiguration(void);
  92. BOOL
  93. mfn_ValidateData(void);
  94. CPropertySheet *m_pshOwner;
  95. //
  96. // The machine name that the user has last successfully connected to.
  97. //
  98. _bstr_t m_MachineName;
  99. //
  100. // Handle to the host
  101. //
  102. ENGINEHANDLE m_ehHostId;
  103. //
  104. // The interface that the user has selected (null if none selected).
  105. // The public GetSelectedInterfaceId may be used to retrieve this.
  106. //
  107. BOOL m_fInterfaceSelected;
  108. ENGINEHANDLE *m_pehSelectedInterfaceId;
  109. int m_iInterfaceListItem;
  110. BOOL m_fSelectedInterfaceIsInCluster;
  111. NLB_EXTENDED_CLUSTER_CONFIGURATION *m_pNlbCfg;
  112. Document *m_pDocument;
  113. static
  114. DWORD
  115. s_HelpIDs[];
  116. static
  117. DWORD
  118. s_ExistingClusterHelpIDs[];
  119. DECLARE_MESSAGE_MAP()
  120. };