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.

108 lines
3.1 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: row.h
  7. //
  8. // Contents: CertView implementation
  9. //
  10. //---------------------------------------------------------------------------
  11. class CEnumCERTVIEWROW:
  12. public IDispatchImpl<
  13. IEnumCERTVIEWROW,
  14. &IID_IEnumCERTVIEWROW,
  15. &LIBID_CERTADMINLib>,
  16. public ISupportErrorInfoImpl<&IID_IEnumCERTVIEWROW>,
  17. public CComObjectRoot
  18. // Not externally createable:
  19. //public CComCoClass<CEnumCERTVIEWROW, &CLSID_CEnumCERTVIEWROW>
  20. {
  21. public:
  22. CEnumCERTVIEWROW();
  23. ~CEnumCERTVIEWROW();
  24. BEGIN_COM_MAP(CEnumCERTVIEWROW)
  25. COM_INTERFACE_ENTRY(IDispatch)
  26. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  27. COM_INTERFACE_ENTRY(IEnumCERTVIEWROW)
  28. END_COM_MAP_X()
  29. DECLARE_NOT_AGGREGATABLE(CEnumCERTVIEWROW)
  30. // Remove the comment from the line above if you don't want your object to
  31. // support aggregation. The default is to support it
  32. #if 0 // Not externally createable:
  33. DECLARE_REGISTRY(
  34. CEnumCERTVIEWROW,
  35. wszCLASS_EnumCERTVIEWROW TEXT(".1"),
  36. wszCLASS_EnumCERTVIEWROW,
  37. IDS_ENUMCERTVIEWROW_DESC,
  38. THREADFLAGS_BOTH)
  39. #endif
  40. // IUnknown
  41. STDMETHODIMP QueryInterface(const IID& iid, void **ppv);
  42. ULONG STDMETHODCALLTYPE AddRef();
  43. ULONG STDMETHODCALLTYPE Release();
  44. // IEnumCERTVIEWROW
  45. STDMETHOD(Next)(
  46. /* [out, retval] */ LONG *pIndex);
  47. STDMETHOD(EnumCertViewColumn)(
  48. /* [out] */ IEnumCERTVIEWCOLUMN **ppenum);
  49. STDMETHOD(EnumCertViewAttribute)(
  50. /* [in] */ LONG Flags,
  51. /* [out, retval] */ IEnumCERTVIEWATTRIBUTE **ppenum);
  52. STDMETHOD(EnumCertViewExtension)(
  53. /* [in] */ LONG Flags,
  54. /* [out, retval] */ IEnumCERTVIEWEXTENSION **ppenum);
  55. STDMETHOD(Skip)(
  56. /* [in] */ LONG celt);
  57. STDMETHOD(Reset)(VOID);
  58. STDMETHOD(Clone)(
  59. /* [out] */ IEnumCERTVIEWROW **ppenum);
  60. STDMETHOD(GetMaxIndex)(
  61. /* [out, retval] */ LONG *pIndex);
  62. // CEnumCERTVIEWROW
  63. HRESULT Open(
  64. IN ICertView *pvw);
  65. private:
  66. HRESULT _FindCachedRow(
  67. IN LONG ielt,
  68. OUT CERTTRANSDBRESULTROW const **ppRow);
  69. HRESULT _SetErrorInfo(
  70. IN HRESULT hrError,
  71. IN WCHAR const *pwszDescription);
  72. ICertView *m_pvw;
  73. BOOL m_fNoMoreData;
  74. LONG m_cvrcTable;
  75. LONG m_cskip;
  76. LONG m_ielt; // index into full rowset
  77. LONG m_crowChunk; // Row Chunk Size
  78. CERTTRANSDBRESULTROW const *m_arowCache;
  79. ULONG m_celtCache; // cached rowset count
  80. LONG m_ieltCacheFirst; // cached rowset first index
  81. LONG m_ieltCacheNext; // cached rowset last idx+1
  82. LONG m_ieltMax; // max valid index
  83. LONG m_cbCache;
  84. CERTTRANSDBRESULTROW const *m_prowCacheCurrent; // current cached row
  85. // Reference count
  86. long m_cRef;
  87. };