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.

88 lines
2.3 KiB

  1. // DSQuery.h : Declaration of the CDSQuery object
  2. // this is an internal helper object only, not exposed
  3. //
  4. //+-------------------------------------------------------------------------
  5. //
  6. // Microsoft Windows
  7. // Copyright (C) Microsoft Corporation, 1992 - 1999
  8. //
  9. // File: DSQuery.h
  10. //
  11. // Contents: Query object for DS snapin
  12. //
  13. // History: 04-dec-96 jimharr Created
  14. //
  15. //--------------------------------------------------------------------------
  16. #ifndef __DSQUERY_H__
  17. #define __DSQUERY_H__
  18. // this used to be 256, we dropped it to reduce latency on first page
  19. // retrieval.
  20. #define QUERY_PAGESIZE 50
  21. #define CMD_OPTIONS 2
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CDSSearch
  24. class CDSSearch
  25. {
  26. public:
  27. CDSSearch();
  28. CDSSearch(CDSCache * pCache, CDSComponentData * pCD);
  29. ~CDSSearch();
  30. // INTERFACES
  31. public:
  32. HRESULT Init(IDirectorySearch * pObj);
  33. HRESULT Init(LPCWSTR lpszObjectPath);
  34. HRESULT DoQuery();
  35. HRESULT GetNextRow ();
  36. HRESULT GetColumn(LPWSTR Attribute,
  37. PADS_SEARCH_COLUMN pColumnData);
  38. HRESULT FreeColumn(PADS_SEARCH_COLUMN pColumnData) {
  39. return m_pObj->FreeColumn(pColumnData);
  40. };
  41. HRESULT SetCookieFromData (CDSCookie* pCookie,
  42. CDSColumnSet* pColumnSet);
  43. HRESULT SetCookieFromData (CDSCookie* pCookie,
  44. CPathCracker& specialPerformancePathCracker,
  45. CDSColumnSet* pColumnSet);
  46. HRESULT SetAttributeList (LPTSTR *pszAttribs, INT cAttrs);
  47. HRESULT SetAttributeListForContainerClass ( CDSColumnSet* pColumnSet);
  48. HRESULT SetSearchScope (ADS_SCOPEENUM scope);
  49. HRESULT SetFilterString (LPWSTR pszFilter) {
  50. m_pwszFilter = pszFilter;
  51. return S_OK;
  52. };
  53. //Attributes
  54. public:
  55. IDirectorySearch * m_pObj;
  56. ADS_SEARCH_HANDLE m_SearchHandle;
  57. protected:
  58. LPWSTR m_pwszFilter;
  59. DSPROP_BSTR_BLOCK m_pszAttribs;
  60. CDSCache * m_pCache;
  61. CDSComponentData * m_pCD;
  62. ADS_SCOPEENUM m_scope;
  63. private:
  64. void _Reset();
  65. BOOL m_bInitialized;
  66. // JonN 6/29/99: must do extra work for container class nTFRSMember
  67. CString m_strContainerClassName;
  68. CMapStringToString m_mapMemberToComputer;
  69. };
  70. #endif //__DSQUERY_H__