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.

116 lines
3.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: crldist.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // crldist.h: Declaration of the CCertEncodeCRLDistInfo
  11. #include "resource.h" // main symbols
  12. /////////////////////////////////////////////////////////////////////////////
  13. // certenc
  14. #define wszCLASS_CERTENCODECRLDISTINFO wszCLASS_CERTENCODE TEXT("CRLDistInfo")
  15. class CCertEncodeCRLDistInfo:
  16. public IDispatchImpl<ICertEncodeCRLDistInfo, &IID_ICertEncodeCRLDistInfo, &LIBID_CERTENCODELib>,
  17. public ISupportErrorInfoImpl<&IID_ICertEncodeCRLDistInfo>,
  18. public CComObjectRoot,
  19. public CComCoClass<CCertEncodeCRLDistInfo, &CLSID_CCertEncodeCRLDistInfo>
  20. {
  21. public:
  22. CCertEncodeCRLDistInfo()
  23. {
  24. m_aValue = NULL;
  25. m_DecodeInfo = NULL;
  26. m_fConstructing = FALSE;
  27. }
  28. ~CCertEncodeCRLDistInfo();
  29. BEGIN_COM_MAP(CCertEncodeCRLDistInfo)
  30. COM_INTERFACE_ENTRY(IDispatch)
  31. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  32. COM_INTERFACE_ENTRY(ICertEncodeCRLDistInfo)
  33. END_COM_MAP()
  34. DECLARE_NOT_AGGREGATABLE(CCertEncodeCRLDistInfo)
  35. // Remove the comment from the line above if you don't want your object to
  36. // support aggregation. The default is to support it
  37. DECLARE_REGISTRY(
  38. CCertEncodeCRLDistInfo,
  39. wszCLASS_CERTENCODECRLDISTINFO TEXT(".1"),
  40. wszCLASS_CERTENCODECRLDISTINFO,
  41. IDS_CERTENCODECRLDIST_DESC,
  42. THREADFLAGS_BOTH)
  43. // ICertEncodeCRLDistInfo
  44. public:
  45. STDMETHOD(Decode)(
  46. /* [in] */ BSTR const strBinary);
  47. STDMETHOD(GetDistPointCount)(
  48. /* [out, retval] */ LONG __RPC_FAR *pDistPointCount);
  49. STDMETHOD(GetNameCount)(
  50. /* [in] */ LONG DistPointIndex,
  51. /* [out, retval] */ LONG __RPC_FAR *pNameCount);
  52. STDMETHOD(GetNameChoice)(
  53. /* [in] */ LONG DistPointIndex,
  54. /* [in] */ LONG NameIndex,
  55. /* [out, retval] */ LONG __RPC_FAR *pNameChoice);
  56. STDMETHOD(GetName)(
  57. /* [in] */ LONG DistPointIndex,
  58. /* [in] */ LONG NameIndex,
  59. /* [out, retval] */ BSTR __RPC_FAR *pstrName);
  60. STDMETHOD(Reset)(
  61. /* [in] */ LONG DistPointCount);
  62. STDMETHOD(SetNameCount)(
  63. /* [in] */ LONG DistPointIndex,
  64. /* [in] */ LONG NameCount);
  65. STDMETHOD(SetNameEntry)(
  66. /* [in] */ LONG DistPointIndex,
  67. /* [in] */ LONG NameIndex,
  68. /* [in] */ LONG NameChoice,
  69. /* [in] */ BSTR const strName);
  70. STDMETHOD(Encode)(
  71. /* [out, retval] */ BSTR *pstrBinary);
  72. private:
  73. VOID _Cleanup(VOID);
  74. BOOL _VerifyNames(
  75. IN LONG DistPointIndex);
  76. HRESULT _MapDistPoint(
  77. IN BOOL fEncode,
  78. IN LONG DistPointIndex,
  79. OUT LONG **ppNameCount,
  80. OUT CERT_ALT_NAME_ENTRY ***ppaName);
  81. HRESULT _MapName(
  82. IN BOOL fEncode,
  83. IN LONG DistPointIndex,
  84. IN LONG NameIndex,
  85. OUT CERT_ALT_NAME_ENTRY **ppName);
  86. HRESULT _SetErrorInfo(
  87. IN HRESULT hrError,
  88. IN WCHAR const *pwszDescription);
  89. CRL_DIST_POINT *m_aValue;
  90. LONG m_cValue;
  91. CRL_DIST_POINTS_INFO *m_DecodeInfo;
  92. BOOL m_fConstructing;
  93. };