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.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1995 - 1999
  6. //
  7. // File: astring.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // astring.h: Declaration of the CCertEncodeStringArray
  11. #include "resource.h" // main symbols
  12. /////////////////////////////////////////////////////////////////////////////
  13. // certenc
  14. #define wszCLASS_CERTENCODESTRINGARRAY wszCLASS_CERTENCODE TEXT("StringArray")
  15. class CCertEncodeStringArray:
  16. public IDispatchImpl<ICertEncodeStringArray, &IID_ICertEncodeStringArray, &LIBID_CERTENCODELib>,
  17. public ISupportErrorInfoImpl<&IID_ICertEncodeStringArray>,
  18. public CComObjectRoot,
  19. public CComCoClass<CCertEncodeStringArray, &CLSID_CCertEncodeStringArray>
  20. {
  21. public:
  22. CCertEncodeStringArray()
  23. {
  24. m_aValue = NULL;
  25. m_fConstructing = FALSE;
  26. }
  27. ~CCertEncodeStringArray();
  28. BEGIN_COM_MAP(CCertEncodeStringArray)
  29. COM_INTERFACE_ENTRY(IDispatch)
  30. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  31. COM_INTERFACE_ENTRY(ICertEncodeStringArray)
  32. END_COM_MAP()
  33. DECLARE_NOT_AGGREGATABLE(CCertEncodeStringArray)
  34. // Remove the comment from the line above if you don't want your object to
  35. // support aggregation. The default is to support it
  36. DECLARE_REGISTRY(
  37. CCertEncodeStringArray,
  38. wszCLASS_CERTENCODESTRINGARRAY TEXT(".1"),
  39. wszCLASS_CERTENCODESTRINGARRAY,
  40. IDS_CERTENCODESTRINGARRAY_DESC,
  41. THREADFLAGS_BOTH)
  42. // ICertEncodeStringArray
  43. public:
  44. STDMETHOD(Decode)(
  45. /* [in] */ BSTR const strBinary);
  46. STDMETHOD(GetStringType)(
  47. /* [out, retval] */ LONG __RPC_FAR *pStringType);
  48. STDMETHOD(GetCount)(
  49. /* [out, retval] */ LONG __RPC_FAR *pCount);
  50. STDMETHOD(GetValue)(
  51. /* [in] */ LONG Index,
  52. /* [out, retval] */ BSTR __RPC_FAR *pstr);
  53. STDMETHOD(Reset)(
  54. /* [in] */ LONG Count,
  55. /* [in] */ LONG StringType);
  56. STDMETHOD(SetValue)(
  57. /* [in] */ LONG Index,
  58. /* [in] */ BSTR const str);
  59. STDMETHOD(Encode)(
  60. /* [out, retval] */ BSTR *pstrBinary);
  61. private:
  62. VOID _Cleanup(VOID);
  63. HRESULT _SetErrorInfo(
  64. IN HRESULT hrError,
  65. IN WCHAR const *pwszDescription);
  66. CERT_NAME_VALUE **m_aValue;
  67. LONG m_cValue;
  68. LONG m_cValuesSet;
  69. BOOL m_fConstructing;
  70. LONG m_StringType;
  71. };