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.

64 lines
1.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: query.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef _ADSIQUERY_H
  11. #define _ADSIQUERY_H
  12. #define QUERY_PAGESIZE 256
  13. class CConnectionData;
  14. class CCredentialObject;
  15. ////////////////////////////////////////////////////////////////////////
  16. // CADSIQueryObject2
  17. class CADSIQueryObject2
  18. {
  19. public:
  20. CADSIQueryObject2();
  21. ~CADSIQueryObject2();
  22. // INTERFACES
  23. public:
  24. HRESULT Init(IDirectorySearch * pObj);
  25. HRESULT DoQuery();
  26. HRESULT GetNextRow ();
  27. HRESULT GetColumn(LPWSTR Attribute,
  28. PADS_SEARCH_COLUMN pColumnData);
  29. HRESULT FreeColumn(PADS_SEARCH_COLUMN pColumnData)
  30. {
  31. return m_pObj->FreeColumn(pColumnData);
  32. };
  33. HRESULT SetAttributeList (LPTSTR *pszAttribs, INT cAttrs);
  34. HRESULT SetSearchPrefs (ADS_SCOPEENUM scope, ULONG nMaxObjectCount = 0);
  35. HRESULT SetFilterString (LPWSTR pszFilter)
  36. {
  37. m_pwszFilter = pszFilter;
  38. return S_OK;
  39. }
  40. //Attributes
  41. public:
  42. CComPtr<IDirectorySearch> m_pObj;
  43. ADS_SEARCH_HANDLE m_SearchHandle;
  44. protected:
  45. LPWSTR m_pwszFilter;
  46. LPWSTR * m_pszAttribs;
  47. ULONG m_nAttrs;
  48. BOOL m_bInitialized;
  49. ADS_SEARCHPREF_INFO* aSearchPref;
  50. };
  51. #endif //_ADSIQUERY_H