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.

62 lines
2.0 KiB

  1. /*--------------------------------------------------------------------------*
  2. *
  3. * Microsoft Windows
  4. * Copyright (C) Microsoft Corporation, 1992 - 000
  5. *
  6. * File: extension.h
  7. *
  8. * Contents:
  9. *
  10. * History: 13-Mar-2000 jeffro Created
  11. *
  12. *--------------------------------------------------------------------------*/
  13. #pragma once
  14. class CExtension :
  15. public CComObjectRoot
  16. {
  17. protected:
  18. enum ExtensionType
  19. {
  20. eExtType_Namespace,
  21. eExtType_ContextMenu,
  22. eExtType_PropertySheet,
  23. eExtType_Taskpad,
  24. eExtType_View,
  25. // must be last
  26. eExtType_Count,
  27. eExtType_First = eExtType_Namespace,
  28. eExtType_Last = eExtType_View,
  29. };
  30. protected:
  31. static HRESULT WINAPI UpdateRegistry (
  32. BOOL bRegister,
  33. ExtensionType eType,
  34. const CLSID& clsidSnapIn,
  35. LPCWSTR pszClassName,
  36. LPCWSTR pszProgID,
  37. LPCWSTR pszVersionIndependentProgID,
  38. LPCWSTR pszExtendedNodeType);
  39. };
  40. #define DECLARE_EXTENSION_REGISTRATION( \
  41. eType, \
  42. clsid, \
  43. szClassName, \
  44. szProgID, \
  45. szVersionIndependentProgID, \
  46. szExtendedNodeType) \
  47. public: static HRESULT WINAPI UpdateRegistry(BOOL bRegister) \
  48. { \
  49. return (CExtension::UpdateRegistry ( \
  50. bRegister, \
  51. eType, \
  52. clsid, \
  53. OLESTR(szClassName), \
  54. OLESTR(szProgID), \
  55. OLESTR(szVersionIndependentProgID), \
  56. OLESTR(szExtendedNodeType))); \
  57. }