Leaked source code of windows server 2003
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.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1995 - 1999
  6. //
  7. // File: along.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // along.h: Declaration of the CCertEncodeLongArray
  11. #include "resource.h" // main symbols
  12. /////////////////////////////////////////////////////////////////////////////
  13. // certenc
  14. #define wszCLASS_CERTENCODELONGARRAY wszCLASS_CERTENCODE TEXT("LongArray")
  15. class CCertEncodeLongArray:
  16. public IDispatchImpl<ICertEncodeLongArray, &IID_ICertEncodeLongArray, &LIBID_CERTENCODELib>,
  17. public ISupportErrorInfoImpl<&IID_ICertEncodeLongArray>,
  18. public CComObjectRoot,
  19. public CComCoClass<CCertEncodeLongArray, &CLSID_CCertEncodeLongArray>
  20. {
  21. public:
  22. CCertEncodeLongArray()
  23. {
  24. m_aValue = NULL;
  25. m_fConstructing = FALSE;
  26. }
  27. ~CCertEncodeLongArray();
  28. BEGIN_COM_MAP(CCertEncodeLongArray)
  29. COM_INTERFACE_ENTRY(IDispatch)
  30. COM_INTERFACE_ENTRY(ISupportErrorInfo)
  31. COM_INTERFACE_ENTRY(ICertEncodeLongArray)
  32. END_COM_MAP()
  33. DECLARE_NOT_AGGREGATABLE(CCertEncodeLongArray)
  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. CCertEncodeLongArray,
  38. wszCLASS_CERTENCODELONGARRAY TEXT(".1"),
  39. wszCLASS_CERTENCODELONGARRAY,
  40. IDS_CERTENCODELONGARRAY_DESC,
  41. THREADFLAGS_BOTH)
  42. // ICertEncodeLongArray
  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] */ LONG __RPC_FAR *pValue);
  51. STDMETHOD(Reset)(
  52. /* [in] */ LONG Count);
  53. STDMETHOD(SetValue)(
  54. /* [in] */ LONG Index,
  55. /* [in] */ LONG 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. LONG *m_aValue;
  64. LONG m_cValue;
  65. LONG m_cValuesSet;
  66. BOOL m_fConstructing;
  67. };