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.

162 lines
4.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: rrasqry.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #if !defined(AFX_DLGSVR_H__19556672_96AB_11D1_8575_00C04FC31FD3__INCLUDED_)
  11. #define AFX_DLGSVR_H__19556672_96AB_11D1_8575_00C04FC31FD3__INCLUDED_
  12. #if _MSC_VER >= 1000
  13. #pragma once
  14. #endif // _MSC_VER >= 1000
  15. // dlgsvr.h : header file
  16. //
  17. #include "resource.h"
  18. #include "dialog.h" // CBaseDialog
  19. #include "helper.h"
  20. // RRAS Query Categories
  21. // -----
  22. enum RRAS_QRY_CAT{
  23. RRAS_QRY_CAT_NONE = 0,
  24. RRAS_QRY_CAT_THIS,
  25. RRAS_QRY_CAT_MACHINE ,
  26. RRAS_QRY_CAT_NT4DOMAIN ,
  27. RRAS_QRY_CAT_NT5LDAP
  28. };
  29. // Data structure to pass Query Info
  30. struct RRASQryData
  31. {
  32. DWORD dwCatFlag; // RRAS_QRY_CAT_*
  33. CString strScope;
  34. CString strFilter;
  35. };
  36. //----
  37. // QryData.strQryData definition
  38. //RRAS_QRY_CAT_NONE ignored
  39. //RRAS_QRY_CAT_THIS ignored
  40. //RRAS_QRY_CAT_MACHINE name of the machine
  41. //RRAS_QRY_CAT_NT4DOMAIN nt4 domain name
  42. //RRAS_QRY_CAT_NT5LDAP DN name domain object, and LDAP filter string, filter start with '('
  43. //----------------------------------
  44. //
  45. // S_OK -- User select OK
  46. // S_FALSE -- User select Cancel
  47. // ERROR:
  48. // DS error, search activeDs.dll
  49. // Win32 erroe
  50. // LDAP error
  51. // General error -- memory, invalid argument ...
  52. // Get a Query Data by pop up a set of dialog boxes
  53. HRESULT RRASOpenQryDlg(
  54. /*[in]*/ CWnd* pParent,
  55. /*[in, out]*/ RRASQryData& QryData // existing data will be overwritten when S_OK
  56. );
  57. //
  58. // S_OK -- User select OK
  59. // S_FALSE -- User select Cancel
  60. // ERROR:
  61. // DS error, search activeDs.dll
  62. // Win32 erroe
  63. // LDAP error
  64. // General error -- memory, invalid argument ...
  65. #define RRAS_QRY_RESULT_DNSNAME 0x00000001
  66. #define RRAS_QRY_RESULT_HOSTNAME 0x00000002
  67. HRESULT RRASExecQry(
  68. /*[in]*/ RRASQryData& QryData,
  69. /*[out]*/ DWORD& dwFlags,
  70. /*[out]*/ CStringArray& RRASs // existing data won't be destroyed
  71. );
  72. // S_OK -- User select OK
  73. // ERROR:
  74. // DS error, search activeDs.dll
  75. // Win32 erroe
  76. // LDAP error
  77. // General error -- memory, invalid argument ...
  78. //---
  79. //---RRASs definition upon return----------
  80. //RRAS_QRY_CAT_NONE no change, no query
  81. //RRAS_QRY_CAT_THIS no change, no query
  82. //RRAS_QRY_CAT_MACHINE no change, no query
  83. //RRAS_QRY_CAT_NT4DOMAIN server names of the the NT4 domain get added to the array
  84. //RRAS_QRY_CAT_NT5LDAP DN names of the computer object found in DS get added to the array
  85. //----------------------------------
  86. //
  87. // Get a Query Data by pop up a set of dialog boxes
  88. HRESULT RRASDSQueryDlg(
  89. /*[in]*/ CWnd* pParent,
  90. /*[in, out]*/ RRASQryData& QryData // existing data will be overwritten when S_OK
  91. );
  92. HRESULT RRASDelRouterIdObj(
  93. /*[in]*/LPCWSTR pwszMachineName // DN of the computer object in DS
  94. );
  95. /////////////////////////////////////////////////////////////////////////////
  96. // CDlgSvr dialog
  97. class CDlgSvr : public CBaseDialog
  98. {
  99. // Construction
  100. protected:
  101. CDlgSvr(CWnd* pParent = NULL); // standard constructor
  102. public:
  103. CDlgSvr(RRASQryData& QryData, CWnd* pParent = NULL); // standard constructor
  104. // Dialog Data
  105. //{{AFX_DATA(CDlgSvr)
  106. enum { IDD = IDD_QRY_ADDSERVER };
  107. CEdit m_editMachine;
  108. CEdit m_editDomain;
  109. CButton m_btnOk;
  110. CButton m_btnNext;
  111. CString m_strDomain;
  112. CString m_strMachine;
  113. int m_nRadio;
  114. //}}AFX_DATA
  115. // Overrides
  116. // ClassWizard generated virtual function overrides
  117. //{{AFX_VIRTUAL(CDlgSvr)
  118. protected:
  119. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  120. //}}AFX_VIRTUAL
  121. // Implementation
  122. protected:
  123. void Init();
  124. // Generated message map functions
  125. //{{AFX_MSG(CDlgSvr)
  126. afx_msg void OnRadioAnother();
  127. afx_msg void OnRadioNt4();
  128. afx_msg void OnRadioNt5();
  129. afx_msg void OnRadioThis();
  130. afx_msg void OnButtonNext();
  131. virtual BOOL OnInitDialog();
  132. //}}AFX_MSG
  133. DECLARE_MESSAGE_MAP()
  134. RRASQryData& m_QueryData;
  135. };
  136. //{{AFX_INSERT_LOCATION}}
  137. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  138. #endif // !defined(AFX_DLGSVR_H__19556672_96AB_11D1_8575_00C04FC31FD3__INCLUDED_)