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.

65 lines
1.5 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. // CADSIQueryObject
  17. class CADSIQueryObject
  18. {
  19. public:
  20. CADSIQueryObject();
  21. ~CADSIQueryObject();
  22. // INTERFACES
  23. public:
  24. HRESULT Init(IDirectorySearch * pObj);
  25. HRESULT Init(CString csObjectPath, CCredentialObject* pCredentialObject);
  26. HRESULT DoQuery();
  27. HRESULT GetNextRow ();
  28. HRESULT GetColumn(LPWSTR Attribute,
  29. PADS_SEARCH_COLUMN pColumnData);
  30. HRESULT FreeColumn(PADS_SEARCH_COLUMN pColumnData)
  31. {
  32. return m_pObj->FreeColumn(pColumnData);
  33. };
  34. HRESULT SetAttributeList (LPTSTR *pszAttribs, INT cAttrs);
  35. HRESULT SetSearchPrefs (ADS_SCOPEENUM scope, ULONG nMaxObjectCount = 0);
  36. HRESULT SetFilterString (LPWSTR pszFilter)
  37. {
  38. m_pwszFilter = pszFilter;
  39. return S_OK;
  40. }
  41. //Attributes
  42. public:
  43. CComPtr<IDirectorySearch> m_pObj;
  44. ADS_SEARCH_HANDLE m_SearchHandle;
  45. protected:
  46. LPWSTR m_pwszFilter;
  47. LPWSTR * m_pszAttribs;
  48. ULONG m_nAttrs;
  49. BOOL m_bInitialized;
  50. ADS_SEARCHPREF_INFO* aSearchPref;
  51. };
  52. #endif //_ADSIQUERY_H