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.

171 lines
5.3 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. gmoniker.h
  5. Abstract:
  6. This module contains the definition for the
  7. CSEOGenericMoniker object.
  8. Author:
  9. Andy Jacobs (andyj@microsoft.com)
  10. Revision History:
  11. andyj 04/11/97 created
  12. --*/
  13. // GMONIKER.H : Declaration of the CSEOGenericMoniker
  14. #define GENERIC_MONIKER_PROGID L"SEO.SEOGenericMoniker"
  15. #define GENERIC_MONIKER_VERPROGID GENERIC_MONIKER_PROGID L".1"
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CSEOGenericMoniker
  18. class ATL_NO_VTABLE CSEOGenericMoniker :
  19. public CComObjectRootEx<CComMultiThreadModelNoCS>,
  20. public CComCoClass<CSEOGenericMoniker, &CLSID_CSEOGenericMoniker>,
  21. public IParseDisplayName,
  22. public IDispatchImpl<IMoniker, &IID_IMoniker, &LIBID_SEOLib>
  23. {
  24. public:
  25. HRESULT FinalConstruct();
  26. void FinalRelease();
  27. DECLARE_PROTECT_FINAL_CONSTRUCT();
  28. DECLARE_REGISTRY_RESOURCEID_EX(IDR_StdAfx,
  29. L"SEOGenericMoniker Class",
  30. GENERIC_MONIKER_VERPROGID,
  31. GENERIC_MONIKER_PROGID);
  32. BEGIN_COM_MAP(CSEOGenericMoniker)
  33. COM_INTERFACE_ENTRY(IMoniker)
  34. COM_INTERFACE_ENTRY(IParseDisplayName)
  35. COM_INTERFACE_ENTRY(IPersistStream) // Needed for OleLoadFromStream support
  36. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
  37. END_COM_MAP()
  38. // IPersist
  39. public:
  40. HRESULT STDMETHODCALLTYPE GetClassID(
  41. /* [out] */ CLSID __RPC_FAR *pClassID);
  42. // IPersistStream
  43. public:
  44. HRESULT STDMETHODCALLTYPE IsDirty(void);
  45. HRESULT STDMETHODCALLTYPE Load(
  46. /* [unique][in] */ IStream __RPC_FAR *pStm);
  47. HRESULT STDMETHODCALLTYPE Save(
  48. /* [unique][in] */ IStream __RPC_FAR *pStm,
  49. /* [in] */ BOOL fClearDirty);
  50. HRESULT STDMETHODCALLTYPE GetSizeMax(
  51. /* [out] */ ULARGE_INTEGER __RPC_FAR *pcbSize);
  52. // IMoniker
  53. public:
  54. /* [local] */ HRESULT STDMETHODCALLTYPE BindToObject(
  55. /* [unique][in] */ IBindCtx __RPC_FAR *pbc,
  56. /* [unique][in] */ IMoniker __RPC_FAR *pmkToLeft,
  57. /* [in] */ REFIID riidResult,
  58. /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvResult);
  59. /* [local] */ HRESULT STDMETHODCALLTYPE BindToStorage(
  60. /* [unique][in] */ IBindCtx __RPC_FAR *pbc,
  61. /* [unique][in] */ IMoniker __RPC_FAR *pmkToLeft,
  62. /* [in] */ REFIID riid,
  63. /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObj);
  64. HRESULT STDMETHODCALLTYPE Reduce(
  65. /* [unique][in] */ IBindCtx __RPC_FAR *pbc,
  66. /* [in] */ DWORD dwReduceHowFar,
  67. /* [unique][out][in] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkToLeft,
  68. /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkReduced);
  69. HRESULT STDMETHODCALLTYPE ComposeWith(
  70. /* [unique][in] */ IMoniker __RPC_FAR *pmkRight,
  71. /* [in] */ BOOL fOnlyIfNotGeneric,
  72. /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkComposite);
  73. HRESULT STDMETHODCALLTYPE Enum(
  74. /* [in] */ BOOL fForward,
  75. /* [out] */ IEnumMoniker __RPC_FAR *__RPC_FAR *ppenumMoniker);
  76. HRESULT STDMETHODCALLTYPE IsEqual(
  77. /* [unique][in] */ IMoniker __RPC_FAR *pmkOtherMoniker);
  78. HRESULT STDMETHODCALLTYPE Hash(
  79. /* [out] */ DWORD __RPC_FAR *pdwHash);
  80. HRESULT STDMETHODCALLTYPE IsRunning(
  81. /* [unique][in] */ IBindCtx __RPC_FAR *pbc,
  82. /* [unique][in] */ IMoniker __RPC_FAR *pmkToLeft,
  83. /* [unique][in] */ IMoniker __RPC_FAR *pmkNewlyRunning);
  84. HRESULT STDMETHODCALLTYPE GetTimeOfLastChange(
  85. /* [unique][in] */ IBindCtx __RPC_FAR *pbc,
  86. /* [unique][in] */ IMoniker __RPC_FAR *pmkToLeft,
  87. /* [out] */ FILETIME __RPC_FAR *pFileTime);
  88. HRESULT STDMETHODCALLTYPE Inverse(
  89. /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmk);
  90. HRESULT STDMETHODCALLTYPE CommonPrefixWith(
  91. /* [unique][in] */ IMoniker __RPC_FAR *pmkOther,
  92. /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkPrefix);
  93. HRESULT STDMETHODCALLTYPE RelativePathTo(
  94. /* [unique][in] */ IMoniker __RPC_FAR *pmkOther,
  95. /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkRelPath);
  96. HRESULT STDMETHODCALLTYPE GetDisplayName(
  97. /* [unique][in] */ IBindCtx __RPC_FAR *pbc,
  98. /* [unique][in] */ IMoniker __RPC_FAR *pmkToLeft,
  99. /* [out] */ LPOLESTR __RPC_FAR *ppszDisplayName);
  100. HRESULT STDMETHODCALLTYPE ParseDisplayName(
  101. /* [unique][in] */ IBindCtx __RPC_FAR *pbc,
  102. /* [unique][in] */ IMoniker __RPC_FAR *pmkToLeft,
  103. /* [in] */ LPOLESTR pszDisplayName,
  104. /* [out] */ ULONG __RPC_FAR *pchEaten,
  105. /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkOut);
  106. HRESULT STDMETHODCALLTYPE IsSystemMoniker(
  107. /* [out] */ DWORD __RPC_FAR *pdwMksys);
  108. // IParseDisplayName
  109. public:
  110. HRESULT STDMETHODCALLTYPE ParseDisplayName(
  111. /* [unique][in] */ IBindCtx __RPC_FAR *pbc,
  112. /* [in] */ LPOLESTR pszDisplayName,
  113. /* [out] */ ULONG __RPC_FAR *pchEaten,
  114. /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmkOut);
  115. DECLARE_GET_CONTROLLING_UNKNOWN();
  116. protected:
  117. HRESULT CreateBoundObject(IPropertyBag *pBag, ISEOInitObject **ppResult);
  118. void SetPropertyBag(IPropertyBag *pBag);
  119. void SetMonikerString(LPCOLESTR psString) {
  120. m_bstrMoniker = psString;
  121. }
  122. private: // Private data
  123. CComBSTR m_bstrMoniker;
  124. CComPtr<IUnknown> m_pUnkMarshaler;
  125. };