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.

71 lines
2.2 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to existing Microsoft documentation.
  4. //
  5. //
  6. //
  7. //
  8. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  9. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  10. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  11. // PURPOSE.
  12. //
  13. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  14. //
  15. //
  16. //
  17. //==============================================================;
  18. #ifndef _CContextMenuExtension_H_
  19. #define _CContextMenuExtension_H_
  20. #include <tchar.h>
  21. #include <mmc.h>
  22. class CContextMenuExtension : public IExtendContextMenu
  23. {
  24. private:
  25. ULONG m_cref;
  26. HRESULT ExtractObjectTypeGUID( IDataObject* piDataObject, GUID* pguidObjectType );
  27. HRESULT ExtractSnapInCLSID( IDataObject* piDataObject, CLSID* pclsidSnapin );
  28. HRESULT ExtractString( IDataObject *piDataObject,
  29. CLIPFORMAT cfClipFormat,
  30. WCHAR *pstr,
  31. DWORD cchMaxLength);
  32. HRESULT ExtractData( IDataObject* piDataObject,
  33. CLIPFORMAT cfClipFormat,
  34. BYTE* pbData,
  35. DWORD cbData );
  36. // clipboard format
  37. static UINT s_cfDisplayName;
  38. static UINT s_cfSnapInCLSID;
  39. static UINT s_cfNodeType;
  40. public:
  41. CContextMenuExtension();
  42. ~CContextMenuExtension();
  43. ///////////////////////////////
  44. // Interface IUnknown
  45. ///////////////////////////////
  46. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  47. STDMETHODIMP_(ULONG) AddRef();
  48. STDMETHODIMP_(ULONG) Release();
  49. ///////////////////////////////
  50. // Interface IExtendContextMenu
  51. ///////////////////////////////
  52. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddMenuItems(
  53. /* [in] */ LPDATAOBJECT piDataObject,
  54. /* [in] */ LPCONTEXTMENUCALLBACK piCallback,
  55. /* [out][in] */ long __RPC_FAR *pInsertionAllowed);
  56. virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Command(
  57. /* [in] */ long lCommandID,
  58. /* [in] */ LPDATAOBJECT piDataObject);
  59. };
  60. #endif _CContextMenuExtension_H_