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.

84 lines
2.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: adate.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // adate.h: Declaration of the CCertEncodeDateArray
  11. #include "resource.h" // main symbols
  12. /////////////////////////////////////////////////////////////////////////////
  13. // certenc
  14. #define wszCLASS_CERTENCODEDATEARRAY wszCLASS_CERTENCODE TEXT("DateArray")
  15. class CCertEncodeDateArray:
  16. public IDispatchImpl<ICertEncodeDateArray, &IID_ICertEncodeDateArray, &LIBID_CERTENCODELib>,
  17. public ISupportErrorInfoImpl<&IID_ICertEncodeDateArray>,
  18. public CComObjectRoot,
  19. public CComCoClass<CCertEncodeDateArray, &CLSID_CCertEncodeDateArray>
  20. {
  21. public:
  22. CCertEncodeDateArray()
  23. {
  24. m_aValue = NULL;
  25. m_fConstructing = FALSE;
  26. }
  27. ~CCertEncodeDateArray();
  28. BEGIN_COM_MAP(CCertEncodeDateArray)
  29. COM_INTERFACE_ENTRY(IDispatch)
  30. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  31. COM_INTERFACE_ENTRY(ICertEncodeDateArray)
  32. END_COM_MAP()
  33. DECLARE_NOT_AGGREGATABLE(CCertEncodeDateArray)
  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. CCertEncodeDateArray,
  38. wszCLASS_CERTENCODEDATEARRAY TEXT(".1"),
  39. wszCLASS_CERTENCODEDATEARRAY,
  40. IDS_CERTENCODEDATEARRAY_DESC,
  41. THREADFLAGS_BOTH)
  42. // ICertEncodeDateArray
  43. public:
  44. STDMETHOD(Decode)(
  45. /* [in] */ BSTR const strBinary);
  46. STDMETHOD(GetCount)(
  47. /* [out, retval] */ LONG __RPC_FAR *pCount);
  48. STDMETHOD(GetValue)(
  49. /* [in] */ LONG Index,
  50. /* [out, retval] */ DATE __RPC_FAR *pValue);
  51. STDMETHOD(Reset)(
  52. /* [in] */ LONG Count);
  53. STDMETHOD(SetValue)(
  54. /* [in] */ LONG Index,
  55. /* [in] */ DATE Value);
  56. STDMETHOD(Encode)(
  57. /* [out, retval] */ BSTR __RPC_FAR *pstrBinary);
  58. private:
  59. VOID _Cleanup(VOID);
  60. HRESULT _SetErrorInfo(
  61. IN HRESULT hrError,
  62. IN WCHAR const *pwszDescription);
  63. DATE *m_aValue;
  64. LONG m_cValue;
  65. LONG m_cValuesSet;
  66. BOOL m_fConstructing;
  67. };