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.

89 lines
2.2 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: ccolinfo.hxx
  7. //
  8. // Contents: ColumnsInfo class Declaration
  9. //
  10. // Functions:
  11. //
  12. // Notes:
  13. //
  14. //
  15. // History: 07/10/96 | RenatoB | Created, lifted most from EricJ
  16. // code
  17. //-----------------------------------------------------------------------------
  18. #ifndef _CCOLINFO_H_
  19. #define _CCOLINFO_H_
  20. #ifndef PUBLIC
  21. #define PUBLIC
  22. #endif
  23. #ifndef PROTECTED
  24. #define PROTECTED
  25. #endif
  26. #ifndef PRIVATE
  27. #define PRIVATE
  28. #endif
  29. //-----------------------------------------------------------------------------
  30. // @class CLdap_ColumnsInfo | Implements IColumnsInfo for LDAP providers
  31. // The only purpose of this class is to hook up CColInfo to
  32. // CLdap_RowProvider, and maintain proper reference counts.
  33. // All the work is done in CColInfo.
  34. // We always delegate to CLdap_RowProvider.
  35. //-----------------------------------------------------------------------------
  36. class CLdap_ColumnsInfo : public IColumnsInfo // public | IColumnsInfo
  37. {
  38. public: // public functions
  39. CLdap_ColumnsInfo( CLdap_RowProvider *pObj);
  40. ~CLdap_ColumnsInfo();
  41. STDMETHODIMP_(ULONG) AddRef(void);
  42. STDMETHODIMP_(ULONG) Release(void);
  43. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  44. // @cmember Get column info
  45. STDMETHODIMP
  46. GetColumnInfo(
  47. DBORDINAL *pcColumns,
  48. DBCOLUMNINFO **prgInfo,
  49. WCHAR **ppStringsBuffer
  50. );
  51. // @cmember Map Column IDs
  52. // NOTE: AutoDoc cannot parse this correctly.
  53. STDMETHODIMP
  54. MapColumnIDs(
  55. DBORDINAL cColumnIDs,
  56. const DBID rgColumnIDs[],
  57. DBORDINAL rgColumns[]
  58. );
  59. // @cmember Set CColInfo object.
  60. STDMETHODIMP
  61. FInit(
  62. DBORDINAL cColumns,
  63. DBCOLUMNINFO *rgInfo,
  64. OLECHAR *pStringsBuffer
  65. );
  66. private: //@access private data
  67. CLdap_RowProvider *m_pObj; //@cmember base object
  68. DBCOLUMNINFO* m_ColInfo ; //@cmember columns info object
  69. DBORDINAL m_cColumns;
  70. IMalloc *m_pMalloc;
  71. OLECHAR *m_pwchBuf;
  72. };
  73. #endif //_CCOLINFO_H_