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.

155 lines
5.6 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. mimebag.h
  5. Abstract:
  6. This module contains the definition for the
  7. object that wraps MimeOle with a Property Bag.
  8. Author:
  9. Andy Jacobs (andyj@microsoft.com)
  10. Revision History:
  11. andyj 01/28/97 created
  12. andyj 02/12/97 Converted PropertyBag's to Dictonary's
  13. --*/
  14. // MIMEBAG.h : Declaration of the CSEOMimeDictionary
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CSEOMimeDictionary
  17. class ATL_NO_VTABLE CSEOMimeDictionary :
  18. public CComObjectRootEx<CComMultiThreadModelNoCS>,
  19. public CComCoClass<CSEOMimeDictionary, &CLSID_CSEOMimeDictionary>,
  20. public IDispatchImpl<ISEODictionary, &IID_ISEODictionary, &LIBID_SEOLib>
  21. {
  22. public:
  23. HRESULT FinalConstruct();
  24. void FinalRelease();
  25. DECLARE_PROTECT_FINAL_CONSTRUCT();
  26. DECLARE_REGISTRY_RESOURCEID_EX(IDR_StdAfx,
  27. L"SEOMimeDictionary Class",
  28. L"SEO.SEOMimeDictionary.1",
  29. L"SEO.SEOMimeDictionary");
  30. BEGIN_COM_MAP(CSEOMimeDictionary)
  31. COM_INTERFACE_ENTRY(ISEODictionary)
  32. // COM_INTERFACE_ENTRY(IDispatch)
  33. // COM_INTERFACE_ENTRY(ISupportErrorInfo)
  34. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMimeMessageTree, m_pMessageTree)
  35. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMimeOleMalloc, m_pMalloc)
  36. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
  37. END_COM_MAP()
  38. // ISEODictionary
  39. public:
  40. virtual /* [id][propget][helpstring] */ HRESULT STDMETHODCALLTYPE get_Item(
  41. /* [in] */ VARIANT __RPC_FAR *pvarName,
  42. /* [retval][out] */ VARIANT __RPC_FAR *pvarResult);
  43. virtual /* [propput][helpstring] */ HRESULT STDMETHODCALLTYPE put_Item(
  44. /* [in] */ VARIANT __RPC_FAR *pvarName,
  45. /* [in] */ VARIANT __RPC_FAR *pvarValue);
  46. virtual /* [hidden][id][propget][helpstring] */ HRESULT STDMETHODCALLTYPE get__NewEnum(
  47. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *ppunkResult);
  48. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVariantA(
  49. /* [in] */ LPCSTR pszName,
  50. /* [retval][out] */ VARIANT __RPC_FAR *pvarResult);
  51. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVariantW(
  52. /* [in] */ LPCWSTR pszName,
  53. /* [retval][out] */ VARIANT __RPC_FAR *pvarResult);
  54. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetVariantA(
  55. /* [in] */ LPCSTR pszName,
  56. /* [in] */ VARIANT __RPC_FAR *pvarValue);
  57. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetVariantW(
  58. /* [in] */ LPCWSTR pszName,
  59. /* [in] */ VARIANT __RPC_FAR *pvarValue);
  60. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStringA(
  61. /* [in] */ LPCSTR pszName,
  62. /* [out][in] */ DWORD __RPC_FAR *pchCount,
  63. /* [retval][size_is][out] */ LPSTR pszResult);
  64. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStringW(
  65. /* [in] */ LPCWSTR pszName,
  66. /* [out][in] */ DWORD __RPC_FAR *pchCount,
  67. /* [retval][size_is][out] */ LPWSTR pszResult);
  68. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStringA(
  69. /* [in] */ LPCSTR pszName,
  70. /* [in] */ DWORD chCount,
  71. /* [size_is][in] */ LPCSTR pszValue);
  72. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStringW(
  73. /* [in] */ LPCWSTR pszName,
  74. /* [in] */ DWORD chCount,
  75. /* [size_is][in] */ LPCWSTR pszValue);
  76. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDWordA(
  77. /* [in] */ LPCSTR pszName,
  78. /* [retval][out] */ DWORD __RPC_FAR *pdwResult);
  79. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDWordW(
  80. /* [in] */ LPCWSTR pszName,
  81. /* [retval][out] */ DWORD __RPC_FAR *pdwResult);
  82. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDWordA(
  83. /* [in] */ LPCSTR pszName,
  84. /* [in] */ DWORD dwValue);
  85. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDWordW(
  86. /* [in] */ LPCWSTR pszName,
  87. /* [in] */ DWORD dwValue);
  88. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetInterfaceA(
  89. /* [in] */ LPCSTR pszName,
  90. /* [in] */ REFIID iidDesired,
  91. /* [retval][iid_is][out] */ IUnknown __RPC_FAR *__RPC_FAR *ppunkResult);
  92. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetInterfaceW(
  93. /* [in] */ LPCWSTR pszName,
  94. /* [in] */ REFIID iidDesired,
  95. /* [retval][iid_is][out] */ IUnknown __RPC_FAR *__RPC_FAR *ppunkResult);
  96. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetInterfaceA(
  97. /* [in] */ LPCSTR pszName,
  98. /* [in] */ IUnknown __RPC_FAR *punkValue);
  99. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetInterfaceW(
  100. /* [in] */ LPCWSTR pszName,
  101. /* [in] */ IUnknown __RPC_FAR *punkValue);
  102. DECLARE_GET_CONTROLLING_UNKNOWN();
  103. private: // Implementation member functions
  104. void ReadHeader();
  105. private: // Private data
  106. IMimeMessageTree *m_pMessageTree; // Our copy of aggregated object
  107. IMimeOleMalloc *m_pMalloc;
  108. LONG m_dwValueCnt;
  109. struct ValueEntry {
  110. BSTR strName;
  111. //DWORD dwType;
  112. BSTR strData;
  113. //BOOL bDirty;
  114. } *m_paValue;
  115. CComObjectThreadModel::CriticalSection m_csCritSec;
  116. CComPtr<IUnknown> m_pUnkMarshaler;
  117. };