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.

101 lines
2.6 KiB

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