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.

90 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. #include "dscmn.h" // DSPROP_BSTR_BLOCK
  19. // this used to be 256, we dropped it to reduce latency on first page
  20. // retrieval.
  21. #define QUERY_PAGESIZE 50
  22. #define CMD_OPTIONS 2
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CDSSearch
  25. class CDSSearch
  26. {
  27. public:
  28. CDSSearch();
  29. CDSSearch(CDSCache * pCache, CDSComponentData * pCD);
  30. ~CDSSearch();
  31. // INTERFACES
  32. public:
  33. HRESULT Init(IDirectorySearch * pObj);
  34. HRESULT Init(LPCWSTR lpszObjectPath);
  35. HRESULT DoQuery();
  36. HRESULT GetNextRow ();
  37. HRESULT GetColumn(LPWSTR Attribute,
  38. PADS_SEARCH_COLUMN pColumnData);
  39. HRESULT FreeColumn(PADS_SEARCH_COLUMN pColumnData) {
  40. return m_pObj->FreeColumn(pColumnData);
  41. };
  42. HRESULT SetCookieFromData (CDSCookie* pCookie,
  43. CDSColumnSet* pColumnSet);
  44. HRESULT SetCookieFromData (CDSCookie* pCookie,
  45. CPathCracker& specialPerformancePathCracker,
  46. CDSColumnSet* pColumnSet);
  47. HRESULT SetAttributeList (LPTSTR *pszAttribs, INT cAttrs);
  48. HRESULT SetAttributeListForContainerClass ( CDSColumnSet* pColumnSet);
  49. HRESULT SetSearchScope (ADS_SCOPEENUM scope);
  50. HRESULT SetFilterString (LPWSTR pszFilter) {
  51. m_pwszFilter = pszFilter;
  52. return S_OK;
  53. };
  54. //Attributes
  55. public:
  56. IDirectorySearch * m_pObj;
  57. ADS_SEARCH_HANDLE m_SearchHandle;
  58. protected:
  59. LPWSTR m_pwszFilter;
  60. DSPROP_BSTR_BLOCK m_pszAttribs;
  61. CDSCache * m_pCache;
  62. CDSComponentData * m_pCD;
  63. ADS_SCOPEENUM m_scope;
  64. private:
  65. void _Reset();
  66. BOOL m_bInitialized;
  67. // JonN 6/29/99: must do extra work for container class nTFRSMember
  68. CString m_strContainerClassName;
  69. CMapStringToString m_mapMemberToComputer;
  70. };
  71. #endif //__DSQUERY_H__