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.

74 lines
1.6 KiB

  1. // QryBase.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: QryBase.h
  10. //
  11. // Contents: Query object for DS snapin
  12. //
  13. // History: 04-dec-96 jimharr Created
  14. // 08-apr-98 jonn Copied from DSADMIN QUERYSUP.H
  15. //
  16. //--------------------------------------------------------------------------
  17. #ifndef __QRYBASE_H__
  18. #define __QRYBASE_H__
  19. #define QUERY_PAGESIZE 256
  20. #define CMD_OPTIONS 2
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CDSSearch
  23. class CDSSearch
  24. {
  25. public:
  26. CDSSearch();
  27. ~CDSSearch();
  28. // INTERFACES
  29. public:
  30. HRESULT Init(IDirectorySearch * pObj);
  31. HRESULT Init(LPCWSTR lpcszObjectPath);
  32. HRESULT DoQuery();
  33. HRESULT GetNextRow ();
  34. HRESULT GetColumn(LPWSTR Attribute,
  35. PADS_SEARCH_COLUMN pColumnData);
  36. HRESULT FreeColumn(PADS_SEARCH_COLUMN pColumnData) {
  37. return m_pObj->FreeColumn(pColumnData);
  38. };
  39. HRESULT SetAttributeList (LPWSTR *pszAttribs, INT cAttrs);
  40. HRESULT SetSearchScope (ADS_SCOPEENUM scope);
  41. HRESULT SetFilterString (LPWSTR pszFilter) {
  42. m_pwszFilter = pszFilter;
  43. return S_OK;
  44. };
  45. //Attributes
  46. public:
  47. IDirectorySearch * m_pObj;
  48. ADS_SEARCH_HANDLE m_SearchHandle;
  49. protected:
  50. LPWSTR m_pwszFilter;
  51. LPWSTR * m_pszAttribs;
  52. ULONG m_nAttrs;
  53. private:
  54. BOOL m_bInitialized;
  55. };
  56. #endif //__QRYBASE_H__