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.

105 lines
2.6 KiB

  1. //+--------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 1999
  5. //
  6. // File: ext.h
  7. //
  8. // Contents: CertView implementation
  9. //
  10. //---------------------------------------------------------------------------
  11. #define CEXT_CHUNK 20
  12. class CEnumCERTVIEWEXTENSION:
  13. public IDispatchImpl<
  14. IEnumCERTVIEWEXTENSION,
  15. &IID_IEnumCERTVIEWEXTENSION,
  16. &LIBID_CERTADMINLib>,
  17. public ISupportErrorInfoImpl<&IID_IEnumCERTVIEWEXTENSION>,
  18. public CComObjectRoot
  19. // Not externally createable:
  20. //public CComCoClass<CEnumCERTVIEWEXTENSION, &CLSID_CEnumCERTVIEWEXTENSION>
  21. {
  22. public:
  23. CEnumCERTVIEWEXTENSION();
  24. ~CEnumCERTVIEWEXTENSION();
  25. BEGIN_COM_MAP(CEnumCERTVIEWEXTENSION)
  26. COM_INTERFACE_ENTRY(IDispatch)
  27. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  28. COM_INTERFACE_ENTRY(IEnumCERTVIEWEXTENSION)
  29. END_COM_MAP()
  30. DECLARE_NOT_AGGREGATABLE(CEnumCERTVIEWEXTENSION)
  31. // Remove the comment from the line above if you don't want your object to
  32. // support aggregation. The default is to support it
  33. #if 0 // Not externally createable:
  34. DECLARE_REGISTRY(
  35. CEnumCERTVIEWEXTENSION,
  36. wszCLASS_EnumCERTVIEWEXTENSION TEXT(".1"),
  37. wszCLASS_EnumCERTVIEWEXTENSION,
  38. IDS_ENUMCERTVIEWEXTENSION_DESC,
  39. THREADFLAGS_BOTH)
  40. #endif
  41. // IUnknown
  42. STDMETHODIMP QueryInterface(const IID& iid, void **ppv);
  43. ULONG STDMETHODCALLTYPE AddRef();
  44. ULONG STDMETHODCALLTYPE Release();
  45. // IEnumCERTVIEWEXTENSION
  46. STDMETHOD(Next)(
  47. /* [out, retval] */ LONG *pIndex);
  48. STDMETHOD(GetName)(
  49. /* [out, retval] */ BSTR *pstrOut);
  50. STDMETHOD(GetFlags)(
  51. /* [out, retval] */ LONG *pFlags);
  52. STDMETHOD(GetValue)(
  53. /* [in] */ LONG Type,
  54. /* [in] */ LONG Flags,
  55. /* [out, retval] */ VARIANT *pvarValue);
  56. STDMETHOD(Skip)(
  57. /* [in] */ LONG celt);
  58. STDMETHOD(Reset)(VOID);
  59. STDMETHOD(Clone)(
  60. /* [out] */ IEnumCERTVIEWEXTENSION **ppenum);
  61. // CEnumCERTVIEWEXTENSION
  62. HRESULT Open(
  63. IN LONG RowId,
  64. IN LONG Flags,
  65. IN ICertView *pvw);
  66. private:
  67. HRESULT _FindExtension(
  68. OUT CERTDBEXTENSION const **ppcde);
  69. HRESULT _SaveExtensions(
  70. IN DWORD celt,
  71. IN CERTTRANSBLOB const *pctbExtensions);
  72. HRESULT _SetErrorInfo(
  73. IN HRESULT hrError,
  74. IN WCHAR const *pwszDescription);
  75. LONG m_RowId;
  76. LONG m_Flags;
  77. ICertView *m_pvw;
  78. LONG m_ielt;
  79. LONG m_ieltCurrent;
  80. LONG m_celtCurrent;
  81. CERTDBEXTENSION *m_aelt;
  82. BOOL m_fNoMore;
  83. BOOL m_fNoCurrentRecord;
  84. // Reference count
  85. long m_cRef;
  86. };